|
@@ -6,13 +6,13 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="option flex_r flex_ac flex_jb">
|
|
<view class="option flex_r flex_ac flex_jb">
|
|
|
<view class="balance flex_r flex_ac">
|
|
<view class="balance flex_r flex_ac">
|
|
|
- <span>账户{{ islocal?'余额':'云宝' }}:{{ user_money }}</span>
|
|
|
|
|
|
|
+ <span>账户余额:{{ user_money }}</span>
|
|
|
<span v-if="islocal">可提额度:{{ available_money }}</span>
|
|
<span v-if="islocal">可提额度:{{ available_money }}</span>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="option_text" @tap="getListPage">提现记录</view>
|
|
|
|
|
|
|
+ <view class="option_text" @tap="getListPage" v-if="islocal">提现记录</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="upload flex_c flex_jc flex_ac">
|
|
|
|
|
|
|
+ <view class="upload flex_c flex_jc flex_ac" v-if="!isBank">
|
|
|
<block v-if="imgs == '' || imgs == undefined">
|
|
<block v-if="imgs == '' || imgs == undefined">
|
|
|
<view class="upload_con flex_c flex_ac flex_jc" @tap="uploadImg"><text>+</text></view>
|
|
<view class="upload_con flex_c flex_ac flex_jc" @tap="uploadImg"><text>+</text></view>
|
|
|
</block>
|
|
</block>
|
|
@@ -31,7 +31,7 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
show: [],
|
|
show: [],
|
|
|
- inputMoney: "",
|
|
|
|
|
|
|
+ inputMoney: undefined,
|
|
|
imgs: "",
|
|
imgs: "",
|
|
|
index: 0,
|
|
index: 0,
|
|
|
userinfo: undefined, // 获取用户信息
|
|
userinfo: undefined, // 获取用户信息
|
|
@@ -44,7 +44,7 @@ export default {
|
|
|
islocal: false
|
|
islocal: false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
- onLoad: function(e) {
|
|
|
|
|
|
|
+ onLoad(e) {
|
|
|
if (e.type == "local") {
|
|
if (e.type == "local") {
|
|
|
this.getLU();
|
|
this.getLU();
|
|
|
this.islocal = true;
|
|
this.islocal = true;
|
|
@@ -56,29 +56,31 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
getExolain() {
|
|
getExolain() {
|
|
|
- let url = this.islocal ? "local/withdrawDesc" : "v1/withdrawdesc"
|
|
|
|
|
|
|
+ let url = this.islocal ? "local/withdrawDesc" : "v1/merchant/withdrawDesc" // 云宝"v1/withdrawdesc"
|
|
|
post(url).then(res => {
|
|
post(url).then(res => {
|
|
|
- this.show = this.islocal ? res.data[0] : res.data.data[0]
|
|
|
|
|
|
|
+ this.show = this.islocal ? res.data[0] : res.data
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
onSubForm() {
|
|
onSubForm() {
|
|
|
let that = this;
|
|
let that = this;
|
|
|
- let url = this.islocal ? "local/withdraw" : "v1/user/withdraw"
|
|
|
|
|
|
|
+ let url = this.islocal ? "local/withdraw" : "v1/merchant/withdraw" // 云宝"v1/user/withdraw"
|
|
|
if (this.inputMoney == "") {
|
|
if (this.inputMoney == "") {
|
|
|
this.$toast("请输入金额");
|
|
this.$toast("请输入金额");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if (!this.imgs) {
|
|
|
|
|
- uni.showModal({
|
|
|
|
|
- content: `请上传您的收款码`,
|
|
|
|
|
- showCancel: false,
|
|
|
|
|
- success(res) {},
|
|
|
|
|
- });
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ if(!this.isBank){
|
|
|
|
|
+ if (!this.imgs) {
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ content: `请上传您的收款码`,
|
|
|
|
|
+ showCancel: false,
|
|
|
|
|
+ success(res) {},
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- if (Number(this.inputMoney) > Number(this.user_money)) {
|
|
|
|
|
|
|
+ if (Number(this.inputMoney) > Number(this.available_money)) {
|
|
|
uni.showModal({
|
|
uni.showModal({
|
|
|
- content: `当前可提现${that.user_money}`,
|
|
|
|
|
|
|
+ content: `当前可提现${that.available_money}`,
|
|
|
showCancel: false,
|
|
showCancel: false,
|
|
|
success(res) {},
|
|
success(res) {},
|
|
|
});
|
|
});
|
|
@@ -91,6 +93,7 @@ export default {
|
|
|
let data = {
|
|
let data = {
|
|
|
money: this.inputMoney,
|
|
money: this.inputMoney,
|
|
|
pay_code: this.imgs,
|
|
pay_code: this.imgs,
|
|
|
|
|
+ w_code: this.imgs,
|
|
|
w_type: 1,
|
|
w_type: 1,
|
|
|
};
|
|
};
|
|
|
post(url, data).then((res) => {
|
|
post(url, data).then((res) => {
|
|
@@ -150,8 +153,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
async getU() {
|
|
async getU() {
|
|
|
- this.userinfo = await uni.userfun();
|
|
|
|
|
- this.user_money = this.userinfo.user_money;
|
|
|
|
|
|
|
+ // this.userinfo = await uni.userfun();
|
|
|
|
|
+ // this.user_money = this.userinfo.user_money;
|
|
|
|
|
+ this.localInfo = await uni.Luserfun();
|
|
|
|
|
+ this.user_money = this.localInfo.merchant_money;
|
|
|
|
|
+ this.available_money = this.user_money
|
|
|
},
|
|
},
|
|
|
async getLU() {
|
|
async getLU() {
|
|
|
this.localInfo = await uni.Luserfun();
|
|
this.localInfo = await uni.Luserfun();
|
|
@@ -163,6 +169,15 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ isBank() {
|
|
|
|
|
+ if(this.islocal) return false
|
|
|
|
|
+ else {
|
|
|
|
|
+ if(!this.inputMoney) return false
|
|
|
|
|
+ else return this.inputMoney > 1000
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|