123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339 |
- <template>
- <view class="content">
-
- <!-- 自定义导航 -->
- <view class="zdyNavBox">
- <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
- <view class="zdyNav">
- <view class="zdyNavLeft">
- <image src="../../static/img/nav_icon_back.png" mode="aspectFit" class="backImg" @click="goback">
- </image>
-
- </view>
- <view class="zdyNavTitle">车型件</view>
- <view v-if="carPeizhi.length != 0" class="zdyNavRight" @click="goOemSearch()">OEM搜索</view>
- <view v-else style="width: 50rpx;"></view>
- </view>
- </view>
- <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
- <view style="height: 44px;"></view>
-
-
- <view class="top">
- <view class="topCont">
- <view class="carBox">
- <image src="../../static/img/nocar.png" mode="" class="carLogo"></image>
- <view class="carTxt">{{brand_name}}</view>
- <!-- <image src="../../static/img/jt.png" mode="" class="carJt"></image> -->
- </view>
- <view class="vinBox">
- <view class="vinBox2">
- <view class="vinB">VIN</view>
- <view class="vinNum">{{vin}}</view>
- </view>
- <!-- <view v-if="carPeizhi.length != 0" class="vinBox2">
- <view class="detail" @click="goCarDetail()">车型详情</view>
- <image src="../../static/img/icon_arrow_blue_r@2x.png" mode="" style="width: 24rpx; height: 24rpx"></image>
- </view> -->
- </view>
- </view>
- </view>
- <!--车辆配置 -->
- <view class="mainBox" v-if="restrainShow">
- <view class="maintitle">{{caption}}</view>
- <view class="mainLine" v-for="(item,index) in restrains" @click="restrainsClick(item)">
- <view class="lineName">{{item.combine_cp}}</view>
- <image src="../../static/img/jt.png" mode="" class="mainLineJt"></image>
- </view>
- </view>
- <!-- 总组 -->
- <view class="mainBox" v-if="groupShow">
- <view class="maintitle">{{caption}}</view>
- <view class="mainLine" v-for="(item,index) in zlist" @click="goTwo(item)">
- <view class="lineName">{{item.caption}}</view>
- <image src="../../static/img/jt.png" mode="" class="mainLineJt"></image>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- vin: '',
- iStatusBarHeight: '',
- restrains:'',
- zlist:'',
- brand_name:'',
- access_time:'',
- zzTime:'',
- caption:'',
- restrainShow:false,
- groupShow:false,
- param:'',
- token:'',
- epc_id:'',
- carPeizhi:''
- }
- },
- onLoad(opt) {
- this.vin=opt.vin
- this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
- this.getData()
- },
- methods: {
- getData(){
- uni.showLoading({
- title: '加载中'
- });
- this.$http('advancedEpc/getVinGroup', {
- vin:this.vin,
-
- }, 'GET').then(res => {
- uni.hideLoading();
- //console.log(res.data.number);
- if(res.data.number==200||res.data.number==5212){
- this.brand_name=res.data.result.brand_name;
- this.access_time=res.data.result.access_time;
- this.caption=res.data.result.caption
- this.epc_id = res.data.result.epc_id;
- if(res.data.result.restrains.length>0){
- this.restrains=res.data.result.restrains;
- this.restrainShow=true;
- }else{
- this.zzTime=res.data.result.access_time;
- this.zlist=res.data.result.list;
- this.restrainShow=false;
- this.groupShow=true;
- }
- }else{
-
- uni.showToast({
- title: res.data.message,
- icon: 'none',
- duration: 3000
- });
- }
-
- });
- },
- restrainsClick(item){
- this.param=item.param;
- this.token=item.token;
- this.carPeizhi = item.combine_cp;
- this.getcarVinGroup()
- },
- getcarVinGroup(){
- uni.showLoading({
- title: '加载中'
- });
- this.$http('advancedEpc/getVinGroup', {
- vin:this.vin,
- access_time:this.access_time,
- param:this.param,
- token:this.token
- }, 'GET').then(res => {
- uni.hideLoading();
- //console.log(res.data.number);
- if(res.data.number==200||res.data.number==5212){
- this.brand_name=res.data.result.brand_name;
- this.access_time=res.data.result.access_time;
- this.caption=res.data.result.caption
- if(res.data.result.restrains.length>0){
- this.restrains=res.data.result.restrains;
- this.restrainShow=true;
- }else{
- this.zzTime=res.data.result.access_time;
- this.zlist=res.data.result.list;
- this.restrainShow=false;
- this.groupShow=true;
- }
- }else{
- uni.showToast({
- title: res.data.message,
- icon: 'none',
- duration: 3000
- });
- }
-
- });
- },
- goCarDetail(){
- uni.navigateTo({
- url:'CarDetail'
- })
- },
- goOemSearch(){
- uni.navigateTo({
- url:'OemSearch?brand='+ this.brand_name + '&epc_id=' + this.epc_id
- })
- },
- goback(){
- console.log('返回');
- uni.navigateBack({})
- },
- goTwo(item){
- uni.navigateTo({
- url:'modelTwo?vin='+this.vin+'&zzTime='+this.zzTime+'¶m='+item.param+'&token='+item.token
- })
- }
- }
- }
- </script>
- <style scoped>
- .content{
- background: #F4F5F7;
- min-height: 100vh;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- }
- .zdyNavBox {
- width: 100vw;
- background: #FFFFFF;
- position: fixed;
- top: 0;
- left: 0;
- z-index: 9999999;
-
-
- }
-
- .zdyNav {
- height: 44px;
- display: flex;
- justify-content: space-between;
-
- align-items: center;
-
- }
-
- .backImg {
- width: 44rpx;
- height: 44rpx;
- margin-left: 10rpx;
- margin-right: 20rpx;
- }
-
- .homeImg {
- width: 44rpx;
- height: 44rpx;
-
- }
-
- .zdyNavLeft {
- display: flex;
- align-items: center;
- }
-
- .zdyNavTitle {
-
- height: 44px;
- background: #FFFFFF;
- text-align: center;
- font-size: 34rpx;
- line-height: 44px;
- }
- .zdyNavRight{
- height: 44px;
- background: #FFFFFF;
- text-align: center;
- font-size: 28rpx;
- line-height: 44px;
- color: #3F90F7;
- margin-right: 24rpx;
- }
-
-
-
-
- .top{
- padding: 20rpx 0;
- }
- .topCont{
- width: 750rpx;
- height: 185rpx;
- background: #FFFFFF;
- }
- .carLogo{
- width: 72rpx;height: 72rpx;
- }
- .carTxt{
- font-size: 28rpx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 36rpx;
- width: 606rpx;
- }
- .carJt{
- width: 25rpx;
- height: 24rpx;
- margin-top: 6rpx;
- }
- .carBox{
- display: flex;
- justify-content: space-between;
- padding: 30rpx 24rpx 24rpx 24rpx;
- }
- .vinBox{
- display: flex;
- justify-content: space-between;
- padding-left: 120rpx;
- padding-right: 24rpx;
- }
- .vinBox2{
- display: flex;
- align-items: center;
- }
- .detail{
- color: #3F90F7;
- font-size: 24rpx;
- margin-right: 10rpx;
- }
- .vinB{
- background: #F19D01;
- width: 60rpx;
- height: 30rpx;
- text-align: center;
- line-height: 30rpx;
- color: #FFFFFF;
- font-size: 22rpx;
- border-radius: 5rpx;
- }
- .vinNum{
- color: #999999;font-size: 24rpx;line-height: 30rpx;padding-left: 10rpx;
- }
- .mainBox{
- background: #FFFFFF;
- }
- .maintitle{
- font-size: 28rpx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #333333;
- text-align: center;
- line-height: 88rpx;
- border-bottom: 1px solid #EEEEEE;
- }
- .mainLineJt{
- width: 25rpx;
- height: 24rpx;
- margin-top: 8rpx;
- }
- .mainLine{
- display: flex;
- justify-content: space-between;
- border-bottom: 1px solid #EEEEEE;
- padding:24rpx;
- }
- .lineName{
- font-size: 28rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 40rpx;
- }
- </style>
|