提现优化更新
This commit is contained in:
parent
fa809e7b0b
commit
f8bd53596b
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
//打包时修改env的值即可
|
//打包时修改env的值即可
|
||||||
const env='production' //test , production,local
|
const env='test' //test , production,local
|
||||||
|
|
||||||
export const encryptKey='1234567890123456' // http数据加解密的key
|
export const encryptKey='1234567890123456' // http数据加解密的key
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -122,14 +122,12 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res.code == 401) {
|
if (res.code == 401) {
|
||||||
infoBox.showToast(res.message || "请登录").then(() => {
|
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: "/pages/login/login",
|
url: "/pages/login/login",
|
||||||
});
|
});
|
||||||
reject();
|
reject();
|
||||||
});
|
|
||||||
}
|
}
|
||||||
if (res.code != 0) {
|
if (res.code != 0&&res.code != 401) {
|
||||||
infoBox.showToast(res.msg).then(() => {});
|
infoBox.showToast(res.msg).then(() => {});
|
||||||
reject();
|
reject();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
"name" : "斯耀短剧",
|
"name" : "斯耀短剧",
|
||||||
"appid" : "__UNI__E0B05B1",
|
"appid" : "__UNI__E0B05B1",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.2.4",
|
"versionName" : "1.2.5",
|
||||||
"versionCode" : 124,
|
"versionCode" : 125,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,37 @@
|
||||||
* 全部提现赋值
|
* 全部提现赋值
|
||||||
*/
|
*/
|
||||||
function setAllMoney() {
|
function setAllMoney() {
|
||||||
data.money = data.mayMoney.toFixed(2)
|
data.money = getMoneys(data.mayMoney)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 金额格式化
|
||||||
|
* money:金额
|
||||||
|
* 保留两位小数&不四舍五入
|
||||||
|
*/
|
||||||
|
function getMoneys (money) {
|
||||||
|
if (!money || isNaN(money)) return "0.00";
|
||||||
|
let num = parseFloat(money + '') + '';
|
||||||
|
num = parseInt(money * 100 + '') / 100 + ''
|
||||||
|
|
||||||
|
let reg = /(-?\d+)(\d{4})/;
|
||||||
|
while (reg.test(num)) {
|
||||||
|
num = num.replace(reg, "$1,$2");
|
||||||
|
}
|
||||||
|
|
||||||
|
let idx = num.indexOf('.')
|
||||||
|
if (idx === -1) {
|
||||||
|
num = num + '.00'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (idx > 0) {
|
||||||
|
let num_per = num.substring(0, idx) + '.'
|
||||||
|
let num_next = num.substring(idx + 1).padEnd(2, '0')
|
||||||
|
num = num_per + num_next
|
||||||
|
}
|
||||||
|
|
||||||
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -338,7 +368,7 @@
|
||||||
*/
|
*/
|
||||||
function getcashMoney() {
|
function getcashMoney() {
|
||||||
selectUserMoney().then(res => {
|
selectUserMoney().then(res => {
|
||||||
data.mayMoney = res.amount || 0
|
data.mayMoney = getMoneys(res.amount) || 0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue