Compare commits
No commits in common. "9e3da7951b91f98816031b984ed2a3caf9ea53ff" and "e1eeb64c7406a28601994acc54e74718da23a777" have entirely different histories.
9e3da7951b
...
e1eeb64c74
|
|
@ -101,11 +101,6 @@
|
|||
|
||||
<script>
|
||||
import * as bal from '@/config/balance.js'
|
||||
const BALANCE_TYPE = {
|
||||
RECHARGE: 1,
|
||||
WITHDRAW: 2,
|
||||
TRANSFER: 3,
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -113,17 +108,17 @@ export default {
|
|||
{
|
||||
name: '充值',
|
||||
path: '/pages/pay/index',
|
||||
id: BALANCE_TYPE.RECHARGE,
|
||||
id: '1',
|
||||
},
|
||||
{
|
||||
name: '提现',
|
||||
path: '/pages/mine/balance/withdrawal',
|
||||
id: BALANCE_TYPE.WITHDRAW,
|
||||
id: '2',
|
||||
},
|
||||
{
|
||||
name: '转账',
|
||||
path: '/pages/mine/balance/transfer',
|
||||
id: BALANCE_TYPE.TRANSFER,
|
||||
id: '3',
|
||||
},
|
||||
],
|
||||
tabActive: '',
|
||||
|
|
@ -160,12 +155,12 @@ export default {
|
|||
{
|
||||
name: '充值',
|
||||
path: '/pages/pay/index',
|
||||
id: BALANCE_TYPE.RECHARGE,
|
||||
id: '1',
|
||||
},
|
||||
{
|
||||
name: '提现',
|
||||
path: '/pages/mine/balance/withdrawal',
|
||||
id: BALANCE_TYPE.WITHDRAW,
|
||||
id: '2',
|
||||
},
|
||||
]
|
||||
} else {
|
||||
|
|
@ -173,17 +168,17 @@ export default {
|
|||
{
|
||||
name: '充值',
|
||||
path: '/pages/pay/index',
|
||||
id: BALANCE_TYPE.RECHARGE,
|
||||
id: '1',
|
||||
},
|
||||
{
|
||||
name: '提现',
|
||||
path: '/pages/mine/balance/withdrawal',
|
||||
id: BALANCE_TYPE.WITHDRAW,
|
||||
id: '2',
|
||||
},
|
||||
{
|
||||
name: '转账',
|
||||
path: '/pages/mine/balance/transfer',
|
||||
id: BALANCE_TYPE.TRANSFER,
|
||||
id: '3',
|
||||
},
|
||||
]
|
||||
}
|
||||
|
|
@ -233,15 +228,9 @@ export default {
|
|||
|
||||
handleLink(item) {
|
||||
this.tabActive = item.path
|
||||
if (
|
||||
item.id == BALANCE_TYPE.WITHDRAW ||
|
||||
item.id == BALANCE_TYPE.TRANSFER
|
||||
) {
|
||||
if (item.id == 2 || item.id == 3) {
|
||||
if (this.userInfo.pkCountry == 1) {
|
||||
if (
|
||||
this.userInfo.pkGradeId == 1 &&
|
||||
item.id == BALANCE_TYPE.WITHDRAW
|
||||
) {
|
||||
if (this.userInfo.pkGradeId == 1 && item.id == 2) {
|
||||
} else {
|
||||
bal
|
||||
.getIfAuth({
|
||||
|
|
@ -249,19 +238,15 @@ export default {
|
|||
})
|
||||
.then(res => {
|
||||
if (res.code == 200 && res.flag == 'Y') {
|
||||
uni.navigateTo({
|
||||
url: item.path,
|
||||
})
|
||||
this.checkExit(item)
|
||||
} else if (res.code == 200 && res.flag == 'N') {
|
||||
this.smShow = true
|
||||
uni.showToast({
|
||||
title: '请先进行实名认证',
|
||||
icon: 'none',
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/selfService/realName/realName',
|
||||
})
|
||||
}, 900)
|
||||
uni.navigateTo({
|
||||
url: '/pages/selfService/realName/realName',
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@
|
|||
>
|
||||
<u--input
|
||||
:placeholder="'请输入'"
|
||||
disabled
|
||||
v-model="dataForm.accountName"
|
||||
></u--input>
|
||||
</u-form-item>
|
||||
|
|
@ -55,11 +54,7 @@
|
|||
prop="sex"
|
||||
ref="item1"
|
||||
>
|
||||
<u-radio-group
|
||||
disabled
|
||||
v-model="dataForm.sex"
|
||||
@change="radioGroupChange"
|
||||
>
|
||||
<u-radio-group v-model="dataForm.sex" @change="radioGroupChange">
|
||||
<u-radio
|
||||
:customStyle="{ marginRight: '16rpx' }"
|
||||
v-for="(item, index) in sexList"
|
||||
|
|
@ -80,6 +75,7 @@
|
|||
>
|
||||
<u--input
|
||||
suffixIcon="arrow-right"
|
||||
readonly
|
||||
v-model="dataForm.idName"
|
||||
disabled
|
||||
:placeholder="'请选择'"
|
||||
|
|
@ -95,11 +91,10 @@
|
|||
>
|
||||
<u--input
|
||||
:placeholder="'请输入'"
|
||||
disabled
|
||||
v-model="dataForm.idCard"
|
||||
></u--input>
|
||||
</u-form-item>
|
||||
<!-- <u-form-item
|
||||
<u-form-item
|
||||
required
|
||||
label-width="180rpx"
|
||||
:label="'银行名称'"
|
||||
|
|
@ -142,8 +137,8 @@
|
|||
v-model="dataForm.subBankName"
|
||||
disabledColor="#F5F5F5;"
|
||||
></u--input>
|
||||
</u-form-item> -->
|
||||
<!-- <u-form-item
|
||||
</u-form-item>
|
||||
<u-form-item
|
||||
required
|
||||
@click="getDiqu"
|
||||
:label="'所在地区'"
|
||||
|
|
@ -158,7 +153,7 @@
|
|||
:placeholder="'请选择'"
|
||||
>
|
||||
</u--input>
|
||||
</u-form-item> -->
|
||||
</u-form-item>
|
||||
|
||||
<view class="view-class">
|
||||
<u-form-item
|
||||
|
|
@ -170,7 +165,6 @@
|
|||
>
|
||||
<u-textarea
|
||||
v-model="dataForm.address"
|
||||
disabled
|
||||
placeholder-class="place-class"
|
||||
class="border-color"
|
||||
maxlength="200"
|
||||
|
|
@ -291,10 +285,10 @@ export default {
|
|||
showAmount: false,
|
||||
showCtype: false,
|
||||
dataForm: {
|
||||
// bankName: '',
|
||||
// cardNumber: '',
|
||||
// pkBank: '',
|
||||
// subBankName: '',
|
||||
bankName: '',
|
||||
cardNumber: '',
|
||||
pkBank: '',
|
||||
subBankName: '',
|
||||
accountName: '',
|
||||
idCard: '',
|
||||
pkProvince: '',
|
||||
|
|
@ -463,7 +457,6 @@ export default {
|
|||
this.$set(this.dataForm, 'accountName', res.data.name)
|
||||
this.$set(this.dataForm, 'idCard', res.data.idCard)
|
||||
this.$set(this.dataForm, 'sex', res.data.sex)
|
||||
this.$set(this.dataForm, 'address', res.data.address)
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.uploadImg1.deletePic({ index: 0 })
|
||||
|
|
@ -493,13 +486,10 @@ export default {
|
|||
}
|
||||
},
|
||||
imageUploaded1(url) {
|
||||
if (!url) return
|
||||
this.dataForm.idFront = url
|
||||
this.getIdCardInfo(url)
|
||||
},
|
||||
imageUploaded2(url) {
|
||||
this.dataForm.idBack = url
|
||||
this.idBackChange(url)
|
||||
},
|
||||
// radio选择发生变化
|
||||
radioGroupChange(e) {
|
||||
|
|
|
|||
|
|
@ -1,34 +1,30 @@
|
|||
import store from '@/store'
|
||||
let userInfo = uni.getStorageSync('User')
|
||||
export function stateFormat(row, column, cellValue) {
|
||||
if (cellValue) {
|
||||
return Number(cellValue)
|
||||
.toFixed(2)
|
||||
.replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => {
|
||||
return $1 + ','
|
||||
|
||||
return $1 + ',';
|
||||
})
|
||||
|
||||
.replace(/\.$/, '')
|
||||
.replace(/\.$/, "");
|
||||
}
|
||||
}
|
||||
//element 转成千分位并保留小数
|
||||
//decimal 默认保留2位小数
|
||||
export function toThousandthAndKeepDecimal(element, decimal = 2) {
|
||||
if (!element || element === '') {
|
||||
//值不存在 或为空
|
||||
if (!element || element === '') {//值不存在 或为空
|
||||
return ''
|
||||
} else if (typeof element == 'string') {
|
||||
return Number(element).toLocaleString(undefined, {
|
||||
minimumFractionDigits: decimal,
|
||||
maximumFractionDigits: decimal,
|
||||
})
|
||||
return Number(element).toLocaleString(undefined, { minimumFractionDigits: decimal, maximumFractionDigits: decimal });
|
||||
} else if (typeof element == 'number') {
|
||||
return element.toLocaleString(undefined, {
|
||||
minimumFractionDigits: decimal,
|
||||
maximumFractionDigits: decimal,
|
||||
})
|
||||
return element.toLocaleString(undefined, { minimumFractionDigits: decimal, maximumFractionDigits: decimal });
|
||||
} else {
|
||||
return element
|
||||
return element;
|
||||
}
|
||||
|
||||
}
|
||||
// 千分号
|
||||
export function numberToCurrencyNo(value) {
|
||||
|
|
@ -40,17 +36,14 @@ export function numberToCurrencyNo(value) {
|
|||
// 获取整数部分
|
||||
const intPart = Math.trunc(value)
|
||||
// 整数部分处理,增加,
|
||||
const intPartFormat = intPart
|
||||
.toString()
|
||||
.replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
|
||||
const intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
|
||||
// 预定义小数部分
|
||||
let floatPart = ''
|
||||
// 将数值截取为小数部分和整数部分
|
||||
const valueArray = value.toString().split('.')
|
||||
if (valueArray.length === 2) {
|
||||
// 有小数部分
|
||||
if (valueArray.length === 2) { // 有小数部分
|
||||
floatPart = valueArray[1].toString() // 取得小数部分
|
||||
if (floatPart.length == 1) {
|
||||
if(floatPart.length == 1){
|
||||
floatPart = floatPart + '0'
|
||||
}
|
||||
return intPartFormat + '.' + floatPart
|
||||
|
|
@ -69,9 +62,9 @@ export function numberToCurrencyNo(value) {
|
|||
// }
|
||||
// 添加当地币
|
||||
export function isLocal(value) {
|
||||
return '¥' + value
|
||||
return (store.getters.user.currencyIcon + value) || (userInfo.currencyIcon + value)
|
||||
}
|
||||
// 添加当地币
|
||||
export function isLocaled(value) {
|
||||
return '¥'
|
||||
return store.getters.user.currencyIcon || userInfo.currencyIcon
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue