You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

136 lines
3.1 KiB
Vue

4 years ago
<template>
<div class="boundbankcard-container">
<div class="contenttitle">
<span>绑定银行卡</span>
</div>
<div class="contentbody">
<ul v-if="userbanklist.length > 0">
<li v-for="(item, index) in userbanklist" :key="index">
<div class="logo">
<img
src="http://matripe.oss-cn-beijing.aliyuncs.com/bankCard.png"
alt=""
/>
</div>
<div class="bankname">{{ item.bankName }} 借记卡</div>
<div class="bankcode">
<span>{{ item.newbankNo }}</span>
</div>
</li>
</ul>
4 years ago
<div style="text-align: center">
<div>
<a-spin tip="加载中..." :spinning="isspinning"> </a-spin>
<img :src="qrcodeurl" alt="" v-if="!isspinning" />
</div>
<div style="margin-top: 10px">微信扫一扫</div>
</div>
4 years ago
</div>
</div>
</template>
<script>
4 years ago
import { getUserWxApi } from "../../../../api/userinfo";
4 years ago
export default {
// 组件名称
name: "",
// 局部注册的组件
components: {},
// 组件参数 接收来自父组件的数据
props: {
userbanklist: {
require: true,
type: Array,
},
},
// 组件状态值
data() {
4 years ago
return {
isspinning: true,
};
4 years ago
},
// 计算属性
computed: {},
// 侦听器
watch: {},
// 生命周期钩子 注:没用到的钩子请自行删除
/**
* 组件实例创建完成属性已绑定但DOM还未生成$ el属性还不存在
*/
4 years ago
created() {
this.getUserWx();
},
4 years ago
/**
* el 被新创建的 vm.el 替换并挂载到实例上去之后调用该钩子
* 如果 root 实例挂载了一个文档内元素 mounted 被调用时 vm.el 也在文档内
*/
mounted() {},
// 组件方法
4 years ago
methods: {
async getUserWx() {
try {
this.isspinning = true;
const { data } = await getUserWxApi();
console.log(data);
if (data.status === 200) {
this.qrcodeurl = data.data;
}
} catch (error) {
console.log(error);
}
this.isspinning = false;
},
},
4 years ago
};
</script>
<style scoped lang="less">
.boundbankcard-container {
.contentbody {
4 years ago
text-align: center;
img {
width: 150px;
height: 150px;
}
4 years ago
ul {
padding-bottom: 16px;
border-bottom: 1px solid #f9f9f9;
li {
width: 790px;
height: 76px;
display: flex;
justify-content: left;
align-items: center;
background: #fff1e7;
1 year ago
border: 1px solid #1890ff;
4 years ago
border-radius: 8px;
.logo {
width: 32px;
height: 32px;
margin-left: 60px;
img {
width: 100%;
height: 100%;
}
}
.bankname {
font-size: 18px;
margin-left: 16px;
min-width: 250px;
color: #4d575e;
}
.bankcode {
font-size: 30px;
line-height: 36px;
color: #a2a2a2;
span {
color: #4d575e;
}
}
}
}
}
}
</style>