暂存代码
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
添加银行卡
|
||||
</view>
|
||||
</view>
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -36,23 +37,42 @@
|
||||
import { getBankList,bindBank,unbind } from '@/api/bank.js';
|
||||
import { encipherBankNumber } from '@/utils/index.js';
|
||||
import Header from '@/components/header.vue';
|
||||
import { getUserInfo } from '@/api/auth.js'
|
||||
|
||||
export default {
|
||||
components:{Header},
|
||||
data() {
|
||||
return {
|
||||
bankList:[],
|
||||
currentUserData:{},
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getBankList();
|
||||
this.getUserInfo();
|
||||
},
|
||||
methods: {
|
||||
encipherBankNumber,
|
||||
jumpAddBank(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine_bank_add/mine_bank_add',
|
||||
})
|
||||
const currentUserData = this.currentUserData;
|
||||
if(currentUserData && Object.keys(currentUserData).length !==0 && currentUserData.certStatus && currentUserData.certStatus !== 0){
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine_bank_add/mine_bank_add',
|
||||
})
|
||||
}else{
|
||||
this.$refs.uToastRef.show({
|
||||
type: 'error',
|
||||
message: "还未进行实名认证,认证完才能绑定银行卡信息",
|
||||
});
|
||||
}
|
||||
},
|
||||
// 查询用户等级
|
||||
async getUserInfo(){
|
||||
const result = await getUserInfo();
|
||||
if(result && result.bizcode === 100){
|
||||
const data = result.data;
|
||||
this.currentUserData = result.data || {};
|
||||
}
|
||||
},
|
||||
async getBankList(){
|
||||
const resp = await getBankList();
|
||||
|
||||
Reference in New Issue
Block a user