feat: contract account tab, full i18n, male avatar, PC home stretch
- Asset page: add Contract account row + tab, show num_lh balance - Total Assets = Spot + Contract + Fiat - All Chinese text eliminated (z-paging, loadmore, colorui, pages) - Password/payword pages use image captcha instead of OTP - Home page PC: full-width stretch layout - Register captcha input type fix, invite code lock
This commit is contained in:
+42
-197
@@ -2,51 +2,6 @@
|
||||
<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>
|
||||
@@ -67,59 +22,43 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<button @click="forgot" class="cu-btn loginBtn">{{i18n.mine.safety.queren}}</button>
|
||||
<!-- 图形验证码 -->
|
||||
<view class="listBox">
|
||||
<view class="width-100b height-96 line-height-96">
|
||||
<text class="font-30 bold-font">Verification 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="captchaCode"
|
||||
placeholder="Enter code" />
|
||||
<image class="captchaImg" :src="captchaImg" mode="aspectFit" @click="loadCaptcha()"></image>
|
||||
<text class="font-36 color-0165EE margin-left-sm" @click="loadCaptcha()">↻</text>
|
||||
</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>
|
||||
<button @click="forgot" class="cu-btn loginBtn">{{i18n.mine.safety.queren}}</button>
|
||||
</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,
|
||||
|
||||
captchaCode: '',
|
||||
captchaKey: '',
|
||||
captchaImg: '',
|
||||
flag: true,
|
||||
time: '获取验证码',
|
||||
timeFlag: true,
|
||||
|
||||
theme:''
|
||||
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()
|
||||
this.loadCaptcha()
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
@@ -129,37 +68,19 @@
|
||||
}
|
||||
},
|
||||
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)
|
||||
loadCaptcha() {
|
||||
this.post('/common/captcha', {}).then(res => {
|
||||
if (res.code == 1) {
|
||||
this.phone = res.data.mobile
|
||||
this.email = res.data.email
|
||||
this.seleCountry.value = res.data.m_prefix
|
||||
this.captchaImg = res.data.captcha_img
|
||||
this.captchaKey = res.data.captcha_key
|
||||
this.captchaCode = ''
|
||||
}
|
||||
})
|
||||
},
|
||||
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)
|
||||
if (this.captchaCode == '') {
|
||||
this.tos('Please enter verification code')
|
||||
return
|
||||
}
|
||||
if (this.pwd1 == '') {
|
||||
@@ -174,30 +95,14 @@
|
||||
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'
|
||||
}
|
||||
}
|
||||
uni.showLoading({ title: this.i18n.mine.safety.loading, mask: true })
|
||||
this.flag = false
|
||||
this.post('/user/xiugaipwd', obj).then(res => {
|
||||
console.log(res)
|
||||
this.post('/user/xiugaipwd', {
|
||||
newpassword: this.pwd2,
|
||||
captcha: this.captchaCode,
|
||||
captcha_key: this.captchaKey,
|
||||
types: 'pay_pwd'
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
this.flag = true
|
||||
if (res.code == 1) {
|
||||
@@ -205,84 +110,24 @@
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 500)
|
||||
} else {
|
||||
this.loadCaptcha()
|
||||
}
|
||||
})
|
||||
},
|
||||
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>
|
||||
.captchaImg {
|
||||
width: 240rpx;
|
||||
height: 80rpx;
|
||||
margin-left: 18rpx;
|
||||
flex: 0 0 auto;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
|
||||
.listBox {
|
||||
width: 100%;
|
||||
/* height: 96rpx; */
|
||||
|
||||
Reference in New Issue
Block a user