feat: 提现参数调整
This commit is contained in:
+2
-2
@@ -2,8 +2,8 @@
|
|||||||
"name" : "优购商城",
|
"name" : "优购商城",
|
||||||
"appid" : "__UNI__8B19741",
|
"appid" : "__UNI__8B19741",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.5.2",
|
"versionName" : "1.5.5",
|
||||||
"versionCode" : 152,
|
"versionCode" : 155,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"privacy" : {
|
"privacy" : {
|
||||||
|
|||||||
+70
-17
@@ -17,9 +17,26 @@
|
|||||||
|
|
||||||
<view class="flex-center border-bottom" style="height: 100rpx" v-for="(v, i) in list" :key="i">
|
<view class="flex-center border-bottom" style="height: 100rpx" v-for="(v, i) in list" :key="i">
|
||||||
<view class="c0">{{ v.title }}</view>
|
<view class="c0">{{ v.title }}</view>
|
||||||
<uni-easyinput style="text-align: right" class="flex1" v-model="dataObj[v.value]"
|
<uni-easyinput
|
||||||
:type="v.type || 'text'" :placeholder="v.placeholder" :inputBorder="false"
|
v-if="v.value === 'userAccount'"
|
||||||
@input="(e) => inputChange(e, v)" />
|
style="text-align: right"
|
||||||
|
class="flex1"
|
||||||
|
:value="dataObj.userAccount"
|
||||||
|
:type="v.type || 'text'"
|
||||||
|
:placeholder="v.placeholder"
|
||||||
|
:inputBorder="false"
|
||||||
|
@focus="onUserAccountFocus"
|
||||||
|
@input="onUserAccountInput"
|
||||||
|
/>
|
||||||
|
<uni-easyinput
|
||||||
|
v-else
|
||||||
|
style="text-align: right"
|
||||||
|
class="flex1"
|
||||||
|
v-model="dataObj[v.value]"
|
||||||
|
:type="v.type || 'text'"
|
||||||
|
:placeholder="v.placeholder"
|
||||||
|
:inputBorder="false"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -135,6 +152,24 @@ let dataObj = ref({
|
|||||||
price: 0,
|
price: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const getBankCardNo = (bank) => {
|
||||||
|
return bank?.bankCardId ?? bank?.cardNumber ?? '';
|
||||||
|
};
|
||||||
|
|
||||||
|
const isAccountAutofilled = ref(false);
|
||||||
|
const maskBankCardNo = (cardNo) => {
|
||||||
|
const digits = String(cardNo || '').replace(/\s+/g, '');
|
||||||
|
if (!digits) return '';
|
||||||
|
const last4 = digits.slice(-4);
|
||||||
|
return `**** **** **** ${last4}`;
|
||||||
|
};
|
||||||
|
const setAutofillAccount = (cardNo) => {
|
||||||
|
const digits = String(cardNo || '').replace(/\s+/g, '');
|
||||||
|
dataObj.value.userAccount = maskBankCardNo(digits);
|
||||||
|
dataObj.value.bankCardId = digits;
|
||||||
|
isAccountAutofilled.value = !!digits;
|
||||||
|
};
|
||||||
|
|
||||||
let point = ref(0);
|
let point = ref(0);
|
||||||
const getData = () => {
|
const getData = () => {
|
||||||
UserApi.getUserInfo().then((res) => {
|
UserApi.getUserInfo().then((res) => {
|
||||||
@@ -188,7 +223,7 @@ const submit = () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!dataObj.value.userAccount) {
|
if (!dataObj.value.userAccount) {
|
||||||
sheep.$helper.toast('请输入账号账号');
|
sheep.$helper.toast('请输入银行账号');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!dataObj.value.bankName) {
|
if (!dataObj.value.bankName) {
|
||||||
@@ -205,10 +240,14 @@ const submit = () => {
|
|||||||
}
|
}
|
||||||
let obj = JSON.parse(JSON.stringify(dataObj.value));
|
let obj = JSON.parse(JSON.stringify(dataObj.value));
|
||||||
obj.price = obj.price * 100;
|
obj.price = obj.price * 100;
|
||||||
|
const cardNo = String(obj.bankCardId || obj.userAccount || '').trim();
|
||||||
|
if (cardNo) {
|
||||||
|
obj.bankCardId = cardNo;
|
||||||
|
obj.cardNumber = cardNo;
|
||||||
|
}
|
||||||
api.createBrokerageWithdraw(obj).then((res) => {
|
api.createBrokerageWithdraw(obj).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
dataObj.value = {
|
dataObj.value = {
|
||||||
type: 2,
|
|
||||||
transferChannelCode: 'wx_lite',
|
transferChannelCode: 'wx_lite',
|
||||||
price: 0,
|
price: 0,
|
||||||
};
|
};
|
||||||
@@ -266,40 +305,52 @@ const blur = () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const inputChange = (e, v) => {
|
const onUserAccountFocus = () => {
|
||||||
let obj = {
|
if (!isAccountAutofilled.value) return;
|
||||||
bankNo: e.detail.value,
|
isAccountAutofilled.value = false;
|
||||||
|
dataObj.value.userAccount = '';
|
||||||
|
dataObj.value.bankCardId = '';
|
||||||
};
|
};
|
||||||
if (v.value == 'userAccount') {
|
const onUserAccountInput = (e) => {
|
||||||
api.getBank(obj).then((res) => {
|
const raw = typeof e === 'string' ? e : e?.detail?.value;
|
||||||
if (res.code === 0) {
|
const value = String(raw || '');
|
||||||
|
dataObj.value.userAccount = value;
|
||||||
|
dataObj.value.bankCardId = value;
|
||||||
|
isAccountAutofilled.value = false;
|
||||||
|
if (!value) return;
|
||||||
|
const requestNo = value;
|
||||||
|
api.getBank({ bankNo: value }).then((res) => {
|
||||||
|
if (String(dataObj.value.bankCardId || '') !== requestNo) return;
|
||||||
|
if (res.code !== 0) return;
|
||||||
|
if (!res.data) return;
|
||||||
console.log(res);
|
console.log(res);
|
||||||
dataObj.value.bankName = res.data;
|
dataObj.value.bankName = res.data;
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
};
|
};
|
||||||
let bankList = ref([]);
|
let bankList = ref([]);
|
||||||
let bankText = ref([]);
|
let bankText = ref([]);
|
||||||
const getBankList = () => {
|
const getBankList = () => {
|
||||||
api.getBankList({}).then((res) => {
|
api.getBankList({}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
|
bankText.value = [];
|
||||||
|
bankList.value = [];
|
||||||
res.data.forEach((item) => {
|
res.data.forEach((item) => {
|
||||||
// 取银行卡后四位
|
const cardNo = String(getBankCardNo(item) || '');
|
||||||
item.text = `${item.bankName}(${item.cardNumber.slice(-4)})`;
|
item.text = `${item.bankName}(${cardNo.slice(-4)})`;
|
||||||
bankText.value.push(item.text);
|
bankText.value.push(item.text);
|
||||||
});
|
});
|
||||||
bankList.value = res.data;
|
bankList.value = res.data;
|
||||||
|
|
||||||
if (res?.data?.length) {
|
if (res?.data?.length) {
|
||||||
let obj = res.data[0];
|
let obj = res.data[0];
|
||||||
|
const cardNo = getBankCardNo(obj);
|
||||||
dataObj.value = {
|
dataObj.value = {
|
||||||
...dataObj.value,
|
...dataObj.value,
|
||||||
userName: obj.trueName,
|
userName: obj.trueName,
|
||||||
userAccount: obj.cardNumber,
|
|
||||||
bankName: obj.bankName,
|
bankName: obj.bankName,
|
||||||
bankAddress: obj.bankAddress,
|
bankAddress: obj.bankAddress,
|
||||||
};
|
};
|
||||||
|
setAutofillAccount(cardNo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -311,12 +362,14 @@ const select = () => {
|
|||||||
tapIndex
|
tapIndex
|
||||||
}) => {
|
}) => {
|
||||||
let obj = bankList.value[tapIndex];
|
let obj = bankList.value[tapIndex];
|
||||||
|
const cardNo = getBankCardNo(obj);
|
||||||
dataObj.value = {
|
dataObj.value = {
|
||||||
...dataObj.value,
|
...dataObj.value,
|
||||||
userName: obj.trueName,
|
userName: obj.trueName,
|
||||||
userAccount: obj.cardNumber,
|
|
||||||
bankName: obj.bankName,
|
bankName: obj.bankName,
|
||||||
|
bankAddress: obj.bankAddress,
|
||||||
};
|
};
|
||||||
|
setAutofillAccount(cardNo);
|
||||||
},
|
},
|
||||||
fail: (error) => { },
|
fail: (error) => { },
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="center"> 最新版本号: {{ newversion }} </view>
|
<view class="center"> 最新版本号: {{ newversion }} </view>
|
||||||
<view class="center m-t-50"> 当前版本号: {{ version }} </view>
|
<view class="center m-t-50"> 当前版本号: {{ version }} </view>
|
||||||
|
<!-- <view class="center m-t-50">当前环境api:{{ baseUrl }}</view> -->
|
||||||
<!-- #ifdef APP-PLUS -->
|
<!-- #ifdef APP-PLUS -->
|
||||||
<view class="flex-center m-t-100 absolute b50 w100 p-x-32">
|
<view class="flex-center m-t-100 absolute b50 w100 p-x-32">
|
||||||
<view class="ai-button2 m-r-20" @click="onClickUpdate()">更新最新版本</view>
|
<view class="ai-button2 m-r-20" @click="onClickUpdate()">更新最新版本</view>
|
||||||
@@ -29,7 +30,7 @@
|
|||||||
import { ref, onMounted } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import { createHotUpdate, downloadAndOpenApk } from '@/utils/hotUpdate'
|
import { createHotUpdate, downloadAndOpenApk } from '@/utils/hotUpdate'
|
||||||
import { getAndroidAppUrl, gethotupdatelist } from '@/sheep/api/index/index'
|
import { getAndroidAppUrl, gethotupdatelist } from '@/sheep/api/index/index'
|
||||||
|
// import { baseUrl } from '@/sheep/config';
|
||||||
const newversion = ref('')
|
const newversion = ref('')
|
||||||
const version = ref('')
|
const version = ref('')
|
||||||
const appVersion = ref('')
|
const appVersion = ref('')
|
||||||
|
|||||||
@@ -4,12 +4,11 @@ const { version } = packageInfo;
|
|||||||
|
|
||||||
// 开发环境配置
|
// 开发环境配置
|
||||||
export let baseUrl;
|
export let baseUrl;
|
||||||
// if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// baseUrl = import.meta.env.SHOPRO_DEV_BASE_URL;
|
|
||||||
// } else {
|
|
||||||
// baseUrl = import.meta.env.SHOPRO_BASE_URL;
|
|
||||||
// }
|
|
||||||
baseUrl = import.meta.env.SHOPRO_DEV_BASE_URL;
|
baseUrl = import.meta.env.SHOPRO_DEV_BASE_URL;
|
||||||
|
} else {
|
||||||
|
baseUrl = import.meta.env.SHOPRO_BASE_URL || import.meta.env.SHOPRO_DEV_BASE_URL;
|
||||||
|
}
|
||||||
if (typeof baseUrl === 'undefined') {
|
if (typeof baseUrl === 'undefined') {
|
||||||
console.error('请检查.env配置文件是否存在');
|
console.error('请检查.env配置文件是否存在');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user