Browse Source

合并

master
j1ack 3 years ago
parent
commit
d2a08b2be4
  1. 15
      components/KeyValueRow/KeyValueRow.vue
  2. 12
      pages.json
  3. 8
      pages/me/accountInfo.vue
  4. 395
      pages/me/confirmInfo.vue
  5. 119
      pages/recharge/outPage.vue
  6. 5
      pages/recharge/recharge.vue
  7. 10
      pages/withdrawal/addOrEditBankCard.vue
  8. 3
      pages/withdrawal/chooseAddress.vue
  9. 16
      pages/withdrawal/withdrawal.vue
  10. 2
      pages/withdrawal/withdrawalRecord.vue
  11. 5
      utils/api.js
  12. 13
      utils/language/en_US.js
  13. 10
      utils/language/vi_VN.js
  14. 12
      utils/language/zh_TW.js

15
components/KeyValueRow/KeyValueRow.vue

@ -9,6 +9,7 @@
keyName
}} </view> <text v-if="isBr"><br></text>
<view class="value"
:class="isRemarks?'static':''"
:style="{ color: rightColor, fontSize: size || rightSize, lineHeight: lineHeight || lineHeightValue }">{{
value
}}</view>
@ -73,6 +74,12 @@ export default {
return false
}
},
isRemarks: {
type: Boolean,
default() {
return false
}
},
},
data() {
return {
@ -92,10 +99,18 @@ export default {
</script>
<style lang="scss" scoped>
.static{
position: static !important;
width: 480rpx !important;
margin-left:auto;
margin-left: 50rpx;
line-height: 40rpx;
}
.KeyValueRow {
box-sizing: border-box;
margin-bottom: 10rpx;
position: relative;
word-break: break-all;
.keyName {
vertical-align: top;

12
pages.json

@ -158,6 +158,12 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/me/confirmInfo",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/me/donateRecord",
"style": {
@ -184,6 +190,12 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/recharge/outPage",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/recharge/rechargeRecord",
"style": {

8
pages/me/accountInfo.vue

@ -18,6 +18,11 @@
<u-button class="button" color="#211F32" throttleTime="500" id="ChangeWithdrawalPassword">
<view class="content">{{ i18n.ChangeWithdrawalPassword }}</view>
</u-button>
<u-button class="button" color="#211F32" throttleTime="500" id="conFirmInfo">
<view class="content">{{ i18n.conFirmInfo }}</view>
</u-button>
<!-- 银行卡按钮 -->
<u-button class="button" color="#211F32" throttleTime="500" id="BankCard">
<view class="content">{{ i18n.BankCard }}</view>
@ -63,6 +68,9 @@ export default {
case 'WithdrawalAddress':
url = '/pages/withdrawal/chooseAddress?form=accountInfo'
break;
case 'conFirmInfo':
url = '/pages/me/confirmInfo'
break;
default:
break;
}

395
pages/me/confirmInfo.vue

@ -0,0 +1,395 @@
<template>
<view class="main">
<!-- nav -->
<navigation>{{ i18n.conFirmInfo }}</navigation>
<!-- #ifdef APP-PLUS -->
<view class="content">
<!-- #endif -->
<!-- #ifdef H5 -->
<view class="contentH5">
<!-- #endif -->
<u--form class="form" :model="bankInfo" :rules="rules" ref="uForm" errorType="toast">
<view class="inputBody">
<view class="title" v-if="bankInfo.auditStatus">{{ i18n.infoStatus }}</view>
<view class="" style="margin-bottom: 20rpx;" v-if="bankInfo.auditStatus">
{{bankInfo.auditStatus=='apply'?i18n.apply:bankInfo.auditStatus=='agree'?i18n.agree:i18n.reject}}
</view>
<view class="title">{{ i18n.FirstName }}</view>
<view class="input-item">
<u-form-item class="input-item" prop="name" ref="item1">
<u-input class="input" v-model="bankInfo.name" color="#fff" fontSize="32rpx"
border="none" :placeholder="i18n.enterName">
</u-input>
</u-form-item>
</view>
<view class="title">{{ i18n.idNumber }}</view>
<view class="input-item">
<u-form-item class="input-item" prop="certId" ref="item1">
<u-input class="input" v-model="bankInfo.certId" color="#fff" fontSize="32rpx"
border="none" :placeholder="i18n.enterIdNumber">
</u-input>
</u-form-item>
</view>
<view class="title" v-if="bankInfo.auditStatus!='agree'">{{ i18n.IDcard }}</view>
<u-upload v-if="bankInfo.auditStatus!='agree'" :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
:maxCount="1">
<image class="add" src="/static/home/id.png" mode="aspectFit" v-if="!bankInfo.certFrontImgPath"></image>
<image :src="baseURL+bankInfo.certFrontImgPath"
mode="" class="add" v-if="bankInfo.certFrontImgPath"></image>
</u-upload>
<view class="title" style="margin-top: 20rpx;" v-if="bankInfo.auditStatus=='reject'">{{ i18n.infoStatus }}</view>
<view class="" style="word-break: break-all;" v-if="bankInfo.auditStatus=='reject'">
{{bankInfo.auditReason}}
</view>
</view>
</u--form>
<u-button class="button" color="#00E8A2" :throttleTime="500" :disabled="btnIsCanClick" @click="bank" v-if="!hideButton">
{{ i18n.Confirm }}
</u-button>
</view>
</view>
</template>
<script>
import api from '@/utils/api'
import constant from '@/utils/constant.js';
import {
pathToBase64,
base64ToPath
} from 'image-tools'
export default {
name: "withdrawalRecord",
data() {
return {
hideButton:false,
baseURL: '',
fileList1: [],
rules: {
name: {
type: 'string',
required: true,
message: this.$t('withdrawal').enterName,
trigger: ['blur', 'change'],
},
certId: {
type: 'string',
required: true,
message: this.$t('withdrawal').enterIdNumber,
trigger: ['blur', 'change']
},
},
bankInfo: {
name: null,
certId: null,
certFrontImgPath:null
},
pageState: 'addBank', // ,
objData: {},
};
},
computed: {
i18n() {
return this.$t("withdrawal");
},
btnIsCanClick() {
if (this.bankInfo.name && this.bankInfo.certId && this.bankInfo.certFrontImgPath) {
return false
} else {
return true
}
}
},
onLoad(option) {
this.getBank()
this.baseURL = constant.BASE_URL
},
onShow() {},
methods: {
//
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
},
//
async afterRead(event) {
uni.showLoading({
title: this.$t("withdrawal").shang,
mask: true,
})
// mutiple true , file
let lists = [].concat(event.file)
console.log(event)
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
// status: 'uploading',
// message: ''
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
fileListLen++
}
},
uploadFilePromise(url) {
// #ifdef APP-PLUS
console.log(url)
pathToBase64(url)
.then(path => {
console.log(path)
let res=path
res = res.split(',')[1]
console.log(res,'res')
return new Promise((resolve, reject) => {
api.uploadImg({
img: res
}).then(res => {
uni.hideLoading()
this.bankInfo.certFrontImgPath=res
})
})
})
.catch(error => {
uni.hideLoading()
console.error(error)
})
// #endif
// #ifdef H5
const image = new Image() // imgDOM)
//blob:http://localhost:8080/b878edea-e649-4f8d-b723-c3f25454141b
image.src = url;
image.onload = () => {
const canvas = document.createElement('canvas')
canvas.width = image.width
canvas.height = image.height
const context = canvas.getContext('2d')
context.drawImage(image, 0, 0, image.width, image.height);
let imgUrl = canvas.toDataURL() //base64
imgUrl = imgUrl.split(',')[1]
return new Promise((resolve, reject) => {
api.uploadImg({
img: imgUrl
}).then(res => {
this.bankInfo.certFrontImgPath=res
console.log(res)
console.log(this.bankInfo.certFrontImgPath)
})
})
}
// #endif
},
getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader()
reader.readAsDataURL(file)
reader.onload = () => resolve(reader.result)
reader.onerror = (error) => reject(error)
})
},
//
getBank() {
api.certificationInfo().then(res => {
this.bankInfo = res;
this.bankInfo.certFrontImgPath=res.certFrontImg
if(this.bankInfo.auditStatus=='agree'||this.bankInfo.auditStatus=='apply'){
this.hideButton=true
}
})
},
getInfo(){
api.certificationInfo().then(res => {
this.bankInfo=res
})
},
//
bank() {
this.$refs.uForm.validate().then(res => {
let bankInfo = {
name: this.bankInfo.name,
certId: this.bankInfo.certId,
certFrontImgPath: this.bankInfo.certFrontImgPath
}
api.certification(bankInfo).then(res => {
uni.$u.toast(this.$t("me").addSuccessfully)
this.getInfo()
})
}).catch(errors => {
console.log('err')
})
},
},
}
</script>
<style lang="scss" scoped>
/deep/ .uicon-camera-fill{
display:none !important;
}
/deep/ .u-upload{
position:relative;
.add{
width: 620rpx !important;
height: 360rpx !important;
}
}
/deep/ .u-upload__wrap__preview__image {
width: 620rpx !important;
height: 360rpx !important;
}
/deep/ .u-icon__icon {
font-size: 32rpx !important;
}
/deep/ .u-upload__button {
width: 620rpx !important;
height: 360rpx !important;
background-color: #323045 !important;
}
/deep/ .u-form-item__body {
padding: 0 0;
}
.main {
.content {
margin-top: 200rpx;
padding: 32rpx;
.inputBody {
overflow: hidden;
background: #211F32;
border-radius: 32rpx;
padding: 32rpx;
margin-bottom: 32rpx;
.title {
font-size: 32rpx;
color: #A1A0A8;
margin-bottom: 20rpx;
}
.input-item {
height: 112rpx;
background: #323045;
border-radius: 32rpx;
padding-left: 40rpx;
margin-bottom: 20rpx;
.input {
height: 112rpx;
}
}
}
.button {
position: fixed;
bottom: 40rpx;
width: 686rpx;
box-sizing: border-box;
height: 112rpx;
background: #00E8A2;
border-radius: 32rpx;
font-weight: 700;
font-size: 32rpx;
color: #15141F !important;
}
}
.contentH5 {
margin-top: 100rpx;
padding: 32rpx;
.inputBody {
overflow: hidden;
background: #211F32;
border-radius: 32rpx;
padding: 32rpx;
margin-bottom: 32rpx;
.title {
font-size: 32rpx;
color: #A1A0A8;
margin-bottom: 20rpx;
}
.input-item {
height: 112rpx;
background: #323045;
border-radius: 32rpx;
padding-left: 40rpx;
margin-bottom: 20rpx;
.input {
height: 112rpx;
}
}
}
.button {
position: fixed;
bottom: 40rpx;
width: 686rpx;
box-sizing: border-box;
height: 112rpx;
background: #00E8A2;
border-radius: 32rpx;
font-weight: 700;
font-size: 32rpx;
color: #15141F !important;
}
}
}
</style>

119
pages/recharge/outPage.vue

@ -0,0 +1,119 @@
<template>
<view class="main">
<view class="nav-head-H5" @tap="back()">
<image src="../../static/public/back.png" mode="aspectFit" class="back"></image>
</view>
<web-view :src="urls"></web-view>
</view>
</template>
<script>
export default {
components: {
},
name: "rechargeRecord",
data() {
return {
urls: '',
webviewStyles: {
progress: {
color: '#FF3333'
}
}
};
},
computed: {
i18n() {
return this.$t("recharge");
},
},
onReachBottom() {
},
onLoad(res) {
this.urls = res.url
},
onShow() {},
methods: {
back() {
uni.redirectTo({
url:'/pages/recharge/recharge'
})
}
},
}
</script>
<style lang="scss" scoped>
.item {
font-size: 28rpx;
text-align: center;
width: 234rpx;
line-height: 60rpx;
}
.nav-head-H5 {
position: fixed;
// top: 700rpx;
top: 32%;
height: 56rpx;
text-align: center;
font-weight: 700;
font-size: 38rpx;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
width: 10%;
background-color: #4DA2FF;
z-index: 99999;
border-bottom: 2px solid #4DA2FF;
&.tp {
background-color: transparent;
border: none;
}
}
.nav-head {
position: fixed;
top: 0rpx;
height: 112rpx;
// background-color: #fafafa;
// background-color: #fff;
text-align: center;
font-weight: 700;
font-size: 36rpx;
color: #fff;
// padding: 40rpx 16rpx;
padding-top: 88rpx;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
background-color: #15141F;
z-index: 9999;
border-bottom: 4rpx solid #323045;
&.tp {
background-color: transparent;
border: none;
}
}
.back {
width: 80rpx;
height: 80rpx;
position: absolute;
left: 0rpx;
z-index: 9999;
}
.content {
// margin-top: 150rpx;
// padding-bottom: 120rpx;
}
</style>

5
pages/recharge/recharge.vue

@ -169,7 +169,10 @@
plus.runtime.openURL(res.msg);
// #endif
// #ifdef H5
window.open(res.msg, '_blank');
// window.open(res.msg, '_blank');
uni.navigateTo({
url:'/pages/recharge/outPage?url='+res.msg
})
// #endif
}
if (res.code == 1) {

10
pages/withdrawal/addOrEditBankCard.vue

@ -28,7 +28,7 @@
</u-form-item>
</view>
<view class="title">{{ i18n.IDcard }}</view>
<!-- <view class="title">{{ i18n.IDcard }}</view>
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
:maxCount="1">
@ -37,10 +37,8 @@
<image :src="baseURL+bankInfo.certImg"
mode="" class="add" v-if="bankInfo.certImg"></image>
</u-upload>
<view class="">
</view>
</u-upload> -->
</view>
<view class="inputBody">
@ -130,7 +128,7 @@
return this.$t("withdrawal");
},
btnIsCanClick() {
if (this.bankInfo.bankCode && this.bankInfo.bankName && this.bankInfo.acctName && this.bankInfo.acctId && this.bankInfo.certImg) {
if (this.bankInfo.bankCode && this.bankInfo.bankName && this.bankInfo.acctName && this.bankInfo.acctId) {
return false
} else {
return true

3
pages/withdrawal/chooseAddress.vue

@ -186,10 +186,13 @@
this.editCoinAddressIndex = addressIndex.id;
}
} else {
// console.log(addressIndex)
// vuex
uni.$emit('coinAddressChang', {
coinid: addressIndex.id,
coinAddress: addressIndex.address,
coinCode:addressIndex.coinCode,
coinEnname:addressIndex.coinEnname
});
uni.navigateBack()

16
pages/withdrawal/withdrawal.vue

@ -255,10 +255,13 @@
this.baseURL = constant.BASE_URL
//
uni.$on('coinAddressChang', (data) => {
console.log(data)
this.coinAddress = data.coinAddress
this.coinInfo.addressId = data.coinid
this.coinInfo.coinCode = data.coinEnname
this.coinInfo.coinCode2 = data.coinCode
})
this.getWithConfig();
this.getWithConfig(true);
},
onUnload() {
//
@ -309,7 +312,7 @@
this.coinAddress='';
},
//
getWithConfig() {
getWithConfig(type) {
//
//
this.withdrawInfo={
@ -324,9 +327,12 @@
if (this.pageState == 'crypto') {
//
this.withdrawInfo = res
this.coinInfo.coinCode = this.withdrawInfo.coins[0].enname
this.selectCoinInfo = this.withdrawInfo.coins[0]
this.coinInfo.coinCode2 = this.withdrawInfo.coins[0].code
if(type){
this.coinInfo.coinCode = this.withdrawInfo.coins[0].enname
this.selectCoinInfo = this.withdrawInfo.coins[0]
this.coinInfo.coinCode2 = this.withdrawInfo.coins[0].code
}
} else {
//
this.withdrawInfo = res

2
pages/withdrawal/withdrawalRecord.vue

@ -32,6 +32,7 @@
<view style="padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.OrderID" :value="item.orderNo"></key-value-row>
<key-value-row :keyName="i18n.Fees" :value="item.tranFee+''+item.coinCode"></key-value-row>
<key-value-row :keyName="i18n.remarks" :value="item.remarks" :isRemarks="true" v-if="item.orderStatus=='processreject'"></key-value-row>
<key-value-row :keyName="i18n.Time" :value="item.addTimeStr"></key-value-row>
</view>
<view style="border-top: 2rpx solid #323045;padding:0rpx 32rpx; margin-bottom: 20rpx;">
@ -61,6 +62,7 @@
<view style="padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.OrderID" :value="item.orderNo"></key-value-row>
<key-value-row :keyName="i18n.Fees" :value="item.tranFee+''+item.coinCode"></key-value-row>
<key-value-row :keyName="i18n.remarks" :value="item.remarks" :isRemarks="true" v-if="item.orderStatus=='processreject'"></key-value-row>
<key-value-row :keyName="i18n.Time" :value="item.addTimeStr"></key-value-row>
</view>
<show-more class="onLineShowMore" style="border-top: 2rpx solid #323045;margin-bottom: 20rpx;">

5
utils/api.js

@ -98,8 +98,9 @@ const api = {
billList: (params) => Vue.prototype.$axios.post('/api/user/billList',params),//账单记录
userInfo: (params) => Vue.prototype.$axios.post('/api/user/userInfo',params),//会员基本信息
updatePayPassword: (params) => Vue.prototype.$axios.post('/api/user/updatePayPassword',params),//修改提现密码
certification: (params) => Vue.prototype.$axios.post('/api/user/certification',params),//保存实名认证信息
certificationInfo: (params) => Vue.prototype.$axios.post('/api/user/certificationInfo',params),//获取实名认证信息
}

13
utils/language/en_US.js

@ -254,6 +254,14 @@ export default {
// withdrawal
withdrawal: {
conFirmInfo:'Real name authentication',
apply:'apply',
agree:'agree',
reject:'reject',
infoStatus:'Audit status',
idNumber:'ID Number',
remarks:'Reason',
IDcard:'Upload photo ID front',
shang:'Uploading',
// 漏掉的国际化
@ -326,6 +334,9 @@ export default {
enterName: 'Please enter your name',
Account: 'Account',
enterAccount: 'Please enter your Account',
enterIdNumber: 'Please enter your ID Number',
BankName: 'Bank Name',
enterBankName: 'Please enter bank name',
BankCode: 'Bank Code',
@ -388,7 +399,7 @@ export default {
//me
me: {
conFirmInfo:'Real name authentication',
// 漏掉的
Balanceaccount:'Balance account',
Contractaccount:'Contract account',

10
utils/language/vi_VN.js

@ -251,6 +251,13 @@ export default {
// withdrawal
withdrawal: {
conFirmInfo:'Xác thực tên thật',
apply:'Để xem lại',
agree:'Duyệt',
reject:'Chấp nhận',
infoStatus:'Kiểm tra',
idNumber:'Số chứng nhận',
remarks:'Lý',
IDcard:'Tải ảnh nhận diện',
shang:'Gửi',
// 漏掉的国际化
@ -322,6 +329,7 @@ export default {
enterName: 'Vui lòng nhập tên thật của bạn',
Account: 'tài khoản',
enterAccount: 'Vui lòng nhập tài khoản của bạn',
enterIdNumber: 'Hãy nhập số nhận diện',
BankName: 'tên ngân hàng',
enterBankName: 'Vui lòng nhập tên ngân hàng',
BankCode: 'Mã ngân hàng',
@ -381,7 +389,7 @@ export default {
//me
me: {
conFirmInfo:'Xác thực tên thật',
Balanceaccount: 'Tài khoản tùy chọn',
Contractaccount: 'Hợp đồng',
Postscript: 'hậu',

12
utils/language/zh_TW.js

@ -257,6 +257,13 @@ export default {
// withdrawal
withdrawal: {
conFirmInfo:'實名認證',
apply:'待稽核',
agree:'稽核通過',
reject:'稽核駁回',
infoStatus:'稽核狀態',
idNumber:'證件號',
remarks:'原因',
IDcard:'上傳證件照正面',
shang:'上傳中',
// 漏掉的国际化
@ -330,6 +337,7 @@ export default {
enterName: '請輸入你的真實姓名',
Account: '帳戶',
enterAccount: '請輸入您的賬戶',
enterIdNumber: '請輸入您的身份證號碼',
BankName: '銀行名稱',
enterBankName: '請輸入銀行名稱',
BankCode: '銀行代碼',
@ -382,14 +390,14 @@ export default {
Video: '視頻',
WhiteBook: '白皮書',
FullNameOfToken: '幣名全稱:',
TotalCirculation: '申購價格:',
TotalCirculation: '申購數量:',
ICOPrice: '申購價格:',
// ICOTime: '申購時間:',
},
//me
me: {
conFirmInfo:'實名認證',
Balanceaccount:'交易賬戶',
Contractaccount:'合約帳戶',
Postscript:'備注',

Loading…
Cancel
Save