<!--
|
* @Author: 小明丶
|
* @Date: 2020-04-07 09:40:03
|
* @LastEditors: 小明丶
|
* @LastEditTime: 2020-06-28 11:21:56
|
* @Description: 产品管理花呗业务页面
|
-->
|
<template>
|
<div class="hb-product-box">
|
<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="info-box">
|
<div class="info" v-for="(item,i) in productList" :key="i" @click="goNext(item)">
|
<img :src="item.icon" alt="">
|
<p>{{item.typeName}}</p>
|
</div>
|
</div>
|
</div>
|
</template>
|
<script>
|
import Vue from 'vue';
|
import { NavBar } from 'vant';
|
|
Vue.use(NavBar);
|
export default {
|
data() {
|
return {
|
productList:[],
|
openStatus:'',
|
}
|
},
|
created(){
|
|
if(this.$route.query.openStatus || this.$route.query.openStatus==0){
|
window.sessionStorage.openStatus = this.$route.query.openStatus
|
}
|
|
this.$api.prodHbProd().then(res=>{
|
this.productList = res.body
|
})
|
},
|
methods:{
|
onClickLeft() {
|
this.$router.push('/main/productManagement');
|
},
|
goNext(item){
|
var path = '',
|
title = '';
|
|
var {typeId,prodId} = item
|
var query = {
|
typeId,
|
prodId,
|
zfbVersion:this.$route.query.zfbVersion,
|
};
|
|
if(typeId==='200010'){
|
switch(Number(window.sessionStorage.openStatus)){
|
case 0:
|
path = '/huabei/open';
|
break;
|
case 1:
|
case 3:
|
path = '/huabei/open-result';
|
break;
|
case 2:
|
path = '/shtx/staging';
|
break;
|
default:
|
path = '/huabei/open';
|
break;
|
}
|
title = '商户贴息'
|
}
|
if(typeId==='200009'){
|
switch (Number(window.sessionStorage.openStatus)) {
|
case 0:
|
path = '/huabei/open';
|
break;
|
case 1:
|
case 3:
|
path = '/huabei/open-result';
|
break;
|
case 2:
|
path = '/huabei/staging';
|
break;
|
default:
|
path = '/huabei/open';
|
break;
|
}
|
title = '商品消费'
|
}
|
if (typeId === '200002' || typeId === '200008') {
|
switch (Number(window.sessionStorage.openStatus)) {
|
case 0:
|
path = '/huabei/open';
|
break;
|
case 1:
|
case 3:
|
path = '/huabei/open-result';
|
break;
|
case 2:
|
if(typeId=='200008'){
|
path = '/huabei/staging_dmf';
|
}else{
|
path = '/huabei/staging';
|
}
|
break;
|
default:
|
path = '/huabei/open';
|
break;
|
}
|
if(typeId==='200002'){
|
title = '用户付息';
|
}else{
|
title = '商户收款';
|
}
|
}
|
this.$router.push({
|
path:path,
|
query:{
|
title:title,
|
...query
|
}
|
})
|
}
|
},
|
}
|
</script>
|
<style lang="less" scoped>
|
.hb-product-box{
|
background: #F5F5F7;
|
min-height: 100vh;
|
padding-top: 56px;
|
.info-box{
|
background: #fff;
|
width: 96%;
|
margin-left: 2%;
|
padding-bottom: 23px;
|
border-radius:3px;
|
.info{
|
text-align: center;
|
width: 49%;
|
display: inline-block;
|
margin-top: 23px;
|
img{
|
width: 36px;
|
height: 36px;
|
}
|
}
|
}
|
}
|
</style>
|