group.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. <template>
  2. <view class="content">
  3. <!-- 自定义导航 -->
  4. <view class="zdyNavBox">
  5. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  6. <view class="zdyNav">
  7. <view class="zdyNavLeft">
  8. <image src="../../static/img/nav_icon_back.png" mode="aspectFit" class="backImg" @click="goback">
  9. </image>
  10. </view>
  11. <view class="zdyNavTitle">车型件</view>
  12. <view class="zdyNavRight" @click="goOemSearch">OEM搜索</view>
  13. <!-- <view style="width: 10rpx;"></view> -->
  14. </view>
  15. </view>
  16. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  17. <view style="height: 44px;"></view>
  18. <view class="top">
  19. <view class="topCont">
  20. <view class="carBox">
  21. <image src="../../static/img/nocar.png" mode="" class="carLogo"></image>
  22. <view class="carTxt">{{brand_name}}</view>
  23. <!-- <image src="../../static/img/jt.png" mode="" class="carJt"></image> -->
  24. </view>
  25. <view class="vinBox">
  26. <view class="vinBox2">
  27. <view class="vinB">VIN</view>
  28. <view class="vinNum">{{vin}}</view>
  29. </view>
  30. <view class="vinBox2">
  31. <view class="detail" @click="goCarDetail()">车辆详情</view>
  32. <image src="../../static/img/icon_arrow_blue_r@2x.png" mode="" style="width: 12rpx; height: 20rpx"></image>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <!--车辆配置 -->
  38. <view class="mainBox" v-if="restrainShow">
  39. <view class="maintitle">{{caption}}</view>
  40. <view class="mainLine" v-for="(item,index) in restrains" @click="restrainsClick(item)">
  41. <view class="lineName">{{item.combine_cp}}</view>
  42. <image src="../../static/img/jt.png" mode="" class="mainLineJt"></image>
  43. </view>
  44. </view>
  45. <!-- 总组 -->
  46. <view class="mainBox" v-if="groupShow">
  47. <view class="maintitle">{{caption}}</view>
  48. <view class="mainLine" v-for="(item,index) in zlist" @click="goTwo(item)">
  49. <view class="lineName">{{item.caption}}</view>
  50. <image src="../../static/img/jt.png" mode="" class="mainLineJt"></image>
  51. </view>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. export default {
  57. data() {
  58. return {
  59. vin: '',
  60. iStatusBarHeight: '',
  61. restrains:'',
  62. zlist:'',
  63. brand_name:'',
  64. access_time:'',
  65. zzTime:'',
  66. caption:'',
  67. restrainShow:false,
  68. groupShow:false,
  69. param:'',
  70. token:'',
  71. }
  72. },
  73. onLoad(opt) {
  74. this.vin=opt.vin
  75. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  76. this.getData()
  77. },
  78. methods: {
  79. getData(){
  80. uni.showLoading({
  81. title: '加载中'
  82. });
  83. this.$http('advancedEpc/getVinGroupPc', {
  84. vin:this.vin,
  85. }, 'GET').then(res => {
  86. uni.hideLoading();
  87. //console.log(res.data.number);
  88. if(res.data.number==200||res.data.number==5212){
  89. this.brand_name=res.data.result.brand_name;
  90. this.access_time=res.data.result.access_time;
  91. this.caption=res.data.result.caption
  92. if(res.data.result.restrains.length>0){
  93. this.restrains=res.data.result.restrains;
  94. this.restrainShow=true;
  95. }else{
  96. this.zzTime=res.data.result.access_time;
  97. this.zlist=res.data.result.list;
  98. this.restrainShow=false;
  99. this.groupShow=true;
  100. }
  101. }else{
  102. uni.showToast({
  103. title: res.data.message,
  104. icon: 'none',
  105. duration: 3000
  106. });
  107. }
  108. });
  109. },
  110. restrainsClick(item){
  111. this.param=item.param;
  112. this.token=item.token;
  113. this.getcarVinGroup()
  114. },
  115. getcarVinGroup(){
  116. uni.showLoading({
  117. title: '加载中'
  118. });
  119. this.$http('advancedEpc/getVinGroupPc', {
  120. vin:this.vin,
  121. access_time:this.access_time,
  122. param:this.param,
  123. token:this.token
  124. }, 'GET').then(res => {
  125. uni.hideLoading();
  126. //console.log(res.data.number);
  127. if(res.data.number==200||res.data.number==5212){
  128. this.brand_name=res.data.result.brand_name;
  129. this.access_time=res.data.result.access_time;
  130. this.caption=res.data.result.caption
  131. if(res.data.result.restrains.length>0){
  132. this.restrains=res.data.result.restrains;
  133. this.restrainShow=true;
  134. }else{
  135. this.zzTime=res.data.result.access_time;
  136. this.zlist=res.data.result.list;
  137. this.restrainShow=false;
  138. this.groupShow=true;
  139. }
  140. }else{
  141. uni.showToast({
  142. title: res.data.message,
  143. icon: 'none',
  144. duration: 3000
  145. });
  146. }
  147. });
  148. },
  149. goCarDetail(){
  150. uni.navigateTo({
  151. url:'CarDetail'
  152. })
  153. },
  154. goOemSearch(){
  155. uni.navigateTo({
  156. url:'OemSearch'
  157. })
  158. },
  159. goback(){
  160. console.log('返回');
  161. uni.navigateBack({})
  162. },
  163. goTwo(item){
  164. uni.navigateTo({
  165. url:'modelTwo?vin='+this.vin+'&zzTime='+this.zzTime+'&param='+item.param+'&token='+item.token
  166. })
  167. }
  168. }
  169. }
  170. </script>
  171. <style scoped>
  172. .content{
  173. background: #F4F5F7;
  174. min-height: 100vh;
  175. }
  176. .zdyNavBox {
  177. width: 100vw;
  178. background: #FFFFFF;
  179. position: fixed;
  180. top: 0;
  181. left: 0;
  182. z-index: 9999999;
  183. }
  184. .zdyNav {
  185. height: 44px;
  186. display: flex;
  187. justify-content: space-between;
  188. align-items: center;
  189. }
  190. .backImg {
  191. width: 44rpx;
  192. height: 44rpx;
  193. margin-left: 10rpx;
  194. margin-right: 20rpx;
  195. }
  196. .homeImg {
  197. width: 44rpx;
  198. height: 44rpx;
  199. }
  200. .zdyNavLeft {
  201. display: flex;
  202. align-items: center;
  203. }
  204. .zdyNavTitle {
  205. height: 44px;
  206. background: #FFFFFF;
  207. text-align: center;
  208. font-size: 34rpx;
  209. line-height: 44px;
  210. }
  211. .zdyNavRight{
  212. height: 44px;
  213. background: #FFFFFF;
  214. text-align: center;
  215. font-size: 28rpx;
  216. line-height: 44px;
  217. color: #3F90F7;
  218. margin-right: 24rpx;
  219. }
  220. .top{
  221. padding: 20rpx 0;
  222. }
  223. .topCont{
  224. width: 750rpx;
  225. height: 185rpx;
  226. background: #FFFFFF;
  227. }
  228. .carLogo{
  229. width: 72rpx;height: 72rpx;
  230. }
  231. .carTxt{
  232. font-size: 28rpx;
  233. font-family: PingFangSC-Medium, PingFang SC;
  234. font-weight: 500;
  235. color: #333333;
  236. line-height: 36rpx;
  237. width: 606rpx;
  238. }
  239. .carJt{
  240. width: 25rpx;
  241. height: 24rpx;
  242. margin-top: 6rpx;
  243. }
  244. .carBox{
  245. display: flex;
  246. justify-content: space-between;
  247. padding: 30rpx 24rpx 24rpx 24rpx;
  248. }
  249. .vinBox{
  250. display: flex;
  251. justify-content: space-between;
  252. padding-left: 120rpx;
  253. padding-right: 24rpx;
  254. }
  255. .vinBox2{
  256. display: flex;
  257. align-items: center;
  258. }
  259. .detail{
  260. color: #3F90F7;
  261. font-size: 24rpx;
  262. margin-right: 10rpx;
  263. }
  264. .vinB{
  265. background: #F19D01;
  266. width: 60rpx;
  267. height: 30rpx;
  268. text-align: center;
  269. line-height: 30rpx;
  270. color: #FFFFFF;
  271. font-size: 22rpx;
  272. border-radius: 5rpx;
  273. }
  274. .vinNum{
  275. color: #999999;font-size: 24rpx;line-height: 30rpx;padding-left: 10rpx;
  276. }
  277. .mainBox{
  278. background: #FFFFFF;
  279. }
  280. .maintitle{
  281. font-size: 28rpx;
  282. font-family: PingFangSC-Medium, PingFang SC;
  283. font-weight: 500;
  284. color: #333333;
  285. text-align: center;
  286. line-height: 88rpx;
  287. border-bottom: 1px solid #EEEEEE;
  288. }
  289. .mainLineJt{
  290. width: 25rpx;
  291. height: 24rpx;
  292. margin-top: 8rpx;
  293. }
  294. .mainLine{
  295. display: flex;
  296. justify-content: space-between;
  297. border-bottom: 1px solid #EEEEEE;
  298. padding:24rpx;
  299. }
  300. .lineName{
  301. font-size: 28rpx;
  302. font-family: PingFangSC-Regular, PingFang SC;
  303. font-weight: 400;
  304. color: #333333;
  305. line-height: 40rpx;
  306. }
  307. </style>