epcSimpleDetailTwo.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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. <div @click="goback" class="uni-page-head-btn"><i class="uni-btn-icon"
  9. style="color: rgb(0, 0, 0); font-size: 27px;"></i></div>
  10. </view>
  11. <view class="xx" style="position: absolute;left:100rpx;color: black;font-size: 23px;" @click="goToSelectCarModel">X</view>
  12. <view class="zdyNavTitle">{{title}}</view>
  13. <view v-if="param.length != 0" class="zdyNavRight"></view>
  14. <view v-else style="width: 120rpx;"></view>
  15. </view>
  16. </view>
  17. <view class="show" v-for="parent in chlilds" >
  18. <view class="show-title">
  19. {{parent.title}}
  20. </view>
  21. <view class="show-images">
  22. <view class="show-images-item" v-for="(item,index) in parent.children" @click="toVinDetail(item,index)">
  23. <view class="item-box">
  24. <view class="item-image">
  25. <image :src="item.image" mode="aspectFit" style="width: 150rpx;height: 150rpx;"></image>
  26. </view>
  27. <view class="item-title">
  28. {{item.title}}
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. data() {
  39. return {
  40. title:"",
  41. chlilds:[],
  42. childrenList:[],
  43. token:'',
  44. param:'',
  45. access_time:'',
  46. epc_id:'',
  47. brand_id:"",
  48. brand_name:"",
  49. caption:'',
  50. }
  51. },
  52. onLoad(opt){
  53. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  54. this.title = opt.title;
  55. this.token = opt.token;
  56. this.param = opt.param;
  57. this.access_time = opt.access_time;
  58. this.epc_id = opt.epc_id;
  59. this.brand_id = opt.brand_id;
  60. this.brand_name = opt.brand_name;
  61. this.caption = opt.caption;
  62. //获取缓存对象 epcChildrenTwo
  63. this.chlilds = uni.getStorageSync('epcChildrenTwo');
  64. uni.removeStorageSync('epcChildrenTwo');
  65. },
  66. methods: {
  67. goback() {
  68. uni.navigateTo({
  69. url: 'epcSimpleDetailOne?type=2&token='+this.token+'&param='+this.param+'&access_time='+this.access_time
  70. +'&epc_id='+this.epc_id+'&brand_id='+this.brand_id+"&brand_name="+this.brand_name
  71. })
  72. },
  73. //返回选品牌
  74. goToSelectCarModel(){
  75. uni.navigateTo({url:'SelectCarModel'});
  76. },
  77. toVinDetail(item,index){
  78. uni.showLoading({
  79. title: '加载中'
  80. });
  81. this.goThree(item);
  82. },
  83. goThree(item) {
  84. var that = this;
  85. uni.navigateTo({
  86. url: 'SimpleOemSearch?brand=' + that.brand + '&token=' + that.token + '&param=' +
  87. that.param + '&access_time=' + that.access_time + '&title=' + item.title+'&epc_id='+that.epc_id+"&brand_name="+this.brand_name
  88. +"&caption="+this.caption
  89. })
  90. // uni.setStorage({
  91. // key: 'childrenList',
  92. // data: that.childrenList,
  93. // success: function() {
  94. // uni.navigateTo({
  95. // url: 'SimpleOemSearch.vue?brand=' + that.brand + '&token=' + that.token + '&param=' +
  96. // that.param + '&access_time=' + that.access_time + '&title=' + index+'&epc_id='+that.epc_id
  97. // })
  98. // }
  99. // });
  100. }
  101. }
  102. }
  103. </script>
  104. <style>
  105. .zdyNavBox {
  106. width: 100vw;
  107. background: #FFFFFF;
  108. position: fixed;
  109. top: 0;
  110. left: 0;
  111. z-index: 9999999;
  112. }
  113. .zdyNav {
  114. display: flex;
  115. justify-content: space-between;
  116. align-items: center;
  117. padding: 14rpx 6rpx;
  118. }
  119. .zdyNavLeft {
  120. width: 120rpx;
  121. }
  122. .zdyNavTitle {
  123. background: #FFFFFF;
  124. text-align: center;
  125. font-size: 32rpx;
  126. font-weight: bold;
  127. }
  128. .zdyNavRight {
  129. background: #FFFFFF;
  130. text-align: center;
  131. font-size: 28rpx;
  132. color: #3F90F7;
  133. width: 120rpx;
  134. }
  135. .content{
  136. background: #F0F0F0;
  137. }
  138. .show{
  139. display: flex;
  140. flex-direction: column;
  141. width: 750rpx;
  142. padding-left: 10rpx;
  143. background: #FFFFFF;
  144. margin-bottom: 20rpx;
  145. }
  146. .show-title{
  147. margin-bottom: 10rpx;
  148. border-left: 10rpx solid #3F90F7;
  149. padding-left: 20rpx;
  150. margin: 20rpx 0;
  151. }
  152. .show-images{
  153. display: grid;
  154. grid-template-columns: repeat(4,1fr);
  155. }
  156. .show-images-item{
  157. }
  158. .item-box{
  159. }
  160. .item-image{
  161. justify-content: center;
  162. border-radius: 10rpx;
  163. border: 1rpx solid #999999;
  164. padding: 5rpx;
  165. margin: 10rpx 5rpx 10rpx 5rpx;
  166. width: 150rpx;
  167. display: flex;
  168. }
  169. .item-title{
  170. text-align: center;
  171. }
  172. </style>