maintain.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707
  1. <template>
  2. <view class="box">
  3. <view class="top" :style="{background:'#'+themeColor}">
  4. <view class="inputBox">
  5. <view class="ibLeft" @click="goCkcar">
  6. <image class="ibCarIcon" v-if="carInfo.brandLogo" :src="carInfo.brandLogo" mode=""></image>
  7. <image class="ibCarIcon" v-else src="../../static/timg/nocar.png" mode=""></image>
  8. <view class="ibCarBox">
  9. <view class="ibCar">{{carInfo.brand?carInfo.brand:''}}&nbsp;{{carInfo.series?carInfo.series:''}}</view>
  10. <image src="../../static/img2/xia.png" mode="" class="xiaIcon"></image>
  11. </view>
  12. </view>
  13. <view class="ibRight">
  14. <image src="../../static/img2/gl.png" mode="" class="glIcon"></image>
  15. <input type="text" placeholder="暂无填写" class="glInput"/>
  16. <image src="../../static/img2/xia.png" mode="" class="xiaIcon"></image>
  17. </view>
  18. </view>
  19. <view class="msBox">
  20. <view class="msLine">
  21. <image class="msIcon" src="../../static/img2/zp.png" mode=""></image>
  22. <view class="msTxt">正品保障</view>
  23. </view>
  24. <view class="msLine">
  25. <image class="msIcon" src="../../static/img2/jp.png" mode=""></image>
  26. <view class="msTxt">精准适配</view>
  27. </view>
  28. <view class="msLine">
  29. <image class="msIcon" src="../../static/img2/shwy.png" mode=""></image>
  30. <view class="msTxt">售后无忧</view>
  31. </view>
  32. <view class="msLine">
  33. <image class="msIcon" src="../../static/img2/zyfw.png" mode=""></image>
  34. <view class="msTxt">专业服务</view>
  35. </view>
  36. </view>
  37. </view>
  38. <!-- 适配推荐 -->
  39. <view class="spBox">
  40. <view class="spTop">
  41. <view class="spTitle">适配推荐</view>
  42. <view class="spMs">
  43. <span>保养记录</span>
  44. <span> | </span>
  45. <span>保养手册</span>
  46. </view>
  47. </view>
  48. <view class="znBox">
  49. <view class="znCont">
  50. <view class="znCar">智能推荐-大众 捷达</view>
  51. <view>
  52. <image class="hxIcon" src="../../static/img2/hx.png" mode=""></image>
  53. </view>
  54. <view class="znMs">超期不保养,会影响汽车性能!</view>
  55. </view>
  56. </view>
  57. <!-- 套餐-->
  58. <view class="lineBox">
  59. <view class="line" @click="goItem">
  60. <view class="lineTop">
  61. <image class="lineImg" src="../../static/timg/noimg.png" mode=""></image>
  62. <view class="lineNameBox">
  63. <view class="goodsName">全合成机油保养2次</view>
  64. <view class="goodsMs">含:发动机机油、机油滤芯、雾化杀菌等</view>
  65. <view class="goodsKbox">
  66. <view class="goosK1">增效全合成</view>
  67. <view class="goosK2">粘度级别</view>
  68. <!-- <view class="goosK2">0W-20/5W-40/5W-30</view> -->
  69. </view>
  70. <view class="bfb">有91.4%的车主选择本商品</view>
  71. </view>
  72. </view>
  73. <view class="tcBox">
  74. <view class="tcLine">
  75. <view class="tcTitle">
  76. <view class="tcName">单次购买</view>
  77. </view>
  78. <view class="tcprice">
  79. <span class="tcSpan1">¥</span>
  80. <span class="tcSpan2">294</span>
  81. <span class="tcSpan3">/次</span>
  82. </view>
  83. </view>
  84. <view class="tcLine">
  85. <view class="tcTitle">
  86. <view class="tcName">保养超值卡</view>
  87. <view class="tcNameTs">2次更划算</view>
  88. </view>
  89. <view class="tcprice">
  90. <span class="tcSpan1">¥</span>
  91. <span class="tcSpan2">294</span>
  92. <span class="tcSpan3">/次</span>
  93. <span class="tcSpan3" style="padding-left: 10rpx;">2次</span>
  94. <span class="tcSpan1">¥588</span>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. </view>
  100. </view>
  101. <view class="bottom">
  102. <view class="kaBox">
  103. <view class="ka">
  104. <view class="kaLeft">
  105. <image class="vipIcon" src="../../static/img2/vip.png" mode=""></image>
  106. <view class="kaMS">开通权益卡 可享受更多优惠服务</view>
  107. </view>
  108. <view class="kaRight">去开卡></view>
  109. </view>
  110. </view>
  111. <view class="bottomView">
  112. <view class="bLeft">
  113. <view class="bLeftImgBox">
  114. <image class="qingdanIcon" src="../../static/img2/qingdan.png" mode=""></image>
  115. <view class="qdTxt">清单</view>
  116. <view class="qdNum">1</view>
  117. </view>
  118. <view>
  119. <view class="bottomprice">
  120. <span class="bSpan1">¥</span>
  121. <span class="bSpan2">298</span>
  122. </view>
  123. <view class="byh">
  124. <span class="bspan3">已优惠</span>
  125. <span class="bspan4"> ¥0</span>
  126. </view>
  127. </view>
  128. </view>
  129. <view class="bottomBtn">立即购买</view>
  130. </view>
  131. </view>
  132. <!-- 提交订单弹框-->
  133. <view class="tkBox" v-if="tkShow">
  134. <view class="tkCont">
  135. <view class="tkTop">
  136. <image class="tkImg" src="../../static/timg/noimg.png" mode=""></image>
  137. <view class="tkNameBox">
  138. <view class="tkName">【豪华车型】全合成机油保养套餐</view>
  139. <view class="goodsPrice">
  140. <view class="goodsPrice2">¥</view>
  141. <view class="goodsPrice3">294</view>
  142. <view class="goodsPrice4" >原价:¥1998</view>
  143. </view>
  144. </view>
  145. <image class="chahao" src="../../static/img2/chahao.png" mode=""></image>
  146. </view>
  147. <view class="buyLine">
  148. <view class="buyTitle">商品规格</view>
  149. <view class="buyData">
  150. <view class="goodsGuige activeGuige" style="margin-right: 24rpx;">单次购买</view>
  151. <view class="goodsGuige">保养套餐卡</view>
  152. </view>
  153. </view>
  154. <view class="buyLine">
  155. <view class="buyTitle">商品数量</view>
  156. <view class="buyData">
  157. <view class="numJsbox">
  158. <view class="numJj" @click="calculation(1)">-</view>
  159. <view class="goodsnum">
  160. <input type="number" value="" v-model="goodsnum" class="goodsnumInput"/>
  161. </view>
  162. <view class="numJj" @click="calculation(2)">+</view>
  163. </view>
  164. </view>
  165. </view>
  166. <view class="tkBottom">
  167. <view class="tkBottomBtn" @click="goSubmit">立即购买</view>
  168. </view>
  169. </view>
  170. </view>
  171. <!-- 提交订单弹框-->
  172. </view>
  173. </template>
  174. <script>
  175. export default {
  176. components: {
  177. },
  178. data() {
  179. return {
  180. themeColor:'',
  181. ext:'',
  182. goodsnum:1,
  183. tkShow:false,
  184. carInfo:'',
  185. }
  186. },
  187. onLoad(opt) {
  188. this.ext = this.$common.getExtStoreId();
  189. this.themeColor = uni.getStorageSync("themeColor");
  190. uni.setNavigationBarColor({
  191. frontColor: "#000000",
  192. backgroundColor: '#' + this.themeColor
  193. })
  194. this.carInfo=this.$store.state.carInfo;
  195. console.log(this.carInfo)
  196. this.getRecommend()
  197. },
  198. onShow() {
  199. },
  200. methods: {
  201. goCkcar(){
  202. },
  203. goItem(){
  204. uni.navigateTo({
  205. url:'maintainItem'
  206. })
  207. },
  208. goSubmit(){
  209. uni.navigateTo({
  210. url:'maintainSubmit'
  211. })
  212. },
  213. getRecommend(){
  214. uni.showLoading({
  215. title: '加载中'
  216. })
  217. this.$http('open-apply/get-recommend', {
  218. carId:this.carInfo.id,
  219. bizId:'F4BCDD75-F72B-48D6-8455-631297AA939D'
  220. }, 'GET').then(res => {
  221. uni.hideLoading();
  222. })
  223. },
  224. calculation(type){
  225. if(type==1){
  226. if(this.goodsnum>1){
  227. this.goodsnum--
  228. }
  229. }else{
  230. console.log("+++")
  231. this.goodsnum++
  232. }
  233. },
  234. }
  235. }
  236. </script>
  237. <style scoped lang="less">
  238. .box {
  239. width: 100vw;
  240. min-height: 100vh;
  241. background: #F4F4F4;
  242. }
  243. .tkBox{
  244. width: 100vw;height: 100vh;background: rgba(0,0,0,0.5);
  245. position: fixed;left: 0;top: 0;
  246. }
  247. .tkCont{
  248. width: 750rpx;
  249. height: 611rpx;
  250. background: #FFFFFF;
  251. border-radius: 28rpx 28rpx 0rpx 0rpx;
  252. position: absolute;
  253. left: 0;bottom: 0;
  254. padding-bottom: constant(safe-area-inset-bottom);
  255. padding-bottom: env(safe-area-inset-bottom);
  256. }
  257. .top{
  258. height: 170rpx;
  259. padding: 40rpx 24rpx;
  260. }
  261. .inputBox{
  262. background: rgba(255,255,255,0.5);
  263. border-radius: 38rpx;line-height: 42rpx;
  264. border: 2rpx solid #FFFFFF;
  265. padding: 18rpx 30rpx;font-size: 26rpx;color: #222222;
  266. display: flex;justify-content: space-between;
  267. }
  268. .xiaIcon{
  269. width: 12rpx;height: 9rpx;margin-top: 18rpx;
  270. }
  271. .ibCarIcon{
  272. height: 42rpx;width: 42rpx;
  273. }
  274. .glIcon{
  275. width: 34rpx;height: 34rpx;margin-top: 6rpx;
  276. }
  277. .ibLeft{
  278. display: flex;
  279. }
  280. .ibRight{
  281. display: flex;
  282. }
  283. .ibCarBox{
  284. display: flex;
  285. }
  286. .glInput{
  287. width: 160rpx;line-height: 42rpx;height: 42rpx;
  288. padding-left: 10rpx;
  289. }
  290. .msIcon{
  291. width: 20rpx;height: 20rpx;margin-top: 4rpx;
  292. }
  293. .msTxt{
  294. font-weight: 500;margin-left: 12rpx;
  295. font-size: 20rpx;
  296. color: #A77102;
  297. }
  298. .msLine{
  299. display: flex;line-height: 28rpx;
  300. }
  301. .msBox{
  302. display: flex;justify-content: space-between;padding-top: 24rpx;
  303. padding-left: 30rpx;padding-right: 30rpx;
  304. }
  305. .spBox{
  306. background: linear-gradient( 180deg, #FFFFFF 0%, #F4F4F4 100%);
  307. border-radius: 23rpx;
  308. padding: 24rpx 20rpx 0 24rpx;
  309. margin-top: -50rpx;
  310. }
  311. .spTop{
  312. display: flex;justify-content: space-between;line-height: 40rpx;
  313. padding-bottom: 16rpx;
  314. }
  315. .spTitle{
  316. font-weight: 500;
  317. font-size: 28rpx;
  318. color: #222222;
  319. }
  320. .spMs{
  321. font-size: 24rpx;
  322. color: #666666;
  323. }
  324. .znBox{
  325. height: 200rpx;
  326. background: #FDC856;
  327. border-radius: 21rpx;
  328. }
  329. .znCont{
  330. background: url('http://dmsphoto.66km.com.cn/thFiles/A88B34CF-1BEB-4E0F-8C0B-E6FD2C858B73.png') no-repeat;
  331. background-size: 100% 100%;
  332. height: 148rpx;
  333. }
  334. .hxIcon{
  335. height: 4rpx;width: 360rpx;
  336. margin-left: 18rpx;margin-top: 20rpx;
  337. display: block;
  338. }
  339. .znMs{
  340. font-size: 24rpx;
  341. color: #FFFFFF;
  342. line-height: 33rpx;
  343. padding-left: 18rpx;padding-top: 16rpx;
  344. }
  345. .znCar{
  346. font-weight: 500;padding-left: 18rpx;
  347. font-size: 32rpx;padding-top: 24rpx;
  348. color: #8C5E24;
  349. line-height: 45rpx;
  350. }
  351. .line{
  352. background: #FFFFFF;padding: 24rpx;
  353. border-radius: 16rpx;
  354. }
  355. .lineImg{
  356. width: 162rpx;
  357. height: 162rpx;
  358. border-radius: 10rpx;
  359. }
  360. .lineTop{
  361. display: flex;
  362. }
  363. .lineBox{
  364. margin-top: -52rpx;
  365. }
  366. .goodsKbox{
  367. display: flex;flex-wrap: wrap;
  368. }
  369. .goosK1 {
  370. height: 25rpx;line-height: 25rpx;padding: 0 8rpx;
  371. border: 1rpx solid #EC0F0A;font-size: 18rpx;
  372. color: #EC0F0A;margin-right: 10rpx;
  373. }
  374. .goosK2{
  375. height: 25rpx;line-height: 25rpx;padding: 0 8rpx;color: #000000;
  376. border: 1rpx solid #FCD903;font-size: 18rpx;
  377. }
  378. .goodsName{
  379. font-weight: 500;
  380. font-size: 28rpx;
  381. color: #222222;
  382. line-height: 40rpx;
  383. }
  384. .goodsMs{
  385. font-weight: 400;padding-top: 5rpx;
  386. font-size: 20rpx;padding-bottom: 10rpx;
  387. color: #8B8B8B;
  388. line-height: 28rpx;
  389. }
  390. .bfb{
  391. font-size: 20rpx;padding-top: 10rpx;
  392. color: #FFD804;
  393. line-height: 28rpx;
  394. }
  395. .lineNameBox{
  396. padding-left: 20rpx; width: 500rpx;
  397. }
  398. .tcLine{
  399. background: #F5F5F5;
  400. border-radius: 14rpx;
  401. border: 1px solid #E0E0E0;
  402. width: 316rpx;
  403. height: 138rpx;
  404. }
  405. .tcName{
  406. font-weight: 500;
  407. font-size: 28rpx;
  408. color: #435B6E;
  409. line-height: 40rpx;
  410. padding-left: 25rpx;padding-top: 24rpx;
  411. }
  412. .tcTitle{
  413. display: flex;
  414. }
  415. .tcprice{
  416. padding-top: 4rpx;font-size: 20rpx;
  417. color: #666666;padding-left: 25rpx;
  418. }
  419. .tcSpan2{
  420. font-size: 34rpx;
  421. color: #000000;
  422. }
  423. .tcSpan2{
  424. font-size: 20rpx;
  425. color: #000000;
  426. }
  427. .tcNameTs{
  428. width: 99rpx;margin-top: 30rpx;margin-left: 10rpx;
  429. height: 25rpx;
  430. background: #FE0200;
  431. text-align: center;
  432. line-height: 26rpx;
  433. font-size: 18rpx;
  434. color: #FFFFFF;
  435. }
  436. .tcBox{
  437. display: flex;justify-content: space-between;
  438. padding-top: 26rpx;
  439. }
  440. .bottom{
  441. width: 100%;
  442. height: 186rpx;
  443. position: fixed;
  444. bottom: 0rpx;
  445. padding-bottom: constant(safe-area-inset-bottom);
  446. padding-bottom: env(safe-area-inset-bottom);
  447. }
  448. .kaBox{
  449. height: 70rpx;
  450. }
  451. .bottomView{
  452. background: #FFFFFF;
  453. }
  454. .vipIcon{
  455. width: 47rpx;height: 45rpx;
  456. }
  457. .ka{
  458. display: flex;justify-content: space-between;
  459. background: #FEE0B9;
  460. padding: 12rpx 20rpx;
  461. }
  462. .kaLeft{
  463. display: flex;line-height: 45rpx;
  464. }
  465. .kaMS{
  466. font-size: 22rpx;
  467. color: #666666;padding-left: 15rpx;
  468. }
  469. .kaRight{
  470. line-height: 45rpx;font-size: 22rpx;
  471. color: #A26D4F;
  472. }
  473. .bottomBtn{
  474. width: 223rpx;
  475. height: 86rpx;
  476. background: #FCD903;
  477. border-radius: 43rpx;
  478. line-height: 86rpx;
  479. text-align: center;
  480. font-size: 32rpx;
  481. color: #110B01;
  482. }
  483. .bottomView{
  484. display: flex;justify-content: space-between;
  485. padding: 15rpx 30rpx;
  486. }
  487. .qingdanIcon{
  488. width: 40rpx;height: 45rpx;
  489. }
  490. .bLeft{
  491. display: flex;
  492. }
  493. .bLeftImgBox{
  494. position: relative;text-align: center;padding-top: 12rpx;
  495. }
  496. .qdNum{
  497. position: absolute;
  498. width: 22rpx;
  499. height: 22rpx;
  500. background: #EC0F0A;
  501. text-align: center;line-height: 22rpx;
  502. font-size: 16rpx;
  503. color: #FFFFFF;
  504. top: -2rpx;
  505. right: -4rpx;
  506. border-radius: 50%;
  507. }
  508. .qdTxt{
  509. font-size: 20rpx;
  510. color: #666666;
  511. line-height: 28rpx;
  512. }
  513. .bottomprice{
  514. padding-left: 38rpx;
  515. font-weight: 600;
  516. font-size: 20rpx;padding-top: 12rpx;
  517. color: #EC0F0A;line-height: 45rpx;
  518. }
  519. .byh{
  520. padding-left: 38rpx;
  521. font-size: 20rpx;
  522. color: #666666;
  523. line-height: 28rpx;
  524. }
  525. .bspan4{
  526. color: #EC0F0A;
  527. }
  528. .bSpan2{
  529. font-weight: 500;
  530. font-size: 34rpx;
  531. color: #EC0F0A;
  532. line-height: 45rpx;
  533. }
  534. .goodsPrice{
  535. display: flex;
  536. }
  537. .goodsPrice1{
  538. font-size: 24rpx;
  539. font-weight: 400;
  540. color: #FF0000;
  541. padding-top: 14rpx;
  542. padding-right: 14rpx;
  543. }
  544. .goodsPrice2{
  545. font-size: 28rpx;
  546. font-weight: 400;
  547. color: #FF0000;
  548. padding-top: 10rpx;
  549. }
  550. .goodsPrice3{
  551. font-size: 40rpx;
  552. font-weight: 500;
  553. color: #FF0000;
  554. }
  555. .goodsPrice4{
  556. font-size: 24rpx;
  557. font-weight: 400;
  558. color: #999999;
  559. padding-top: 14rpx;
  560. /* text-decoration:line-through; */
  561. padding-left: 10rpx;
  562. }
  563. .tkTop{
  564. display: flex;padding: 40rpx 24rpx;
  565. }
  566. .tkImg{
  567. width: 160rpx;
  568. height: 160rpx;border-radius: 13rpx;
  569. }
  570. .tkName{
  571. font-size: 30rpx;
  572. color: #222222;
  573. line-height: 42rpx;
  574. }
  575. .tkNameBox{
  576. padding-left: 24rpx;width: 500rpx;
  577. }
  578. .chahao{
  579. width: 22rpx;height: 22rpx;padding-top: 10rpx;
  580. }
  581. .buyLine{
  582. display: flex;justify-content: space-between;
  583. padding: 20rpx 24rpx;font-size: 26rpx;
  584. color: #666E80;
  585. }
  586. .buyBOx{
  587. background: #FFFFFF;margin-top: 20rpx;
  588. }
  589. .buyData{
  590. color: #222222;display: flex;
  591. }
  592. .goodsGuige{
  593. width: 150rpx;
  594. height: 50rpx;line-height: 50rpx;
  595. background: #F6F6F6;
  596. border-radius: 5rpx;
  597. font-size: 24rpx;
  598. color: #222222;text-align: center;
  599. }
  600. .activeGuige{
  601. width: 146rpx;
  602. height: 46rpx;line-height: 46rpx;
  603. border: 2rpx solid #FF0035;
  604. border-radius: 5rpx;
  605. font-size: 24rpx;
  606. color: #FF0035;text-align: center;
  607. }
  608. .numJsbox{
  609. display: flex;
  610. }
  611. .buyCont{
  612. position: absolute;
  613. left: 0;
  614. bottom: 0;
  615. width: 750rpx;
  616. height: 688rpx;
  617. background: #FFFFFF;
  618. border-radius: 26rpx 26rpx 0px 0px;
  619. }
  620. .buyNumBox{
  621. padding: 30rpx;
  622. padding-top: 10rpx;
  623. padding-bottom: 70rpx;
  624. }
  625. .buyContCh{
  626. position: absolute;
  627. top: 53rpx;
  628. right: 36rpx;
  629. width: 36rpx;
  630. height: 36rpx;
  631. }
  632. .goodsnum{
  633. width: 88rpx;
  634. height: 44rpx;
  635. background: #F4F5F7;
  636. line-height: 44rpx;
  637. text-align: center;
  638. font-weight: 500;
  639. color: #333333;
  640. font-size: 24rpx;
  641. margin: 0 4rpx;
  642. }
  643. .goodsnumInput{
  644. width: 88rpx;
  645. height: 44rpx;
  646. background: #F4F5F7;
  647. line-height: 44rpx;
  648. text-align: center;
  649. font-weight: 500;
  650. color: #333333;
  651. font-size: 24rpx;
  652. }
  653. .numJj{
  654. width: 44rpx;
  655. height: 44rpx;
  656. background: #F4F5F7;
  657. border-radius: 0px 6rpx 6rpx 0px;
  658. text-align: center;
  659. line-height: 44rpx;
  660. font-size: 32rpx;
  661. color: #999999;
  662. }
  663. .tkBottomBtn{
  664. width: 661rpx;text-align: center;
  665. height: 86rpx;line-height: 86rpx;
  666. background: #FCD903;
  667. border-radius: 43rpx;
  668. font-size: 32rpx;
  669. color: #110B01;
  670. }
  671. .tkBottom{
  672. width: 750rpx;
  673. height: 146rpx;
  674. background: #FFFFFF;
  675. box-shadow: 0rpx -2rpx 16rpx 0rpx rgba(153,153,153,0.2);
  676. padding-bottom: constant(safe-area-inset-bottom);
  677. padding-bottom: env(safe-area-inset-bottom);
  678. display: flex;justify-content: center;align-items: center;
  679. position: absolute;left: 0;bottom: 0;
  680. }
  681. </style>