Compare commits

..
9 Commits
Author SHA1 Message Date
li 6b02df55ab 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
2026-04-05 13:05:27 +08:00
li 4b2acdf0d8 fix: 划转页面账户选择器无法弹出
从/到 点击事件缺少 currType=true,导致 u-picker 不弹出
用户无法切换到合约账户
2026-03-31 11:23:02 +08:00
li e8d99fa6a4 fix: 首页公告改为水平跑马灯滚动效果
notice-bar 从 vertical(上下切换) 改为 horizontal(从右到左滚动)
speed=60 控制滚动速度
2026-03-31 11:13:55 +08:00
li 61c10db52a feat: 注册页面自动图形验证码
1. 移除邮箱/手机OTP发送逻辑
2. 新增算术图形验证码(如 15 + 3 = ?)
3. 点击验证码图片可刷新
4. 注册失败自动刷新验证码
2026-03-31 10:53:17 +08:00
li 6c085426de fix: 提款页面币种选择优化
1. "Select Coin"改为i18n国际化
2. BTC/ETH使用真实curr_id(3/4)替代静态占位ID
3. 手续费显示统一使用后端返回的process字段
2026-03-31 10:53:11 +08:00
li 2872bdc4e1 fix: 存款页面链类型过滤 + 卡顿修复
1. BTC选择时不显示ERC-20/TRC-20链选择器
2. ETH选择时过滤掉TRC-20,只保留ERC-20
3. USDT保留全部链选项
4. 静态币种(btc_static/eth_static)不调API,构造占位数据防卡顿
5. "Select Coin"改为i18n国际化
6. 银行卡存款按钮间距修复
2026-03-31 10:53:04 +08:00
li 86d0f9da49 feat: 转账页面合约账户支持 + 实时汇率显示
1. 合约账户作为转账选项(原FTKbot改为Contract)
2. BTC/ETH↔合约时显示USDT等值转换提示
3. 合约→现货时显示合约USDT可用余额
2026-03-31 10:46:20 +08:00
li ba0cead3af fix: 首页价格显示保留两位小数 + Coin Transfer菜单翻译
1. 首页价格从 price_jd 位小数改为固定2位小数
2. translateMenuNames 支持英文 Withdraw → Coin Transfer
2026-03-31 10:30:32 +08:00
li f20be4e719 fix: 英文国际化 Withdraw → Coin Transfer
首页菜单栏英文环境下 Withdraw 改为 Coin Transfer,仅修改英文
2026-03-31 10:30:26 +08:00
20 changed files with 379 additions and 577 deletions
+1 -1
View File
@@ -1046,7 +1046,7 @@ button.cuIcon.lg {
} }
.cu-load.over::after { .cu-load.over::after {
content: "没有更多了"; content: "No more data";
} }
.cu-load.erro::before { .cu-load.erro::before {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name" : "H5", "name" : "H5",
"appid" : "__UNI__268C995", "appid" : "__UNI__227C71A",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : 100, "versionCode" : 100,
+27 -36
View File
@@ -92,6 +92,17 @@
</view> </view>
</view> </view>
<!-- Contract 余额 -->
<view @click="current=3" class="accountRow" :style="'background-color:'+theme.fu_bg+';color:'+theme.text">
<view class="flex align-center justify-between">
<text class="font-28 bold-font">Contract</text>
<i class="cuIcon-right font-26 color-C3C3C3"></i>
</view>
<view class="margin-t-10">
<text class="font-38 numbold-font">{{ifcover?all.count_lh_usdt:'****'}} <text class="font-24 color-C3C3C3">USDT</text></text>
</view>
</view>
<!-- Fiat 余额 --> <!-- Fiat 余额 -->
<view @click="current=2" class="accountRow" :style="'background-color:'+theme.fu_bg+';color:'+theme.text"> <view @click="current=2" class="accountRow" :style="'background-color:'+theme.fu_bg+';color:'+theme.text">
<view class="flex align-center justify-between"> <view class="flex align-center justify-between">
@@ -119,7 +130,7 @@
</view> </view>
</view> </view>
<!-- Spot / Fiat / 理财 子页面 --> <!-- Spot / Fiat / Contract / Invest 子页面 -->
<view v-if="current==1||current==2||current==3||current==4" class=""> <view v-if="current==1||current==2||current==3||current==4" class="">
<view class="padding-w-30 height-90 flex align-center line-height-90"> <view class="padding-w-30 height-90 flex align-center line-height-90">
<u-switch v-model="ifHideCoin" size="30" active-color="#2DD1AF"></u-switch> <u-switch v-model="ifHideCoin" size="30" active-color="#2DD1AF"></u-switch>
@@ -167,7 +178,7 @@
data() { data() {
return { return {
statusBar: uni.getSystemInfoSync().statusBarHeight, statusBar: uni.getSystemInfoSync().statusBarHeight,
tabList: ['总览', '现货','法币','理财'], tabList: ['Overview', 'Spot','Fiat','Contract','Invest'],
current: 0, current: 0,
userinfo: {}, userinfo: {},
@@ -239,6 +250,9 @@
case 4: case 4:
obj = that.qq obj = that.qq
break; break;
case 5:
obj = that.all
break;
default: default:
obj = that.all obj = that.all
break; break;
@@ -276,13 +290,13 @@
break; break;
case 3: case 3:
if(that.ifHideCoin==true){ if(that.ifHideCoin==true){
if(that.lh.lh_arr){ if(that.lh && that.lh.lh_arr){
obj = that.lh.lh_arr.filter((item)=>{ obj = that.lh.lh_arr.filter((item)=>{
return item.num != 0 return item.num != 0
}) })
} }
}else{ }else{
obj = that.lh.lh_arr obj = (that.lh && that.lh.lh_arr) ? that.lh.lh_arr : []
} }
break; break;
case 4: case 4:
@@ -317,13 +331,13 @@
this.tabList[0]=this.i18n.assets.index.title1 this.tabList[0]=this.i18n.assets.index.title1
this.tabList[1]=this.i18n.assets.index.title2 this.tabList[1]=this.i18n.assets.index.title2
this.tabList[2]=this.i18n.assets.index.title3 this.tabList[2]=this.i18n.assets.index.title3
this.tabList[3]=this.i18n.licai.text1 this.tabList[3]='Contract'
this.tabList[4]=this.i18n.licai.text1
if(uni.getStorageSync('ifHideCoin')){ if(uni.getStorageSync('ifHideCoin')){
this.ifHideCoin = uni.getStorageSync('ifHideCoin') this.ifHideCoin = uni.getStorageSync('ifHideCoin')
} }
this.getWallet() this.getWallet()
this.getUserInfo() this.getUserInfo()
this.calcProfit()
}, },
methods: { methods: {
formatNum(val) { formatNum(val) {
@@ -350,35 +364,8 @@
}) })
}, },
calcProfit() { calcProfit() {
// 从资金流水计算盈亏 // totalPnl 固定为 0,不作计算
this.post('/wallet/index_detail', { // totalProfit 由 getWallet 从后端同步
page: 1,
size: 200,
}).then(res => {
if (res.code == 1) {
let profit = 0
let pnl = 0
let items = res.data.data || res.data || []
items.forEach(item => {
let price = Number(item.price || 0)
let desc = (item.description || '').toLowerCase()
if (desc.indexOf('profit') !== -1 || desc.indexOf('收益') !== -1 || desc.indexOf('盈') !== -1) {
if (item.cart == 1) {
profit += price
} else {
profit -= price
}
}
if (item.cart == 1) {
pnl += price
} else {
pnl -= price
}
})
this.totalProfit = profit
this.totalPnl = pnl
}
})
}, },
getWallet(){ getWallet(){
this.post('/wallet/wallet_index').then((res) => { this.post('/wallet/wallet_index').then((res) => {
@@ -389,6 +376,10 @@
this.fb = res.data.fb this.fb = res.data.fb
this.lh = res.data.lh this.lh = res.data.lh
this.qq = res.data.qq this.qq = res.data.qq
// Account Total Profit 与合约交易利润实时同步
this.totalProfit = res.data.total_profit || 0
// Account Total P&L 固定为 0
this.totalPnl = 0
} }
}) })
}, },
@@ -399,7 +390,7 @@
}) })
}, },
tabsChange(index) { tabsChange(index) {
if(index==3){ if(index==4){
uni.navigateTo({ uni.navigateTo({
url:'/pages/index/money/index' url:'/pages/index/money/index'
}) })
+98 -30
View File
@@ -6,7 +6,7 @@
<view class="borderBox" :style="'background-color: '+theme.fu_bg"> <view class="borderBox" :style="'background-color: '+theme.fu_bg">
<view class="height-260 padding-22 flex align-center justify-between"> <view class="height-260 padding-22 flex align-center justify-between">
<view class="flex-1"> <view class="flex-1">
<view @click="showPoup='accountL'" <view @click="showPoup='accountL',currType=true"
:class="[animationName?'animation-slide-bottom':'']" :class="[animationName?'animation-slide-bottom':'']"
class="width-100b height-110 flex align-center"> class="width-100b height-110 flex align-center">
<i class="cuIcon-title color-00C481"></i> <i class="cuIcon-title color-00C481"></i>
@@ -14,7 +14,7 @@
<text class="font-32">{{leftObj.name}}</text> <text class="font-32">{{leftObj.name}}</text>
</view> </view>
<view class="width-100b height-2 margin-c-4" style="background-color: #D1D3D8;"> </view> <view class="width-100b height-2 margin-c-4" style="background-color: #D1D3D8;"> </view>
<view @click="showPoup='accountR'" <view @click="showPoup='accountR',currType=true"
:class="[animationName?'animation-slide-top':'']" :class="[animationName?'animation-slide-top':'']"
class="width-100b height-110 flex align-center"> class="width-100b height-110 flex align-center">
<i class="cuIcon-title color-FF4040"></i> <i class="cuIcon-title color-FF4040"></i>
@@ -65,7 +65,11 @@
<view v-if="selectCurr.name" class="flex align-center"> <view v-if="selectCurr.name" class="flex align-center">
<text class="font-26">{{i18n.assets.transfer.usable}}</text> <text class="font-26">{{i18n.assets.transfer.usable}}</text>
<u-count-to fontSize="26" :color="theme.text" :endVal="available_num" :decimals="4" :duration="400"></u-count-to> <u-count-to fontSize="26" :color="theme.text" :endVal="available_num" :decimals="4" :duration="400"></u-count-to>
<text class="font-26">{{selectCurr.name}}</text> <text class="font-26">{{showConvertUnit}}</text>
</view>
<!-- 合约转换提示 -->
<view v-if="needConversion && inputNum > 0" class="margin-t-10 padding-w-22">
<text class="font-24 color-00C481"> {{convertedDisplay}}</text>
</view> </view>
<!-- <p class="font-26 color-333333">可用 {{available_num}} USDT</p> --> <!-- <p class="font-26 color-333333">可用 {{available_num}} USDT</p> -->
<view class="borderBox" :style="'background-color: '+theme.fu_bg"> <view class="borderBox" :style="'background-color: '+theme.fu_bg">
@@ -95,11 +99,11 @@
zhuanghu: [], zhuanghu: [],
leftObj: { leftObj: {
id: 1, id: 1,
name: '现货账户' name: 'Spot'
}, },
rightObj: { rightObj: {
id: 1, id: 3,
name: '现货账户' name: 'Contract'
}, },
currList: [], currList: [],
@@ -122,34 +126,34 @@
if(e.id){ if(e.id){
if(e.id==1||e.id==0){ if(e.id==1||e.id==0){
this.leftObj.id = 1 this.leftObj.id = 1
this.leftObj.name = this.i18n.assets.transfer.xh this.leftObj.name = 'Spot'
this.rightObj.id = 2 this.rightObj.id = 3
this.rightObj.name = this.i18n.assets.transfer.fb this.rightObj.name = 'Contract'
} }
if(e.id==2){ if(e.id==2){
this.leftObj.id = e.id this.leftObj.id = e.id
this.leftObj.name = this.i18n.assets.transfer.fb this.leftObj.name = 'Fiat'
this.rightObj.id = 1 this.rightObj.id = 1
this.rightObj.name = this.i18n.assets.transfer.xh this.rightObj.name = 'Spot'
} }
if(e.id==3){ if(e.id==3){
this.leftObj.id = e.id this.leftObj.id = e.id
this.leftObj.name = this.i18n.assets.transfer.lh this.leftObj.name = 'Contract'
this.rightObj.id = 1 this.rightObj.id = 1
this.rightObj.name = this.i18n.assets.transfer.xh this.rightObj.name = 'Spot'
} }
if(e.id==4){ if(e.id==4){
this.leftObj.id = e.id this.leftObj.id = e.id
this.leftObj.name = this.i18n.assets.transfer.qq this.leftObj.name = 'Quantitative'
this.rightObj.id = 1 this.rightObj.id = 1
this.rightObj.name = this.i18n.assets.transfer.xh this.rightObj.name = 'Spot'
} }
} }
if(e.rightid){ if(e.rightid){
this.leftObj.id = 1 this.leftObj.id = 1
this.leftObj.name = this.i18n.assets.transfer.xh this.leftObj.name = 'Spot'
this.rightObj.id = e.rightid this.rightObj.id = Number(e.rightid)
this.rightObj.name = this.i18n.assets.transfer.qq this.rightObj.name = this.getAccountName(Number(e.rightid))
} }
}, },
onShow() { onShow() {
@@ -164,25 +168,72 @@
i18n() { i18n() {
return this.$t('message'); return this.$t('message');
}, },
// 是否涉及合约账户且非USDT(需要汇率转换)
needConversion() {
if (!this.selectCurr || !this.selectCurr.name) return false
const isContract = this.leftObj.id == 3 || this.rightObj.id == 3
const isUSDT = this.selectCurr.curr_id == 1 || (this.selectCurr.name || '').toUpperCase() === 'USDT'
return isContract && !isUSDT
},
// 可用余额 — 合约→现货时显示合约USDT余额
available_num() { available_num() {
if (this.needConversion && this.leftObj.id == 3) {
// 从合约转出:显示合约USDT余额
let usdtItem = this.currList.find(c => c.curr_id == 1 || (c.name || '').toUpperCase() === 'USDT')
return usdtItem ? (usdtItem.num_lh || 0) : 0
}
if(this.leftObj.id==1){ if(this.leftObj.id==1){
return this.selectCurr.num || 0 //现货数量 return this.selectCurr.num || 0
}else if(this.leftObj.id==2){ }else if(this.leftObj.id==2){
return this.selectCurr.num_fb || 0 //现货数量 return this.selectCurr.num_fb || 0
}else if(this.leftObj.id==3){ }else if(this.leftObj.id==3){
return this.selectCurr.num_lh || 0 //现货数量 return this.selectCurr.num_lh || 0
}else if(this.leftObj.id==4){ }else if(this.leftObj.id==4){
return this.selectCurr.num_qq || 0 //现货数量 return this.selectCurr.num_qq || 0
}else{ }else{
return 0; return 0;
} }
}, },
// 显示可用余额的单位
showConvertUnit() {
if (this.needConversion && this.leftObj.id == 3) {
return 'USDT'
}
return this.selectCurr.name || ''
},
// 转换后显示
convertedDisplay() {
if (!this.needConversion || !this.inputNum || this.inputNum <= 0) return ''
let rate = parseFloat(this.selectCurr.exchange) || 0
if (rate <= 0) return ''
if (this.rightObj.id == 3) {
// Spot→Contract:输入BTC/ETH数量,显示USDT等值
return (this.inputNum * rate).toFixed(2) + ' USDT (Contract)'
} else {
// Contract→Spot:输入USDT数量,显示BTC/ETH等值
return (this.inputNum / rate).toFixed(8) + ' ' + this.selectCurr.name + ' (Spot)'
}
},
// 根据来源账户过滤可选货币
filteredCurrList() {
if (!this.currList || this.currList.length === 0) return []
if (this.leftObj.id == 3) {
// 合约账户转出 → 只显示USDT
return this.currList.filter(c => {
return c.curr_id == 1 || (c.name || '').toUpperCase() === 'USDT'
})
}
// 现货账户转出 → 只显示 BTC / ETH / USDT
return this.currList.filter(c => {
return ['BTC', 'ETH', 'USDT'].includes((c.name || '').toUpperCase())
})
},
count_obj() { count_obj() {
let obj = []; let obj = [];
var that = this var that = this
switch (this.showPoup) { switch (this.showPoup) {
case 'currency': case 'currency':
obj = that.currList obj = that.filteredCurrList
break; break;
case 'accountL': case 'accountL':
obj = that.zhuanghu.filter((item) => { obj = that.zhuanghu.filter((item) => {
@@ -195,13 +246,18 @@
}) })
break; break;
default: default:
obj = that.currList obj = that.filteredCurrList
break; break;
} }
return obj return obj
}, },
}, },
methods: { methods: {
// 账户ID → 英文名称映射
getAccountName(id) {
const map = {1:'Spot', 2:'Fiat', 3:'Contract', 4:'Quantitative'}
return map[id] || 'Account'
},
get_transfer() { get_transfer() {
this.post('/wallet/get_transfer').then((res) => { this.post('/wallet/get_transfer').then((res) => {
console.log('划转内容', res) console.log('划转内容', res)
@@ -210,14 +266,19 @@
// 确保 BTC 和 ETH 始终出现在币种列表中 // 确保 BTC 和 ETH 始终出现在币种列表中
let names = currData.map(c => (c.name || '').toUpperCase()) let names = currData.map(c => (c.name || '').toUpperCase())
if (!names.includes('BTC')) { if (!names.includes('BTC')) {
currData.push({ curr_id: 'btc_static', name: 'BTC', num: 0, num_fb: 0, num_lh: 0, num_qq: 0 }) currData.push({ curr_id: 3, name: 'BTC', num: 0, num_fb: 0, num_lh: 0, num_qq: 0 })
} }
if (!names.includes('ETH')) { if (!names.includes('ETH')) {
currData.push({ curr_id: 'eth_static', name: 'ETH', num: 0, num_fb: 0, num_lh: 0, num_qq: 0 }) currData.push({ curr_id: 4, name: 'ETH', num: 0, num_fb: 0, num_lh: 0, num_qq: 0 })
} }
this.currList = currData this.currList = currData
this.transfer_text = res.data.transfer_text this.transfer_text = res.data.transfer_text
this.zhuanghu = res.data.zhuanghu // 统一将账户名称英文化
const nameMap = {1:'Spot', 2:'Fiat', 3:'Contract', 4:'Quantitative'}
this.zhuanghu = (res.data.zhuanghu || []).map(item => ({
...item,
name: nameMap[item.id] || item.name
}))
if (this.selectIndex) { if (this.selectIndex) {
this.selectCurr = this.currList[this.selectIndex] this.selectCurr = this.currList[this.selectIndex]
} }
@@ -291,16 +352,23 @@
}, },
select(index) { select(index) {
if (this.showPoup == 'accountL') { if (this.showPoup == 'accountL') {
this.leftObj = this.count_obj[index] let item = this.count_obj[index]
this.leftObj = { id: item.id, name: this.getAccountName(item.id) }
// 切换来源账户后清空已选币种
this.selectCurr = ''
this.selectIndex = ''
this.inputNum = ''
console.log(this.leftObj.name) console.log(this.leftObj.name)
} }
if (this.showPoup == 'accountR') { if (this.showPoup == 'accountR') {
this.rightObj = this.count_obj[index] let item = this.count_obj[index]
this.rightObj = { id: item.id, name: this.getAccountName(item.id) }
this.inputNum = ''
console.log(this.rightObj.name) console.log(this.rightObj.name)
} }
if (this.showPoup == 'currency') { if (this.showPoup == 'currency') {
this.selectIndex = index this.selectIndex = index
this.selectCurr = this.currList[index] this.selectCurr = this.filteredCurrList[index]
this.inputNum = '' this.inputNum = ''
console.log(this.selectCurr) console.log(this.selectCurr)
} }
+4 -4
View File
@@ -326,19 +326,19 @@
XZ: '/static/imgs/quantify/xuanzhong@2x.png', XZ: '/static/imgs/quantify/xuanzhong@2x.png',
ispay: false, //支付方式弹窗 ispay: false, //支付方式弹窗
payid: 0, //选择的支付方式 payid: 0, //选择的支付方式
payname: '支付方式', payname: 'Payment Method',
paylist: [{ paylist: [{
id: 0, id: 0,
name: '全部' name: 'All'
}, },
{ {
id: 1, id: 1,
name: '银行卡' name: 'Bank Card'
} }
], ],
isnum: false, //交易金额弹窗 isnum: false, //交易金额弹窗
payprice: '', //交易金额 payprice: '', //交易金额
paypriceval: '交易金额', //交易金额文显 paypriceval: 'Transaction Amount',
number: '', number: '',
paypwd: '', paypwd: '',
+43 -5
View File
@@ -30,8 +30,8 @@
<view @click="router.push('/pages/index/notice')" class="width-750 height-80 padding-w-30 flex align-center justify-between notice-container" :style="'margin:0 30rpx 8rpx 30rpx'"> <view @click="router.push('/pages/index/notice')" class="width-750 height-80 padding-w-30 flex align-center justify-between notice-container" :style="'margin:0 30rpx 8rpx 30rpx'">
<view class="notice-left flex align-center"> <view class="notice-left flex align-center">
<image class="notice-icon-left" src="/static/imgs/index/naba.png" mode="aspectFit"></image> <image class="notice-icon-left" src="/static/imgs/index/naba.png" mode="aspectFit"></image>
<u-notice-bar class="flex-1" type="none" mode="vertical" :volume-icon="false" <u-notice-bar class="flex-1" type="none" mode="horizontal" :volume-icon="false"
:list="noticelist" color="#2C2C2C"></u-notice-bar> :list="noticelist" color="#2C2C2C" speed="60"></u-notice-bar>
</view> </view>
<view class="notice-right flex align-center justify-center"> <view class="notice-right flex align-center justify-center">
<image class="notice-icon-right" src="/static/imgs/index/gonggao.png" mode="aspectFit"></image> <image class="notice-icon-right" src="/static/imgs/index/gonggao.png" mode="aspectFit"></image>
@@ -67,7 +67,7 @@
</view> </view>
</view> </view>
<view class="follow-mid"> <view class="follow-mid">
<text class="follow-price">{{Number(item.usdt).toFixed(item.price_jd)}}</text> <text class="follow-price">{{Number(item.usdt).toFixed(2)}}</text>
<view class="follow-hot"> <view class="follow-hot">
<image class="follow-hot-icon" src="/static/imgs/index/huo.png" mode="aspectFit"></image> <image class="follow-hot-icon" src="/static/imgs/index/huo.png" mode="aspectFit"></image>
<text class="follow-hot-num">{{virtualFollowCount(item)}}</text> <text class="follow-hot-num">{{virtualFollowCount(item)}}</text>
@@ -384,9 +384,17 @@
}, },
} }
const lang = this.$i18n.locale || 'en-US' const lang = this.$i18n.locale || 'en-US'
// 从 locale 提取语言 key // 英文也需要翻译部分菜单名
if (lang === 'en-US') {
const enMap = { 'Withdraw': 'Coin Transfer' }
this.operatelist.forEach(item => {
if (item && item.name && enMap[item.name]) {
item.name = enMap[item.name]
}
})
return
}
let langKey = lang let langKey = lang
if (lang === 'en-US') return // 英文不需要翻译
const map = menuTranslations[langKey] const map = menuTranslations[langKey]
if (!map) return if (!map) return
this.operatelist.forEach(item => { this.operatelist.forEach(item => {
@@ -883,4 +891,34 @@
.swiper-container ::v-deep .u-swiper-indicator { .swiper-container ::v-deep .u-swiper-indicator {
display: none !important; display: none !important;
} }
/* ========== PC 端适配 — 全宽拉伸 ========== */
@media screen and (min-width: 768px) {
.width-750 {
width: 100% !important;
max-width: 100% !important;
}
.notice-container {
width: calc(100% - 60px) !important;
max-width: 100% !important;
margin: 0 30px 8px 30px !important;
}
.follow-section {
width: calc(100% - 60px) !important;
max-width: 100% !important;
margin: 0 30px !important;
}
.function-area {
width: 100% !important;
max-width: 100% !important;
}
.swiper-container {
width: 100% !important;
max-width: 100% !important;
}
}
</style> </style>
+7 -7
View File
@@ -88,32 +88,32 @@
show: false, show: false,
kindlist1: [{ kindlist1: [{
id: 1, id: 1,
name: '买入' name: 'Buy'
}, },
{ {
id: 2, id: 2,
name: '卖出' name: 'Sell'
} }
], ],
kindlist2: [{ kindlist2: [{
id: 1, id: 1,
name: '待付款' name: 'Pending Payment'
}, },
{ {
id: 2, id: 2,
name: '已付款' name: 'Paid'
}, },
{ {
id: 3, id: 3,
name: '申诉中' name: 'Appealing'
}, },
{ {
id: 4, id: 4,
name: '已完成' name: 'Completed'
}, },
{ {
id: 5, id: 5,
name: '已取消' name: 'Cancelled'
} }
], ],
kind1: '', kind1: '',
+54 -21
View File
@@ -17,19 +17,6 @@
<!-- 身体 --> <!-- 身体 -->
<view class="width-750"> <view class="width-750">
<view class="height-305 bgimg2 padding-t-10 padding-w-30"> <view class="height-305 bgimg2 padding-t-10 padding-w-30">
<!-- 币种 -->
<view style="background-color: rgba(255,255,255,0);"
class="width-100b height-96 radiu-20 padding-w-32 flex align-center justify-between">
<view @click="current=2,voucher_image='',voucher_image_up=''" class="padding-w-18 height-78 radiu-20 text-center line-height-78"
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
<text :class="current==2?'color-0165EE':''" class="font-28">{{i18n.fastRecord.text9}}</text>
</view>
<view @click="current=1,voucher_image='',voucher_image_up=''" class="padding-w-18 height-78 radiu-20 text-center line-height-78"
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
<text :class="current==1?'color-0165EE':''" class="font-28">{{i18n.fastRecord.tos2}}</text>
</view>
</view>
<view class=""> <view class="">
<view v-if="current==2" :style="'background-color: '+theme.fu_bg+';color: '+theme.text" <view v-if="current==2" :style="'background-color: '+theme.fu_bg+';color: '+theme.text"
class="width-100b radiu-20 padding-w-32 margin-t-20"> class="width-100b radiu-20 padding-w-32 margin-t-20">
@@ -49,7 +36,7 @@
<!-- 币种选择 --> <!-- 币种选择 -->
<view v-if="current==1" class="width-100b radiu-20 padding-w-32 padding-b-20 margin-t-20" <view v-if="current==1" class="width-100b radiu-20 padding-w-32 padding-b-20 margin-t-20"
:style="'background-color: '+theme.fu_bg+';color: '+theme.text"> :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
<view class="height-90 padding-t-27 font-28 weight-bold">Select Coin</view> <view class="height-90 padding-t-27 font-28 weight-bold">{{i18n.recharge.text1}}</view>
<view class="flex align-center flex-wrap"> <view class="flex align-center flex-wrap">
<view @click="changeCoinType(item)" v-for="(item,index) in coinTypes" :key="item.id" <view @click="changeCoinType(item)" v-for="(item,index) in coinTypes" :key="item.id"
:class="currid==item.id?'onbox':'offbox'" class="numbold-font margin-r-14">{{item.name}} :class="currid==item.id?'onbox':'offbox'" class="numbold-font margin-r-14">{{item.name}}
@@ -57,13 +44,13 @@
</view> </view>
</view> </view>
<!-- 链类型 --> <!-- 链类型BTC 时不显示链选择器其他币种显示过滤后的链列表 -->
<view v-if="current==1" class="width-100b radiu-20 padding-w-32 padding-b-20 margin-t-20" <view v-if="current==1 && filteredDetail.length > 1" class="width-100b radiu-20 padding-w-32 padding-b-20 margin-t-20"
:style="'background-color: '+theme.fu_bg+';color: '+theme.text"> :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
<view class="height-90 padding-t-27 font-28 weight-bold">{{i18n.recharge.text2}} <view class="height-90 padding-t-27 font-28 weight-bold">{{i18n.recharge.text2}}
</view> </view>
<view class="flex align-center flex-wrap"> <view class="flex align-center flex-wrap">
<view @click="changelian(item,index)" v-for="(item,index) in detail" <view @click="changelian(item,index)" v-for="(item,index) in filteredDetail"
:class="index==lian?'onbox':'offbox'" class="numbold-font margin-r-14">{{item.lian}} :class="index==lian?'onbox':'offbox'" class="numbold-font margin-r-14">{{item.lian}}
</view> </view>
</view> </view>
@@ -152,7 +139,7 @@
<view class="width-600 margin-0-auto margin-t-30"> <view class="width-600 margin-0-auto margin-t-30">
<u-button v-if="current==1" @click="chongzhi" class="custom-style" type="primary" style="background-color: #3ECEB2;">{{i18n.appeal.text1}} <u-button v-if="current==1" @click="chongzhi" class="custom-style" type="primary" style="background-color: #3ECEB2;">{{i18n.appeal.text1}}
</u-button> </u-button>
<u-button v-if="current==2" @click="yinhangka()" class="custom-style" type="primary" style="background-color: #3ECEB2; margin-top: 300rpx;">{{i18n.appeal.text1}} <u-button v-if="current==2" @click="yinhangka()" class="custom-style" type="primary" style="background-color: #3ECEB2; margin-top: 30rpx;">{{i18n.appeal.text1}}
</u-button> </u-button>
</view> </view>
</view> </view>
@@ -210,7 +197,7 @@
data() { data() {
return { return {
statusBar: uni.getSystemInfoSync().statusBarHeight, statusBar: uni.getSystemInfoSync().statusBarHeight,
current: 2, current: 1,
show: false, show: false,
bankshow:false, bankshow:false,
@@ -243,6 +230,28 @@
computed: { computed: {
i18n() { i18n() {
return this.$t('message'); return this.$t('message');
},
// 根据当前选中币种过滤链列表
// BTC: 只保留名称含 "BTC" 的链(或空)
// ETH: 过滤掉 TRC-20,只保留 ERC-20
// USDT: 保留全部
filteredDetail() {
if (!this.detail || this.detail.length === 0) return []
const name = (this.curr || '').toUpperCase()
if (name === 'BTC') {
// BTC 不需要链选择,只取第一条直接显示地址
return this.detail.slice(0, 1)
}
if (name === 'ETH') {
// ETH 只保留 ERC-20,过滤掉 TRC-20
const erc = this.detail.filter(item => {
const lian = (item.lian || '').toUpperCase()
return !lian.includes('TRC')
})
return erc.length > 0 ? erc : this.detail.slice(0, 1)
}
// USDT 及其他:保留全部
return this.detail
} }
}, },
onLoad(e) { onLoad(e) {
@@ -321,8 +330,17 @@
this.bankList = res.data.bank this.bankList = res.data.bank
this.detail = res.data.curr this.detail = res.data.curr
this.lian = 0 this.lian = 0
this.image = res.data.curr[0].qrcode // 根据当前币种过滤后取第一条链的地址显示
this.zhuan_address = res.data.curr[0].address const name = (this.curr || '').toUpperCase()
let firstChain = res.data.curr[0]
if (name === 'ETH' && res.data.curr.length > 0) {
const erc = res.data.curr.filter(item => {
return !(item.lian || '').toUpperCase().includes('TRC')
})
if (erc.length > 0) firstChain = erc[0]
}
this.image = firstChain ? firstChain.qrcode : ''
this.zhuan_address = firstChain ? firstChain.address : ''
} }
}) })
}, },
@@ -354,6 +372,21 @@
this.currid = item.id this.currid = item.id
this.voucher_image = '' this.voucher_image = ''
this.voucher_image_up = '' this.voucher_image_up = ''
this.lian = 0
// 静态条目(btc_static / eth_static)没有真实 API id
// 不调用 getdetails,改为构造占位链数据
if (item.id === 'btc_static') {
this.detail = [{ lian: 'BTC', qrcode: '', address: '' }]
this.image = ''
this.zhuan_address = ''
return
}
if (item.id === 'eth_static') {
this.detail = [{ lian: 'ERC-20', qrcode: '', address: '' }]
this.image = ''
this.zhuan_address = ''
return
}
this.getdetails(this.currid) this.getdetails(this.currid)
}, },
changecurr(item) { changecurr(item) {
+7 -6
View File
@@ -44,7 +44,7 @@
<!-- 币种选择 --> <!-- 币种选择 -->
<view v-if="current==1" class="width-100b radiu-20 padding-w-32 padding-b-20 margin-t-24" <view v-if="current==1" class="width-100b radiu-20 padding-w-32 padding-b-20 margin-t-24"
:style="'background-color: '+theme.fu_bg+';color: '+theme.text"> :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
<view class="height-116 padding-t-27 font-28 weight-bold">Select Coin</view> <view class="height-116 padding-t-27 font-28 weight-bold">{{i18n.withdraw.text1}}</view>
<view class="flex align-center flex-wrap"> <view class="flex align-center flex-wrap">
<view @click="changeCoinType(item)" v-for="(item,index) in coinTypes" :key="item.id" <view @click="changeCoinType(item)" v-for="(item,index) in coinTypes" :key="item.id"
:class="currid==item.id?'onbox':'offbox'" class="numbold-font margin-r-14">{{item.name}}</view> :class="currid==item.id?'onbox':'offbox'" class="numbold-font margin-r-14">{{item.name}}</view>
@@ -95,7 +95,7 @@
:style="'background-color: '+theme.fu_bg+';color: '+theme.text"> :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
<text class="font-28 weight-bold">{{i18n.withdraw.text7}}</text> <text class="font-28 weight-bold">{{i18n.withdraw.text7}}</text>
<view v-if="current==1" class="flex align-center"> <view v-if="current==1" class="flex align-center">
<text class="font-28 color-0165EE weight-bold">{{lian==0?data.erc_process:data.process}}</text> <text class="font-28 color-0165EE weight-bold">{{data.process}}</text>
<text class="font-28 numbold-font margin-l-10">{{curr}}</text> <text class="font-28 numbold-font margin-l-10">{{curr}}</text>
</view> </view>
<view v-if="current==2" class="flex align-center"> <view v-if="current==2" class="flex align-center">
@@ -268,9 +268,9 @@
code_m: '', code_m: '',
code_g: '', code_g: '',
flag: true, flag: true,
time: '获取验证码', time: 0,
timeFlag: true, timeFlag: true,
time2: '获取验证码', time2: 0,
timeFlag2: true, timeFlag2: true,
email: '', email: '',
mobile: '', mobile: '',
@@ -409,13 +409,14 @@
if (res.code == 1) { if (res.code == 1) {
this.list = res.data this.list = res.data
// 构建币种选择列表,确保包含 BTC 和 ETH // 构建币种选择列表,确保包含 BTC 和 ETH
// BTC curr_id=3, ETH curr_id=4(与后端 app_currency 表对应)
let types = [...res.data] let types = [...res.data]
let names = types.map(t => t.name.toUpperCase()) let names = types.map(t => t.name.toUpperCase())
if (!names.includes('BTC')) { if (!names.includes('BTC')) {
types.push({ id: 'btc_static', name: 'BTC' }) types.push({ id: 3, name: 'BTC' })
} }
if (!names.includes('ETH')) { if (!names.includes('ETH')) {
types.push({ id: 'eth_static', name: 'ETH' }) types.push({ id: 4, name: 'ETH' })
} }
this.coinTypes = types this.coinTypes = types
this.curr = res.data[0].name this.curr = res.data[0].name
+1 -1
View File
@@ -55,7 +55,7 @@
pwd2: '', pwd2: '',
captcha: '', captcha: '',
flag: true, flag: true,
time: '获取验证码', time: 0,
timeFlag: true, timeFlag: true,
theme: '', theme: '',
+32 -49
View File
@@ -47,17 +47,20 @@
<!-- 邀请码 --> <!-- 邀请码 -->
<view class="regField"> <view class="regField">
<text class="regLabel">{{i18n.regist.invitation}}</text> <text class="regLabel">{{i18n.regist.invitation}}</text>
<view class="regInputBox"> <view class="regInputBox" :style="codeFromLink?'opacity:0.6':''">
<input class="regInput" type="text" v-model="referral_code" :placeholder="i18n.regist.invitationTag" /> <input class="regInput" type="text" v-model="referral_code"
:disabled="codeFromLink"
:placeholder="i18n.regist.invitationTag" />
</view> </view>
</view> </view>
<!-- 验证码 --> <!-- 验证码 -->
<view class="regField"> <view class="regField">
<text class="regLabel">{{i18n.regist.code}}</text> <text class="regLabel">Verification Code</text>
<view class="regInputBox regInputRow"> <view class="regInputBox regInputRow">
<input class="regInput" type="text" v-model="code" :placeholder="i18n.regist.codeTag" /> <input class="regInput" type="text" v-model="code" :placeholder="i18n.regist.codeTag" />
<text class="regCodeBtn" @click="cutTime()">{{codeText}}</text> <image class="regCaptchaImg" :src="captchaImg" mode="aspectFit" @click="loadCaptcha()"></image>
<text class="regCaptchaRefresh" @click="loadCaptcha()"></text>
</view> </view>
</view> </view>
@@ -92,30 +95,26 @@
password2: '', password2: '',
code: '', code: '',
referral_code: '', referral_code: '',
codeFromLink: false,
flag: true, flag: true,
time: '获取验证码',
timeFlag: true,
agreed: false, agreed: false,
theme: '', theme: '',
captchaImg: '',
captchaKey: '',
} }
}, },
computed: { computed: {
i18n() { i18n() {
return this.$t('message'); return this.$t('message');
},
codeText() {
if (this.time > 0) {
return this.time + " s"
} else {
return this.i18n.regist.get
}
} }
}, },
onLoad(e) { onLoad(e) {
// 代理专属注册链接: 自动填入邀请码 // 代理专属注册链接: 自动填入邀请码并锁定
if (e && e.code) { if (e && e.code) {
this.referral_code = e.code this.referral_code = e.code
this.codeFromLink = true // 锁定,不允许用户修改
} }
this.loadCaptcha()
}, },
onShow() { onShow() {
if (uni.getStorageSync("theme") == "dark") { if (uni.getStorageSync("theme") == "dark") {
@@ -163,6 +162,7 @@
email: this.email, email: this.email,
password: this.password, password: this.password,
code: this.code, code: this.code,
captcha_key: this.captchaKey,
referral_code: this.referral_code, referral_code: this.referral_code,
} }
if (this.mobile) { if (this.mobile) {
@@ -179,40 +179,17 @@
url: '/pages/login/index?email=' + this.email url: '/pages/login/index?email=' + this.email
}) })
}, 500) }, 500)
} else {
// 注册失败刷新验证码
this.loadCaptcha()
} }
}) })
}, },
cutTime() { loadCaptcha() {
if (!this.timeFlag) return this.post('/common/captcha', {}).then(res => {
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: "register",
}).then(res => {
uni.hideLoading()
if (res.code == 1) { if (res.code == 1) {
this.tos(res.msg) this.captchaImg = res.data.captcha_img
this.time = 120 this.captchaKey = res.data.captcha_key
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
} }
}) })
} }
@@ -289,13 +266,19 @@
color: #111111; color: #111111;
} }
.regCodeBtn { .regCaptchaImg {
font-size: 26rpx; width: 240rpx;
font-weight: 700; height: 80rpx;
color: #1A74FF;
margin-left: 18rpx; margin-left: 18rpx;
flex: 0 0 auto; flex: 0 0 auto;
white-space: nowrap; border-radius: 6rpx;
}
.regCaptchaRefresh {
font-size: 36rpx;
color: #1A74FF;
margin-left: 12rpx;
flex: 0 0 auto;
} }
.regAgree { .regAgree {
+5 -5
View File
@@ -88,26 +88,26 @@
export default { export default {
data() { data() {
return { return {
time: '获取验证码', time: 0,
timeFlag: true, timeFlag: true,
time2: '获取验证码', time2: 0,
timeFlag2: true, timeFlag2: true,
email: '', email: '',
mobile: '', mobile: '',
list: [{ list: [{
id: 1, id: 1,
name: '只读', name: 'Read Only',
type: false, type: false,
}, },
{ {
id: 2, id: 2,
name: '提现', name: 'Withdraw',
type: false, type: false,
}, },
{ {
id: 3, id: 3,
name: '交易', name: 'Trade',
type: false, type: false,
} }
], ],
+1 -1
View File
@@ -77,7 +77,7 @@
code: '', code: '',
kaiqiChina:true, kaiqiChina:true,
flag: true, flag: true,
time: '获取验证码', time: 0,
timeFlag: true, timeFlag: true,
theme: '', theme: '',
+42 -199
View File
@@ -2,51 +2,6 @@
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;"> <view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
<myNav :title="i18n.mine.safety.logpwd"></myNav> <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="listBox">
<view class="width-100b height-96 line-height-96"> <view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.logpwd1}}</text> <text class="font-30 bold-font">{{i18n.mine.safety.logpwd1}}</text>
@@ -67,59 +22,43 @@
</view> </view>
</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" <button @click="forgot" class="cu-btn loginBtn">{{i18n.mine.safety.queren}}</button>
:range="rangelist" :confirm-text="i18n.cycle.confirm" :cancel-text="i18n.cycle.cancel"
:kaiqiChina="kaiqiChina"></u-picker>
</view> </view>
</template> </template>
<script> <script>
import {
country
} from '../../../components/country.js'
export default { export default {
data() { data() {
return { return {
current: 0,
tablist: ['邮箱', '电话'],
countryType: false,
rangelist: country,
seleCountry: {
value:''
},
phone: '',
email: '',
pwd1: '', pwd1: '',
pwd2: '', pwd2: '',
captcha: '', captchaCode: '',
kaiqiChina: true, captchaKey: '',
captchaImg: '',
flag: true, flag: true,
time: '获取验证码', theme: ''
timeFlag: true,
theme:''
} }
}, },
computed: { computed: {
i18n() { i18n() {
return this.$t('message'); return this.$t('message');
},
codeText() {
if (this.time > 0) {
return this.time + " s"
} else {
return this.i18n.mine.safety.get
}
} }
}, },
onLoad() { onLoad() {
// this.seleCountry = this.rangelist[0] this.loadCaptcha()
this.tablist = this.i18n.mine.safety.tablist
this.getUserinfo()
}, },
onShow() { onShow() {
if (uni.getStorageSync("theme") == "dark") { if (uni.getStorageSync("theme") == "dark") {
@@ -129,37 +68,19 @@
} }
}, },
methods: { methods: {
change(index) { loadCaptcha() {
// console.log(index) this.post('/common/captcha', {}).then(res => {
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) { if (res.code == 1) {
this.phone = res.data.mobile this.captchaImg = res.data.captcha_img
this.email = res.data.email this.captchaKey = res.data.captcha_key
this.seleCountry.value = res.data.m_prefix this.captchaCode = ''
} }
}) })
}, },
selectCountry(index) {
console.log(index)
this.seleCountry = this.rangelist[index]
},
// tabs通知swiper切换
tabsChange(index) {
this.current = index;
},
forgot() { forgot() {
if (!this.flag) return if (!this.flag) return
if (this.captchaCode == '') {
if (this.captcha == '') { this.tos('Please enter verification code')
this.tos(this.i18n.mine.safety.codeTag)
return return
} }
if (this.pwd1 == '') { if (this.pwd1 == '') {
@@ -174,117 +95,39 @@
this.tos(this.i18n.mine.safety.lp3) this.tos(this.i18n.mine.safety.lp3)
return return
} }
uni.showLoading({ uni.showLoading({ title: this.i18n.mine.safety.loading, mask: true })
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.flag = false
this.post('/user/xiugaipwd', obj).then(res => { this.post('/user/xiugaipwd', {
console.log(res) newpassword: this.pwd2,
captcha: this.captchaCode,
captcha_key: this.captchaKey,
types: 'pwd'
}).then(res => {
uni.hideLoading() uni.hideLoading()
this.flag = true this.flag = true
if (res.code == 1) { if (res.code == 1) {
this.tos(res.msg) this.tos(res.msg)
setTimeout(() => { setTimeout(() => {
uni.reLaunch({ uni.reLaunch({ url: '/pages/login/index' })
url: '/pages/login/index'
})
}, 500) }, 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 { } else {
that.time = 0 this.loadCaptcha()
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> </script>
<style> <style>
.captchaImg {
width: 240rpx;
height: 80rpx;
margin-left: 18rpx;
flex: 0 0 auto;
border-radius: 6rpx;
}
.listBox { .listBox {
width: 100%; width: 100%;
/* height: 96rpx; */ /* height: 96rpx; */
+41 -196
View File
@@ -2,51 +2,6 @@
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;"> <view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
<myNav :title="i18n.mine.safety.paypwd"></myNav> <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="listBox">
<view class="width-100b height-96 line-height-96"> <view class="width-100b height-96 line-height-96">
<text class="font-30 bold-font">{{i18n.mine.safety.logpwd1}}</text> <text class="font-30 bold-font">{{i18n.mine.safety.logpwd1}}</text>
@@ -67,59 +22,43 @@
</view> </view>
</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" <button @click="forgot" class="cu-btn loginBtn">{{i18n.mine.safety.queren}}</button>
:range="rangelist" :confirm-text="i18n.cycle.confirm" :cancel-text="i18n.cycle.cancel"
:kaiqiChina="kaiqiChina"></u-picker>
</view> </view>
</template> </template>
<script> <script>
import {
country
} from '../../../components/country.js'
export default { export default {
data() { data() {
return { return {
current: 0,
tablist: ['邮箱', '电话'],
countryType: false,
rangelist: country,
seleCountry: {
value:''
},
phone: '',
email: '',
pwd1: '', pwd1: '',
pwd2: '', pwd2: '',
captcha: '', captchaCode: '',
kaiqiChina: true, captchaKey: '',
captchaImg: '',
flag: true, flag: true,
time: '获取验证码', theme: ''
timeFlag: true,
theme:''
} }
}, },
computed: { computed: {
i18n() { i18n() {
return this.$t('message'); return this.$t('message');
},
codeText() {
if (this.time > 0) {
return this.time + " s"
} else {
return this.i18n.mine.safety.get
}
} }
}, },
onLoad() { onLoad() {
// this.seleCountry = this.rangelist[0] this.loadCaptcha()
this.tablist = this.i18n.mine.safety.tablist
this.getUserinfo()
}, },
onShow() { onShow() {
if (uni.getStorageSync("theme") == "dark") { if (uni.getStorageSync("theme") == "dark") {
@@ -129,37 +68,19 @@
} }
}, },
methods: { methods: {
change(index) { loadCaptcha() {
// console.log(index) this.post('/common/captcha', {}).then(res => {
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) { if (res.code == 1) {
this.phone = res.data.mobile this.captchaImg = res.data.captcha_img
this.email = res.data.email this.captchaKey = res.data.captcha_key
this.seleCountry.value = res.data.m_prefix this.captchaCode = ''
} }
}) })
}, },
selectCountry(index) {
console.log(index)
this.seleCountry = this.rangelist[index]
},
// tabs通知swiper切换
tabsChange(index) {
this.current = index;
},
forgot() { forgot() {
if (!this.flag) return if (!this.flag) return
if (this.captchaCode == '') {
if (this.captcha == '') { this.tos('Please enter verification code')
this.tos(this.i18n.mine.safety.codeTag)
return return
} }
if (this.pwd1 == '') { if (this.pwd1 == '') {
@@ -174,30 +95,14 @@
this.tos(this.i18n.mine.safety.lp3) this.tos(this.i18n.mine.safety.lp3)
return return
} }
uni.showLoading({ uni.showLoading({ title: this.i18n.mine.safety.loading, mask: true })
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.flag = false
this.post('/user/xiugaipwd', obj).then(res => { this.post('/user/xiugaipwd', {
console.log(res) newpassword: this.pwd2,
captcha: this.captchaCode,
captcha_key: this.captchaKey,
types: 'pay_pwd'
}).then(res => {
uni.hideLoading() uni.hideLoading()
this.flag = true this.flag = true
if (res.code == 1) { if (res.code == 1) {
@@ -205,84 +110,24 @@
setTimeout(() => { setTimeout(() => {
uni.navigateBack() uni.navigateBack()
}, 500) }, 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 { } else {
that.time = 0 this.loadCaptcha()
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> </script>
<style> <style>
.captchaImg {
width: 240rpx;
height: 80rpx;
margin-left: 18rpx;
flex: 0 0 auto;
border-radius: 6rpx;
}
.listBox { .listBox {
width: 100%; width: 100%;
/* height: 96rpx; */ /* height: 96rpx; */
+2 -2
View File
@@ -202,7 +202,7 @@
</view> </view>
<view @click="moreran = !moreran" class=""> <view @click="moreran = !moreran" class="">
<view class=""> <view class="">
{{moreran?'更多':'收起'}} {{moreran?'More':'Collapse'}}
</view> </view>
</view> </view>
</view> </view>
@@ -451,7 +451,7 @@
"low": 0, "low": 0,
"high": 0, "high": 0,
}, },
list: ['量化信息', 'K线'], list: ['Quantify Info', 'K-Line'],
current: 0, current: 0,
theme: '', theme: '',
+2 -2
View File
@@ -128,7 +128,7 @@ module.exports = {
text2: 'ICO', text2: 'ICO',
text3: 'FTKpool', text3: 'FTKpool',
text4: 'Deposit', text4: 'Deposit',
text5: 'Withdraw', text5: 'Coin Transfer',
text6: 'Derivatives', text6: 'Derivatives',
text7: 'FTKbot', text7: 'FTKbot',
text8: 'Live Chat', text8: 'Live Chat',
@@ -789,7 +789,7 @@ module.exports = {
loading:'Loading', loading:'Loading',
xh:'Spot', xh:'Spot',
fb:'Fiat', fb:'Fiat',
lh:'FTKbot', lh:'Contract',
confirm:'Confirm', confirm:'Confirm',
cancel:'Cancel', cancel:'Cancel',
}, },
@@ -29,7 +29,7 @@
//空数据描述文字 //空数据描述文字
emptyViewText: { emptyViewText: {
type: String, type: String,
default: '没有数据哦~' default: 'No data'
}, },
//空数据图片 //空数据图片
emptyViewImg: { emptyViewImg: {
@@ -34,8 +34,8 @@ const t = {
}, },
loadingMoreNoMoreText: { loadingMoreNoMoreText: {
'en': 'No more data', 'en': 'No more data',
'zh-cn': '没有更多了', 'zh-cn': 'No more data',
'zh-hant-cn': '沒有更多了', 'zh-hant-cn': 'No more data',
}, },
loadingMoreFailText: { loadingMoreFailText: {
'en': 'Load failed,click to reload', 'en': 'Load failed,click to reload',
@@ -114,14 +114,14 @@ function _getPrivateLanguage(myLanguage, followSystemLanguage = true) {
language = language.replace(reg, '-'); language = language.replace(reg, '-');
if (language.indexOf('zh') !== -1) { if (language.indexOf('zh') !== -1) {
if (language === 'zh' || language === 'zh-cn' || language.indexOf('zh-hans') !== -1) { if (language === 'zh' || language === 'zh-cn' || language.indexOf('zh-hans') !== -1) {
return 'zh-cn'; return 'en';
} }
return 'zh-hant-cn'; return 'en';
} }
if (language.indexOf('en') !== -1) { if (language.indexOf('en') !== -1) {
return 'en'; return 'en';
} }
return 'zh-cn'; return 'en';
} }
export default { export default {
@@ -76,9 +76,9 @@
type: Object, type: Object,
default () { default () {
return { return {
loadmore: '加载更多', loadmore: 'Load more',
loading: '正在加载...', loading: 'Loading...',
nomore: '没有更多了' nomore: 'No more data'
} }
} }
}, },