maintainItem.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514
  1. <template>
  2. <view class="box">
  3. <view class="spwBox">
  4. <swiper class="swiper" circular :autoplay="false" :indicator-dots="true" indicator-color="#CCCCCC" indicator-active-color="#D53533">
  5. <swiper-item v-for="(item,index) in ImgList">
  6. <view class="swiper-item">
  7. <img mode="aspectFit" :src="item.url" alt="" class="swiper-itemImg" >
  8. </view>
  9. </swiper-item>
  10. </swiper>
  11. </view>
  12. <view class="shopCont">
  13. <view class="shopCtop">
  14. <view class="goodsPrice" >
  15. <view class="goodsPrice2">¥</view>
  16. <view class="goodsPrice3">{{itemDefault.money}}</view>
  17. <view class="goodsPrice4" v-if="itemDefault.showCrossedPrice==1">原价:¥{{itemDefault.crossedPrice}}</view>
  18. </view>
  19. <view class="shareBox" >
  20. <view class="shareTxt">分享</view>
  21. <image class="shareIcon" src="../../static/timg/share.png" mode=""></image>
  22. </view>
  23. </view>
  24. <view class="goodsName">{{detail.title}}</view>
  25. <view class="goodsMSBox" >
  26. <view class="goodsMs">高级全合成</view>
  27. <view class="goodsMs">可选用5W30/5W40/0W20</view>
  28. </view>
  29. <view class="timeBox">
  30. <view class="itemTime">套餐有效期:购买之日起18个月</view>
  31. <view class="sell">
  32. <span>已售:</span><span style="color: #FFC107;">22081</span>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="buyBOx">
  37. <view class="buyLine">
  38. <view class="buyTitle">已选车型</view>
  39. <view class="buyData">{{carInfo.carModel?carInfo.carModel:''}}
  40. <image class="jtIcon" src="../../static/timg/jthei.png" mode=""></image>
  41. </view>
  42. </view>
  43. <view class="buyLine">
  44. <view class="buyTitle">商品规格</view>
  45. <view class="buyData">
  46. <view class="goodsGuige activeGuige" style="margin-right: 24rpx;">单次购买</view>
  47. <view class="goodsGuige">保养套餐卡</view>
  48. </view>
  49. </view>
  50. <view class="buyLine">
  51. <view class="buyTitle">商品数量</view>
  52. <view class="buyData">
  53. <view class="numJsbox">
  54. <view class="numJj" @click="calculation(1)">-</view>
  55. <view class="goodsnum">
  56. <input type="number" value="" v-model="goodsnum" class="goodsnumInput"/>
  57. </view>
  58. <view class="numJj" @click="calculation(2)">+</view>
  59. </view>
  60. </view>
  61. </view>
  62. <view class="buyLine">
  63. <view class="buyTitle">使用方式</view>
  64. <view class="buyData">到店使用</view>
  65. </view>
  66. <view class="buyLine">
  67. <view class="buyTitle">可用门店</view>
  68. <view class="buyData">全部门店</view>
  69. </view>
  70. </view>
  71. <view class="mealBox">
  72. <view class="fwlcTitle">套餐内容</view>
  73. <view class="mealTop">
  74. <view class="mealName">套餐名称</view>
  75. <view class="mealNum">数量</view>
  76. <view class="mealexpire">有效期</view>
  77. </view>
  78. <view class="mealTop2">
  79. <view class="mealName">【豪华车型】全合成机油保养套餐</view>
  80. <view class="mealNum">2</view>
  81. <view class="mealexpire">18个月</view>
  82. </view>
  83. <view class="mealXj">
  84. <view class="xjLine">
  85. <view class="xjyd"></view>
  86. <view class="xjTxt">20项检查</view>
  87. </view>
  88. <view class="xjLine">
  89. <view class="xjyd"></view>
  90. <view class="xjTxt">20美日韩车型专用保养套餐适配机油</view>
  91. </view>
  92. </view>
  93. <view class="mealMs">
  94. <view class="mealMsline">
  95. 1.本套餐不限车辆使用;
  96. 2.机油套餐包含:机油,机油滤,工时费
  97. 3.购买此套餐,共享有2次保养次数。
  98. </view>
  99. </view>
  100. </view>
  101. <!-- 商品详情 -->
  102. <view class="goodsDetail" >
  103. <view class="goodsDetailTitle">商品详情</view>
  104. <!-- <view v-html="info.details" style="background: #fff;"></view> -->
  105. <rich-text :nodes="detail.detailContent" style="background: #fff;"></rich-text>
  106. </view>
  107. <view class="bottomTianc"></view>
  108. <view class="bottom">
  109. <view class="bleft">
  110. <image class="kefuIcon" src="../../static/img2/kefu.png" mode=""></image>
  111. <view style="text-align: center;font-size: 20rpx;color: #110B01;">客服</view>
  112. </view>
  113. <view class="Btn" @click="submitFn">提交订单</view>
  114. </view>
  115. </view>
  116. </template>
  117. <script>
  118. export default {
  119. components: {
  120. },
  121. data() {
  122. return {
  123. themeColor:'',
  124. ext:'',
  125. ImgList:[
  126. {url:'http://dmsphoto.66km.com.cn/thFiles/339E5DB5-F727-4F0F-AD41-1A2EBAB73883.png'},
  127. {url:'http://dmsphoto.66km.com.cn/thFiles/53DA3E26-5FA3-42DE-95A4-10BA255290A6.png'},
  128. ],
  129. goodsnum:1,
  130. details:'11233',
  131. maintainId:'',
  132. detail:'',
  133. itemDefault:'',
  134. carInfo:'',
  135. }
  136. },
  137. onLoad(opt) {
  138. this.ext = this.$common.getExtStoreId();
  139. this.themeColor = uni.getStorageSync("themeColor");
  140. this.maintainId=opt.maintainId
  141. this.carInfo=this.$store.state.carInfo;
  142. this.getdetail()
  143. },
  144. onShow() {
  145. },
  146. methods: {
  147. submitFn(){
  148. uni.navigateTo({
  149. url:'maintainSubmit'
  150. })
  151. },
  152. calculation(type){
  153. if(type==1){
  154. if(this.goodsnum>1){
  155. this.goodsnum--
  156. }
  157. }else{
  158. console.log("+++")
  159. this.goodsnum++
  160. }
  161. },
  162. getdetail(){
  163. uni.showLoading({
  164. title: '加载中'
  165. })
  166. this.$http('openMaintain/detail/'+this.maintainId, {
  167. /* maintainId:this.maintainId */
  168. }, 'GET').then(res => {
  169. uni.hideLoading();
  170. this.detail=res.data
  171. this.detail.packageItems.forEach(item=>{
  172. if(item.isDefault==1){
  173. this.itemDefault=item
  174. }
  175. })
  176. })
  177. },
  178. }
  179. }
  180. </script>
  181. <style scoped lang="less">
  182. .box {
  183. width: 100vw;
  184. min-height: 100vh;
  185. background: #F4F4F4;
  186. }
  187. .swiper{
  188. width: 750rpx;
  189. height: 700rpx;
  190. background: #FFFFFF;
  191. border-bottom: 1px solid #EEEEEE;
  192. }
  193. .swiper-item{
  194. width: 750rpx;
  195. height: 700rpx;
  196. }
  197. .swiper-itemImg{
  198. width: 750rpx;
  199. height: 700rpx;
  200. }
  201. .goodsPrice{
  202. display: flex;
  203. }
  204. .goodsPrice1{
  205. font-size: 24rpx;
  206. font-weight: 400;
  207. color: #FF0000;
  208. padding-top: 14rpx;
  209. padding-right: 14rpx;
  210. }
  211. .goodsPrice2{
  212. font-size: 28rpx;
  213. font-weight: 400;
  214. color: #FF0000;
  215. padding-top: 10rpx;
  216. }
  217. .goodsPrice3{
  218. font-size: 40rpx;
  219. font-weight: 500;
  220. color: #FF0000;
  221. }
  222. .goodsPrice4{
  223. font-size: 24rpx;
  224. font-weight: 400;
  225. color: #999999;
  226. padding-top: 14rpx;
  227. /* text-decoration:line-through; */
  228. padding-left: 10rpx;
  229. }
  230. .Sold{
  231. font-weight: 400;
  232. color: #999999;
  233. font-size: 24rpx;
  234. padding-top: 18rpx;
  235. }
  236. .goodsName{
  237. font-size: 30rpx;
  238. line-height: 42rpx;
  239. font-weight: 500;
  240. color: #333333;
  241. padding: 20rpx 24rpx;
  242. padding-top: 0;
  243. padding-bottom: 16rpx;
  244. }
  245. .goodsMd{
  246. font-weight: 400;
  247. color: #999999;
  248. font-size: 26rpx;
  249. padding: 0 24rpx;
  250. padding-bottom: 20rpx;
  251. }
  252. .shopCont{
  253. background: #FFFFFF;
  254. }
  255. .shopCtop{
  256. display: flex;
  257. padding: 20rpx 24rpx;
  258. justify-content: space-between;
  259. background: #FFFFFF;
  260. }
  261. .goodsMSBox{
  262. display: flex;padding-left: 24rpx;
  263. }
  264. .goodsMs{
  265. font-size: 16rpx;
  266. color: #FF063A;
  267. padding: 4rpx 8rpx;
  268. border-radius: 6rpx;
  269. border: 1px solid #FF063A;
  270. margin-right: 16rpx;
  271. }
  272. .timeBox{
  273. display: flex;justify-content: space-between;
  274. padding: 20rpx 24rpx;
  275. font-size: 26rpx;
  276. color: #666E80;
  277. }
  278. .shareIcon{
  279. width: 33rpx;height: 33rpx;margin-left: 10rpx;
  280. }
  281. .shareBox{
  282. display: flex;font-size: 24rpx;
  283. color: #666666;padding-top: 6rpx;
  284. line-height: 33rpx;
  285. }
  286. .jtIcon{
  287. width: 24rpx;height: 24rpx;margin-top: 6rpx;
  288. }
  289. .buyLine{
  290. display: flex;justify-content: space-between;
  291. padding: 20rpx 24rpx;font-size: 26rpx;
  292. color: #666E80;
  293. }
  294. .buyBOx{
  295. background: #FFFFFF;margin-top: 20rpx;
  296. }
  297. .buyData{
  298. color: #222222;display: flex;
  299. }
  300. .goodsGuige{
  301. width: 150rpx;
  302. height: 50rpx;line-height: 50rpx;
  303. background: #F6F6F6;
  304. border-radius: 5rpx;
  305. font-size: 24rpx;
  306. color: #222222;text-align: center;
  307. }
  308. .activeGuige{
  309. width: 146rpx;
  310. height: 46rpx;line-height: 46rpx;
  311. border: 2rpx solid #FF0035;
  312. border-radius: 5rpx;
  313. font-size: 24rpx;
  314. color: #FF0035;text-align: center;
  315. }
  316. .numJsbox{
  317. display: flex;
  318. }
  319. .buyCont{
  320. position: absolute;
  321. left: 0;
  322. bottom: 0;
  323. width: 750rpx;
  324. height: 688rpx;
  325. background: #FFFFFF;
  326. border-radius: 26rpx 26rpx 0px 0px;
  327. }
  328. .buyNumBox{
  329. padding: 30rpx;
  330. padding-top: 10rpx;
  331. padding-bottom: 70rpx;
  332. }
  333. .buyContCh{
  334. position: absolute;
  335. top: 53rpx;
  336. right: 36rpx;
  337. width: 36rpx;
  338. height: 36rpx;
  339. }
  340. .goodsnum{
  341. width: 88rpx;
  342. height: 44rpx;
  343. background: #F4F5F7;
  344. line-height: 44rpx;
  345. text-align: center;
  346. font-weight: 500;
  347. color: #333333;
  348. font-size: 24rpx;
  349. margin: 0 4rpx;
  350. }
  351. .goodsnumInput{
  352. width: 88rpx;
  353. height: 44rpx;
  354. background: #F4F5F7;
  355. line-height: 44rpx;
  356. text-align: center;
  357. font-weight: 500;
  358. color: #333333;
  359. font-size: 24rpx;
  360. }
  361. .numJj{
  362. width: 44rpx;
  363. height: 44rpx;
  364. background: #F4F5F7;
  365. border-radius: 0px 6rpx 6rpx 0px;
  366. text-align: center;
  367. line-height: 44rpx;
  368. font-size: 32rpx;
  369. color: #999999;
  370. }
  371. .mealBox{
  372. background: #FFFFFF;
  373. padding: 20rpx 24rpx;
  374. margin-top: 20rpx;
  375. }
  376. .fwlcTitle{
  377. color: #333333;font-size: 30rpx;font-weight: 500;
  378. }
  379. .mealTop{
  380. display: flex;
  381. justify-content: space-between;
  382. height: 72rpx;
  383. line-height: 72rpx;
  384. font-weight: 500;
  385. font-size: 26rpx;
  386. color: #222222;
  387. font-size: 26rpx;
  388. padding: 0 20rpx;
  389. }
  390. .mealNum{
  391. text-align: center;
  392. width: 120rpx;
  393. }
  394. .mealexpire{
  395. text-align: center; width: 120rpx;
  396. }
  397. .mealName{
  398. width: 460rpx;
  399. }
  400. .mealTop2{
  401. display: flex;
  402. justify-content: space-between;
  403. height: 72rpx;
  404. line-height: 72rpx;
  405. font-weight: 500;
  406. font-size: 26rpx;
  407. color: #222222;
  408. font-size: 26rpx;
  409. padding: 0 20rpx;
  410. background: #FFF6DB;
  411. }
  412. .mealXj{
  413. background: #FFFCF3;
  414. }
  415. .xjLine{
  416. display: flex;
  417. font-weight: 500;
  418. font-size: 26rpx;
  419. color: #222222;
  420. padding: 20rpx 20rpx;
  421. }
  422. .xjyd{
  423. width: 8rpx;
  424. height: 8rpx;
  425. background: #FABF1B;
  426. border-radius: 50rpx;
  427. margin-top: 12rpx;
  428. margin-right: 10rpx;
  429. }
  430. .mealMs{
  431. background: #FFFFFF;
  432. padding: 20rpx;
  433. font-weight: 400;
  434. font-size: 24rpx;
  435. color: #9A9A9A;
  436. line-height: 38rpx;
  437. }
  438. .goodsDetailTitle{
  439. color: #333333;
  440. font-size: 30rpx;
  441. font-weight: 500;
  442. background: #FFFFFF;
  443. padding: 20rpx 24rpx;
  444. }
  445. .goodsDetail{
  446. margin-top: 20rpx;
  447. padding-bottom: 30rpx;
  448. background: #FFFFFF;
  449. }
  450. .goodsDetail img{
  451. width: 750rpx;
  452. }
  453. .goodsDetail image{
  454. width: 750rpx;
  455. }.bottom{
  456. background: #FFFFFF;
  457. display: flex;
  458. justify-content: space-between;
  459. position: fixed;
  460. width: 100%;
  461. padding:30rpx 0;
  462. padding-bottom: constant(safe-area-inset-bottom);
  463. padding-bottom: env(safe-area-inset-bottom);
  464. left: 0;bottom: 0;
  465. box-shadow: 0rpx -2rpx 16rpx 0rpx rgba(153,153,153,0.2);
  466. }
  467. .bleft{
  468. font-weight: 500;
  469. color: #222222;
  470. padding-left: 50rpx;
  471. }
  472. .Btn{
  473. width: 532rpx;text-align: center;
  474. height: 86rpx;line-height: 86rpx;
  475. background: #FCD903;
  476. border-radius: 43rpx;
  477. font-size: 32rpx;
  478. color: #110B01;
  479. margin-right: 36rpx;
  480. }
  481. .kefuIcon{
  482. width: 50rpx;height: 50rpx;
  483. }
  484. .bottomTianc{
  485. height: 160rpx;
  486. padding-bottom: constant(safe-area-inset-bottom);
  487. padding-bottom: env(safe-area-inset-bottom);
  488. }
  489. </style>