shopDetail.vue 31 KB

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