feat: 前端全量更新 - 含所有本次需求
- 移除秒合约页面及UI - 合约页Tab改为Position Held/Transaction Record - 存款/提款/转账页增加BTC/ETH - 资产页重构(用户信息+盈亏+多语言) - 注册页改版(匹配新设计稿) - 日文全面翻译+首页菜单多语言 - 代理专属注册链接支持(?code=) - 10个locale文件同步更新
This commit is contained in:
@@ -0,0 +1,253 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100%;">
|
||||
<myNav :title="i18n.mine.safety.type1"></myNav>
|
||||
|
||||
<view v-if="auth_status==0" class="width-100b padding-30">
|
||||
<view class="color-white font-26 padding-16 radiu-10">{{description}}</view>
|
||||
</view>
|
||||
|
||||
<view class="listBox">
|
||||
<view class="width-100b height-96 line-height-96">
|
||||
<text class="font-30 bold-font">{{i18n.mine.safety.zhenming}}</text>
|
||||
</view>
|
||||
<view class="width-100b height-96">
|
||||
<input :disabled="auth_status==1||auth_status==2" class="width-100b height-96 font-30" type="text" v-model="name" :placeholder="i18n.mine.safety.p0"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="listBox">
|
||||
<view class="width-100b height-96 line-height-96">
|
||||
<text class="font-30 bold-font">{{i18n.mine.safety.idcard}}</text>
|
||||
</view>
|
||||
<view class="width-100b height-96">
|
||||
<input :disabled="auth_status==1||auth_status==2" class="width-100b height-96 font-30 nummedium-font" type="text" v-model="card" :placeholder="i18n.mine.safety.p1"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="listBox">
|
||||
<view class="width-100b height-96 line-height-96">
|
||||
<text class="font-30 bold-font">{{i18n.mine.safety.phone}}</text>
|
||||
</view>
|
||||
<view class="width-100b height-96">
|
||||
<input :disabled="auth_status==1||auth_status==2" class="width-100b height-96 font-30 nummedium-font" type="number" v-model="mobile" :placeholder="i18n.mine.safety.p2"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-b-40">
|
||||
<view class="width-100b height-76 line-height-76 padding-w-45">
|
||||
<text class="font-30 bold-font">{{i18n.mine.safety.zm}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-center padding-w-45 padding-c-20">
|
||||
<view @click="chooseImage('card_image')" style="width: 620rpx;height: 320rpx;position: relative;">
|
||||
<image :src="card_image" style="width: 620rpx;height: 320rpx;border-radius: 15rpx;"></image>
|
||||
<view v-if="card_image=='/static/imgs/my/zhengmian.png'" class="width-500 height-150 absolute flex direction-column align-center" style="left: 50%;margin-left: -250rpx;top: 50%; margin-top: -75rpx;">
|
||||
<image class="width-70 height-70" src="/static/imgs/my/add@2x.png" mode=""></image>
|
||||
<text class="font-30 color-0165EE margin-t-20">{{i18n.mine.safety.click}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-100b height-76 line-height-76 padding-w-45">
|
||||
<text class="font-30 bold-font">{{i18n.mine.safety.fm}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-center padding-w-45 padding-c-20">
|
||||
<view @click="chooseImage('cardbm_image')" style="width: 620rpx;height: 320rpx; position: relative;">
|
||||
<image :src="cardbm_image" style="width: 620rpx;height: 320rpx;border-radius: 15rpx;"></image>
|
||||
<view v-if="cardbm_image=='/static/imgs/my/beimian.png'" class="width-500 height-150 absolute flex direction-column align-center" style="left: 50%;margin-left: -250rpx;top: 50%; margin-top: -75rpx;">
|
||||
<image class="width-70 height-70" src="/static/imgs/my/add@2x.png" mode=""></image>
|
||||
<text class="font-30 color-0165EE margin-t-20">{{i18n.mine.safety.click}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="width-100b flex align-center justify-center margin-t-20">
|
||||
<button @click="real" class="cu-btn loginBtn" :disabled="auth_status==1||auth_status==2">{{auth_Btn}}</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
name: "",
|
||||
card: "",
|
||||
mobile:'',
|
||||
auth_status:3,//审核状态:1=审核成功,2=审核中,3=未提交 0=失败
|
||||
description:'',//失败原因
|
||||
|
||||
flag:true,
|
||||
|
||||
card_image:"/static/imgs/my/zhengmian.png",
|
||||
card_upload:"",
|
||||
cardbm_image:"/static/imgs/my/beimian.png",
|
||||
cardbm_upload:"",
|
||||
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.appAuth()
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
auth_Btn() {
|
||||
let str;
|
||||
switch (this.auth_status) {
|
||||
case 1:
|
||||
str = this.i18n.mine.safety.type3
|
||||
break;
|
||||
case 2:
|
||||
str = this.i18n.mine.safety.shenhe
|
||||
break;
|
||||
case 3:
|
||||
str = this.i18n.mine.safety.tijiao
|
||||
break;
|
||||
case 0:
|
||||
str = this.i18n.mine.safety.tijiao
|
||||
break;
|
||||
default:
|
||||
str = this.i18n.mine.safety.tijiao
|
||||
break;
|
||||
}
|
||||
return str
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
chooseImage(e) {
|
||||
if(this.auth_status==1||this.auth_status==2) return
|
||||
let self = this
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
success: (chooseImageRes) => {
|
||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
||||
if(e=="card_image"){
|
||||
self.card_image = tempFilePaths[0]
|
||||
}else{
|
||||
self.cardbm_image = tempFilePaths[0]
|
||||
}
|
||||
uni.showLoading()
|
||||
uni.uploadFile({
|
||||
url: this.upload +'/publics/image_upload',
|
||||
filePath: tempFilePaths[0],
|
||||
name: 'file',
|
||||
success: (res) => {
|
||||
let data = JSON.parse(res.data)
|
||||
uni.hideLoading()
|
||||
if (data.code == 1) {
|
||||
// console.log(data)
|
||||
if(e=="card_image"){
|
||||
self.card_upload = data.data.url
|
||||
}else{
|
||||
self.cardbm_upload = data.data.url
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
appAuth() {
|
||||
this.post('/my/auth_con').then(res => {
|
||||
console.log('实名回显',res)
|
||||
if (res.code == 1) {
|
||||
if(res.data.auth != null){
|
||||
this.card = res.data.auth.card_num
|
||||
this.name = res.data.auth.name
|
||||
this.mobile = res.data.auth.mobile
|
||||
this.auth_status = res.data.auth.status
|
||||
this.description = res.data.auth.description
|
||||
this.card_image = res.data.auth.card_images
|
||||
this.card_upload = res.data.auth.card_image
|
||||
|
||||
this.cardbm_image = res.data.auth.cardbm_images
|
||||
this.cardbm_upload = res.data.auth.cardbm_image
|
||||
}else{
|
||||
this.card_image = '/static/imgs/my/zhengmian.png'
|
||||
this.card_upload = ''
|
||||
this.cardbm_image = '/static/imgs/my/beimian.png'
|
||||
this.cardbm_upload = ''
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
real() {
|
||||
if(!this.flag) return
|
||||
if(this.name == ''){
|
||||
this.tos(this.i18n.mine.safety.p0)
|
||||
return
|
||||
}
|
||||
if(this.card == ''){
|
||||
this.tos(this.i18n.mine.safety.p1)
|
||||
return
|
||||
}
|
||||
if(this.mobile == ''){
|
||||
this.tos(this.i18n.mine.safety.p2)
|
||||
return
|
||||
}
|
||||
if(this.card_upload == ''){
|
||||
this.tos(this.i18n.mine.safety.zm)
|
||||
return
|
||||
}
|
||||
if(this.cardbm_upload == ''){
|
||||
this.tos(this.i18n.mine.safety.fm)
|
||||
return
|
||||
}
|
||||
this.flag = false
|
||||
this.post('/my/auth_sub', {
|
||||
name:this.name,
|
||||
card_num:this.card,
|
||||
mobile:this.mobile,
|
||||
card_image:this.card_upload,
|
||||
cardbm_image:this.cardbm_upload
|
||||
},true).then(res => {
|
||||
this.flag = true
|
||||
console.log('实名提交',res)
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack({
|
||||
delta:1
|
||||
})
|
||||
},500)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.listBox{
|
||||
width: 100%;
|
||||
/* height: 96rpx; */
|
||||
padding: 0 45rpx;
|
||||
margin-bottom: 1rpx;
|
||||
/* background-color: #FFFFFF; */
|
||||
}
|
||||
|
||||
.loginBtn {
|
||||
width: 600rpx;
|
||||
height: 96rpx;
|
||||
background: linear-gradient(180deg, #52F3C9 0%, #3ECEB2 100%) !important;
|
||||
border-radius: 12rpx;
|
||||
line-height: 96rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
text-align: center;
|
||||
/* position: absolute; */
|
||||
/* bottom: 5%; */
|
||||
/* left: 50%; */
|
||||
/* margin-left: -300rpx; */
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user