mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-25 04:52:52 +08:00
[NEW] 银行卡识别
This commit is contained in:
20
src/api/ebiz/questions/index.js
Normal file
20
src/api/ebiz/questions/index.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import request from '@/assets/js/utils/request'
|
||||
import getUrl from '@/assets/js/utils/get-url'
|
||||
|
||||
// 列表
|
||||
export function getQuestionList(data = {}) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: getUrl('/sale/issue/getPrtIssueList', 1),
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 详情
|
||||
export function getQuestionDetail(data = {}) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: getUrl('/sale/issue/getPrtIssueDetail', 1),
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -48,9 +48,9 @@
|
||||
</van-field>
|
||||
</div>
|
||||
<div class="item">
|
||||
<van-field v-model="transfer.back" label-class="labels" readonly label="开户银行" placeholder="请选择">
|
||||
<van-field v-model="transfer.back" @click="getBankListItem" label-class="labels" readonly label="开户银行" placeholder="请选择">
|
||||
<template #button>
|
||||
<van-button size="small" class="button" round color="#e4393c" type="primary">银行卡扫描</van-button>
|
||||
<van-button size="small" class="button" round color="#e4393c" type="primary" @click.stop="getBankInfo(true)">银行卡扫描</van-button>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
@@ -77,10 +77,22 @@
|
||||
</div>
|
||||
<van-button type="primary" block color="#e4393c" class="next" @click="nextSubmit">下一步</van-button>
|
||||
<short-message :show.sync="showMessage" @getMessage="getMessage"></short-message>
|
||||
<van-popup v-model="transfer.show" position="bottom">
|
||||
<ul class="bankList">
|
||||
<li v-for="item in transfer.bankList" :key="item.code" @click="getBankListItem(item)">{{ item.bankName }}</li>
|
||||
</ul>
|
||||
</van-popup>
|
||||
<div :class="{ showDiscern: 1, show: transfer.showDiscern }">
|
||||
<van-icon name="cross" class="icon" />
|
||||
<bank-card-scan class="backContent" :scanShow="true" :clear="transfer.clear" @getScanInfo="getBankInfo"></bank-card-scan>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Uploader, Checkbox, Field, Radio, RadioGroup } from 'vant'
|
||||
import { Uploader, Checkbox, Field, Radio, RadioGroup, Popup, Overlay } from 'vant'
|
||||
import { getBankList } from '@/api/ebiz/sale/sale'
|
||||
import { getQuestionDetail } from '@/api/ebiz/questions'
|
||||
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
|
||||
import ShortMessage from '@/components/ebiz/question/ShortMessage.vue'
|
||||
import shareIcon from '@/assets/images/share@3x.png'
|
||||
export default {
|
||||
@@ -89,9 +101,12 @@ export default {
|
||||
[Uploader.name]: Uploader,
|
||||
[Checkbox.name]: Checkbox,
|
||||
ShortMessage,
|
||||
BankCardScan,
|
||||
[Field.name]: Field,
|
||||
[Radio.name]: Radio,
|
||||
[RadioGroup.name]: RadioGroup
|
||||
[RadioGroup.name]: RadioGroup,
|
||||
[Popup.name]: Popup,
|
||||
[Overlay.name]: Overlay
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -109,36 +124,48 @@ export default {
|
||||
mode: '',
|
||||
back: '',
|
||||
card: '',
|
||||
cardPhoto: []
|
||||
cardPhoto: [],
|
||||
backList: [],
|
||||
show: false, //显示银行列表
|
||||
showDiscern: false, //是否开启银行卡识别
|
||||
clear: false //是否清空银行卡识别数据
|
||||
},
|
||||
checked: false, //勾选协议
|
||||
showMessage: false //显示验证码弹窗
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getBankInfo(data) {
|
||||
// 银行卡识别
|
||||
console.log(1)
|
||||
if (data === true) return (this.transfer.showDiscern = true)
|
||||
console.log(2)
|
||||
},
|
||||
getBankListItem(item) {
|
||||
this.transfer.show = !this.transfer.show
|
||||
this.transfer.bank = item.code
|
||||
},
|
||||
async getBankList() {
|
||||
const rs = await getBankList({
|
||||
operateType: 'bank_type'
|
||||
})
|
||||
console.log(rs)
|
||||
this.transfer.bankList = rs.content
|
||||
},
|
||||
async setTopRightBtn() {
|
||||
console.log('000')
|
||||
// eslint-disable-next-line
|
||||
await EWebBridge.webCallAppInJs('webview_right_button', {
|
||||
btns: [
|
||||
{
|
||||
img: shareIcon,
|
||||
title: '按钮文案'
|
||||
img: shareIcon
|
||||
}
|
||||
]
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
console.log('1.5 1.5 1.5')
|
||||
this.shareConfig()
|
||||
}).catch(() => {})
|
||||
console.log(123123123)
|
||||
},
|
||||
shareConfig() {
|
||||
console.log(11111)
|
||||
window.appCallBack = async data => {
|
||||
console.log(222)
|
||||
if (data === 'right_button_click') {
|
||||
console.log(3333)
|
||||
if (data.trigger === 'right_button_click') {
|
||||
// eslint-disable-next-line
|
||||
await EWebBridge.webCallAppInJs('bridge',{
|
||||
flag: 'share',
|
||||
@@ -168,10 +195,25 @@ export default {
|
||||
nextSubmit() {
|
||||
this.showMessage = true
|
||||
},
|
||||
getMessage() {}
|
||||
getMessage() {},
|
||||
async getQuestionDetail() {
|
||||
if (!this.$route.query.id)
|
||||
// eslint-disable-next-line
|
||||
return EWebBridge.webCallAppInJs('goBack',{
|
||||
refresh: '0',
|
||||
index: '-1'
|
||||
})
|
||||
const rs = await getQuestionDetail({
|
||||
id: this.$route.query.id
|
||||
})
|
||||
console.log(rs)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.setTopRightBtn()
|
||||
this.setTopRightBtn()
|
||||
this.shareConfig()
|
||||
this.getBankList()
|
||||
this.getQuestionDetail()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -183,6 +225,49 @@ export default {
|
||||
background: #fff;
|
||||
padding-bottom: 40px;
|
||||
box-sizing: border-box;
|
||||
.showDiscern {
|
||||
position: fixed;
|
||||
z-index: -1;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: all 0.3s ease 0.3s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #fff;
|
||||
&.show {
|
||||
z-index: 999;
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.icon {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
z-index: 1;
|
||||
}
|
||||
.backContent {
|
||||
height: 60%;
|
||||
background: #fff;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
.bankList {
|
||||
height: 300px;
|
||||
li {
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
font-size: 14px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
}
|
||||
.pdf {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getQuestionList } from '@/api/ebiz/questions'
|
||||
import { Sticky, Search, Swipe, SwipeItem, List } from 'vant'
|
||||
export default {
|
||||
name: 'questionsList',
|
||||
@@ -133,7 +134,12 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
getQueryList() {},
|
||||
async getQueryList(status = ['0']) {
|
||||
const rs = await getQuestionList({
|
||||
status
|
||||
})
|
||||
console.log(rs)
|
||||
},
|
||||
searchCancel() {
|
||||
this.searchValue = ''
|
||||
},
|
||||
@@ -159,6 +165,9 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getQueryList()
|
||||
},
|
||||
mounted() {
|
||||
this.getTabbarElement()
|
||||
document.addEventListener('scroll', this.dropdownLoad)
|
||||
|
||||
Reference in New Issue
Block a user