Commit 588b69f4 authored by 786817560's avatar 786817560

'bank'

parents 1ad4d0b4 7bd04006
......@@ -2,11 +2,10 @@
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-09-24 21:29:35
* @LastEditTime: 2019-09-25 20:08:44
* @LastEditTime: 2019-09-26 17:41:15
* @LastEditors: Please set LastEditors
-->
<template>
<div>
<div id="bank-card">
<div class="info">
<div class="info-icon">
......@@ -21,7 +20,7 @@
<img src="@/assets/userBind/bankIcon.png" class="icon" >
<span class="top-word">
我的卡
<span class="sum">(共4张)</span>
<span class="sum">(共{{ getBankList.length }}张)</span>
</span>
</div>
<img src="@/assets/userBind/add.png" class="icon-right" @click="sendFlag" >
......@@ -29,7 +28,7 @@
<div class="clear" />
<div class="card-content">
<ul>
<li v-for="(item,index) in bankList" :key="index">
<li v-for="(item,index) in getBankList" :key="index">
<item-option class="slider">
<div
:style="'background-image: url('+ changeBgImg (item) +')'"
......@@ -51,39 +50,21 @@
</div>
</div>
</div>
</div>
</template>
<script>
import backImg1 from '@/assets/userBind/nong.png'
import backImg2 from '@/assets/userBind/unNong.png'
export default {
props: {
bp_id: {
type: String,
default: '',
'getBankList': {
default: [],
type: Array,
},
},
data () {
return {
backImg: null,
showModalValue: true,
bankList: [
{
bank_account_num: '1231123112311231',
bank_full_name: '中国农业银行',
bank_card_type: '信用卡',
},
{
bank_account_num: '2345763456980965',
bank_full_name: '中国建设银行',
bank_card_type: '储蓄卡',
},
{
bank_account_num: '2345763456980965',
bank_full_name: '中国建设银行',
bank_card_type: '储蓄卡',
},
],
}
},
methods: {
......@@ -103,24 +84,25 @@ export default {
return num.substring(num.length - 4)
},
deleteFun (e) {
console.log(this.bp_id)
let url = $config.basePath + 'bp_bank_delete'
let index = this.getBankList.findIndex(item => {
if (item.bank_account_num === e) {
return true
}
})
this.getBankList.splice(index, 1)
let vm = this
let url = process.env.basePath + 'bp_bank_delete'
let param = {
'master': {
'bp_id': this.bp_id,
'bp_id': window.localStorage.user_id,
'bank_account_num': e,
},
}
let vm = this
this.hlsHttp.post(url, param).then(function (res) {
console.log('银行卡删除', res)
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
let index = vm.bankList.findIndex(item => {
if (item.bank_account_num === e) {
return true
}
})
vm.bankList.splice(index, 1)
console.log(res)
}
})
},
......@@ -128,7 +110,7 @@ export default {
}
</script>
<style lang="less" scoped>
#bank-card {
#bank-card {
.info {
height: 70px;
background-color: rgba(142, 195, 30, 0.1);
......@@ -261,5 +243,5 @@ export default {
no-repeat;
background-size: 20px 20px;
}
}
}
</style>
......@@ -2,7 +2,7 @@
* @Description: In User Settings Edit
* @Author: your name
* @Date: 2019-09-19 09:31:19
* @LastEditTime: 2019-09-26 14:00:48
* @LastEditTime: 2019-09-26 17:28:42
* @LastEditors: Please set LastEditors
-->
<template>
......@@ -491,6 +491,8 @@ export default {
if (res.result === 'S') {
vm.hlsPopup.hideLoading()
vm.hlsPopup.showSuccess('保存成功')
window.localStorage.setItem('user_id', res.bp_id)
window.sessionStorage.setItem('user_id', res.bp_id)
vm.bp_id = res.bp_id
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment