liangjin
2021-03-30 6644b5af8235790eb5fd4c4265ce99aa90b134f1
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
<!--
 * @Author: 小明丶
 * @Date: 2020-12-29 09:54:37
 * @LastEditors: 小明丶
 * @LastEditTime: 2021-01-05 14:28:29
 * @Description: 
-->
<template>
  <div class="zfb-detail">
    <van-nav-bar
      left-arrow
      left-text="返回"
      @click-left="onClickLeft"
    >
      <div slot="title">
          <h4>{{$route.query.title}}</h4>
      </div>
    </van-nav-bar>
    <div class="info-box-bottom">
      <div class="rate-title">用户付息</div>
      <div class="item">
        <span>期数</span>
        <span>支付费率</span>
        <span>分期利率</span>
      </div>
      <div class="item" v-for="item in list" :key="item.trem">
        <span>{{item.termName}}</span>
        <span>{{$route.query.zfbVersion == 6?'0.38%':'0%'}}</span>
        <span>{{item.rate}}%</span>
      </div>
    </div>
    <div class="info-box-bottom">
      <div class="rate-title">商户贴息</div>
      <div class="item">
        <span>期数</span>
        <span>支付费率</span>
        <span>分期利率</span>
      </div>
      <div class="item" v-for="item in list2" :key="item.trem">
        <span>{{item.termName}}</span>
        <span>{{$route.query.zfbVersion == 6?'0.38%':'0%'}}</span>
        <span>{{item.rate}}%</span>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
        list:[],
        list2:[]
    };
  },
  computed:{
      typeName(){
          return this.$route.query.typeName
      },
      zfbVersion(){
        return Number(this.$route.query.zfbVersion)
      },
      prodId(){
        return Number(this.$route.query.prodId)
      }
  },
  created() {
    this.$api.merPayInfo({
      zfbVersion:this.zfbVersion,
      prodId:this.prodId
    }).then(res=>{
      this.list = res.body.prodBaseTermInfVo || []
    })
    this.$api.merPayInfo({
      zfbVersion:this.zfbVersion,
      prodId:30000010
    }).then(res=>{
      this.list2 = res.body.prodBaseTermInfVo || []
    })
  },
  methods:{
    onClickLeft(){
        this.$router.go(-1)
    },
  }
};
</script>
<style lang="less" scoped>
.zfb-detail {
  & {
    min-height: 100vh;
    background: #fafafa;
  }
  .info-box-bottom {
    margin-top: 20px;
    box-sizing: border-box;
    padding: 0 17px 20px 17px;
    position: relative;
    background-color: #fff;
    .left-cr {
      position: absolute;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: #f5f5f7;
      top: -7px;
      left: -7px;
    }
    .right-cr {
      position: absolute;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: #f5f5f7;
      top: -7px;
      right: -7px;
    }
    .rate-title {
      padding: 20px 0 0 0;
      font-size: 14px;
      color: #999999;
      font-weight: normal;
      line-height: 1.6;
    }
  }
 
  .item {
    width: 100%;
    margin-top: 5px;
    padding: 0 10px;
    box-sizing: border-box;
    display: inline-block;
    background: rgba(249, 247, 252, 1);
    height: 40px;
    line-height: 40px;
    display: flex;
    justify-content: space-around;
    span {
      text-align: center;
      display: inline-block;
    }
    span:nth-child(1) {
      width: 15%;
    }
    span:nth-child(2) {
      width: 40%;
    }
    span:nth-child(3) {
      width: 45%;
    }
  }
}
</style>