feat: 前端全量更新 - 含所有本次需求

- 移除秒合约页面及UI
- 合约页Tab改为Position Held/Transaction Record
- 存款/提款/转账页增加BTC/ETH
- 资产页重构(用户信息+盈亏+多语言)
- 注册页改版(匹配新设计稿)
- 日文全面翻译+首页菜单多语言
- 代理专属注册链接支持(?code=)
- 10个locale文件同步更新
This commit is contained in:
li
2026-03-30 20:14:20 +08:00
commit 5f40e4e1b5
605 changed files with 154871 additions and 0 deletions
+159
View File
@@ -0,0 +1,159 @@
<template>
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
<myNav :title="i18n.mine.safety.guge"></myNav>
<view class="width-690 margin-0-auto flex align-start padding-c-40" style="
border-bottom:1px solid rgba(209,211,216,0.4);">
<image class="width-36 height-36 margin-r-8" src="/static/imgs/my/sousuo@2x.png" mode=""></image>
<text class="font-28">{{i18n.mine.safety.tips2}}</text>
</view>
<view class="width-690 margin-0-auto flex direction-column align-center padding-c-40" style="
border-bottom:1px solid rgba(209,211,216,0.4);">
<view class="width-690 flex align-start margin-b-20">
<image class="width-36 height-36 margin-r-8" src="/static/imgs/my/anzhuang@2x.png" mode=""></image>
<text class="width-640 font-28">{{i18n.mine.safety.tips3}}</text>
</view>
<image class="width-300 height-300 radiu-10 margin-b-20" :src="code_url?code_url:'/static/APEClogo@2x.png'" mode=""></image>
<view class="width-690 height-86 flex align-center justify-center radiu-8"
:style="'background-color: '+theme.fu_bg+';color: '+theme.fu_text">
<text class="margin-r-52 font-32 numbold-font">{{secret}}</text>
<image @click="copy(secret)" class="width-24 height-24" src="/static/imgs/my/fuzhi@2x.png" mode=""></image>
</view>
</view>
<view class="width-690 margin-0-auto padding-c-40" style="
border-bottom:1px solid rgba(209,211,216,0.4);">
<view class="flex align-start margin-b-32">
<image class="width-36 height-36 margin-r-8" src="/static/imgs/my/tianjia@2x.png" mode=""></image>
<text class="width-640 font-28">{{i18n.mine.safety.tips4}}</text>
</view>
<view class="width-690">
<view class="height-86 line-height-86">
<text class="font-32 bold-font">{{i18n.mine.safety.gugeTitle}}</text>
</view>
<view :style="'background-color: '+theme.fu_bg+';color: '+theme.fu_text">
<input class="width-690 height-86 padding-w-20 radiu-8 font-30 numbold-font" maxlength="6" type="number" v-model="Google_code" :placeholder="i18n.mine.safety.guge6"/>
</view>
</view>
</view>
<button @click="open" :class="Google_code.length==6?'lanBtn':'huiBtn'" class="cu-btn loginBtn">{{i18n.mine.safety.kaiqi}}</button>
</view>
</template>
<script>
import clipboard from "@/components/clipboard.js"
export default {
data() {
return {
Google_code:'',
secret:'',
code_url:'',
flag:true,
theme:''
}
},
computed: {
i18n() {
return this.$t('message');
},
},
onLoad() {
this.getInfo()
},
onShow() {
if (uni.getStorageSync("theme") == "dark") {
this.theme = this.$store.state.darkTheme
} else {
this.theme = this.$store.state.lightTheme
}
},
methods: {
getInfo(){
this.post('/google/get_keys').then(res => {
console.log('谷歌验证',res)
if(res.code == 1){
this.secret = res.data.secret
this.code_url = res.data.code_url
}
})
},
open(){
if (!this.flag) return
if (this.Google_code == '') {
this.tos(this.i18n.mine.safety.inputguge)
return
}
if (this.Google_code.length != 6) {
this.tos(this.i18n.mine.safety.guge6)
return
}
uni.showLoading({
title: this.i18n.mine.safety.loading,
mask:true
})
this.flag = false
this.post('/google/band_secret', {
secret:this.secret,
code:this.Google_code
}).then(res => {
console.log(res)
uni.hideLoading()
this.flag = true
if (res.code == 1) {
this.tos(res.msg)
setTimeout(() => {
uni.navigateBack()
}, 500)
}
})
},
// 复制地址
copy(data) {
// #ifndef H5
clipboard.setText(data);
// #endif
// #ifdef H5
let result
let textarea = document.createElement("textarea")
textarea.value = data
textarea.readOnly = "readOnly"
document.body.appendChild(textarea)
textarea.select() // 选中文本内容
textarea.setSelectionRange(0, data.length)
result = document.execCommand("copy")
textarea.remove()
// #endif
this.tos(this.i18n.mine.share.copySuceed)
},
}
}
</script>
<style lang="scss">
.huiBtn{
background: #D1D3D8 !important;
}
.lanBtn{
background: linear-gradient(180deg, #52F3C9 0%, #3ECEB2 100%) !important;
}
.loginBtn {
width: 600rpx;
height: 96rpx;
border-radius: 12rpx;
line-height: 96rpx;
color: #FFFFFF;
font-size: 32rpx;
text-align: center;
position: absolute;
bottom: 5%;
left: 50%;
margin-left: -300rpx;
}
</style>
+153
View File
@@ -0,0 +1,153 @@
<template>
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
<myNav :title="id?i18n.mine.safety.modify:i18n.mine.safety.add"></myNav>
<view class="listBox">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.username}}</text>
</view>
<view class="width-100b height-96">
<input class="width-100b height-96 font-30" type="text" v-model="username" :placeholder="i18n.mine.safety.input1"/>
</view>
</view>
<view class="listBox">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.card_num}}</text>
</view>
<view class="width-100b height-96">
<input class="flex-1 height-96 font-30 nummedium-font" type="text" v-model="card_num" :placeholder="i18n.mine.safety.input2"/>
</view>
</view>
<view class="listBox">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.bank_name}}</text>
</view>
<view class="width-100b height-96">
<input class="width-100b height-96 font-30" type="text" v-model="bank_name" :placeholder="i18n.mine.safety.input3"/>
</view>
</view>
<view class="listBox">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.bank_deposit}}</text>
</view>
<view class="width-100b height-96">
<input class="width-100b height-96 font-30" type="text" v-model="bank_deposit" :placeholder="i18n.mine.safety.input4"/>
</view>
</view>
<view class="listBox">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.bank_code}}</text>
</view>
<view class="width-100b height-96">
<input class="width-100b height-96 font-30" type="text" v-model="bank_code" :placeholder="i18n.mine.safety.input5"/>
</view>
</view>
<view class="flex align-center justify-center">
<button @click="add" class="cu-btn loginBtn">{{i18n.mine.safety.save}}</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
id:'',
username:"",
card_num:"",
bank_name:"",
bank_deposit:"",
bank_code:'',
flag:true,
theme: '',
}
},
onLoad(option) {
// console.log(option)
if(option.id){
this.id = option.id
this.username = option.username
this.card_num = option.card_num
this.bank_name = option.bank_name
this.bank_deposit = option.bank_deposit
this.bank_code = option.bank_code
}
},
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');
},
},
methods: {
add(){
if(!this.flag) return
if(this.username==""){
this.tos(this.i18n.mine.safety.input1)
return
}
if(this.card_num==""){
this.tos(this.i18n.mine.safety.input2)
return
}
if(this.bank_name==""){
this.tos(this.i18n.mine.safety.input3)
return
}
this.flag = false
uni.showLoading()
this.post('/my/add_collection', {
id: this.id,
username: this.username,
card_num: this.card_num,
bank_name: this.bank_name,
bank_deposit: this.bank_deposit,
bank_code:this.bank_code
}).then(res => {
this.flag = true
uni.hideLoading()
if(res.code == 1){
this.tos(res.msg)
setTimeout(()=>{
uni.navigateBack()
},500)
}
})
},
}
}
</script>
<style>
.listBox{
width: 100%;
/* height: 96rpx; */
padding: 0 45rpx;
margin-bottom: 1rpx;
/* background-color: #FFFFFF; */
}
.loginBtn{
width: 600rpx;
height: 96rpx;
margin: 50rpx auto;
background: linear-gradient(180deg, #52F3C9 0%, #3ECEB2 100%) !important;
border-radius: 12rpx;
line-height: 96rpx;
color: #FFFFFF;
font-size: 32rpx;
text-align: center;
}
</style>
+277
View File
@@ -0,0 +1,277 @@
<template>
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
<myNav :title="current==0?i18n.mine.safety.email:i18n.mine.safety.phone"></myNav>
<view class="padding-w-30">
<view v-if="current==0" class="width-690 padding-w-32">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.regist.phone}}</text>
</view>
<view class="width-100b height-96 radiu-12"
style="border-bottom: 1px solid rgba(191, 195, 199, 0.2);">
<input class="width-100b height-96 font-30" type="text" v-model="email"
:placeholder="i18n.regist.phoneTag" />
</view>
</view>
<view v-if="current==1" class="width-690 padding-w-32">
<view @click="kaiqiChina=true,countryType=true" class="width-100b height-96 flex align-center justify-between" style="border-bottom: 1px solid rgba(191, 195, 199, 0.2);">
<text class="font-30 bold-font">{{i18n.regist.guoji}}</text>
<text class="font-30 bold-font">{{seleCountry.label}}</text>
</view>
</view>
<view v-if="current==1" class="width-690 padding-w-32">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.regist.mobile}}</text>
</view>
<view class="width-100b height-96 radiu-12 flex align-center" style="border-bottom: 1px solid rgba(191, 195, 199, 0.2);">
<view v-if="seleCountry.value" class="width-120 height-66 margin-r-20 flex align-center justify-center" style="border: 1rpx solid #3ECEB2;border-radius: 6rpx;">
<text class="font-30 numbold-font" style="color: #3ECEB2;">+{{seleCountry.value}}</text>
</view>
<view v-else class="width-120 margin-r-20" style="border: 1rpx solid #3ECEB2;border-radius: 6rpx;">
<input class="flex-1 height-66 font-30 numbold-font text-center" type="number" maxlength="6" v-model="quhao"
:placeholder="i18n.regist.quhao" style="color: #3ECEB2;"/>
</view>
<input class="flex-1 height-96 font-30 numbold-font" type="number" v-model="phone"
:placeholder="i18n.regist.mobileTag" />
</view>
</view>
<view class="width-690 padding-w-32 margin-t-30">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.regist.code}}</text>
</view>
<view class="width-100b height-96 radiu-12 flex align-center justify-between"
style="border-bottom: 1px solid rgba(191, 195, 199, 0.2);">
<input class="flex-1 height-96 font-30" type="number" v-model="code"
:placeholder="i18n.regist.codeTag" />
<text @click="cutTime()" class="font-30 bold-font color-0165EE">{{codeText}}</text>
</view>
</view>
<view class="width-600" style="margin:130rpx auto;">
<button @click="bind" class="cu-btn loginBtn">{{i18n.regist.bind}}</button>
</view>
</view>
<u-picker @columnchange="change" @confirm="selectCountry" v-model="countryType" mode="selector" range-key="name" :range="rangelist"
:confirm-text="i18n.cycle.confirm" :cancel-text="i18n.cycle.cancel" :kaiqiChina="kaiqiChina"></u-picker>
</view>
</template>
<script>
import {
country
} from '../../../components/country.js'
export default {
data() {
return {
current: 0,
countryType:false,
quhao:'',
rangelist:country,
seleCountry:'',
phone: '',
email: '',
code: '',
kaiqiChina:true,
flag: true,
time: '获取验证码',
timeFlag: true,
theme: '',
}
},
computed: {
i18n() {
return this.$t('message');
},
codeText() {
if (this.time > 0) {
return this.time + " s"
} else {
return this.i18n.regist.get
}
}
},
onLoad(e) {
this.current = e.type
this.seleCountry = this.rangelist[0]
},
onShow() {
if (uni.getStorageSync("theme") == "dark") {
this.theme = this.$store.state.darkTheme
} else {
this.theme = this.$store.state.lightTheme
}
},
methods: {
change(index){
// console.log(index)
if(index==1){
this.kaiqiChina = false
}else{
this.kaiqiChina = true
}
},
selectCountry(index){
console.log(index)
this.seleCountry = this.rangelist[index]
},
bind() {
if (!this.flag) return
if(this.current==0){
if (this.email == '') {
this.tos(this.i18n.regist.phoneTag)
return
}
}
if(this.current==1){
if (this.seleCountry.value == ""&&this.quhao=="") {
this.tos(this.i18n.regist.quhao1)
return
}
if (this.phone == '') {
this.tos(this.i18n.regist.mobileTag)
return
}
}
if (this.code == '') {
this.tos(this.i18n.regist.codeTag)
return
}
uni.showLoading({
title: this.i18n.regist.loading,
mask: true
})
this.flag = false
var obj = {}
var url = {}
if(this.current==0){
url = '/my/bind_email'
obj = {
email: this.email,
captcha: this.code,
}
}
if(this.current==1){
url = '/my/bind_mobile'
obj = {
mobile: this.phone,
m_prefix:this.seleCountry.value?this.seleCountry.value:this.quhao,
captcha: this.code,
}
}
// console.log(obj)
this.post(url, obj).then(res => {
console.log(res)
uni.hideLoading()
this.flag = true
if (res.code == 1) {
this.tos(res.msg)
setTimeout(() => {
uni.navigateBack()
}, 500)
}
})
},
cutTime() {
if (!this.timeFlag) return
if (this.current == 0) {
if (this.email == "") {
this.tos(this.i18n.regist.phoneTag)
return
}
uni.showLoading({
title: this.i18n.regist.loading,
mask: true
})
this.timeFlag = false
this.post('/ems/send', {
email: this.email,
event: "changeemail",
}).then(res => {
uni.hideLoading()
if (res.code == 1) {
this.tos(res.msg)
this.time = 120
var that = this
let timeName = setInterval(() => {
if (that.time > 0) {
that.time--
} else {
that.time = 0
that.timeFlag = true
clearInterval(timeName)
}
}, 1000)
} else {
this.timeFlag = true
}
})
}
if (this.current == 1) {
if (this.seleCountry.value == ""&&this.quhao=="") {
this.tos(this.i18n.regist.quhao1)
return
}
if (this.phone == "") {
this.tos(this.i18n.regist.mobileTag)
return
}
uni.showLoading({
title: this.i18n.regist.loading,
mask: true
})
this.timeFlag = false
this.post('/sms/send', {
mobile: this.phone,
m_prefix:this.seleCountry.value?this.seleCountry.value:this.quhao,
event: "changemobile",
}).then(res => {
uni.hideLoading()
if (res.code == 1) {
this.tos(res.msg)
this.time = 60
var that = this
let timeName = setInterval(() => {
if (that.time > 0) {
that.time--
} else {
that.time = 0
that.timeFlag = true
clearInterval(timeName)
}
}, 1000)
} else {
this.timeFlag = true
}
})
}
}
}
}
</script>
<style lang="scss">
page {
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>
+237
View File
@@ -0,0 +1,237 @@
<template>
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
<myNav :title="i18n.mine.safety.title"></myNav>
<view class="padding">
<view class="width-100b height-50 flex align-center justify-between">
<text class="font-30">{{i18n.mine.safety.dengji}}</text>
<text :style="'color:'+levelColor+';'" class="padding-left-xl font-30">{{leveltitle}}</text>
</view>
<view class="width-100b flex align-center justify-between margin-top-xl">
<view class="cu-progress sm round striped active">
<view class="bj-FF4040" style="width:100%;"></view>
</view>
<view class="cu-progress sm round striped active margin-w-20">
<view class="bj-0081FF" style="width:100%;"></view>
</view>
<view class="cu-progress sm round striped active">
<view class="bj-00C481" style="width:100%;"></view>
</view>
</view>
</view>
<!-- <view @click="router.push('/pages/my/safety/real')" class="listBox">
<text class="font-30 color-333333">{{i18n.mine.safety.shiming}}</text>
<view class="line-height-96">
<text :style="'color:'+authColor+';'">{{auth_title}}</text>
<i class="cuIcon-right margin-l-17 color-C3C3C3"></i>
</view>
</view> -->
<view class="margin-c-16">
<!-- <view @click="is_google?tos(i18n.mine.safety.bangding):router.push('/pages/my/safety/Authenticator')" class="listBox">
<text class="font-30">{{i18n.mine.safety.guge}}</text>
<view class="line-height-96">
<text :class="is_google?'color-00C481':'color-FF4040'">{{is_google?i18n.mine.safety.bangding:i18n.mine.safety.nobangding}}</text>
<i class="cuIcon-right margin-l-17"></i>
</view>
</view> -->
<view @click="email?tos(i18n.mine.safety.bangding):router.push('/pages/my/safety/bind?type=0')" class="listBox">
<text class="font-30">{{i18n.mine.safety.email}}</text>
<view class="line-height-96">
<text :class="email?'color-00C481':'color-FF4040'">{{email?i18n.mine.safety.bangding:i18n.mine.safety.nobangding}}</text>
<i class="cuIcon-right margin-l-17"></i>
</view>
</view>
<view @click="mobile?tos(i18n.mine.safety.bangding):router.push('/pages/my/safety/bind?type=1')" class="listBox">
<text class="font-30">{{i18n.mine.safety.phone}}</text>
<view class="line-height-96">
<text :class="mobile?'color-00C481':'color-FF4040'">{{mobile?i18n.mine.safety.bangding:i18n.mine.safety.nobangding}}</text>
<i class="cuIcon-right margin-l-17"></i>
</view>
</view>
<view @click="router.push('/pages/my/safety/password')" class="listBox">
<text class="font-30">{{i18n.mine.safety.logpwd}}</text>
<view class="line-height-96">
<text class="color-C3C3C3">{{i18n.mine.safety.xiugai}}</text>
<i class="cuIcon-right margin-l-17"></i>
</view>
</view>
</view>
<view class="margin-c-16">
<view @click="router.push('/pages/my/safety/payment')" class="listBox">
<text class="font-30">{{i18n.mine.safety.mode}}</text>
<view class="line-height-96">
<i class="cuIcon-right margin-l-17"></i>
</view>
</view>
<view @click="router.push('/pages/my/safety/payword')" class="listBox">
<text class="font-30">{{i18n.mine.safety.paypwd}}</text>
<view class="line-height-96">
<text class="color-C3C3C3">{{i18n.mine.safety.xiugai}}</text>
<i class="cuIcon-right margin-l-17"></i>
</view>
</view>
<!-- <view class="listBox">
<text class="font-30 color-333333">{{i18n.mine.safety.apt}}{{apt_free}}%</text>
<view class="flex align-center">
<u-switch @change="changeApy_pay" v-model="checked" :loading="loading"></u-switch>
</view>
</view> -->
</view>
<p class="font-30 padding-w-30 margin-t-40">{{i18n.mine.safety.tips}}</p>
<view class="width-690 padding-30 margin-30-auto radiu-16" v-html="user_interest">
</view>
</view>
</template>
<script>
export default {
data() {
return {
level: 1, //安全等级 1,2,3
leveltitle: '',
is_google: false, //是否完成谷歌验证器
mobile:'',
email:'',
auth_status: 3, //审核状态:1=审核成功,2=审核中,3=未提交 0=失败
auth_title: '',
apy_pay: 0, //是否开启apt 0否 1是
apt_free:0,
user_interest: "", //权益
checked: false,
loading: false,
// 中间变量,避免在watch中多次回调,造成无限循环
controlStatus: false,
theme: '',
}
},
onShow() {
if (uni.getStorageSync("theme") == "dark") {
this.theme = this.$store.state.darkTheme
} else {
this.theme = this.$store.state.lightTheme
}
this.getInfo()
},
computed: {
i18n() {
return this.$t('message');
},
levelColor() {
let color;
let that = this
switch (this.level) {
case 1:
color = "#FF4040"
that.leveltitle = that.i18n.mine.safety.di
break;
case 2:
color = "#0081FF"
that.leveltitle = that.i18n.mine.safety.zhong
break;
case 3:
color = "#00C481"
that.leveltitle = that.i18n.mine.safety.gao
break;
default:
color = "#FF4040"
that.leveltitle = that.i18n.mine.safety.di
break;
}
return color
},
authColor() {
let color;
let that = this
switch (this.auth_status) {
case 0:
color = "#FF4040"
that.auth_title = that.i18n.mine.safety.type0
break;
case 1:
color = "#0081FF"
that.auth_title = that.i18n.mine.safety.type1
break;
case 2:
color = "#00C481"
that.auth_title = that.i18n.mine.safety.type2
break;
default:
color = "#FF4040"
that.auth_title = that.i18n.mine.safety.type0
break;
}
return color
}
},
methods: {
changeApy_pay(e){
// 等于false,意味着用户手动关闭了switch
if (this.controlStatus == true) return
this.controlStatus = true
// 重新打开switch,并让它处于加载中的状态
this.loading = true;
// 模拟向后端发起请求
this.getRestultFromServer();
},
getRestultFromServer() {
this.post('/my/set_apt').then(res => {
console.log('开启关闭apt手续费交易', res)
this.loading = false;
if (res.code == 1) {
// 后端允许用户关闭switch,改变checked状态,结束loading状态
}else{
// 后端出问题 不允许用户关闭switch,设置checked为true,结束loading状态
this.checked = !this.checked;
}
setTimeout(()=>{
this.controlStatus = false
},1000)
})
},
getInfo() {
this.post('/my/security').then(res => {
console.log('安全中心', res)
if (res.code == 1) {
this.level = res.data.level
this.is_google = res.data.is_google
this.email = res.data.email
this.mobile = res.data.mobile
this.auth_status = res.data.auth_status
this.apt_free = res.data.apt_free
if(res.data.apy_pay==1){
this.checked = true
}else{
this.checked = false
}
this.user_interest = res.data.user_interest
}
})
},
}
}
</script>
<style lang="scss">
.listBox {
width: 100%;
height: 96rpx;
padding: 0 30rpx;
// background-color: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
}
</style>
+319
View File
@@ -0,0 +1,319 @@
<template>
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
<myNav :title="i18n.mine.safety.logpwd"></myNav>
<!-- tab选择 -->
<view class="padding-w-40">
<view class="height-52 flex align-center justify-between">
<view @click="tabsChange(index)" class="flex-1 height-52 flex align-center justify-center"
v-for="(item,index) in tablist" :key="index">
<text :class="current==index?'':'color-C3C3C3'"
class="bold-font font-30">{{item}}</text>
</view>
</view>
<view class="height-20 relative">
<view :style="current==0?'left: 142rpx;':'left: 482rpx;'" class="heng"></view>
</view>
</view>
<view v-if="current==0" class="listBox">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.email}}</text>
</view>
<view class="width-100b height-96 line-height-96">
<text class="font-30 numbold-font color-999999">{{email||i18n.mine.safety.nobangding}}</text>
</view>
</view>
<view v-if="current==1" class="listBox">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.mobile}}</text>
</view>
<view class="width-100b height-96 flex align-center">
<view class="width-80 height-46 flex align-center justify-center" style="border: 1rpx solid #3ECEB2;border-radius: 6rpx;">
<text class="font-30 numbold-font">+{{seleCountry.value}}</text>
</view>
<text class="font-30 numbold-font color-999999">{{phone||i18n.mine.safety.nobangding}}</text>
</view>
</view>
<view class="listBox">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.code}}</text>
</view>
<view class="width-100b height-96 flex align-center justify-between">
<input class="flex-1 height-96 font-30 numbold-font" type="text" v-model="captcha"
:placeholder="i18n.mine.safety.codeTag" />
<text @click="cutTime()" class="font-30 bold-font color-0165EE">{{codeText}}</text>
</view>
</view>
<view class="listBox">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.logpwd1}}</text>
</view>
<view class="width-100b height-96">
<input class="width-100b height-96 font-30" type="text" v-model="pwd1" password
:placeholder="i18n.mine.safety.lp1" />
</view>
</view>
<view class="listBox">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.logpwd2}}</text>
</view>
<view class="width-100b height-96">
<input class="width-100b height-96 font-30" type="text" v-model="pwd2" password
:placeholder="i18n.mine.safety.lp2" />
</view>
</view>
<button @click="forgot" class="cu-btn loginBtn">{{i18n.mine.safety.queren}}</button>
<u-picker @columnchange="change" @confirm="selectCountry" v-model="countryType" mode="selector" range-key="name"
:range="rangelist" :confirm-text="i18n.cycle.confirm" :cancel-text="i18n.cycle.cancel"
:kaiqiChina="kaiqiChina"></u-picker>
</view>
</template>
<script>
import {
country
} from '../../../components/country.js'
export default {
data() {
return {
current: 0,
tablist: ['邮箱', '电话'],
countryType: false,
rangelist: country,
seleCountry: {
value:''
},
phone: '',
email: '',
pwd1: '',
pwd2: '',
captcha: '',
kaiqiChina: true,
flag: true,
time: '获取验证码',
timeFlag: true,
theme:''
}
},
computed: {
i18n() {
return this.$t('message');
},
codeText() {
if (this.time > 0) {
return this.time + " s"
} else {
return this.i18n.mine.safety.get
}
}
},
onLoad() {
// this.seleCountry = this.rangelist[0]
this.tablist = this.i18n.mine.safety.tablist
this.getUserinfo()
},
onShow() {
if (uni.getStorageSync("theme") == "dark") {
this.theme = this.$store.state.darkTheme
} else {
this.theme = this.$store.state.lightTheme
}
},
methods: {
change(index) {
// console.log(index)
if (index == 1) {
this.kaiqiChina = false
} else {
this.kaiqiChina = true
}
},
getUserinfo() {
this.post('/my/get_userinfo').then((res) => {
console.log('用户信息', res)
if (res.code == 1) {
this.phone = res.data.mobile
this.email = res.data.email
this.seleCountry.value = res.data.m_prefix
}
})
},
selectCountry(index) {
console.log(index)
this.seleCountry = this.rangelist[index]
},
// tabs通知swiper切换
tabsChange(index) {
this.current = index;
},
forgot() {
if (!this.flag) return
if (this.captcha == '') {
this.tos(this.i18n.mine.safety.codeTag)
return
}
if (this.pwd1 == '') {
this.tos(this.i18n.mine.safety.lp1)
return
}
if (this.pwd2 == '') {
this.tos(this.i18n.mine.safety.lp2)
return
}
if (this.pwd2 !== this.pwd1) {
this.tos(this.i18n.mine.safety.lp3)
return
}
uni.showLoading({
title: this.i18n.mine.safety.loading,
mask: true
})
var obj = {}
if (this.current == 0) {
obj = {
newpassword: this.pwd2,
captcha: this.captcha,
types: 'pwd',
type: 'email'
}
}
if (this.current == 1) {
obj = {
newpassword: this.pwd2,
captcha: this.captcha,
types: 'pwd',
type: 'mobile'
}
}
this.flag = false
this.post('/user/xiugaipwd', obj).then(res => {
console.log(res)
uni.hideLoading()
this.flag = true
if (res.code == 1) {
this.tos(res.msg)
setTimeout(() => {
uni.reLaunch({
url: '/pages/login/index'
})
}, 500)
}
})
},
cutTime() {
if (!this.timeFlag) return
if (this.current == 0) {
if (this.email == "") {
this.tos(this.i18n.mine.safety.nobangding)
return
}
uni.showLoading({
title: this.i18n.regist.loading,
mask: true
})
this.timeFlag = false
this.post('/ems/send', {
email: this.email,
event: "resetpwd",
}).then(res => {
uni.hideLoading()
if (res.code == 1) {
this.tos(res.msg)
this.time = 120
var that = this
let timeName = setInterval(() => {
if (that.time > 0) {
that.time--
} else {
that.time = 0
that.timeFlag = true
clearInterval(timeName)
}
}, 1000)
} else {
this.timeFlag = true
}
})
}
if (this.current == 1) {
if (this.phone == "") {
this.tos(this.i18n.mine.safety.nobangding)
return
}
uni.showLoading({
title: this.i18n.regist.loading,
mask: true
})
this.timeFlag = false
this.post('/sms/send', {
mobile: this.phone,
m_prefix:this.seleCountry.value,
event: "resetpwd",
}).then(res => {
uni.hideLoading()
if (res.code == 1) {
this.tos(res.msg)
this.time = 60
var that = this
let timeName = setInterval(() => {
if (that.time > 0) {
that.time--
} else {
that.time = 0
that.timeFlag = true
clearInterval(timeName)
}
}, 1000)
} else {
this.timeFlag = true
}
})
}
}
}
}
</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;
}
.heng {
width: 48rpx;
height: 4rpx;
background: linear-gradient(180deg, #52F3C9 0%, #3ECEB2 100%) !important;
position: absolute;
top: 10rpx;
transition: all 0.5s;
}
</style>
+126
View File
@@ -0,0 +1,126 @@
<template>
<view class="">
<z-paging :language="$i18n.locale" ref="paging" v-model="list" @query="queryList" :pageSize="20"
:style="'background-color: '+theme.bg+';color: '+theme.text">
<!-- 下拉刷新 -->
<custom-refresher slot="refresher" slot-scope="{refresherStatus}" :status="refresherStatus">
</custom-refresher>
<!-- 头部 -->
<myNav slot="top" :title="i18n.mine.safety.payment"></myNav>
<!-- 身体 -->
<view class="padding-b-200">
<view
:style="'background-color: '+theme.fu_bg+';color: '+theme.fu_text"
:class="[toggleDelay?'animation-slide-bottom':'']" class="listBox" v-for="(item,index) in list"
:key="index">
<view class="height-100 flex align-center justify-between">
<view class="height-70 flex align-center line-height-70">
<image class="width-50 height-50" src="/static/imgs/my/cardlogo.png" mode=""></image>
<text class="width-400 font-32 bold-font margin-l-20 hidden-nowrap-ellipsis-1">{{item.bank_name}}</text>
</view>
<!-- <view class="width-150 flex align-center justify-end">
<image class="width-50 height-50" src="/static/imgs/my/delectImg@2x.png" mode=""></image>
<image class="width-50 height-50" src="/static/imgs/my/updataImg@2x.png" mode=""></image>
</view> -->
<text @click="naviTo(item)"
class="font-30 bold-font color-0165EE">{{i18n.mine.safety.modify}}</text>
</view>
<view class="height-80 line-height-80">
<text class="font-40 numbold-font">{{item.card_num | cardFilter}}</text>
</view>
</view>
</view>
<button @click="router.push('/pages/my/safety/add')"
class="cu-btn loginBtn">{{i18n.mine.safety.add}}</button>
</z-paging>
</view>
</template>
<script>
export default {
data() {
return {
list: [],
toggleDelay: true,
theme: '',
}
},
computed: {
i18n() {
return this.$t('message');
},
},
filters: {
cardFilter(item) {
var tel1 = item.replace(item.substring(4, 10), "******")
return tel1
},
},
onLoad() {
setTimeout(() => {
this.toggleDelay = false
}, 1000)
},
onShow() {
if (uni.getStorageSync("theme") == "dark") {
this.theme = this.$store.state.darkTheme
} else {
this.theme = this.$store.state.lightTheme
}
},
methods: {
naviTo(item) {
// console.log(this.$u.queryParams(item));
uni.navigateTo({
url: '/pages/my/safety/add' + this.$u.queryParams(item)
})
},
queryList(pageNo, pageSize) {
this.toggleDelay = true
setTimeout(() => {
this.post('/my/collection_list', {
page: pageNo,
page_num: pageSize
}).then(res => {
if (res.code == 1) {
console.log(res)
this.$refs.paging.complete(res.data);
this.toggleDelay = false
}
})
}, 300)
},
}
}
</script>
<style lang="scss">
.listBox {
width: 690rpx;
height: 220rpx;
margin: 20rpx auto;
padding: 10rpx 24rpx;
// background: #FFFFFF;
box-shadow: 0rpx 4rpx 10rpx rgba(205, 206, 219, 0.2);
border-radius: 20rpx;
}
.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: fixed;
bottom: 104rpx;
left: 50%;
margin-left: -300rpx;
}
</style>
+317
View File
@@ -0,0 +1,317 @@
<template>
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
<myNav :title="i18n.mine.safety.paypwd"></myNav>
<!-- tab选择 -->
<view class="padding-w-40">
<view class="height-52 flex align-center justify-between">
<view @click="tabsChange(index)" class="flex-1 height-52 flex align-center justify-center"
v-for="(item,index) in tablist" :key="index">
<text :class="current==index?'':'color-C3C3C3'"
class="bold-font font-30">{{item}}</text>
</view>
</view>
<view class="height-20 relative">
<view :style="current==0?'left: 142rpx;':'left: 482rpx;'" class="heng"></view>
</view>
</view>
<view v-if="current==0" class="listBox">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.email}}</text>
</view>
<view class="width-100b height-96 line-height-96">
<text class="font-30 numbold-font color-999999">{{email||i18n.mine.safety.nobangding}}</text>
</view>
</view>
<view v-if="current==1" class="listBox">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.mobile}}</text>
</view>
<view class="width-100b height-96 flex align-center">
<view class="width-80 height-46 flex align-center justify-center" style="border: 1rpx solid #3ECEB2;border-radius: 6rpx;">
<text class="font-30 numbold-font">+{{seleCountry.value}}</text>
</view>
<text class="font-30 numbold-font color-999999">{{phone||i18n.mine.safety.nobangding}}</text>
</view>
</view>
<view class="listBox">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.code}}</text>
</view>
<view class="width-100b height-96 flex align-center justify-between">
<input class="flex-1 height-96 font-30 numbold-font" type="text" v-model="captcha"
:placeholder="i18n.mine.safety.codeTag" />
<text @click="cutTime()" class="font-30 bold-font color-0165EE">{{codeText}}</text>
</view>
</view>
<view class="listBox">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.logpwd1}}</text>
</view>
<view class="width-100b height-96">
<input class="width-100b height-96 font-30" type="text" v-model="pwd1" password
:placeholder="i18n.mine.safety.lp1" />
</view>
</view>
<view class="listBox">
<view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.logpwd2}}</text>
</view>
<view class="width-100b height-96">
<input class="width-100b height-96 font-30" type="text" v-model="pwd2" password
:placeholder="i18n.mine.safety.lp2" />
</view>
</view>
<button @click="forgot" class="cu-btn loginBtn">{{i18n.mine.safety.queren}}</button>
<u-picker @columnchange="change" @confirm="selectCountry" v-model="countryType" mode="selector" range-key="name"
:range="rangelist" :confirm-text="i18n.cycle.confirm" :cancel-text="i18n.cycle.cancel"
:kaiqiChina="kaiqiChina"></u-picker>
</view>
</template>
<script>
import {
country
} from '../../../components/country.js'
export default {
data() {
return {
current: 0,
tablist: ['邮箱', '电话'],
countryType: false,
rangelist: country,
seleCountry: {
value:''
},
phone: '',
email: '',
pwd1: '',
pwd2: '',
captcha: '',
kaiqiChina: true,
flag: true,
time: '获取验证码',
timeFlag: true,
theme:''
}
},
computed: {
i18n() {
return this.$t('message');
},
codeText() {
if (this.time > 0) {
return this.time + " s"
} else {
return this.i18n.mine.safety.get
}
}
},
onLoad() {
// this.seleCountry = this.rangelist[0]
this.tablist = this.i18n.mine.safety.tablist
this.getUserinfo()
},
onShow() {
if (uni.getStorageSync("theme") == "dark") {
this.theme = this.$store.state.darkTheme
} else {
this.theme = this.$store.state.lightTheme
}
},
methods: {
change(index) {
// console.log(index)
if (index == 1) {
this.kaiqiChina = false
} else {
this.kaiqiChina = true
}
},
getUserinfo() {
this.post('/my/get_userinfo').then((res) => {
console.log('用户信息', res)
if (res.code == 1) {
this.phone = res.data.mobile
this.email = res.data.email
this.seleCountry.value = res.data.m_prefix
}
})
},
selectCountry(index) {
console.log(index)
this.seleCountry = this.rangelist[index]
},
// tabs通知swiper切换
tabsChange(index) {
this.current = index;
},
forgot() {
if (!this.flag) return
if (this.captcha == '') {
this.tos(this.i18n.mine.safety.codeTag)
return
}
if (this.pwd1 == '') {
this.tos(this.i18n.mine.safety.lp1)
return
}
if (this.pwd2 == '') {
this.tos(this.i18n.mine.safety.lp2)
return
}
if (this.pwd2 !== this.pwd1) {
this.tos(this.i18n.mine.safety.lp3)
return
}
uni.showLoading({
title: this.i18n.mine.safety.loading,
mask: true
})
var obj = {}
if (this.current == 0) {
obj = {
newpassword: this.pwd2,
captcha: this.captcha,
types: 'pay_pwd',
type: 'email'
}
}
if (this.current == 1) {
obj = {
newpassword: this.pwd2,
captcha: this.captcha,
types: 'pay_pwd',
type: 'mobile'
}
}
this.flag = false
this.post('/user/xiugaipwd', obj).then(res => {
console.log(res)
uni.hideLoading()
this.flag = true
if (res.code == 1) {
this.tos(res.msg)
setTimeout(() => {
uni.navigateBack()
}, 500)
}
})
},
cutTime() {
if (!this.timeFlag) return
if (this.current == 0) {
if (this.email == "") {
this.tos(this.i18n.mine.safety.nobangding)
return
}
uni.showLoading({
title: this.i18n.regist.loading,
mask: true
})
this.timeFlag = false
this.post('/ems/send', {
email: this.email,
event: "resetpwd",
}).then(res => {
uni.hideLoading()
if (res.code == 1) {
this.tos(res.msg)
this.time = 120
var that = this
let timeName = setInterval(() => {
if (that.time > 0) {
that.time--
} else {
that.time = 0
that.timeFlag = true
clearInterval(timeName)
}
}, 1000)
} else {
this.timeFlag = true
}
})
}
if (this.current == 1) {
if (this.phone == "") {
this.tos(this.i18n.mine.safety.nobangding)
return
}
uni.showLoading({
title: this.i18n.regist.loading,
mask: true
})
this.timeFlag = false
this.post('/sms/send', {
mobile: this.phone,
m_prefix:this.seleCountry.value,
event: "resetpwd",
}).then(res => {
uni.hideLoading()
if (res.code == 1) {
this.tos(res.msg)
this.time = 60
var that = this
let timeName = setInterval(() => {
if (that.time > 0) {
that.time--
} else {
that.time = 0
that.timeFlag = true
clearInterval(timeName)
}
}, 1000)
} else {
this.timeFlag = true
}
})
}
}
}
}
</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;
}
.heng {
width: 48rpx;
height: 4rpx;
background: linear-gradient(180deg, #52F3C9 0%, #3ECEB2 100%) !important;
position: absolute;
top: 10rpx;
transition: all 0.5s;
}
</style>
+186
View File
@@ -0,0 +1,186 @@
<template>
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
<myNav :title="i18n.mine.safety.shiming"></myNav>
<view class="padding-w-22 padding-c-44">
<text class="font-36 bold-font">{{i18n.mine.safety.renz}}</text>
<view class="flex align-center margin-t-8 margin-b-40">
<text class="font-28 margin-r-20" :style="'color: '+theme.fu_text">{{top_auth}}</text>
<text @click="centerShow=true" class="font-28 color-0165EE">{{i18n.mine.safety.quanyi}}</text>
</view>
<text class="font-24 bold-font">{{i18n.mine.safety.tips1}}</text>
</view>
<view class="margin-t-72">
<view class="width-100b margin-b-32">
<view class="height-96 flex align-center justify-between padding-w-30">
<text class="font-30">{{i18n.mine.safety.shiming}}</text>
<view @click="renzheng1()" class="renzheng">{{authColor}}</view>
</view>
<view class="width-690 margin-0-auto height-1 bj-8B99A2" style="opacity: 0.2;"></view>
<view class="padding-30 font-24 color-C3C3C3">{{seat_auth_text}}</view>
</view>
<!-- <view class="width-100b margin-b-32">
<view class="height-96 flex align-center justify-between padding-w-30">
<text class="font-30">{{i18n.mine.safety.type2}}</text>
<view @click="renzheng2()" class="renzheng">{{auth_highColor}}</view>
</view>
<view class="width-690 margin-0-auto height-1 bj-8B99A2" style="opacity: 0.2;"></view>
<view class="padding-30 font-24 color-C3C3C3">{{high_auth_text}}</view>
</view> -->
</view>
<!-- 中间弹窗 -->
<u-popup v-model="centerShow" mode="center" border-radius="20">
<view class="width-500":style="'background-color: '+theme.bg+';color: '+theme.text" >
<view class="height-144 color-white flex align-center direction-column justify-center" style="
border-radius: 20rpx 20rpx 0rpx 0rpx;background-color: #3ECEB2;">
<text class="font-32 bold-font">{{i18n.mine.safety.quanyi}}</text>
<text class="font-28">{{top_auth}}</text>
</view>
<view class="padding-c-15 padding-w-22">
<view class="lanbox">
<text class="font-26">{{i18n.mine.safety.reg}}</text>
<i v-if="quanyi.is_reg" class="cuIcon-check color-00C481 weight-bold"></i>
<i v-else class="cuIcon-check color-00C481 weight-bold"></i>
</view>
<view class="lanbox">
<view class="">
<p class="font-26">{{i18n.mine.safety.wid}}</p>
<p class="font-20 color-C3C3C3">{{quanyi.wid_text}}</p>
</view>
<i v-if="quanyi.is_wid" class="cuIcon-check color-00C481 weight-bold"></i>
<i v-else class="cuIcon-check color-00C481 weight-bold"></i>
</view>
<view class="lanbox">
<text class="font-26">{{i18n.mine.safety.bb}}</text>
<i v-if="quanyi.is_bb" class="cuIcon-check color-00C481 weight-bold"></i>
<i v-else class="cuIcon-check color-00C481 weight-bold"></i>
</view>
<view class="lanbox">
<text class="font-26">{{i18n.mine.safety.hy}}</text>
<i v-if="quanyi.is_hy" class="cuIcon-check color-00C481 weight-bold"></i>
<i v-else class="cuIcon-check color-00C481 weight-bold"></i>
</view>
<view class="lanbox">
<text class="font-26">{{i18n.mine.safety.fb}}</text>
<i v-if="quanyi.is_fb" class="cuIcon-check color-00C481 weight-bold"></i>
<i v-else class="cuIcon-check color-00C481 weight-bold"></i>
</view>
<view class="lanbox">
<text class="font-26">{{i18n.mine.safety.lh}}</text>
<i v-if="quanyi.is_lh" class="cuIcon-check color-00C481 weight-bold"></i>
<i v-else class="cuIcon-check color-00C481 weight-bold"></i>
</view>
</view>
<view @click="centerShow=false" class="width-100b height-96 flex align-center justify-center">
<text class="font-26 color-0165EE">{{i18n.mine.safety.ok}}</text>
</view>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
centerShow:false,
quanyi:{},
seat_auth_text:'',
high_auth_text:'',
auth:null,
auth_high:null,
theme: '',
}
},
onShow() {
if (uni.getStorageSync("theme") == "dark") {
this.theme = this.$store.state.darkTheme
} else {
this.theme = this.$store.state.lightTheme
}
this.appAuth()
},
computed: {
i18n() {
return this.$t('message');
},
authColor() {
if(this.auth&&this.auth.status==1){
return this.i18n.mine.safety.type3
}else if(this.auth&&this.auth.status==2){
return this.i18n.mine.safety.shenhe
}else{
return this.i18n.mine.safety.type0
}
},
auth_highColor() {
if(this.auth_high&&this.auth_high.status==1){
return this.i18n.mine.safety.type3
}else if(this.auth_high&&this.auth_high.status==2){
return this.i18n.mine.safety.shenhe
}else{
return this.i18n.mine.safety.type0
}
},
top_auth() {
if(this.auth_high&&this.auth_high.status==1){
return this.i18n.mine.safety.type2
}else if(this.auth&&this.auth.status==1){
return this.i18n.mine.safety.type1
}else{
return this.i18n.mine.safety.type0
}
}
},
methods: {
appAuth() {
this.post('/my/auth_con').then(res => {
console.log('实名回显',res)
if (res.code == 1) {
this.quanyi = res.data.quanyi
this.seat_auth_text = res.data.seat_auth_text
this.high_auth_text = res.data.high_auth_text
this.auth = res.data.auth
this.auth_high = res.data.auth_high
}
})
},
renzheng1(){
this.router.push('/pages/my/safety/real_one')
},
renzheng2(){
if(this.auth&&this.auth.status==1){
this.router.push('/pages/my/safety/real_tow')
}else{
this.tos(this.i18n.mine.safety.shou)
}
}
}
}
</script>
<style lang="scss">
.renzheng{
// width: 120rpx;
padding: 0 18rpx;
height: 56rpx;
background: linear-gradient(180deg, #52F3C9 0%, #3ECEB2 100%);
border-radius: 10rpx;
font-size: 26rpx;
font-weight: 400;
line-height: 56rpx;
text-align: center;
color: #FFFFFF;
}
.lanbox{
height: 76rpx;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1rpx solid rgba(139,153,162,0.2);
}
</style>
+253
View File
@@ -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>
+192
View File
@@ -0,0 +1,192 @@
<template>
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
<myNav :title="i18n.mine.safety.type2"></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="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>
<button @click="real" class="cu-btn loginBtn" :disabled="auth_status==1||auth_status==2">{{auth_Btn}}</button>
</view>
</template>
<script>
export default {
data() {
return {
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_high != null){
this.auth_status = res.data.auth_high.status
this.description = res.data.auth_high.description
this.card_image = res.data.auth_high.card_images
this.card_upload = res.data.auth_high.card_image
this.cardbm_image = res.data.auth_high.cardbm_images
this.cardbm_upload = res.data.auth_high.cardbm_image
}
}
})
},
real() {
if(!this.flag) 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_high',{
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 lang="scss">
.loginBtn {
width: 600rpx;
height: 96rpx;
background: #0165EE !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>