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
@@ -0,0 +1,155 @@
<template>
<view>
<view @click="router.push('/pages/transaction/details?id='+item.id+'&coin_id='+item.coin_id)" class="listBox" v-for="(item,index) in list" :key="index"
:style="'background-color: '+background+';color: '+color">
<view class="width-100b height-100 flex align-center justify-between" style="border-bottom: 1px solid rgba(209,209,209,0.3)">
<view class="height-90 flex direction-column align-start justify-center">
<view class="flex align-center ">
<text class="font-28 bold-font numbold-font">{{item.type=='buy'?i18n.lever.buyIn:i18n.lever.sellout}}</text>
<text class="font-26 numbold-font margin-l-10" :style="'color:'+fu_color">{{item.coinname}}</text>
</view>
<text class="font-20 numbold-font" :style="'color:'+fu_color">{{item.createtime}}</text>
</view>
<button v-if="currentIndex==0||currentIndex==1" @click.stop="revocation(item.id,item.coin_id)"
class="cu-btn loginBtn" :style="'border: 1rpx solid '+color+';color: '+color">{{i18n.lever.revoke}}</button>
<text v-if="currentIndex==4" class="font-26 color-0165EE">{{statusFilter(item.status)}}</text>
</view>
<view class="width-100b height-80 flex align-center justify-between margin-t-10">
<view class="flex-1 height-80 flex direction-column align-start justify-around">
<text class="font-26 nummedium-font">{{Number(item.price).toFixed(price_jd)}}</text>
<text v-if="item.status==0||item.status==3" class="font-24 numbold-font" :style="'color:'+fu_color">{{i18n.lever.entPrice}}</text>
<text v-if="item.status==1||item.status==2" class="font-24 numbold-font" :style="'color:'+fu_color">{{i18n.lever.closing}}</text>
</view>
<view class="flex-1 height-80 flex direction-column align-center justify-around">
<text class="font-26 nummedium-font">{{item.num}}</text>
<text v-if="item.status==0||item.status==1||item.status==3" class="font-24 numbold-font" :style="'color:'+fu_color">{{i18n.lever.entNum}}</text>
<text v-if="item.status==2" class="font-24 numbold-font" :style="'color:'+fu_color">{{i18n.lever.closNum}}</text>
</view>
<view class="flex-1 height-80 flex direction-column align-end justify-around">
<text class="font-26 nummedium-font">{{Number(item.amount).toFixed(price_jd)}}USDT</text>
<text v-if="item.status==0||item.status==1||item.status==3" class="font-24 numbold-font" :style="'color:'+fu_color">{{i18n.lever.entall}}</text>
<text v-if="item.status==2" class="font-24 numbold-font" :style="'color:'+fu_color">{{i18n.lever.closall}}</text>
</view>
</view>
<view class="width-100b height-80 margin-t-10 flex align-center justify-between">
<view class="flex-1 height-80 flex direction-column align-start justify-around">
<text class="font-26 nummedium-font">{{item.cart=='limit'?i18n.lever.tap1:i18n.lever.tap2}}</text>
<text class="font-24 numbold-font" :style="'color:'+fu_color">{{i18n.lever.entway}}</text>
</view>
<view v-if="item.status==0||item.status==1"
class="flex-2 height-80 flex direction-column align-center justify-around">
<text class="font-26 nummedium-font">{{item.createtime}}</text>
<text class="font-24 numbold-font" :style="'color:'+fu_color">{{i18n.lever.creatime}}</text>
</view>
<view v-if="item.status==2" class="flex-2 height-80 flex direction-column align-center justify-around">
<text class="font-26 nummedium-font">{{item.finishtime}}</text>
<text class="font-24 numbold-font" :style="'color:'+fu_color">{{i18n.lever.fintime}}</text>
</view>
<view v-if="item.status==3" class="flex-2 height-80 flex direction-column align-center justify-around">
<text class="font-26 nummedium-font">{{(item.canceltime)}}</text>
<text class="font-24 numbold-font" :style="'color:'+fu_color">{{i18n.lever.revokeTime}}</text>
</view>
<view v-if="item.status==0||item.status==1||item.status==3" class="flex-1 height-80 flex direction-column align-end justify-around">
<text class="font-26 nummedium-font">{{item.have_num}}</text>
<text class="font-24 numbold-font" :style="'color:'+fu_color">{{i18n.lever.traded}}</text>
</view>
<view v-if="item.status==2" class="flex-1 height-80 flex direction-column align-end justify-around">
<text class="font-26 nummedium-font">{{item.free}}</text>
<text class="font-24 numbold-font" :style="'color:'+fu_color">{{i18n.lever.free}}</text>
</view>
</view>
</view>
<view class="">
<view v-if="loading" class="width-100b padding-c-50 flex align-center justify-center">
<u-loading show mode="flower" size="40"></u-loading>
</view>
<view v-if="!loading&&list.length==0"
class="width-100b padding-c-50 flex direction-column align-center justify-center">
<text class="font-28 nummedium-font" :style="'color:'+fu_color">{{i18n.lever.nodata}}</text>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'listModule',
props: {
//标题
list: {
type: Array,
default: []
},
currentIndex: {
type: Number,
default: 0
},
loading: {
type: Boolean,
default: false
},
price_jd:{
type: Number,
default: 4
},
background:{
type: String,
default: '#ffffff'
},
color:{
type: String,
default: '#17181A'
},
fu_color:{
type: String,
default: '#B7B7B7'
}
},
data() {
return {}
},
computed: {
i18n() {
return this.$t('message');
},
},
methods: {
statusFilter(index){
return this.i18n.lever.tablistState[index]
},
// 撤销
revocation(id, coin_id) {
uni.showLoading({
mask: true
})
setTimeout(() => {
uni.hideLoading()
let obj = {
"id": id,
"coin_id": coin_id
}
// this.$emit('revocation',id)
this.$emit('revocation', obj)
}, 2500)
},
}
}
</script>
<style scoped>
.listBox {
width: 100%;
/* height: 186rpx; */
padding: 20rpx 30rpx;
margin: 0 auto 20rpx;
/* background: #FFFFFF; */
}
.loginBtn {
width: 120rpx;
height: 52rpx;
background: rgba(0,0,0,0) !important;
border-radius: 8rpx;
font-size: 24rpx;
}
</style>
+185
View File
@@ -0,0 +1,185 @@
<template>
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
<myNav :title="i18n.newWord.ordertitle"></myNav>
<view class="padding-w-30 height-120 flex align-center justify-between">
<view class="height-80 flex direction-column align-start justify-between">
<text class="font-32 numbold-font margin-b-6">{{orderObj.curr_name}}/USDT</text>
<view :class="orderObj.type=='buy'?'buyBtn':'sellBtn'" class="statusBox">{{orderObj.type=='buy'?i18n.lever.buyIn:i18n.lever.sellout}}</view>
</view>
<view @click="goTab(orderObj.symbol)" class="padding-w-10 flex align-center justify-end">
<text class="font-26 color-0165EE nummedium-font">{{i18n.newWord.gotrade}}</text>
<i class="cuIcon-right font-24 color-0165EE"></i>
</view>
</view>
<view class="">
<view class="width-700 padding-c-14 margin-0-auto"
style="border-top: 1rpx solid rgba(191, 195, 199, 0.2);
border-bottom: 1rpx solid rgba(191, 195, 199, 0.2);">
<view class="height-54 flex align-center justify-between">
<text class="font-26 color-C3C3C3 nummedium-font">{{i18n.newWord.status}}</text>
<text class="font-26 nummedium-font">{{statusFilter(orderObj.status)}}</text>
</view>
<view class="height-54 flex align-center justify-between">
<text class="font-26 color-C3C3C3 nummedium-font">{{i18n.lever.entway}}</text>
<text class="font-26 nummedium-font">{{orderObj.cart=="limit"?i18n.lever.tap1:i18n.lever.tap2}}</text>
</view>
<view class="height-54 flex align-center justify-between">
<text class="font-26 color-C3C3C3 nummedium-font">{{i18n.lever.entall}}</text>
<text class="font-26 nummedium-font">{{orderObj.type=='buy'?orderObj.amount:orderObj.num||0}} {{orderObj.type=='buy'?'USDT':orderObj.curr_name}}</text>
</view>
<view class="height-54 flex align-center justify-between">
<text class="font-26 color-C3C3C3 nummedium-font">{{i18n.lever.entPrice}}</text>
<text class="font-26 nummedium-font">{{orderObj.cart=="limit"?orderObj.price+' USDT':i18n.lever.tap2}}</text>
</view>
<view class="height-54 flex align-center justify-between">
<text class="font-26 color-C3C3C3 nummedium-font">{{i18n.newWord.volume}}</text>
<text class="font-26 nummedium-font">{{orderObj.count_price || 0}} {{orderObj.curr_name}}</text>
</view>
<view class="height-54 flex align-center justify-between">
<text class="font-26 color-C3C3C3 nummedium-font">{{i18n.newWord.Avprice}}</text>
<text class="font-26 nummedium-font">{{orderObj.junjia || 0}} USDT</text>
</view>
<view class="height-54 flex align-center justify-between">
<text class="font-26 color-C3C3C3 nummedium-font">{{i18n.newWord.sold_value}}</text>
<text class="font-26 nummedium-font">${{orderObj.count_num || 0}}</text>
</view>
</view>
<view class="width-700 padding-c-14 margin-0-auto">
<view class="height-54 flex align-center justify-between">
<text class="font-26 color-8B99A2 nummedium-font">{{i18n.newWord.comm_amount}}</text>
<text class="font-26 color-8B99A2 nummedium-font">{{entrustTheSumVO}}</text>
</view>
<view class="height-54 flex align-center justify-between">
<text class="font-26 color-8B99A2 nummedium-font">{{i18n.lever.free}}</text>
<text class="font-26 color-8B99A2 nummedium-font">{{orderObj.fee_num || 0}} {{orderObj.fee_curr}}</text>
</view>
<view class="height-54 flex align-center justify-between">
<text class="font-26 color-8B99A2 nummedium-font">{{i18n.newWord.comm_time}}</text>
<text class="font-26 color-8B99A2 nummedium-font">{{orderObj.createtime || 0}}</text>
</view>
</view>
</view>
<view v-if="list.length" class="margin-t-20"
:style="'background-color: '+theme.fu_bg+';color: '+theme.fu_text">
<view class="height-60 padding-w-30 flex align-center justify-between">
<view class="width-200 height-60 flex align-center">
<text class="font-22 color-8B99A2">{{i18n.newWord.Trade_time}}</text>
</view>
<view class="flex-1 height-60 flex align-center justify-between">
<text class="font-22 color-8B99A2">{{i18n.lever.closing}}(USDT)</text>
<text class="font-22 color-8B99A2">{{i18n.lever.num}}({{orderObj.curr_name}})</text>
</view>
</view>
<view v-for="(item,index) in list" :key="index" class="height-60 padding-w-30 flex align-center justify-between">
<view class="width-200 height-60 flex align-center">
<text class="font-26 nummedium-font">{{item.createtime}}</text>
</view>
<view class="flex-1 height-60 flex align-center justify-between">
<text class="font-26 nummedium-font">{{item.price}}</text>
<text class="font-26 nummedium-font">{{item.num}}</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
id:'',
coin_id:'',
orderObj:'',
list:[],
theme: '',
}
},
computed: {
i18n() {
return this.$t('message');
},
entrustTheSumVO(){
if(this.orderObj.type=='sell'&&this.orderObj.cart=='market'){
return this.i18n.lever.tap2
}else{
if(this.orderObj.amount){
return this.orderObj.amount + ' USDT'
}else{
return '0 USDT'
}
}
}
},
onLoad(option) {
if(option.id){
this.id = option.id
this.getOrder(option.id,option.coin_id)
}
},
onShow() {
if (uni.getStorageSync("theme") == "dark") {
this.theme = this.$store.state.darkTheme
} else {
this.theme = this.$store.state.lightTheme
}
},
methods: {
statusFilter(status){
if(status==0){
return this.i18n.lever.tablist[0]
}else if(status==1){
return this.i18n.lever.tablist[1]
}else if(status==2){
return this.i18n.lever.tablist[2]
}else if(status==3){
return this.i18n.lever.tablist[3]
}else{
return this.i18n.lever.tablist[0]
}
},
getOrder(id,coin_id){
this.post('/market/order_con',{
id:id,
coin_id:coin_id
}).then((res) => {
console.log('订单详情',res)
if (res.code == 1) {
this.orderObj = res.data
if(res.data.detail){
this.list = res.data.detail
}
}
})
},
goTab(symbol){
getApp().globalData.symbol = symbol
uni.switchTab({
url: '/pages/transaction/index'
})
}
}
}
</script>
<style lang="scss">
.statusBox{
padding: 0 18rpx;
height: 40rpx;
border-radius: 10rpx;
font-size: 26rpx;
text-align: center;
line-height: 40rpx;
}
.buyBtn{
background-color: rgba(0,196,129,0.1);
color: #00C481;
}
.sellBtn{
background-color: rgba(255,64,64,0.1);
color: #FF4040;
}
</style>
File diff suppressed because it is too large Load Diff