tire.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517
  1. <template>
  2. <view class="box">
  3. <view class="top" >
  4. <view class="topTitle">
  5. <image class="topTitleImg" src="http://dmsphoto.66km.com.cn/thFiles/A04B4AFE-6C2C-4570-B579-2AF05487D71E.png" mode=""></image>
  6. </view>
  7. <view class="msBox">
  8. <view class="msLine">
  9. <image class="msIcon" src="../../static/img2/yczg.png" mode=""></image>
  10. <view class="msTxt">原厂直供</view>
  11. </view>
  12. <view class="msLine">
  13. <image class="msIcon" src="../../static/img2/zszb.png" mode=""></image>
  14. <view class="msTxt">终身质保</view>
  15. </view>
  16. <view class="msLine">
  17. <image class="msIcon" src="../../static/img2/smfw.png" mode=""></image>
  18. <view class="msTxt">上门服务</view>
  19. </view>
  20. </view>
  21. <view class="inputBox">
  22. <view class="iBline">
  23. <span>雪佛兰 科沃兹</span>
  24. <image class="xiaIcon" src="../../static/img2/xia.png" mode=""></image>
  25. </view>
  26. <view class="iBsx"></view>
  27. <view class="iBline">
  28. <view style="display: flex;">
  29. <span>215/55 R16</span>
  30. <span class="shipei">适配</span>
  31. </view>
  32. <image class="xiaIcon" src="../../static/img2/xia.png" mode=""></image>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="contBox">
  37. <view class="contTabBox">
  38. <view class="contTab contTabActive">综合</view>
  39. <view class="tabprice">
  40. <view>价格</view>
  41. <view class="tabpriceImg">
  42. <image src="../../static/timg/icon_arrow_up_def@2x.png" mode="" class="paixuLineTbtopIcon paixuLineTbtopIcons"></image>
  43. <image src="../../static/timg/icon_arrow_def@2x.png" mode="" class="paixuLineTbtopIcon paixuLineTbtopIconx"></image>
  44. </view>
  45. </view>
  46. <view class="contTab">销量</view>
  47. </view>
  48. <view class="contLineBox">
  49. <view class="contLine" v-for="(item,index) in 3" @click="goDetail">
  50. <image class="lineImg" src="../../static/timg/noimg.png" mode=""></image>
  51. <view class="goodsRight">
  52. <view class="bygoodsNameBox">
  53. <span class="isRecommend" >适配</span>
  54. <span class="bygoodsName"> 路博路博(ROADBOSS)轮胎 195/65R5 91H HP601</span>
  55. </view>
  56. <view class="tireMS">耐磨 静音</view>
  57. <view class="goodsbq">
  58. <view class="goodsbqLine">第二条半价</view>
  59. <view class="goodsbqLine">双11轮胎节</view>
  60. </view>
  61. <view class="goodspriceBox">
  62. <view class="goodsprice1">¥</view>
  63. <view class="goodsprice2">294.5</view>
  64. <view class="goodsprice3">¥414</view>
  65. </view>
  66. <view class="goodsk">
  67. <view class="goodsKline">
  68. <view class="goodsKlineLeft">送</view>
  69. <view class="goodsKlineRgiht">动平衡</view>
  70. </view>
  71. <view class="goodsKline">
  72. <view class="goodsKlineLeft">送</view>
  73. <view class="goodsKlineRgiht">动平衡</view>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. </template>
  82. <script>
  83. export default {
  84. components: {},
  85. /*保养 1 */
  86. data() {
  87. return {
  88. themeColor:'',
  89. ext:'',
  90. carInfo:'',
  91. }
  92. },
  93. onLoad(opt) {
  94. this.ext = this.$common.getExtStoreId();
  95. this.themeColor = uni.getStorageSync("themeColor");
  96. uni.setNavigationBarColor({
  97. frontColor: "#ffffff",
  98. backgroundColor: '#FD3142'// + this.themeColor
  99. })
  100. this.carInfo=this.$store.state.carInfo;
  101. this.maintainProjectID=opt.maintainProjectID
  102. if(this.carInfo){
  103. //this.getRecommend()
  104. }else{
  105. /* uni.showModal({
  106. title: '提示',
  107. content: '请先选择车辆',
  108. showCancel:false,
  109. success: function (res) {
  110. if (res.confirm) {
  111. uni.navigateTo({
  112. url:'../user/addCar/cailist?type=5'
  113. })
  114. }
  115. }
  116. }); */
  117. }
  118. },
  119. onShow() {
  120. var car =uni.getStorageSync("byCar")
  121. },
  122. methods: {
  123. goDetail(){
  124. uni.navigateTo({
  125. url:'tireDetail'
  126. })
  127. },
  128. clearAll(){
  129. var that=this
  130. uni.showModal({
  131. title: '提示',
  132. content: '确定清空吗?',
  133. success: function(resTK) {
  134. if (resTK.confirm) {
  135. that.list.forEach(item=>{
  136. item.packageItems.forEach(v=>{
  137. v.select=false
  138. })
  139. })
  140. that.itemDefault=''
  141. that.qdNum=0
  142. that.totalPrice=0
  143. }
  144. }
  145. });
  146. },
  147. goCkcar(){
  148. uni.navigateTo({
  149. url:'../user/addCar/cailist?type=5'
  150. })
  151. },
  152. goItem(item){
  153. uni.removeStorageSync('byCar');
  154. uni.navigateTo({
  155. url:'maintainItem?maintainId='+item.id+'&isRecommend='+item.isRecommend
  156. })
  157. },
  158. goSubmit(){
  159. if(this.itemDefault){
  160. if(this.itemDefault.content){
  161. this.itemDefault.content=this.itemDefault.content.replace(/\<img/gi, '<img style="max-width:100% !important;height:auto" ');
  162. }
  163. this.itemDefault.goodsnum=this.goodsnum
  164. this.itemDefault.goodsname=this.lineItem.title
  165. this.itemDefault.itemId=this.lineItem.id
  166. this.itemDefault.mainImgUrl=this.lineItem.mainImgUrl
  167. uni.setStorage({
  168. key: 'itemDefault',
  169. data: this.itemDefault,
  170. success: function () {
  171. uni.navigateTo({
  172. url:'maintainSubmit'
  173. })
  174. }
  175. });
  176. }else{
  177. uni.showToast({
  178. title: '请选择商品规格',
  179. icon:'none',
  180. duration: 3000
  181. });
  182. }
  183. },
  184. }
  185. }
  186. </script>
  187. <style scoped lang="less">
  188. .box {
  189. width: 100vw;
  190. min-height: 100vh;
  191. background: #F4F4F4;
  192. }
  193. .contBox{
  194. background: linear-gradient( 180deg, #FED3C1 0%, #F3F3F3 14%, #F2F2F2 100%);
  195. border-radius: 24rpx 24rpx 0rpx 0rpx;
  196. min-height: 500rpx;
  197. margin-top: -20rpx;
  198. }
  199. .goodsk{
  200. display: flex;padding-top: 8rpx;
  201. }
  202. .goodsKline{
  203. display: flex;font-size: 15rpx;
  204. color: #FF063A;
  205. border-radius: 2rpx;
  206. border: 1rpx solid #FF063A;
  207. margin-right: 8rpx;
  208. }
  209. .goodsKlineLeft{
  210. padding: 2rpx 4rpx;
  211. border-right: 1rpx solid #FF063A;
  212. }
  213. .goodsKlineRgiht{
  214. padding: 2rpx 4rpx;
  215. }
  216. .bygoodsNameBox{
  217. text-overflow: -o-ellipsis-lastline;
  218. overflow: hidden;
  219. text-overflow: ellipsis;
  220. display: -webkit-box;
  221. -webkit-line-clamp: 2;
  222. line-clamp: 2;
  223. -webkit-box-orient: vertical;
  224. width: 430rpx;
  225. }
  226. .goodsRight{
  227. padding-left: 24rpx;
  228. }
  229. .bygoodsName{
  230. font-weight: 600;
  231. font-size: 28rpx;
  232. color: #222222;
  233. line-height: 40rpx;
  234. padding-left: 10rpx;
  235. }
  236. .goodspriceBox{
  237. display: flex;padding-top: 8rpx;
  238. }
  239. .goodsprice1{
  240. font-weight: 600;
  241. font-size: 20rpx;
  242. color: #EC0F0A;
  243. padding-top: 8rpx;
  244. }
  245. .goodsprice2{
  246. font-weight: 500;
  247. font-size: 30rpx;
  248. color: #EC0F0A;
  249. }
  250. .goodsprice3{
  251. font-weight: 400;
  252. font-size: 22rpx;
  253. color: #9A9A9A;
  254. padding-top: 8rpx;
  255. padding-left: 8rpx;
  256. }
  257. .isRecommend{
  258. font-size: 20rpx;
  259. background: #57C73D;
  260. height: 30rpx;
  261. padding: 0 6rpx;
  262. border-radius: 6rpx;
  263. color: #fff;
  264. margin-top: 5rpx;
  265. /* margin-right: 10rpx; */
  266. }
  267. .contLineBox{
  268. padding: 0 20rpx;
  269. }
  270. .contLine{
  271. padding: 22rpx;
  272. background: #FFFFFF;
  273. border-radius: 16rpx;
  274. margin-bottom: 16rpx;
  275. display: flex;
  276. }
  277. .lineImg{
  278. width: 230rpx;border-radius: 13rpx;
  279. height: 230rpx;
  280. }
  281. .goodsbq{
  282. display: flex;padding-top: 10rpx;
  283. }
  284. .goodsbqLine{
  285. font-size: 20rpx;
  286. color: #FF063A;
  287. background: rgba(236, 15, 10, 0.1);
  288. border-radius: 2rpx;
  289. padding: 2rpx 10rpx;
  290. margin-right: 12rpx;
  291. }
  292. .tireMS{
  293. font-weight: 500;
  294. font-size: 22rpx;
  295. color: #434340;
  296. }
  297. .tabprice{
  298. display: flex;
  299. }
  300. .tabpriceImg{
  301. display: flex;
  302. justify-content: center;
  303. align-items: center;
  304. flex-direction: column;
  305. }
  306. .contTabBox{
  307. display: flex;justify-content: space-between;
  308. padding: 20rpx 60rpx;font-weight: 500;
  309. font-size: 26rpx;
  310. color: #222222;
  311. }
  312. .paixuLineTbtopIcon{
  313. width: 16rpx;
  314. height: 8rpx;
  315. padding-top: 6rpx;
  316. padding-bottom: 6rpx;
  317. padding-left: 10rpx;
  318. }
  319. .contTabActive{
  320. font-weight: 500;
  321. font-size: 26rpx;
  322. color: #EC0F0A;
  323. }
  324. .top{
  325. height: 260rpx;
  326. padding: 40rpx 24rpx;
  327. background: linear-gradient( 180deg, #FD3142 0%, #FE9045 100%);
  328. }
  329. .inputBox{
  330. background: rgba(255,255,255,0.4);
  331. border-radius: 40rpx;line-height: 42rpx;
  332. border: 1px solid #FFFFFF;
  333. padding: 18rpx 30rpx;font-size: 26rpx;color: #222222;
  334. display: flex;justify-content: space-between;
  335. margin-top: 32rpx;
  336. padding-bottom: 14rpx;
  337. }
  338. .iBsx{
  339. width: 2rpx;
  340. height: 46rpx;
  341. background: #EEEEEE;
  342. opacity: 0.5;
  343. }
  344. .shipei{
  345. width: 48rpx;text-align: center;
  346. height: 28rpx;margin-top: 8rpx;
  347. background: #57C73D;margin-left: 10rpx;
  348. border-radius: 5rpx;
  349. display: inline-block;
  350. font-weight: 500;
  351. font-size: 16rpx;
  352. color: #FFFFFF;
  353. line-height: 28rpx;
  354. }
  355. .xiaIcon{
  356. width: 12rpx;height: 9rpx;margin-top: 18rpx;margin-left: 10rpx;
  357. }
  358. .iBline{
  359. width: 300rpx;display: flex;justify-content: space-between;
  360. }
  361. .ibCarIcon{
  362. height: 42rpx;width: 42rpx;
  363. }
  364. .glIcon{
  365. width: 34rpx;height: 34rpx;margin-top: 6rpx;
  366. }
  367. .ibLeft{
  368. display: flex;
  369. }
  370. .ibRight{
  371. display: flex;
  372. }
  373. .ibCarBox{
  374. display: flex;padding-left: 10rpx;
  375. }
  376. .glInput{
  377. width: 120rpx;line-height: 42rpx;height: 42rpx;
  378. padding-left: 10rpx;
  379. }
  380. .msIcon{
  381. width: 26rpx;height: 26rpx;
  382. }
  383. .msTxt{
  384. font-weight: 500;margin-left: 12rpx;
  385. font-size: 22rpx;
  386. color: #FCD903;
  387. padding-top: 2rpx;
  388. }
  389. .msLine{
  390. display: flex;line-height: 28rpx; width: 180rpx;
  391. justify-content: center;
  392. }
  393. .msBox{
  394. display: flex;justify-content: center;padding-top: 24rpx;
  395. padding-left: 30rpx;padding-right: 30rpx;
  396. }
  397. .spBox{
  398. background: linear-gradient( 180deg, #FFFFFF 0%, #F4F4F4 440rpx);
  399. border-radius: 23rpx;
  400. padding: 24rpx 20rpx 0 24rpx;
  401. margin-top: -50rpx;
  402. padding-bottom: constant(safe-area-inset-bottom);
  403. padding-bottom: env(safe-area-inset-bottom);
  404. }
  405. .spTop{
  406. display: flex;justify-content: space-between;line-height: 40rpx;
  407. padding-bottom: 16rpx;
  408. }
  409. .spTitle{
  410. font-weight: 500;
  411. font-size: 28rpx;
  412. color: #222222;
  413. }
  414. .spMs{
  415. font-size: 24rpx;
  416. color: #666666;
  417. }
  418. .znBox{
  419. height: 200rpx;
  420. background: #FDC856;
  421. border-radius: 21rpx;
  422. }
  423. .znCont{
  424. background: url('http://dmsimg.66km.com/marketing/be56733ed0464993b9e71d351d82062e.jpg') no-repeat;
  425. background-size: 100% 100%;
  426. height: 160rpx;
  427. border-radius: 26rpx;
  428. }
  429. .hxIcon{
  430. height: 4rpx;width: 360rpx;
  431. margin-left: 18rpx;margin-top: 20rpx;
  432. display: block;
  433. }
  434. .znMs{
  435. font-size: 24rpx;
  436. color: #FFFFFF;
  437. line-height: 33rpx;
  438. padding-left: 18rpx;padding-top: 16rpx;
  439. }
  440. .znCar{
  441. font-weight: 500;padding-left: 18rpx;
  442. font-size: 32rpx;padding-top: 24rpx;
  443. color: #8C5E24;
  444. line-height: 45rpx;
  445. }
  446. .goodsMs{
  447. font-weight: 400;padding-top: 10rpx;
  448. padding-bottom: 6rpx;
  449. font-size: 22rpx;
  450. color: #8B8B8B;
  451. line-height: 28rpx;
  452. white-space: nowrap; /* 确保文本在一行内显示 */
  453. overflow: hidden; /* 超出容器部分隐藏 */
  454. text-overflow: ellipsis;
  455. width: 480rpx;
  456. }
  457. .nodataImg{
  458. width: 176rpx;height: 180rpx;
  459. }
  460. .nodataTxt{
  461. font-weight: 400;
  462. font-size: 26rpx;
  463. color: #999999;
  464. line-height: 37rpx;
  465. text-align: center;
  466. padding-top: 10rpx;
  467. }
  468. .nodataBox{
  469. padding-top: 186rpx;
  470. background: #fff;
  471. padding-bottom: 200rpx;
  472. border-radius: 20rpx;
  473. }
  474. .topTitle{
  475. font-family: PangMenZhengDao;
  476. font-size: 60rpx;
  477. color: #FFF99F;
  478. line-height: 80rpx;
  479. text-align: center;
  480. }
  481. .topTitleImg{
  482. width: 529rpx;
  483. height: 52rpx;
  484. }
  485. </style>