feat: 前端全量更新 - 含所有本次需求
- 移除秒合约页面及UI - 合约页Tab改为Position Held/Transaction Record - 存款/提款/转账页增加BTC/ETH - 资产页重构(用户信息+盈亏+多语言) - 注册页改版(匹配新设计稿) - 日文全面翻译+首页菜单多语言 - 代理专属注册链接支持(?code=) - 10个locale文件同步更新
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<view>
|
||||
<z-paging :language="$i18n.locale" ref="paging" v-model="list" @query="queryList" :pageSize="20"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<myNav slot="top" :title="i18n.licai.text31"></myNav>
|
||||
|
||||
<view slot="top" class="height-180 padding-w-48 flex align-center justify-between"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="height-100 flex direction-column align-start justify-between">
|
||||
<text class="font-36">{{alr_num}}{{curr_name}}</text>
|
||||
<text class="font-24">{{i18n.licai.text32}}</text>
|
||||
</view>
|
||||
<view class="height-100 flex direction-column align-end justify-between">
|
||||
<text class="font-36">{{alr_day}} {{i18n.licai.text6}}</text>
|
||||
<text class="font-24">{{i18n.licai.text33}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view slot="top" class="height-70 padding-w-60 flex align-center justify-between">
|
||||
<text class="font-26 color-C3C3C3">{{i18n.licai.text34}}</text>
|
||||
<text class="font-26 color-C3C3C3">{{i18n.licai.text35}}</text>
|
||||
</view>
|
||||
|
||||
<view class="listBox" v-for="(item,index) in list" :key="index">
|
||||
<text class="font-28 color-00C481">+{{item.price}} {{curr_name}}</text>
|
||||
<text class="font-24">{{item.createtime}}</text>
|
||||
</view>
|
||||
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
id:'',
|
||||
alr_day:0,
|
||||
alr_num:0,
|
||||
curr_name:'',
|
||||
|
||||
theme: '',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
},
|
||||
onLoad(e) {
|
||||
this.id = e.id
|
||||
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('/product/product_user_con', {
|
||||
id: this.id,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
this.alr_day = res.data.alr_day
|
||||
this.alr_num = res.data.alr_num
|
||||
this.curr_name = res.data.curr_name
|
||||
}
|
||||
})
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
this.post('/product/product_user_log', {
|
||||
page: pageNo,
|
||||
id: this.id,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log('数据', res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.listBox {
|
||||
width: 100%;
|
||||
height: 96rpx;
|
||||
// background: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
margin-bottom: 1px;
|
||||
padding: 0 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<z-paging :language="$i18n.locale" ref="paging" @query="queryList" :pageSize="20"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
|
||||
<view slot="top" class="relative" :style="{height: `calc(${statusBar}px + 55px)`}">
|
||||
<view class="width-100b fixed1" :style="{height: `calc(${statusBar}px + 55px)`}">
|
||||
<view class="width-100b fixed1 flex align-center justify-start padding-l-88"
|
||||
:style="{paddingTop: statusBar + 'px', height: `calc(${statusBar}px + 55px)`}">
|
||||
<i @click="router.goBack()" class="cuIcon-back font-30 absolute" style="left: 30rpx;"></i>
|
||||
<text class="font-32 weight-bold">{{i18n.licai.text1}}</text>
|
||||
<view class="width-450 height-60 radiu-50 padding-w-20 flex align-center justify-between absolute"
|
||||
:style="'background-color: '+theme.fu_bg"
|
||||
style="right: 30rpx;">
|
||||
<input @input="searchCion" class="font-24" :placeholder="i18n.licai.text2" type="text"
|
||||
v-model="searchVal" />
|
||||
<i class="cuIcon-search"></i>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view slot="top" @click="router.push('/pages/index/money/my_record')"
|
||||
:style="'background-color: '+theme.fu_bg"
|
||||
class="height-86 flex align-center justify-between padding-w-40">
|
||||
<view class="flex align-center">
|
||||
<image class="width-34 height-34 margin-r-10" src="/static/imgs/index/Frame1@2x.png" mode=""></image>
|
||||
<text class="font-26">{{i18n.licai.text3}}</text>
|
||||
</view>
|
||||
<i class="cuIcon-right font-26"></i>
|
||||
</view>
|
||||
|
||||
<view class="padding-w-40">
|
||||
<view class="listBox" v-for="(item,index) in list" :key="index"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="height-100 flex align-center justify-between">
|
||||
<image class="width-96 height-96 radiu-28" :src="item.logo_image" mode=""></image>
|
||||
<view class="height-96 flex-1 margin-l-18">
|
||||
<view class="height-48 flex align-center">
|
||||
<text class="font-32 bold-font weight-bold">{{item.name}}</text>
|
||||
</view>
|
||||
<view class="height-48 flex align-center justify-between">
|
||||
<text class="font-24">{{i18n.licai.text4}}:{{item.min_num}}-{{item.max_num}}</text>
|
||||
<text class="font-24">{{i18n.licai.text5}}:{{item.day}}{{i18n.licai.text6}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-100b height-2 margin-20-auto" style="background-color: rgba(191, 195, 199, 0.2);"></view>
|
||||
<view class="height-60 flex align-center justify-between">
|
||||
<view class="padding-w-18 line-height-56 text-center height-56 radiu-10"
|
||||
style="min-width: 270rpx;background: #2DD1AF;">
|
||||
<text class="font-22 color-white">{{i18n.licai.text7}}:{{item.rixi}}</text>
|
||||
</view>
|
||||
<view @click="router.push('/pages/index/money/investing?id='+item.id)"
|
||||
class="flex align-center justify-end line-height-56">
|
||||
<text class="font-24 color-EA466F margin-r-6">{{i18n.licai.text8}}</text>
|
||||
<i class="cuIcon-right color-999999 font-24"></i>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
searchVal: '',
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
list: [],
|
||||
list_all: [],
|
||||
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
this.searchVal = ''
|
||||
},
|
||||
methods: {
|
||||
queryList(pageNo, pageSize) {
|
||||
this.post('/product/index_list').then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log('数据', res)
|
||||
this.list = res.data
|
||||
this.list_all = res.data
|
||||
this.$refs.paging.complete([{}]);
|
||||
}
|
||||
})
|
||||
},
|
||||
searchCion() {
|
||||
if (this.searchVal == '') {
|
||||
this.list = this.list_all
|
||||
return
|
||||
}
|
||||
let arrtemp = []
|
||||
this.list_all.forEach((item) => {
|
||||
if (item.name.indexOf(this.searchVal.toUpperCase()) != '-1') {
|
||||
arrtemp.push(item)
|
||||
}
|
||||
})
|
||||
this.list = arrtemp
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fixed1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 1010;
|
||||
}
|
||||
|
||||
.listBox {
|
||||
width: 100%;
|
||||
// height: 228rpx;
|
||||
padding: 24rpx;
|
||||
// background-color: #FFFFFF;
|
||||
border-radius: 28rpx;
|
||||
margin: 24rpx auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,194 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<myNav :title="i18n.licai.text8"></myNav>
|
||||
|
||||
<view class="topBox flex direction-column align-start justify-between">
|
||||
<text class="font-28 color-white">{{i18n.licai.text9}}</text>
|
||||
<text class="font-36 color-white">{{obj.money_trx}}</text>
|
||||
</view>
|
||||
|
||||
<view class="width-670 margin-20-auto radiu-10 padding-b-30"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text"
|
||||
style="overflow: hidden;">
|
||||
<view class="height-96 padding-w-24 flex align-center justify-between">
|
||||
<text class="font-28">{{i18n.licai.text10}}</text>
|
||||
<text class="font-28">{{obj.min_num}} {{obj.curr_name}}</text>
|
||||
</view>
|
||||
<view class="height-96 padding-w-24 flex align-center justify-between">
|
||||
<text class="font-28">{{i18n.licai.text11}}</text>
|
||||
<text class="font-28">{{obj.max_num}} {{obj.curr_name}}</text>
|
||||
</view>
|
||||
<view class="height-96 padding-w-24 flex align-center justify-between">
|
||||
<text class="font-28">{{i18n.licai.text12}}</text>
|
||||
<text class="font-28">{{obj.day}} {{i18n.licai.text6}}</text>
|
||||
</view>
|
||||
<view class="height-96 padding-w-24 flex align-center justify-between">
|
||||
<text class="font-28">{{i18n.licai.text13}}</text>
|
||||
<text class="font-28">{{rixi}}%</text>
|
||||
</view>
|
||||
<view class="padding-w-20 padding-c-10">
|
||||
<p class="font-28 margin-c-10">{{i18n.licai.text14}}</p>
|
||||
<view class="height-96 radiu-16 padding-w-24 flex align-center justify-between">
|
||||
<input class="height-96 flex-1 line-height-96 font-26 padding-w-20" type="number" v-model="money" :placeholder="i18n.licai.text15" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-w-20 padding-c-10">
|
||||
<p class="font-28 margin-c-10">{{i18n.licai.text16}}</p>
|
||||
<view class="height-96 radiu-16 padding-w-24 flex align-center justify-between">
|
||||
<input class="height-96 flex-1 line-height-96 font-26 padding-w-20" type="text" v-model="pay_pwd" password :placeholder="i18n.licai.text17"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-100b margin-c-20 text-right padding-w-30">
|
||||
<text class="font-26 color-EA466F">{{money||0}} + ( {{money||0}} * {{rixi}}% * {{obj.day}}) ≈ {{allNumber}}</text>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-center">
|
||||
<button @click="touzi" type="default" class="cu-btn" style="width: 600rpx;height: 96rpx;color: #FFFFFF;font-size: 28rpx;background: #2DD1AF;opacity: 1;">{{i18n.licai.text8}}</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="height-64 flex align-center padding-w-60">
|
||||
<text class="font-28 color-3C2E33 weight-bold">{{i18n.licai.text18}}</text>
|
||||
</view>
|
||||
|
||||
<view class="width-670 margin-20-auto radiu-10 padding-b-30"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text"
|
||||
style="overflow: hidden;">
|
||||
<view class="height-96 padding-w-24 flex align-center justify-between">
|
||||
<text class="font-28">{{i18n.licai.text19}}</text>
|
||||
<text class="font-28">{{obj.name}}</text>
|
||||
</view>
|
||||
<view class="height-96 padding-w-24 flex align-center justify-between">
|
||||
<text class="font-28">{{i18n.licai.text20}}</text>
|
||||
<text class="font-28">{{i18n.licai.text21}}</text>
|
||||
</view>
|
||||
<view class="height-96 padding-w-24 flex align-center justify-between">
|
||||
<text class="font-28">{{i18n.licai.text14}}</text>
|
||||
<text class="font-28">{{money||0}} {{obj.curr_name}}</text>
|
||||
</view>
|
||||
<view class="height-96 padding-w-24 flex align-center justify-between">
|
||||
<text class="font-28">{{i18n.licai.text13}}</text>
|
||||
<text class="font-28">{{rixi}}%</text>
|
||||
</view>
|
||||
<view class="height-96 padding-w-24 flex align-center justify-between">
|
||||
<text class="font-28">{{i18n.licai.text12}}</text>
|
||||
<text class="font-28">{{obj.day}} {{i18n.licai.text6}}</text>
|
||||
</view>
|
||||
<view class="height-96 padding-w-24 flex align-center justify-between">
|
||||
<text class="font-28">{{i18n.licai.text22}}</text>
|
||||
<text class="font-28">{{rixi}}% * {{obj.day}} = {{Number(rixi*obj.day).toFixed(2)}}%</text>
|
||||
</view>
|
||||
<view class="padding-w-24">
|
||||
<text class="height-60 font-28 line-height-60">{{i18n.licai.text23}}</text>
|
||||
<view class="padding-c-20">
|
||||
<text class="font-24">{{obj.msg}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="height-40"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id:'',
|
||||
obj:{},
|
||||
money:'',
|
||||
pay_pwd:'',
|
||||
flag:true,
|
||||
rixi_arr:[],
|
||||
theme: '',
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
allNumber(){
|
||||
if(this.money==''){
|
||||
return 0
|
||||
}else{
|
||||
let temp = Number(this.money) + Number(this.money*this.rixi/100*this.obj.day)
|
||||
return Number(temp).toFixed(2)
|
||||
}
|
||||
},
|
||||
rixi(){
|
||||
if(this.money==''){
|
||||
return this.obj.rixi
|
||||
}else{
|
||||
let num = 0
|
||||
this.rixi_arr.forEach((item)=>{
|
||||
if(this.money >= item.key){
|
||||
num = item.value
|
||||
}
|
||||
})
|
||||
return num
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.id = e.id
|
||||
this.product_con()
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
touzi(){
|
||||
if(!this.flag) return
|
||||
if(this.money == ''){
|
||||
this.tos(this.i18n.licai.text15)
|
||||
return
|
||||
}
|
||||
if(this.pay_pwd == ''){
|
||||
this.tos(this.i18n.licai.text17)
|
||||
return
|
||||
}
|
||||
this.post('/product/product_buy',{
|
||||
num:this.money,
|
||||
pay_pwd:this.pay_pwd,
|
||||
id:this.id
|
||||
},true).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.pay_pwd = ''
|
||||
setTimeout(()=>{
|
||||
uni.redirectTo({
|
||||
url:'/pages/index/money/my_record'
|
||||
})
|
||||
},500)
|
||||
}
|
||||
})
|
||||
},
|
||||
product_con(){
|
||||
this.post('/product/product_con',{
|
||||
id:this.id
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.obj = res.data
|
||||
this.rixi_arr = res.data.rixi_arr
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.topBox{
|
||||
width: 670rpx;
|
||||
height: 183rpx;
|
||||
margin: 24rpx auto;
|
||||
border-radius: 10rpx;
|
||||
padding: 36rpx 20rpx;
|
||||
background-color: #2DD1AF;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<view>
|
||||
<z-paging :language="$i18n.locale" ref="paging" v-model="list" @query="queryList" :pageSize="20"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<myNav slot="top" :title="i18n.licai.text24"></myNav>
|
||||
|
||||
<view class="listBox" v-for="(item,index) in list" :key="index"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="flex-1 height-100b padding-c-20 padding-w-24 flex direction-column justify-between" style="border-radius: 40rpx 0 0 40rpx;">
|
||||
<view class="height-50 flex align-center">
|
||||
<text class="font-26">{{i18n.licai.text25}}:<span class="color-3C2E33">{{item.name}}</span></text>
|
||||
</view>
|
||||
<view class="height-50 flex align-center">
|
||||
<text class="font-26">{{i18n.licai.text14}}:<span class="color-3C2E33">{{item.num}} {{item.curr_name}}</span></text>
|
||||
</view>
|
||||
<view class="height-50 flex align-center">
|
||||
<text class="font-26">{{i18n.licai.text13}}:<span class="color-3C2E33">{{item.rixi}}%</span></text>
|
||||
</view>
|
||||
<view class="height-50 flex align-center">
|
||||
<text class="font-26">{{i18n.licai.text22}}:<span class="color-3C2E33">{{item.rixi}}% * {{item.day}} = {{item.rixi*item.day}}%</span></text>
|
||||
</view>
|
||||
<view class="height-50 flex align-center">
|
||||
<text class="font-26">{{i18n.licai.text26}}:
|
||||
<span v-if="item.status==0" class="color-999999">{{i18n.licai.text27}}</span>
|
||||
<span v-if="item.status==1" class="color-0165EE">{{i18n.licai.text28}}</span>
|
||||
</text>
|
||||
</view>
|
||||
<view class="height-50 flex align-center">
|
||||
<text class="font-26">{{i18n.licai.text29}}:<span class="">{{item.addtime}}</span></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="height-320 width-4 radiu-10" style="background-color: rgba(191, 195, 199, 0.2);"></view>
|
||||
|
||||
<view @click="router.push('/pages/index/money/details?id='+item.id)" class="width-104 height-100b flex align-center justify-center padding-w-30">
|
||||
<text class="font-26 line-height-50 text-center">{{i18n.licai.text30}}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
theme: '',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
queryList(pageNo, pageSize) {
|
||||
this.post('/product/product_user').then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log('数据', res)
|
||||
this.$refs.paging.complete(res.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.listBox {
|
||||
width: 670rpx;
|
||||
height: 360rpx;
|
||||
// background: #FAFAFA;
|
||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(12, 21, 238, 0.2);
|
||||
border-radius: 10rpx;
|
||||
margin: 16rpx auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user