liangjin
2021-04-09 c0d97faf6b21c033a0a11f0b21083eac9dc1b82e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<!--
 * @Author: 小明丶
 * @Date: 2020-04-09 16:11:01
 * @LastEditors: 小明丶
 * @LastEditTime: 2020-04-09 16:45:30
 * @Description: 
 -->
<!--
 * @Author: 小明丶
 * @Date: 2020-04-03 14:58:33
 * @LastEditors: 小明丶
 * @LastEditTime: 2020-04-08 11:28:40
 * @Description: 选择通道
 -->
<template>
    <div class="tdxz-div">
       <van-nav-bar title="选择通道" left-text="返回" left-arrow @click-left="onClickLeft" fixed style="line-height: 43px;">
            <i class="iconfont iconzuojiantou" slot="left" style="font-size: 25px;"></i>
        </van-nav-bar> 
        <div class="proudct-box">
            <div v-for="(e,i) in list" :key="i" @click="goNext(e)">
                <img :src="e.icon" alt="">
                <p>{{e.zfbVersionName}}</p>   
            </div>
        </div>
        <van-popup v-model="noOpenShow" class="no-open">
            <div class="no-open-img">
                <img src="../../../assets/imgs/openpic.png" alt="">
            </div>
            <p>{{ noOpenText }}</p>
            <van-button type="default" class="no-open-btn" @click="noOpenShow = false" round>确定</van-button>
        </van-popup>
    </div>
</template>
<script>
import Vue from 'vue';
import { NavBar } from 'vant';
    
Vue.use(NavBar);
export default {
    data() {
        return {
            noOpenText: '门店暂未开通此通道', //产品未开通文本内容
            noOpenShow: false, //产品未开通弹窗控制
            list:[],//通道列表
        }
    },
    created(){
        // this.$api.prodZfbVersion().then(res=>{
        //     this.list = res.body
        // })
        this.list = JSON.parse(sessionStorage.getItem('td-mer-photo'))
        console.log(this.list)
    },
    methods:{
        // 返回上一页
        onClickLeft() {
            this.$router.go(-1);
        },
        // 跳转
        goNext(item){
 
            // var id = this.$route.query.typeId,
            //     path = '';
            // if(item.openStatus == 2){
            //     switch (Number(id)) {
            //         case 200008:    
            //             path = '/facepay/calcmoney';
            //             break
            //         case 200002:
            //             path = '/hb-credit-installment';
            //             break
            //         case 200009:
            //             path = '/hbhy-installment';
            //             break
            //         case 200010:
            //             path = '/shtx';
            //             break
            //     }
            // }else{
            //     this.noOpenShow = true
            //     return
            // }
            if(item.hbStatus != 0){
                this.$router.push({
                    path:'/relatedpictures',
                    query:{
                        // typeId: this.$route.query.typeId,
                        // prodId: this.$route.query.prodId,
                        merId:this.$route.query.merId,
                        zfbVersion:item.zfbVersion
                    }
                })
            }
            else{
                this.noOpenShow = true
                return
            }
            
        }
    }
}
</script>
<style lang="less" scoped>
    .tdxz-div{
        min-height: 100vh;
        background: #F5F5F7;
        padding-top: 56px;
        .proudct-box{
            width: 359px;
            margin: auto;
            box-sizing: border-box;
            padding:16px 0;
            // display: flex;
            // justify-items: space-between;
            background: #fff;
            div{
                display: inline-block;
                width: 115px;
                height: 90px;
                box-shadow:0px 0px 15px 0px rgba(66,61,93,0.08);
                border-radius:8px;
                margin: 16px 31px 16px 31px;
                text-align: center;
                box-sizing: border-box;
                padding: 14px 0 18px 0;
                img{
                    width: 42px;
                    height: 42px;
                }
                p{
                    font-size: 13px;
                    color: #333;
                }
            }
        }
        .no-open{
        width: 280px;
        height: 190px;
        text-align: center;
        border-radius: 6px;
        &-img{
            width: 100%;
            margin-top: 13px;
            img{
                width: 75px;
                height: 75px;
            }
        }
        p{
            font-size: 14px;
            color: #666666;
            margin-top: 7px;
        }
        &-btn{
            height: 36px;
            width: 60%;
            margin: 0 20%;
            background: #896EDB;
            color: #fff;
            margin-top: 28px;
            line-height: 36px;
        }
    }
    }
</style>