|
|
|
@ -3,7 +3,7 @@ |
|
|
|
<view class="head"> |
|
|
|
<view> |
|
|
|
<uni-group mode="card"> |
|
|
|
<uni-icons custom-prefix="iconfont" type="icon-dengpao" :color="iconColor" size="20"></uni-icons><text class="textstyle text-white">小贴士:</text><br/> |
|
|
|
<uni-icons custom-prefix="iconfont" type="icon-dengpao" :color="primaryColor" size="20"></uni-icons><text class="textstyle text-white">小贴士:</text><br/> |
|
|
|
<text class="textstyle">1. 为了您的资金安全及合规,体现将通过第三方支付提供安全通道实现。</text><br/> |
|
|
|
<text class="textstyle">2. 应银行监管要求,每人每月限额10万元,最多绑定4个收款账户。</text><br/> |
|
|
|
<text class="textstyle">3. 一旦提现成功,设置的收款账户不可更改。</text> |
|
|
|
@ -22,19 +22,33 @@ |
|
|
|
:clearable="false" |
|
|
|
:inputBorder="false" /> |
|
|
|
</uni-forms-item> |
|
|
|
<uni-forms-item label="支付宝账号" required name="accountNo"> |
|
|
|
<uni-forms-item label="请选择" required> |
|
|
|
<uni-data-checkbox v-model="type" |
|
|
|
:localdata="typeList" |
|
|
|
:selectedColor="primaryColor" |
|
|
|
:selectedTextColor="'#FFFFFF'"> |
|
|
|
</uni-data-checkbox> |
|
|
|
</uni-forms-item> |
|
|
|
<uni-forms-item v-if="type === 2" label="支付宝账号" required name="accountNo"> |
|
|
|
<uni-easyinput v-model="accountInfo.accountNo" placeholder="请输入支付宝账号" |
|
|
|
:clearable="false" |
|
|
|
:inputBorder="false" /> |
|
|
|
</uni-forms-item> |
|
|
|
<uni-forms-item v-if="type === 0" label="微信账号" required name="accountNo"> |
|
|
|
<uni-easyinput v-model="accountInfo.accountNo" placeholder="请输入微信账号" |
|
|
|
:clearable="false" |
|
|
|
:inputBorder="false" /> |
|
|
|
</uni-forms-item> |
|
|
|
<uni-forms-item label="微信收款码" required name="imgUrl"> |
|
|
|
<uni-file-picker limit="1" file-mediatype="image" title="请上传微信收款码!" file-extname="png,jpg,jpeg" |
|
|
|
@select="selectImage" @delete="deleteImg"> |
|
|
|
</uni-file-picker> |
|
|
|
</uni-forms-item> |
|
|
|
<uni-forms-item label="预留电话" required name="phone"> |
|
|
|
<uni-easyinput v-model="accountInfo.phone" placeholder="请输入预留电话" |
|
|
|
:clearable="false" |
|
|
|
:inputBorder="false" /> |
|
|
|
</uni-forms-item> |
|
|
|
<!-- <uni-forms-item label="请选择" required> |
|
|
|
|
|
|
|
</uni-forms-item> --> |
|
|
|
</uni-forms> |
|
|
|
</uni-group> |
|
|
|
</view> |
|
|
|
@ -57,20 +71,31 @@ |
|
|
|
getAccount,addCreatorAccount, |
|
|
|
checkAccountExist,checkAccountUpToFour |
|
|
|
} from '@/api/userInfo.js' |
|
|
|
import {type} from "../../uni_modules/uni-forms/components/uni-forms/utils"; |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
iconColor: '#0b6375', |
|
|
|
primaryColor: '#0b6375', |
|
|
|
userInfo: {}, |
|
|
|
existFlag: false, |
|
|
|
upToFourFlag: false, |
|
|
|
noClick:true, //防止重复提交 |
|
|
|
fileList: [], |
|
|
|
accountInfo:{ |
|
|
|
name:'', |
|
|
|
idNo:'', |
|
|
|
accountNo:'', |
|
|
|
phone:'' |
|
|
|
phone:'', |
|
|
|
imgUrl: '' |
|
|
|
}, |
|
|
|
type: 0, |
|
|
|
typeList: [{ |
|
|
|
text: '微信', |
|
|
|
value: 0 |
|
|
|
}, { |
|
|
|
text: '支付宝', |
|
|
|
value: 2 |
|
|
|
}], |
|
|
|
rules: { |
|
|
|
name: { |
|
|
|
rules: [{ |
|
|
|
@ -204,7 +229,42 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
selectImage(e) { |
|
|
|
if (!e.tempFiles) { |
|
|
|
return; |
|
|
|
} |
|
|
|
let that = this; |
|
|
|
that.fileList = [...that.fileList, ...e.tempFilePaths]; |
|
|
|
that.accountInfo.imgUrl = e.tempFilePaths[0]; |
|
|
|
},//删除图片 |
|
|
|
deleteImg(e) { |
|
|
|
let that = this |
|
|
|
that.fileList = []; |
|
|
|
that.accountInfo.imgUrl = '' |
|
|
|
}, |
|
|
|
//图片上传 |
|
|
|
uploadImg: async function (e) { |
|
|
|
let that = this; |
|
|
|
uni.showLoading({ |
|
|
|
title: "上传中" |
|
|
|
}); |
|
|
|
const tempFilePaths = e; |
|
|
|
for (let i = 0; i < tempFilePaths.length; i++) { |
|
|
|
const [error, res] = await uni.uploadFile({ |
|
|
|
url: `${that.$baseURL}${that.$uploadURL}`, |
|
|
|
filePath: tempFilePaths[i], |
|
|
|
name: `${that.$uploadType}`, |
|
|
|
header:{ |
|
|
|
"Content-Type": "multipart/form-data" |
|
|
|
}, |
|
|
|
}) |
|
|
|
const back = JSON.parse(res.data); |
|
|
|
if (back.code == 200) { |
|
|
|
that.accountInfo.imgUrl = back.data; |
|
|
|
} |
|
|
|
} |
|
|
|
uni.hideLoading() |
|
|
|
}, |
|
|
|
//保存数据并跳转 |
|
|
|
submitAccount(){ |
|
|
|
let that = this; |
|
|
|
@ -231,7 +291,10 @@ |
|
|
|
idNo: that.accountInfo.idNo, |
|
|
|
phone:that.accountInfo.phone, |
|
|
|
accountNo:that.accountInfo.accountNo, |
|
|
|
type: '2' //此处默认先添加为支付宝账户,后续微信支付了即可添加微信 |
|
|
|
type: that.type //此处默认先添加为支付宝账户,后续微信支付了即可添加微信 |
|
|
|
} |
|
|
|
if (param.type === 0) { //上传收款码 |
|
|
|
that.uploadImg(that.fileList); |
|
|
|
} |
|
|
|
//新增艺术家账户 |
|
|
|
addCreatorAccount(param).then(res => { |
|
|
|
@ -267,6 +330,14 @@ |
|
|
|
// }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
type(newVal) { |
|
|
|
if (newVal !== 0) { |
|
|
|
this.fileList = []; |
|
|
|
this.accountInfo.imgUrl = ''; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
|