byItem.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. <template>
  2. <view class="content">
  3. <homenav :iStatusBarHeight="iStatusBarHeight" :title="'雨刷'"></homenav>
  4. <view class="box">
  5. <view class="historyLine" >
  6. <view class="historyLogoBox">
  7. <image :src="optdata.logo" mode="" class="historylinecarImg"></image>
  8. </view>
  9. <view>
  10. <view class="historylinecar">{{optdata.value}}</view>
  11. <view class="historyLineVin" v-if="optdata.isVin==1">
  12. <view class="vinms">VIN</view>
  13. <view class="vinNum">{{optdata.vin}}</view>
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="cont">
  19. <view class="topBox">
  20. <view class="topLine" @click="goby">
  21. <image src="../../static/img/icon_baoyang.png" mode="" class="toplineImg"></image>
  22. <view class="topName">保养周期</view>
  23. </view>
  24. <view class="topsx"></view>
  25. <view class="topLine" @click="gopz">
  26. <image src="../../static/img/icon_cheliang.png" mode="" class="toplineImg"></image>
  27. <view class="topName">车辆配置</view>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="listBox" v-if="MaintainPartList.length!=0">
  32. <view class="jiyouBox" v-if="loading">
  33. <view class="title">前雨刷</view>
  34. <view class="jylineBox">
  35. <view class="jyline" v-for="(item,index) in MaintainPartList" ><!-- @click="godetail(item)" -->
  36. <view class="jyimgBox">
  37. <image v-if="item.imgs.split(',')[0]" :src="item.imgs.split(',')[0]" mode="aspectFit" class="jyimg"></image>
  38. <image v-else src="../../static/img/noimg.png" mode="aspectFit" class="jyimg"></image>
  39. </view>
  40. <view class="jylineRight">
  41. <view class="jyName">
  42. <span class="jyNametxt">{{item.name}} | {{item.partsCode}} | {{item.factoryNumber}} </span>
  43. </view>
  44. <view class="modelRemark">{{item.modelRemark}}</view>
  45. <view v-for="(exObj,exindex) in item.ExtendDatas" class="exspanBox">
  46. <span class="exspan1" v-for="ex in Object.keys(exObj)" v-if="ex!='partsId'&&exObj[ex]">{{ex}}: <span class="exspan2">{{exObj[ex]}}</span></span>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. <nodata v-if="MaintainPartList.length==0"></nodata>
  52. </view>
  53. </view>
  54. <view class="listBox" v-if="afterList.length!=0">
  55. <view class="jiyouBox" v-if="loading">
  56. <view class="title">前雨刷安装视频</view>
  57. <view class="jylineBox">
  58. <view class="jyline" v-for="(item,index) in afterList" @click="godetail(item)">
  59. <view class="jyimgBox">
  60. <image v-if="item.imgs.split(',')[0]" :src="item.imgs.split(',')[0]" mode="aspectFit" class="jyimg"></image>
  61. <image v-else src="../../static/img/noimg.png" mode="aspectFit" class="jyimg"></image>
  62. </view>
  63. <view class="jylineRight">
  64. <view class="jyName">
  65. <!-- <span class="best">最佳</span> -->
  66. <span class="jyNametxt">{{item.name}} | {{item.specificationModel}} | {{item.partsCode}} </span>
  67. </view>
  68. <view class="modelRemark">{{item.modelRemark}}</view>
  69. <view v-for="(exObj,exindex) in item.ExtendDatas" class="exspanBox">
  70. <span class="exspan1" v-for="ex in Object.keys(exObj)" v-if="ex!='partsId'&&exObj[ex]">{{ex}}: <span class="exspan2">{{exObj[ex]}}</span></span>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. <nodata v-if="afterList.length==0"></nodata>
  76. </view>
  77. </view>
  78. <view v-if="disclaimerShow" class="tiTk">
  79. <view class="disclaimerShowBOx">
  80. <view class="disclaimerTitle">免责声明</view>
  81. <view class="disclaimerTxt">
  82. <view class="disclaimerTxtLIne">1、本系统只作为查询辅助工具,在使用中如有对数据与实车配件产品不匹配疑问时,请务必核实实车配件产品及原车维修保养手册所推荐产品标准</view>
  83. <view class="disclaimerTxtLIne">2、如有系统匹配疑问,无法辅助销售,欢迎进入反馈通道及时反馈</view>
  84. <view class="disclaimerTxtLIne">3、对于使用系统中出现的个别型号不匹配的情况一切解释权归本公司所有</view>
  85. <view class="disclaimerTxtLIne">我司将会不断完善升级系统,力求为客户提供最准确,最完善的配件数据查询服务。</view>
  86. </view>
  87. <view class="disclaimerXc">
  88. <checkbox-group @change="disclaimerChange">
  89. <checkbox style="transform:scale(0.7)" value="1" :checked="disclaimerchecked" />下次不再提醒
  90. </checkbox-group>
  91. </view>
  92. <view class="disclaimerBtnBox" @click="disclaimerBtn">
  93. 我知道了
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. </template>
  99. <script>
  100. import homenav from "../../components/homenav/nav.vue"
  101. import nodata from '../../components/nodata/nodata.vue'
  102. export default {
  103. components: {
  104. homenav,nodata
  105. },
  106. data() {
  107. return {
  108. optdata:'',
  109. isVin:'',
  110. vin:'',
  111. scarid:'',
  112. iStatusBarHeight:'',
  113. loading:false,
  114. MaintainPartList:[],
  115. afterList:[],
  116. disclaimerShow:false,
  117. disclaimerchecked:false,
  118. }
  119. },
  120. onLoad(opt) {
  121. var disclaimercheckedck=uni.getStorageSync('disclaimerchecked');
  122. if(disclaimercheckedck!=1){
  123. this.disclaimerShow=true;
  124. }
  125. console.log(opt);
  126. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  127. this.optdata=opt;
  128. this.queryMaintainPartList()
  129. if(opt.scarid){
  130. this.scarid=opt.scarid;
  131. this.queryCarModelGroupInfo()
  132. }else{
  133. if(opt.isVin==1){
  134. this.isVin=1;
  135. this.vin=opt.vin
  136. }
  137. this.saveQueryHistory()
  138. }
  139. },
  140. methods: {
  141. disclaimerChange(e){
  142. console.log(e)
  143. this.disclaimerchecked=e.detail.value[0]
  144. },
  145. disclaimerBtn(){
  146. console.log(this.disclaimerchecked)
  147. this.disclaimerShow=false;
  148. if(this.disclaimerchecked){
  149. uni.setStorageSync('disclaimerchecked', 1);
  150. }
  151. },
  152. queryCarModelGroupInfo(){
  153. uni.showLoading({ title: '加载中'});
  154. this.$http('matchingByOpen/queryCarModelGroupInfo', {
  155. id:this.scarid,
  156. },'POST').then(res => {
  157. uni.hideLoading();
  158. var data={
  159. value:res.data.value,
  160. id:res.data.id,
  161. nLevelID:res.data.carModelInfo.nLevelID,
  162. logo:res.data.carModelInfo.logo,
  163. }
  164. this.optdata=data;
  165. this.saveQueryHistory()
  166. })
  167. },
  168. queryMaintainPartList(){
  169. uni.showLoading({ title: '加载中'});
  170. this.loading=false;
  171. this.$http('partsByOpen/queryMaintainPartList', {
  172. groupId:this.optdata.id,
  173. componentCode:'006001',
  174. },'POST').then(res => {
  175. this.loading=true;
  176. uni.hideLoading();
  177. this.MaintainPartList=res.data;//前雨刷
  178. })
  179. this.$http('partsByOpen/queryMaintainPartList', {
  180. groupId:this.optdata.id,
  181. componentCode:'006004',
  182. },'POST').then(res => {
  183. uni.hideLoading();
  184. this.afterList=res.data;//后雨刷
  185. })
  186. },
  187. saveQueryHistory(){
  188. this.$http2('saveQueryHistory', {
  189. nLevelID:this.optdata.nLevelID,
  190. logo:this.optdata.logo,
  191. title:this.optdata.value,
  192. groupId:this.optdata.id,
  193. isVin:this.isVin,
  194. vin:this.vin
  195. },'POST').then(res => {
  196. })
  197. },
  198. goby(){
  199. uni.navigateTo({
  200. url:'/pages/index/maintenance?nLevelID='+this.optdata.nLevelID+'&id='+this.optdata.id
  201. })
  202. },
  203. godetail(e){
  204. uni.navigateTo({
  205. url:'/pages/index/goodsDetail?id='+e.id
  206. })
  207. },
  208. gopz(){
  209. uni.navigateTo({
  210. url:'/pages/index/carConfiguration?nLevelID='+this.optdata.nLevelID
  211. })
  212. }
  213. }
  214. }
  215. </script>
  216. <style scoped>
  217. .disclaimerShowBOx{
  218. width: 600rpx;
  219. background: #FFFFFF;
  220. border-radius: 10rpx;
  221. padding-top: 24rpx;
  222. }
  223. .modelRemark{
  224. font-weight: 400;
  225. color: #F19D01;
  226. font-size: 26rpx;
  227. }
  228. .jylineRight{
  229. width: 450rpx;padding-left: 16rpx;
  230. }
  231. .disclaimerXc{
  232. padding-left: 24rpx;
  233. }
  234. .disclaimerTitle{
  235. text-align: center;font-size: 30rpx;color: #333333;
  236. }
  237. .disclaimerTxt{
  238. color: #333333;font-size: 28rpx;
  239. padding: 30rpx;line-height: 40rpx;
  240. }
  241. .disclaimerBtnBox{
  242. display: flex;justify-content: center;color: #3F90F7;
  243. border-top: 1px solid #EEEEEE;line-height: 90rpx;margin-top: 24rpx;
  244. }
  245. .tiTk{
  246. position: fixed;
  247. left: 0;top: 0;
  248. background: rgba(0, 0, 0, 0.4);
  249. width: 100vw;height: 100vh;
  250. display: flex;
  251. justify-content: center;
  252. align-items: center;
  253. }
  254. .exspan1{
  255. margin-top: 5rpx;
  256. font-size: 24rpx;
  257. font-family: PingFangSC-Regular, PingFang SC;
  258. font-weight: 400;
  259. color: #999999;
  260. display: block;
  261. }
  262. .exspan2{
  263. font-size: 24rpx;
  264. font-family: PingFangSC-Regular, PingFang SC;
  265. color:#3C3C3C;
  266. font-style: normal;
  267. }
  268. .content{
  269. min-height: 100vh;
  270. background: #F4F5F7;
  271. }
  272. .box{
  273. padding: 0 24rpx;
  274. background: #ffffff;
  275. }
  276. .historylinecarImg{
  277. width: 54rpx;
  278. height: 54rpx;
  279. }
  280. .historyLogoBox{
  281. display: flex;align-items: center;
  282. padding-right: 14rpx;
  283. }
  284. .historylinecar{
  285. font-weight: 500;font-size: 26rpx;
  286. color: #1A1A1A;
  287. line-height: 46rpx;width: 636rpx;
  288. }
  289. .historyLine{
  290. display: flex;
  291. padding: 30rpx 0;
  292. }
  293. .title{
  294. font-weight: 500;font-size: 28rpx;
  295. color: #1A1A1A;border-top-right-radius: 16rpx;
  296. line-height: 40rpx;border-top-left-radius: 16rpx;
  297. padding:20rpx 30rpx;background:#FF4F00;color: #ffffff;
  298. }
  299. .lineBox{
  300. padding: 0 24rpx;
  301. }
  302. .line{
  303. width: 332rpx;
  304. height: 206rpx;
  305. background: #FFFFFF;
  306. border-radius: 16rpx;
  307. }
  308. .lineTitle{
  309. font-weight: 500;font-size: 28rpx;padding-top: 32rpx;
  310. color: #1A1A1A;padding-left: 30rpx;
  311. line-height: 40rpx;
  312. }
  313. .lineEnglish{
  314. font-weight: 400;font-size: 24rpx;
  315. color: #999999;padding-left: 30rpx;
  316. line-height: 34rpx;padding-top: 10rpx;
  317. }
  318. .lineImg1{
  319. width: 82rpx;height: 92rpx;
  320. }
  321. .lineImgbox{
  322. text-align: right;
  323. }
  324. .lineImg2{
  325. width: 106rpx;height: 82rpx; margin-top: 10rpx;
  326. }
  327. .historyLineVin{
  328. display: flex;background: #ffffff;
  329. }
  330. .historyLineCar{
  331. display: flex;justify-content: space-between;
  332. }
  333. .vinNum{
  334. font-weight: 400;font-size: 22rpx;padding-left: 10rpx;
  335. color: #999999;line-height: 30rpx;
  336. }
  337. .vinms{
  338. width: 38rpx;
  339. height: 26rpx;
  340. background: linear-gradient(224deg, #FFDA28 0%, #FFBF35 100%);
  341. border-radius: 4rpx;
  342. text-align: center;
  343. line-height: 26rpx;
  344. font-weight: 600;
  345. color: #FFFFFF;
  346. font-size: 18rpx;
  347. margin-top: 2rpx;
  348. }
  349. .cont {
  350. padding: 30rpx 24rpx;
  351. }
  352. .toplineImg{
  353. width: 35rpx;
  354. height: 34rpx;
  355. }
  356. .topName{
  357. line-height: 34rpx;font-weight: 400;
  358. color: #FFFFFF;font-size: 28rpx;padding-left: 16rpx;
  359. }
  360. .topBox{
  361. width: 702rpx;
  362. height: 98rpx;
  363. background: #FFFFFF linear-gradient(132deg, #FF8635 0%, #FF4828 100%);
  364. border-radius: 16rpx;
  365. display: flex;justify-content: center;
  366. }
  367. .topsx{
  368. width: 2rpx;background: #ffffff;
  369. margin-left: 85rpx;margin-right: 85rpx;
  370. height: 54rpx;margin-top: 22rpx;
  371. }
  372. .topLine{
  373. display: flex;padding-top: 34rpx;
  374. }
  375. .jiyouBox{
  376. border-radius: 16rpx;
  377. background: #ffffff;
  378. }
  379. .jiyoutopTitle{
  380. font-weight: 500;font-size: 28rpx;
  381. color: #1A1A1A;
  382. line-height: 40rpx;
  383. }
  384. .jyzl{
  385. font-weight: 400;line-height: 40rpx;
  386. color: #666666;font-size: 24rpx;
  387. }
  388. .jyimg{
  389. width: 200rpx;
  390. height: 200rpx;
  391. border-radius: 10rpx;
  392. }
  393. .jyline{
  394. width: 302rpx;padding-top: 30rpx;
  395. }
  396. .jyName{
  397. font-weight: 500;font-size: 28rpx;
  398. color: #1A1A1A;
  399. line-height:36rpx ;
  400. overflow: hidden;
  401. text-overflow: ellipsis;
  402. display: -webkit-box;
  403. -webkit-box-orient: vertical;
  404. -webkit-line-clamp: 2;
  405. padding-top: 10rpx;
  406. width: 450rpx;
  407. padding-bottom: 10rpx;
  408. }
  409. .best{
  410. color: #FF4F00;border-radius: 6rpx;
  411. padding: 0 8rpx;border: 1px solid #FF4F00;
  412. }
  413. .jylineBox{
  414. /* display: flex;justify-content: space-between;flex-wrap: wrap; */
  415. padding: 0 24rpx 30rpx 24rpx;
  416. }
  417. .jyline{
  418. display: flex;
  419. }
  420. .historyLineVin{
  421. display: flex;background: #ffffff;
  422. }
  423. .historyLineCar{
  424. display: flex;justify-content: space-between;
  425. }
  426. .vinNum{
  427. font-weight: 400;font-size: 22rpx;padding-left: 10rpx;
  428. color: #999999;line-height: 30rpx;
  429. }
  430. .vinms{
  431. width: 38rpx;
  432. height: 26rpx;
  433. background: linear-gradient(224deg, #FFDA28 0%, #FFBF35 100%);
  434. border-radius: 4rpx;
  435. text-align: center;
  436. line-height: 26rpx;
  437. font-weight: 600;
  438. color: #FFFFFF;
  439. font-size: 18rpx;
  440. margin-top: 2rpx;
  441. }
  442. .listBox{
  443. padding: 30rpx 24rpx;
  444. padding-top: 0;
  445. }
  446. .jyimgBox{
  447. border: 1px solid #f3f3f3; width: 200rpx;border-radius: 10rpx;
  448. }
  449. </style>