shopDetail.vue 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363
  1. <template>
  2. <view class="cont">
  3. <view v-if="shopdata">
  4. <view class="top">
  5. <swiper class="swiper" :circular="true" :indicator-dots="true" indicator-active-color="#FF4F00"
  6. v-if="shopImg.length>0">
  7. <swiper-item v-for="(item,index) in shopImg">
  8. <view class="swiper-item">
  9. <image :src="item" mode="widthFix" class="swpImg"></image>
  10. </view>
  11. </swiper-item>
  12. </swiper>
  13. <image src="../../static/img/750500.png" mode="" class="swpImg" v-else></image>
  14. <!-- <view class="Member" @click="deleteMember" v-if="shopdata.isAttention">取消关注</view>
  15. <view class="Member" @click="Member" v-if="!shopdata.isAttention">关注</view> -->
  16. </view>
  17. <!-- 店铺主体 -->
  18. <view class="shopMain">
  19. <view class="shopName">{{shopdata.shopName}}</view>
  20. <view class="pingfenBox" @click="goAppraise(shopdata.shopId)">
  21. <view class="fenshuBox" v-if="shopdata.shopScore"><span
  22. class="fenshuNum">{{shopdata.shopScore}}</span> <span class="fenshuTxt">分</span></view>
  23. <view class="fenshuBox" v-if="!shopdata.shopScore"> <span class="fenshuTxt2">暂无评分</span></view>
  24. <view class="shuxian"></view>
  25. <span class="cishu">服务次数 {{shopdata.sheetSum}}</span>
  26. <view class="shuxian"></view>
  27. <span class="cishu">评价数 {{shopdata.evaluateSum}}</span>
  28. <image src="../../static/img/jt.png" mode="" class="pingfenImg"></image>
  29. </view>
  30. <!-- 是否营业 -->
  31. <view class="business">
  32. <view class="businessTitle">营业时间:</view>
  33. <view class="businessTitme"> <span v-if="shopdata.startTime">{{shopdata.startTime}}</span>-<span
  34. v-if="shopdata.endTime">{{shopdata.endTime}}</span> </view>
  35. </view>
  36. <!-- 品牌 -->
  37. <view class="brandsBox">
  38. <view class="brandsLine" v-if="shopdata.levelName">{{shopdata.levelName}}</view>
  39. <view v-for="(item,index) in brandsList" class="brandsLine2">{{item}}</view>
  40. </view>
  41. </view>
  42. <!-- 地图 -->
  43. <view class="mapBox">
  44. <view class="mapLeft">
  45. <view class="dingwBox">
  46. <image src="../../static/img/icon_coordinate.png" mode="" class="mapdwImg"></image>
  47. <view class="distance" v-if="shopdata.distance&&shopdata.distance!= '0.00'">距离
  48. {{shopdata.distance}}km
  49. </view>
  50. <view class="distance" v-else>距离 --km</view>
  51. </view>
  52. <view class="mapaddress">{{shopdata.provinceName}}{{shopdata.cityName}}{{shopdata.areaName}}
  53. <span v-if="shopdata.address">{{shopdata.address}}</span>
  54. </view>
  55. </view>
  56. <view class="shopsx"></view>
  57. <view class="shopRightBox" @click="map">
  58. <view>
  59. <image src="../../static/img/icon_map.png" mode="" class="shopRightImg"></image>
  60. </view>
  61. <view class="shopRihgtTxt">地图</view>
  62. </view>
  63. <view class="shopsx"></view>
  64. <view class="shopRightBox" @click="call">
  65. <view>
  66. <image src="../../static/img/icon_phone2.png" mode="" class="shopRightImg"></image>
  67. </view>
  68. <view class="shopRihgtTxt">电话</view>
  69. </view>
  70. </view>
  71. <!-- 去保养 -->
  72. <view class="bottom">
  73. <view class="care" @click="goCare">去保养</view>
  74. </view>
  75. <!-- 车型里程 -->
  76. <!-- <view class="Cartop">
  77. <view class="CartopLeft">
  78. <image :src="maintainCarData.brandLogo" mode="" class="CarbrandLogo" @click="carEdit"></image>
  79. <view class="carName" @click="carEdit">
  80. <span v-if="maintainCarData.brand"> {{maintainCarData.brand}}</span>
  81. <span v-if="maintainCarData.series">-{{maintainCarData.series}}</span>
  82. <span v-if="!maintainCarData.brand">添加我的爱车</span>
  83. </view>
  84. <image src="../../static/img/icon_edit.png" mode="" class="CartopEdit" @click="carEdit"></image>
  85. </view>
  86. <view class="CartopRight">
  87. <input type="text" v-model="maintainCarData.milage" @confirm="getData" value="" placeholder="请输入当前里程" class="CartopInput" placeholder-style="color:#999999;"/>
  88. <view>
  89. <image src="../../static/img/icon_edit.png" mode="" class="CartopEdit" @click="milageEdit"></image>
  90. </view>
  91. </view>
  92. </view> -->
  93. <!-- 车型里程 -->
  94. <!-- 保养 -->
  95. <!-- <view class="main" style="margin-top: 20rpx;">
  96. <view class="mainLeft">
  97. <scroll-view scroll-y="true" class="mainscrollView">
  98. <view class="mainLeftLine" v-for="(item,index) in mealData" :class="{lineLeftActive:leftIndex==index}"
  99. @click="leftClick(item,index)">
  100. <span>{{item.name}}</span>
  101. <view class="lineNum" v-show="item.num!=0">{{item.num}}</view>
  102. </view>
  103. </scroll-view>
  104. </view>
  105. <view class="mainRight">
  106. <scroll-view scroll-y="true" class="mainscrollView">
  107. <view v-show="!mealData[leftIndex].listPackage||mealData[leftIndex].listPackage.length==0">
  108. <view class="nodataBox">
  109. <image src="../../static/img/nodata.png" mode="widthFix" class="nodataImg"></image>
  110. <view class="noTxt">暂无数据</view>
  111. </view>
  112. </view>
  113. <view class="mainRightLine" v-for="(item,index) in mealData[leftIndex].listPackage">
  114. <view class="contTop">
  115. <view class="contTopLeft">
  116. <view class="listPackgeName"> {{item.name}} </view>
  117. <view class="listPackgeMs">10000公里(或6个月)/次 | 机油参考用量4L</view>
  118. </view>
  119. <view class="contTopRight" @click="listcheck(item)">
  120. <image src="../../static/img/login_icon_checked.png" mode="" class="imgPrivacy" v-show="item.planItem"></image>
  121. <image src="../../static/img/login_icon_uncheck.png" mode="" class="imgPrivacy" v-show="!item.planItem"></image>
  122. </view>
  123. </view>
  124. <view class="contZk">
  125. <view class="contZkMain" v-show="item.planItem">
  126. <view v-for="(vf,findex) in item.listGoodsAll">
  127. <view class="goodsItemLIne" v-for="(v,i) in vf" v-if="i==0" @click="goGoods(v)">
  128. <image :src="v.picUrl" mode="" class="goodsImg" v-if="v.picUrl"></image>
  129. <image src="../../static/img/noimg.png" mode="" class="goodsImg sm" v-else></image>
  130. <view class="goodsCont">
  131. <view class="goodsContTop">
  132. <view class="goodsItemName">{{v.showName}}</view>
  133. <view class="replace" @click.stop="replace(vf,index,findex,i)" v-if="vf.length>1">更换</view>
  134. </view>
  135. <view class="goodsCOntBOttom">
  136. <view class="salePrice">¥{{v.salePrice}}</view>
  137. <view class="as">
  138. <view class="asa" @click.stop="reduce(v)">-</view>
  139. <view class="asNum">{{v.qty}}</view>
  140. <view class="asa" @click.stop="plus(v)">+</view>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. </view>
  146. <view class="goodsItemLIne" v-for="(v,i) in item.listItem">
  147. <image :src="v.picUrl" mode="" class="goodsImg" v-if="v.picUrl"></image>
  148. <image src="../../static/img/noimg.png" mode="" class="goodsImg sm" v-else></image>
  149. <view class="goodsCont">
  150. <view class="goodsContTop">
  151. <view class="goodsItemName">{{v.showName}}</view>
  152. </view>
  153. <view class="goodsCOntBOttom">
  154. <view class="salePrice">¥{{v.salePrice}}</view>
  155. <view class="itemNum">x1</view>
  156. </view>
  157. </view>
  158. </view>
  159. </view>
  160. </view>
  161. </view>
  162. </scroll-view>
  163. </view>
  164. </view> -->
  165. <!-- 保养 -->
  166. <!-- 底部 -->
  167. <!-- <view class="bottom">
  168. <view class="bottomLeft">
  169. <view class="caidan" @click="caidanClick">
  170. <image src="../../static/img/caidan.png" mode="" class="caidanImg"></image>
  171. <view class="total" v-show="total>0">{{total}}</view>
  172. </view>
  173. <view>
  174. <view class="heji"> <span class="heji1">合计</span> <span class="hejiNum">¥{{totalhj}}</span> </view>
  175. <view class="hejiMs">商品¥{{goodsTotal}}+工时费¥{{salePriceTotal}}</view>
  176. </view>
  177. </view>
  178. <view class="settlement" @click="settlement">去结算</view>
  179. </view> -->
  180. <!-- <view class="caidanTk" v-show="qingdanShow" @click="qingdanShow=false">
  181. <view class="tkCont" @click.stop="">
  182. <view class="caidanTkTop" >
  183. <view class="tkTopTitle">清单</view>
  184. <view class="topTopright">
  185. <view class="empty" @click.stop="empty">清空</view>
  186. <view class="close" @click="qingdanShow=false">X</view>
  187. </view>
  188. </view>
  189. <view class="tkMain">
  190. <scroll-view scroll-y="true" class="tkMainSv">
  191. <view class="qingdanLine" v-for="(item,index) in orderData">
  192. <view class="mainTitle">{{item.name}}</view>
  193. <view class="goodsItem" v-for="(v,i) in item.listGoodsAll">
  194. <view>
  195. <image :src="v.picUrl" mode="" class="goodsImg" v-if="v.picUrl"></image>
  196. <image src="../../static/img/noimg.png" mode="" class="goodsImg " v-else></image>
  197. </view>
  198. <view class="goodsItemRight" >
  199. <view class="goodsItemName">{{v.goodsName}}</view>
  200. <view class="goodsItemBottom">
  201. <view class="goodssalePrice">¥{{v.salePrice}}</view>
  202. <view class="goodsNum">x{{v.qty}}</view>
  203. </view>
  204. </view>
  205. </view>
  206. <view class="goodsItem" v-for="(v,i) in item.listItem">
  207. <view>
  208. <image :src="v.picUrl" mode="" class="goodsImg" v-if="v.picUrl"></image>
  209. <image src="../../static/img/noimg.png" mode="" class="goodsImg " v-else></image>
  210. </view>
  211. <view class="goodsItemRight" >
  212. <view class="goodsItemName">{{v.itemName}}</view>
  213. <view class="goodsItemBottom">
  214. <view class="goodssalePrice">¥{{v.salePrice}}</view>
  215. <view class="goodsNum">x{{v.qty}}</view>
  216. </view>
  217. </view>
  218. </view>
  219. </view>
  220. </scroll-view>
  221. </view>
  222. </view>
  223. </view> -->
  224. </view>
  225. </view>
  226. </template>
  227. <script>
  228. export default {
  229. data() {
  230. return {
  231. shopId: '',
  232. location: '',
  233. shopdata: '',
  234. shopImg: [],
  235. indicatorcolor: 'rgba(255, 79, 0)',
  236. brandsList: [],
  237. maintainCarData: '',
  238. mealData: '',
  239. leftIndex: 0,
  240. total: 0,
  241. qingdanShow: false,
  242. totalhj: 0,
  243. goodsTotal: 0,
  244. salePriceTotal: 0,
  245. orderData: [],
  246. replaceIndex1: '',
  247. replaceIndex2: '',
  248. brand: '',
  249. }
  250. },
  251. onShow() {
  252. /* var maintainCarData2=uni.getStorageSync("maintainCarData");
  253. if(this.maintainCarData.id!=maintainCarData2.id){
  254. this.maintainCarData=maintainCarData2;
  255. if(this.maintainCarData.milage==0){
  256. this.maintainCarData.milage='';
  257. }
  258. this.getData();
  259. }
  260. var replaceData=uni.getStorageSync("replaceData");
  261. if(replaceData){
  262. replaceData.qty=1;
  263. console.log(replaceData)
  264. this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2].unshift(replaceData)
  265. console.log(this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2])
  266. this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2]=this.unique(this.mealData[this.leftIndex].listPackage[this.replaceIndex1].listGoodsAll[this.replaceIndex2])
  267. this.$forceUpdate()
  268. } */
  269. var cardata = uni.getStorageSync("maintainCarData")
  270. if (cardata) {
  271. this.brand = cardata.brand
  272. }
  273. },
  274. onLoad(opt) {
  275. // this.$common.isUserId()
  276. this.shopId = opt.id;
  277. this.location = uni.getStorageSync("locationCity");
  278. this.maintainCarData = uni.getStorageSync("maintainCarData");
  279. this.getData();
  280. /* this.addBMemberShopFootprint();
  281. this.getmainData() */
  282. },
  283. methods: {
  284. goCare() {
  285. this.$common.isUserId()
  286. uni.navigateTo({
  287. url: '../module/maintain?brand=' + this.brand
  288. })
  289. },
  290. goGoods(item) {
  291. uni.navigateTo({
  292. url: '../goods/goodsDetail?goodsId=' + item.mGoodsID + '&type=1' + '&typeIndex=2&maintain=1'
  293. })
  294. },
  295. unique(arr1) {
  296. const res = new Map();
  297. return arr1.filter((a) => !res.has(a.goodsID) && res.set(a.goodsID, 1))
  298. },
  299. goAppraise(shopId) {
  300. console.log(shopId);
  301. uni.navigateTo({
  302. url: 'shopAppraise?shopId=' + shopId
  303. })
  304. },
  305. getmainData() {
  306. uni.showLoading({});
  307. this.$http('miniApp/packageMiniAppController/queryPackageList', {
  308. mileage: this.maintainCarData.milage,
  309. liyangId: this.maintainCarData.nLevelID,
  310. shopId: this.shopId
  311. }, 'GET').then(res => {
  312. uni.hideLoading();
  313. this.mealData = res.data;
  314. this.calculation();
  315. })
  316. },
  317. carEdit() {
  318. uni.navigateTo({
  319. url: '../car/cailist?type=2'
  320. })
  321. },
  322. milageEdit() {
  323. this.maintainCarData.milage = ''
  324. },
  325. map() {
  326. console.log("打开地图")
  327. var that = this;
  328. if (!that.shopdata.lat || !that.shopdata.lng) {
  329. uni.showToast({
  330. title: '该店铺未设置定位',
  331. icon: 'none',
  332. duration: 3000
  333. });
  334. } else {
  335. uni.openLocation({
  336. latitude: Number(that.shopdata.lat),
  337. longitude: Number(that.shopdata.lng),
  338. name: that.shopdata.shopName,
  339. address: that.shopdata.address,
  340. success: function() {
  341. console.log('success');
  342. },
  343. fail(err) {
  344. console.log(err)
  345. }
  346. });
  347. }
  348. },
  349. call() {
  350. uni.makePhoneCall({
  351. phoneNumber: this.shopdata.mobilePhone
  352. });
  353. },
  354. getData() {
  355. uni.showLoading({});
  356. this.shopImg = [];
  357. this.$http('worldKeepCar/worldHome/queryKeepCarShopDetail', {
  358. id: this.shopId,
  359. lat: this.location.lat ? this.location.lat : '',
  360. lng: this.location.lng ? this.location.lng : '',
  361. }, 'GET').then(res => {
  362. uni.hideLoading();
  363. this.shopdata = res.data;
  364. if (this.shopdata.photoPath) {
  365. this.shopImg.push(this.shopdata.photoPath)
  366. }
  367. this.shopImg = this.shopImg.concat(this.shopdata.imgList)
  368. console.log(this.shopImg)
  369. if (this.shopdata.brands) {
  370. this.brandsList = this.shopdata.brands.split(',');
  371. }
  372. uni.setNavigationBarTitle({
  373. title: res.data.shopName
  374. })
  375. })
  376. },
  377. addBMemberShopFootprint() {
  378. this.$http('miniAppShopInfoController/addBMemberShopFootprint', {
  379. shopId: this.shopId
  380. }, 'POST').then(res => {
  381. })
  382. },
  383. Member() {
  384. uni.showLoading({});
  385. this.$http('miniAppShopInfoController/addBMemberShop', {
  386. shopID: this.shopId,
  387. }, 'POST').then(res => {
  388. uni.hideLoading();
  389. if (res.code == 0) {
  390. uni.showToast({
  391. title: '关注成功',
  392. icon: 'none',
  393. duration: 3000
  394. });
  395. this.shopdata.isAttention = 1
  396. } else {
  397. uni.showToast({
  398. title: res.msg,
  399. icon: 'none',
  400. duration: 3000
  401. });
  402. }
  403. })
  404. },
  405. deleteMember() {
  406. uni.showLoading({});
  407. this.$http('miniAppMyBMemberCar/deleteBMemberShop', {
  408. shopId: this.shopId,
  409. }, 'POST').then(res => {
  410. uni.hideLoading();
  411. if (res.code == 0) {
  412. uni.showToast({
  413. title: '取消成功',
  414. icon: 'none',
  415. duration: 3000
  416. });
  417. this.shopdata.isAttention = 0
  418. } else {
  419. uni.showToast({
  420. title: res.msg,
  421. icon: 'none',
  422. duration: 3000
  423. });
  424. }
  425. })
  426. },
  427. settlement() {
  428. console.log(this.orderData)
  429. var that = this;
  430. if (this.orderData.length > 0) {
  431. uni.setStorage({
  432. key: 'cfshopInfo',
  433. data: that.shopdata,
  434. success: function() {
  435. uni.removeStorageSync('couponData');
  436. uni.navigateTo({
  437. url: '../module/confirmOrder?orderData=' + JSON.stringify(that
  438. .orderData) + '&currentMileage=' + that.maintainCarData
  439. .milage + '&type=2'
  440. })
  441. }
  442. });
  443. }
  444. },
  445. replace(v, index, i, replaceIndex) {
  446. console.log(v)
  447. v.forEach((item, vindex) => {
  448. if (replaceIndex == vindex) {
  449. item.showr = false
  450. } else {
  451. item.showr = true
  452. }
  453. })
  454. uni.removeStorageSync('replaceData');
  455. this.replaceIndex1 = index;
  456. this.replaceIndex2 = i;
  457. uni.setStorage({
  458. key: 'replaceDataList',
  459. data: v,
  460. success: function() {
  461. uni.navigateTo({
  462. url: '../module/replaceGoods'
  463. })
  464. }
  465. });
  466. },
  467. caidanClick() {
  468. this.qingdanShow = !this.qingdanShow
  469. },
  470. leftClick(item, index) {
  471. this.leftIndex = index
  472. },
  473. listcheck(item) {
  474. item.planItem = !item.planItem;
  475. //var
  476. this.calculation();
  477. if (item.planItem) {
  478. /* this.orderData.push(item) */
  479. }
  480. },
  481. empty() {
  482. var that = this;
  483. uni.showModal({
  484. title: '提示',
  485. content: '确定要清空清单吗',
  486. success: function(res) {
  487. if (res.confirm) {
  488. that.orderData = [];
  489. that.mealData.forEach(item => {
  490. item.num = 0;
  491. if (item.listPackage) {
  492. item.listPackage.forEach(v => {
  493. v.planItem = false
  494. })
  495. }
  496. })
  497. that.calculation();
  498. that.qingdanShow = false;
  499. }
  500. }
  501. });
  502. },
  503. calculation() {
  504. this.total = 0;
  505. this.totalhj = 0;
  506. this.goodsTotal = 0;
  507. this.salePriceTotal = 0;
  508. this.orderData = []
  509. this.mealData.forEach(v => {
  510. v.num = 0;
  511. if (v.listPackage) {
  512. v.listPackage.forEach(i => {
  513. if (i.planItem) {
  514. var obj = {
  515. listGoodsAll: [],
  516. listItem: '',
  517. }
  518. if (i.listGoodsAll.length > 0) {
  519. i.listGoodsAll.forEach((goods, goodsIndex) => {
  520. /* goods.forEach(sp=>{
  521. this.goodsTotal=Number(this.goodsTotal)
  522. this.goodsTotal+=sp.salePrice*sp.qty
  523. this.goodsTotal=this.goodsTotal.toFixed(2)
  524. })
  525. */
  526. this.goodsTotal = Number(this.goodsTotal)
  527. this.goodsTotal += goods[0].salePrice * goods[0].qty
  528. this.goodsTotal = this.goodsTotal.toFixed(2)
  529. obj.listGoodsAll.push(goods[0])
  530. })
  531. }
  532. if (i.listItem.length > 0) {
  533. obj.listItem = i.listItem
  534. }
  535. this.orderData.push(obj)
  536. v.num++;
  537. this.total++;
  538. i.listItem.forEach(xm => {
  539. xm.qty = 1;
  540. this.salePriceTotal = Number(this.salePriceTotal)
  541. this.salePriceTotal += xm.salePrice
  542. this.salePriceTotal = this.salePriceTotal.toFixed(2)
  543. })
  544. //this.totalhj
  545. }
  546. })
  547. }
  548. //if(v.listPackage)
  549. })
  550. this.totalhj = Number(this.goodsTotal) + Number(this.salePriceTotal)
  551. this.totalhj = this.totalhj.toFixed(2)
  552. console.log(this.orderData)
  553. },
  554. reduce(v) {
  555. if (v.qty > 1) {
  556. v.qty--;
  557. this.calculation()
  558. }
  559. },
  560. plus(v) {
  561. v.qty++;
  562. this.calculation()
  563. },
  564. }
  565. }
  566. </script>
  567. <style scoped>
  568. .cont {
  569. min-height: 100vh;
  570. background: #F4F5F7;
  571. }
  572. /deep/.uni-swiper-wrapper .uni-swiper-dots {
  573. bottom: 60rpx;
  574. }
  575. .swiper-item {
  576. width: 100vw;
  577. height: 500rpx;
  578. }
  579. .swiper {
  580. width: 100vw;
  581. height: 500rpx;
  582. }
  583. .swpImg {
  584. width: 100vw;
  585. height: 500rpx;
  586. }
  587. .top {
  588. position: relative;
  589. }
  590. .Member {
  591. width: 140rpx;
  592. height: 42rpx;
  593. line-height: 42rpx;
  594. text-align: center;
  595. color: #FFFFFF;
  596. font-size: 24rpx;
  597. background: rgba(0, 0, 0, 0.4);
  598. border-radius: 21rpx;
  599. position: absolute;
  600. bottom: 60rpx;
  601. right: 32rpx;
  602. }
  603. .shopMain {
  604. width: 702rpx;
  605. /* height: 368rpx; */
  606. background: #FFFFFF;
  607. border-radius: 10rpx;
  608. margin-left: 24rpx;
  609. margin-top: -50rpx;
  610. z-index: 111;
  611. position: relative;
  612. }
  613. .shopName {
  614. padding-top: 30rpx;
  615. padding-left: 20rpx;
  616. color: #333333;
  617. font-size: 32rpx;
  618. font-weight: 600;
  619. }
  620. .pingfenBox {
  621. width: 559rpx;
  622. height: 62rpx;
  623. background: rgba(255, 79, 0, 0.08);
  624. border-radius: 0rpx 15rpx 14rpx 0rpx;
  625. margin-top: 10rpx;
  626. }
  627. .pingfenImg {
  628. width: 14rpx;
  629. height: 26rpx;
  630. margin-right: 30rpx;
  631. margin-top: 20rpx;
  632. }
  633. .fenshuNum {
  634. font-size: 38rpx;
  635. font-weight: 600;
  636. color: #FF4F00;
  637. }
  638. .pingfenBox {
  639. display: flex;
  640. line-height: 62rpx;
  641. justify-content: space-between;
  642. }
  643. .fenshuTxt {
  644. font-size: 26rpx;
  645. font-weight: 600;
  646. color: #FF4F00;
  647. padding-left: 5rpx;
  648. padding-top: 2rpx;
  649. }
  650. .fenshuTxt2 {
  651. font-size: 26rpx;
  652. color: #FF4F00;
  653. padding-left: 5rpx;
  654. }
  655. .cishu {
  656. font-size: 24rpx;
  657. color: #666666;
  658. }
  659. .shuxian {
  660. width: 2px;
  661. height: 30rpx;
  662. background: #E9E8E8;
  663. margin-top: 16rpx;
  664. }
  665. .fenshuBox {
  666. padding-left: 20rpx;
  667. }
  668. .business {
  669. display: flex;
  670. font-size: 26rpx;
  671. padding-left: 20rpx;
  672. padding-top: 20rpx;
  673. color: #999999;
  674. }
  675. .businessTitme {
  676. color: #666666;
  677. }
  678. .brandsBox {
  679. display: flex;
  680. padding: 20rpx;
  681. font-size: 24rpx;
  682. flex-wrap: wrap;
  683. }
  684. .brandsLine {
  685. height: 34rpx;
  686. background: linear-gradient(138deg, #FF630F 0%, #FF450F 100%);
  687. border-radius: 4rpx;
  688. line-height: 34rpx;
  689. padding: 0 8rpx;
  690. color: #FFFFFF;
  691. margin-right: 14rpx;
  692. margin-bottom: 15rpx;
  693. }
  694. .brandsLine2 {
  695. border-radius: 4rpx;
  696. line-height: 30rpx;
  697. padding: 0 8rpx;
  698. color: #FF5800;
  699. height: 30rpx;
  700. border: 1px solid #FF5800;
  701. margin-right: 14rpx;
  702. margin-bottom: 15rpx;
  703. }
  704. .mapBox {
  705. width: 702rpx;
  706. height: 150rpx;
  707. background: url('http://phone.66km.cn:8088/thFiles/184C909A-0A58-4E60-92F1-4AF80BF071F1.png') no-repeat;
  708. background-size: 100% 100;
  709. display: flex;
  710. margin-left: 24rpx;
  711. margin-top: 20rpx;
  712. }
  713. .mapdwImg {
  714. width: 22rpx;
  715. height: 30rpx;
  716. }
  717. .dingwBox {
  718. display: flex;
  719. }
  720. .mapLeft {
  721. padding-top: 30rpx;
  722. padding-left: 20rpx;
  723. font-size: 24rpx;
  724. width: 450rpx;
  725. }
  726. .distance {
  727. padding-left: 16rpx;
  728. color: #3C3C3C;
  729. font-weight: 600;
  730. }
  731. .mapaddress {
  732. color: #999999;
  733. padding-top: 15rpx;
  734. }
  735. .shopsx {
  736. width: 1px;
  737. height: 61rpx;
  738. background: #EEEEEE;
  739. margin-top: 30rpx;
  740. margin-left: 28rpx;
  741. }
  742. .shopRihgtTxt {
  743. color: #999999;
  744. font-size: 22rpx;
  745. }
  746. .shopRightBox {
  747. padding-top: 30rpx;
  748. padding-left: 28rpx;
  749. }
  750. .shopRightImg {
  751. width: 44rpx;
  752. height: 48rpx;
  753. }
  754. .Cartop {
  755. background: #FFFFFF;
  756. display: flex;
  757. justify-content: space-between;
  758. padding: 30rpx 25rpx;
  759. font-size: 28rpx;
  760. width: 654rpx;
  761. margin-top: 20rpx;
  762. margin-left: 24rpx;
  763. }
  764. .CarbrandLogo {
  765. width: 42rpx;
  766. height: 42rpx;
  767. }
  768. .CartopLeft {
  769. display: flex;
  770. width: 500rpx;
  771. }
  772. .carName {
  773. padding-left: 10rpx;
  774. color: #3C3C3C;
  775. padding-top: 2rpx;
  776. }
  777. .CartopEdit {
  778. width: 30rpx;
  779. height: 30rpx;
  780. padding-top: 3px;
  781. padding-left: 12rpx;
  782. padding-right: 5px;
  783. padding-bottom: 5px;
  784. }
  785. .CartopRight {
  786. display: flex;
  787. }
  788. .CartopInput {
  789. font-size: 28rpx;
  790. text-align: right;
  791. padding-top: 3rpx;
  792. }
  793. .caidanTk {
  794. height: calc(100vh - 120rpx);
  795. width: 100vw;
  796. background: rgba(0, 0, 0, 0.6);
  797. position: fixed;
  798. left: 0;
  799. top: 0;
  800. z-index: 111;
  801. }
  802. .tkCont {
  803. height: 60vh;
  804. margin-top: calc(40vh - 120rpx);
  805. }
  806. .caidanTkTop {
  807. width: 750rpx;
  808. height: 90rpx;
  809. background: #FFFFFF;
  810. border-radius: 24rpx 24rpx 0px 0px;
  811. }
  812. .caidanTkTop {
  813. display: flex;
  814. justify-content: space-between;
  815. }
  816. .topTopright {
  817. display: flex;
  818. padding-top: 29rpx;
  819. }
  820. .tkTopTitle {
  821. line-height: 90rpx;
  822. font-size: 30rpx;
  823. font-weight: 600;
  824. color: #3C3C3C;
  825. padding-left: 24rpx;
  826. }
  827. .empty {
  828. width: 86rpx;
  829. height: 42rpx;
  830. background: #EEEEEE;
  831. border-radius: 21rpx;
  832. text-align: center;
  833. color: #666666;
  834. font-size: 24rpx;
  835. line-height: 42rpx;
  836. }
  837. .close {
  838. color: #999999;
  839. font-size: 30rpx;
  840. padding-right: 30rpx;
  841. padding-left: 24rpx;
  842. }
  843. .tkMain {
  844. background: #F0F0F0;
  845. height: calc(60vh - 90rpx);
  846. }
  847. .tkMainSv {
  848. padding: 0 24rpx;
  849. width: 702rpx;
  850. height: calc(60vh - 90rpx);
  851. }
  852. .goodsItemRight {
  853. width: 520rpx;
  854. padding-left: 20rpx;
  855. display: flex;
  856. flex-direction: column;
  857. justify-content: space-between;
  858. }
  859. .goodsItemBottom {
  860. display: flex;
  861. justify-content: space-between;
  862. }
  863. .goodssalePrice {
  864. font-size: 32rpx;
  865. font-weight: 500;
  866. color: #FF4F00;
  867. }
  868. .goodsNum {
  869. font-size: 24rpx;
  870. font-weight: 400;
  871. color: #999999;
  872. }
  873. .top {
  874. /* background: #FF4F00; */
  875. display: flex;
  876. justify-content: space-between;
  877. /* padding: 30rpx 25rpx; */
  878. font-size: 28rpx;
  879. color: #FFFFFF;
  880. }
  881. .goodsItem {
  882. display: flex;
  883. padding: 15rpx 0;
  884. }
  885. .qingdanLine {
  886. background: #FFFFFF;
  887. margin-top: 20rpx;
  888. padding: 24rpx 20rpx;
  889. border-radius: 10rpx;
  890. }
  891. .brandLogo {
  892. width: 42rpx;
  893. height: 42rpx;
  894. }
  895. .topLeft {
  896. display: flex;
  897. }
  898. .carName {
  899. padding-left: 10rpx;
  900. width: 280rpx;
  901. }
  902. .topEdit {
  903. width: 22rpx;
  904. height: 22rpx;
  905. padding-top: 5px;
  906. padding-left: 10rpx;
  907. }
  908. .topRight {
  909. display: flex;
  910. }
  911. .topInput {
  912. font-size: 28rpx;
  913. color: #FFFFFF;
  914. text-align: right;
  915. padding-top: 3rpx;
  916. }
  917. .maintainrecommend {
  918. padding: 30rpx 24rpx;
  919. display: flex;
  920. justify-content: space-between;
  921. border-bottom: 2rpx solid #EEEEEE;
  922. }
  923. .recommendTxt {
  924. color: #3C3C3C;
  925. font-size: 30rpx;
  926. font-weight: 600;
  927. }
  928. .manual {
  929. width: 119rpx;
  930. height: 40rpx;
  931. border-radius: 20rpx;
  932. border: 2rpx solid #F19D01;
  933. text-align: center;
  934. line-height: 40rpx;
  935. font-size: 22rpx;
  936. color: #F19D01;
  937. }
  938. .bottom {
  939. position: fixed;
  940. left: 0;
  941. bottom: 0;
  942. width: 100vw;
  943. height: 120rpx;
  944. background: #FFFFFF;
  945. box-shadow: 0px -2px 20px 0px rgba(153, 153, 153, 0.2);
  946. }
  947. .care {
  948. width: 690rpx;
  949. margin: 23rpx 30rpx;
  950. text-align: center;
  951. height: 74rpx;
  952. background: linear-gradient(135deg, #FD5300 0%, #FF270A 100%);
  953. border-radius: 37rpx;
  954. color: #FFFFFF;
  955. font-size: 30rpx;
  956. line-height: 74rpx;
  957. }
  958. .main {
  959. display: flex;
  960. height: calc(100vh - 410rpx);
  961. }
  962. .mainscrollView {
  963. height: calc(100vh - 410rpx);
  964. }
  965. /* #ifdef MP-WEIXIN */
  966. .main {
  967. display: flex;
  968. height: calc(100vh - 310rpx);
  969. }
  970. .mainscrollView {
  971. height: calc(100vh - 310rpx);
  972. }
  973. /* #endif */
  974. .mainLeft {
  975. width: 146rpx;
  976. background: #F5F5F5;
  977. }
  978. .mainRight {
  979. width: 604rpx;
  980. background: #FFFFFF;
  981. }
  982. .mainLeftLine {
  983. color: #3C3C3C;
  984. padding: 30rpx 20rpx;
  985. font-size: 24rpx;
  986. text-align: center;
  987. position: relative;
  988. }
  989. .lineNum {
  990. position: absolute;
  991. background: #FF270A;
  992. width: 40rpx;
  993. height: 26rpx;
  994. text-align: center;
  995. line-height: 26rpx;
  996. font-size: 20rpx;
  997. color: #FFFFFF;
  998. border-radius: 13rpx;
  999. top: 10rpx;
  1000. right: 10rpx;
  1001. }
  1002. .lineLeftActive {
  1003. background: #FFFFFF;
  1004. }
  1005. .nock {
  1006. width: 22rpx;
  1007. height: 22rpx;
  1008. border-radius: 50%;
  1009. border: 2px solid #AEAEAE;
  1010. margin-top: 2rpx;
  1011. margin-right: 10rpx;
  1012. }
  1013. .imgPrivacy {
  1014. width: 28rpx;
  1015. height: 28rpx;
  1016. margin-top: 2rpx;
  1017. margin-right: 10rpx;
  1018. }
  1019. .mainRightLine {
  1020. padding: 20rpx 20rpx 0 20rpx;
  1021. background: #FFFFFF;
  1022. }
  1023. .contTop {
  1024. display: flex;
  1025. justify-content: space-between;
  1026. }
  1027. .listPackgeName {
  1028. font-size: 26rpx;
  1029. font-family: PingFangSC-Regular, PingFang SC;
  1030. font-weight: 600;
  1031. color: #3C3C3C;
  1032. }
  1033. .listPackgeMs {
  1034. font-size: 22rpx;
  1035. font-family: PingFangSC-Regular, PingFang SC;
  1036. font-weight: 400;
  1037. color: #999999;
  1038. padding-top: 5rpx;
  1039. }
  1040. .contZk {
  1041. border-bottom: 1px solid #EEEEEE;
  1042. padding-bottom: 20rpx;
  1043. }
  1044. .goodsImg {
  1045. width: 120rpx;
  1046. height: 120rpx;
  1047. border-radius: 11rpx;
  1048. }
  1049. .goodsItemLIne {
  1050. display: flex;
  1051. padding-top: 20rpx;
  1052. padding-bottom: 20rpx;
  1053. }
  1054. .goodsCont {
  1055. display: flex;
  1056. flex-direction: column;
  1057. justify-content: space-between;
  1058. padding-left: 20rpx;
  1059. }
  1060. .goodsContTop {
  1061. display: flex;
  1062. justify-content: space-between;
  1063. width: 400rpx;
  1064. }
  1065. .goodsItemName {
  1066. font-size: 26rpx;
  1067. font-weight: 400;
  1068. color: #3C3C3C;
  1069. width: 300rpx;
  1070. }
  1071. .salePrice {
  1072. font-size: 32rpx;
  1073. font-weight: 500;
  1074. color: #FF4F00;
  1075. }
  1076. .replace {
  1077. width: 75rpx;
  1078. height: 37rpx;
  1079. border-radius: 19rpx;
  1080. border: 2rpx solid #B9B9B9;
  1081. text-align: center;
  1082. line-height: 35rpx;
  1083. color: #707070;
  1084. font-size: 22rpx;
  1085. }
  1086. .contZkMain {
  1087. padding-top: 20rpx;
  1088. }
  1089. .asa {
  1090. width: 44rpx;
  1091. height: 44rpx;
  1092. line-height: 44rpx;
  1093. text-align: center;
  1094. background: #F4F5F7;
  1095. font-size: 30rpx;
  1096. }
  1097. .goodsCOntBOttom {
  1098. display: flex;
  1099. justify-content: space-between;
  1100. }
  1101. .as {
  1102. display: flex;
  1103. }
  1104. .goodsPrice {
  1105. display: flex;
  1106. justify-content: space-between;
  1107. padding-top: 10rpx;
  1108. }
  1109. .goodsPriceNum {
  1110. color: #F8F8F8;
  1111. font-size: 28rpx;
  1112. }
  1113. .asNum {
  1114. font-size: 24rpx;
  1115. color: #333333;
  1116. padding: 0 18rpx;
  1117. line-height: 44rpx;
  1118. background: #F4F5F7;
  1119. margin-left: 1px;
  1120. margin-right: 1px;
  1121. }
  1122. .itemNum {
  1123. font-size: 24rpx;
  1124. font-weight: 400;
  1125. color: #999999;
  1126. }
  1127. .bottom {
  1128. display: flex;
  1129. justify-content: space-between;
  1130. }
  1131. .caidanImg {
  1132. width: 50rpx;
  1133. height: 50rpx;
  1134. }
  1135. .bottomLeft {
  1136. display: flex;
  1137. }
  1138. .caidan {
  1139. padding-left: 33rpx;
  1140. padding-top: 35rpx;
  1141. padding-right: 33rpx;
  1142. position: relative;
  1143. }
  1144. .total {
  1145. position: absolute;
  1146. width: 40rpx;
  1147. height: 26rpx;
  1148. background: #FF270A;
  1149. line-height: 26rpx;
  1150. text-align: center;
  1151. color: #FFFFFF;
  1152. font-size: 20rpx;
  1153. top: 25rpx;
  1154. right: 15rpx;
  1155. border-radius: 13rpx;
  1156. }
  1157. .heji1 {
  1158. font-size: 24rpx;
  1159. font-weight: 500;
  1160. color: #666666;
  1161. }
  1162. .hejiNum {
  1163. font-size: 32rpx;
  1164. font-family: PingFangSC-Medium, PingFang SC;
  1165. font-weight: 500;
  1166. color: #FF4F00;
  1167. }
  1168. .hejiMs {
  1169. font-size: 24rpx;
  1170. padding-top: 5rpx;
  1171. color: #999999;
  1172. }
  1173. .heji {
  1174. padding-top: 23rpx;
  1175. }
  1176. .settlement {
  1177. width: 203rpx;
  1178. height: 74rpx;
  1179. background: #FF4F00;
  1180. border-radius: 37rpx;
  1181. text-align: center;
  1182. line-height: 74rpx;
  1183. font-size: 30rpx;
  1184. font-family: PingFangSC-Medium, PingFang SC;
  1185. font-weight: 500;
  1186. color: #FEFFFE;
  1187. margin-top: 23rpx;
  1188. margin-right: 32rpx;
  1189. }
  1190. .nodataImg {
  1191. width: 400rpx;
  1192. padding-top: 100rpx;
  1193. }
  1194. .noTxt {
  1195. font-size: 36rpx;
  1196. color: #999999;
  1197. padding-top: 50rpx;
  1198. }
  1199. .nodataBox {
  1200. text-align: center;
  1201. }
  1202. </style>