|
@ -18,7 +18,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="title" v-if="bankInfo.auditStatus=='reject'">{{ i18n.Reasonforrejection }}</view> |
|
|
<view class="title" v-if="bankInfo.auditStatus=='reject'">{{ i18n.Reasonforrejection }}</view> |
|
|
<view class="" style="word-break: break-all;margin-bottom: 20rpx;" v-if="bankInfo.auditStatus=='reject'"> |
|
|
<view class="" style="word-break: break-all;margin-bottom: 20rpx;" |
|
|
|
|
|
v-if="bankInfo.auditStatus=='reject'"> |
|
|
{{bankInfo.auditReason}} |
|
|
{{bankInfo.auditReason}} |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
@ -42,13 +43,14 @@ |
|
|
|
|
|
|
|
|
<view class="title" v-show="bankInfo.auditStatus!='agree'">{{ i18n.IDcard }}</view> |
|
|
<view class="title" v-show="bankInfo.auditStatus!='agree'">{{ i18n.IDcard }}</view> |
|
|
|
|
|
|
|
|
<u-upload v-show="bankInfo.auditStatus!='agree'" :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple |
|
|
<u-upload v-show="bankInfo.auditStatus!='agree'" :fileList="fileList1" @afterRead="afterRead" |
|
|
:maxCount="1"> |
|
|
@delete="deletePic" name="1" multiple :maxCount="1"> |
|
|
|
|
|
|
|
|
<image class="add" src="/static/home/id.png" mode="aspectFit" v-if="!bankInfo.certFrontImgPath"></image> |
|
|
<image class="add" src="/static/home/id.png" mode="aspectFit" |
|
|
|
|
|
v-if="!bankInfo.certFrontImgPath"></image> |
|
|
|
|
|
|
|
|
<image :src="baseURL+bankInfo.certFrontImgPath" |
|
|
<image :src="baseURL+bankInfo.certFrontImgPath" mode="" class="add" |
|
|
mode="" class="add" v-if="bankInfo.certFrontImgPath"></image> |
|
|
v-if="bankInfo.certFrontImgPath"></image> |
|
|
</u-upload> |
|
|
</u-upload> |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -79,6 +81,8 @@ |
|
|
name: "withdrawalRecord", |
|
|
name: "withdrawalRecord", |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
language: '', |
|
|
|
|
|
ticket: '', |
|
|
hideButton: false, |
|
|
hideButton: false, |
|
|
baseURL: '', |
|
|
baseURL: '', |
|
|
fileList1: [], |
|
|
fileList1: [], |
|
@ -120,6 +124,8 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad(option) { |
|
|
onLoad(option) { |
|
|
|
|
|
this.language = uni.getStorageSync("language") || 'en_US'; |
|
|
|
|
|
this.ticket = uni.getStorageSync('ticket') |
|
|
this.getBank() |
|
|
this.getBank() |
|
|
this.baseURL = constant.BASE_URL |
|
|
this.baseURL = constant.BASE_URL |
|
|
}, |
|
|
}, |
|
@ -128,6 +134,7 @@ |
|
|
// 删除图片 |
|
|
// 删除图片 |
|
|
deletePic(event) { |
|
|
deletePic(event) { |
|
|
this[`fileList${event.name}`].splice(event.index, 1) |
|
|
this[`fileList${event.name}`].splice(event.index, 1) |
|
|
|
|
|
this.bankInfo.certFrontImgPath = null; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 新增图片 |
|
|
// 新增图片 |
|
@ -138,7 +145,6 @@ |
|
|
}) |
|
|
}) |
|
|
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式 |
|
|
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式 |
|
|
let lists = [].concat(event.file) |
|
|
let lists = [].concat(event.file) |
|
|
console.log(event) |
|
|
|
|
|
let fileListLen = this[`fileList${event.name}`].length |
|
|
let fileListLen = this[`fileList${event.name}`].length |
|
|
lists.map((item) => { |
|
|
lists.map((item) => { |
|
|
this[`fileList${event.name}`].push({ |
|
|
this[`fileList${event.name}`].push({ |
|
@ -160,70 +166,31 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
uploadFilePromise(url) { |
|
|
uploadFilePromise(url) { |
|
|
// #ifdef APP-PLUS |
|
|
|
|
|
console.log(url) |
|
|
console.log(url) |
|
|
pathToBase64(url) |
|
|
|
|
|
.then(path => { |
|
|
|
|
|
console.log(path) |
|
|
|
|
|
let res=path |
|
|
|
|
|
res = res.split(',')[1] |
|
|
|
|
|
console.log(res,'res') |
|
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
return new Promise((resolve, reject) => { |
|
|
api.uploadImg({ |
|
|
let a = uni.uploadFile({ |
|
|
img: res |
|
|
url: this.baseURL + '/api/user/uploadImg1', // 仅为示例,非真实的接口地址 |
|
|
}).then(res => { |
|
|
filePath: url, |
|
|
|
|
|
name: 'file', |
|
|
|
|
|
formData: { |
|
|
|
|
|
ticket: this.ticket, |
|
|
|
|
|
lang: this.language, |
|
|
|
|
|
}, |
|
|
|
|
|
success: (res) => { |
|
|
|
|
|
setTimeout(() => { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.bankInfo.certFrontImgPath=res |
|
|
let data = JSON.parse(res.data) |
|
|
}) |
|
|
this.bankInfo.certFrontImgPath = data.data |
|
|
}) |
|
|
}, 1000) |
|
|
}) |
|
|
}, |
|
|
.catch(error => { |
|
|
failed(res) { |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
console.error(error) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// #endif |
|
|
|
|
|
// #ifdef H5 |
|
|
|
|
|
const image = new Image() // 新建一个img标签(还没嵌入DOM节点) |
|
|
|
|
|
//blob:http://localhost:8080/b878edea-e649-4f8d-b723-c3f25454141b |
|
|
|
|
|
image.src = url; |
|
|
|
|
|
image.onload = () => { |
|
|
|
|
|
const canvas = document.createElement('canvas') |
|
|
|
|
|
canvas.width = image.width |
|
|
|
|
|
canvas.height = image.height |
|
|
|
|
|
const context = canvas.getContext('2d') |
|
|
|
|
|
context.drawImage(image, 0, 0, image.width, image.height); |
|
|
|
|
|
let imgUrl = canvas.toDataURL() //图片的base64地址 |
|
|
|
|
|
imgUrl = imgUrl.split(',')[1] |
|
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
|
api.uploadImg({ |
|
|
|
|
|
img: imgUrl |
|
|
|
|
|
}).then(res => { |
|
|
|
|
|
this.bankInfo.certFrontImgPath=res |
|
|
|
|
|
console.log(res) |
|
|
console.log(res) |
|
|
console.log(this.bankInfo.certFrontImgPath) |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
// #endif |
|
|
}); |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getBase64(file) { |
|
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
|
const reader = new FileReader() |
|
|
|
|
|
reader.readAsDataURL(file) |
|
|
|
|
|
reader.onload = () => resolve(reader.result) |
|
|
|
|
|
reader.onerror = (error) => reject(error) |
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取实名信息 |
|
|
// 获取实名信息 |
|
|
getBank() { |
|
|
getBank() { |
|
|
api.certificationInfo().then(res => { |
|
|
api.certificationInfo().then(res => { |
|
@ -261,12 +228,13 @@ |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
|
/deep/ .uicon-camera-fill { |
|
|
/deep/ .uicon-camera-fill { |
|
|
display: none !important; |
|
|
display: none !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/deep/ .u-upload { |
|
|
/deep/ .u-upload { |
|
|
position: relative; |
|
|
position: relative; |
|
|
|
|
|
|
|
|
.add { |
|
|
.add { |
|
|
width: 620rpx !important; |
|
|
width: 620rpx !important; |
|
|
height: 360rpx !important; |
|
|
height: 360rpx !important; |
|
|