feat: 前端全量更新 - 含所有本次需求
- 移除秒合约页面及UI - 合约页Tab改为Position Held/Transaction Record - 存款/提款/转账页增加BTC/ETH - 资产页重构(用户信息+盈亏+多语言) - 注册页改版(匹配新设计稿) - 日文全面翻译+首页菜单多语言 - 代理专属注册链接支持(?code=) - 10个locale文件同步更新
This commit is contained in:
@@ -0,0 +1,223 @@
|
||||
<template>
|
||||
<view>
|
||||
<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>
|
||||
|
||||
<!-- 头部 -->
|
||||
<view slot="top" class="relative" :style="{height: `calc(${statusBar}px + 490rpx)`}">
|
||||
<view class="width-100b fixed1" :style="{height: `calc(${statusBar}px + 490rpx)`}">
|
||||
<view class="width-100b flex align-center justify-center"
|
||||
:style="{paddingTop: statusBar + 'px', height: `calc(${statusBar}px + 55px)`}">
|
||||
<text class="midetitle">{{i18n.assets.bill.title}}</text>
|
||||
<i @click="router.goBack()" class="cuIcon-back font-30 color-white"
|
||||
style="position: absolute;left: 30rpx;"></i>
|
||||
</view>
|
||||
|
||||
<view class="height-240 padding-w-30 padding-b-20">
|
||||
<view class="height-100 margin-b-20">
|
||||
<view class="flex-1 height-100 flex direction-column align-start justify-between">
|
||||
<text class="font-26 color-white"
|
||||
style="opacity: 0.6;">{{i18n.assets.bill.balance}}</text>
|
||||
<text class="font-48 numbold-font color-white">{{Number(balance).toFixed(4)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-100 flex align-center justify-between">
|
||||
<view class="flex-1 height-90 flex direction-column align-start justify-between">
|
||||
<text class="font-26 color-white"
|
||||
style="opacity: 0.6;">{{i18n.assets.bill.total}}</text>
|
||||
<text class="font-28 numbold-font color-white">{{Number(cc_amount).toFixed(4)}}</text>
|
||||
</view>
|
||||
<view class="flex-1 height-90 flex direction-column align-center justify-between">
|
||||
<text class="font-26 color-white"
|
||||
style="opacity: 0.6;">{{i18n.assets.bill.today}}</text>
|
||||
<text class="font-28 numbold-font color-white">{{Number(pc_amount).toFixed(4)}}</text>
|
||||
</view>
|
||||
<view class="flex-1 height-90 flex direction-column align-end justify-between">
|
||||
<text class="font-26 color-white" style="opacity: 0.6;">{{i18n.assets.bill.bili}}</text>
|
||||
<text :class="yk_percent >= 0?'color-00C481':'color-FF4040'"
|
||||
class="font-28 numbold-font ">{{yk_percent | percentFilter}}%</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="absolute" style="bottom: 0;">
|
||||
<view class="" style="border-radius: 20rpx 20rpx 0 0;"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="height-120 flex align-center justify-between">
|
||||
<view @click="set(1)"
|
||||
class="flex-1 height-110 padding-t-30 flex direction-column align-center justify-between">
|
||||
<text :class="current==1?'color-0165EE':'color-C3C3C3'" class="font-26 "
|
||||
style="">{{i18n.assets.bill.todayYL}}</text>
|
||||
<text :class="current==1?'color-0165EE':'color-C3C3C3'"
|
||||
class="font-30 numbold-font">{{Number(today_num).toFixed(4)}}</text>
|
||||
</view>
|
||||
<view class="width-2 height-75" style="background-color: #EAECEF;"></view>
|
||||
<view @click="set(2)"
|
||||
class="flex-1 height-110 padding-t-30 flex direction-column align-center justify-between">
|
||||
<text :class="current==2?'color-0165EE':'color-C3C3C3'" class="font-26"
|
||||
style="">{{i18n.assets.bill.allYL}}</text>
|
||||
<text :class="current==2?'color-0165EE':'color-C3C3C3'"
|
||||
class="font-30 numbold-font">{{Number(all_num).toFixed(4)}}</text>
|
||||
<!-- <view :style="current==1?'':'visibility: hidden;'" class="width-95 height-4" style="background-color: #0165EE;"></view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-20 width-750 relative" :style="'background-color: '+theme.bg">
|
||||
<view :style="current==1?'left: 150rpx;':'left: 530rpx;'" class="huakuai"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<!-- 身体 -->
|
||||
<view>
|
||||
<view v-if="current==1" class="">
|
||||
<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">
|
||||
<view class="flex-1 height-80 flex direction-column align-start justify-between">
|
||||
<text class="font-26">{{i18n.assets.bill.order}}</text>
|
||||
<text class="font-30 numbold-font color-C3C3C3">{{item.order_sn}}</text>
|
||||
</view>
|
||||
<view class="flex-1 height-80 flex direction-column align-start justify-between">
|
||||
<text class="font-26">{{i18n.assets.bill.curr}}</text>
|
||||
<text class="font-30 numbold-font color-C3C3C3">{{item.coinname}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-100 flex align-center justify-between">
|
||||
<view class="flex-1 height-80 flex direction-column align-start justify-between">
|
||||
<text class="font-26">{{i18n.assets.bill.time}}</text>
|
||||
<text class="font-30 numbold-font color-C3C3C3">{{item.createtime}}</text>
|
||||
</view>
|
||||
<view class="flex-1 height-80 flex direction-column align-start justify-between">
|
||||
<text class="font-26 color-C3C3C3">{{i18n.assets.bill.edu}}</text>
|
||||
<text class="font-30 numbold-font color-00C481">{{item.income}} USDT</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="current==2" class="">
|
||||
<view class="listBox" v-for="(item,index) in list" :key="index"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="padding-10">
|
||||
<view class="height-50 flex align-center justify-between">
|
||||
<text class="font-26">{{i18n.assets.bill.yingli}}</text>
|
||||
<text class="font-26">{{i18n.assets.bill.data}}</text>
|
||||
</view>
|
||||
<view class="height-50 flex align-center justify-between">
|
||||
<text class="font-30 numbold-font color-00C481">{{item.income}} USDT</text>
|
||||
<text class="font-30 numbold-font color-C3C3C3">{{item.createtime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
current: 1,
|
||||
|
||||
balance: 0, //余额
|
||||
cc_amount: 0, //当前持仓总量
|
||||
pc_amount: 0, //今日平仓总量
|
||||
yk_percent: 0, //今日盈亏比例
|
||||
|
||||
today_num: 0, //今日盈利
|
||||
all_num: 0, //累计盈利
|
||||
|
||||
list: [],
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
// 百分号过滤器(保留小数点后两位)
|
||||
percentFilter: function(item) {
|
||||
return (item * 100).toFixed(2)
|
||||
}
|
||||
},
|
||||
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: {
|
||||
set(e) {
|
||||
if (this.current != e) {
|
||||
this.current = e
|
||||
this.queryList(1, 10)
|
||||
}
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
setTimeout(() => {
|
||||
this.post('/strategy/get_bill', {
|
||||
page: pageNo,
|
||||
page_num: pageSize,
|
||||
type: this.current
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
if (this.current == 1) {
|
||||
this.balance = res.data.balance
|
||||
this.cc_amount = res.data.cc_amount
|
||||
this.pc_amount = res.data.pc_amount
|
||||
this.yk_percent = res.data.yk_percent
|
||||
this.today_num = res.data.today_num
|
||||
this.all_num = res.data.all_num
|
||||
}
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fixed1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 990;
|
||||
background-color: #0165EE;
|
||||
}
|
||||
|
||||
.midetitle {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.listBox {
|
||||
width: 100%;
|
||||
// height: 232rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
// background: #FFFFFF;
|
||||
margin-bottom: 1rpx;
|
||||
}
|
||||
|
||||
.huakuai {
|
||||
width: 75rpx;
|
||||
height: 4rpx;
|
||||
background-color: #0165EE;
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<z-paging style="padding-bottom: 170rpx;" :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="name"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view>
|
||||
<p class="padding-w-30 font-46 bold-font margin-c-30">
|
||||
{{i18n.assets.index.detail}}
|
||||
</p>
|
||||
<view class="listBox" v-for="(item,index) in list" :key="index"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.fu_text">
|
||||
<view class="width-100b height-82 padding-w-22 flex align-center"
|
||||
style="border-bottom: 1rpx solid rgba(191, 195, 199, 0.2);">
|
||||
<text :class="item.cart==1?'color-00C481':'color-FF4040'"
|
||||
class="font-32 numbold-font">{{item.cart==1?i18n.assets.index.shift:i18n.assets.index.roll}}</text>
|
||||
</view>
|
||||
<view class="width-100b padding-w-20">
|
||||
<view class="height-80 flex align-center justify-between">
|
||||
<text class="font-26 nummedium-font">{{item.price}}</text>
|
||||
<text class="font-26 nummedium-font color-C3C3C3">{{item.createtime}}</text>
|
||||
</view>
|
||||
<view class="padding-b-20">
|
||||
<text class="font-26 numbold-font">{{item.description}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</z-paging>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<view v-if="type==1" class="bottomBox">
|
||||
<view v-if="curr_obj.is_reg==1" @click="router.push('/pages/index/recharge?id='+curr_id)"
|
||||
class="juxing chonbi">{{i18n.assets.index.reg}}</view>
|
||||
<view v-if="curr_obj.is_wid==1" @click="router.push('/pages/index/withdraw?id='+curr_id)" class="juxing">
|
||||
{{i18n.assets.index.wid}}
|
||||
</view>
|
||||
<!-- <view v-if="curr_obj.is_tran==1" @click="router.push('/pages/asset/transfer?id=1')" class="juxing">
|
||||
{{i18n.assets.index.tran}}
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <view v-if="type==2&&curr_obj.is_otc==1" class="bottomBox">
|
||||
<view @click="router.push('/pages/index/releaseTrade?id='+curr_id)" class="juxing chonbi">
|
||||
{{i18n.assets.index.buy}}
|
||||
</view>
|
||||
<view @click="router.push('/pages/index/releaseTrade?id='+curr_id)" class="juxing">
|
||||
{{i18n.assets.index.sell}}
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
curr_id: '',
|
||||
name: '',
|
||||
type: '',
|
||||
|
||||
curr_obj: {
|
||||
},
|
||||
|
||||
list: [],
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.curr_id = e.curr_id
|
||||
this.name = e.name
|
||||
this.type = e.type
|
||||
this.curr_obj = e
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
queryList(pageNo, pageSize) {
|
||||
setTimeout(() => {
|
||||
this.post('/wallet/detail_log', {
|
||||
page: pageNo,
|
||||
page_num: pageSize,
|
||||
type: this.type,
|
||||
curr_id: this.curr_id
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.listBox {
|
||||
width: 690rpx;
|
||||
// height: 183rpx;
|
||||
margin: 30rpx auto;
|
||||
// background: #FFFFFF;
|
||||
box-shadow: 0rpx 4rpx 4rpx rgba(205, 206, 219, 0.2);
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.bottomBox {
|
||||
width: 100%;
|
||||
// height: 120rpx;
|
||||
padding: 0 30rpx;
|
||||
/* #ifdef APP-PLUS */
|
||||
padding: 0 30rpx 40rpx;
|
||||
/* #endif */
|
||||
// background: #FFFFFF;
|
||||
box-shadow: 0rpx 4rpx 10rpx rgba(33, 33, 33, 0.16);
|
||||
position: fixed;
|
||||
bottom: 0rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.juxing {
|
||||
// width: 173rpx;
|
||||
flex: 1;
|
||||
height: 76rpx;
|
||||
margin: 30rpx 20rpx;
|
||||
background: #F6F8FB;
|
||||
border-radius: 10rpx;
|
||||
line-height: 76rpx;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
color: #17181A;
|
||||
}
|
||||
|
||||
.chonbi {
|
||||
background: linear-gradient(180deg, #52F3C9 0%, #3ECEB2 100%)!important;
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,473 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<z-paging ref="paging" v-model="list" @query="queryList"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<custom-refresher slot="refresher" slot-scope="{refresherStatus}" :status="refresherStatus">
|
||||
</custom-refresher>
|
||||
|
||||
<!-- 头部 tab -->
|
||||
<view slot="top" class="width-100b flex align-center justify-between padding-w-40" :style="{height: `calc(${statusBar}px + 100rpx)`,paddingTop: `calc(${statusBar}px )`}">
|
||||
<view @click="tabsChange(index)" class="flex-1 height-100b flex align-center justify-center"
|
||||
v-for="(item,index) in tabList" :key="index">
|
||||
<text :class="current==index?theme.selectcolor:theme.color" class="font-32">{{item}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="padding-w-30">
|
||||
<!-- 用户信息卡片 -->
|
||||
<view class="userCard" :style="'background:'+theme.assetbg">
|
||||
<view class="width-100b flex align-center justify-between">
|
||||
<view class="flex align-center">
|
||||
<image class="width-80 height-80 radiu-50b margin-r-20" :src="userinfo.avatar || '/static/imgs/my/head_ico.png'" mode="aspectFill"></image>
|
||||
<view class="flex direction-column">
|
||||
<text class="font-28 color-white bold-font">{{userinfo.email || userinfo.nickname || '--'}}</text>
|
||||
<text class="font-22 color-white" style="opacity:0.7;">ID: {{userinfo.id || '--'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view @click="router.push('/pages/asset/record')" class="recordBtn">
|
||||
<text class="font-24 color-white">{{i18n.assets.index.record || 'Record'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 资产总览 -->
|
||||
<view class="width-100b margin-t-30 flex align-center justify-between">
|
||||
<view class="flex-1">
|
||||
<view class="flex align-center">
|
||||
<text class="font-22 color-white" style="opacity:0.7;">{{i18n.assets.index.totalAssets || 'Account Total Assets'}}</text>
|
||||
<view class="margin-l-16" @click="ifcover=!ifcover">
|
||||
<image class="width-32 height-26" :src="ifcover?ZY:BY" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex align-center margin-t-10">
|
||||
<text v-if="ifcover" class="font-40 numbold-font color-white">${{formatNum(all.count_usdt)}}</text>
|
||||
<text v-else class="font-40 numbold-font color-white">****</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-1 text-right">
|
||||
<text class="font-22 color-white" style="opacity:0.7;">{{i18n.assets.index.totalPnl || 'Account Total P&L'}}</text>
|
||||
<view class="flex align-center justify-end margin-t-10">
|
||||
<text v-if="ifcover" class="font-32 numbold-font color-white">$ {{formatNum(totalPnl)}}</text>
|
||||
<text v-else class="font-32 numbold-font color-white">****</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 总利润 -->
|
||||
<view class="width-100b margin-t-16">
|
||||
<text class="font-22 color-white" style="opacity:0.7;">{{i18n.assets.index.totalProfit || 'Account Total Profit'}}</text>
|
||||
<view class="margin-t-6">
|
||||
<text v-if="ifcover" class="font-34 numbold-font" :style="'color:'+(totalProfit>=0?'#00C481':'#FF4040')">$ {{formatNum(totalProfit)}}</text>
|
||||
<text v-else class="font-34 numbold-font color-white">****</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 存款/取款/转账 -->
|
||||
<view class="height-170 flex align-center justify-between" :style="'color: '+theme.text">
|
||||
<view @click="router.push('/pages/index/recharge')" class="flex-1 height-100b flex direction-column align-center justify-center">
|
||||
<image class="width-90 height-90" :src="theme.imgs+'/Group34154@2x.png'" mode=""></image>
|
||||
<text class="font-26 margin-t-6">{{i18n.assets.index.reg}}</text>
|
||||
</view>
|
||||
<view @click="router.push('/pages/index/withdraw')" class="flex-1 height-100b flex direction-column align-center justify-center">
|
||||
<image class="width-90 height-90" :src="theme.imgs+'/Group34153@2x.png'" mode=""></image>
|
||||
<text class="font-26 margin-t-6">{{i18n.assets.index.wid}}</text>
|
||||
</view>
|
||||
<view @click="router.push('/pages/asset/transfer?id='+current)" class="flex-1 height-100b flex direction-column align-center justify-center">
|
||||
<image class="width-90 height-90" :src="theme.imgs+'/Group34155@2x.png'" mode=""></image>
|
||||
<text class="font-26 margin-t-6">{{i18n.assets.index.tran}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 总览页面 -->
|
||||
<view v-if="current==0" class="padding-w-30">
|
||||
<!-- Spot 余额 -->
|
||||
<view @click="current=1" class="accountRow" :style="'background-color:'+theme.fu_bg+';color:'+theme.text">
|
||||
<view class="flex align-center justify-between">
|
||||
<text class="font-28 bold-font">{{i18n.assets.index.title2}}</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_xh_usdt:'****'}} <text class="font-24 color-C3C3C3">USDT</text></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- Fiat 余额 -->
|
||||
<view @click="current=2" class="accountRow" :style="'background-color:'+theme.fu_bg+';color:'+theme.text">
|
||||
<view class="flex align-center justify-between">
|
||||
<text class="font-28 bold-font">{{i18n.assets.index.title3}}</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_fb_usdt:'****'}} <text class="font-24 color-C3C3C3">USDT</text></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 资金流水 -->
|
||||
<view class="margin-t-20">
|
||||
<view v-for="(item,index) in list" :key="index" class="flowRow" :style="'border-bottom:1rpx solid '+(theme.bg=='#FFFFFF'?'#F0F0F0':'rgba(255,255,255,0.06)')">
|
||||
<view class="flex align-center justify-between">
|
||||
<text class="font-26 bold-font">{{item.description}}</text>
|
||||
<text v-if="item.cart==1" class="numbold-font font-26 color-00C481">{{item.price}} USDT</text>
|
||||
<text v-if="item.cart==2" class="numbold-font font-26 color-FF4040">-{{item.price}} USDT</text>
|
||||
</view>
|
||||
<text class="font-22 color-C3C3C3 margin-t-6">{{item.createtime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<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>
|
||||
|
||||
<!-- Spot / Fiat / 理财 子页面 -->
|
||||
<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">
|
||||
<u-switch v-model="ifHideCoin" size="30" active-color="#2DD1AF"></u-switch>
|
||||
<text class="font-24 margin-l-20">{{i18n.assets.index.hide}}</text>
|
||||
</view>
|
||||
<view
|
||||
:class="[toggleDelay?'animation-slide-bottom':'']"
|
||||
class="coinBox" v-for="(item,index) in datalist" :key="index"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view @click="naviTo(item)"
|
||||
class="width-100b height-82 padding-w-22 flex align-center justify-between"
|
||||
style="border-bottom: 1rpx solid rgba(191, 195, 199, 0.2);">
|
||||
<view class="flex align-center">
|
||||
<image class="width-36 height-36" :src="item.thumb_image" mode=""></image>
|
||||
<text class="font-32 numbold-font margin-w-15">{{item.name}}</text>
|
||||
<text class="font-24 nummedium-font color-C3C3C3">{{item.full_name}}</text>
|
||||
</view>
|
||||
<i class="cuIcon-right font-22 color-D1D3D8"></i>
|
||||
</view>
|
||||
<view class="width-100b height-100 padding-w-20 flex align-center justify-between">
|
||||
<view class="flex-1 height-80 flex direction-column align-start justify-around">
|
||||
<text class="font-24">{{i18n.assets.index.usable}}</text>
|
||||
<text class="font-26 numbold-font">{{ifcover?item.num:'****'}}</text>
|
||||
</view>
|
||||
<view class="flex-1 height-80 flex direction-column align-center justify-around">
|
||||
<text class="font-24">{{i18n.assets.index.freeze}}</text>
|
||||
<text class="font-26 numbold-font">{{ifcover?item.num_dj:'****'}}</text>
|
||||
</view>
|
||||
<view class="flex-1 height-80 flex direction-column align-end justify-around">
|
||||
<text class="font-24">{{i18n.assets.index.convert}}</text>
|
||||
<text class="font-26 numbold-font">{{ifcover?item.usdt_price:'****'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="datalist.length == 0" class="height-100 flex align-center justify-center">
|
||||
<text class="font-24 color-999999 ">{{i18n.assets.index.nodata}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
tabList: ['总览', '现货','法币','理财'],
|
||||
current: 0,
|
||||
|
||||
userinfo: {},
|
||||
totalPnl: 0,
|
||||
totalProfit: 0,
|
||||
|
||||
all:{
|
||||
count_btc: "0.0000",
|
||||
count_usdt: "0.0000",
|
||||
count_xh_usdt: "0.00",
|
||||
count_lh_usdt: "0.00",
|
||||
count_fb_usdt: "0.00"
|
||||
},
|
||||
xh:{
|
||||
count_btc: "0.0000",
|
||||
count_usdt: "0.0000",
|
||||
xh_arr:[]
|
||||
},
|
||||
fb:{
|
||||
count_btc: "0.0000",
|
||||
count_usdt: "0.0000",
|
||||
fb_arr:[]
|
||||
},
|
||||
lh:{
|
||||
count_btc: "0.0000",
|
||||
count_usdt: "0.0000",
|
||||
lh_arr:[]
|
||||
},
|
||||
qq:{
|
||||
count_btc: "0.0000",
|
||||
count_usdt: "0.0000",
|
||||
qq_arr:[]
|
||||
},
|
||||
|
||||
ZY: '/static/imgs/asset/zhenyan.png',
|
||||
BY: '/static/imgs/asset/biyan.png',
|
||||
ifcover: true,
|
||||
|
||||
ifHideCoin:false,
|
||||
|
||||
toggleDelay: false,
|
||||
|
||||
list:[],
|
||||
loading:true,
|
||||
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
count_obj() {
|
||||
let obj = {};
|
||||
var that = this
|
||||
switch (this.current) {
|
||||
case 0:
|
||||
obj = that.all
|
||||
break;
|
||||
case 1:
|
||||
obj = that.xh
|
||||
break;
|
||||
case 2:
|
||||
obj = that.fb
|
||||
break;
|
||||
case 3:
|
||||
obj = that.lh
|
||||
break;
|
||||
case 4:
|
||||
obj = that.qq
|
||||
break;
|
||||
default:
|
||||
obj = that.all
|
||||
break;
|
||||
}
|
||||
return obj
|
||||
},
|
||||
datalist() {
|
||||
let obj = [];
|
||||
var that = this
|
||||
switch (this.current) {
|
||||
case 0:
|
||||
obj = []
|
||||
break;
|
||||
case 1:
|
||||
if(that.ifHideCoin==true){
|
||||
if(that.xh.xh_arr){
|
||||
obj = that.xh.xh_arr.filter((item)=>{
|
||||
return item.num != 0
|
||||
})
|
||||
}
|
||||
}else{
|
||||
obj = that.xh.xh_arr
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if(that.ifHideCoin==true){
|
||||
if(that.fb.fb_arr){
|
||||
obj = that.fb.fb_arr.filter((item)=>{
|
||||
return item.num != 0
|
||||
})
|
||||
}
|
||||
}else{
|
||||
obj = that.fb.fb_arr
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if(that.ifHideCoin==true){
|
||||
if(that.lh.lh_arr){
|
||||
obj = that.lh.lh_arr.filter((item)=>{
|
||||
return item.num != 0
|
||||
})
|
||||
}
|
||||
}else{
|
||||
obj = that.lh.lh_arr
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if(that.ifHideCoin==true){
|
||||
if(that.qq.qq_arr){
|
||||
obj = that.qq.qq_arr.filter((item)=>{
|
||||
return item.num != 0
|
||||
})
|
||||
}
|
||||
}else{
|
||||
obj = that.qq.qq_arr
|
||||
}
|
||||
break;
|
||||
default:
|
||||
obj = []
|
||||
break;
|
||||
}
|
||||
return obj
|
||||
},
|
||||
},
|
||||
watch:{
|
||||
ifHideCoin(item){
|
||||
uni.setStorageSync('ifHideCoin',item)
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
}else{
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
this.tabList[0]=this.i18n.assets.index.title1
|
||||
this.tabList[1]=this.i18n.assets.index.title2
|
||||
this.tabList[2]=this.i18n.assets.index.title3
|
||||
this.tabList[3]=this.i18n.licai.text1
|
||||
if(uni.getStorageSync('ifHideCoin')){
|
||||
this.ifHideCoin = uni.getStorageSync('ifHideCoin')
|
||||
}
|
||||
this.getWallet()
|
||||
this.getUserInfo()
|
||||
this.calcProfit()
|
||||
},
|
||||
methods: {
|
||||
formatNum(val) {
|
||||
let n = Number(val || 0)
|
||||
return n.toFixed(2)
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
this.loading = true
|
||||
this.post('/wallet/index_detail', {
|
||||
page: pageNo,
|
||||
}).then(res => {
|
||||
this.loading = false
|
||||
console.log('资金动态',res)
|
||||
if (res.code == 1) {
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
getUserInfo() {
|
||||
this.post('/my/get_userinfo').then((res) => {
|
||||
if (res.code == 1) {
|
||||
this.userinfo = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
calcProfit() {
|
||||
// 从资金流水计算盈亏
|
||||
this.post('/wallet/index_detail', {
|
||||
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(){
|
||||
this.post('/wallet/wallet_index').then((res) => {
|
||||
console.log('我的资产',res)
|
||||
if (res.code == 1) {
|
||||
this.all = res.data.all
|
||||
this.xh = res.data.xh
|
||||
this.fb = res.data.fb
|
||||
this.lh = res.data.lh
|
||||
this.qq = res.data.qq
|
||||
}
|
||||
})
|
||||
},
|
||||
naviTo(item){
|
||||
console.log(this.$u.queryParams(item))
|
||||
uni.navigateTo({
|
||||
url:'/pages/asset/details'+this.$u.queryParams(item)
|
||||
})
|
||||
},
|
||||
tabsChange(index) {
|
||||
if(index==3){
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/money/index'
|
||||
})
|
||||
}else{
|
||||
this.current = index;
|
||||
this.ToggleDelay()
|
||||
}
|
||||
},
|
||||
ToggleDelay() {
|
||||
this.toggleDelay = true;
|
||||
setTimeout(() => {
|
||||
this.toggleDelay = false
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.userCard {
|
||||
width: 100%;
|
||||
padding: 30rpx 28rpx;
|
||||
border-radius: 16rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.recordBtn {
|
||||
padding: 10rpx 24rpx;
|
||||
background: rgba(255,255,255,0.15);
|
||||
border-radius: 30rpx;
|
||||
border: 1rpx solid rgba(255,255,255,0.3);
|
||||
}
|
||||
|
||||
.accountRow {
|
||||
width: 100%;
|
||||
padding: 28rpx 30rpx;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.flowRow {
|
||||
padding: 24rpx 0;
|
||||
}
|
||||
|
||||
.topBox {
|
||||
width: 100%;
|
||||
padding: 22rpx 28rpx;
|
||||
display: flex;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.juxing {
|
||||
flex: 1;
|
||||
margin: 0 18rpx;
|
||||
height: 56rpx;
|
||||
border: 1rpx solid rgba(255, 255, 255, 0.35);
|
||||
background: rgba(255, 255, 255, 0.09);
|
||||
border-radius: 10rpx;
|
||||
line-height: 56rpx;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.coinBox {
|
||||
width: 690rpx;
|
||||
box-shadow: 0rpx 4rpx 4rpx rgba(205, 206, 219, 0.2);
|
||||
border-radius: 10rpx;
|
||||
margin: 0rpx auto 30rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,271 @@
|
||||
<template>
|
||||
<view>
|
||||
<z-paging :language="$i18n.locale" ref="paging" v-model="list" @query="queryList" :pageSize="20"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<!-- 下拉刷新 -->
|
||||
<custom-refresher slot="refresher" slot-scope="{refresherStatus}" :status="refresherStatus">
|
||||
</custom-refresher>
|
||||
|
||||
<!-- 头部 -->
|
||||
<view slot="top" class="width-750 relative flex align-center justify-center bj-8EBEFF"
|
||||
:style="{height: `calc(${statusBar}px + 220rpx)`}">
|
||||
<view class="width-750 fixed1"
|
||||
:style="{paddingTop: statusBar + 'px', height: `calc(${statusBar}px + 220rpx)`}">
|
||||
<view class="width-750 height-100 padding-w-30 bgimg1 flex align-center justify-center">
|
||||
<view @click="_goback" class="cuIcon-back font-40" style="position: absolute;left: 30rpx;">
|
||||
</view>
|
||||
<text class="font-36 weight-bold">{{i18n.TranRecord.title1}}</text>
|
||||
<image @click="show=true" class="width-36 height-36 absolute" style="right: 30rpx;"
|
||||
src="/static/imgs/index/shaixuan@2x.png"></image>
|
||||
</view>
|
||||
<view class="height-90 margin-10-auto width-690 radiu-10 flex align-center justify-between"
|
||||
:style="'background-color: '+theme.bg">
|
||||
<view class="flex-1 height-66 flex direction-column align-center justify-center">
|
||||
<text class="font-28">{{i18n.assets.record.title1}}</text>
|
||||
<text class="font-28 color-FF4040">{{order_num}}</text>
|
||||
</view>
|
||||
<view class="flex-1 height-66 flex direction-column align-center justify-center">
|
||||
<text class="font-28">{{i18n.assets.record.title2}}</text>
|
||||
<text class="font-28 color-00C481">{{win_num}}</text>
|
||||
</view>
|
||||
<view class="flex-1 height-66 flex direction-column align-center justify-center">
|
||||
<text class="font-28">{{i18n.assets.record.title3}}</text>
|
||||
<text class="font-28 color-FF4040">{{loss_num}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-b-40">
|
||||
<secondListItem :currentIndex="current2"
|
||||
:list="list" :color="theme.text" :background="theme.bg">
|
||||
</secondListItem>
|
||||
</view>
|
||||
|
||||
</z-paging>
|
||||
|
||||
<!-- 筛选弹窗 -->
|
||||
<u-popup v-model="show" mode="bottom" border-radius="25">
|
||||
<view class="width-100b padding-w-20" :style="'background-color: '+theme.bg+';color: '+theme.text"
|
||||
style="height:730rpx; border-radius: 20rpx 20rpx 0 0;">
|
||||
<view class="width-100b height-70 text-center line-height-100">
|
||||
<text class="font-28 weight-bold">{{i18n.TranRecord.text10}}</text>
|
||||
</view>
|
||||
<view class="width-100b height-150 margin-c-10 padding-w-30 flex direction-column justify-around">
|
||||
<text class="font-28 weight-bold line-height-64">{{i18n.TranRecord.text12}} <span
|
||||
class="font-26">({{i18n.TranRecord.text13}})</span></text>
|
||||
<input class="width-100b height-86 font-28 numbold-font" :placeholder="i18n.TranRecord.tos2"
|
||||
type="text" v-model="symbol" />
|
||||
</view>
|
||||
<view class="width-100b height-160 margin-c-10 padding-w-30 flex direction-column justify-around">
|
||||
<text class="font-28 weight-bold">{{i18n.assets.record.title4}}</text>
|
||||
<view class="width-100b height-70 flex align-center justify-between">
|
||||
<view @click="trade_result=''" class="selectTime">
|
||||
<view :class="trade_result==''?'bj-0165EE color-white':''" class="picker">
|
||||
{{i18n.assets.record.title5}}
|
||||
</view>
|
||||
</view>
|
||||
<view @click="trade_result='win'" class="selectTime">
|
||||
<view :class="trade_result=='win'?'bj-0165EE color-white':''" class="picker">
|
||||
{{i18n.assets.record.title6}}
|
||||
</view>
|
||||
</view>
|
||||
<view @click="trade_result='loss'" class="selectTime">
|
||||
<view :class="trade_result=='loss'?'bj-0165EE color-white':''" class="picker">
|
||||
{{i18n.assets.record.title7}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-100b height-160 margin-c-10 padding-w-30 flex direction-column justify-around">
|
||||
<text class="font-28 weight-bold">{{i18n.assets.record.title8}}</text>
|
||||
<view class="width-100b height-70 flex align-center justify-between">
|
||||
<view @click="rise_or_fall=''" class="selectTime">
|
||||
<view :class="rise_or_fall==''?'bj-0165EE color-white':''" class="picker">
|
||||
{{i18n.assets.record.title5}}
|
||||
</view>
|
||||
</view>
|
||||
<view @click="rise_or_fall='rise'" class="selectTime">
|
||||
<view :class="rise_or_fall=='rise'?'bj-0165EE color-white':''" class="picker">
|
||||
{{i18n.assets.record.title9}}
|
||||
</view>
|
||||
</view>
|
||||
<view @click="rise_or_fall='fall'" class="selectTime">
|
||||
<view :class="rise_or_fall=='fall'?'bj-0165EE color-white':''" class="picker">
|
||||
{{i18n.assets.record.title10}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-100b height-100 padding-30 flex align-center justify-between">
|
||||
<view class="resetBtn" @click="reset">{{i18n.TranRecord.text15}}</view>
|
||||
<view class="inquireBtn" @click="chechOrder">{{i18n.TranRecord.text16}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import secondListItem from '../contract/components/second_list_item.vue'
|
||||
export default {
|
||||
components: {
|
||||
secondListItem,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
|
||||
show: false,
|
||||
list: [],
|
||||
theme: '',
|
||||
|
||||
loss_num: 0,
|
||||
order_num: 0,
|
||||
win_num: 0,
|
||||
|
||||
current2:1,
|
||||
contractOrderList_s: [], //秒合约交易订单列表
|
||||
loading_s:true,
|
||||
|
||||
symbol:'',
|
||||
trade_result:'',
|
||||
rise_or_fall:''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.order_census()
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
order_census() {
|
||||
this.post('/cycle/order_census').then(res => {
|
||||
console.log('统计', res)
|
||||
if (res.code == 1) {
|
||||
this.loss_num = res.data.loss_num
|
||||
this.order_num = res.data.order_num
|
||||
this.win_num = res.data.win_num
|
||||
}
|
||||
})
|
||||
},
|
||||
chechOrder() {
|
||||
var obj = {
|
||||
symbol: this.symbol,
|
||||
trade_result:this.trade_result,
|
||||
rise_or_fall:this.rise_or_fall
|
||||
}
|
||||
console.log(obj)
|
||||
this.show = false
|
||||
this.list = []
|
||||
this.queryList(1, 20)
|
||||
},
|
||||
reset() {
|
||||
this.symbol = ''
|
||||
this.trade_result = ''
|
||||
this.rise_or_fall = ''
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
let obj = {
|
||||
page: pageNo,
|
||||
page_num: pageSize,
|
||||
symbol: this.symbol,
|
||||
trade_result:this.trade_result,
|
||||
rise_or_fall:this.rise_or_fall
|
||||
}
|
||||
this.loading_s = true
|
||||
setTimeout(() => {
|
||||
this.post('/cycle/get_all_order', obj).then(res => {
|
||||
this.loading_s = false
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fixed1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 1010;
|
||||
}
|
||||
|
||||
.selectTime {
|
||||
flex: 1;
|
||||
margin: 0 20rpx;
|
||||
height: 66rpx;
|
||||
background: rgba(160, 171, 181, 0.2);
|
||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(255, 255, 255, 0.5);
|
||||
border-radius: 10rpx;
|
||||
color: #8B99A2;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
line-height: 66rpx;
|
||||
}
|
||||
|
||||
.select_on {
|
||||
width: 180rpx;
|
||||
height: 66rpx;
|
||||
margin-right: 20rpx;
|
||||
line-height: 66rpx;
|
||||
background: #0165EE;
|
||||
border-radius: 10rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.select_off {
|
||||
width: 180rpx;
|
||||
height: 66rpx;
|
||||
margin-right: 20rpx;
|
||||
line-height: 66rpx;
|
||||
background: #8B99A2;
|
||||
border-radius: 10rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.resetBtn {
|
||||
width: 300rpx;
|
||||
height: 86rpx;
|
||||
line-height: 86rpx;
|
||||
background: rgba(160, 171, 181, 0.2);
|
||||
border-radius: 10rpx;
|
||||
color: #8B99A2;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.inquireBtn {
|
||||
width: 300rpx;
|
||||
height: 86rpx;
|
||||
line-height: 86rpx;
|
||||
background: #0165EE;
|
||||
border-radius: 10rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,80 @@
|
||||
<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.assets.transfer.jilu"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view>
|
||||
<view class="listBox" v-for="(item,index) in list" :key="index"
|
||||
:style="'background-color: '+theme.fu_bg">
|
||||
<view class="width-100b height-82 padding-w-22 flex align-center"
|
||||
style="border-bottom: 1rpx solid rgba(191, 195, 199, 0.2);">
|
||||
<text class="font-32 numbold-font">{{item.name}}</text>
|
||||
</view>
|
||||
<view class="width-100b padding-w-20">
|
||||
<view class="height-80 flex align-center justify-between">
|
||||
<text class="font-26 nummedium-font">{{item.price}}</text>
|
||||
<text class="font-26 nummedium-font color-C3C3C3">{{item.createtime}}</text>
|
||||
</view>
|
||||
<view class="padding-b-20">
|
||||
<text class="font-26 bold-font">{{item.description}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</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('/wallet/transfer_log', {
|
||||
page: pageNo,
|
||||
page_num: pageSize
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.listBox {
|
||||
width: 690rpx;
|
||||
// height: 183rpx;
|
||||
margin: 30rpx auto;
|
||||
// background: #FFFFFF;
|
||||
box-shadow: 0rpx 4rpx 10rpx rgba(205, 206, 219, 0.3);
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,337 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="i18n.assets.transfer.title" :isRight="true" righturl="/static/imgs/asset/zhuanhuanjilu@2x.png"
|
||||
@Jump="router.push('/pages/asset/record')"></myNav>
|
||||
<view class="padding-w-30">
|
||||
<view class="borderBox" :style="'background-color: '+theme.fu_bg">
|
||||
<view class="height-260 padding-22 flex align-center justify-between">
|
||||
<view class="flex-1">
|
||||
<view @click="showPoup='accountL'"
|
||||
:class="[animationName?'animation-slide-bottom':'']"
|
||||
class="width-100b height-110 flex align-center">
|
||||
<i class="cuIcon-title color-00C481"></i>
|
||||
<text class="font-32 color-D1D3D8 margin-w-10">{{i18n.assets.transfer.from}}</text>
|
||||
<text class="font-32">{{leftObj.name}}</text>
|
||||
</view>
|
||||
<view class="width-100b height-2 margin-c-4" style="background-color: #D1D3D8;"> </view>
|
||||
<view @click="showPoup='accountR'"
|
||||
:class="[animationName?'animation-slide-top':'']"
|
||||
class="width-100b height-110 flex align-center">
|
||||
<i class="cuIcon-title color-FF4040"></i>
|
||||
<text class="font-32 color-D1D3D8 margin-w-10">{{i18n.assets.transfer.to}}</text>
|
||||
<text class="font-32">{{rightObj.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<image @click="exchange" :class="animationName" class="width-62 height-62 margin-l-30"
|
||||
src="/static/imgs/asset/qiehuan@2x.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="borderBox" :style="'background-color: '+theme.fu_bg">
|
||||
<view @click="showPoup='currency',currType=true" class="padding-22">
|
||||
<view class="height-65 flex align-center">
|
||||
<text class="font-32">{{i18n.assets.transfer.curr}}</text>
|
||||
</view>
|
||||
<view class="height-65 flex align-center">
|
||||
<text v-if="selectCurr.curr_id != undefined"
|
||||
class="font-32 numbold-font">{{selectCurr.name}}</text>
|
||||
<text v-else class="font-32 color-0165EE">{{i18n.assets.transfer.subtit}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="borderBox" :style="'background-color: '+theme.fu_bg">
|
||||
<view class="padding-22">
|
||||
<view class="height-65 flex align-center">
|
||||
<text class="font-32">{{i18n.assets.transfer.num}}</text>
|
||||
</view>
|
||||
<view class="height-65 flex align-center justify-between">
|
||||
<input class="height-65 font-26 numbold-font" type="number" v-model="inputNum"
|
||||
:placeholder="i18n.assets.transfer.inputNum" />
|
||||
<view class="height-65 line-height-65">
|
||||
<text @click="allIn" class="font-26 bold-font color-0165EE">{{i18n.assets.transfer.all}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="borderBox" :style="'background-color: '+theme.fu_bg">
|
||||
<view class="padding-22">
|
||||
<view class="height-65 flex align-center justify-between">
|
||||
<text class="font-30">{{i18n.assets.transfer.pay_pwd}}</text>
|
||||
<input class="height-65 font-30 numbold-font text-right" type="text" v-model="pay_pwd" password
|
||||
:placeholder="i18n.assets.transfer.inputPWD" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="selectCurr.name" class="flex align-center">
|
||||
<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>
|
||||
<text class="font-26">{{selectCurr.name}}</text>
|
||||
</view>
|
||||
<!-- <p class="font-26 color-333333">可用 {{available_num}} USDT</p> -->
|
||||
<view class="borderBox" :style="'background-color: '+theme.fu_bg">
|
||||
<view class="padding-22" v-html="transfer_text">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="width-600 margin-50-auto">
|
||||
<button @click="transfer" class="cu-btn loginBtn">{{i18n.assets.transfer.sure}}</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<u-picker @confirm="select" v-model="currType" mode="selector" :range="count_obj" range-key="name"
|
||||
:confirm-text="i18n.assets.transfer.confirm" :cancel-text="i18n.assets.transfer.cancel"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
inputNum: '',
|
||||
pay_pwd: '',
|
||||
|
||||
zhuanghu: [],
|
||||
leftObj: {
|
||||
id: 1,
|
||||
name: '现货账户'
|
||||
},
|
||||
rightObj: {
|
||||
id: 1,
|
||||
name: '现货账户'
|
||||
},
|
||||
|
||||
currList: [],
|
||||
selectCurr: '',
|
||||
selectIndex: '',
|
||||
|
||||
showPoup: '',
|
||||
currType: false,
|
||||
|
||||
transfer_text: '',
|
||||
|
||||
animationName: '',
|
||||
|
||||
flag: true,
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e)
|
||||
if(e.id){
|
||||
if(e.id==1||e.id==0){
|
||||
this.leftObj.id = 1
|
||||
this.leftObj.name = this.i18n.assets.transfer.xh
|
||||
this.rightObj.id = 2
|
||||
this.rightObj.name = this.i18n.assets.transfer.fb
|
||||
}
|
||||
if(e.id==2){
|
||||
this.leftObj.id = e.id
|
||||
this.leftObj.name = this.i18n.assets.transfer.fb
|
||||
this.rightObj.id = 1
|
||||
this.rightObj.name = this.i18n.assets.transfer.xh
|
||||
}
|
||||
if(e.id==3){
|
||||
this.leftObj.id = e.id
|
||||
this.leftObj.name = this.i18n.assets.transfer.lh
|
||||
this.rightObj.id = 1
|
||||
this.rightObj.name = this.i18n.assets.transfer.xh
|
||||
}
|
||||
if(e.id==4){
|
||||
this.leftObj.id = e.id
|
||||
this.leftObj.name = this.i18n.assets.transfer.qq
|
||||
this.rightObj.id = 1
|
||||
this.rightObj.name = this.i18n.assets.transfer.xh
|
||||
}
|
||||
}
|
||||
if(e.rightid){
|
||||
this.leftObj.id = 1
|
||||
this.leftObj.name = this.i18n.assets.transfer.xh
|
||||
this.rightObj.id = e.rightid
|
||||
this.rightObj.name = this.i18n.assets.transfer.qq
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
this.get_transfer()
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
available_num() {
|
||||
if(this.leftObj.id==1){
|
||||
return this.selectCurr.num || 0 //现货数量
|
||||
}else if(this.leftObj.id==2){
|
||||
return this.selectCurr.num_fb || 0 //现货数量
|
||||
}else if(this.leftObj.id==3){
|
||||
return this.selectCurr.num_lh || 0 //现货数量
|
||||
}else if(this.leftObj.id==4){
|
||||
return this.selectCurr.num_qq || 0 //现货数量
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
count_obj() {
|
||||
let obj = [];
|
||||
var that = this
|
||||
switch (this.showPoup) {
|
||||
case 'currency':
|
||||
obj = that.currList
|
||||
break;
|
||||
case 'accountL':
|
||||
obj = that.zhuanghu.filter((item) => {
|
||||
return item.id != that.rightObj.id&&item.id != that.leftObj.id
|
||||
})
|
||||
break;
|
||||
case 'accountR':
|
||||
obj = that.zhuanghu.filter((item) => {
|
||||
return item.id != that.leftObj.id&&item.id != that.rightObj.id
|
||||
})
|
||||
break;
|
||||
default:
|
||||
obj = that.currList
|
||||
break;
|
||||
}
|
||||
return obj
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
get_transfer() {
|
||||
this.post('/wallet/get_transfer').then((res) => {
|
||||
console.log('划转内容', res)
|
||||
if (res.code == 1) {
|
||||
let currData = res.data.curr || []
|
||||
// 确保 BTC 和 ETH 始终出现在币种列表中
|
||||
let names = currData.map(c => (c.name || '').toUpperCase())
|
||||
if (!names.includes('BTC')) {
|
||||
currData.push({ curr_id: 'btc_static', name: 'BTC', num: 0, num_fb: 0, num_lh: 0, num_qq: 0 })
|
||||
}
|
||||
if (!names.includes('ETH')) {
|
||||
currData.push({ curr_id: 'eth_static', name: 'ETH', num: 0, num_fb: 0, num_lh: 0, num_qq: 0 })
|
||||
}
|
||||
this.currList = currData
|
||||
this.transfer_text = res.data.transfer_text
|
||||
this.zhuanghu = res.data.zhuanghu
|
||||
if (this.selectIndex) {
|
||||
this.selectCurr = this.currList[this.selectIndex]
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
allIn() {
|
||||
if (this.selectCurr.curr_id != undefined) {
|
||||
this.inputNum = this.available_num
|
||||
} else {
|
||||
this.tos(this.i18n.assets.transfer.p0)
|
||||
}
|
||||
},
|
||||
// 划转
|
||||
transfer() {
|
||||
if (!this.flag) return
|
||||
console.log(this.selectCurr.curr_id)
|
||||
if (this.selectCurr.curr_id == undefined) {
|
||||
this.tos(this.i18n.assets.transfer.p0)
|
||||
return
|
||||
}
|
||||
if (this.inputNum == '') {
|
||||
this.tos(this.i18n.assets.transfer.inputNum)
|
||||
return
|
||||
}
|
||||
if (Number(this.inputNum) > Number(this.available_num)) {
|
||||
this.tos(this.i18n.assets.transfer.maxNum + this.available_num)
|
||||
return
|
||||
}
|
||||
if (this.pay_pwd == '') {
|
||||
this.tos(this.i18n.assets.transfer.inputPWD)
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title: this.i18n.assets.transfer.loading,
|
||||
mask:true
|
||||
})
|
||||
this.flag = false
|
||||
this.post('/wallet/transfer_sub', {
|
||||
left_id: this.leftObj.id,
|
||||
right_id: this.rightObj.id,
|
||||
curr_id: this.selectCurr.curr_id,
|
||||
num: this.inputNum,
|
||||
pay_pwd: this.pay_pwd,
|
||||
}).then((res) => {
|
||||
console.log('划转提交', res)
|
||||
this.flag = true
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.pay_pwd = ''
|
||||
this.inputNum = ''
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/asset/record'
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
},
|
||||
exchange() {
|
||||
if (this.animationName) return
|
||||
this.animationName = 'XZ180'
|
||||
this.inputNum = ''
|
||||
let temp = this.leftObj
|
||||
this.leftObj = this.rightObj
|
||||
this.rightObj = temp
|
||||
setTimeout(() => {
|
||||
this.animationName = ''
|
||||
}, 500)
|
||||
},
|
||||
select(index) {
|
||||
if (this.showPoup == 'accountL') {
|
||||
this.leftObj = this.count_obj[index]
|
||||
console.log(this.leftObj.name)
|
||||
}
|
||||
if (this.showPoup == 'accountR') {
|
||||
this.rightObj = this.count_obj[index]
|
||||
console.log(this.rightObj.name)
|
||||
}
|
||||
if (this.showPoup == 'currency') {
|
||||
this.selectIndex = index
|
||||
this.selectCurr = this.currList[index]
|
||||
this.inputNum = ''
|
||||
console.log(this.selectCurr)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.borderBox {
|
||||
width: 690rpx;
|
||||
// height: 260rpx;
|
||||
margin: 22rpx auto;
|
||||
// background: #FFFFFF;
|
||||
box-shadow: 0rpx 3rpx 6rpx rgba(200, 200, 200, 0.16);
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.XZ180 {
|
||||
transition: all 0.5s;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.loginBtn {
|
||||
width: 600rpx;
|
||||
height: 96rpx;
|
||||
background: #06C38D !important;
|
||||
border-radius: 12rpx;
|
||||
line-height: 96rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,196 @@
|
||||
<template>
|
||||
<view>
|
||||
<view 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 v-if="currentIndex==4" class="font-28 bold-font margin-r-10">{{item.coinname}}</text>
|
||||
<text class="font-28 bold-font numbold-font">{{item.type=='more'?i18n.cycle.long:i18n.cycle.short}}</text>
|
||||
<text class="font-26 numbold-font" :style="'color:'+fu_color">{{item.coinname}}</text>
|
||||
</view>
|
||||
<text class="font-20 numbold-font" :style="'color:'+fu_color">{{item.createtime}}</text>
|
||||
</view>
|
||||
<text @click="setCheck(item.id,item.zy_price,item.zs_price)" v-if="currentIndex==1"
|
||||
class="font-26 numbold-font weight-bold">{{i18n.cycle.set}}</text>
|
||||
<button v-if="currentIndex==0" @click="revocation(item.id)" class="cu-btn loginBtn"
|
||||
:style="'border: 1rpx solid '+color+';color: '+color">{{i18n.cycle.revoke}}</button>
|
||||
<text v-if="currentIndex==4" class="font-26 color-0165EE">{{statusFilter(item.status)}}</text>
|
||||
</view>
|
||||
<view class="width-100b margin-t-10 flex flex-wrap">
|
||||
<view style="width: 33%;" class="height-70 flex direction-column align-start justify-around">
|
||||
<text class="font-26 nummedium-font">{{Number(item.price).toFixed(price_jd)}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.unit}}</text>
|
||||
</view>
|
||||
<view style="width: 33%;" class="height-70 flex direction-column align-center justify-around">
|
||||
<text class="font-26 nummedium-font">{{parseInt(item.num)}}*{{item.multiple}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.beishu}}</text>
|
||||
</view>
|
||||
<view v-if="item.status==0||item.status==1" style="width: 33%;" class="height-70 flex direction-column align-end justify-around">
|
||||
<text class="font-26 nummedium-font">{{nowPrice.toFixed(price_jd)}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.currPrice}}</text>
|
||||
</view>
|
||||
<view v-if="item.status==2" style="width: 33%;" class="height-70 flex direction-column align-end justify-around">
|
||||
<text class="font-26 nummedium-font">{{Number(item.pc_price).toFixed(price_jd)}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.closing}}</text>
|
||||
</view>
|
||||
<view v-if="item.status==3" style="width: 33%;" class="height-70 flex direction-column align-end justify-around">
|
||||
<text class="font-26 nummedium-font">{{item.updatetime}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.revokeTime}}</text>
|
||||
</view>
|
||||
<view style="width: 33%;" class="margin-t-10 height-70 flex direction-column align-start justify-around">
|
||||
<text class="font-26 nummedium-font">{{item.promise_fee}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.margin}}</text>
|
||||
</view>
|
||||
<view style="width: 33%;" class="margin-t-10 height-70 flex direction-column align-center justify-around">
|
||||
<text class="font-26 nummedium-font">{{item.fee}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.service}}</text>
|
||||
</view>
|
||||
<view v-if="item.status==0||item.status==3" style="width: 33%;" class="margin-t-10 height-70 flex direction-column align-end justify-around">
|
||||
<text class="font-26 nummedium-font">{{item.coinname}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.currency}}</text>
|
||||
</view>
|
||||
<view v-if="item.status==1" style="width: 33%;" class="margin-t-10 height-70 flex direction-column align-end justify-around">
|
||||
<text v-if="item.type=='more'" :class="nowPrice>=item.price?'color-00C481':'color-FF4040'" class="font-24 nummedium-font">{{((nowPrice - item.price)*item.num*shizhi).toFixed(6)}}</text>
|
||||
<text v-if="item.type=='free'" :class="item.price>nowPrice?'color-00C481':'color-FF4040'" class="font-24 nummedium-font">{{((item.price - nowPrice)*item.num*shizhi).toFixed(6)}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.profit}}</text>
|
||||
</view>
|
||||
<view v-if="item.status==2" style="width: 33%;" class="margin-t-10 height-70 flex direction-column align-end justify-around">
|
||||
<text :class="item.income>=0?'color-00C481':'color-FF4040'" class="font-26 nummedium-font">{{item.income||0}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.profit}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="currentIndex==1" class="width-100b height-50 margin-t-10 flex align-center justify-end">
|
||||
<button v-if="currentIndex==1" @click="closeOut(item.id)" class="cu-btn loginBtn1">{{i18n.cycle.close}}</button>
|
||||
</view>
|
||||
<view v-if="currentIndex==4" class="">
|
||||
<view v-if="item.status==0" class="width-100b height-50 margin-t-10 flex align-center justify-end">
|
||||
<button @click="revocation(item.id)" class="cu-btn loginBtn" :style="'color:'+color+';border: 1rpx solid '+color+';'">{{i18n.cycle.revoke}}</button>
|
||||
</view>
|
||||
<view v-if="item.status==1" class="width-100b height-50 margin-t-10 flex align-center justify-between">
|
||||
<text @click="setCheck(item.id,item.zy_price,item.zs_price)" class="font-26 numbold-font weight-bold">{{i18n.cycle.set}}</text>
|
||||
<button @click="closeOut(item.id)" class="cu-btn loginBtn1">{{i18n.cycle.close}}</button>
|
||||
</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.cycle.nodata}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:'contractListItem',
|
||||
props: {
|
||||
//标题
|
||||
list: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
currentIndex: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
nowPrice:{//币种当前价格
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
shizhi:{//设备比例
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
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.cycle.tablist1State[index]
|
||||
},
|
||||
// 撤销
|
||||
revocation(id) {
|
||||
uni.showLoading({
|
||||
mask:true
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.hideLoading()
|
||||
this.$emit('revocation',id)
|
||||
},2500)
|
||||
},
|
||||
// 平仓
|
||||
closeOut(id) {
|
||||
uni.showLoading({
|
||||
mask:true
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.hideLoading()
|
||||
this.$emit('closeOut',id)
|
||||
},2500)
|
||||
},
|
||||
// 设置止盈止损
|
||||
setCheck(id,zy_price,zs_price) {
|
||||
this.$emit('setCheck',id,zy_price,zs_price)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.listBox{
|
||||
width: 100%;
|
||||
/* height: 186rpx; */
|
||||
padding: 20rpx 30rpx;
|
||||
margin: 0 auto 20rpx;
|
||||
/* background: #FFFFFF; */
|
||||
}
|
||||
.loginBtn{
|
||||
width: 190rpx;
|
||||
padding: 0 18rpx;
|
||||
height: 48rpx;
|
||||
background: rgba(0,0,0,0) !important;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.loginBtn1{
|
||||
width: 190rpx;
|
||||
padding: 0 18rpx;
|
||||
height: 48rpx;
|
||||
border-radius: 4rpx;
|
||||
color: #FFFFFF;
|
||||
background: #3ECEB2 !important;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<text :class="seconds<10?'warning_w':''" :style="'color:'+color" class="title">{{seconds<0?i18n.cycle.closeing:seconds+' s'}}</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'countTime',
|
||||
props: {
|
||||
// 倒计时的时间,秒为单位
|
||||
timestamp: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
},
|
||||
// 是否自动开始倒计时
|
||||
autoplay: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
color:{
|
||||
type: String,
|
||||
default: '#fff'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 监听时间戳的变化
|
||||
timestamp(newVal, oldVal) {
|
||||
// 如果倒计时间发生变化,清除定时器,重新开始倒计时
|
||||
this.clearTimer();
|
||||
this.start();
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timer: null ,// 定时器
|
||||
seconds: 0, // 记录不停倒计过程中变化的秒数
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// 如果自动倒计时
|
||||
this.autoplay && this.timestamp && this.start();
|
||||
},
|
||||
methods: {
|
||||
// 倒计时
|
||||
start() {
|
||||
// 避免可能出现的倒计时重叠情况
|
||||
this.clearTimer();
|
||||
if (this.timestamp <= 0) return;
|
||||
this.seconds = Number(this.timestamp);
|
||||
this.timer = setInterval(() => {
|
||||
this.seconds--;
|
||||
// 发出change事件
|
||||
// this.$emit('change', this.seconds);
|
||||
if (this.seconds < 0) {
|
||||
return this.end();
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
// 停止倒计时
|
||||
end() {
|
||||
this.clearTimer();
|
||||
// 倒计时结束后等待2秒再刷新订单,因为服务器处理订单数据买卖需要时间
|
||||
setTimeout(()=>{
|
||||
this.$emit('end', {});
|
||||
},2500)
|
||||
},
|
||||
// 清除定时器
|
||||
clearTimer() {
|
||||
if(this.timer) {
|
||||
// 清除定时器
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.title{
|
||||
font-size: 24rpx;
|
||||
font-family: "NumMedium" !important;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
.normal_w{
|
||||
color: #fff;
|
||||
}
|
||||
.warning_w{
|
||||
color: #FF4040;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="listBox" v-for="(item,index) in list" :key="index" :style="'background-color: '+background+';color: '+color">
|
||||
<view class="width-100b height-60 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.rise_or_fall=='rise'?i18n.cycle.up:i18n.cycle.down}}</text>
|
||||
<text class="font-26 numbold-font" :style="'color:'+fu_color">{{item.show_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-100b margin-t-10 flex flex-wrap">
|
||||
<view style="width: 33%;" class="height-70 flex direction-column align-start justify-around">
|
||||
<text class="font-26 nummedium-font">{{Number(item.current_price).toFixed(price_jd)}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.unit}}</text>
|
||||
</view>
|
||||
<view style="width: 33%;" class="height-70 flex direction-column align-center justify-around">
|
||||
<text class="font-26 nummedium-font">{{Number(item.trade_num).toFixed(price_jd)}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.tradeNumber}}</text>
|
||||
</view>
|
||||
<view v-if="currentIndex==0" style="width: 33%;" class="height-70 flex direction-column align-end justify-around">
|
||||
<!-- <text class="font-24 nummedium-font">{{timeCount(item.createtime+item.trade_cycle-item.nowtime)}}s</text> -->
|
||||
<countTime @end="timeCount" :autoplay="true" :timestamp="item.createtime+item.trade_cycle-item.nowtime" ></countTime>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.countTime}}</text>
|
||||
</view>
|
||||
<view v-if="currentIndex==1" style="width: 33%;" class="height-70 flex direction-column align-end justify-around">
|
||||
<text class="font-26 nummedium-font">{{item.trade_cycle}}s</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.tradingCycle}}</text>
|
||||
</view>
|
||||
<view v-if="currentIndex==0" style="width: 33%;" class="margin-t-10 height-70 flex direction-column align-start justify-around">
|
||||
<text class="font-26 nummedium-font">{{Number(nowPrice).toFixed(price_jd)}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.currPrice}}</text>
|
||||
</view>
|
||||
<view v-if="currentIndex==1" style="width: 33%;" class="margin-t-10 height-70 flex direction-column align-start justify-around">
|
||||
<text class="font-26 nummedium-font">{{Number(item.close_price).toFixed(price_jd)}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.closing}}</text>
|
||||
</view>
|
||||
<view style="width: 33%;" class="margin-t-10 height-70 flex direction-column align-center justify-around">
|
||||
<text v-if="currentIndex==0" class="font-26 nummedium-font">{{item.open_time}}</text>
|
||||
<text v-if="currentIndex==1" class="font-26 nummedium-font">{{item.createtime}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.complete}}</text>
|
||||
</view>
|
||||
<view v-if="currentIndex==0" style="width: 33%;" class="margin-t-10 height-70 flex direction-column align-end justify-around">
|
||||
<text v-if="item.rise_or_fall=='rise'" :class="nowPrice>item.current_price?'color-00C481':'color-FF4040'" class="font-24 nummedium-font">{{nowPrice>item.current_price?item.expect_income:'-'+item.trade_num}}</text>
|
||||
<text v-if="item.rise_or_fall=='fall'" :class="item.current_price>nowPrice?'color-00C481':'color-FF4040'" class="font-24 nummedium-font">{{item.current_price>nowPrice?item.expect_income:'-'+item.trade_num}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.profit}}</text>
|
||||
</view>
|
||||
<view v-if="currentIndex==1" style="width: 33%;" class="margin-t-10 height-70 flex direction-column align-end justify-around">
|
||||
<text :class="item.trade_result=='win'?'color-00C481':'color-FF4040'" class="font-26 nummedium-font ">{{Number(item.trade_result_num).toFixed(price_jd)}}</text>
|
||||
<text class="font-24 nummedium-font" :style="'color:'+fu_color">{{i18n.cycle.profit}}</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.cycle.nodata}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import countTime from './count-time.vue'
|
||||
export default {
|
||||
components: {
|
||||
countTime,
|
||||
},
|
||||
name: 'secondListItem',
|
||||
props: {
|
||||
//标题
|
||||
list: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
currentIndex: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
nowPrice: { //币种当前价格
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
price_jd:{
|
||||
type: Number,
|
||||
default: 4
|
||||
},
|
||||
background:{
|
||||
type: String,
|
||||
default: '#ffffff'
|
||||
},
|
||||
color:{
|
||||
type: String,
|
||||
default: '#fff'
|
||||
},
|
||||
fu_color:{
|
||||
type: String,
|
||||
default: '#B7B7B7'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
timeCount() {
|
||||
this.$emit('timeOut');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.listBox {
|
||||
width: 100%;
|
||||
/* height: 186rpx; */
|
||||
padding: 20rpx 30rpx;
|
||||
margin: 0 auto 20rpx;
|
||||
/* background: #FFFFFF; */
|
||||
}
|
||||
|
||||
.loginBtn {
|
||||
width: 120rpx;
|
||||
height: 48rpx;
|
||||
background: #FFFFFF !important;
|
||||
border: 1rpx solid #0165EE;
|
||||
border-radius: 4rpx;
|
||||
color: #0165EE;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.loginBtn1 {
|
||||
width: 120rpx;
|
||||
height: 48rpx;
|
||||
border-radius: 4rpx;
|
||||
color: #FFFFFF;
|
||||
background: #0165EE !important;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,606 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<z-paging ref="paging" refresher-only @onRefresh="onRefresh">
|
||||
<!-- 顶部标题 -->
|
||||
<view slot="top" class="width-100b flex align-center justify-between padding-w-30 bj-102030"
|
||||
:style="{height: `calc(${statusBar}px + 100rpx)`,paddingTop:`${statusBar}px`}">
|
||||
<view class="flex align-center">
|
||||
<i @click="router.goBack()" class="cuIcon-back font-40 margin-r-20 color-white"></i>
|
||||
<view @click="leftshow = true" class="width-360 flex align-center">
|
||||
<image class="width-40 height-40" src="/static/imgs/transaction/left6@2x.png" mode=""></image>
|
||||
<text class="font-36 numbold-font margin-w-15 color-white">{{coinInfo.show_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="relative">
|
||||
<view class="height-140 bj-102030 padding-w-32 flex align-center justify-between">
|
||||
<view class="height-100 flex direction-column align-start justify-between">
|
||||
<text :class="zhangdie>=0?'color-12B886':'color-E27046'" class="font-50 numbold-font">{{Number(lastData.close||0).toFixed(coinInfo.price_jd)}}</text>
|
||||
<text :class="zhangdie>=0?'color-12B886':'color-E27046'" class="font-32 nummedium-font">{{zhangdie}}%</text>
|
||||
</view>
|
||||
<view class="height-90 flex direction-column align-start justify-between">
|
||||
<text class="font-26 color-F2F5FF">{{i18n.line.highprice}} {{Number(dayData.high).toFixed(coinInfo.price_jd)||0}}</text>
|
||||
<text class="font-26 color-F2F5FF">{{i18n.line.lowprice}} {{Number(dayData.low).toFixed(coinInfo.price_jd)||0}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="width: 750rpx; display: block;height: 816rpx; margin-top: 8rpx;">
|
||||
<!-- K线 -->
|
||||
<iframe style="width: 750rpx;height: 816rpx;overflow: hidden" :src="Ksrc"
|
||||
frameborder="0"></iframe>
|
||||
</view>
|
||||
<!-- 秒合约交易tab选择 -->
|
||||
<view class="width-100b bj-102030 height-72 padding-w-40 flex align-center justify-between">
|
||||
<view @click="tabsChange2(index)" class="flex-1 height-46 flex direction-column align-center justify-between" v-for="(item,index) in tablist2" :key="index">
|
||||
<text :class="current2==index?'bold-font color-1881D2':'color-9FBEDC medium-font'" class="font-28">{{item}}</text>
|
||||
<view :style="current2==index?'':'visibility: hidden;'" class="heng"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 秒合约交易列表 -->
|
||||
<swiper :class="contractOrderList_s.length>2?'swiper':'swiper_no'" :current="current2" @animationfinish="animationfinish2"
|
||||
@change="onswiperchange2">
|
||||
<swiper-item v-for="(item,index) in tablist2" class="swiper-item" style="height: 100%;">
|
||||
<scroll-view scroll-y="true" style="height: 100%;" @scrolltolower="pullTorefresh_s">
|
||||
<secondListItem @timeOut="timeOut" :currentIndex="current2" :loading="loading_s"
|
||||
:list="contractOrderList_s" :nowPrice="lastData.close"></secondListItem>
|
||||
<view class="height-140">
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</z-paging>
|
||||
|
||||
<view class="height-140 fixed width-100b bj-102030 flex align-center justify-between padding-w-32" style="bottom: 0px;">
|
||||
<view @click="riseTimeType=true" class="flex-1 height-100 flex align-center justify-between radiu-8 margin-r-8" style="border: 1px solid #0B1622;">
|
||||
<view class="flex-1 flex direction-column align-center justify-center">
|
||||
<text class="font-24 color-F2F5FF">{{i18n.cycle.num}}</text>
|
||||
<text class="font-24 color-F2F5FF">{{riseNumber}}</text>
|
||||
</view>
|
||||
<view class="flex-1 flex direction-column align-center justify-center">
|
||||
<text class="font-24 color-F2F5FF">{{i18n.fastBuy.text12}}</text>
|
||||
<text class="font-24 color-F2F5FF">{{riseTime}}s</text>
|
||||
</view>
|
||||
<view class="flex-1 flex direction-column align-center justify-center">
|
||||
<text class="font-24 color-F2F5FF">{{i18n.cycle.rate}}</text>
|
||||
<text class="font-24 color-F2F5FF">{{Number(coinInfo.winpl*100).toFixed(2)}} %</text>
|
||||
</view>
|
||||
<i class="cuIcon-unfold font-28 color-1881D2"></i>
|
||||
</view>
|
||||
<view class="flex align-center justify-end">
|
||||
<view @click="buyRise('rise')" class="width-164 height-100 bj-12B886 radiu-8 margin-r-8 text-center line-height-100">
|
||||
<text class="font-36 color-white">{{i18n.cycle.up}}</text>
|
||||
</view>
|
||||
<view @click="buyRise('fall')" class="width-164 height-100 bj-E27046 radiu-8 text-center line-height-100">
|
||||
<text class="font-36 color-white">{{i18n.cycle.down}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 左侧弹出 -->
|
||||
<u-popup v-model="leftshow" mode="left">
|
||||
<view class="width-600 bj-102030" style="padding: 70rpx 0rpx;height:100%;display: flex;flex-direction: column;">
|
||||
<view class="height-110 flex align-center padding-w-30">
|
||||
<text class="font-32 bold-font color-white">{{i18n.newWord.Trading}}</text>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" style="overflow: scroll;flex: 1;">
|
||||
<view class="padding-w-30">
|
||||
<view @click="changeCoin(index,1)" class="width-100b height-78 flex align-center justify-between" v-for="(item,index) in midList" :key="index" style="border-bottom: 1rpx solid #2C364B;">
|
||||
<view class="flex align-center">
|
||||
<image class="width-36 height-36 margin-w-10" :src="item.logo_image" mode=""></image>
|
||||
<text class="font-28 nummedium-font color-white">{{item.name}}<span class="font-26 color-F2F5FF nummedium-font">/USDT</span></text>
|
||||
</view>
|
||||
<text class="font-28 nummedium-font color-white">
|
||||
{{coinInfo.name==item.name&&lastData.close? (Number(lastData.close||0).toFixed(item.price_jd)) : Number(item.close).toFixed(item.price_jd)}}</text>
|
||||
<text v-if="coinInfo.name==item.name&&lastData.close" class="font-28 nummedium-font"
|
||||
:class="zhangdie>=0?'color-12B886':'color-E27046'">{{zhangdie}}%</text>
|
||||
<text v-else class="font-28 nummedium-font"
|
||||
:class="item.increase>0?'color-12B886':'color-E27046'">{{Number(item.increase*100).toFixed(2)}}%</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<!-- 实名认证弹窗 -->
|
||||
<u-popup style="z-index: 10100;" border-radius="4" mode="center" v-model="TSShow">
|
||||
<view class="width-600 padding-b-20 bj-102030">
|
||||
<view class="width-100b height-220 padding-w-30 padding-c-40 flex direction-column align-center justify-between">
|
||||
<image class="width-64 height-64" src="/static/imgs/quantify/tongzhi@2x.png" mode=""></image>
|
||||
<view class="font-28 bold-font text-center padding-w-20 color-white">{{shimingTitle}}</view>
|
||||
</view>
|
||||
<view class="width-100b height-90 flex align-center justify-center">
|
||||
<view @click="router.push('/pages/my/safety/real')" class="qcbtn3">{{i18n.cycle.shiming}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<u-popup style="z-index: 999;" mode="bottom" v-model="riseTimeType">
|
||||
<view class="padding-w-30" style="background-color: #202833;">
|
||||
<view class="height-70 line-height-70">
|
||||
<text class="font-28 color-F2F5FF">{{i18n.cycle.moshi}}</text>
|
||||
</view>
|
||||
<view class="height-79 flex align-center">
|
||||
<view class="xuanzhebox">
|
||||
<text>USDT</text>
|
||||
<image class="width-60 height-60 absolute" style="right: 0rpx;" src="/static/imgs/new/gou1.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-70 line-height-70">
|
||||
<text class="font-28 color-F2F5FF">{{i18n.cycle.open}}</text>
|
||||
</view>
|
||||
<view class="flex flex-wrap">
|
||||
<view @click="riseNumber=item" class="xuanzhebox margin-c-8 margin-r-10" v-for="(item,index) in numlist" :key="index">
|
||||
<text>{{item}}</text>
|
||||
<image v-if="riseNumber==item" class="width-60 height-60 absolute" style="right: 0rpx;" src="/static/imgs/new/gou1.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<input class="xuanzhebox padding-w-20" style="width: 338rpx;" type="number" v-model="riseNumber" :placeholder="i18n.cycle.openInput"/>
|
||||
</view>
|
||||
<view class="height-70 line-height-70">
|
||||
<text class="font-28 color-F2F5FF">{{i18n.cycle.time}}</text>
|
||||
</view>
|
||||
<view class="flex flex-wrap">
|
||||
<view @click="riseTime=item" class="xuanzhebox margin-c-8 margin-r-10" v-for="(item,index) in coinInfo.trade_time" :key="index">
|
||||
<text>{{item}} s</text>
|
||||
<image v-if="riseTime==item" class="width-60 height-60 absolute" style="right: 0rpx;" src="/static/imgs/new/gou1.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="height-80 flex align-center justify-between">
|
||||
<text class="font-28 nummedium-font color-F2F5FF">{{i18n.cycle.available}} :<span class="color-12B886">{{Number(count_xh_usdt||0).toFixed(4)}} USDT</span></text>
|
||||
<text class="font-28 nummedium-font color-F2F5FF">{{i18n.cycle.rate}} :<span class="color-12B886">{{Number(coinInfo.winpl*100).toFixed(2)}} %</span></text>
|
||||
</view>
|
||||
|
||||
<view class="height-140 flex align-center justify-between">
|
||||
<view @click="buyRise('rise')" class="loginBtn bj-12B886">
|
||||
<text class="font-36 color-white">{{i18n.cycle.up}}</text>
|
||||
</view>
|
||||
<view @click="buyRise('fall')" class="loginBtn bj-E27046">
|
||||
<text class="font-36 color-white">{{i18n.cycle.down}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import secondListItem from './components/second_list_item.vue'
|
||||
export default {
|
||||
components: {
|
||||
secondListItem,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
count_xh_usdt:0, //合约可用剩余usdt
|
||||
second_usdt:0, //秒合约可用剩余usdt
|
||||
midList:[], //左侧币种列表
|
||||
coinInfo:{}, //选中的当前币种信息
|
||||
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
topTab:2,//顶部选项 1=合约交易 2=秒合约
|
||||
leftshow:false, //左侧弹窗开关
|
||||
|
||||
// 秒合约
|
||||
tablist2:['交易中','已平仓'],
|
||||
current2:0,
|
||||
|
||||
riseNumber:100, //开仓数量
|
||||
riseTime: 0, //开仓时间
|
||||
riseTimeType:false, //开仓时间弹窗开关
|
||||
numlist:['100','200','300','500','1000','2000'],
|
||||
contractOrderList_s:[], //秒合约交易订单列表
|
||||
state_s:'more',
|
||||
page_s:1,
|
||||
loading_s:true,
|
||||
|
||||
BtnFlag:true, //按钮防重复点击
|
||||
TSShow:false,
|
||||
shimingTitle:'请先完成实名认证',
|
||||
|
||||
// socket
|
||||
lastData:'',
|
||||
tick:"",
|
||||
|
||||
myCoinList:[],
|
||||
Ksrc: '',
|
||||
dayData: {
|
||||
high:0,
|
||||
low:0
|
||||
},
|
||||
timer:null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
zhangdie() {
|
||||
if (this.lastData.close) {
|
||||
let increase = Number(this.lastData.close) - Number(this.coinInfo.open)
|
||||
return Number(increase / Number(this.coinInfo.open) * 100).toFixed(2)
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
},
|
||||
watch:{
|
||||
current2(oldValue,newValue){
|
||||
if(oldValue != newValue){
|
||||
this.refresh_list()
|
||||
}
|
||||
},
|
||||
leftshow(item){
|
||||
if(item==false){
|
||||
|
||||
}else{
|
||||
this.getMore(this.coinInfo.symbol)
|
||||
}
|
||||
}
|
||||
},
|
||||
filters:{
|
||||
//过滤数字位数
|
||||
numFilter(item){
|
||||
if (item == undefined || item == null) {
|
||||
return 0;
|
||||
} else {
|
||||
if(Number(item) < 10){
|
||||
return Number(item).toFixed(6);
|
||||
}else if (Number(item) >= 10 && Number(item) < 1000) {
|
||||
return Number(item).toFixed(4);
|
||||
} else if (Number(item) >= 1000 && Number(item) < 1000000) {
|
||||
return (Number(item) / 1000).toFixed(4) + ' K';
|
||||
} else if (Number(item) >= 1000000 && Number(item) < 10000000000) {
|
||||
return (Number(item) / 1000000).toFixed(2) + ' M';
|
||||
} else {
|
||||
return (Number(item) / 10000000000).toFixed(2) + ' B';
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
onLoad:function(){
|
||||
this.getMore()
|
||||
},
|
||||
onShow() {
|
||||
if(getApp().globalData.symbol == ''){
|
||||
getApp().globalData.symbol = this.coinInfo.symbol
|
||||
console.log(getApp().globalData.symbol )
|
||||
}
|
||||
this.onSocketMessage()
|
||||
this.linkSocket() //链接socket订阅
|
||||
this.tablist2 = this.i18n.cycle.tablist2
|
||||
|
||||
this.TSShow = false
|
||||
this.getWallet()
|
||||
uni.$on('reConnect', (res) => {
|
||||
console.log("重连WebSocket")
|
||||
this.onSocketMessage()
|
||||
})
|
||||
},
|
||||
onUnload :function(){
|
||||
clearTimeout(this.timer)
|
||||
getApp().globalData.symbol = ""
|
||||
uni.$off('reConnect')
|
||||
this.cancelSocket() //取消socket订阅
|
||||
},
|
||||
methods: {
|
||||
onRefresh() {
|
||||
console.log('下拉刷新');
|
||||
if(this.topTab==2){
|
||||
this.getMore(this.coinInfo.symbol)
|
||||
}
|
||||
this.getWallet()
|
||||
setTimeout(()=>{
|
||||
this.$refs.paging.complete();
|
||||
}, 1500);
|
||||
},
|
||||
getWallet(){
|
||||
this.post('/wallet/wallet_index').then((res) => {
|
||||
// console.log('我的资产',res)
|
||||
if (res.code == 1) {
|
||||
this.count_xh_usdt = res.data.all.usdt_num
|
||||
}
|
||||
})
|
||||
},
|
||||
getDay(){
|
||||
this.post('/market/get_day_kline', {
|
||||
symbol: this.coinInfo.symbol
|
||||
}).then(res => {
|
||||
console.log('获取一天最高最低',res)
|
||||
if (res.code == 1) {
|
||||
this.dayData = res.data
|
||||
this.timer = setTimeout(()=>{
|
||||
this.getDay()
|
||||
},10000)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 下拉加载更多
|
||||
pullTorefresh_s(){
|
||||
if (this.current2 == 0) return
|
||||
console.log('下拉加载更多')
|
||||
if (this.state_s == 'over') return
|
||||
if (this.loading_s == true) return
|
||||
this.page_s++
|
||||
this.get_Second_order()
|
||||
},
|
||||
// 刷新重置订单列表
|
||||
refresh_list(){
|
||||
if(this.topTab==2){
|
||||
this.contractOrderList_s = []
|
||||
this.page_s = 1
|
||||
this.state_s = 'more'
|
||||
this.get_Second_order()
|
||||
}
|
||||
},
|
||||
// 获取秒合约交易订单列表
|
||||
get_Second_order(){
|
||||
if(this.current2 == 0){
|
||||
this.loading_s = true
|
||||
this.post('/cycle/get_order',{
|
||||
symbol:this.coinInfo.symbol,
|
||||
}).then(res => {
|
||||
console.log('秒合约——交易中——订单列表',res)
|
||||
if (res.code == 1) {
|
||||
setTimeout(()=>{
|
||||
this.loading_s = false
|
||||
this.contractOrderList_s = res.data
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
}
|
||||
if(this.current2 == 1){
|
||||
if (this.state_s == 'over') return
|
||||
this.loading_s = true
|
||||
this.state_s = 'loading'
|
||||
this.post('/cycle/get_all_order', {
|
||||
page: this.page_s,
|
||||
symbol:this.coinInfo.symbol,
|
||||
}).then(res => {
|
||||
console.log('秒合约——已平仓——订单列表',res)
|
||||
if (res.code == 1) {
|
||||
setTimeout(()=>{
|
||||
this.loading_s = false
|
||||
this.contractOrderList_s = this.contractOrderList_s.concat(res.data.data)
|
||||
if (this.page_s >= res.data.last_page) {
|
||||
this.state_s = 'over'
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 平仓倒计时结束
|
||||
timeOut(){
|
||||
this.current2=1
|
||||
this.getWallet()
|
||||
},
|
||||
// 选择开仓时间
|
||||
selectTime(index){
|
||||
// console.log(index)
|
||||
this.riseTime = this.coinInfo.trade_time[index]
|
||||
},
|
||||
// tabs通知swiper切换
|
||||
tabsChange2(index) {
|
||||
this.current2 = index;
|
||||
},
|
||||
onswiperchange2(e) {
|
||||
// #ifndef APP-PLUS || H5 || MP-WEIXIN || MP-QQ
|
||||
let index = e.target.current || e.detail.current;
|
||||
this.tabsChange2(index);
|
||||
// #endif
|
||||
},
|
||||
animationfinish2(e) {
|
||||
let current = e.detail.current;
|
||||
this.current2 = current;
|
||||
},
|
||||
// 秒合约下单
|
||||
buyRise(type){
|
||||
if(!this.BtnFlag) return
|
||||
if(this.riseNumber==''){
|
||||
this.tos(this.i18n.cycle.openInput)
|
||||
return
|
||||
}
|
||||
if(this.riseTime==0){
|
||||
this.tos(this.i18n.cycle.timeclick)
|
||||
return
|
||||
}
|
||||
this.BtnFlag = false
|
||||
this.post('/cycle/start_order', {
|
||||
position: type,
|
||||
symbol: this.coinInfo.symbol,
|
||||
cycle: this.riseTime,
|
||||
num: this.riseNumber,
|
||||
},true).then(res => {
|
||||
console.log('秒合约下单',res)
|
||||
this.BtnFlag = true
|
||||
this.riseTimeType = false
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.getWallet()
|
||||
if(this.current2 == 0){
|
||||
this.refresh_list()
|
||||
}else{
|
||||
this.current2 = 0
|
||||
}
|
||||
}else{
|
||||
if(res.data.jump == 1){
|
||||
this.shimingTitle = res.msg
|
||||
this.TSShow = true
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取秒合约币种列表
|
||||
getMore(symbol){
|
||||
this.post('/cycle/get_cycle_coin').then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log('秒合约交易币种列表',res)
|
||||
if(symbol){
|
||||
this.midList = res.data
|
||||
this.refresh_list()
|
||||
}else{
|
||||
this.cancelSocket() //取消socket订阅
|
||||
this.midList = res.data
|
||||
this.coinInfo = this.midList[0]
|
||||
this.Ksrc = 'https://exchange.v5ico-kline.coddex.xyz/index.html?bb_type=' + this.coinInfo.bb_type + '&symbol=' + this.coinInfo.symbol + '&lang=' + uni.getStorageSync('Language')
|
||||
this.getDay()
|
||||
if(this.coinInfo.trade_time){
|
||||
this.riseTime = this.coinInfo.trade_time[0]
|
||||
}
|
||||
if(!this.leftshow){
|
||||
this.refresh_list()
|
||||
}
|
||||
getApp().globalData.symbol = this.coinInfo.symbol
|
||||
this.linkSocket() //链接socket订阅
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选中币种
|
||||
changeCoin(index){
|
||||
this.cancelSocket() //取消socket订阅
|
||||
this.riseTime = ''
|
||||
this.coinInfo = this.midList[index]
|
||||
this.Ksrc = 'https://exchange.v5ico-kline.coddex.xyz/index.html?bb_type=' + this.coinInfo.bb_type + '&symbol=' + this.coinInfo.symbol + '&lang=' + uni.getStorageSync('Language')
|
||||
clearTimeout(this.timer)
|
||||
this.getDay()
|
||||
this.refresh_list()
|
||||
getApp().globalData.symbol = this.coinInfo.symbol
|
||||
this.linkSocket() //链接socket订阅
|
||||
if(this.lastData.close){
|
||||
this.lastData.close = Number(this.coinInfo.close)
|
||||
}
|
||||
this.leftshow = false
|
||||
},
|
||||
// 取消socket订阅
|
||||
cancelSocket(){
|
||||
this.sendSocketMessage({
|
||||
'subs':'depth',
|
||||
"user_id":uni.getStorageSync("user_id"),
|
||||
"unsub":"market."+this.coinInfo.symbol+".depth.step0",
|
||||
"id":"BTC",
|
||||
})
|
||||
this.sendSocketMessage({
|
||||
'subs':'tradenow',
|
||||
"user_id":uni.getStorageSync("user_id"),
|
||||
"unsub":"market."+this.coinInfo.symbol+".kline.1min",
|
||||
"id":"BTC",
|
||||
})
|
||||
},
|
||||
// 链接socket订阅
|
||||
linkSocket(){
|
||||
this.sendSocketMessage({
|
||||
'subs':'depth',
|
||||
"user_id":uni.getStorageSync("user_id"),
|
||||
"sub":"market."+this.coinInfo.symbol+".depth.step0",
|
||||
"id":"BTC",
|
||||
})
|
||||
this.sendSocketMessage({
|
||||
'subs':'tradenow',
|
||||
"user_id":uni.getStorageSync("user_id"),
|
||||
"sub":"market."+this.coinInfo.symbol+".kline.1min",
|
||||
"id":"BTC",
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.limitBox_up{
|
||||
// width: 116rpx;
|
||||
height: 40rpx;
|
||||
padding: 0 14rpx;
|
||||
background: rgba(18,184,134,0.1);
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #12B886;
|
||||
font-family: "Medium" !important;
|
||||
}
|
||||
.limitBox_down{
|
||||
// width: 116rpx;
|
||||
height: 40rpx;
|
||||
padding: 0 14rpx;
|
||||
background: rgba(226,112,70,0.1);
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 40rpx;
|
||||
color: #E27046;
|
||||
font-family: "Medium" !important;
|
||||
}
|
||||
.heng{
|
||||
width: 100rpx;
|
||||
height: 2rpx;
|
||||
margin: 0 auto;
|
||||
background: #1881D2;
|
||||
}
|
||||
.swiper {
|
||||
/* #ifndef H5 */
|
||||
// 除了 H5 平台,其它平台均存在的代码
|
||||
height: calc(100vh - 676rpx - var(--status-bar-height));
|
||||
// height: calc(100vh - 882rpx - var(--status-bar-height));
|
||||
/* #endif */
|
||||
|
||||
/* #ifdef H5 */
|
||||
// 只会出现在h5上
|
||||
height: calc(100vh - 676rpx - 104rpx);
|
||||
// height: calc(100vh - 882rpx - 104rpx);
|
||||
/* #endif */
|
||||
}
|
||||
.swiper_no {
|
||||
/* #ifndef H5 */
|
||||
// 除了 H5 平台,其它平台均存在的代码
|
||||
height: calc(100vh - 862rpx - var(--status-bar-height));
|
||||
// height: calc(100vh - 882rpx - var(--status-bar-height));
|
||||
/* #endif */
|
||||
|
||||
/* #ifdef H5 */
|
||||
// 只会出现在h5上
|
||||
height: calc(100vh - 862rpx - 104rpx);
|
||||
// height: calc(100vh - 882rpx - 104rpx);
|
||||
/* #endif */
|
||||
}
|
||||
.loginBtn{
|
||||
width: 337rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
box-shadow: 0rpx 6rpx 10rpx rgba(16, 194, 168, 0.18);
|
||||
border-radius: 4rpx;
|
||||
font-size: 30rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.qcbtn3 {
|
||||
width: 320rpx;
|
||||
height: 86rpx;
|
||||
background: #1881D2;
|
||||
border-radius: 4rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.xuanzhebox{
|
||||
width: 164rpx;
|
||||
height: 60rpx;
|
||||
background: #202833;
|
||||
border: 1rpx solid #0B1622;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28rpx;
|
||||
color: #F2F5FF;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="i18n.appeal.title"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-w-30 padding-t-32 padding-b-40">
|
||||
<textarea class="textbox" v-model="content" :placeholder="i18n.appeal.tos1"
|
||||
maxlength="-1" :style="'background-color: '+theme.fu_bg+';color: '+theme.text"/>
|
||||
<view class="grid col-3">
|
||||
<view v-for="(item,index) in images" class="text-center margin-top">
|
||||
<view style="width: 220rpx;height: 220rpx;position: relative;">
|
||||
<image :src="item" style="width: 220rpx;height: 220rpx;border-radius: 10rpx;"></image>
|
||||
<view @click="del(index)" class="flex align-center justify-center bg-red round"
|
||||
style="position: absolute;right: 5rpx;top: 5rpx;width: 30rpx;height: 30rpx;">
|
||||
<view class="cuIcon-close"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="images.length<6" class="text-center margin-top">
|
||||
<view @click="choose" class="flex align-center justify-center"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.fu_text"
|
||||
style="width: 220rpx;height: 220rpx;border-radius: 10rpx;">
|
||||
<view class="font-70 cuIcon-camera"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view @click="getaa"
|
||||
class="width-600 height-96 radiu-10 bj-0165EE line-height-96 text-center margin-0-auto margin-t-200">
|
||||
<text class="font-32 color-white">{{i18n.appeal.text1}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
content: '',
|
||||
images: [],
|
||||
upimages: [],
|
||||
flag: true,
|
||||
id: '',
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.id = e.id
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 申诉
|
||||
getaa() {
|
||||
if (this.content == '') return this.tos(this.i18n.appeal.tos1)
|
||||
if (this.upimages.length == 0) return this.tos(this.i18n.appeal.tos2)
|
||||
if (!this.flag) {
|
||||
return
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
mask: true
|
||||
})
|
||||
this.flag = false
|
||||
let obj = {
|
||||
id: this.id,
|
||||
content: this.content,
|
||||
annex_image: this.upimages.join(',')
|
||||
}
|
||||
this.post('/marketotc/shenshu', obj).then(res => {
|
||||
console.log('申诉返回', res)
|
||||
uni.hideLoading()
|
||||
this.flag = true
|
||||
if (res.code == 1) {
|
||||
this.content = ''
|
||||
this.images = ''
|
||||
this.upimages = ''
|
||||
this.tos(res.msg)
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/orderDetails?id=' + this.id
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
del(e) {
|
||||
this.images.splice(e, 1)
|
||||
this.upimages.splice(e, 1)
|
||||
console.log(this.images, this.upimages)
|
||||
},
|
||||
choose() {
|
||||
var self = this
|
||||
uni.chooseImage({
|
||||
count: 6 - self.images.length,
|
||||
success: (chooseImageRes) => {
|
||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
||||
tempFilePaths.forEach((item, index) => {
|
||||
console.log(item)
|
||||
uni.uploadFile({
|
||||
url: this.upload + '/publics/image_upload',
|
||||
filePath: item,
|
||||
name: 'file',
|
||||
success: (res) => {
|
||||
let data = JSON.parse(res.data)
|
||||
uni.hideLoading()
|
||||
if (data.code == 1) {
|
||||
console.log(data, index)
|
||||
self.images = self.images.concat(data.data
|
||||
.iamge_url)
|
||||
self.upimages = self.upimages.concat(data.data.url)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.textbox {
|
||||
width: 686rpx;
|
||||
height: 367rpx;
|
||||
// background: #F6F8FB;
|
||||
border-radius: 20rpx;
|
||||
padding: 24rpx;
|
||||
font-size: 28rpx;
|
||||
// color: #8B99A2;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,833 @@
|
||||
<template>
|
||||
<view>
|
||||
<view @click="checkclose()" v-if="isnum||ispay" class="mask1"></view>
|
||||
<view @click="checkclose()" v-if="isnum||ispay" class="mask2"></view>
|
||||
|
||||
<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>
|
||||
<!-- 头部 -->
|
||||
<view slot="top" class="width-750 relative flex align-center justify-center"
|
||||
:style="{height: `calc(${statusBar}px + 358rpx)`}">
|
||||
<view class="width-750 fixed1"
|
||||
:style="{paddingTop: statusBar + 'px', height: `calc(${statusBar}px + 358rpx)`}">
|
||||
<!-- 标题 -->
|
||||
<view class="width-750 height-110 padding-w-30 flex align-center justify-center">
|
||||
<view @click.stop="_goback" class="cuIcon-back font-40 color-white"
|
||||
style="position: absolute;left: 30rpx;"></view>
|
||||
<text class="font-36 color-white weight-bold">{{i18n.c2c.title}}</text>
|
||||
<view class="flex align-center" style="position: absolute;right: 30rpx;">
|
||||
<view @click.stop="show=true" class="switchbox">
|
||||
<text class="nummedium-font">{{faby}}</text>
|
||||
<image class="width-34 height-34 margin-l-5" src="/static/imgs/index/change@2x.png" mode="">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 选择买或卖 -->
|
||||
<view class="height-110 flex align-center padding-w-30">
|
||||
<view class="flex-1 flex align-center">
|
||||
<view @click.stop="changeisbuy(2)" class="flex-1" :class="isbuy==2?'onfont':'offfont'">
|
||||
{{i18n.c2c.text1}}
|
||||
</view>
|
||||
<view @click.stop="changeisbuy(1)" class="flex-1" :class="isbuy==1?'onfont':'offfont'">
|
||||
{{i18n.c2c.text2}}
|
||||
</view>
|
||||
<view @click.stop="router.push('/pages/index/releaseTrade')" class="flex-1 offfont">
|
||||
{{i18n.c2c.text3}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex align-center justify-end">
|
||||
<image @click.stop="router.push('/pages/index/orderRecord')" class="width-54 height-54"
|
||||
src="/static/imgs/index/jilu@2x.png" mode=""></image>
|
||||
<!-- <image @click.stop="typeshow=true" class="width-54 height-54"
|
||||
src="/static/imgs/index/shoukuan@2x.png" mode=""></image> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- 选择币种 -->
|
||||
<view class="height-72 bj-0165EE">
|
||||
<view class="height-72 flex align-center padding-w-30"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text"
|
||||
style="border-radius: 20rpx 20rpx 0 0;">
|
||||
<view class="width-100b height-100b">
|
||||
<scroll-view scroll-x="true">
|
||||
<view class="flex align-center">
|
||||
<view @click.stop="setiscurr(item.id)" v-for="(item,index) in currlist"
|
||||
class="height-72 padding-w-30 flex direction-column align-center justify-center relative">
|
||||
<text :class="currid==item.id?'select':'noselect'">{{item.name}}</text>
|
||||
<view v-if="currid==item.id" class="width-48 height-4 bj-0165EE"
|
||||
style="position: absolute;bottom: 0;"></view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 筛选支付方式和金额 -->
|
||||
<view class="height-70 flex align-center" :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<!-- 支付方式 -->
|
||||
<view @click.stop="changeispay" class="width-240 height-70 relative" >
|
||||
<view class="width-240 height-70 flex align-center justify-center">
|
||||
<text class="font-26 margin-r-10">{{payname}}</text>
|
||||
<u-icon v-if="!ispay" name="arrow-down-fill" size="20"></u-icon>
|
||||
<u-icon v-else name="arrow-up-fill" size="20"></u-icon>
|
||||
</view>
|
||||
<view @click.stop="" :class="ispay?'onbox':'offbox'" :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="padding-w-30 padding-c-20 flex flex-wrap">
|
||||
<view @click.stop="setpay(item)" v-for="(item,index) in paylist"
|
||||
:class="payid==item.id?'selectpay':'noselectpay'">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 交易金额 -->
|
||||
<view @click.stop="changeisnum" class="width-240 height-70 relative">
|
||||
<view class="width-240 height-70 flex align-center justify-center">
|
||||
<text class="font-26 margin-r-10">{{paypriceval}}</text>
|
||||
<u-icon v-if="!isnum" name="arrow-down-fill"size="20"></u-icon>
|
||||
<u-icon v-else name="arrow-up-fill" size="20"></u-icon>
|
||||
</view>
|
||||
<view @click.stop="" :class="isnum?'onbox1':'offbox1'" :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="height-100 flex align-center padding-w-30">
|
||||
<input class="inputbox" type="number" v-model="payprice" :placeholder="i18n.c2c.tos4"
|
||||
placeholder-class="color-D1D3D8" />
|
||||
</view>
|
||||
<view class="height-100 padding-t-24 flex">
|
||||
<view @click="resetpayprice"
|
||||
class="flex-1 height-78 line-height-78 text-center bj-c3c3c3-02">
|
||||
<text class="font-26 color-C3C3C3">{{i18n.c2c.text4}}</text>
|
||||
</view>
|
||||
<view @click="setpayprice"
|
||||
class="flex-1 height-78 line-height-78 text-center bj-0165EE">
|
||||
<text class="font-26 color-white">{{i18n.c2c.text5}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-b-40" :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="padding-t-18 padding-w-30">
|
||||
<!-- 单一列表 -->
|
||||
<view v-for="(item,index) in list" class="height-238 border-bottom">
|
||||
<view class="flex align-center justify-between padding-t-22">
|
||||
<view class="flex align-center">
|
||||
<image class="width-48 height-48 radiu-24" :src="item.avatar" mode=""></image>
|
||||
<text class="font-26 weight-bold margin-l-16">{{item.nickname}}</text>
|
||||
</view>
|
||||
<text class="font-24 color-C3C3C3">{{i18n.c2c.text6}}{{item.succ_num}}</text>
|
||||
</view>
|
||||
<view class="margin-c-10 flex align-center justify-between font-24 color-C3C3C3">
|
||||
<view class="flex align-center">
|
||||
<text>{{i18n.c2c.text7}}:</text>
|
||||
<text class="nummedium-font">{{item.residue_num}}</text>
|
||||
</view>
|
||||
<text>{{i18n.c2c.text8}}</text>
|
||||
</view>
|
||||
<view class="margin-c-10 flex align-center justify-between font-24 color-C3C3C3">
|
||||
<view class="flex align-center">
|
||||
<text>{{i18n.c2c.text9}}:</text>
|
||||
<text class="nummedium-font">{{item.symbol}}{{item.min_price}}-{{item.max_price}}</text>
|
||||
</view>
|
||||
<text class="font-30 color-0165EE numbold-font">{{item.symbol}}{{item.price}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between margin-t-10">
|
||||
<image class="width-46 height-42" src="/static/imgs/index/yinhangka.png" mode=""></image>
|
||||
<view @click.stop="openbuyshow(item)" :class="isbuy==2?'bj-0165EE':'bj-2E558A'"
|
||||
class="width-140 height-52 radiu-10 line-height-52 text-center">
|
||||
<text class="font-26 color-white">{{isbuy==2?i18n.c2c.text10:i18n.c2c.text11}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
|
||||
<!-- 买卖弹窗 -->
|
||||
<u-popup v-model="buyshow" mode="bottom" border-radius="20">
|
||||
<view class="padding-w-30 padding-b-36"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="height-101 flex align-center justify-center">
|
||||
<text class="font-30 weight-bold">{{isbuy==2?i18n.c2c.text10:i18n.c2c.text11}}{{buyitem.curr_name}}</text>
|
||||
<view @click.stop="buyshow=false" style="position: absolute;right: 30rpx;"
|
||||
class="font-26 color-C3C3C3">
|
||||
{{i18n.c2c.text12}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 单价 -->
|
||||
<view class="height-66 flex align-center">
|
||||
<text class="font-30 margin-r-30">{{i18n.c2c.text8}}</text>
|
||||
<text class="font-30 color-0165EE nummedium-font">{{buyitem.symbol}}{{buyitem.price}}</text>
|
||||
</view>
|
||||
<!-- 购买方式 -->
|
||||
<view class="height-66 margin-t-28 flex align-center">
|
||||
<text @click.stop="changetype(1)" :class="type==1?'font-30':'font-26 color-C3C3C3'"
|
||||
class="margin-r-90">{{i18n.c2c.text13}}{{isbuy==2?i18n.c2c.text10:i18n.c2c.text11}}</text>
|
||||
<text @click.stop="changetype(2)"
|
||||
:class="type==2?'font-30':'font-26 color-C3C3C3'">{{i18n.c2c.text14}}{{isbuy==2?i18n.c2c.text10:i18n.c2c.text11}}</text>
|
||||
</view>
|
||||
<!-- 金额数量输入框 -->
|
||||
<view class="margin-t-14">
|
||||
<view class="numbox">
|
||||
<input class="font-26 flex-1 padding-r-30 color-D1D3D8" type="number" v-model="number"
|
||||
:placeholder="i18n.c2c.tos4" placeholder-class="color-D1D3D8" />
|
||||
<view class="flex align-center font-26">
|
||||
<text v-if="type==1" class="nummedium-font">{{buyitem.symbol}}</text>
|
||||
<text v-if="type==2" class="nummedium-font">{{buyitem.curr_name}}</text>
|
||||
<text class="margin-w-5">丨</text>
|
||||
<text @click="all(buyitem)" class="font-30 color-0165EE">{{i18n.c2c.text15}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 限额 -->
|
||||
<view class="font-26 color-C3C3C3 margin-t-8">
|
||||
{{i18n.c2c.text9}}{{buyitem.symbol}}{{buyitem.min_price}}-{{buyitem.max_price}}
|
||||
</view>
|
||||
<!-- 交易数量 -->
|
||||
<view class="height-66 flex align-center justify-between margin-t-22">
|
||||
<text class="font-30 margin-r-30">{{i18n.c2c.text16}}</text>
|
||||
<text v-if="type==1" class="font-30 color-0165EE nummedium-font">
|
||||
{{(number/buyitem.price).toFixed(4)}} {{buyitem.curr_name}}
|
||||
</text>
|
||||
<text v-if="type==2" class="font-30 color-0165EE nummedium-font">
|
||||
{{number==''?'0':number}} {{buyitem.curr_name}}
|
||||
</text>
|
||||
</view>
|
||||
<!-- 实付款 -->
|
||||
<view class="height-66 flex align-center justify-between margin-t-22">
|
||||
<text class="font-30 margin-r-30">{{isbuy==2?i18n.c2c.text17:i18n.c2c.text18}}</text>
|
||||
<text v-if="type==1" class="font-48 color-FF4040 nummedium-font">
|
||||
{{buyitem.symbol}} {{number==''?'0.00':number}}
|
||||
</text>
|
||||
<text v-if="type==2" class="font-48 color-FF4040 nummedium-font">
|
||||
{{buyitem.symbol}} {{(number*buyitem.price).toFixed(2)}}
|
||||
</text>
|
||||
</view>
|
||||
<!-- 收款账户 -->
|
||||
<view @click="show2=true" v-if="isbuy==1"
|
||||
class="height-66 flex align-center justify-between margin-t-22">
|
||||
<text class="font-30 margin-r-30">{{i18n.c2c.text19}}</text>
|
||||
<view class="flex align-center font-30">
|
||||
<text v-if="collecid!=''">{{collecdata.card_num|changestyle}}</text>
|
||||
<u-icon name="arrow-right" color="#8B99A2" size="24"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 交易密码 -->
|
||||
<view class="margin-t-22">
|
||||
<text class="font-30 margin-r-30">{{i18n.c2c.text20}}</text>
|
||||
<view class="numbox margin-t-25">
|
||||
<input class="font-26 flex-1 color-D1D3D8" type="number" v-model="paypwd"
|
||||
:placeholder="i18n.c2c.tos3" placeholder-class="color-D1D3D8" password />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 按钮 -->
|
||||
<view class="margin-t-61 flex align-center justify-between">
|
||||
<view @click.stop="buyshow=false"
|
||||
class="width-305 height-96 radiu-10 bj-D1D3D8 line-height-96 text-center">
|
||||
<text class="font-30 color-white">{{i18n.c2c.text12}}</text>
|
||||
</view>
|
||||
<view @click.stop="closebuyshow"
|
||||
class="width-305 height-96 radiu-10 bj-0165EE line-height-96 text-center">
|
||||
<text
|
||||
class="font-30 color-white">{{i18n.c2c.text5}}{{isbuy==2?i18n.c2c.text10:i18n.c2c.text11}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 法币弹窗 -->
|
||||
<u-popup v-model="show" mode="bottom" border-radius="20">
|
||||
<view class="padding-w-30 padding-b-36"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="height-96 line-height-96 text-center relative">
|
||||
<text class="font-30 weight-bold">{{i18n.c2c.text21}}</text>
|
||||
<text @click.stop="show=false" class="font-26 color-C3C3C3 absolute"
|
||||
style="right: 0;">{{i18n.c2c.text12}}</text>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="height-450">
|
||||
<view @click="setFaby(item)" v-for="(item,index) in fabylist"
|
||||
class="height-96 flex align-center justify-between">
|
||||
<view class="flex align-center">
|
||||
<image class="width-48 height-48 radiu-24" :src="item.pay_image" mode=""></image>
|
||||
<text class="font-28 margin-l-16">{{item.curr_name}}</text>
|
||||
</view>
|
||||
<image class="width-36 height-36" :src="fabyid==item.id?XZ:WX" mode=""></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 收款账户弹窗 -->
|
||||
<u-popup v-model="show2" mode="bottom" border-radius="20">
|
||||
<view class="padding-w-30 padding-b-36"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="height-96 line-height-96 text-center relative">
|
||||
<text class="font-30 weight-bold">{{i18n.c2c.text19}}</text>
|
||||
<text @click.stop="show2=false" class="font-26 color-C3C3C3 absolute"
|
||||
style="right: 0;">{{i18n.c2c.text12}}</text>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="height-450">
|
||||
<view @click="setcollec(item)" v-for="(item,index) in collec"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text"
|
||||
class="height-96 flex align-center justify-between margin-b-10 radiu-10 padding-w-20">
|
||||
<view class="flex-1 padding-r-24 height-96 flex direction-column justify-around">
|
||||
<view class="flex align-center">
|
||||
<text>{{item.username}}</text>
|
||||
<text class="font-28 margin-l-16">{{item.card_num|changestyle}}</text>
|
||||
</view>
|
||||
<view class="font-24 color-C3C3C3">{{item.bank_name}}</view>
|
||||
</view>
|
||||
<image class="width-36 height-36" :src="collecid==item.id?XZ:WX" mode=""></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 去实名 -->
|
||||
<u-popup style="z-index: 5000;" border-radius="18" mode="center" v-model="TSShow">
|
||||
<view class="width-600 padding-b-20"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="width-100b height-220 padding-w-30 padding-c-40 flex direction-column align-center justify-between">
|
||||
<image class="width-64 height-64" src="/static/imgs/quantify/tongzhi@2x.png" mode=""></image>
|
||||
<view class="font-26 weight-bold text-center padding-w-20">{{i18n.c2c.text22}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-100b height-90 flex align-center justify-center">
|
||||
<view @click="TSShow=false,router.push('/pages/my/safety/real')" class="qcbtn3">{{i18n.c2c.text23}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
isbuy: 2, //2买,1卖
|
||||
list: [],
|
||||
page: 1,
|
||||
state: 'more',
|
||||
show: false, //法币弹窗
|
||||
show1: false, //支付方式弹窗
|
||||
buyshow: false, //购买弹窗
|
||||
typeshow: false, //收款方式弹窗
|
||||
type: 1, //1按金额购买,2按数量购买
|
||||
currid: '', //当前币种id
|
||||
currlist: [], //币种列表
|
||||
faby: '', //法币
|
||||
fabyid: '', //法币id
|
||||
fabylist: [], //法币列表
|
||||
WX: '/static/imgs/quantify/weixuanzhong@2x.png',
|
||||
XZ: '/static/imgs/quantify/xuanzhong@2x.png',
|
||||
ispay: false, //支付方式弹窗
|
||||
payid: 0, //选择的支付方式
|
||||
payname: '支付方式',
|
||||
paylist: [{
|
||||
id: 0,
|
||||
name: '全部'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '银行卡'
|
||||
}
|
||||
],
|
||||
isnum: false, //交易金额弹窗
|
||||
payprice: '', //交易金额
|
||||
paypriceval: '交易金额', //交易金额文显
|
||||
|
||||
number: '',
|
||||
paypwd: '',
|
||||
buyitem: '', //购买对象
|
||||
flag: true,
|
||||
|
||||
show2: false,
|
||||
collec: [], //收款账户列表
|
||||
collecid: '', //当前收款账户id
|
||||
collecdata: '', //当前收款账户对象
|
||||
TSShow: false,
|
||||
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.payname = this.i18n.c2c.text26
|
||||
this.paypriceval = this.i18n.c2c.text24
|
||||
this.paylist[0].name = this.i18n.c2c.text15
|
||||
this.paylist[1].name = this.i18n.c2c.text25
|
||||
},
|
||||
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.getFabylist()
|
||||
this.getCurrlist()
|
||||
this.getcollection()
|
||||
},
|
||||
filters: {
|
||||
changestyle(e) {
|
||||
let str = e
|
||||
var reg = /^(\d{4})\d+(\d{4})$/;
|
||||
str = str.replace(reg, "$1 **** $2");
|
||||
return str
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 选择账户
|
||||
setcollec(item) {
|
||||
if (this.collecid != item.id) {
|
||||
this.collecid = item.id
|
||||
this.collecdata = item
|
||||
this.show2 = false
|
||||
}
|
||||
},
|
||||
// 获取收款账户列表
|
||||
getcollection() {
|
||||
this.post('/marketotc/get_collection').then(res => {
|
||||
console.log('收款账户列表', res)
|
||||
if (res.code == 1 && res.data && res.data.length > 0) {
|
||||
this.collec = res.data
|
||||
this.collecid = res.data[0].id
|
||||
this.collecdata = res.data[0]
|
||||
} else {
|
||||
// 如果没有收款账户或数据为空,设置默认值或提示用户添加收款账户
|
||||
this.collec = []
|
||||
this.collecid = ''
|
||||
this.collecdata = ''
|
||||
}
|
||||
})
|
||||
},
|
||||
// 挂单出售
|
||||
getsell() {
|
||||
if (this.number == '' && this.type == 1) return this.tos(this.i18n.c2c.tos1)
|
||||
if (this.number == '' && this.type == 2) return this.tos(this.i18n.c2c.tos2)
|
||||
if (this.paypwd == '') return this.tos(this.i18n.c2c.tos3)
|
||||
if (!this.flag) {
|
||||
return
|
||||
} else {
|
||||
this.flag = false
|
||||
let obj = {
|
||||
id: this.buyitem.id,
|
||||
num: this.number,
|
||||
pay_pwd: this.paypwd,
|
||||
buy_type: this.type,
|
||||
collection_id: this.collecid
|
||||
}
|
||||
this.post('/marketotc/order_sell', obj).then(res => {
|
||||
console.log('下单返回', res)
|
||||
this.flag = true
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.buyshow = false
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/orderRecord'
|
||||
})
|
||||
}, 500)
|
||||
} else {
|
||||
if (res.data.jump == 1) {
|
||||
uni.hideToast()
|
||||
this.buyshow = false
|
||||
this.TSShow = true
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 挂单买入
|
||||
getbuy() {
|
||||
if (this.number == '' && this.type == 1) return this.tos(this.i18n.c2c.tos1)
|
||||
if (this.number == '' && this.type == 2) return this.tos(this.i18n.c2c.tos2)
|
||||
if (this.paypwd == '') return this.tos(this.i18n.c2c.tos3)
|
||||
if (!this.flag) {
|
||||
return
|
||||
} else {
|
||||
this.flag = false
|
||||
let obj = {
|
||||
id: this.buyitem.id,
|
||||
num: this.number,
|
||||
pay_pwd: this.paypwd,
|
||||
buy_type: this.type
|
||||
}
|
||||
this.post('/marketotc/order_buy', obj).then(res => {
|
||||
console.log('下单返回', res)
|
||||
this.flag = true
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.buyshow = false
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/orderRecord'
|
||||
})
|
||||
}, 500)
|
||||
} else {
|
||||
if (res.data.jump == 1) {
|
||||
uni.hideToast()
|
||||
this.buyshow = false
|
||||
this.TSShow = true
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 关闭买卖弹窗
|
||||
closebuyshow() {
|
||||
var that = this
|
||||
uni.showLoading({
|
||||
title: that.i18n.c2c.tos5,
|
||||
mask: true
|
||||
})
|
||||
if (this.isbuy == 2) {
|
||||
this.getbuy()
|
||||
} else {
|
||||
this.getsell()
|
||||
}
|
||||
},
|
||||
// 全部
|
||||
all(item) {
|
||||
if (this.type == 1) {
|
||||
this.number = item.money_fb
|
||||
} else {
|
||||
this.number = item.money_num
|
||||
}
|
||||
},
|
||||
// 打开购买或出售弹窗
|
||||
openbuyshow(item) {
|
||||
console.log(item)
|
||||
if (item.is_me) {
|
||||
this.tos(this.i18n.c2c.tos6)
|
||||
} else {
|
||||
this.buyitem = item
|
||||
this.number = ''
|
||||
this.paypwd = ''
|
||||
this.type = 1
|
||||
this.buyshow = true
|
||||
}
|
||||
},
|
||||
// 获取挂单列表
|
||||
queryList(pageNo, pageSize) {
|
||||
let obj = {
|
||||
page:this.pageNo,
|
||||
page_num: pageSize,
|
||||
type: this.isbuy,
|
||||
country_id: this.fabyid,
|
||||
curr_id: this.currid,
|
||||
payment: this.payid,
|
||||
price: this.payprice
|
||||
}
|
||||
setTimeout(()=>{
|
||||
this.post('/marketotc/market_list', obj).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
},500)
|
||||
},
|
||||
// 重置交易金额
|
||||
resetpayprice() {
|
||||
this.paypriceval = this.i18n.c2c.text24
|
||||
this.payprice = ''
|
||||
this.isnum = !this.isnum
|
||||
this.queryList(1,10)
|
||||
},
|
||||
// 设置交易金额
|
||||
setpayprice() {
|
||||
if (this.payprice != '' && this.payprice != 0) {
|
||||
this.paypriceval = this.payprice
|
||||
this.isnum = !this.isnum
|
||||
this.queryList(1,10)
|
||||
}
|
||||
},
|
||||
// 改变交易金额弹窗
|
||||
changeisnum() {
|
||||
if (this.ispay) {
|
||||
this.ispay = !this.ispay
|
||||
} else {
|
||||
this.isnum = !this.isnum
|
||||
}
|
||||
},
|
||||
// 改变支付方式弹窗
|
||||
changeispay() {
|
||||
if (this.isnum) {
|
||||
this.isnum = !this.isnum
|
||||
} else {
|
||||
this.ispay = !this.ispay
|
||||
}
|
||||
},
|
||||
// 检查支付方式和交易金额弹窗
|
||||
checkclose() {
|
||||
if (this.ispay) {
|
||||
this.ispay = false
|
||||
}
|
||||
if (this.isnum) {
|
||||
this.isnum = false
|
||||
}
|
||||
},
|
||||
// 选择支付方式
|
||||
setpay(item) {
|
||||
if (this.payid != item.id) {
|
||||
this.ispay = false
|
||||
this.payid = item.id
|
||||
this.queryList(1,10)
|
||||
if (item.name == this.i18n.c2c.text15) {
|
||||
this.payname = this.i18n.c2c.text26
|
||||
} else {
|
||||
this.payname = item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取交易币种
|
||||
getCurrlist() {
|
||||
this.post('/marketotc/get_curr').then(res => {
|
||||
console.log('币种列表', res)
|
||||
if (res.code == 1) {
|
||||
this.currlist = res.data
|
||||
this.currid = res.data[0].id
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择法币
|
||||
setFaby(item) {
|
||||
this.faby = item.curr_name
|
||||
this.fabyid = item.id
|
||||
this.show = false
|
||||
this.queryList(1,10)
|
||||
},
|
||||
// 获取法币列表
|
||||
getFabylist() {
|
||||
this.post('/marketotc/get_country').then(res => {
|
||||
console.log('法币列表', res)
|
||||
if (res.code == 1) {
|
||||
this.fabylist = res.data
|
||||
this.faby = res.data[0].curr_name
|
||||
this.fabyid = res.data[0].id
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择币种
|
||||
setiscurr(i) {
|
||||
if (this.currid != i) {
|
||||
this.currid = i
|
||||
this.queryList(1,10)
|
||||
}
|
||||
},
|
||||
// 选择金额或数量购买
|
||||
changetype(i) {
|
||||
if (this.type != i) {
|
||||
this.type = i
|
||||
this.number = ''
|
||||
}
|
||||
},
|
||||
// 选择买或卖
|
||||
changeisbuy(i) {
|
||||
if (this.isbuy != i) {
|
||||
this.isbuy = i
|
||||
this.queryList(1,10)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.transition1 {
|
||||
overflow: hidden;
|
||||
transition: 1s;
|
||||
}
|
||||
|
||||
.fixed1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
background: #06C38D;
|
||||
}
|
||||
|
||||
.fabubox {
|
||||
width: 180rpx;
|
||||
height: 56rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 28rpx 0rpx 0rpx 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28rpx;
|
||||
color: #0165EE;
|
||||
}
|
||||
|
||||
.onfont {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.offfont {
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.select {
|
||||
font-size: 28rpx;
|
||||
font-family: "Bold" !important;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: #06C38D;
|
||||
}
|
||||
|
||||
.noselect {
|
||||
font-size: 26rpx;
|
||||
font-family: "Medium" !important;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: #8B99A2;
|
||||
}
|
||||
|
||||
.border-bottom {
|
||||
border-bottom: 1rpx solid rgba(191, 195, 199, 0.2);
|
||||
}
|
||||
|
||||
.bj-c3c3c3-02 {
|
||||
background-color: rgba(195, 195, 195, 0.2);
|
||||
}
|
||||
|
||||
.numbox {
|
||||
width: 690rpx;
|
||||
height: 96rpx;
|
||||
// background: #FFFFFF;
|
||||
border: 1rpx solid #D1D3D8;
|
||||
opacity: 1;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.searchbox {
|
||||
width: 610rpx;
|
||||
height: 60rpx;
|
||||
background: #F6F8FC;
|
||||
border: 1rpx solid rgba(191, 195, 199, 0.2);
|
||||
opacity: 1;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
|
||||
.offbox {
|
||||
width: 750rpx;
|
||||
height: 0rpx;
|
||||
overflow: hidden;
|
||||
// background-color: #FFFFFF;
|
||||
transition: height 0.3s;
|
||||
box-shadow: 0rpx 4rpx 10rpx #EBF0F6;
|
||||
}
|
||||
|
||||
.onbox {
|
||||
width: 750rpx;
|
||||
height: 200rpx;
|
||||
// background-color: #FFFFFF;
|
||||
transition: height 0.3s;
|
||||
box-shadow: 0rpx 4rpx 10rpx #EBF0F6;
|
||||
}
|
||||
|
||||
.offbox1 {
|
||||
width: 750rpx;
|
||||
height: 0rpx;
|
||||
overflow: hidden;
|
||||
// background-color: #FFFFFF;
|
||||
transition: height 0.3s;
|
||||
position: absolute;
|
||||
left: -240rpx;
|
||||
}
|
||||
|
||||
.onbox1 {
|
||||
width: 750rpx;
|
||||
height: 200rpx;
|
||||
// background-color: #FFFFFF;
|
||||
transition: height 0.3s;
|
||||
position: absolute;
|
||||
left: -240rpx;
|
||||
}
|
||||
|
||||
.selectpay {
|
||||
width: 220rpx;
|
||||
height: 46rpx;
|
||||
border-radius: 23rpx;
|
||||
border: 1rpx solid #06C38D;
|
||||
line-height: 46rpx;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
color: #06C38D;
|
||||
margin: 0 20rpx 10rpx 0;
|
||||
}
|
||||
|
||||
.noselectpay {
|
||||
width: 220rpx;
|
||||
height: 46rpx;
|
||||
border-radius: 23rpx;
|
||||
border: 1rpx solid #D1D3D8;
|
||||
line-height: 46rpx;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
color: #D1D3D8;
|
||||
margin: 0 20rpx 10rpx 0;
|
||||
}
|
||||
|
||||
.inputbox {
|
||||
width: 100%;
|
||||
height: 68rpx;
|
||||
border-radius: 10rpx;
|
||||
// background: #F6F8FC;
|
||||
border: 1rpx solid rgba(195, 195, 195, 0.3);
|
||||
font-size: 28rpx;
|
||||
// color: #17181A;
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
|
||||
.mask1 {
|
||||
width: 100vh;
|
||||
height: calc(var(--status-bar-height) + 292rpx);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 10000;
|
||||
// background: #007F0E;
|
||||
}
|
||||
|
||||
.mask2 {
|
||||
width: 100vh;
|
||||
height: calc(100vh - var(--status-bar-height) - 558rpx);
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
z-index: 10000;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.qcbtn3 {
|
||||
width: 320rpx;
|
||||
height: 86rpx;
|
||||
background: #0165EE;
|
||||
border-radius: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,274 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<!-- 头部 -->
|
||||
<view class="width-750 relative flex align-center justify-center"
|
||||
:style="{height: `calc(${statusBar}px + 220rpx)`}">
|
||||
<view class="width-750 fixed1 bj-0165EE"
|
||||
:style="{paddingTop: statusBar + 'px', height: `calc(${statusBar}px + 220rpx)`}">
|
||||
<view class="width-750 height-110 padding-w-30 flex align-center justify-center">
|
||||
<view @click="_goback" class="cuIcon-back font-40 color-white"
|
||||
style="position: absolute;left: 30rpx;"></view>
|
||||
<text class="font-36 color-white weight-bold">{{i18n.fastBuy.title1}}</text>
|
||||
<view class="flex align-center" style="position: absolute;right: 30rpx;">
|
||||
<view @click="show=true" class="switchbox">
|
||||
<text class="nummedium-font">{{faby.curr_name}}</text>
|
||||
<image class="width-34 height-34 margin-l-13" src="/static/imgs/index/change@2x.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-110 flex align-center padding-w-30">
|
||||
<view class="flex-10 flex align-center">
|
||||
<view @click="changeType(1)" class="flex-1" :class="currtype==1?'onfont':'offfont'">{{i18n.fastBuy.text1}}</view>
|
||||
<view @click="changeType(2)" class="flex-1" :class="currtype==2?'onfont':'offfont'">{{i18n.fastBuy.text2}}</view>
|
||||
</view>
|
||||
<view class="flex-2 flex align-center justify-end">
|
||||
<image @click="router.push('/pages/index/fastDetails')" class="width-54 height-54" src="/static/imgs/index/jilu@2x.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-b-40" :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<!-- 价格 -->
|
||||
<view class="height-148 bj-0061E8">
|
||||
<view class="pricebox" :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<text class="font-30">{{i18n.fastBuy.text3}}</text>
|
||||
<text class="font-36 numbold-font">1 USDT ≈ {{faby.usdt_price}} {{faby.curr_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 按金额 -->
|
||||
<view v-if="currtype==1">
|
||||
<!-- 金额 -->
|
||||
<view class="height-192 margin-t-45 padding-w-30">
|
||||
<view class="height-96 flex align-center font-32">{{i18n.fastBuy.text4}}</view>
|
||||
<view class="height-96 flex align-center">
|
||||
<text class="font-28">{{faby.symbol}}</text>
|
||||
<input class="padding-l-20 font-32" :placeholder="i18n.fastBuy.tos1" type="number" v-model="price" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 数量 -->
|
||||
<view class="flex align-center justify-between margin-t-27 padding-w-30">
|
||||
<text class="font-32">{{i18n.fastBuy.text5}}</text>
|
||||
<text class="font-42 color-0165EE numbold-font">{{price==''?'0':(price/faby.usdt_price).toFixed(8)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 按数量 -->
|
||||
<view v-if="currtype==2">
|
||||
<!-- 购买数量 -->
|
||||
<view class="height-192 margin-t-45 padding-w-30">
|
||||
<view class="height-96 flex align-center font-32">{{i18n.fastBuy.text6}}</view>
|
||||
<view class="height-96 flex align-center justify-between">
|
||||
<input class="font-32" :placeholder="i18n.fastBuy.tos2" type="number" v-model="number" />
|
||||
<view class="flex align-center">
|
||||
<text class="font-32 nummedium-font">USDT</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 实付款 -->
|
||||
<view class="flex align-center justify-between margin-t-27 padding-w-30">
|
||||
<text class="font-32">{{i18n.fastBuy.text7}}</text>
|
||||
<text class="font-42 color-0165EE numbold-font">{{faby.symbol}} {{number==''?'0':(number*faby.usdt_price).toFixed(2)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 交易方式 -->
|
||||
<view class="height-96 padding-w-30 flex align-center justify-between">
|
||||
<text class="font-32">{{i18n.fastBuy.text8}}</text>
|
||||
<text class="font-32 color-C3C3C3">{{faby.pay_name}}</text>
|
||||
</view>
|
||||
<view @click="router.push('/pages/my/aboutUs/agreement?title=tuikuan')" class="height-96 padding-w-30 flex align-center">
|
||||
<text class="font-28">{{i18n.recharge.text18}}</text>
|
||||
<i class="cuIcon-question"></i>
|
||||
</view>
|
||||
|
||||
<!-- 按钮 -->
|
||||
<view @click="getbuy" class="buybtn">
|
||||
<image class="width-32 height-32 margin-r-10" src="/static/imgs/index/kjbtn.png" mode=""></image>
|
||||
<text>{{i18n.fastBuy.text9}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 法币弹窗 -->
|
||||
<u-popup v-model="show" mode="bottom" border-radius="20">
|
||||
<view class="padding-w-30 padding-b-36"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="height-96 line-height-96 text-center relative">
|
||||
<text class="font-32 weight-bold">{{i18n.fastBuy.text10}}</text>
|
||||
<text @click.stop="show=false" class="font-26 color-C3C3C3 absolute" style="right: 0;">{{i18n.fastBuy.text11}}</text>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="height-450">
|
||||
<view @click="selectfaby(item)" v-for="(item,index) in fabylist"
|
||||
class="height-96 flex align-center justify-between">
|
||||
<view class="flex align-center">
|
||||
<image class="width-48 height-48 radiu-24" :src="item.pay_image" mode=""></image>
|
||||
<text class="font-30 margin-l-16">{{item.curr_name}}</text>
|
||||
</view>
|
||||
<image class="width-36 height-36" :src="faby.id==item.id?XZ:WX" mode=""></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
currtype: 1,
|
||||
show: false,
|
||||
fabylist: [],
|
||||
faby: '',
|
||||
WX: '/static/imgs/quantify/weixuanzhong@2x.png',
|
||||
XZ: '/static/imgs/quantify/xuanzhong@2x.png',
|
||||
price: '',
|
||||
number: '',
|
||||
flag: true,
|
||||
|
||||
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.getFabylist()
|
||||
},
|
||||
methods: {
|
||||
// 购买
|
||||
getbuy() {
|
||||
if (!this.flag) {
|
||||
return
|
||||
} else {
|
||||
if (this.currtype == 1) {
|
||||
if (this.price == '') return this.tos(this.i18n.fastBuy.tos1)
|
||||
var obj = {
|
||||
id: this.faby.id,
|
||||
type: this.currtype,
|
||||
number: this.price
|
||||
}
|
||||
}
|
||||
if (this.currtype == 2) {
|
||||
if (this.number == '') return this.tos(this.i18n.fastBuy.tos2)
|
||||
var obj = {
|
||||
id: this.faby.id,
|
||||
type: this.currtype,
|
||||
number: this.number
|
||||
}
|
||||
}
|
||||
this.flag = false
|
||||
console.log(obj)
|
||||
this.post('/Marketpay/add_order', obj).then(res => {
|
||||
this.flag = true
|
||||
this.number = ''
|
||||
this.price = ''
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 获取法币列表
|
||||
getFabylist() {
|
||||
this.post('/Marketpay/get_country').then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.fabylist = res.data
|
||||
this.faby = res.data[0]
|
||||
}
|
||||
})
|
||||
},
|
||||
selectfaby(item) {
|
||||
if (this.faby.id != item.id) {
|
||||
this.faby = item
|
||||
this.show = false
|
||||
}
|
||||
},
|
||||
changeType(i) {
|
||||
if (this.currtype != i) {
|
||||
this.currtype = i
|
||||
this.number = ''
|
||||
this.price = ''
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fixed1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
// background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.fabubox {
|
||||
width: 180rpx;
|
||||
height: 56rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 28rpx 0rpx 0rpx 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 30rpx;
|
||||
color: #0165EE;
|
||||
}
|
||||
|
||||
.onfont {
|
||||
font-size: 42rpx;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.offfont {
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.pricebox {
|
||||
width: 750rpx;
|
||||
height: 148rpx;
|
||||
// background: #FFFFFF;
|
||||
opacity: 1;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
padding: 20rpx 30rpx 15rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.buybtn {
|
||||
width: 690rpx;
|
||||
height: 96rpx;
|
||||
background: #0165EE;
|
||||
opacity: 1;
|
||||
border-radius: 10rpx;
|
||||
margin: 220rpx auto 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.searchbox {
|
||||
width: 610rpx;
|
||||
height: 60rpx;
|
||||
background: #F6F8FC;
|
||||
border: 1rpx solid rgba(191, 195, 199, 0.2);
|
||||
opacity: 1;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<view>
|
||||
<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.fastBuy.title2"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-w-30 padding-t-32 padding-b-40">
|
||||
<view v-for="(item,index) in list" class="box" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="padding-w-30 height-74 flex align-center font-24">
|
||||
<text>{{i18n.fastBuy.text12}}:</text>
|
||||
<text class="numbold-font">{{item.createtime}}</text>
|
||||
</view>
|
||||
<view class="height-1 width-100b" style="background: rgba(191,195,199,0.3);"></view>
|
||||
<view class="height-105 flex padding-w-30">
|
||||
<view class="height-105 flex-1 flex direction-column padding-c-16 justify-between">
|
||||
<text class="font-24 color-C3C3C3">{{i18n.fastBuy.text13}}</text>
|
||||
<text class="font-24 numbold-font">{{item.num}}</text>
|
||||
</view>
|
||||
<view class="height-105 flex-1 flex direction-column align-end padding-c-16 justify-between">
|
||||
<text class="font-24 color-C3C3C3">{{i18n.fastBuy.text14}}</text>
|
||||
<text class="font-24 numbold-font">{{item.symbol}}{{item.price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</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) {
|
||||
setTimeout(() => {
|
||||
this.post('/Marketpay/order_list', {
|
||||
page: pageNo,
|
||||
page_num: pageSize
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.box {
|
||||
width: 690rpx;
|
||||
height: 180rpx;
|
||||
// background: #FFFFFF;
|
||||
box-shadow: 0rpx 4rpx 4rpx rgba(205, 206, 219, 0.2);
|
||||
opacity: 1;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,186 @@
|
||||
<template>
|
||||
<view>
|
||||
<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.fastRecord.title"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-w-30 padding-b-40 padding-t-16">
|
||||
<!-- 单一列表 -->
|
||||
<view v-for="(item,index) in list" class="listbox" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="height-74 flex align-center">
|
||||
<view class="flex-1 height-74 flex align-center font-24">
|
||||
<text>{{i18n.fastRecord.text1}}:</text>
|
||||
<text class="numbold-font">{{item.createtime}}</text>
|
||||
</view>
|
||||
<text class="font-28"
|
||||
:class="item.type==1?'color-00C481':'color-FF4040'">{{item.type==1?i18n.fastRecord.text2:i18n.fastRecord.text3}}</text>
|
||||
</view>
|
||||
<view class="height-1 width-100b" style="background: rgba(191,195,199,0.3);"></view>
|
||||
<view class="height-105 flex">
|
||||
<view class="height-105 flex-1 flex direction-column padding-c-16 justify-between">
|
||||
<text class="font-24 color-C3C3C3">{{i18n.fastRecord.text4}}</text>
|
||||
<text class="font-24 numbold-font">{{item.price}}</text>
|
||||
</view>
|
||||
<view class="height-105 flex-1 flex direction-column align-center padding-c-16 justify-between">
|
||||
<text class="font-24 color-C3C3C3">{{i18n.fastRecord.text5}}({{item.curr_name}})</text>
|
||||
<text class="font-24 numbold-font">{{(item.num)}}</text>
|
||||
</view>
|
||||
<view class="height-105 flex-1 flex direction-column align-end padding-c-16 justify-between">
|
||||
<text class="font-24 color-C3C3C3">{{i18n.fastRecord.text6}}({{item.curr_name}})</text>
|
||||
<text class="font-24 numbold-font">{{item.residue_num}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-105 flex">
|
||||
<view class="height-105 flex-1 flex direction-column padding-c-16 justify-between">
|
||||
<text
|
||||
class="font-24 color-C3C3C3">{{item.type==1?i18n.fastRecord.text7:i18n.fastRecord.text8}}</text>
|
||||
<text
|
||||
class="font-24 numbold-font">{{item.payment==1?i18n.fastRecord.text9:''}}</text>
|
||||
</view>
|
||||
<view class="height-105 flex-1 flex direction-column align-center padding-c-16 justify-between">
|
||||
<text class="font-24 color-C3C3C3">{{i18n.fastRecord.text10}}</text>
|
||||
<text class="font-24 color-0165EE">{{statusText[item.status]}}</text>
|
||||
</view>
|
||||
<view v-if="item.status==1"
|
||||
class="height-105 flex-1 flex direction-column align-end padding-c-16 justify-center">
|
||||
<view @click="show=true,id=item.id,paypwd=''"
|
||||
class="width-138 height-56 bj-0165EE radiu-10 line-height-56 text-center">
|
||||
<text class="font-28 color-white">{{i18n.fastRecord.text11}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="flex-1"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</z-paging>
|
||||
|
||||
<!-- 撤销弹窗 -->
|
||||
<u-popup v-model="show" mode="center" border-radius="20">
|
||||
<view class="width-600 height-342" style="overflow: hidden;"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="height-110 flex align-center justify-center">
|
||||
<text class="font-30 color-FF4040 weight-bold">{{i18n.fastRecord.text12}}</text>
|
||||
</view>
|
||||
<input class="input" :style="'background-color: '+theme.fu_bg"
|
||||
type="text" v-model="paypwd" :placeholder="i18n.fastRecord.tos1" password />
|
||||
<view class="height-98 flex margin-t-60">
|
||||
<view @click="show=false" class="flex-1 line-height-96 text-center bj-c3c3c3-02">
|
||||
<text class="font-28 color-C3C3C3 weight-bold">{{i18n.fastRecord.text13}}</text>
|
||||
</view>
|
||||
<view @click="getwithdraw" class="flex-1 line-height-96 text-center bj-0165EE">
|
||||
<text class="font-28 color-white weight-bold">{{i18n.fastRecord.text14}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
list: [],
|
||||
page: 1,
|
||||
state: 'more',
|
||||
flag: true,
|
||||
id: '',
|
||||
paypwd: '',
|
||||
statusText: ['', '', '', '', ''],
|
||||
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.changestatus()
|
||||
},
|
||||
methods: {
|
||||
changestatus() {
|
||||
this.statusText[1] = this.i18n.fastRecord.text15
|
||||
this.statusText[2] = this.i18n.fastRecord.text16
|
||||
this.statusText[3] = this.i18n.fastRecord.text17
|
||||
this.statusText[4] = this.i18n.fastRecord.text18
|
||||
},
|
||||
// 撤销挂单
|
||||
getwithdraw() {
|
||||
if (!this.flag) {
|
||||
return
|
||||
} else {
|
||||
if (this.paypwd == '') return this.tos(this.i18n.fastRecord.tos1)
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
mask: true
|
||||
})
|
||||
this.flag = false
|
||||
let obj = {
|
||||
id: this.id,
|
||||
pay_pwd: this.paypwd
|
||||
}
|
||||
this.post('/marketotc/order_withdraw', obj).then(res => {
|
||||
this.flag = true
|
||||
console.log('撤销返回', res)
|
||||
if (res.code == 1) {
|
||||
this.show = false
|
||||
uni.hideLoading()
|
||||
this.tos(res.msg)
|
||||
this.queryList(1, 20)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
this.post('/marketotc/my_fb_list', {
|
||||
page: pageNo,
|
||||
page_num: pageSize
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.listbox {
|
||||
width: 690rpx;
|
||||
height: 285rpx;
|
||||
// background: #FFFFFF;
|
||||
opacity: 1;
|
||||
border-radius: 10rpx;
|
||||
margin-bottom: 8rpx;
|
||||
padding: 0 22rpx;
|
||||
}
|
||||
|
||||
.bj-c3c3c3-02 {
|
||||
background: rgba(195, 195, 195, 0.2);
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 540rpx;
|
||||
height: 76rpx;
|
||||
margin: 0 auto;
|
||||
border-radius: 20rpx;
|
||||
// background: #F6F8FC;
|
||||
font-size: 28rpx;
|
||||
// color: #8B99A2;
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,341 @@
|
||||
<template>
|
||||
<view class="page" :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="header" :style="{ paddingTop: statusBar + 'px', backgroundColor: theme.bg }">
|
||||
<view class="header-inner">
|
||||
<text class="header-title" :style="'color: '+theme.text">{{ i18n.tabBar.market }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="subtabs">
|
||||
<view class="subtab-item">
|
||||
<text class="subtab-text" :style="'color: '+theme.text">{{ i18n.market.crypto }}</text>
|
||||
<view class="subtab-underline" style="background-color: #3c9cff;"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="section-title" :style="'color: '+theme.text">{{ i18n.tabBar.market }}</view>
|
||||
|
||||
<scroll-view scroll-y class="list">
|
||||
<view v-for="(item,index) in list" :key="item.symbol" class="row" :style="rowStyle(index)" @click="gokline(item)">
|
||||
<view class="row-left">
|
||||
<view class="logo-wrap" :style="'background-color: '+(theme.fu_bg || '#F5F6F7')">
|
||||
<image v-if="item.logo" class="logo" :src="item.logo" mode="aspectFit"></image>
|
||||
<text v-else class="logo-text" :style="'color: '+theme.text">{{ item.symbol.slice(0, 1) }}</text>
|
||||
</view>
|
||||
<view class="coin-info">
|
||||
<text class="pair" :style="'color: '+theme.text">{{ item.symbol }}</text>
|
||||
<view class="price-line">
|
||||
<text class="price" :style="'color: '+priceColor(item)">{{ item.priceText }}</text>
|
||||
<text class="change" :style="'color: '+priceColor(item)">{{ item.changeText }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="row-mid">
|
||||
<text class="mid-top" :style="'color: '+theme.text">{{ item.rightTop }}</text>
|
||||
<view class="mid-sub" :style="'color: '+(theme.fu_text || '#9AA0A6')">
|
||||
<text class="sub-label">H:</text>
|
||||
<text class="sub-val">{{ item.high }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="row-right">
|
||||
<text class="right-top" :style="'color: '+theme.text">{{ item.rightTop2 }}</text>
|
||||
<view class="right-sub" :style="'color: '+(theme.fu_text || '#9AA0A6')">
|
||||
<text class="sub-label">L:</text>
|
||||
<text class="sub-val">{{ item.low }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
theme: '',
|
||||
list: [],
|
||||
realTimeTimer: null,
|
||||
realTimeInFlight: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
this.startRealTime()
|
||||
},
|
||||
onHide() {
|
||||
this.stopRealTime()
|
||||
},
|
||||
onUnload() {
|
||||
this.stopRealTime()
|
||||
},
|
||||
methods: {
|
||||
formatFixed(val, fixed) {
|
||||
const n = Number(val)
|
||||
if (!Number.isFinite(n)) return val == null ? '' : String(val)
|
||||
const f = Number.isFinite(Number(fixed)) ? Number(fixed) : 2
|
||||
return n.toFixed(f)
|
||||
},
|
||||
startRealTime() {
|
||||
this.stopRealTime()
|
||||
this.getMarketList()
|
||||
this.realTimeTimer = setInterval(() => {
|
||||
this.getMarketList()
|
||||
}, 3000)
|
||||
},
|
||||
stopRealTime() {
|
||||
if (this.realTimeTimer) {
|
||||
clearInterval(this.realTimeTimer)
|
||||
this.realTimeTimer = null
|
||||
}
|
||||
this.realTimeInFlight = false
|
||||
},
|
||||
formatAmountUnit(num) {
|
||||
const n = Number(num)
|
||||
if (!Number.isFinite(n) || n === 0) return '0w'
|
||||
const abs = Math.abs(n)
|
||||
if (abs >= 1e8) return (n / 1e8).toFixed(2) + 'w'
|
||||
if (abs >= 1e4) return (n / 1e4).toFixed(2) + 'w'
|
||||
return n.toFixed(2) + 'w'
|
||||
},
|
||||
getMarketList() {
|
||||
if (this.realTimeInFlight) return
|
||||
this.realTimeInFlight = true
|
||||
this.post('/market/get_coin').then(res => {
|
||||
if (res.code == 1) {
|
||||
const coin = (res.data && Array.isArray(res.data.coin)) ? res.data.coin : []
|
||||
this.list = coin.map((c) => {
|
||||
const increase = Number(c && c.increase != null ? c.increase : 0)
|
||||
const dir = increase > 0 ? 1 : (increase < 0 ? -1 : 0)
|
||||
const priceJd = Number(c && c.price_jd != null ? c.price_jd : 2)
|
||||
const close = Number(c && c.close != null ? c.close : 0)
|
||||
const high = c && c.high != null ? this.formatFixed(c.high, priceJd) : ''
|
||||
const low = c && c.low != null ? this.formatFixed(c.low, priceJd) : ''
|
||||
|
||||
return {
|
||||
coinname: (c && (c.coinname || c.name)) ? (c.coinname || c.name) : '',
|
||||
bb_type: c && c.bb_type != null ? c.bb_type : '',
|
||||
rawSymbol: c && c.symbol ? c.symbol : '',
|
||||
symbol: (c && c.name ? (c.name + '/USDT') : (c && c.symbol ? c.symbol : '')),
|
||||
priceText: Number.isFinite(close) ? close.toFixed(priceJd) : '0',
|
||||
changeText: (Number.isFinite(increase) ? (increase * 100).toFixed(2) : '0.00') + '%',
|
||||
dir,
|
||||
rightTop: c && c.amount ? c.amount : '',
|
||||
rightTop2: c && c.count_price ? this.formatAmountUnit(c.count_price) : '',
|
||||
high,
|
||||
low,
|
||||
logo: c && (c.logo_image || c.logo || ''),
|
||||
usdt: close
|
||||
}
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
this.realTimeInFlight = false
|
||||
})
|
||||
},
|
||||
gokline(item) {
|
||||
const symbol = (item && item.rawSymbol) ? item.rawSymbol : (item && item.symbol ? item.symbol : '')
|
||||
const title = item && item.coinname ? item.coinname : ''
|
||||
const bbType = item && item.bb_type != null ? item.bb_type : ''
|
||||
// #ifdef H5
|
||||
uni.navigateTo({
|
||||
url: '/pages/tradingView/h5?title=' + title + '&bb_type=' + bbType + '&symbol=' + symbol
|
||||
})
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
uni.navigateTo({
|
||||
url: '/pages/tradingView/index?title=' + title + '&bb_type=' + bbType + '&symbol=' + symbol + '&close=' + (item && item.usdt != null ? item.usdt : '')
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
priceColor(item) {
|
||||
if (item.dir > 0) return '#16C784'
|
||||
if (item.dir < 0) return '#EA3943'
|
||||
return this.theme.text
|
||||
},
|
||||
rowStyle(index) {
|
||||
const border = this.theme.fu_bg || '#F0F0F0'
|
||||
if (index === this.list.length - 1) return ''
|
||||
return 'border-bottom: 1rpx solid ' + border
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
background: #ffffff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.header-inner {
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
font-size: 34rpx;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.subtabs {
|
||||
padding: 14rpx 24rpx 0;
|
||||
}
|
||||
|
||||
.subtab-item {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.subtab-text {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.subtab-underline {
|
||||
width: 42rpx;
|
||||
height: 6rpx;
|
||||
border-radius: 999rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
padding: 14rpx 24rpx 10rpx;
|
||||
font-size: 34rpx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.list {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 40rpx 15rpx;
|
||||
}
|
||||
|
||||
.row-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1 1 46%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.logo-wrap {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
border-radius: 999rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 0 0 56rpx;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
|
||||
.logo-text {
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.coin-info {
|
||||
margin-left: 16rpx;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.pair {
|
||||
display: block;
|
||||
font-size: 28rpx;
|
||||
font-weight: 800;
|
||||
line-height: 1.2;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.price-line {
|
||||
margin-top: 8rpx;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 14rpx;
|
||||
}
|
||||
|
||||
.price {
|
||||
font-size: 22rpx;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.change {
|
||||
font-size: 22rpx;
|
||||
line-height: 1.2;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.row-mid,
|
||||
.row-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
flex: 0 0 27%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.row-mid {
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
|
||||
.mid-top,
|
||||
.right-top {
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.mid-sub,
|
||||
.right-sub {
|
||||
margin-top: 10rpx;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 10rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sub-label {
|
||||
font-size: 20rpx;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.sub-val {
|
||||
font-size: 20rpx;
|
||||
line-height: 1.2;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,254 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<!-- 头部 -->
|
||||
<view class="width-750 relative flex align-center justify-center"
|
||||
:style="{height: `calc(${statusBar}px + 110rpx)`}">
|
||||
<view class="width-750 fixed1" :style="{paddingTop: statusBar + 'px', height: `calc(${statusBar}px + 110rpx)`}">
|
||||
<view class="width-750 height-110 padding-w-30 flex align-center justify-center">
|
||||
<view @click="_goback" class="cuIcon-back font-40 "
|
||||
style="position: absolute;left: 30rpx;"></view>
|
||||
<text class="font-36 weight-bold">{{data.name}}</text>
|
||||
<view @click="router.push('/pages/index/white_paper?ico='+ico)" class="font-30 absolute" style="right: 30rpx;">{{i18n.ico.three6}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750">
|
||||
<view class="padding-w-30 padding-t-45 ">
|
||||
<view class="padding-b-200">
|
||||
<view class="flex align-center justify-between">
|
||||
<text class="font-36 numbold-font">{{i18n.ico.title}}</text>
|
||||
<view @click="router.push('/pages/index/icoDetails?ico=' + ico)" class="morebtn">{{i18n.ico.text3}}</view>
|
||||
</view>
|
||||
<view class="margin-t-20 width-100b hidden-nowrap-ellipsis-3 font-26">
|
||||
{{data.content_txt}}
|
||||
</view>
|
||||
<view class="inputbox padding-t-24 padding-w-16" :style="'background-color: '+theme.fu_bg">
|
||||
<text class="font-30 weight-bold">{{i18n.ico.title}}{{i18n.ico.text4}}</text>
|
||||
<u-line-progress class="margin-t-23" :striped="true" :striped-active="true"
|
||||
:percent="percentage" height="24" active-color="#3ECEB2">
|
||||
</u-line-progress>
|
||||
<view class="flex align-center justify-between margin-t-18">
|
||||
<text class="font-26 color-0165EE numbold-font">{{data.count_num}} {{data.curr_name}}</text>
|
||||
<text class="font-26 numbold-font">{{data.real_num}} {{data.curr_name}}</text>
|
||||
</view>
|
||||
<!-- 数量 -->
|
||||
<view class="width-100b height-192 padding-c-27 flex direction-column justify-between margin-t-24">
|
||||
<view class="font-28 weight-bold">{{i18n.ico.text5}}</view>
|
||||
<view class="flex align-center justify-between">
|
||||
<input class="font-28" :placeholder="i18n.ico.tos1" placeholder-class="color-C3C3C3"
|
||||
type="digit" v-model="number" />
|
||||
<text class="font-28 weight-bold">{{data.curr_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex align-center font-26 weight-bold">
|
||||
<text>{{i18n.ico.text6}}</text>
|
||||
<text class="color-0165EE numbold-font margin-w-5">{{(number*data.price).toFixed(4)}}</text>
|
||||
<text class="numbold-font">USDT</text>
|
||||
</view>
|
||||
<!-- 密码 -->
|
||||
<view class="width-100b height-192 padding-c-27 flex direction-column justify-between margin-t-77">
|
||||
<view class="font-28 weight-bold">{{i18n.ico.text7}}</view>
|
||||
<input class="font-28" :placeholder="i18n.ico.tos2" placeholder-class="color-C3C3C3"
|
||||
type="text" v-model="paypwd" password/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 预约按钮 -->
|
||||
<view class="yuyuebtn">
|
||||
<u-button v-if="data.status==3" @click="openPopup" class="custom-style" type="primary">{{i18n.ico.text8}}</u-button>
|
||||
<u-button v-if="data.status==2&&(!data.is_yuyue)" @click="getYuyue" class="custom-style" type="primary">{{i18n.ico.text1}}</u-button>
|
||||
<view v-if="data.status==2&&data.is_yuyue" class="btn2">{{i18n.ico.text2}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 确认弹窗 -->
|
||||
<u-popup v-model="show" mode="center" border-radius="20">
|
||||
<view class="width-600 height-298 bj-white" style="overflow: hidden;">
|
||||
<view class="height-203 padding-t-93 padding-b-65 text-center">
|
||||
<text class="font-30 color-333333 weight-bold">{{i18n.ico.text9}}</text>
|
||||
</view>
|
||||
<view class="height-96 flex">
|
||||
<view @click="show=false" class="flex-1 line-height-96 text-center bj-c3c3c3-02">
|
||||
<text class="font-28 color-C3C3C3 weight-bold">{{i18n.ico.text10}}</text>
|
||||
</view>
|
||||
<view @click="getBuy()" class="flex-1 line-height-96 text-center bj-0165EE">
|
||||
<text class="font-28 color-white weight-bold">{{i18n.ico.text11}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
data: '',
|
||||
number: '',
|
||||
paypwd: '',
|
||||
percentage: 0,
|
||||
show: false,
|
||||
flag: true,
|
||||
|
||||
theme: '',
|
||||
ico:""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onLoad:function(e){
|
||||
this.ico = e.ico
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
this.getDetails()
|
||||
},
|
||||
methods: {
|
||||
// 购买私募
|
||||
getBuy() {
|
||||
if (!this.flag) {
|
||||
return
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
mask: true
|
||||
});
|
||||
this.flag = false
|
||||
let obj = {
|
||||
id: this.data.id,
|
||||
num: this.number,
|
||||
pay_pwd: this.paypwd
|
||||
}
|
||||
this.post('/index/ico_sub', obj).then(res => {
|
||||
console.log('购买私募返回', res)
|
||||
this.flag = true
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
uni.hideLoading()
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 预约私募
|
||||
getYuyue() {
|
||||
if (!this.flag) {
|
||||
return
|
||||
} else {
|
||||
this.flag = false
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
mask: true
|
||||
});
|
||||
this.post('/index/ico_yuyue', {
|
||||
id: this.data.id
|
||||
}).then(res => {
|
||||
console.log('预约返回', res)
|
||||
this.flag = true
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.getDetails()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 打开确认弹窗
|
||||
openPopup() {
|
||||
if (this.number == '') return this.tos(this.i18n.ico.tos1)
|
||||
if (this.paypwd == '') return this.tos(this.i18n.ico.tos2)
|
||||
this.show = true
|
||||
},
|
||||
// 获取私募内容
|
||||
getDetails() {
|
||||
this.post('/index/ico_content',{
|
||||
id: this.ico
|
||||
}).then(res => {
|
||||
console.log('私募内容', res)
|
||||
if (res.code == 1) {
|
||||
this.data = res.data
|
||||
this.percentage = Math.floor((res.data.count_num - res.data.real_num) / res.data.count_num * 100)
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fixed1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.bj-589CF8 {
|
||||
background: linear-gradient(to bottom, #52F3C9 0%, #3ECEB2 100%);
|
||||
border-radius: 0rpx 0rpx 120rpx 120rpx;
|
||||
}
|
||||
|
||||
.yuyuebtn {
|
||||
margin-top: 50rpx;
|
||||
}
|
||||
|
||||
.custom-style {
|
||||
width: 600rpx;
|
||||
height: 86rpx;
|
||||
background: #3ECEB2;
|
||||
border-radius: 20rpx;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.morebtn {
|
||||
width: 180rpx;
|
||||
height: 66rpx;
|
||||
background: #3ECEB2;
|
||||
border: 1rpx solid #C9E0FF;
|
||||
opacity: 1;
|
||||
border-radius: 33rpx;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 66rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.inputbox {
|
||||
width: 690rpx;
|
||||
height: 682rpx;
|
||||
// background: #FFFFFF;
|
||||
box-shadow: 0rpx 3rpx 6rpx rgba(220, 220, 220, 0.16);
|
||||
opacity: 1;
|
||||
border-radius: 20rpx;
|
||||
margin-top: 42rpx;
|
||||
}
|
||||
|
||||
.bj-c3c3c3-02 {
|
||||
background: rgba(195, 195, 195, 0.2);
|
||||
}
|
||||
.btn2 {
|
||||
width: 690rpx;
|
||||
height: 86rpx;
|
||||
background: rgb(210, 210, 210);
|
||||
border-radius: 20rpx;
|
||||
font-size: 30rpx;
|
||||
color: #8B8F95;
|
||||
line-height: 86rpx;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 头部 -->
|
||||
<view class="width-750 relative flex align-center justify-center"
|
||||
:style="{height: `calc(${statusBar}px + 110rpx)`}">
|
||||
<view class="width-750 fixed1"
|
||||
:style="{paddingTop: statusBar + 'px', height: `calc(${statusBar}px + 110rpx)`}">
|
||||
<view class="width-750 height-110 padding-w-30 bgimg1 flex align-center justify-center">
|
||||
<view @click="_goback" class="cuIcon-back font-40 color-white"
|
||||
style="position: absolute;left: 30rpx;"></view>
|
||||
<text class="font-36 color-white weight-bold">{{i18n.ico.title}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750">
|
||||
<view class="height-110 padding-t-90 bj-589CF8">
|
||||
<view class="detailbox" v-html="data.content"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 预约按钮 -->
|
||||
<view class="yuyuebtn">
|
||||
<!-- <u-button class="custom-style" type="primary">立即预约</u-button> -->
|
||||
<view @click="getYuyue" v-if="status==2&&(!data.is_yuyue)" class="btn1">{{i18n.ico.text1}}</view>
|
||||
<view v-if="status==1" class="btn2">{{i18n.ico.text1}}</view>
|
||||
<view v-if="status==2&&data.is_yuyue" class="btn2">{{i18n.ico.text2}}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
data: '',
|
||||
status: -1,
|
||||
flag: true,
|
||||
ico:""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onLoad:function(e){
|
||||
this.ico = e.ico
|
||||
},
|
||||
onShow() {
|
||||
this.getDetails()
|
||||
},
|
||||
methods: {
|
||||
// 预约私募
|
||||
getYuyue() {
|
||||
if (!this.flag) {
|
||||
return
|
||||
} else {
|
||||
this.flag = false
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
mask: true
|
||||
});
|
||||
this.post('/index/ico_yuyue', {
|
||||
id: this.data.id
|
||||
}).then(res => {
|
||||
console.log('预约返回', res)
|
||||
this.flag = true
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.getDetails()
|
||||
setTimeout(() => {
|
||||
uni.hideLoading()
|
||||
},1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 获取私募内容
|
||||
getDetails() {
|
||||
this.post('/index/ico_content',{
|
||||
id: this.ico
|
||||
}).then(res => {
|
||||
console.log('私募内容', res)
|
||||
if (res.code == 1) {
|
||||
this.data = res.data
|
||||
this.status = res.data.status
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.fixed1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
background: linear-gradient(180deg, #52F3C9 0%, #3ECEB2 100%);
|
||||
}
|
||||
|
||||
.bj-589CF8 {
|
||||
background: linear-gradient(180deg, #3ECEB2 0%, #52F3C9 100%);
|
||||
}
|
||||
|
||||
.detailbox {
|
||||
width: 750rpx;
|
||||
padding: 30rpx 30rpx 200rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 3rpx 6rpx rgba(220, 220, 220, 0.16);
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.yuyuebtn {
|
||||
position: fixed;
|
||||
bottom: 60rpx;
|
||||
left: 50%;
|
||||
margin-left: -300rpx;
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
width: 600rpx;
|
||||
height: 86rpx;
|
||||
background: #0165EE;
|
||||
border-radius: 20rpx;
|
||||
font-size: 30rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 86rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
width: 600rpx;
|
||||
height: 86rpx;
|
||||
background: rgb(210, 210, 210);
|
||||
border-radius: 20rpx;
|
||||
font-size: 30rpx;
|
||||
color: #8B8F95;
|
||||
line-height: 86rpx;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<view>
|
||||
<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.tabBar.quantify"></myNav>
|
||||
<view class="width-690 margin-0-auto height-100 radiu-16 flex align-center justify-between padding-w-10"
|
||||
:style="'background-color: '+theme.fu_bg">
|
||||
<view class="flex-1 height-80 flex direction-column align-center justify-around">
|
||||
<text class="font-24">{{i18n.ico.tos3}}</text>
|
||||
<text class="font-24">{{succ_usdt}} USDT</text>
|
||||
</view>
|
||||
<view class="flex-1 height-80 flex direction-column align-center justify-around">
|
||||
<text class="font-24">{{i18n.ico.tos4}}</text>
|
||||
<text class="font-24">{{have_usdt}} USDT</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-b-40">
|
||||
<view v-for="(item,index) in list"
|
||||
class="height-180 padding-w-30 padding-t-24 padding-b-27 flex direction-column justify-between margin-t-16">
|
||||
<view class="flex align-center justify-between">
|
||||
<text class="font-32 color-00C481 nummedium-font">{{item.name}}</text>
|
||||
<text v-if="item.status==0" class="font-28 nummedium-font">{{i18n.ico.text15}}</text>
|
||||
<text v-if="item.status==1" class="font-28 nummedium-font">{{i18n.ico.text16}}</text>
|
||||
</view>
|
||||
<view class="height-50 flex align-center justify-between">
|
||||
<text class="font-28 nummedium-font">{{i18n.ico.tos5}}:{{item.price}} USDT</text>
|
||||
<text class="font-26 nummedium-font">{{i18n.ico.tos6}}/{{i18n.ico.tos7}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between">
|
||||
<text class="font-24 nummedium-font">{{item.createtime}}</text>
|
||||
<text class="font-26 nummedium-font">{{item.real_num}}/{{item.num}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
theme: '',
|
||||
have_usdt: 0,
|
||||
succ_usdt: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getico_usdt()
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getico_usdt() {
|
||||
this.post('/index/ico_usdt').then(res => {
|
||||
console.log('', res)
|
||||
if (res.code == 1) {
|
||||
this.have_usdt = res.data.have_usdt
|
||||
this.succ_usdt = res.data.succ_usdt
|
||||
}
|
||||
})
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
setTimeout(() => {
|
||||
this.post('/index/ico_user_log', {
|
||||
page: pageNo,
|
||||
page_num: pageSize
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
@@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<view :style="'background-color:' + theme.bg + ';'" style="min-height: 100vh;">
|
||||
<view class="" style="width: 750rpx;height: 360rpx;background: #06C38D;border-radius: 0px 0px 20rpx 20rpx;border-radius: 0 0 20rpx 20rpx;">
|
||||
<view class="width-750 relative flex align-center justify-center"
|
||||
:style="{height: `calc(${statusBar}px + 110rpx)`}">
|
||||
<view class="width-750 fixed1"
|
||||
:style="{paddingTop: statusBar + 'px', height: `calc(${statusBar}px + 110rpx)`}">
|
||||
<view class="width-750 height-110 padding-w-30 flex align-center justify-center">
|
||||
<!-- <view @click="_goback" class="cuIcon-back font-40 color-white"
|
||||
style="position: absolute;left: 30rpx;"></view> -->
|
||||
<text class="font-36 weight-bold text-white">{{i18n.tabBar.quantify}}</text>
|
||||
<image v-if="token" @click="router.push('/pages/index/icoRecord')" class="width-48 height-48 absolute" style="right: 30rpx;" src="/static/imgs/quantify/shezhi@2x.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="" style="margin-top: -200rpx;">
|
||||
<view @click="todetail(item)" v-for="(item,index) in list" class="margin-lr margin-top" :style="'background-color: ' + theme.fu_bg" style="width: 690rpx;border-radius: 16rpx;">
|
||||
<view class="padding">
|
||||
<view class="flex align-center justify-between solid-bottom">
|
||||
<view class="flex align-center">
|
||||
<view class="" style="width: 76rpx;height: 76rpx;border-radius: 38rpx;">
|
||||
<image :src="item.cover_image" style="width: 76rpx;height: 76rpx;border-radius: 38rpx;" mode=""></image>
|
||||
</view>
|
||||
<view class="margin-left-xs">
|
||||
<view :style="'color:' + theme.text" class="font-28 text-bold u-line-1">
|
||||
{{item.curr_name}}
|
||||
</view>
|
||||
<view class="font-24 text-bold" style="color: #FF5D53;">
|
||||
{{i18n.ico.text12}}: {{item.start_time}}
|
||||
</view>
|
||||
<view class="font-24 text-bold" style="color: #FF5D53;">
|
||||
{{i18n.ico.jiesu}}: {{item.end_time}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button v-if="item.status == 1" class="cu-btn flex align-center justify-center text-white" style="min-width: 140rpx;height: 56rpx;background: #CCCCCC;box-shadow: 0px 4rpx 10rpx 1rpx rgba(1, 101, 238, 0.1);border-radius: 8rpx;">
|
||||
<view class="" style="white-space: nowrap;">
|
||||
{{i18n.ico.text13}}
|
||||
</view>
|
||||
<u-icon name="arrow-right" color="#FFFFFF" size="15"></u-icon>
|
||||
</button>
|
||||
<button v-if="item.status == 2" class="cu-btn flex align-center justify-center text-white" style="min-width: 140rpx;height: 56rpx;background: #2DD1AF;box-shadow: 0px 4rpx 10rpx 1rpx rgba(0, 196, 129, 0.1);border-radius: 8rpx;">
|
||||
<view class="" style="white-space: nowrap;">
|
||||
{{i18n.ico.text14}}
|
||||
</view>
|
||||
<u-icon name="arrow-right" color="#FFFFFF" size="15"></u-icon>
|
||||
</button>
|
||||
<button v-if="item.status == 3" class="cu-btn flex align-center justify-center text-white" style="min-width: 140rpx;height: 56rpx;background: #2DD1AF;box-shadow: 0px 4rpx 10rpx 1rpx rgba(1, 101, 238, 0.1);border-radius: 8rpx;">
|
||||
<view class="" style="white-space: nowrap;">
|
||||
{{i18n.ico.text15}}
|
||||
</view>
|
||||
<u-icon name="arrow-right" color="#FFFFFF" size="15"></u-icon>
|
||||
</button>
|
||||
<button v-if="item.status == 4" class="cu-btn flex align-center justify-center text-white" style="min-width: 140rpx;height: 56rpx;background: #CCCCCC;box-shadow: 0px 4rpx 10rpx 1rpx rgba(1, 101, 238, 0.1);border-radius: 8rpx;">
|
||||
<view class="" style="white-space: nowrap;">
|
||||
{{i18n.ico.text16}}
|
||||
</view>
|
||||
<u-icon name="arrow-right" color="#FFFFFF" size="15"></u-icon>
|
||||
</button>
|
||||
</view>
|
||||
<view class="padding-top flex align-center justify-between">
|
||||
<view class="text-center">
|
||||
<view class=" font-28 text-bold" :style="'color:' + theme.text">
|
||||
{{item.count_num}}
|
||||
</view>
|
||||
<view class="color-C3C3C3 font-24 margin-top-xs">
|
||||
{{i18n.ico.text17}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-center">
|
||||
<view class=" font-28 text-bold" :style="'color:' + theme.text">
|
||||
{{item.price}}
|
||||
</view>
|
||||
<view class="color-C3C3C3 font-24 margin-top-xs">
|
||||
{{i18n.ico.text18}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-center">
|
||||
<view class="color-333333 font-28 text-bold">
|
||||
<!-- {{item.real_num}} -->
|
||||
<view class="font-20" style="color: #2DD1AF;">
|
||||
{{Number(item.jindu).toFixed(2)}}%
|
||||
</view>
|
||||
<view class="" style="width: 150rpx;margin-top: -20rpx;">
|
||||
<u-line-progress :percent="Number(item.jindu)" activeColor="#2DD1AF" :height="10" :show-percent="false"></u-line-progress>
|
||||
</view>
|
||||
</view>
|
||||
<view class="color-C3C3C3 font-24">
|
||||
{{i18n.ico.text19}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
token:uni.getStorageSync('token'),
|
||||
theme: '',
|
||||
list:[]
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList(){
|
||||
this.post('/index/ico_list').then(res => {
|
||||
console.log('私募内容', res)
|
||||
if (res.code == 1) {
|
||||
this.list = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
todetail(item){
|
||||
if(item.status==1 || item.status==4){
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/icoDetails?ico=' + item.id
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/icoBuy?ico=' + item.id
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,886 @@
|
||||
<template>
|
||||
<view>
|
||||
<z-paging ref="paging" refresher-only @onRefresh="onRefresh" :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<custom-refresher slot="refresher" slot-scope="{refresherStatus}" :status="refresherStatus">
|
||||
</custom-refresher>
|
||||
<!-- 头部 -->
|
||||
<view class="width-750 relative flex align-center justify-center"
|
||||
:style="{height: `calc(${statusBar}px + 110rpx)`,background:theme.bg,color:theme.text}">
|
||||
<view class="width-750"
|
||||
:style="{paddingTop: statusBar + 'px', height: `calc(${statusBar}px + 110rpx)`}">
|
||||
<view class="width-750 height-110 padding-w-30 flex align-center justify-between">
|
||||
<view @click="router.push('/pages/my/index')" class="flex align-center">
|
||||
<u-icon name="account" color="#3c9cff" size="40"></u-icon>
|
||||
</view>
|
||||
<view class="flex align-center">
|
||||
<image src="/static/imgs/index/logox.png" mode="heightFix" class="height-40"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-t-16 padding-b-40">
|
||||
<!-- 轮播 -->
|
||||
<view class="width-750 height-350 margin-b-24 padding-w-30">
|
||||
<view class="swiper-container">
|
||||
<u-swiper :list="swiperlist" height="350" img-mode="aspectFill" bg-color="transparent"></u-swiper>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 通知 -->
|
||||
<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">
|
||||
<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"
|
||||
:list="noticelist" color="#2C2C2C"></u-notice-bar>
|
||||
</view>
|
||||
<view class="notice-right flex align-center justify-center">
|
||||
<image class="notice-icon-right" src="/static/imgs/index/gonggao.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 功能区 -->
|
||||
|
||||
<view class="width-750 padding-14 flex align-center flex-wrap grid col-4 function-area" :style="'margin-top:2rpx'">
|
||||
<view class="height-120 flex direction-column align-center justify-center"
|
||||
@click="goURL(item)" v-for="(item,index) in operatelist" :key="index">
|
||||
<view class="width-125 height-125 flex align-center justify-center function-icon">
|
||||
<image class="width-100 height-100" :src="item.logo_image" mode=""></image>
|
||||
</view>
|
||||
<text class="font-24 margin-t-4 medium-font">{{item.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="width-750 padding-t-24 padding-w-30 follow-section" :style="'margin:0 30rpx;border-radius:16rpx;width:690rpx;background-color:#FFFFFF'">
|
||||
<view class="follow-header">
|
||||
<text class="follow-title">{{i18n.index.focusMost}}</text>
|
||||
<view class="follow-more" @click="goMarketMore">
|
||||
<text class="follow-more-text">{{i18n.index.more}}</text>
|
||||
<text class="follow-more-arrow">></text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-for="(item,index) in list" :key="index" class="follow-row" @click="gokline(item)">
|
||||
<view class="follow-left">
|
||||
<image class="follow-logo" :src="item.logo_image" mode="aspectFit"></image>
|
||||
<view class="follow-pair">
|
||||
<text class="follow-pair-text">{{item.name}}/USDT</text>
|
||||
<text class="follow-sub">{{i18n.market.crypto}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="follow-mid">
|
||||
<text class="follow-price">{{Number(item.usdt).toFixed(item.price_jd)}}</text>
|
||||
<view class="follow-hot">
|
||||
<image class="follow-hot-icon" src="/static/imgs/index/huo.png" mode="aspectFit"></image>
|
||||
<text class="follow-hot-num">{{virtualFollowCount(item)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="follow-right">
|
||||
<view class="follow-percent" :class="item.increase<0?'follow-percent-down':'follow-percent-up'">{{item.increase<0?'':'+'}}{{(item.increase*100).toFixed(2)}}%</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="loading" class="width-100b padding-c-50 flex align-center justify-center">
|
||||
<u-loading show mode="circle" 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">{{i18n.assets.index.nodata}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// #ifdef APP-PLUS
|
||||
import APPUpdate from '@/components/APPUpdate/js_sdk/appUpdate';
|
||||
// #endif
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
userInfo: uni.getStorageSync('userinfo'),
|
||||
searchVal: '',
|
||||
swiperlist: [],
|
||||
noticelist: [],
|
||||
noticeid: [],
|
||||
hotlist: [],
|
||||
operatelist: [
|
||||
// {
|
||||
// name: 'C2C',
|
||||
// imgs: '/static/imgs/index/c2c@2x.png',
|
||||
// url: '/pages/index/c2c'
|
||||
// },
|
||||
// {
|
||||
// name: 'ICO',
|
||||
// imgs: '/static/imgs/index/ico@2x.png',
|
||||
// url: '/pages/index/icoBuy'
|
||||
// },
|
||||
// {
|
||||
// name: '锁仓',
|
||||
// imgs: '/static/imgs/index/suocang@2x.png',
|
||||
// url: '/pages/index/lockUp'
|
||||
// },
|
||||
// {
|
||||
// name: '充币',
|
||||
// imgs: '/static/imgs/index/chongbi@2x.png',
|
||||
// url: '/pages/index/recharge'
|
||||
// },
|
||||
// {
|
||||
// name: '提币',
|
||||
// imgs: '/static/imgs/index/tibi@2x.png',
|
||||
// url: '/pages/index/withdraw'
|
||||
// },
|
||||
// {
|
||||
// name: '合约',
|
||||
// imgs: '/static/imgs/index/heyue@2x.png',
|
||||
// url: '/pages/contract/index'
|
||||
// },
|
||||
// {
|
||||
// name: '量化',
|
||||
// imgs: '/static/imgs/index/lianghua@2x.png',
|
||||
// url: '/pages/quantify/index'
|
||||
// },
|
||||
// {
|
||||
// name: '客服',
|
||||
// imgs: '/static/imgs/index/kefu@2x.png',
|
||||
// url: '/pages/kefu/kefu'
|
||||
// },
|
||||
],
|
||||
currnow: 4, //1=涨,2=跌,3=成交,4=全部
|
||||
list: [],
|
||||
loading: true,
|
||||
avatar: '',
|
||||
|
||||
midList: [],
|
||||
|
||||
show: false,
|
||||
|
||||
rotate: 0,
|
||||
rotateTimer:null,
|
||||
followTimer: null,
|
||||
followInFlight: false,
|
||||
virtualTick: 0,
|
||||
tabClick: false,
|
||||
theme:''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getLeft()
|
||||
// #ifdef APP-PLUS
|
||||
APPUpdate();
|
||||
// #endif
|
||||
},
|
||||
onTabItemTap(item) {
|
||||
if (item.index == 0 && this.tabClick) { // 200ms 内再次点击
|
||||
// 这里就是模拟的双击事件,可以写类似数据刷新相关处理
|
||||
if(this.rotateTimer){
|
||||
clearInterval(this.rotateTimer)
|
||||
this.rotateTimer = null
|
||||
}else{
|
||||
this.rotateTimer = setInterval(() => {
|
||||
if (this.rotate >= 360) {
|
||||
this.rotate = 0
|
||||
} else {
|
||||
this.rotate += 1
|
||||
}
|
||||
}, 50)
|
||||
}
|
||||
}
|
||||
this.tabClick = true
|
||||
setTimeout(() => {
|
||||
this.tabClick = false // 200ms 内没有第二次点击,就当作单击
|
||||
}, 200)
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
if (typeof uni.setTabBarStyle === 'function') {
|
||||
// 始终使用浅色主题的底部栏
|
||||
const lightTheme = this.$store.state.lightTheme;
|
||||
uni.setTabBarStyle({
|
||||
selectedColor: '#007AFF',
|
||||
backgroundColor: lightTheme.backgroundColor,
|
||||
borderStyle: 'white',
|
||||
borderColor: 'rgb(238, 238, 238)'
|
||||
})
|
||||
// tabbar多语言
|
||||
uni.setTabBarItem({
|
||||
index: 0,
|
||||
text: this.i18n.tabBar.home,
|
||||
selectedIconPath: lightTheme.selectedIconPath0,
|
||||
});
|
||||
uni.setTabBarItem({
|
||||
index: 1,
|
||||
text: this.i18n.tabBar.market,
|
||||
selectedIconPath: lightTheme.selectedIconPath1
|
||||
});
|
||||
uni.setTabBarItem({
|
||||
index: 2,
|
||||
text: this.i18n.tabBar.cycle,
|
||||
selectedIconPath: lightTheme.selectedIconPath2
|
||||
});
|
||||
uni.setTabBarItem({
|
||||
index: 3,
|
||||
text: this.i18n.tabBar.lever,
|
||||
selectedIconPath: lightTheme.selectedIconPath3
|
||||
});
|
||||
uni.setTabBarItem({
|
||||
index: 4,
|
||||
text: this.i18n.tabBar.assets,
|
||||
selectedIconPath: lightTheme.selectedIconPath4
|
||||
});
|
||||
}
|
||||
this.getBanner()
|
||||
this.getHotcurr()
|
||||
this.startFollowRealTime()
|
||||
this.getavatar()
|
||||
this.getNotices()
|
||||
this.getCate()
|
||||
},
|
||||
onHide() {
|
||||
this.stopFollowRealTime()
|
||||
},
|
||||
onUnload() {
|
||||
this.stopFollowRealTime()
|
||||
},
|
||||
methods: {
|
||||
startFollowRealTime() {
|
||||
this.stopFollowRealTime()
|
||||
this.getPaihang()
|
||||
this.virtualTick++
|
||||
this.followTimer = setInterval(() => {
|
||||
this.getPaihang()
|
||||
this.virtualTick++
|
||||
}, 3000)
|
||||
},
|
||||
stopFollowRealTime() {
|
||||
if (this.followTimer) {
|
||||
clearInterval(this.followTimer)
|
||||
this.followTimer = null
|
||||
}
|
||||
this.followInFlight = false
|
||||
},
|
||||
onRefresh() {
|
||||
this.midList = []
|
||||
this.list = []
|
||||
this.hotlist = []
|
||||
this.swiperlist = []
|
||||
this.noticelist = []
|
||||
this.noticeid = []
|
||||
this.getLeft()
|
||||
this.getBanner()
|
||||
this.getHotcurr()
|
||||
this.getPaihang()
|
||||
this.getNotices()
|
||||
this.getCate()
|
||||
// 以告知z-paging下拉刷新结束,这样才可以开始下一次的下拉刷新
|
||||
setTimeout(() => {
|
||||
//1.5秒之后停止刷新动画
|
||||
this.$refs.paging.complete();
|
||||
}, 1000)
|
||||
},
|
||||
searchCion() {
|
||||
let inputWord = this.searchVal.toUpperCase()
|
||||
|
||||
let temp = this.midList.filter((item) => {
|
||||
return inputWord == item.name
|
||||
})
|
||||
console.log(temp)
|
||||
if (temp == '') {
|
||||
this.tos(this.i18n.cycle.nodata)
|
||||
} else {
|
||||
this.gokline(temp[0])
|
||||
}
|
||||
},
|
||||
// 获取币种列表
|
||||
getLeft() {
|
||||
this.post('/market/get_coin').then(res => {
|
||||
if (res.code == 1) {
|
||||
// console.log('币种列表', res)
|
||||
this.midList = res.data.coin
|
||||
}
|
||||
})
|
||||
},
|
||||
// 改变功能区
|
||||
changeoperate() {
|
||||
this.operatelist[0].name = this.i18n.index.text1
|
||||
this.operatelist[1].name = this.i18n.index.text2
|
||||
this.operatelist[2].name = this.i18n.index.text3
|
||||
this.operatelist[3].name = this.i18n.index.text4
|
||||
this.operatelist[4].name = this.i18n.index.text5
|
||||
this.operatelist[5].name = this.i18n.index.text6
|
||||
this.operatelist[6].name = this.i18n.index.text7
|
||||
this.operatelist[7].name = this.i18n.index.text8
|
||||
},
|
||||
// 获取首页菜单栏
|
||||
getCate() {
|
||||
this.post('/index/index_cate').then(res => {
|
||||
console.log('首页菜单栏', res);
|
||||
if (res.code == 1) {
|
||||
const list = Array.isArray(res.data) ? res.data : []
|
||||
const seen = new Set()
|
||||
this.operatelist = list.filter((item) => {
|
||||
if (!item) return false
|
||||
const key = (item.url || '') || (item.name || '')
|
||||
if (!key) return true
|
||||
if (seen.has(key)) return false
|
||||
seen.add(key)
|
||||
return true
|
||||
})
|
||||
// 多语言翻译菜单名称
|
||||
this.translateMenuNames()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 翻译菜单项名称
|
||||
translateMenuNames() {
|
||||
const menuTranslations = {
|
||||
'jp': {
|
||||
'Deposit': '入金', 'Withdraw': '出金', 'Authentication': '本人確認',
|
||||
'Live Agent': 'カスタマーサポート', 'Transfer': '振替', 'Contract': '契約',
|
||||
'Recharge': '入金', 'Withdrawal': '出金', 'Quick Buy': 'クイック購入',
|
||||
'Quantify': '自動売買', 'Customer Service': 'カスタマーサポート',
|
||||
'C2C': 'C2C取引', 'ICO': 'ICO', 'Lock': 'ロック',
|
||||
'Coin Transfer': '通貨振替', 'Market': '市場',
|
||||
},
|
||||
'zh-CN': {
|
||||
'Deposit': '充值', 'Withdraw': '提现', 'Authentication': '实名认证',
|
||||
'Live Agent': '在线客服', 'Transfer': '划转', 'Contract': '合约',
|
||||
'Coin Transfer': '币币划转',
|
||||
},
|
||||
'kr': {
|
||||
'Deposit': '입금', 'Withdraw': '출금', 'Authentication': '인증',
|
||||
'Live Agent': '고객지원', 'Transfer': '이체', 'Contract': '계약',
|
||||
'Coin Transfer': '코인 이체',
|
||||
},
|
||||
'fre': {
|
||||
'Deposit': 'Dépôt', 'Withdraw': 'Retrait', 'Authentication': 'Vérification',
|
||||
'Live Agent': 'Support', 'Transfer': 'Transfert',
|
||||
'Coin Transfer': 'Transfert de devises',
|
||||
},
|
||||
'ger': {
|
||||
'Deposit': 'Einzahlung', 'Withdraw': 'Auszahlung', 'Authentication': 'Verifizierung',
|
||||
'Live Agent': 'Support', 'Transfer': 'Überweisung',
|
||||
'Coin Transfer': 'Münztransfer',
|
||||
},
|
||||
'ily': {
|
||||
'Deposit': 'Deposito', 'Withdraw': 'Prelievo', 'Authentication': 'Verifica',
|
||||
'Live Agent': 'Supporto', 'Transfer': 'Trasferimento',
|
||||
'Coin Transfer': 'Trasferimento valuta',
|
||||
},
|
||||
'mn': {
|
||||
'Deposit': 'Орлого', 'Withdraw': 'Зарлага', 'Authentication': 'Баталгаажуулалт',
|
||||
'Live Agent': 'Дэмжлэг', 'Transfer': 'Шилжүүлэг',
|
||||
'Coin Transfer': 'Зоос шилжүүлэг',
|
||||
},
|
||||
'ms': {
|
||||
'Deposit': 'Deposit', 'Withdraw': 'Pengeluaran', 'Authentication': 'Pengesahan',
|
||||
'Live Agent': 'Sokongan', 'Transfer': 'Pindahan',
|
||||
'Coin Transfer': 'Pemindahan syiling',
|
||||
},
|
||||
}
|
||||
const lang = this.$i18n.locale || 'en-US'
|
||||
// 从 locale 提取语言 key
|
||||
let langKey = lang
|
||||
if (lang === 'en-US') return // 英文不需要翻译
|
||||
const map = menuTranslations[langKey]
|
||||
if (!map) return
|
||||
this.operatelist.forEach(item => {
|
||||
if (item && item.name && map[item.name]) {
|
||||
item.name = map[item.name]
|
||||
}
|
||||
})
|
||||
},
|
||||
// 去K线
|
||||
gokline(item) {
|
||||
// #ifdef H5
|
||||
uni.navigateTo({
|
||||
url: '/pages/tradingView/h5?title=' + item.coinname +'&bb_type='+item.bb_type+ '&symbol=' + item.symbol
|
||||
})
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
uni.navigateTo({
|
||||
url: '/pages/tradingView/index?title=' + item.coinname +'&bb_type='+item.bb_type+ '&symbol=' + item.symbol+ '&close=' + item.usdt
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
goMarketMore() {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/hangqing'
|
||||
})
|
||||
},
|
||||
virtualFollowCount(item) {
|
||||
const key = String((item && (item.symbol || item.name)) || '')
|
||||
const seed = Math.floor(this.virtualTick / 2)
|
||||
let hash = 0
|
||||
for (let i = 0; i < key.length; i++) {
|
||||
hash = ((hash << 5) - hash) + key.charCodeAt(i)
|
||||
hash |= 0
|
||||
}
|
||||
hash = ((hash << 5) - hash) + seed
|
||||
hash |= 0
|
||||
const base = Math.abs(hash) % 480
|
||||
return base + 20
|
||||
},
|
||||
// 获取用户头像
|
||||
getavatar() {
|
||||
if (!uni.getStorageSync('token')) {
|
||||
this.avatar = ''
|
||||
return
|
||||
}
|
||||
this.post('/my/get_userinfo').then(res => {
|
||||
if (res.code == 1) {
|
||||
this.avatar = res.data.avatar
|
||||
}
|
||||
})
|
||||
},
|
||||
saoma() {
|
||||
uni.scanCode({
|
||||
success: function(res) {
|
||||
// console.log('条码类型:' + res.scanType);
|
||||
// console.log('条码内容:' + res.result);
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/withdraw?type=saoma&result=' + res.result
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取排行榜
|
||||
getPaihang() {
|
||||
if (this.followInFlight) return
|
||||
this.followInFlight = true
|
||||
this.loading = true
|
||||
this.post('/index/get_coin_increase', {
|
||||
type: this.currnow
|
||||
}).then(res => {
|
||||
this.loading = false
|
||||
// console.log('涨跌幅排行榜', res)
|
||||
if (res.code == 1) {
|
||||
this.list = res.data
|
||||
}
|
||||
}).finally(() => {
|
||||
this.followInFlight = false
|
||||
})
|
||||
},
|
||||
// 获取热门币种
|
||||
getHotcurr() {
|
||||
this.post('/index/get_hot_coin').then(res => {
|
||||
// console.log('热门币种', res)
|
||||
if (res.code == 1) {
|
||||
this.hotlist = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取轮播图和滚动通知
|
||||
getBanner() {
|
||||
this.post('/index/get_banner').then(res => {
|
||||
// console.log('轮播图', res)
|
||||
if (res.code == 1) {
|
||||
this.swiperlist = res.data.banner
|
||||
}
|
||||
})
|
||||
},
|
||||
//
|
||||
goNoticedetails(e) {
|
||||
console.log(e);
|
||||
this.router.push('/pages/index/noticeDetails?id=' + this.noticeid[e])
|
||||
},
|
||||
// 获取滚动通知
|
||||
getNotices() {
|
||||
this.post('/index/message_list', {
|
||||
page: 1,
|
||||
}).then(res => {
|
||||
// console.log('滚动通知', res)
|
||||
if (res.code == 1) {
|
||||
let data = res.data.data
|
||||
this.noticelist = []
|
||||
this.noticeid = []
|
||||
data.forEach(item => {
|
||||
this.noticelist.push(item.title)
|
||||
this.noticeid.push(item.id)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 跳转路由
|
||||
goURL(item) {
|
||||
if (item.open_status == 1) {
|
||||
if (item.type == 1) {
|
||||
if (item.types == 1) {
|
||||
uni.navigateTo({
|
||||
url: item.url
|
||||
})
|
||||
} else {
|
||||
uni.switchTab({
|
||||
url: item.url
|
||||
})
|
||||
}
|
||||
} else {
|
||||
// #ifdef APP-PLUS
|
||||
plus.runtime.openURL(item.url)
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
window.location.replace(item.url)
|
||||
// #endif
|
||||
}
|
||||
} else if (item.open_status == 2) {
|
||||
this.tos(this.i18n.newWord.toOpen)
|
||||
} else {
|
||||
this.tos(this.i18n.newWord.no)
|
||||
}
|
||||
},
|
||||
// 切换榜单
|
||||
changeCurrnow(now) {
|
||||
if (this.currnow != now) {
|
||||
this.currnow = now
|
||||
this.getPaihang()
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fixed1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
// background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.kuaijieBG {
|
||||
height: 142rpx;
|
||||
// width: 362rpx;
|
||||
// background-image: url('/static/imgs/index/kuaijie@2x.png');
|
||||
// background-repeat: repeat;
|
||||
// background-size: 100% 100%;
|
||||
padding: 0rpx 32rpx 0rpx 180rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.angelBG {
|
||||
// background-image: url(../../static/imgs/index/angel@2x.png);
|
||||
// background-repeat: repeat;
|
||||
// background-size: 100% 100%;
|
||||
height: 120rpx;
|
||||
// width: 362rpx;
|
||||
padding: 20rpx 0rpx 18rpx 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.searchbox {
|
||||
width: 450rpx;
|
||||
height: 64rpx;
|
||||
// background: #F2F2F2;
|
||||
border-radius: 100rpx;
|
||||
padding: 0 20rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.header-avatar {
|
||||
box-shadow: 0 2rpx 10rpx rgba(0,0,0,0.1);
|
||||
border: 2rpx solid #FFFFFF;
|
||||
}
|
||||
|
||||
.lang-btn {
|
||||
transition: all 0.3s;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0,0,0,0.05);
|
||||
&:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
}
|
||||
|
||||
.notice-container {
|
||||
margin: 0 30rpx;
|
||||
width: 690rpx;
|
||||
background: #EAF3FF;
|
||||
border-radius: 16rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.notice-left {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.notice-icon-left {
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.notice-right {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.notice-icon-right {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
.hot-coins-container {
|
||||
margin: 20rpx 30rpx;
|
||||
width: 690rpx;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.hot-coin-item {
|
||||
flex: 1;
|
||||
transition: all 0.3s;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.follow-section {
|
||||
margin: 0 30rpx;
|
||||
width: 690rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.follow-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 28rpx 0 12rpx;
|
||||
}
|
||||
|
||||
.follow-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 800;
|
||||
color: #111111;
|
||||
}
|
||||
|
||||
.follow-more {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
}
|
||||
|
||||
.follow-more-text {
|
||||
font-size: 22rpx;
|
||||
color: #A0A0A0;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.follow-more-arrow {
|
||||
font-size: 22rpx;
|
||||
color: #A0A0A0;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.follow-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 18rpx 0;
|
||||
}
|
||||
|
||||
.follow-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
flex: 1 1 45%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.follow-logo {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
flex: 0 0 52rpx;
|
||||
}
|
||||
|
||||
.follow-pair {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6rpx;
|
||||
}
|
||||
|
||||
.follow-pair-text {
|
||||
font-size: 28rpx;
|
||||
font-weight: 800;
|
||||
color: #111111;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.follow-sub {
|
||||
font-size: 20rpx;
|
||||
color: #B8B8B8;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.follow-mid {
|
||||
flex: 0 0 170rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
gap: 10rpx;
|
||||
}
|
||||
|
||||
.follow-price {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #111111;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.follow-hot {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
color: #F49B2A;
|
||||
}
|
||||
|
||||
.follow-hot-icon {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
|
||||
.follow-hot-num {
|
||||
font-size: 20rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.follow-right {
|
||||
flex: 0 0 150rpx;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.follow-percent {
|
||||
min-width: 132rpx;
|
||||
height: 54rpx;
|
||||
padding: 0 14rpx;
|
||||
border-radius: 10rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.follow-percent-down {
|
||||
background: #EA3943;
|
||||
}
|
||||
|
||||
.follow-percent-up {
|
||||
background: #16C784;
|
||||
}
|
||||
|
||||
.function-icon {
|
||||
transition: all 0.3s;
|
||||
&:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
}
|
||||
|
||||
.quick-buy-container {
|
||||
transition: all 0.3s;
|
||||
&:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
}
|
||||
|
||||
.quick-buy-btn {
|
||||
transition: all 0.3s;
|
||||
&:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
}
|
||||
|
||||
.ranking-list {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ranking-tabs {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.ranking-active {
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
transition: all 0.3s;
|
||||
&:active {
|
||||
background-color: rgba(0,0,0,0.02);
|
||||
}
|
||||
}
|
||||
|
||||
.coin-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.percent-btn {
|
||||
border-radius: 8rpx;
|
||||
transition: all 0.3s;
|
||||
box-shadow: 0 2rpx 5rpx rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.border-0165EE {
|
||||
border: 1rpx solid #0165EE;
|
||||
}
|
||||
|
||||
.curron {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.curroff {
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #70767A;
|
||||
}
|
||||
|
||||
.upbtn {
|
||||
width: 148rpx;
|
||||
height: 50rpx;
|
||||
background: #06C38D;
|
||||
border-radius: 8rpx;
|
||||
line-height: 50rpx;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.downbtn {
|
||||
width: 148rpx;
|
||||
height: 50rpx;
|
||||
background: #DC4B43;
|
||||
border-radius: 8rpx;
|
||||
line-height: 50rpx;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.swiper-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 隐藏轮播图指示器 */
|
||||
.swiper-container ::v-deep .u-swiper-indicator {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<myNav :title="i18n.Investors.investTitle"></myNav>
|
||||
|
||||
<view class="padding-30" v-html="content">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
content:'',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
},
|
||||
onLoad(e) {
|
||||
this.content = e.text
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page{
|
||||
background-color: #FFFFFF
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<myNav title="" background="rgba(255,255,255,0)" blackColor="#fff" :isRight="true" righturl="/static/imgs/index/touziRIght@2x.png" @Jump="router.push('/pages/index/investor/record')"></myNav>
|
||||
<image style="position: fixed;top: 0rpx;height: calc(100vh);z-index: 0;" class="width-100b" src="/static/imgs/index/touyziBG@2x.png" mode=""></image>
|
||||
|
||||
<view class="padding-w-30 relative">
|
||||
<p class="font-42 color-white nummedium-font">{{i18n.Investors.title}}</p>
|
||||
<view class="font-28 color-white margin-c-28 line-height-48">
|
||||
{{data.content_txt}}......<text @click="router.push('/pages/index/investor/details?text='+data.content)" class="">{{i18n.Investors.more}}<i class="cuIcon-right"></i></text>
|
||||
</view>
|
||||
|
||||
<view class="padding-w-20 padding-c-10 bj-white radiu-4 margin-c-28" style="box-shadow: 0px 3px 6px rgba(232, 232, 232, 0.16);">
|
||||
<view class="height-60 flex align-center justify-between">
|
||||
<text class="font-26 nummedium-font color-333333">{{i18n.Investors.totalSales}}:</text>
|
||||
<text class="font-32 numbold-font color-333333">{{data.all_num}} {{data.curr_name}}</text>
|
||||
</view>
|
||||
<view class="height-60 flex align-center justify-between">
|
||||
<text class="font-26 nummedium-font color-333333">{{data.jieduan}}:</text>
|
||||
<text class="font-32 numbold-font color-333333">{{data.count_num}} {{data.curr_name}}</text>
|
||||
</view>
|
||||
<view class="height-60 flex align-center justify-between">
|
||||
<text class="font-26 nummedium-font color-333333">{{i18n.Investors.lave}}:</text>
|
||||
<text class="font-32 numbold-font color-333333">{{data.real_num}} {{data.curr_name}}</text>
|
||||
</view>
|
||||
<view class="height-60 flex align-center justify-between">
|
||||
<text class="font-26 nummedium-font color-333333">{{i18n.Investors.price}}:</text>
|
||||
<text class="font-32 numbold-font color-333333">1 APT = {{data.price}} USDT</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-w-20 padding-c-10 bj-white radiu-4 margin-c-28" style="box-shadow: 0px 3px 6px rgba(232, 232, 232, 0.16);">
|
||||
<view class="height-60 flex align-center">
|
||||
<text class="font-26 weight-bold numbold-font color-333333">{{i18n.Investors.num}}</text>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-between font-30">
|
||||
<input class="color-333333 nummedium-font" type="number" v-model="touziNum" :placeholder="i18n.Investors.inputNum" placeholder-style="color:#8B99A2;"/>
|
||||
<text class="color-333333 nummedium-font">USDT</text>
|
||||
</view>
|
||||
<view class="height-60 flex align-center nummedium-font font-24">
|
||||
<text class="color-333333">
|
||||
{{i18n.Investors.zehe}}:
|
||||
</text>
|
||||
<text class="color-0165EE">
|
||||
{{allNum}} APT
|
||||
</text>
|
||||
</view>
|
||||
<view class="height-60 flex align-center">
|
||||
<text class="font-26 weight-bold numbold-font color-333333">{{i18n.Investors.pay_pwd}}</text>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-between font-30">
|
||||
<input class="color-333333 nummedium-font flex-1" type="text" password v-model="pay_pwd" :placeholder="i18n.Investors.inputPwd" placeholder-style="color:#8B99A2;"/>
|
||||
</view>
|
||||
</view>
|
||||
<view @click="touzi" v-if="data.status==1" class="canyuBtn nummedium-font">{{i18n.Investors.canyu}}</view>
|
||||
<view v-else class="canyuBtn_hui nummedium-font">{{i18n.Investors.canyu}}</view>
|
||||
|
||||
</view>
|
||||
<view class="height-40"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
data:'',
|
||||
|
||||
touziNum:'',
|
||||
pay_pwd:'',
|
||||
|
||||
flag:true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
allNum(){
|
||||
let temp = 0
|
||||
temp = this.touziNum / this.data.price
|
||||
return temp.toFixed(4)
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getInfo()
|
||||
},
|
||||
methods: {
|
||||
getInfo(){
|
||||
this.post('/angel/angel_content').then(res => {
|
||||
console.log('天使投资返回',res)
|
||||
if(res.code == 1){
|
||||
this.data = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
touzi(){
|
||||
if(!this.flag) return
|
||||
if(this.touziNum == ''){
|
||||
this.tos(this.i18n.Investors.inputNum)
|
||||
return
|
||||
}
|
||||
if(this.pay_pwd == ''){
|
||||
this.tos(this.i18n.Investors.inputPwd)
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
mask:true
|
||||
})
|
||||
this.flag = false
|
||||
this.post('/angel/angel_sub',{
|
||||
id:this.data.id,
|
||||
num:this.touziNum,
|
||||
pay_pwd:this.pay_pwd
|
||||
}).then(res => {
|
||||
console.log('天使投资参与',res)
|
||||
uni.hideLoading()
|
||||
this.flag = true
|
||||
if(res.code == 1){
|
||||
this.tos(res.msg)
|
||||
this.touziNum = ''
|
||||
this.pay_pwd = ''
|
||||
setTimeout(()=>{
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/investor/record'
|
||||
})
|
||||
},500)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page{
|
||||
background-color: #398CFF;
|
||||
}
|
||||
.canyuBtn{
|
||||
width: 600rpx;
|
||||
height: 86rpx;
|
||||
margin: 30rpx auto;
|
||||
background: #FFFFFF;
|
||||
color: #0165EE;
|
||||
text-align: center;
|
||||
line-height: 86rpx;
|
||||
font-size: 32rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.canyuBtn_hui{
|
||||
width: 600rpx;
|
||||
height: 86rpx;
|
||||
margin: 30rpx auto;
|
||||
background: #999;
|
||||
color: #ddd;
|
||||
text-align: center;
|
||||
line-height: 86rpx;
|
||||
font-size: 32rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,116 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<z-paging :language="$i18n.locale" ref="paging" v-model="list" @query="queryList" :pageSize="20">
|
||||
<!-- 下拉刷新 -->
|
||||
<custom-refresher slot="refresher" slot-scope="{refresherStatus}" :status="refresherStatus">
|
||||
</custom-refresher>
|
||||
|
||||
<!-- 头部 -->
|
||||
<myNav slot="top" :title="i18n.Investors.recordTitle"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view>
|
||||
<view class="height-140 bj-white flex align-center justify-between">
|
||||
<view class="flex-1 height-90 flex direction-column align-center justify-between">
|
||||
<text class="font-24 color-C3C3C3 nummedium-font">{{i18n.Investors.total_investment}} APT</text>
|
||||
<text class="font-36 numbold-font color-333333">{{count_num}}</text>
|
||||
</view>
|
||||
<view class="geduan"></view>
|
||||
<view class="flex-1 height-90 flex direction-column align-center justify-between">
|
||||
<text class="font-24 color-C3C3C3 nummedium-font">{{i18n.Investors.total_revenue}}</text>
|
||||
<text class="font-36 numbold-font color-333333">{{count_sy}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view @click="goDetails(item.id)" class="listBox" v-for="(item,index) in list" :key="index">
|
||||
<view class="flex-1 height-100b flex direction-column align-start justify-between">
|
||||
<text class="font-24 color-C3C3C3 nummedium-font">{{i18n.Investors.invest_num}}</text>
|
||||
<text class="font-26 numbold-font color-333333">{{item.num}} APT</text>
|
||||
</view>
|
||||
<view class="flex-1 height-100b flex direction-column align-center justify-between">
|
||||
<text class="font-24 color-C3C3C3 nummedium-font">{{i18n.Investors.invest_price}}</text>
|
||||
<text class="font-26 numbold-font color-333333">{{item.price}} USDT</text>
|
||||
</view>
|
||||
<view class="flex-1 height-100b flex direction-column align-end justify-between">
|
||||
<text class="font-24 color-C3C3C3 nummedium-font">{{i18n.Investors.invest_time}}</text>
|
||||
<text class="font-26 numbold-font color-C3C3C3">{{item.addtime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
count_num: 0,
|
||||
count_sy: 0,
|
||||
list: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
},
|
||||
// onPullDownRefresh() {
|
||||
// console.log('refresh');
|
||||
// this.list = []
|
||||
// this.count_num = 0
|
||||
// this.count_sy = 0
|
||||
// this.getList()
|
||||
// setTimeout(function() {
|
||||
// uni.stopPullDownRefresh();
|
||||
// }, 1000);
|
||||
// },
|
||||
onShow() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
queryList(pageNo, pageSize) {
|
||||
setTimeout(() => {
|
||||
this.post('/angel/angel_user', {
|
||||
page: pageNo,
|
||||
page_num: pageSize
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.count_num = res.data.count_num
|
||||
this.count_sy = res.data.count_sy
|
||||
this.$refs.paging.complete(res.data.list);
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
},
|
||||
goDetails(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/investor/record_details?id=' + id
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.geduan {
|
||||
width: 2rpx;
|
||||
height: 61rpx;
|
||||
background-color: #707070;
|
||||
opacity: 0.17;
|
||||
}
|
||||
|
||||
.listBox {
|
||||
width: 690rpx;
|
||||
height: 117rpx;
|
||||
margin: 30rpx auto;
|
||||
padding: 18rpx 22rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 4rpx 10rpx rgba(205, 206, 219, 0.3);
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,143 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<z-paging :language="$i18n.locale" ref="paging" v-model="list" @query="queryList" :pageSize="20">
|
||||
<!-- 下拉刷新 -->
|
||||
<custom-refresher slot="refresher" slot-scope="{refresherStatus}" :status="refresherStatus">
|
||||
</custom-refresher>
|
||||
|
||||
<!-- 头部 -->
|
||||
<myNav slot="top" :title="i18n.Investors.invest_title"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view>
|
||||
<view class="topBox">
|
||||
<view class="height-142 flex align-center justify-between">
|
||||
<view class="flex-1 height-90 flex direction-column align-center justify-between">
|
||||
<text class="font-24 color-F6F8FB nummedium-font" style="opacity: 0.8;">{{i18n.Investors.leiji_all}}</text>
|
||||
<text class="font-36 numbold-font color-white">{{count_all}}</text>
|
||||
</view>
|
||||
<view class="flex-1 height-90 flex direction-column align-center justify-between">
|
||||
<text class="font-24 color-F6F8FB nummedium-font" style="opacity: 0.8;">{{i18n.Investors.leiji_day}}</text>
|
||||
<text class="font-36 numbold-font color-white">{{day}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="geduan"></view>
|
||||
<view class="height-164 flex align-center justify-between">
|
||||
<view class="flex-1 height-100 flex direction-column align-center justify-between">
|
||||
<text class="font-24 color-F6F8FB nummedium-font" style="opacity: 0.8;">{{i18n.Investors.leiji_lixi}}</text>
|
||||
<text class="font-36 numbold-font color-white">{{count_lixi}}</text>
|
||||
</view>
|
||||
<view class="flex-1 height-100 flex direction-column align-center justify-between">
|
||||
<text class="font-24 color-F6F8FB nummedium-font" style="opacity: 0.8;">{{i18n.Investors.leiji_bj}}</text>
|
||||
<text class="font-36 numbold-font color-white">{{count_bj}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="listBox" v-for="(item,index) in list" :key="index">
|
||||
<view class="height-117 padding-w-10 flex align-center justify-between">
|
||||
<view class="flex-1 height-80 flex direction-column align-start justify-between">
|
||||
<text class="font-24 color-C3C3C3 nummedium-font">{{i18n.Investors.leiji_time}}</text>
|
||||
<text class="font-28 nummedium-font color-C3C3C3">{{item.addtime}}</text>
|
||||
</view>
|
||||
<view class="flex-1 height-80 flex direction-column align-end justify-between">
|
||||
<text class="font-24 color-C3C3C3 nummedium-font" style="opacity: 0.8;">{{item.type==1?i18n.Investors.freed_lixi:i18n.Investors.freed_bj}}</text>
|
||||
<text class="font-34 numbold-font color-333333">+{{item.num}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
count_lixi:0,
|
||||
count_all:0,
|
||||
count_bj:0,
|
||||
day:0,
|
||||
|
||||
list:[],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
},
|
||||
// onPullDownRefresh() {
|
||||
// console.log('refresh');
|
||||
// this.list = []
|
||||
// this.page = 1
|
||||
// this.state = 'more'
|
||||
// this.getInfo()
|
||||
// this.getList()
|
||||
// setTimeout(function () {
|
||||
// uni.stopPullDownRefresh();
|
||||
// }, 1000);
|
||||
// },
|
||||
// onReachBottom:function(){
|
||||
// this.page++
|
||||
// this.getList()
|
||||
// },
|
||||
onLoad(e) {
|
||||
this.id = e.id
|
||||
this.getInfo()
|
||||
},
|
||||
methods: {
|
||||
getInfo(){
|
||||
this.post('/angel/angel_detail_head',{
|
||||
id:this.id
|
||||
}).then(res => {
|
||||
console.log('释放记录头部',res)
|
||||
if(res.code == 1){
|
||||
this.count_lixi = res.data.count_lixi
|
||||
this.count_all = res.data.count_all
|
||||
this.count_bj = res.data.count_bj
|
||||
this.day = res.data.day
|
||||
}
|
||||
})
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
setTimeout(()=>{
|
||||
this.post('/angel/angel_detail_log', {
|
||||
page: pageNo,
|
||||
page_num: pageSize,
|
||||
id:this.id
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
},500)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.topBox{
|
||||
width: 690rpx;
|
||||
// height: 306rpx;
|
||||
margin: 20rpx auto;
|
||||
border-radius: 8rpx;
|
||||
background: linear-gradient(117deg, #066FFF 0%, #72AEFF 100%);
|
||||
}
|
||||
.geduan{
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-color: #FFFFFF;
|
||||
opacity: 0.42;
|
||||
}
|
||||
.listBox{
|
||||
width: 100%;
|
||||
padding: 0 30rpx;
|
||||
// height: 234rpx;
|
||||
background: #FFFFFF;
|
||||
margin: 16rpx auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,202 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<!-- 头部 -->
|
||||
<view class="width-750 relative flex align-center justify-center bj-8EBEFF"
|
||||
:style="{height: `calc(${statusBar}px + 110rpx)`}">
|
||||
<view class="width-750 fixed1"
|
||||
:style="{paddingTop: statusBar + 'px', height: `calc(${statusBar}px + 110rpx)`}">
|
||||
<view class="width-750 height-110 padding-w-30 bgimg1 flex align-center justify-center">
|
||||
<view @click="_goback" class="cuIcon-back font-40 color-white"
|
||||
style="position: absolute;left: 30rpx;"></view>
|
||||
<text class="font-36 color-white weight-bold">{{i18n.lockUp.title1}}</text>
|
||||
<image @click="router.push('/pages/index/lockUpRecord')" class="width-54 height-54 absolute"
|
||||
style="right: 30rpx;" src="/static/imgs/index/jilu@2x.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750">
|
||||
<view class="headbox">
|
||||
<view class="inputbox" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="height-192">
|
||||
<view class="height-96 flex align-center">
|
||||
<text class="font-28 weight-bold">{{i18n.lockUp.text1}}</text>
|
||||
</view>
|
||||
<view class="height-96 flex align-center">
|
||||
<input class="flex-1 padding-r-30 font-28 nummedium-font" type="number"
|
||||
v-model="number" :placeholder="i18n.lockUp.tos1" />
|
||||
<text class="font-28 nummedium-font">APT</text>
|
||||
</view>
|
||||
</view>
|
||||
<view @click="show=true" class="height-96 flex align-center justify-between">
|
||||
<text class="font-28 weight-bold">{{i18n.lockUp.text2}}</text>
|
||||
<view class="flex align-center">
|
||||
<text class="font-28 weight-bold">{{zhouqi==''?i18n.lockUp.text3:zhouqi.day+i18n.lockUp.text4}}</text>
|
||||
<u-icon name="arrow-right" size="24"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-76 flex align-center">
|
||||
<text class="font-26 margin-r-20">{{i18n.lockUp.text5}}</text>
|
||||
<text class="font-26 color-0165EE nummedium-font">{{zhouqi==''?'0':zhouqi.yield}}%</text>
|
||||
</view>
|
||||
<view class="height-192">
|
||||
<view class="height-96 flex align-center">
|
||||
<text class="font-28 weight-bold">{{i18n.lockUp.text6}}</text>
|
||||
</view>
|
||||
<view class="height-96 flex align-center">
|
||||
<input class="flex-1 font-28 nummedium-font" type="number" v-model="paypwd"
|
||||
:placeholder="i18n.lockUp.tos3" password />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-500"></view>
|
||||
<view @click="getzhiya_sub" class="tijiao">{{i18n.lockUp.text7}}</view>
|
||||
<view v-html="text" class="padding-w-30 margin-t-200">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 锁仓周期弹窗 -->
|
||||
<u-popup v-model="show" mode="bottom" border-radius="20">
|
||||
<view class="padding-b-80 padding-w-30"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="height-110 flex align-center justify-center">
|
||||
<text class="font-30 weight-bold">{{i18n.lockUp.text2}}</text>
|
||||
<view @click.stop="show=false" style="position: absolute;right: 30rpx;"
|
||||
class="font-26 color-C3C3C3">
|
||||
{{i18n.lockUp.text8}}</view>
|
||||
</view>
|
||||
<view class="height-400">
|
||||
<scroll-view class="height-400" scroll-y="true">
|
||||
<view @click="setzhouqi(item)" v-for="(item,index) in list"
|
||||
:style="'background-color: '+theme.fu_bg"
|
||||
class="height-72 margin-b-16 flex align-center padding-w-30 radiu-10">
|
||||
<text class="font-28">{{item.day}}{{i18n.lockUp.text4}}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
show: false,
|
||||
number: '',
|
||||
paypwd: '',
|
||||
list: [],
|
||||
text: '',
|
||||
zhouqi: '',
|
||||
flag: true,
|
||||
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.getzhiya_con()
|
||||
},
|
||||
methods: {
|
||||
// 提交
|
||||
getzhiya_sub() {
|
||||
if (this.number == '') return this.tos(this.i18n.lockUp.tos1)
|
||||
if (this.zhouqi == '') return this.tos(this.i18n.lockUp.tos2)
|
||||
if (this.paypwd == '') return this.tos(this.i18n.lockUp.tos3)
|
||||
if (!this.flag) {
|
||||
return
|
||||
} else {
|
||||
this.flag = false
|
||||
let obj = {
|
||||
id: this.zhouqi.id,
|
||||
num: this.number,
|
||||
pay_pwd: this.paypwd,
|
||||
}
|
||||
this.post('/index/zhiya_sub', obj, true).then(res => {
|
||||
console.log(res)
|
||||
this.flag = true
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.number = ''
|
||||
this.zhouqi = ''
|
||||
this.paypwd = ''
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/lockUpRecord'
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 选择周期
|
||||
setzhouqi(item) {
|
||||
this.zhouqi = item
|
||||
this.show = false
|
||||
},
|
||||
// 获取锁仓返回
|
||||
getzhiya_con() {
|
||||
this.post('/index/zhiya_con', {}, true).then(res => {
|
||||
console.log('锁仓返回', res)
|
||||
if (res.code == 1) {
|
||||
this.list = res.data.cycle
|
||||
this.text = res.data.zhiya_text
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fixed1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
background: #0165EE;
|
||||
}
|
||||
|
||||
.headbox {
|
||||
width: 750rpx;
|
||||
height: 506rpx;
|
||||
background: #0165EE;
|
||||
border-radius: 0rpx 0rpx 120rpx 120rpx;
|
||||
padding-top: 206rpx;
|
||||
}
|
||||
|
||||
.inputbox {
|
||||
width: 690rpx;
|
||||
height: 636rpx;
|
||||
// background: #FFFFFF;
|
||||
border-radius: 20rpx;
|
||||
margin: 0 auto;
|
||||
padding: 0 16rpx;
|
||||
}
|
||||
|
||||
.tijiao {
|
||||
width: 600rpx;
|
||||
height: 86rpx;
|
||||
background: #0165EE;
|
||||
border-radius: 20rpx;
|
||||
font-size: 30rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 96rpx;
|
||||
text-align: center;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<view>
|
||||
<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.lockUp.title3"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view slot="top" class="height-144 flex align-center bj-0165EE margin-b-24">
|
||||
<view class="flex-1 height-144 flex direction-column padding-c-25 align-center justify-between">
|
||||
<text class="font-24 color-F6F8FB">{{i18n.lockUp.text11}}</text>
|
||||
<text class="font-32 color-white numbold-font">{{data.profit_num}}</text>
|
||||
</view>
|
||||
<view class="width-2 height-64" style="background: rgba(255,255,255,0.42);"></view>
|
||||
<view class="flex-1 height-144 flex direction-column padding-c-25 align-center justify-between">
|
||||
<text class="font-24 color-F6F8FB">{{i18n.lockUp.text12}}</text>
|
||||
<text class="font-32 color-white numbold-font">{{data.last_day}}{{i18n.lockUp.text4}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-750 padding-b-40">
|
||||
<!-- 单一列表 -->
|
||||
<view v-for="(item,index) in list"
|
||||
class="height-126 padding-c-20 padding-w-30 flex direction-column justify-between margin-b-8">
|
||||
<view class="flex align-center justify-between font-24 color-C3C3C3">
|
||||
<text>{{i18n.lockUp.text13}}</text>
|
||||
<text>{{i18n.lockUp.text14}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between">
|
||||
<text class="font-28 color-C3C3C3 nummedium-font">{{item.addtime}}</text>
|
||||
<text class="font-32 numbold-font">+{{item.num}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
id: '',
|
||||
data: '',
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.id = e.id
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDetails() {
|
||||
this.post('/index/zhiya_shif_con', {
|
||||
id: this.id
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.data = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
this.getDetails()
|
||||
setTimeout(() => {
|
||||
this.post('/index/zhiya_shif_log', {
|
||||
page: pageNo,
|
||||
page_num: pageSize,
|
||||
id: this.id
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
@@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<view>
|
||||
<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.lockUp.title2"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-t-24 padding-w-30 padding-b-40">
|
||||
<!-- 单一列表 -->
|
||||
<view @click="router.push('/pages/index/lockUpDetails?id='+item.id)" v-for="(item,index) in list"
|
||||
class="listbox"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="flex-1 height-100b flex direction-column justify-between">
|
||||
<text class="font-24 color-C3C3C3">{{i18n.lockUp.text9}}</text>
|
||||
<text class="font-26 numbold-font">{{item.num}} APT</text>
|
||||
</view>
|
||||
<view class="flex-1 height-100b flex direction-column align-center justify-between">
|
||||
<text class="font-24 color-C3C3C3">{{i18n.lockUp.text2}}</text>
|
||||
<text class="font-26 weight-bold">{{item.day}}{{i18n.lockUp.text4}}</text>
|
||||
</view>
|
||||
<view class="flex-1 height-100b flex direction-column align-end justify-between">
|
||||
<text class="font-24 color-C3C3C3">{{i18n.lockUp.text10}}</text>
|
||||
<text class="font-26 numbold-font">{{item.add_time}}</text>
|
||||
</view>
|
||||
</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) {
|
||||
setTimeout(() => {
|
||||
this.post('/index/zhiya_list', {
|
||||
page: pageNo,
|
||||
page_num: pageSize
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.listbox {
|
||||
width: 690rpx;
|
||||
height: 117rpx;
|
||||
// background: #FFFFFF;
|
||||
box-shadow: 0rpx 4rpx 4rpx rgba(205, 206, 219, 0.2);
|
||||
border-radius: 20rpx;
|
||||
padding: 22rpx;
|
||||
display: flex;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,295 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="i18n.newWord.serve" :isGoback="false" @isNoback="isNoback" :isRightext="ifBinaji" rightextColor="#3ECEB2"
|
||||
:rightText="i18n.newWord.finish" @Jump="complete"></myNav>
|
||||
<view class="">
|
||||
<view class="padding-w-30">
|
||||
<view class="height-50 flex align-center">
|
||||
<text v-if="ifBinaji==false" class="font-26 nummedium-font">{{i18n.newWord.title1}}</text>
|
||||
<text v-else class="font-26 nummedium-font">{{i18n.newWord.title2}} {{7 - hot_cate.length}} {{i18n.newWord.title3}}</text>
|
||||
</view>
|
||||
|
||||
<view v-if="ifBinaji==false" class="height-100 flex align-center justify-between">
|
||||
<view class="height-100 flex align-center">
|
||||
<view class="width-44 height-44 margin-r-17" v-for="(item,index) in hot_cate" :key="item.id">
|
||||
<!-- <image class="width-44 height-44" :src="item.logo_image" mode=""></image> -->
|
||||
<image v-if="theme.theme=='light'" class="width-44 height-44" :src="item.logo_image" mode=""></image>
|
||||
<image v-else class="width-44 height-44" :src="item.logo2_image" mode=""></image>
|
||||
</view>
|
||||
<view class="width-44 height-44 margin-r-17" v-for="(item,index) in my_cate" :key="item.id">
|
||||
<!-- <image class="width-44 height-44" :src="item.logo_image" mode=""></image> -->
|
||||
<image v-if="theme.theme=='light'" class="width-44 height-44" :src="item.logo_image" mode=""></image>
|
||||
<image v-else class="width-44 height-44" :src="item.logo2_image" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<image @click="ifBinaji=true,my_cate_copy=my_cate" class="width-52 height-52"
|
||||
src="/static/imgs/index/bianji@2x.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="ifBinaji==true" class="padding-c-18 flex align-center flex-wrap">
|
||||
<view v-for="(item,index) in hot_cate" :key="item.id" style="width: 25%;"
|
||||
class="height-120 flex direction-column align-center justify-center">
|
||||
<!-- <image class="width-44 height-44" :src="item.logo_image" mode=""></image> -->
|
||||
<image v-if="theme.theme=='light'" class="width-44 height-44" :src="item.logo_image" mode=""></image>
|
||||
<image v-else class="width-44 height-44" :src="item.logo2_image" mode=""></image>
|
||||
<text class="font-24 margin-t-10">{{item.name}}</text>
|
||||
</view>
|
||||
<view v-for="(item,index) in my_cate_copy" :key="item.id" style="width: 25%;"
|
||||
class="height-120 flex direction-column align-center justify-center relative">
|
||||
<!-- <image class="width-44 height-44" :src="item.logo_image" mode=""></image> -->
|
||||
<image v-if="theme.theme=='light'" class="width-44 height-44" :src="item.logo_image" mode=""></image>
|
||||
<image v-else class="width-44 height-44" :src="item.logo2_image" mode=""></image>
|
||||
<text class="font-24 margin-t-10">{{item.name}}</text>
|
||||
<image @click="reduce(item,index)" class="width-28 height-28 absolute"
|
||||
style="top: 0rpx;right: 20rpx;" src="/static/imgs/index/jianshao@2x.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 隔断 -->
|
||||
<view class="height-16"></view>
|
||||
|
||||
<view class="">
|
||||
<view class="height-90">
|
||||
<swiper class="swiper padding-w-10">
|
||||
<swiper-item>
|
||||
<scroll-view scroll-x class="nav" scroll-with-animation :scroll-left="scrollLeft">
|
||||
<view class="cu-item" :class="index==TabCur?'text-green cur':''" v-for="(item,index) in all_cata"
|
||||
:key="index" @tap="tabSelect" :data-id="index" :data-name="'id'+item.id">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
<scroll-view @scroll="scroll" :scroll-into-view="scrollID" scroll-y="true" scroll-with-animation
|
||||
:class="ifBinaji?'scroll-view-high':'scroll-view'">
|
||||
<view :id="'id'+item.id" class="width-750 margin-b-10" v-for="(item,index) in all_cata"
|
||||
:key="item.id">
|
||||
<view class="height-60 flex align-center padding-w-30">
|
||||
<text class="font-26 medium-font">{{item.name}}</text>
|
||||
</view>
|
||||
<view class="flex width-750 flex-wrap padding-t-18">
|
||||
<view @click="add(itm)" v-for="(itm,idx) in item.son" :key="itm.id" style="width: 25%;"
|
||||
:style="ifBinaji==true&&itm.is_hot==1?'opacity: 0.5;':''"
|
||||
class="height-120 flex direction-column align-center justify-center relative margin-b-10">
|
||||
<!-- <image class="width-44 height-44" :src="itm.logo_image" mode=""></image> -->
|
||||
<image v-if="theme.theme=='light'" class="width-44 height-44" :src="itm.logo_image" mode=""></image>
|
||||
<image v-else class="width-44 height-44" :src="itm.logo2_image" mode=""></image>
|
||||
<text class="font-24 margin-t-10">{{itm.name}}</text>
|
||||
<image v-if="ifBinaji==true" class="width-28 height-28 absolute"
|
||||
style="top: 0rpx;right: 20rpx;" src="/static/imgs/index/zengjia@2x.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<u-popup style="z-index: 5000;" :mask-close-able="false" border-radius="30" mode="center" v-model="qcShow"
|
||||
@click.stop="">
|
||||
<view class="width-600" :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="width-100b height-220 padding-w-30 padding-c-30 flex direction-column align-center justify-between">
|
||||
<image class="width-92 height-92" src="/static/imgs/index/tishi@2x.png" mode=""></image>
|
||||
<view class="font-26 weight-bold text-center padding-w-20">
|
||||
{{i18n.newWord.tips1}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-100b height-90 flex align-center justify-between">
|
||||
<view @click="router.goBack()" class="qcbtn1">{{i18n.newWord.tips2}}</view>
|
||||
<view class="qcbtn2" @click.stop="complete">{{i18n.newWord.tips3}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ifBinaji: false,
|
||||
TabCur: 0,
|
||||
scrollLeft: 0,
|
||||
|
||||
ifaddOrjian: false,
|
||||
hot_cate: [],
|
||||
my_cate: [],
|
||||
all_cata: [],
|
||||
scrollID: '',
|
||||
my_cate_copy: [],
|
||||
|
||||
qcShow: false,
|
||||
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.getopenList()
|
||||
},
|
||||
methods: {
|
||||
tabSelect(e) {
|
||||
// console.log(e);
|
||||
this.TabCur = e.currentTarget.dataset.id;
|
||||
this.scrollID = e.currentTarget.dataset.name
|
||||
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
|
||||
},
|
||||
// 减少
|
||||
reduce(item, index) {
|
||||
this.my_cate_copy.splice(index, 1)
|
||||
let subid = item.cate_id
|
||||
this.all_cata.forEach(obj => {
|
||||
if (obj.id == subid) {
|
||||
obj.son.forEach(objs => {
|
||||
if (objs.id == item.id) {
|
||||
objs.is_hot = 0
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.ifaddOrjian = true
|
||||
},
|
||||
// 增加
|
||||
add(itm) {
|
||||
if (this.ifBinaji == true) {
|
||||
if (itm.is_hot == 1) return
|
||||
let arr = [...this.hot_cate, ...this.my_cate_copy]
|
||||
if (arr.length >= 7) return
|
||||
const result = arr.find(item => item.id === itm.id)
|
||||
console.log(result);
|
||||
if (result == undefined) {
|
||||
itm.is_hot = 1
|
||||
this.my_cate_copy.push(itm)
|
||||
this.ifaddOrjian = true
|
||||
}
|
||||
} else {
|
||||
if (itm.open_status == 1) {
|
||||
if (itm.type == 1) {
|
||||
console.log(itm.url);
|
||||
if(itm.types==1){
|
||||
uni.navigateTo({
|
||||
url: itm.url
|
||||
})
|
||||
}else{
|
||||
uni.switchTab({
|
||||
url: itm.url
|
||||
})
|
||||
}
|
||||
} else {
|
||||
// #ifdef APP-PLUS
|
||||
plus.runtime.openURL(itm.url)
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
window.location.replace(itm.url)
|
||||
// #endif
|
||||
}
|
||||
} else if (itm.open_status == 2) {
|
||||
this.tos(this.i18n.newWord.toOpen)
|
||||
} else {
|
||||
this.tos(this.i18n.newWord.no)
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
getopenList() {
|
||||
this.post('/index/cate_list').then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.hot_cate = res.data.hot_cate
|
||||
this.my_cate = res.data.my_cate
|
||||
this.ma_cate_copy = res.data.my_cate
|
||||
this.all_cata = res.data.all_cata
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 完成编辑
|
||||
complete() {
|
||||
if(this.ifaddOrjian){
|
||||
let ids = []
|
||||
this.my_cate_copy.forEach(item => {
|
||||
ids.push(item.id)
|
||||
})
|
||||
this.post('/index/set_mydapp', {
|
||||
ids: ids.join(',')
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.getopenList()
|
||||
this.ifBinaji = false
|
||||
this.ifaddOrjian = false
|
||||
this.qcShow = false
|
||||
}
|
||||
})
|
||||
console.log(ids);
|
||||
}else{
|
||||
this.ifBinaji = false
|
||||
this.ifaddOrjian = false
|
||||
}
|
||||
},
|
||||
// 返回逻辑判断
|
||||
isNoback() {
|
||||
if (this.ifaddOrjian) {
|
||||
this.qcShow = true
|
||||
} else {
|
||||
if (this.ifBinaji) {
|
||||
this.ifBinaji = false
|
||||
} else {
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
},
|
||||
scroll(e){
|
||||
// console.log(e.target.scrollTop);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.scroll-view {
|
||||
height: calc(100vh - 55px - var(--status-bar-height) - 150rpx - 16rpx - 90rpx);
|
||||
width: 750rpx;
|
||||
}
|
||||
|
||||
.scroll-view-high {
|
||||
height: calc(100vh - 55px - var(--status-bar-height) - 326rpx - 16rpx - 90rpx);
|
||||
}
|
||||
|
||||
.qcbtn1 {
|
||||
width: 320rpx;
|
||||
height: 86rpx;
|
||||
background: rgba(160, 171, 181, 0.1);
|
||||
border-radius: 0rpx 0rpx 0rpx 30rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #8B99A2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.qcbtn2 {
|
||||
width: 320rpx;
|
||||
height: 90rpx;
|
||||
background: linear-gradient(180deg, #52F3C9 0%, #3ECEB2 100%);
|
||||
border-radius: 0rpx 0rpx 30rpx 0rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<view>
|
||||
<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.notice.title1"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-b-40">
|
||||
<view @click="router.push('/pages/index/noticeDetails?id='+item.id)" v-for="(item,index) in list"
|
||||
class="padding-w-30 padding-c-24">
|
||||
<view class="height-72 flex align-center justify-between">
|
||||
<view class="flex align-center flex-1">
|
||||
<image class="width-72 height-72" src="/static/imgs/index/xitong@2x.png" mode=""></image>
|
||||
<text class="flex-1 font-28 margin-l-22">{{item.title}}</text>
|
||||
</view>
|
||||
<text class="font-24 color-C3C3C3">{{item.createtime}}</text>
|
||||
</view>
|
||||
<view class="margin-t-30 font-26">
|
||||
<text class="hidden-nowrap-ellipsis-2">{{item.content}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
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) {
|
||||
setTimeout(() => {
|
||||
this.post('/index/message_list', {
|
||||
page: pageNo,
|
||||
page_num: pageSize
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="i18n.notice.title2"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-w-30 padding-t-36 padding-b-40">
|
||||
<view class="font-28 weight-bold">{{data.title}}</view>
|
||||
<view class="font-24 color-C3C3C3 nummedium-font margin-t-5">{{data.createtime}}</view>
|
||||
<view class="margin-t-16" v-html="data.content"></view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
id: '',
|
||||
data:'',
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.id = e.id
|
||||
this.getDetails()
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDetails() {
|
||||
this.post('/index/message_con', {
|
||||
id: this.id
|
||||
}).then(res => {
|
||||
console.log('公告详情', res)
|
||||
if (res.code == 1) {
|
||||
this.data = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
@@ -0,0 +1,459 @@
|
||||
<template>
|
||||
<view>
|
||||
<z-paging ref="paging" refresher-only @onRefresh="onRefresh"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<myNav slot="top" :title="i18n.orderDetails.title"></myNav>
|
||||
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-w-30 padding-t-24 padding-b-100">
|
||||
<!-- 倒计时 -->
|
||||
<view v-if="data.status==1||data.status==2"
|
||||
class="height-112 padding-c-12 flex align-center justify-between">
|
||||
<view class="height-100b flex direction-column justify-between">
|
||||
<text v-if="data.status==1"
|
||||
class="font-28 weight-bold">{{i18n.orderDetails.text1}}</text>
|
||||
<text v-if="data.status==2"
|
||||
class="font-28 weight-bold">{{i18n.orderDetails.text2}}</text>
|
||||
<view class="flex align-center">
|
||||
<text v-if="data.status==1" class="font-26 color-C3C3C3">{{i18n.orderDetails.text3}}:</text>
|
||||
<text v-if="data.status==2" class="font-26 color-C3C3C3">{{i18n.orderDetails.text4}}:</text>
|
||||
<u-count-down @end="getDetails()" ref="uCountDown" :autoplay="true" :timestamp="timestamp"
|
||||
color="#0165EE">
|
||||
</u-count-down>
|
||||
</view>
|
||||
</view>
|
||||
<image class="width-60 height-60" src="/static/imgs/index/daojishi@2x.png" mode=""></image>
|
||||
</view>
|
||||
|
||||
<!-- 订单信息 -->
|
||||
<view class="box" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="flex align-center justify-between margin-b-25">
|
||||
<text class="font-28 weight-bold">{{i18n.orderDetails.text5}}</text>
|
||||
<text class="font-28 color-0165EE weight-bold">{{statusText[data.status]}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between margin-b-10">
|
||||
<text class="font-26 color-C3C3C3">{{i18n.orderDetails.text6}}</text>
|
||||
<text class="font-26 color-C3C3C3 nummedium-font">{{data.order_num}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between margin-b-10">
|
||||
<text class="font-26 color-C3C3C3">{{i18n.orderDetails.text7}}</text>
|
||||
<text class="font-26 color-C3C3C3 nummedium-font">{{data.symbol}} {{data.price}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between margin-b-10">
|
||||
<text class="font-26 color-C3C3C3">{{i18n.orderDetails.text8}}({{data.curr_name}})</text>
|
||||
<text class="font-26 color-C3C3C3 nummedium-font">{{data.num}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between margin-b-10">
|
||||
<text class="font-26 color-C3C3C3">{{i18n.orderDetails.text9}}</text>
|
||||
<text class="font-26 color-C3C3C3 nummedium-font">{{data.symbol}} {{data.count_price}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between margin-b-10">
|
||||
<text class="font-26 color-C3C3C3">{{i18n.orderDetails.text10}}</text>
|
||||
<text class="font-26 color-C3C3C3 nummedium-font">{{data.add_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 用户信息 -->
|
||||
<view class="box" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="flex align-center justify-between margin-b-25">
|
||||
<text class="font-28 weight-bold">
|
||||
{{data.type==1?i18n.orderDetails.text11:i18n.orderDetails.text12}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between margin-b-10">
|
||||
<text class="font-26 color-C3C3C3">{{i18n.orderDetails.text13}}</text>
|
||||
<text class="font-26 color-C3C3C3 nummedium-font">{{data.nickname}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between margin-b-10">
|
||||
<text class="font-26 color-C3C3C3">{{i18n.orderDetails.text14}}</text>
|
||||
<text class="font-26 color-C3C3C3 nummedium-font">{{data.name}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between margin-b-10">
|
||||
<text class="font-26 color-C3C3C3">{{i18n.orderDetails.text15}}</text>
|
||||
<view class="flex align-center">
|
||||
<text class="font-26 color-C3C3C3 nummedium-font">{{data.mobile}}</text>
|
||||
<text @click="callup(data.mobile)"
|
||||
class="font-26 color-0165EE margin-l-22">{{i18n.orderDetails.text16}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 银行卡信息 -->
|
||||
<view v-if="data" class="box" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="flex align-center justify-between margin-b-25">
|
||||
<text class="font-28 weight-bold">{{i18n.orderDetails.text17}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between margin-b-10">
|
||||
<text class="font-26 color-C3C3C3">{{i18n.orderDetails.text18}}</text>
|
||||
<text class="font-26 color-C3C3C3 nummedium-font">{{data.collection.card_num}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between margin-b-10">
|
||||
<text class="font-26 color-C3C3C3">{{i18n.orderDetails.text14}}</text>
|
||||
<text class="font-26 color-C3C3C3 nummedium-font">{{data.collection.username}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between margin-b-10">
|
||||
<text class="font-26 color-C3C3C3">{{i18n.orderDetails.text19}}</text>
|
||||
<view class="flex align-center">
|
||||
<text
|
||||
class="font-26 color-C3C3C3 nummedium-font">{{data.collection.bank_name+data.collection.bank_deposit}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 支付凭证 -->
|
||||
<view v-if="data.status==1&&data.type==1" class="box" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="flex align-center justify-between margin-b-25">
|
||||
<text class="font-28 weight-bold">{{i18n.orderDetails.text20}}</text>
|
||||
</view>
|
||||
<view @click="chooseImage"
|
||||
:style="'background-color: '+theme.bg"
|
||||
class="width-176 height-176 radiu-20 flex align-center justify-center">
|
||||
<!-- <image v-if="img==''||img==null" class="width-104 height-101"
|
||||
src="/static/imgs/index/upload@2x.png"></image> -->
|
||||
<u-icon v-if="img==''||img==null" name="plus-circle" color="#8B99A2" size="80"></u-icon>
|
||||
<image v-else class="width-176 height-176 radiu-20" :src="img" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="data.status!=1&&data.status!=5" class="box" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="flex align-center justify-between margin-b-25">
|
||||
<text class="font-28 weight-bold">{{i18n.orderDetails.text20}}</text>
|
||||
</view>
|
||||
<view class="width-176 height-176 radiu-20 flex align-center justify-center">
|
||||
<image @click="yulanImg(voimg,1)" class="width-176 height-176 radiu-20" :src="voimg" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 申诉内容 -->
|
||||
<view v-if="data.appeal_arr" class="box" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="flex align-center justify-between margin-b-25">
|
||||
<text class="font-28 weight-bold">{{i18n.orderDetails.text21}}</text>
|
||||
</view>
|
||||
<view class="font-32 color-FF4040 margin-b-10">{{data.appeal_arr.content}}</view>
|
||||
<view class="grid col-3">
|
||||
<view @click="yulanImg(data.appeal_arr.annex_images,2)"
|
||||
v-for="(item,index) in data.appeal_arr.annex_images" class="text-center margin-top">
|
||||
<view class="width-200 height-200">
|
||||
<image :src="item" class="width-200 height-200 radiu-20"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 按钮区 -->
|
||||
<view class=" margin-t-100 flex align-center justify-around">
|
||||
<!-- <text v-if="data.status==1&&data.type==2" class="font-42 color-00C481">请耐心等待买家付款</text> -->
|
||||
<view @click="router.push('/pages/index/appeal?id='+data.id)" v-if="data.status==2" class="okbtn">
|
||||
{{i18n.orderDetails.text22}}
|
||||
</view>
|
||||
<view @click="show=true" v-if="data.status==1&&data.type==1" class="nobtn">{{i18n.orderDetails.text23}}
|
||||
</view>
|
||||
<view @click="getorder_pay" v-if="data.status==1&&data.type==1" class="okbtn">
|
||||
{{i18n.orderDetails.text24}}
|
||||
</view>
|
||||
<view @click="show1=true" v-if="data.status==2&&data.type==2" class="okbtn">{{i18n.orderDetails.text25}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 取消弹窗 -->
|
||||
<u-popup v-model="show" mode="center" border-radius="20">
|
||||
<view class="width-600 height-266" style="overflow: hidden;"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="height-170 flex align-center justify-center">
|
||||
<text class="font-32 color-FF4040 weight-bold">{{i18n.orderDetails.text26}}</text>
|
||||
</view>
|
||||
<!-- <input class="input" type="text" v-model="paypwd" placeholder="请输入交易密码" placeholder-class="color-C3C3C3"
|
||||
password /> -->
|
||||
<view class="height-98 flex">
|
||||
<view @click="show=false" class="flex-1 line-height-98 text-center bj-c3c3c3-02">
|
||||
<text class="font-28 color-C3C3C3 weight-bold">{{i18n.orderDetails.text27}}</text>
|
||||
</view>
|
||||
<view @click="getcancel" class="flex-1 line-height-98 text-center bj-0165EE">
|
||||
<text class="font-28 color-white weight-bold">{{i18n.orderDetails.text28}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 确认收款弹窗 -->
|
||||
<u-popup v-model="show1" mode="center" border-radius="20">
|
||||
<view class="width-600 height-266" style="overflow: hidden;"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="height-170 flex align-center justify-center">
|
||||
<text class="font-32 color-FF4040 weight-bold">{{i18n.orderDetails.text29}}</text>
|
||||
</view>
|
||||
<!-- <input class="input" type="text" v-model="paypwd" placeholder="请输入交易密码" placeholder-class="color-C3C3C3"
|
||||
password /> -->
|
||||
<view class="height-98 flex">
|
||||
<view @click="show1=false" class="flex-1 line-height-98 text-center bj-c3c3c3-02">
|
||||
<text class="font-28 color-C3C3C3 weight-bold">{{i18n.orderDetails.text27}}</text>
|
||||
</view>
|
||||
<view @click="getsucc" class="flex-1 line-height-98 text-center bj-0165EE">
|
||||
<text class="font-28 color-white weight-bold">{{i18n.orderDetails.text28}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</z-paging>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
timestamp: 0,
|
||||
id: '',
|
||||
data: '',
|
||||
img: '',
|
||||
upimg: '',
|
||||
voimg: '',
|
||||
flag: true,
|
||||
show: false,
|
||||
show1: false,
|
||||
statusText: ['', '', '', '', '', ''],
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.id = e.id
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
// onPullDownRefresh() {
|
||||
// console.log('下拉刷新');
|
||||
// this.getDetails()
|
||||
// this.changekind()
|
||||
// setTimeout(function() {
|
||||
// uni.stopPullDownRefresh();
|
||||
// }, 1500);
|
||||
// },
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
this.getDetails()
|
||||
this.changekind()
|
||||
},
|
||||
methods: {
|
||||
onRefresh() {
|
||||
this.getDetails()
|
||||
this.changekind()
|
||||
// 以告知z-paging下拉刷新结束,这样才可以开始下一次的下拉刷新
|
||||
setTimeout(() => {
|
||||
//1.5秒之后停止刷新动画
|
||||
this.$refs.paging.complete();
|
||||
}, 1500)
|
||||
},
|
||||
changekind() {
|
||||
this.statusText[1] = this.i18n.orderRecord.text10
|
||||
this.statusText[2] = this.i18n.orderRecord.text11
|
||||
this.statusText[3] = this.i18n.orderRecord.text12
|
||||
this.statusText[4] = this.i18n.orderRecord.text13
|
||||
this.statusText[5] = this.i18n.orderRecord.text14
|
||||
},
|
||||
// 呼叫
|
||||
callup(phone) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone, //仅为示例
|
||||
success: () => {
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确认收款并放币
|
||||
getsucc() {
|
||||
if (!this.flag) {
|
||||
return
|
||||
} else {
|
||||
this.show1 = false
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
mask: true
|
||||
})
|
||||
this.flag = false
|
||||
this.post('/marketotc/order_succ', {
|
||||
id: this.data.id
|
||||
}).then(res => {
|
||||
console.log('确认收款返回', res)
|
||||
this.flag = true
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.getDetails()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 查看支付凭证
|
||||
yulanImg(img, type) {
|
||||
if (type == 1) {
|
||||
// let arr = []
|
||||
let arr = img.split()
|
||||
// arr.push(img)
|
||||
uni.previewImage({
|
||||
urls: arr
|
||||
})
|
||||
} else {
|
||||
uni.previewImage({
|
||||
urls: img
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
// 取消订单
|
||||
getcancel() {
|
||||
if (!this.flag) {
|
||||
return
|
||||
} else {
|
||||
this.show = false
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
mask: true
|
||||
})
|
||||
this.flag = false
|
||||
this.post('/marketotc/order_cancel', {
|
||||
id: this.data.id
|
||||
}).then(res => {
|
||||
console.log('上传支付凭证返回', res)
|
||||
this.flag = true
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.getDetails()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 上传支付凭证
|
||||
getorder_pay() {
|
||||
if (this.upimg == '') return this.tos(this.i18n.orderDetails.tos1)
|
||||
if (!this.flag) {
|
||||
return
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
mask: true
|
||||
})
|
||||
this.flag = false
|
||||
let obj = {
|
||||
id: this.data.id,
|
||||
voucher_image: this.upimg
|
||||
}
|
||||
this.post('/marketotc/order_pay', obj).then(res => {
|
||||
console.log('上传支付凭证返回', res)
|
||||
this.flag = true
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.getDetails()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 选择支付凭证
|
||||
chooseImage() {
|
||||
let self = this
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
success: (chooseImageRes) => {
|
||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
||||
self.img = 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)
|
||||
self.upimg = data.data.url
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取订单详情
|
||||
getDetails() {
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
mask: true
|
||||
})
|
||||
this.post('/marketotc/content_order', {
|
||||
id: this.id
|
||||
}).then(res => {
|
||||
console.log('订单详情', res)
|
||||
if (res.code == 1) {
|
||||
uni.hideLoading()
|
||||
this.data = res.data
|
||||
if (this.data.status != 1 && this.data.voucher_image != null) {
|
||||
this.voimg = res.data.voucher_image[0]
|
||||
}
|
||||
let h = res.data.h
|
||||
let i = res.data.i
|
||||
let s = res.data.s
|
||||
this.timestamp = (h * 60 * 60) + (i * 60) + s
|
||||
this.$refs.uCountDown.start();
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.box {
|
||||
width: 690rpx;
|
||||
padding: 22rpx 24rpx 20rpx;
|
||||
// background: #FFFFFF;
|
||||
box-shadow: 0rpx 4rpx 10rpx rgba(205, 206, 219, 0.3);
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.nobtn {
|
||||
width: 300rpx;
|
||||
height: 96rpx;
|
||||
background: #F6F8FB;
|
||||
border-radius: 10rpx;
|
||||
font-size: 30rpx;
|
||||
color: #8B99A2;
|
||||
line-height: 96rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.okbtn {
|
||||
width: 300rpx;
|
||||
height: 96rpx;
|
||||
background: #0165EE;
|
||||
border-radius: 10rpx;
|
||||
font-size: 30rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 96rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bj-c3c3c3-02 {
|
||||
background: rgba(195, 195, 195, 0.2);
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 540rpx;
|
||||
height: 76rpx;
|
||||
margin: 0 auto;
|
||||
border-radius: 20rpx;
|
||||
background: #F6F8FC;
|
||||
font-size: 28rpx;
|
||||
color: #8B99A2;
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,247 @@
|
||||
<template>
|
||||
<view>
|
||||
<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 :title="i18n.orderRecord.title" isRight righturl="/static/imgs/index/shaixuan@2x.png"
|
||||
@Jump="show=true,cache1=kind1,cache2=kind2"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-w-30 padding-b-40">
|
||||
<!-- 单一列表 -->
|
||||
<view @click="router.push('/pages/index/orderDetails?id='+item.id)" v-for="(item,index) in list"
|
||||
class="height-184 border-bottom margin-b-15">
|
||||
<view class="padding-t-21 flex align-center justify-between">
|
||||
<view class="flex align-center">
|
||||
<image class="width-48 height-48 radiu-24" :src="item.avatar" mode=""></image>
|
||||
<text class="font-26 weight-bold margin-l-16 margin-r-23">{{item.nickname}}</text>
|
||||
<image class="width-46 height-42" src="/static/imgs/index/yinhangka.png" mode=""></image>
|
||||
</view>
|
||||
<!-- <text class="font-26 color-C3C3C3">{{item.status|checkstatus}}</text> -->
|
||||
<text class="font-26 color-C3C3C3">{{statusText[item.status]}}</text>
|
||||
</view>
|
||||
<view class="margin-t-22 flex align-center">
|
||||
<view class="flex-1 flex direction-column">
|
||||
<view class="font-24 color-C3C3C3 margin-b-10">{{i18n.orderRecord.text1}}</view>
|
||||
<view class="font-24 numbold-font">{{item.add_time}}</view>
|
||||
</view>
|
||||
<view class="flex-1 flex direction-column align-center">
|
||||
<view class="font-24 color-C3C3C3 margin-b-10">{{i18n.orderRecord.text2}}({{item.name}})
|
||||
</view>
|
||||
<view class="font-24 numbold-font">{{item.num}}</view>
|
||||
</view>
|
||||
<view class="flex-1 flex direction-column align-end">
|
||||
<view class="font-24 color-C3C3C3 margin-b-10">{{i18n.orderRecord.text3}}({{item.symbol}})
|
||||
</view>
|
||||
<view class="font-24 numbold-font">{{item.count_price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<!-- 筛选弹窗 -->
|
||||
<u-popup :mask-close-able="false" v-model="show" mode="top" border-radius="20">
|
||||
<view class="padding-t-30" :style="{paddingTop: statusBar + 'px',background:theme.bg,color:theme.text}">
|
||||
<view class="height-110 flex align-center padding-w-30">
|
||||
<u-icon @click="closeshow" name="arrow-leftward" size="36"></u-icon>
|
||||
</view>
|
||||
<view class="padding-w-30">
|
||||
<view class="height-66 flex align-center font-30 color-C3C3C3">{{i18n.orderRecord.text4}}</view>
|
||||
<view class="margin-t-24 flex align-center flex-wrap">
|
||||
<view @click="setkind1(item.id)" v-for="(item,index) in kindlist1"
|
||||
:class="item.id==kind1?'onbox':'offbox'">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-w-30">
|
||||
<view class="height-66 flex align-center font-30 color-C3C3C3">{{i18n.orderRecord.text5}}</view>
|
||||
<view class="margin-t-24 flex align-center flex-wrap">
|
||||
<view @click="setkind2(item.id)" v-for="(item,index) in kindlist2"
|
||||
:class="item.id==kind2?'onbox':'offbox'">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-96 flex">
|
||||
<view @click="reset" class="flex-1 height-96 line-height-96 text-center bj-c3c3c3-02">
|
||||
<text class="font-28 color-C3C3C3">{{i18n.orderRecord.text6}}</text>
|
||||
</view>
|
||||
<view @click="confirm" class="flex-1 height-96 line-height-96 text-center bj-0165EE">
|
||||
<text class="font-28 color-white">{{i18n.orderRecord.text7}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
</z-paging>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
show: false,
|
||||
kindlist1: [{
|
||||
id: 1,
|
||||
name: '买入'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '卖出'
|
||||
}
|
||||
],
|
||||
kindlist2: [{
|
||||
id: 1,
|
||||
name: '待付款'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '已付款'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '申诉中'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '已完成'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '已取消'
|
||||
}
|
||||
],
|
||||
kind1: '',
|
||||
kind2: '',
|
||||
cache1: '',
|
||||
cache2: '',
|
||||
list: [],
|
||||
page: 1,
|
||||
state: 'more',
|
||||
ischange: false,
|
||||
statusText: ['', '', '', '', '', ''],
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
// onReachBottom() {
|
||||
// this.page++
|
||||
// this.getlist()
|
||||
// },
|
||||
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.changekind()
|
||||
},
|
||||
methods: {
|
||||
changekind() {
|
||||
this.kindlist1[0].name = this.i18n.orderRecord.text8
|
||||
this.kindlist1[1].name = this.i18n.orderRecord.text9
|
||||
this.kindlist2[0].name = this.i18n.orderRecord.text10
|
||||
this.kindlist2[1].name = this.i18n.orderRecord.text11
|
||||
this.kindlist2[2].name = this.i18n.orderRecord.text12
|
||||
this.kindlist2[3].name = this.i18n.orderRecord.text13
|
||||
this.kindlist2[4].name = this.i18n.orderRecord.text14
|
||||
this.statusText[1] = this.i18n.orderRecord.text10
|
||||
this.statusText[2] = this.i18n.orderRecord.text11
|
||||
this.statusText[3] = this.i18n.orderRecord.text12
|
||||
this.statusText[4] = this.i18n.orderRecord.text13
|
||||
this.statusText[5] = this.i18n.orderRecord.text14
|
||||
},
|
||||
confirm() {
|
||||
this.show = false
|
||||
this.list=[]
|
||||
this.queryList(1,10)
|
||||
},
|
||||
reset() {
|
||||
this.kind1 = ''
|
||||
this.kind2 = ''
|
||||
this.cache1 = ''
|
||||
this.cache2 = ''
|
||||
this.show = false
|
||||
this.list=[]
|
||||
this.queryList(1,10)
|
||||
},
|
||||
closeshow() {
|
||||
this.kind1 = this.cache1
|
||||
this.kind2 = this.cache2
|
||||
this.show = false
|
||||
},
|
||||
setkind2(id) {
|
||||
if (this.kind2 != id) {
|
||||
// this.cache2 = this.kind2
|
||||
this.kind2 = id
|
||||
}
|
||||
},
|
||||
setkind1(id) {
|
||||
if (this.kind1 != id) {
|
||||
// this.cache1 = this.kind1
|
||||
this.kind1 = id
|
||||
}
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
this.post('/marketotc/order_list', {
|
||||
page: pageNo,
|
||||
page_num: pageSize,
|
||||
type: this.kind1,
|
||||
status: this.kind2,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.border-bottom {
|
||||
border-bottom: 1rpx solid rgba(191, 195, 199, 0.3);
|
||||
}
|
||||
|
||||
.offbox {
|
||||
width: 180rpx;
|
||||
height: 56rpx;
|
||||
background: #EDEFF6;
|
||||
border-radius: 10rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #17181A;
|
||||
line-height: 56rpx;
|
||||
text-align: center;
|
||||
margin-right: 50rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.onbox {
|
||||
width: 180rpx;
|
||||
height: 56rpx;
|
||||
background: #06C38D;
|
||||
border-radius: 10rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
line-height: 56rpx;
|
||||
text-align: center;
|
||||
margin-right: 50rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.bj-c3c3c3-02 {
|
||||
background: rgba(195, 195, 195, 0.2);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,488 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<!-- 头部 -->
|
||||
<view class="width-750 relative flex align-center justify-center"
|
||||
:style="{height: `calc(${statusBar}px + 110rpx)`}">
|
||||
<view class="width-750 fixed1 bgimg1"
|
||||
:style="{paddingTop: statusBar + 'px', height: `calc(${statusBar}px + 110rpx)`}">
|
||||
<view class="width-750 height-110 padding-w-30 flex align-center justify-center">
|
||||
<view @click="_goback" class="cuIcon-back font-40 color-white"
|
||||
style="position: absolute;left: 30rpx;"></view>
|
||||
<text class="font-36 color-white weight-bold">{{i18n.recharge.title1}}</text>
|
||||
<image @click="router.push('/pages/index/rechargeRecord')" class="width-36 height-36"
|
||||
src="/static/imgs/index/jilu.png" style="position: absolute;right: 30rpx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750">
|
||||
<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 v-if="current==2" :style="'background-color: '+theme.fu_bg+';color: '+theme.text"
|
||||
class="width-100b radiu-20 padding-w-32 margin-t-20">
|
||||
<view @click="bankshow=true" class="height-80 flex align-center justify-between">
|
||||
<text class="font-28 weight-bold">{{bank.bank_name}} ({{bank.bank_user}})</text>
|
||||
<i class="cuIcon-right font-28"></i>
|
||||
</view>
|
||||
<view class="height-70 flex align-center justify-between">
|
||||
<text class="font-28 weight-bold">{{bank.card_num}}</text>
|
||||
<i @click="copy(bank.card_num)" class='cuIcon-copy font-30 color-0165EE'></i>
|
||||
</view>
|
||||
<view v-if="current==2" class="height-58 line-height-58">
|
||||
<text class="font-24">{{i18n.recharge.huilv}} ≈ {{bank.exchange}} USDT</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 币种选择 -->
|
||||
<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">
|
||||
<view class="height-90 padding-t-27 font-28 weight-bold">Select Coin</view>
|
||||
<view class="flex align-center flex-wrap">
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 链类型 -->
|
||||
<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">
|
||||
<view class="height-90 padding-t-27 font-28 weight-bold">{{i18n.recharge.text2}}
|
||||
</view>
|
||||
<view class="flex align-center flex-wrap">
|
||||
<view @click="changelian(item,index)" v-for="(item,index) in detail"
|
||||
:class="index==lian?'onbox':'offbox'" class="numbold-font margin-r-14">{{item.lian}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 二维码 -->
|
||||
<view v-if="current==1" class="codebox" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="flex align-center justify-center">
|
||||
<text class="font-28 weight-bold">{{i18n.recharge.text3}}</text>
|
||||
</view>
|
||||
<view class="margin-t-30 flex align-center justify-center">
|
||||
<view class="width-260 height-260 radiu-10 flex align-center justify-center"
|
||||
style="border: 4rpx solid #52F3C9;">
|
||||
<image class="width-242 height-242" :src="image?image:'/static/APEClogo@2x.png'"
|
||||
mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view @click="saveImage()"
|
||||
class="width-240 height-66 radiu-33 flex align-center justify-center margin-0-auto margin-t-38"
|
||||
style="border: 1px solid #0165EE;">
|
||||
<text class="font-28 color-0165EE weight-bold">{{i18n.recharge.text4}}</text>
|
||||
</view> -->
|
||||
<view class="font-26 nummedium-font margin-20-auto text-center">{{zhuan_address}}</view>
|
||||
<view @click="copy(zhuan_address)"
|
||||
class="width-240 height-66 radiu-33 flex align-center justify-center margin-0-auto"
|
||||
style="border: 1px solid #52F3C9;">
|
||||
<text class="font-28 color-0165EE weight-bold">{{i18n.recharge.text6}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="radiu-20 margin-t-10" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="width-100b height-160 padding-w-32 padding-c-27 flex direction-column justify-between">
|
||||
<view class="flex align-center justify-between">
|
||||
<text v-if="current==1" class="font-28 weight-bold">{{i18n.recharge.title4}}</text>
|
||||
<text v-if="current==2" class="font-28 weight-bold">{{i18n.recharge.new1}}</text>
|
||||
<text v-if="current==2" class="font-26">{{i18n.recharge.text9}}:{{Number(num*bank.exchange).toFixed(4)}}</text>
|
||||
</view>
|
||||
<input class="font-28" :placeholder="current==1?i18n.recharge.title8:i18n.recharge.new2" type="number" v-model="num" />
|
||||
</view>
|
||||
|
||||
<view v-if="current==1" class="width-100b height-160 padding-w-32 padding-c-27 flex direction-column justify-between">
|
||||
<view class="font-28 weight-bold flex align-center justify-between">
|
||||
<text>{{i18n.recharge.title5}}</text>
|
||||
</view>
|
||||
<input class="font-28" :placeholder="i18n.recharge.title9" type="text" v-model="address" />
|
||||
</view>
|
||||
|
||||
|
||||
<!-- <view v-if="current==2" class="width-100b height-160 padding-w-32 padding-c-27 flex direction-column justify-between">
|
||||
<view class="font-28 weight-bold flex align-center justify-between">
|
||||
<text>{{i18n.recharge.title15}}</text>
|
||||
</view>
|
||||
<input class="font-28" :placeholder="i18n.recharge.title18" type="text" v-model="bank_name" />
|
||||
</view> -->
|
||||
|
||||
<!-- <view v-if="current==2" class="width-100b height-160 padding-w-32 padding-c-27 flex direction-column justify-between">
|
||||
<view class="font-28 weight-bold flex align-center justify-between">
|
||||
<text>{{i18n.recharge.title16}}</text>
|
||||
</view>
|
||||
<input class="font-28" :placeholder="i18n.recharge.title19" type="number" v-model="card_num" />
|
||||
</view> -->
|
||||
|
||||
<view class="width-100b height-160 padding-w-32 padding-c-27 flex direction-column justify-between">
|
||||
<view class="font-28 weight-bold flex align-center justify-between">
|
||||
<text>{{i18n.recharge.title7}}</text>
|
||||
</view>
|
||||
<input class="font-28" password :placeholder="i18n.recharge.title11" type="text"
|
||||
v-model="pay_pwd" />
|
||||
</view>
|
||||
|
||||
<view class="width-100b padding-w-32 padding-c-27 flex direction-column justify-between">
|
||||
<view class="font-28 weight-bold flex align-center justify-between">
|
||||
<text>{{i18n.recharge.title17}}</text>
|
||||
</view>
|
||||
<view class="height-200 flex align-center justify-center">
|
||||
<view @click="chooseImage()"
|
||||
class="width-200 height-200 flex align-center justify-center radiu-20"
|
||||
:style="'background-color: '+theme.bg">
|
||||
<image v-if="voucher_image" class="width-200 height-200" :src="voucher_image" mode=""></image>
|
||||
<i v-else class='cuIcon-add font-50 weight-bold'></i>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 空盒子 -->
|
||||
<view class="height-40"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 币种弹窗 -->
|
||||
<u-popup v-model="show" mode="bottom" border-radius="20">
|
||||
<view class="height-437 padding-w-30 padding-b-36"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="flex align-center justify-between padding-c-32">
|
||||
<text class="font-28">{{i18n.recharge.text7}}</text>
|
||||
<text @click.stop="show=false" class="font-26 color-C3C3C3">{{i18n.recharge.text8}}</text>
|
||||
</view>
|
||||
<view class="height-278">
|
||||
<scroll-view scroll-y="true" class="height-220">
|
||||
<view @click.stop="changecurr(item)" v-for="(item,index) in list"
|
||||
class="height-72 padding-w-30 flex align-center margin-b-17 font-28">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<!-- 银行弹窗 -->
|
||||
<u-popup v-model="bankshow" mode="bottom" border-radius="20">
|
||||
<view class="height-517 padding-w-30 padding-b-36"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="flex align-center justify-between padding-c-32">
|
||||
<text class="font-28">{{i18n.fastRecord.text9}}</text>
|
||||
<text @click.stop="bankshow=false" class="font-26 color-C3C3C3">{{i18n.recharge.text8}}</text>
|
||||
</view>
|
||||
<view class="height-358">
|
||||
<scroll-view scroll-y="true" class="height-300">
|
||||
<view @click.stop="changebank(item)" v-for="(item,index) in bankList"
|
||||
class="height-72 flex align-center margin-b-17">
|
||||
<image class="width-38 height-38 radiu-50b margin-r-18" :src="item.logo_image" mode=""></image>
|
||||
<text class="font-28">{{item.curr_name}} {{item.name}} ({{item.bank_user}})</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import clipboard from "@/components/clipboard.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
current: 2,
|
||||
|
||||
show: false,
|
||||
bankshow:false,
|
||||
list: [],
|
||||
lian: 0,
|
||||
curr: '',
|
||||
currid: '',
|
||||
detail: [],
|
||||
zhuan_address: '',
|
||||
image: '',
|
||||
xieyi: '',
|
||||
theme: '',
|
||||
|
||||
num: '',
|
||||
address: '',
|
||||
hash: '',
|
||||
pay_pwd: '',
|
||||
flag: true,
|
||||
coinTypes: [],
|
||||
|
||||
bankList:[],
|
||||
bank: {},
|
||||
|
||||
voucher_image: '',
|
||||
voucher_image_up: '',
|
||||
// card_num: '',
|
||||
// bank_name: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
if(e.current==2){
|
||||
this.current = e.current
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
this.getcurrlist()
|
||||
},
|
||||
methods: {
|
||||
chongzhi() {
|
||||
if (!this.flag) return
|
||||
if (this.num == '') return this.tos(this.i18n.recharge.title8)
|
||||
if (this.address == '') return this.tos(this.i18n.recharge.title9)
|
||||
if (this.paypwd == '') return this.tos(this.i18n.recharge.title11)
|
||||
this.post('/wallet/recharge_sub', {
|
||||
type:1,
|
||||
num: this.num,
|
||||
address: this.address,
|
||||
hash: this.hash,
|
||||
pay_pwd: this.pay_pwd,
|
||||
voucher_image: this.voucher_image_up
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.paypwd = ''
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/rechargeRecord'
|
||||
})
|
||||
}, 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)
|
||||
},
|
||||
saveImage(image) {
|
||||
var that = this;
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: that.image,
|
||||
success(res) {
|
||||
that.tos(that.i18n.mine.share.codeSuceed)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取充值内容
|
||||
getdetails(id) {
|
||||
this.post('/wallet/get_wallet_address', {
|
||||
id: id
|
||||
},true).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.bank = res.data.bank[0]
|
||||
this.bankList = res.data.bank
|
||||
this.detail = res.data.curr
|
||||
this.lian = 0
|
||||
this.image = res.data.curr[0].qrcode
|
||||
this.zhuan_address = res.data.curr[0].address
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取币种
|
||||
getcurrlist() {
|
||||
this.post('/wallet/reg_curr').then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.list = res.data
|
||||
// 构建币种选择列表,确保包含 BTC 和 ETH
|
||||
let types = [...res.data]
|
||||
let names = types.map(t => t.name.toUpperCase())
|
||||
if (!names.includes('BTC')) {
|
||||
types.push({ id: 'btc_static', name: 'BTC' })
|
||||
}
|
||||
if (!names.includes('ETH')) {
|
||||
types.push({ id: 'eth_static', name: 'ETH' })
|
||||
}
|
||||
this.coinTypes = types
|
||||
this.curr = res.data[0].name
|
||||
this.currid = res.data[0].id
|
||||
this.getdetails(this.currid)
|
||||
}
|
||||
})
|
||||
},
|
||||
changeCoinType(item) {
|
||||
if (this.currid == item.id) return
|
||||
this.curr = item.name
|
||||
this.currid = item.id
|
||||
this.voucher_image = ''
|
||||
this.voucher_image_up = ''
|
||||
this.getdetails(this.currid)
|
||||
},
|
||||
changecurr(item) {
|
||||
this.curr = item.name
|
||||
this.currid = item.id
|
||||
this.getdetails(this.currid)
|
||||
this.show = false
|
||||
},
|
||||
changebank(item){
|
||||
this.bank = item
|
||||
this.bankshow = false
|
||||
},
|
||||
changelian(item, index) {
|
||||
if (this.lian != index) {
|
||||
this.lian = index
|
||||
this.image = item.qrcode
|
||||
this.zhuan_address = item.address
|
||||
}
|
||||
},
|
||||
yinhangka() {
|
||||
if (!this.flag) return
|
||||
if (this.num == '') return this.tos(this.i18n.recharge.title8)
|
||||
// if (this.bank_name == '') return this.tos(this.i18n.recharge.title18)
|
||||
// if (this.card_num == '') return this.tos(this.i18n.recharge.title19)
|
||||
if (this.paypwd == '') return this.tos(this.i18n.recharge.title11)
|
||||
this.post('/wallet/recharge_sub', {
|
||||
type:2,
|
||||
num: this.num,
|
||||
bank_id: this.bank.id,
|
||||
pay_pwd: this.pay_pwd,
|
||||
// bank_name: this.bank_name,
|
||||
// card_num: this.card_num,
|
||||
voucher_image: this.voucher_image_up
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.paypwd = ''
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/rechargeRecord'
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
},
|
||||
chooseImage() {
|
||||
let self = this
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
success: (chooseImageRes) => {
|
||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
||||
self.voucher_image = tempFilePaths[0]
|
||||
uni.showLoading({
|
||||
mask:true
|
||||
})
|
||||
uni.uploadFile({
|
||||
url: this.upload + '/publics/image_upload',
|
||||
filePath: tempFilePaths[0],
|
||||
name: 'file',
|
||||
success: (res) => {
|
||||
let data = JSON.parse(res.data)
|
||||
if (data.code == 1) {
|
||||
self.voucher_image_up = data.data.url
|
||||
}
|
||||
},
|
||||
complete:() =>{
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fixed1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
// background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.bgimg1 {
|
||||
// background-image: url(../../static/imgs/index/bgimg1.png);
|
||||
// background-repeat: repeat;
|
||||
// background-size: 100% 100%;
|
||||
background: linear-gradient(180deg, #52F3C9 0%, #3ECEB2 100%);
|
||||
}
|
||||
|
||||
.bgimg2 {
|
||||
// background-image: url(../../static/imgs/index/bgimg2.png);
|
||||
// background-repeat: repeat;
|
||||
// background-size: 100% 100%;
|
||||
background: linear-gradient(180deg, #3ECEB2 0%, #52F3C9 100%);
|
||||
}
|
||||
|
||||
.onbox {
|
||||
height: 56rpx;
|
||||
padding: 0 24rpx;
|
||||
background: linear-gradient(180deg, #52F3C9 0%, #3ECEB2 100%);
|
||||
border-radius: 28rpx;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.offbox {
|
||||
height: 56rpx;
|
||||
padding: 0 24rpx;
|
||||
background: rgba(139, 153, 162, 0.2);
|
||||
border-radius: 28rpx;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
font-size: 28rpx;
|
||||
color: #8B99A2;
|
||||
}
|
||||
|
||||
.codebox {
|
||||
width: 690rpx;
|
||||
height: 500rpx;
|
||||
// background: #FFFFFF;
|
||||
box-shadow: 0rpx 0rpx 0rpx #EBF0F6;
|
||||
opacity: 1;
|
||||
border-radius: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
padding: 27rpx 32rpx 39rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="i18n.recharge.title3"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-b-40 padding-w-30 padding-t-84">
|
||||
<view class="flex direction-column align-center">
|
||||
<image class="width-186 height-186" src="/static/imgs/index/tibiok.png" mode=""></image>
|
||||
<view class="margin-t-51 margin-b-11">
|
||||
<text class="font-42 numbold-font">{{data.price}}</text>
|
||||
<text class="font-26 nummedium-font margin-l-5">{{data.name}}</text>
|
||||
</view>
|
||||
<text class="font-28 color-C3C3C3">{{i18n.recharge.text9}}</text>
|
||||
</view>
|
||||
<view class="width-690 height-600 radiu-20 margin-t-48 padding-w-32 padding-c-28 flex direction-column justify-between"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="flex align-center">
|
||||
<view class="flex-3 font-28 color-C3C3C3">{{i18n.recharge.text10}}</view>
|
||||
<view class="flex-9 font-28 color-00C481 weight-bold">{{i18n.withdraw.text14}}</view>
|
||||
</view>
|
||||
<view class="flex align-center">
|
||||
<view class="flex-3 font-28 color-C3C3C3">{{i18n.recharge.text11}}</view>
|
||||
<view class="flex-9 font-28 weight-bold">{{statusText[data.status]}}</view>
|
||||
</view>
|
||||
<view class="flex align-center">
|
||||
<view class="flex-3 font-28 color-C3C3C3">{{i18n.recharge.text12}}</view>
|
||||
<view class="flex-9 font-28 numbold-font">{{data.name}}</view>
|
||||
</view>
|
||||
<view v-if="data.hash" class="flex align-center">
|
||||
<view class="flex-3 font-28 color-C3C3C3">{{i18n.recharge.text13}}</view>
|
||||
<view class="flex-9 font-28 numbold-font">{{data.hash}}</view>
|
||||
</view>
|
||||
<view class="flex align-center">
|
||||
<view class="flex-3 font-28 color-C3C3C3">{{i18n.recharge.text14}}</view>
|
||||
<view class="flex-9 font-28 numbold-font">{{data.createtime}}</view>
|
||||
</view>
|
||||
<view v-if="data.address" class="flex align-center">
|
||||
<view class="flex-3 font-28 color-C3C3C3">{{i18n.recharge.title5}}</view>
|
||||
<view class="flex-9 font-28 numbold-font">{{data.address}}</view>
|
||||
</view>
|
||||
<view v-if="data.bank_name" class="flex align-center">
|
||||
<view class="flex-3 font-28 color-C3C3C3">{{i18n.recharge.title15}}</view>
|
||||
<view class="flex-9 font-28 numbold-font">{{data.bank_name}}</view>
|
||||
</view>
|
||||
<view v-if="data.card_num" class="flex align-center">
|
||||
<view class="flex-3 font-28 color-C3C3C3">{{i18n.recharge.title16}}</view>
|
||||
<view class="flex-9 font-28 numbold-font">{{data.card_num}}</view>
|
||||
</view>
|
||||
<view v-if="data.voucher_image" class="flex align-center">
|
||||
<view class="flex-3 font-28 color-C3C3C3">{{i18n.recharge.title17}}</view>
|
||||
<view class="flex-9">
|
||||
<image @click="wacth(data.voucher_image)" class="width-200 height-200 radiu-20" :src="data.voucher_image" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
data: '',
|
||||
statusText: ['', '', ''],
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.changestatus()
|
||||
this.getDetails(e.id)
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
wacth(url) {
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
},
|
||||
changestatus() {
|
||||
this.statusText[0] = this.i18n.recharge.text15
|
||||
this.statusText[1] = this.i18n.recharge.text16
|
||||
this.statusText[2] = this.i18n.recharge.text17
|
||||
},
|
||||
getDetails(id) {
|
||||
let obj = {
|
||||
id: id,
|
||||
cart: 1
|
||||
}
|
||||
this.post('/wallet/recharge_con', obj).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.data = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<view>
|
||||
<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.recharge.title2"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-b-40">
|
||||
<view @click="goDetails(item.id)" v-for="(item,index) in list"
|
||||
class="height-150 padding-w-30 padding-t-24 padding-b-27 flex direction-column justify-between margin-t-16">
|
||||
<view class="flex align-center justify-between">
|
||||
<text class="font-32 color-00C481 nummedium-font">+{{item.price}}</text>
|
||||
<text v-if="item.status==0" class="font-28 nummedium-font">{{i18n.recharge.title12}}</text>
|
||||
<text v-if="item.status==1" class="font-28 nummedium-font">{{i18n.recharge.title13}}</text>
|
||||
<text v-if="item.status==2" class="font-28 nummedium-font">{{i18n.recharge.title14}}</text>
|
||||
</view>
|
||||
<text class="font-24 color-C3C3C3 nummedium-font">{{item.createtime}}</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) {
|
||||
setTimeout(()=>{
|
||||
this.post('/wallet/get_recharge_log', {
|
||||
page: pageNo,
|
||||
page_num: pageSize
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
},500)
|
||||
},
|
||||
goDetails(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/rechargeDetails?id=' + id
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
@@ -0,0 +1,559 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100%;min-height: 100vh;">
|
||||
<!-- 头部 -->
|
||||
<view class="width-750 relative flex align-center justify-center"
|
||||
:style="{height: `calc(${statusBar}px + 220rpx)`}">
|
||||
<view class="width-750 fixed1"
|
||||
:style="{paddingTop: statusBar + 'px', height: `calc(${statusBar}px + 220rpx)`}">
|
||||
<view class="width-750 height-110 padding-w-30 flex align-center justify-center">
|
||||
<view @click="_goback" class="cuIcon-back font-40 color-white"
|
||||
style="position: absolute;left: 30rpx;"></view>
|
||||
<text class="font-36 color-white weight-bold">{{i18n.releaseTrade.title}}</text>
|
||||
<view class="flex align-center" style="position: absolute;right: 30rpx;">
|
||||
<view @click.stop="show=true" class="switchbox">
|
||||
<text class="nummedium-font">{{faby}}</text>
|
||||
<image class="width-34 height-34 margin-l-5" src="/static/imgs/index/change@2x.png" mode="">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-110 flex align-center padding-w-30">
|
||||
<view class="flex-9 flex align-center">
|
||||
<view @click="changeType(1)" class="flex-1" :class="currtype==1?'onfont':'offfont'">
|
||||
{{i18n.releaseTrade.text1}}
|
||||
</view>
|
||||
<view @click="changeType(2)" class="flex-1" :class="currtype==2?'onfont':'offfont'">
|
||||
{{i18n.releaseTrade.text2}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-3 flex align-center justify-end">
|
||||
<image @click="router.push('/pages/index/fastRecord')" class="width-54 height-54"
|
||||
src="/static/imgs/index/jilu@2x.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-b-40">
|
||||
<!-- 币种 -->
|
||||
<view class="height-72 bj-0165EE">
|
||||
<view class="height-72 flex align-center"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text"
|
||||
style="border-radius: 20rpx 20rpx 0 0;">
|
||||
<view class="width-100b height-100b">
|
||||
<scroll-view scroll-x="true">
|
||||
<view class="flex align-center">
|
||||
<view @click.stop="setiscurr(item)" v-for="(item,index) in currlist"
|
||||
class="height-72 padding-w-30 flex direction-column align-center justify-center relative">
|
||||
<text :class="currid==item.id?'select':'noselect'">{{item.name}}</text>
|
||||
<view v-if="currid==item.id" class="width-48 height-4 bj-0165EE"
|
||||
style="position: absolute;bottom: 0;"></view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 数量 -->
|
||||
<view class="width-690 margin-0-auto border-bottom">
|
||||
<view class="height-96 flex align-center justify-between">
|
||||
<text class="font-30">{{currtype==1?i18n.releaseTrade.text3:i18n.releaseTrade.text4}}</text>
|
||||
</view>
|
||||
<view class="height-96 flex align-center">
|
||||
<input class="flex-1 font-30" type="text" v-model="number"
|
||||
:placeholder="currtype==1?i18n.releaseTrade.tos1:i18n.releaseTrade.tos2"/>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 限额 -->
|
||||
<view class="width-690 margin-0-auto border-bottom margin-t-23">
|
||||
<view class="height-96 flex align-center justify-between">
|
||||
<text class="font-30">{{i18n.releaseTrade.text5}}</text>
|
||||
</view>
|
||||
<view class="height-96 flex align-center">
|
||||
<input class="input" type="number" :placeholder="i18n.releaseTrade.tos3" v-model="min" />
|
||||
<view class="width-105 text-center">~</view>
|
||||
<input class="input" type="number" :placeholder="i18n.releaseTrade.tos4" v-model="max" />
|
||||
<view class="width-105 text-right">
|
||||
<text class="font-30 nummedium-font">{{faby}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 单价 -->
|
||||
<view class="width-690 margin-0-auto border-bottom margin-t-23">
|
||||
<view class="height-96 flex align-center justify-between">
|
||||
<text class="font-30">{{i18n.releaseTrade.text6}}</text>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-between">
|
||||
<input class="flex-1 padding-r-30 font-30" type="text" v-model="price"
|
||||
:placeholder="i18n.releaseTrade.tos5" />
|
||||
<text class="font-30 nummedium-font">{{faby}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 交易密码 -->
|
||||
<view class="width-690 margin-0-auto border-bottom margin-t-23">
|
||||
<view class="height-96 flex align-center justify-between">
|
||||
<text class="font-30">{{i18n.releaseTrade.text7}}</text>
|
||||
</view>
|
||||
<view class="height-96 flex align-center">
|
||||
<input class="flex-1 font-30" type="text" v-model="paypwd"
|
||||
:placeholder="i18n.releaseTrade.tos6" password />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 支付方式 -->
|
||||
<view class="width-690 margin-0-auto margin-t-23">
|
||||
<view class="height-96 flex align-center justify-between">
|
||||
<text
|
||||
class="font-30">{{currtype==1?i18n.releaseTrade.text8:i18n.releaseTrade.text9}}</text>
|
||||
<view class="flex align-center font-30">
|
||||
<text>{{fabyname}}</text>
|
||||
<!-- <u-icon name="arrow-right" color="#8B99A2" size="24"></u-icon> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 收款账户 -->
|
||||
<view v-if="currtype==2" class="width-690 margin-0-auto margin-t-23">
|
||||
<view @click="show1=true" class="height-96 flex align-center justify-between">
|
||||
<text class="font-30">{{i18n.releaseTrade.text10}}</text>
|
||||
<view class="flex align-center font-30">
|
||||
<text v-if="collecid!=''">{{collecdata.card_num|changestyle}}</text>
|
||||
<u-icon name="arrow-right" size="24"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 按钮 -->
|
||||
<view @click.stop="openshow" class="buybtn margin-0-auto margin-t-100">
|
||||
<text>{{i18n.releaseTrade.text11}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 确认发布弹窗 -->
|
||||
<u-popup v-model="fbshow" mode="bottom" border-radius="20">
|
||||
<view class="height-600 padding-w-30"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="height-105 padding-t-22 padding-b-38 flex align-center justify-center">
|
||||
<text class="font-30 weight-bold">{{currtype==1?i18n.releaseTrade.text12:i18n.releaseTrade.text13}}</text>
|
||||
<view @click="fbshow=false" style="position: absolute;right: 30rpx;" class="font-26 color-C3C3C3">
|
||||
{{i18n.releaseTrade.text14}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-106 flex align-center justify-center font-48 color-FF4040 numbold-font">
|
||||
<!-- <u-icon name="rmb" color="#FF4040" size="42"></u-icon> -->
|
||||
<text class="font-36 color-FF4040">{{fabysym}}</text>
|
||||
<text class="margin-l-5">{{(number*price).toFixed(2)}}</text>
|
||||
</view>
|
||||
<view class="height-66 margin-t-42 flex align-center justify-between font-30">
|
||||
<text>{{i18n.releaseTrade.text15}}</text>
|
||||
<text class="nummedium-font">{{price}} {{faby}}</text>
|
||||
</view>
|
||||
<view class="height-66 flex align-center justify-between font-30">
|
||||
<text>{{i18n.releaseTrade.text16}}</text>
|
||||
<text class="nummedium-font">{{number}} {{curr}}</text>
|
||||
</view>
|
||||
<!-- <view class="height-192">
|
||||
<view v-for="(item,index) in 2" class="height-96 flex align-center justify-between">
|
||||
<view class="flex align-center">
|
||||
<image class="width-46 height-46 radiu-23" src="/static/logo.png" mode=""></image>
|
||||
<text class="font-30 color-333333 margin-l-22">RM</text>
|
||||
</view>
|
||||
<image class="width-34 height-34 radiu-17" :src="iscurr==index?XZ:WX" mode=""></image>
|
||||
</view>
|
||||
</view> -->
|
||||
<view @click.stop="closeshow" class="buybtn margin-t-86">
|
||||
<text>{{i18n.releaseTrade.text17}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 法币弹窗 -->
|
||||
<u-popup v-model="show" mode="bottom" border-radius="20">
|
||||
<view class="padding-w-30 padding-b-36"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="height-96 line-height-96 text-center relative">
|
||||
<text class="font-30 weight-bold">{{i18n.releaseTrade.text18}}</text>
|
||||
<text @click.stop="show=false" class="font-26 color-C3C3C3 absolute"
|
||||
style="right: 0;">{{i18n.releaseTrade.text14}}</text>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="height-450">
|
||||
<view @click="setFaby(item)" v-for="(item,index) in fabylist"
|
||||
class="height-96 flex align-center justify-between">
|
||||
<view class="flex align-center">
|
||||
<image class="width-48 height-48 radiu-24" :src="item.pay_image" mode=""></image>
|
||||
<text class="font-28 margin-l-16">{{item.curr_name}}</text>
|
||||
</view>
|
||||
<image class="width-36 height-36" :src="fabyid==item.id?XZ:WX" mode=""></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 收款账户弹窗 -->
|
||||
<u-popup v-model="show1" mode="bottom" border-radius="20">
|
||||
<view class="padding-w-30 padding-b-36"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="height-96 line-height-96 text-center relative">
|
||||
<text class="font-30 weight-bold">{{i18n.releaseTrade.text19}}</text>
|
||||
<text @click.stop="show1=false" class="font-26 color-C3C3C3 absolute"
|
||||
style="right: 0;">{{i18n.releaseTrade.text14}}</text>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="height-450">
|
||||
<view @click="setcollec(item)" v-for="(item,index) in collec"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text"
|
||||
class="height-96 flex align-center justify-between margin-b-10 radiu-10 padding-w-20">
|
||||
<view class="flex-1 padding-r-24 height-96 flex direction-column justify-around">
|
||||
<view class="flex align-center">
|
||||
<text>{{item.username}}</text>
|
||||
<text class="font-28 margin-l-16">{{item.card_num|changestyle}}</text>
|
||||
</view>
|
||||
<view class="font-24 color-C3C3C3">{{item.bank_name}}</view>
|
||||
</view>
|
||||
<image class="width-36 height-36" :src="collecid==item.id?XZ:WX" mode=""></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 去实名 -->
|
||||
<u-popup style="z-index: 5000;" border-radius="18" mode="center" v-model="TSShow">
|
||||
<view class="width-600 padding-b-20"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="width-100b height-220 padding-w-30 padding-c-40 flex direction-column align-center justify-between">
|
||||
<image class="width-64 height-64" src="/static/imgs/quantify/tongzhi@2x.png" mode=""></image>
|
||||
<view class="font-28 weight-bold text-center padding-w-20">{{i18n.releaseTrade.text20}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-100b height-90 flex align-center justify-center">
|
||||
<view @click="TSShow=false,router.push('/pages/my/safety/real')" class="qcbtn3">
|
||||
{{i18n.releaseTrade.text21}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
currtype: 1, //1我要买,2我要卖
|
||||
fbshow: false, //发布弹窗
|
||||
iscurr: 0,
|
||||
XZ: '/static/imgs/quantify/xuanzhong@2x.png',
|
||||
WX: '/static/imgs/quantify/weixuanzhong@2x.png',
|
||||
|
||||
show: false, //法币弹窗
|
||||
faby: '', //法币
|
||||
fabyid: '', //法币id
|
||||
fabyname: '', //法币国家名称
|
||||
fabylist: [], //法币列表
|
||||
fabysym: '',
|
||||
curr: '', //币种
|
||||
currid: '', //当前币种id
|
||||
currlist: [], //币种列表
|
||||
flag: true,
|
||||
number: '', //数量
|
||||
min: '', //最小
|
||||
max: '', //最大
|
||||
price: '', //价格
|
||||
paypwd: '', //交易密码
|
||||
show1: false,
|
||||
collec: [], //收款账户列表
|
||||
collecid: '', //当前收款账户id
|
||||
collecdata: '', //当前收款账户对象
|
||||
TSShow: false,
|
||||
|
||||
theme: '',
|
||||
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
this.getCurrlist()
|
||||
this.getFabylist()
|
||||
this.getcollection()
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
changestyle(e) {
|
||||
let str = e
|
||||
var reg = /^(\d{4})\d+(\d{4})$/;
|
||||
str = str.replace(reg, "$1 **** $2");
|
||||
return str
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 发布我要卖
|
||||
getquick_sell() {
|
||||
if (!this.flag) {
|
||||
return
|
||||
} else {
|
||||
this.flag = false
|
||||
let obj = {
|
||||
num: this.number,
|
||||
price: this.price,
|
||||
min_price: this.min,
|
||||
max_price: this.max,
|
||||
pay_pwd: this.paypwd,
|
||||
country_id: this.fabyid,
|
||||
curr_id: this.currid,
|
||||
payment: 1,
|
||||
collection_id: this.collecid
|
||||
}
|
||||
this.post('/marketotc/quick_sell', obj).then(res => {
|
||||
console.log('发布返回', res)
|
||||
this.flag = true
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.number = ''
|
||||
this.price = ''
|
||||
this.min = ''
|
||||
this.max = ''
|
||||
this.paypwd = ''
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/fastRecord'
|
||||
})
|
||||
}, 500)
|
||||
} else {
|
||||
uni.hideToast()
|
||||
if (res.data.jump == 1) {
|
||||
this.number = ''
|
||||
this.price = ''
|
||||
this.min = ''
|
||||
this.max = ''
|
||||
this.paypwd = ''
|
||||
this.TSShow = true
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 发布我要买
|
||||
getquick_buy() {
|
||||
if (!this.flag) {
|
||||
return
|
||||
} else {
|
||||
this.flag = false
|
||||
let obj = {
|
||||
num: this.number,
|
||||
price: this.price,
|
||||
min_price: this.min,
|
||||
max_price: this.max,
|
||||
pay_pwd: this.paypwd,
|
||||
country_id: this.fabyid,
|
||||
curr_id: this.currid,
|
||||
payment: 1,
|
||||
}
|
||||
this.post('/marketotc/quick_buy', obj).then(res => {
|
||||
console.log('发布返回', res)
|
||||
this.flag = true
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.number = ''
|
||||
this.price = ''
|
||||
this.min = ''
|
||||
this.max = ''
|
||||
this.paypwd = ''
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/fastRecord'
|
||||
})
|
||||
}, 500)
|
||||
} else {
|
||||
uni.hideToast()
|
||||
if (res.data.jump == 1) {
|
||||
this.number = ''
|
||||
this.price = ''
|
||||
this.min = ''
|
||||
this.max = ''
|
||||
this.paypwd = ''
|
||||
this.TSShow = true
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
closeshow() {
|
||||
this.fbshow = false
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
mask: true
|
||||
})
|
||||
if (this.currtype == 1) {
|
||||
this.getquick_buy()
|
||||
} else {
|
||||
this.getquick_sell()
|
||||
}
|
||||
},
|
||||
openshow() {
|
||||
if (this.number == '') return this.tos(this.i18n.releaseTrade.tos7)
|
||||
if (this.min == '' || this.max == '') return this.tos(this.i18n.releaseTrade.tos8)
|
||||
if (this.price == '') return this.tos(this.i18n.releaseTrade.tos5)
|
||||
if (this.paypwd == '') return this.tos(this.i18n.releaseTrade.tos6)
|
||||
this.fbshow = true
|
||||
},
|
||||
// 选择账户
|
||||
setcollec(item) {
|
||||
if (this.collecid != item.id) {
|
||||
this.collecid = item.id
|
||||
this.collecdata = item
|
||||
this.show1 = false
|
||||
}
|
||||
},
|
||||
// 获取收款账户列表
|
||||
getcollection() {
|
||||
this.post('/marketotc/get_collection').then(res => {
|
||||
console.log('收款账户列表', res)
|
||||
if (res.code == 1 && res.data && res.data.length > 0) {
|
||||
this.collec = res.data
|
||||
this.collecid = res.data[0].id
|
||||
this.collecdata = res.data[0]
|
||||
} else {
|
||||
// 如果没有收款账户或数据为空,设置默认值
|
||||
this.collec = []
|
||||
this.collecid = ''
|
||||
this.collecdata = ''
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择法币
|
||||
setFaby(item) {
|
||||
this.faby = item.curr_name
|
||||
this.fabyid = item.id
|
||||
this.fabyname = item.pay_name
|
||||
this.fabysym = item.symbol
|
||||
this.show = false
|
||||
},
|
||||
// 获取法币列表
|
||||
getFabylist() {
|
||||
this.post('/marketotc/get_country').then(res => {
|
||||
console.log('法币列表', res)
|
||||
if (res.code == 1) {
|
||||
this.fabylist = res.data
|
||||
this.faby = res.data[0].curr_name
|
||||
this.fabyid = res.data[0].id
|
||||
this.fabyname = res.data[0].pay_name
|
||||
this.fabysym = res.data[0].symbol
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择币种
|
||||
setiscurr(item) {
|
||||
if (this.currid != item.id) {
|
||||
this.currid = item.id
|
||||
this.curr = item.name
|
||||
}
|
||||
},
|
||||
// 获取币种列表
|
||||
getCurrlist() {
|
||||
this.post('/marketotc/get_curr').then(res => {
|
||||
console.log('币种列表', res)
|
||||
if (res.code == 1) {
|
||||
this.currlist = res.data
|
||||
this.currid = res.data[0].id
|
||||
this.curr = res.data[0].name
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择买或卖
|
||||
changeType(i) {
|
||||
if (this.currtype != i) {
|
||||
this.currtype = i
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fixed1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
background: #06C38D;
|
||||
}
|
||||
|
||||
.onfont {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.offfont {
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.border-bottom {
|
||||
border-bottom: 1rpx solid rgba(191, 195, 199, 0.2);
|
||||
}
|
||||
|
||||
.buybtn {
|
||||
width: 690rpx;
|
||||
height: 96rpx;
|
||||
background: #06C38D;
|
||||
opacity: 1;
|
||||
border-radius: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.select {
|
||||
font-size: 28rpx;
|
||||
font-family: "Bold" !important;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: #06C38D;
|
||||
}
|
||||
|
||||
.noselect {
|
||||
font-size: 26rpx;
|
||||
font-family: "Medium" !important;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: #8B99A2;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 240rpx;
|
||||
height: 66rpx;
|
||||
// background: #F6F8FB;
|
||||
border: 1rpx solid #E5E5E5;
|
||||
opacity: 1;
|
||||
border-radius: 10rpx;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
// color: #D1D3D8;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.qcbtn3 {
|
||||
width: 320rpx;
|
||||
height: 86rpx;
|
||||
background: #06C38D;
|
||||
border-radius: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100%;">
|
||||
<myNav :title="i18n.ico.three6"></myNav>
|
||||
<view class="padding-30" v-html="data.white_paper">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme: '',
|
||||
data:{}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.ico = e.ico
|
||||
this.getDetails()
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取私募内容
|
||||
getDetails() {
|
||||
this.post('/index/ico_content', {
|
||||
id: this.ico
|
||||
}).then(res => {
|
||||
console.log('私募内容', res)
|
||||
if (res.code == 1) {
|
||||
this.data = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
@@ -0,0 +1,598 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<!-- 头部 -->
|
||||
<myNav :title="i18n.withdraw.title1" isRight righturl="/static/imgs/index/tbjl.png"
|
||||
@Jump="router.push('/pages/index/withdrawalRecord')"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-t-10 padding-b-40 padding-w-30">
|
||||
<!-- 币种 -->
|
||||
<!-- <view @click="show=true"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text"
|
||||
class="width-100b height-96 radiu-20 padding-w-32 flex align-center justify-between">
|
||||
<text class="font-28 weight-bold">{{i18n.withdraw.text1}}</text>
|
||||
<view class="flex align-center">
|
||||
<text class="font-28 numbold-font color-0165EE">{{curr}}</text>
|
||||
<u-icon name="arrow-right" color="#0165EE" size="28"></u-icon>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view style="background-color: rgba(255,255,255,0);"
|
||||
class="width-100b height-96 radiu-20 padding-w-32 flex align-center justify-center">
|
||||
<view @click="current=1" class="width-150 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 @click="current=2" class="width-150 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>
|
||||
|
||||
<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">
|
||||
<view class="height-80 flex align-center justify-between">
|
||||
<text v-if="bank" @click="bankshow=true" class="flex-1 font-28 weight-bold">{{bank.bank_name}}({{bank.username}})</text>
|
||||
<text v-else @click="router.push('/pages/my/safety/payment')" class="flex-1 font-28 weight-bold">{{i18n.mine.safety.add}}</text>
|
||||
<i class="cuIcon-right font-28"></i>
|
||||
</view>
|
||||
<view v-if="bank" class="height-70 flex align-center justify-between">
|
||||
<text class="font-28 weight-bold">{{bank.card_num}}</text>
|
||||
<!-- <i @click="copy(bank.card_num)" class='cuIcon-copy font-30 color-0165EE'></i> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 币种选择 -->
|
||||
<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">
|
||||
<view class="height-116 padding-t-27 font-28 weight-bold">Select Coin</view>
|
||||
<view class="flex align-center flex-wrap">
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 链类型 -->
|
||||
<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">
|
||||
<view class="height-116 padding-t-27 font-28 weight-bold">{{i18n.withdraw.text2}}</view>
|
||||
<view class="flex align-center flex-wrap">
|
||||
<view @click="changelian(item,index)" v-for="(item,index) in detail"
|
||||
:class="index==lian?'onbox':'offbox'" class="numbold-font margin-r-14">{{item}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 地址 -->
|
||||
<view v-if="current==1"
|
||||
class="width-100b height-192 radiu-20 padding-w-32 padding-c-27 flex direction-column justify-between margin-t-24"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="font-28 weight-bold flex align-center justify-between">
|
||||
<text>{{i18n.withdraw.text3}}</text>
|
||||
<image @click="show1=true" class="width-32 height-32" src="/static/imgs/index/shaixuan@2x.png"
|
||||
mode=""></image>
|
||||
</view>
|
||||
<input class="font-28" :placeholder="i18n.withdraw.tos5" type="text" v-model="address" />
|
||||
</view>
|
||||
<!-- 数量 -->
|
||||
<view class="width-100b height-249 padding-w-32 radiu-20 margin-t-24"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="height-96 flex align-center font-28 weight-bold">{{i18n.withdraw.text4}}
|
||||
</view>
|
||||
<view class="height-153 padding-t-27 padding-b-23 flex direction-column justify-between">
|
||||
<view class="flex align-center justify-between">
|
||||
<input class="flex-1 padding-r-50 font-28" type="number" v-model="number"
|
||||
:placeholder="i18n.withdraw.tos2" />
|
||||
<view class="flex align-center">
|
||||
<text class="font-28 weight-bold">{{curr}}</text>
|
||||
<view class="width-2 height-23 bj-8B99A2 margin-w-10"></view>
|
||||
<text @click="number=data.num"
|
||||
class="font-28 color-0165EE weight-bold">{{i18n.withdraw.text5}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="font-24 numbold-font">{{i18n.withdraw.text6}}:{{data.num}} {{curr}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 手续费 -->
|
||||
<view class="width-100b height-96 radiu-20 padding-w-32 flex align-center justify-between margin-t-24"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<text class="font-28 weight-bold">{{i18n.withdraw.text7}}</text>
|
||||
<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 numbold-font margin-l-10">{{curr}}</text>
|
||||
</view>
|
||||
<view v-if="current==2" class="flex align-center">
|
||||
<text class="font-28 color-0165EE weight-bold">{{data.yhk_process}}</text>
|
||||
<text class="font-28 numbold-font margin-l-10">{{curr}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 折合 -->
|
||||
<!-- <view class="margin-t-20 padding-w-32 flex align-center font-28 color-333333">
|
||||
<text>折合</text>
|
||||
<text class="color-0165EE nummedium-font margin-w-5">{{data.apt_process}}</text>
|
||||
<text class="nummedium-font">APT</text>
|
||||
</view> -->
|
||||
|
||||
<!-- 提示 -->
|
||||
<view class="padding-w-32 margin-t-31" v-html="data.withdraw_text"></view>
|
||||
<!-- 提币按钮 -->
|
||||
<view class="width-600 margin-0-auto margin-t-65">
|
||||
<u-button v-if="current==1" @click="openshow1" class="custom-style" type="primary">
|
||||
{{i18n.withdraw.text10}}</u-button>
|
||||
<u-button v-if="current==2" @click="openshow2" class="custom-style" type="primary">
|
||||
{{i18n.withdraw.text10}}</u-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 币种弹窗 -->
|
||||
<u-popup v-model="show" mode="bottom" border-radius="20">
|
||||
<view class="height-437 padding-w-30 padding-b-36"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="flex align-center justify-between padding-c-32">
|
||||
<text class="font-28">{{i18n.withdraw.text11}}</text>
|
||||
<text @click.stop="show=false" class="font-26 color-C3C3C3">{{i18n.withdraw.text12}}</text>
|
||||
</view>
|
||||
<view class="height-278">
|
||||
<scroll-view scroll-y="true" class="height-250">
|
||||
<view @click.stop="changecurr(item)" v-for="(item,index) in list"
|
||||
class="height-72 padding-w-30 flex align-center margin-b-17 font-28">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 银行弹窗 -->
|
||||
<u-popup v-model="bankshow" mode="bottom" border-radius="20">
|
||||
<view class="height-517 padding-w-30 padding-b-36"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="flex align-center justify-between padding-c-32">
|
||||
<text class="font-28">{{i18n.fastRecord.text9}}</text>
|
||||
<text @click.stop="bankshow=false" class="font-26 color-C3C3C3">{{i18n.recharge.text8}}</text>
|
||||
</view>
|
||||
<view class="height-358">
|
||||
<scroll-view scroll-y="true" class="height-300">
|
||||
<view @click.stop="changebank(item)" v-for="(item,index) in bankList"
|
||||
class="height-72 flex align-center margin-b-17">
|
||||
<text class="font-28">{{item.bank_name}}({{item.username}})</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 地址弹窗 -->
|
||||
<u-popup v-model="show1" mode="bottom" border-radius="20">
|
||||
<view class="height-437 padding-w-30 padding-b-36"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="flex align-center justify-between padding-c-32">
|
||||
<text class="font-28">{{i18n.withdraw.text3}}</text>
|
||||
<text @click.stop="show1=false" class="font-26 color-C3C3C3">{{i18n.withdraw.text12}}</text>
|
||||
</view>
|
||||
<view class="height-278">
|
||||
<scroll-view scroll-y="true" class="height-278">
|
||||
<view @click="address=item.address,show1=false" v-for="(item,index) in list1" class="addressbox"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="height-70 flex align-center font-28" style="word-break: break-all;">
|
||||
{{item.address}}</view>
|
||||
<view class="height-30 line-height-30 font-24 color-C3C3C3">{{item.notice}}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<!-- 确认提币弹窗 -->
|
||||
<u-popup :mask-close-able="false" v-model="show2" mode="bottom" border-radius="20">
|
||||
<view class="padding-b-50 padding-w-30" :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<!-- 标题 -->
|
||||
<view class="flex align-center justify-between padding-c-32">
|
||||
<text class="font-28">{{i18n.withdraw.text16}}</text>
|
||||
<text @click.stop="show2=false" class="font-26 color-C3C3C3">{{i18n.withdraw.text12}}</text>
|
||||
</view>
|
||||
<!-- 交易密码 -->
|
||||
<view
|
||||
class="width-100b height-192 radiu-20 padding-w-32 padding-c-27 flex direction-column justify-between"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="font-28 weight-bold">{{i18n.withdraw.text8}}</view>
|
||||
<input class="font-28" :placeholder="i18n.withdraw.tos3" type="text" v-model="paypwd" password />
|
||||
</view>
|
||||
<!-- 邮箱验证 -->
|
||||
<!-- <view v-if="email!=''"
|
||||
class="width-100b height-192 radiu-20 padding-w-32 padding-c-27 flex direction-column justify-between margin-t-24"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="font-28 weight-bold flex align-center justify-between">
|
||||
<text>{{i18n.withdraw.text17}}</text>
|
||||
<text>{{email}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between">
|
||||
<input class="font-28 flex-1 padding-r-24" :placeholder="i18n.withdraw.tos9" type="text"
|
||||
v-model="code" />
|
||||
<text @click="cutTime()" class="font-28 color-0165EE weight-bold">{{codeText}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 手机验证 -->
|
||||
<!-- <view v-if="mobile!=''"
|
||||
class="width-100b height-192 radiu-20 padding-w-32 padding-c-27 flex direction-column justify-between margin-t-24"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="font-28 weight-bold flex align-center justify-between">
|
||||
<text>{{i18n.withdraw.text18}}</text>
|
||||
<text>{{mobile}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between">
|
||||
<input class="font-28 flex-1 padding-r-24" :placeholder="i18n.withdraw.tos10" type="text"
|
||||
v-model="code_m" />
|
||||
<text @click="cutTime2()" class="font-28 color-0165EE weight-bold">{{codeText2}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 谷歌验证 -->
|
||||
<!-- <view v-if="google" class="width-100b height-192 radiu-20 padding-w-32 padding-c-27 flex direction-column justify-between margin-t-24"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="font-28 weight-bold flex align-center justify-between">
|
||||
<text>{{i18n.withdraw.text19}}</text>
|
||||
</view>
|
||||
<view class="flex align-center justify-between">
|
||||
<input class="font-28 flex-1 padding-r-24" :placeholder="i18n.withdraw.tos11" type="text"
|
||||
v-model="code_g" />
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="width-600 margin-0-auto margin-t-65">
|
||||
<u-button @click="getwithdraw" class="custom-style" type="primary">{{i18n.withdraw.text10}}
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import clipboard from "@/components/clipboard.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
current: 1,
|
||||
list: [],
|
||||
list1: [],
|
||||
coinTypes: [],
|
||||
lian: 0,
|
||||
curr: '',
|
||||
currid: '',
|
||||
detail: [],
|
||||
data: '',
|
||||
show: false,
|
||||
show1: false,
|
||||
show2: false,
|
||||
address: '',
|
||||
number: '',
|
||||
paypwd: '',
|
||||
code: '',
|
||||
code_m: '',
|
||||
code_g: '',
|
||||
flag: true,
|
||||
time: '获取验证码',
|
||||
timeFlag: true,
|
||||
time2: '获取验证码',
|
||||
timeFlag2: true,
|
||||
email: '',
|
||||
mobile: '',
|
||||
google: false,
|
||||
|
||||
theme: '',
|
||||
|
||||
bankList: [],
|
||||
bank: {},
|
||||
bankshow: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
codeText() {
|
||||
if (this.time > 0) {
|
||||
return this.time + " S"
|
||||
} else {
|
||||
return this.i18n.withdraw.text13
|
||||
}
|
||||
},
|
||||
codeText2() {
|
||||
if (this.time2 > 0) {
|
||||
return this.time2 + " S"
|
||||
} else {
|
||||
return this.i18n.withdraw.text13
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.time = this.i18n.withdraw.text13
|
||||
if (e.type == 'saoma') {
|
||||
this.address = e.result
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getbank()
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
this.getcurrlist()
|
||||
this.getaddresslist()
|
||||
// this.getEmail()
|
||||
},
|
||||
methods: {
|
||||
openshow1() {
|
||||
if (this.address == '') return this.tos(this.i18n.withdraw.tos1)
|
||||
if (this.number == '') return this.tos(this.i18n.withdraw.tos2)
|
||||
this.show2 = true
|
||||
},
|
||||
openshow2() {
|
||||
if (this.number == '') return this.tos(this.i18n.withdraw.tos2)
|
||||
this.show2 = true
|
||||
},
|
||||
// 提交
|
||||
getwithdraw() {
|
||||
if (this.paypwd == '') return this.tos(this.i18n.withdraw.tos3)
|
||||
// if (this.email != '') {
|
||||
// if (this.code == '') return this.tos(this.i18n.withdraw.tos9)
|
||||
// }
|
||||
// if (this.mobile != '') {
|
||||
// if (this.code_m == '') return this.tos(this.i18n.withdraw.tos10)
|
||||
// }
|
||||
// if (this.google) {
|
||||
// if (this.code_g == '') return this.tos(this.i18n.withdraw.tos11)
|
||||
// }
|
||||
if (!this.flag) {
|
||||
return
|
||||
} else {
|
||||
this.flag = false
|
||||
let obj = {}
|
||||
if (this.current == 1) {
|
||||
obj = {
|
||||
type: 1,
|
||||
address: this.address,
|
||||
lian: this.detail[this.lian],
|
||||
num: this.number,
|
||||
pay_pwd: this.paypwd,
|
||||
code: this.code,
|
||||
code_m: this.code_m,
|
||||
code_g: this.code_g
|
||||
}
|
||||
}
|
||||
if (this.current == 2) {
|
||||
obj = {
|
||||
type: 2,
|
||||
coll_id: this.bank.id,
|
||||
num: this.number,
|
||||
pay_pwd: this.paypwd,
|
||||
code: this.code,
|
||||
code_m: this.code_m,
|
||||
code_g: this.code_g
|
||||
}
|
||||
}
|
||||
console.log(obj)
|
||||
this.post('/wallet/withdraw', obj, true).then(res => {
|
||||
console.log(res)
|
||||
this.flag = true
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.paypwd = ''
|
||||
this.show2 = false
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/withdrawalRecord'
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 获取提币内容
|
||||
getdetails(id) {
|
||||
this.post('/wallet/get_withdraw', {
|
||||
id: id
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.detail = res.data.lian
|
||||
this.data = res.data
|
||||
this.lian = 0
|
||||
this.email = res.data.email
|
||||
this.mobile = res.data.mobile
|
||||
this.google = res.data.is_google
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取币种
|
||||
getcurrlist() {
|
||||
this.post('/wallet/wid_curr').then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.list = res.data
|
||||
// 构建币种选择列表,确保包含 BTC 和 ETH
|
||||
let types = [...res.data]
|
||||
let names = types.map(t => t.name.toUpperCase())
|
||||
if (!names.includes('BTC')) {
|
||||
types.push({ id: 'btc_static', name: 'BTC' })
|
||||
}
|
||||
if (!names.includes('ETH')) {
|
||||
types.push({ id: 'eth_static', name: 'ETH' })
|
||||
}
|
||||
this.coinTypes = types
|
||||
this.curr = res.data[0].name
|
||||
this.currid = res.data[0].id
|
||||
this.getdetails(this.currid)
|
||||
}
|
||||
})
|
||||
},
|
||||
changeCoinType(item) {
|
||||
if (this.currid == item.id) return
|
||||
this.curr = item.name
|
||||
this.currid = item.id
|
||||
this.address = ''
|
||||
this.number = ''
|
||||
this.getdetails(this.currid)
|
||||
},
|
||||
// 获取地址
|
||||
getaddresslist() {
|
||||
this.post('/my/address_list').then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.list1 = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getbank() {
|
||||
this.post('/my/collection_list').then(res => {
|
||||
console.log('银行卡', res)
|
||||
if (res.code == 1) {
|
||||
this.bankList = res.data
|
||||
this.bank = res.data[0]
|
||||
}
|
||||
})
|
||||
},
|
||||
changebank(item) {
|
||||
this.bank = item
|
||||
this.bankshow = false
|
||||
},
|
||||
changecurr(item) {
|
||||
this.curr = item.name
|
||||
this.currid = item.id
|
||||
this.getdetails(this.currid)
|
||||
this.show = false
|
||||
},
|
||||
changelian(item, index) {
|
||||
if (this.lian != index) {
|
||||
this.lian = index
|
||||
console.log(this.detail[this.lian])
|
||||
}
|
||||
},
|
||||
getEmail() {
|
||||
this.post('/my/get_userinfo').then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.email = res.data.email
|
||||
}
|
||||
})
|
||||
},
|
||||
cutTime() {
|
||||
if (!this.timeFlag) return
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
})
|
||||
this.timeFlag = false
|
||||
this.post('/ems/send', {
|
||||
email: this.email,
|
||||
event: "withdraw",
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
this.tos(this.i18n.withdraw.tos7)
|
||||
this.time = 120
|
||||
var that = this
|
||||
let timeName = setInterval(() => {
|
||||
if (that.time > 0) {
|
||||
that.time--
|
||||
} else {
|
||||
that.time = that.i18n.withdraw.text13
|
||||
that.timeFlag = true
|
||||
clearInterval(timeName)
|
||||
}
|
||||
}, 1000)
|
||||
} else {
|
||||
this.timeFlag = true
|
||||
}
|
||||
})
|
||||
},
|
||||
cutTime2() {
|
||||
if (!this.timeFlag2) return
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
})
|
||||
this.timeFlag2 = false
|
||||
this.post('/sms/send', {
|
||||
mobile: this.mobile,
|
||||
event: "withdraw",
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
this.tos(this.i18n.withdraw.tos7)
|
||||
this.time2 = 120
|
||||
var that = this
|
||||
let timeName2 = setInterval(() => {
|
||||
if (that.time2 > 0) {
|
||||
that.time2--
|
||||
} else {
|
||||
that.time2 = that.i18n.withdraw.text13
|
||||
that.timeFlag2 = true
|
||||
clearInterval(timeName2)
|
||||
}
|
||||
}, 1000)
|
||||
} else {
|
||||
this.timeFlag2 = true
|
||||
}
|
||||
})
|
||||
},
|
||||
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">
|
||||
.onbox {
|
||||
height: 56rpx;
|
||||
padding: 0 24rpx;
|
||||
background: linear-gradient(180deg, #52F3C9 0%, #3ECEB2 100%);
|
||||
border-radius: 28rpx;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
font-size: 30rpx;
|
||||
color: #FFFFFF;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.offbox {
|
||||
height: 56rpx;
|
||||
padding: 0 24rpx;
|
||||
background: rgba(139, 153, 162, 0.2);
|
||||
border-radius: 28rpx;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
font-size: 30rpx;
|
||||
color: #8B99A2;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.custom-style {
|
||||
width: 600rpx;
|
||||
height: 86rpx;
|
||||
background: linear-gradient(180deg, #52F3C9 0%, #3ECEB2 100%);
|
||||
border-radius: 20rpx;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.addressbox {
|
||||
width: 690rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 20rpx;
|
||||
// background-color: rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 10rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="i18n.withdraw.title3"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-b-40 padding-w-30 padding-t-84">
|
||||
<view class="flex direction-column align-center">
|
||||
<image v-if="data.status==1" class="width-186 height-186" src="/static/imgs/index/tibiok.png" mode=""></image>
|
||||
<image v-else class="width-186 height-186" src="/static/imgs/index/tibiok2.png" mode=""></image>
|
||||
<view class="margin-t-51 margin-b-11">
|
||||
<text class="font-42 numbold-font">{{data.price}}</text>
|
||||
<text class="font-26 nummedium-font margin-l-5">{{data.name}}</text>
|
||||
</view>
|
||||
<text class="font-28 color-C3C3C3">{{i18n.recharge.text9}}</text>
|
||||
</view>
|
||||
<view class="width-690 height-480 radiu-20 margin-t-48 padding-w-32 padding-c-28 flex direction-column justify-between"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="flex align-center">
|
||||
<view class="flex-3 font-28 color-C3C3C3">{{i18n.recharge.text10}}</view>
|
||||
<view class="flex-9 font-28 weight-bold">{{i18n.withdraw.text15}}</view>
|
||||
</view>
|
||||
<view class="flex align-center">
|
||||
<view class="flex-3 font-28 color-C3C3C3">{{i18n.recharge.text11}}</view>
|
||||
<view :class="data.status==1?'color-00C481':'color-FF4040'" class="flex-9 font-28 weight-bold">{{statusText[data.status]}}</view>
|
||||
</view>
|
||||
<view class="flex align-center">
|
||||
<view class="flex-3 font-28 color-C3C3C3">{{i18n.recharge.text12}}</view>
|
||||
<view class="flex-9 font-28 numbold-font">{{data.name}}</view>
|
||||
</view>
|
||||
<view v-if="data.hash" class="flex align-center">
|
||||
<view class="flex-1 font-28 color-C3C3C3">{{i18n.recharge.text13}}</view>
|
||||
<view class="width-470 font-28 numbold-font" style="word-wrap: break-word;">{{data.hash}}</view>
|
||||
</view>
|
||||
<view v-if="data.bank_name" class="flex align-center">
|
||||
<view class="flex-3 font-28 color-C3C3C3">{{i18n.recharge.title15}}</view>
|
||||
<view class="flex-9 font-28 numbold-font">{{data.bank_name}}({{data.bank_user}})</view>
|
||||
</view>
|
||||
<view v-if="data.card_num" class="flex align-center">
|
||||
<view class="flex-3 font-28 color-C3C3C3">{{i18n.recharge.title16}}</view>
|
||||
<view class="flex-9 font-28 numbold-font">{{data.card_num}}</view>
|
||||
</view>
|
||||
<view class="flex align-center">
|
||||
<view class="flex-3 font-28 color-C3C3C3">{{i18n.recharge.text14}}</view>
|
||||
<view class="flex-9 font-28 numbold-font">{{data.createtime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
data: '',
|
||||
statusText: ['', '', ''],
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.changestatus()
|
||||
this.getDetails(e.id)
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changestatus() {
|
||||
this.statusText[0] = this.i18n.recharge.text15
|
||||
this.statusText[1] = this.i18n.recharge.text16
|
||||
this.statusText[2] = this.i18n.recharge.text17
|
||||
},
|
||||
getDetails(id) {
|
||||
let obj = {
|
||||
id: id,
|
||||
cart: 2
|
||||
}
|
||||
this.post('/wallet/recharge_con', obj).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.data = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
@@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<view>
|
||||
<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.withdraw.title2"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-b-40">
|
||||
<view @click="goDetails(item.id)" v-for="(item,index) in list"
|
||||
class="padding-w-30 padding-t-24 flex direction-column margin-t-16">
|
||||
<view class="flex align-center justify-between">
|
||||
<text class="font-32 color-FF4040 nummedium-font">-{{item.price}}</text>
|
||||
<text v-if="item.status==0" class="font-28 nummedium-font">{{i18n.recharge.title12}}</text>
|
||||
<text v-if="item.status==1" class="font-28 nummedium-font">{{i18n.recharge.title13}}</text>
|
||||
<text v-if="item.status==2" class="font-28 nummedium-font">{{i18n.recharge.title14}}</text>
|
||||
</view>
|
||||
<text class="font-24 color-C3C3C3 nummedium-font margin-t-20">{{item.createtime}}</text>
|
||||
<view v-if="item.description" class="padding-20 color-FF4040">
|
||||
{{item.description}}
|
||||
</view>
|
||||
</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) {
|
||||
setTimeout(() => {
|
||||
this.post('/wallet/get_width_log', {
|
||||
page: pageNo,
|
||||
page_num: pageSize
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
},
|
||||
goDetails(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/withdrawalDetails?id=' + id
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
@@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="i18n.newWord.details"></myNav>
|
||||
<view class="listBox">
|
||||
<view class="height-110 flex align-center justify-between">
|
||||
<view class="height-100b flex align-center">
|
||||
<image class="width-96 height-96 radiu-50b margin-r-16" :src="obj.avatar" mode=""></image>
|
||||
<view class="height-78 flex direction-column align-start justify-between">
|
||||
<text class="font-28 bold-font">{{obj.nickname}}</text>
|
||||
<text class="font-24 color-C7C7C7 nummedium-font">{{obj.addtime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="font-24 color-C7C7C7 bold-font">{{obj.look_num}}{{i18n.newWord.look}}</text>
|
||||
</view>
|
||||
|
||||
<view class="font-28 nummedium-font padding-c-10">
|
||||
{{obj.title}}
|
||||
</view>
|
||||
<view class="nummedium-font padding-c-10" v-html="obj.content"></view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
obj:{},
|
||||
theme:''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
},
|
||||
onLoad(e) {
|
||||
this.getInfo(e.id)
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getInfo(id){
|
||||
this.post('/index/zixun_con',{
|
||||
id:id
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if(res.code == 1){
|
||||
this.obj = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.listBox {
|
||||
width: 100%;
|
||||
// height: 544rpx;
|
||||
// background-color: #FFFFFF;
|
||||
margin-bottom: 8rpx;
|
||||
padding: 10rpx 24rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 固定导航栏 -->
|
||||
<view class="custom-navbar" :style="{backgroundColor: theme.bg}">
|
||||
<view class="navbar-content" :style="{paddingTop: statusBar + 'px', color: theme.text, height: `calc(${statusBar}px + 55px)`}">
|
||||
<text class="navbar-title">{{i18n.newWord.info}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 占位空间 -->
|
||||
<view :style="{height: `calc(${statusBar}px + 55px)`}"></view>
|
||||
|
||||
<z-paging :language="$i18n.locale" ref="paging" v-model="list" @query="queryList" :pageSize="10"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text" :use-page-scroll="true"
|
||||
:loading-more-enabled="true" :empty-view-text="i18n.newWord.noData || '暂无数据'">
|
||||
<!-- 下拉刷新 -->
|
||||
<custom-refresher slot="refresher" slot-scope="{refresherStatus}" :status="refresherStatus">
|
||||
</custom-refresher>
|
||||
|
||||
<!-- 文章列表 -->
|
||||
<view class="article-list">
|
||||
<view class="article-item" v-for="(item,index) in list" :key="index">
|
||||
<view class="article-time">{{formatTime(item.addtime)}}</view>
|
||||
<view class="article-content">{{item.title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
theme: '',
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatTime(timeStr) {
|
||||
// 如果已经是格式化的字符串,直接返回
|
||||
if (typeof timeStr === 'string' && timeStr.includes('-')) {
|
||||
const date = new Date(timeStr.replace(/-/g, '/'));
|
||||
return this.formatDate(date);
|
||||
}
|
||||
// 如果是时间戳
|
||||
if (typeof timeStr === 'number') {
|
||||
const date = new Date(timeStr * 1000);
|
||||
return this.formatDate(date);
|
||||
}
|
||||
return timeStr;
|
||||
},
|
||||
formatDate(date) {
|
||||
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
||||
const month = months[date.getMonth()];
|
||||
const day = date.getDate();
|
||||
const year = date.getFullYear();
|
||||
const hours = String(date.getHours()).padStart(2, '0');
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||
|
||||
return `${month} ${day}, ${year} ${hours}:${minutes}:${seconds}`;
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
this.post('/index/all_zixun', {
|
||||
page: pageNo,
|
||||
page_num: pageSize
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
} else {
|
||||
// 请求失败
|
||||
this.$refs.paging.complete(false);
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('请求失败', err);
|
||||
// 请求异常
|
||||
this.$refs.paging.complete(false);
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.custom-navbar {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.navbar-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 32rpx;
|
||||
padding-right: 32rpx;
|
||||
}
|
||||
|
||||
.navbar-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.article-list {
|
||||
padding: 20rpx 32rpx;
|
||||
}
|
||||
|
||||
.article-item {
|
||||
margin-bottom: 40rpx;
|
||||
padding-bottom: 40rpx;
|
||||
border-bottom: 1rpx solid #F0F0F0;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
.article-time {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-bottom: 20rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.article-content {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 1.6;
|
||||
text-align: justify;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,20 @@
|
||||
const expression = [
|
||||
{'title':'[zy]', 'src':'/emoji/1.png'},{'title':'[zm]', 'src':'/emoji/2.png'},{'title':'[jy]', 'src':'/emoji/3.png'},
|
||||
{'title':'[jyb]', 'src':'/emoji/4.png'},{'title':'[bx]', 'src':'/emoji/5.png'},{'title':'[kzn]', 'src':'/emoji/6.png'},
|
||||
{'title':'[gg]', 'src':'/emoji/7.png'},{'title':'[ll]', 'src':'/emoji/8.png'},{'title':'[jyll]', 'src':'/emoji/9.png'},
|
||||
{'title':'[o]', 'src':'/emoji/10.png'},{'title':'[yz]', 'src':'/emoji/11.png'},{'title':'[wx]', 'src':'/emoji/12.png'},
|
||||
{'title':'[zyb]', 'src':'/emoji/13.png'},{'title':'[tp]', 'src':'/emoji/14.png'},{'title':'[wxb]', 'src':'/emoji/15.png'},
|
||||
{'title':'[zyc]', 'src':'/emoji/16.png'},{'title':'[llb]', 'src':'/emoji/17.png'},{'title':'[xm]', 'src':'/emoji/18.png'},
|
||||
{'title':'[qz]', 'src':'/emoji/19.png'},{'title':'[zmb]', 'src':'/emoji/20.png'},{'title':'[kx]', 'src':'/emoji/21.png'},
|
||||
{'title':'[mm]', 'src':'/emoji/22.png'},{'title':'[bz]', 'src':'/emoji/23.png'},{'title':'[bkx]', 'src':'/emoji/24.png'},
|
||||
{'title':'[mg]', 'src':'/emoji/25.png'},{'title':'[pz]', 'src':'/emoji/26.png'},{'title':'[pzb]', 'src':'/emoji/27.png'},
|
||||
{'title':'[wxc]', 'src':'/emoji/28.png'},{'title':'[jyc]', 'src':'/emoji/29.png'},{'title':'[jyd]', 'src':'/emoji/30.png'},
|
||||
{'title':'[dm]', 'src':'/emoji/31.png'},{'title':'[tpb]', 'src':'/emoji/32.png'},{'title':'[tpc]', 'src':'/emoji/33.png'},
|
||||
{'title':'[tpd]', 'src':'/emoji/34.png'},{'title':'[ly]', 'src':'/emoji/35.png'},{'title':'[zyd]', 'src':'/emoji/36.png'},
|
||||
];
|
||||
|
||||
export default {
|
||||
baseURL: 'jyshd.pp1008.top', // 启动workerman服务的域名,无需填写协议和端口
|
||||
https_switch: true, // 是否启用https协议(默认关,正式版必开,且需要参考文档创建wss服务)
|
||||
expression
|
||||
}
|
||||
+1510
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav title=""></myNav>
|
||||
|
||||
<radio-group class="padding-w-30" @change="radioChange">
|
||||
<label v-for="(item, index) in dataList" :key="index" class="lang-list"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="option">
|
||||
<view class="margin-r-18">
|
||||
<!-- <image :src="item.imgUrl" mode="widthFix"></image> -->
|
||||
</view>
|
||||
<text class="font-28">{{ item.value }}</text>
|
||||
</view>
|
||||
<radio :value="item.value" :checked="item.checked" color="#06C38D"></radio>
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
current: 0,
|
||||
dataList: [{
|
||||
imgUrl: '/static/logo/en.png',
|
||||
value: 'English',
|
||||
checked: false,
|
||||
language: 'en-us'
|
||||
},
|
||||
{
|
||||
imgUrl: '/static/logo/jp.png',
|
||||
value: '日本語', //日语
|
||||
checked: false,
|
||||
language: 'jp'
|
||||
},
|
||||
{
|
||||
imgUrl: '/static/logo/cn.png',
|
||||
value: '繁体中文',
|
||||
checked: false,
|
||||
language: 'zh-cn'
|
||||
},
|
||||
|
||||
{
|
||||
imgUrl: '/static/logo/mn.png',
|
||||
value: 'Монгол', //蒙古
|
||||
checked: false,
|
||||
language: 'mn'
|
||||
},
|
||||
{
|
||||
imgUrl: '/static/logo/ms.png',
|
||||
value: 'Malaysia', //马来语
|
||||
checked: false,
|
||||
language: 'ms'
|
||||
},
|
||||
{
|
||||
imgUrl: '/static/logo/kr.png',
|
||||
value: '한국어', //韩文
|
||||
checked: false,
|
||||
language: 'kr'
|
||||
},
|
||||
{
|
||||
imgUrl: '/static/logo/fre.png',
|
||||
value: 'français', //法语
|
||||
checked: false,
|
||||
language: 'fre'
|
||||
},
|
||||
{
|
||||
imgUrl: '/static/logo/ger.png',
|
||||
value: 'Deutsch', //德语
|
||||
checked: false,
|
||||
language: 'ger'
|
||||
},
|
||||
{
|
||||
imgUrl: '/static/logo/ily.png',
|
||||
value: 'Italiano', //意大利语
|
||||
checked: false,
|
||||
language: 'ily'
|
||||
},
|
||||
],
|
||||
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
|
||||
}
|
||||
let items = this.dataList;
|
||||
let ind = 0
|
||||
let lang = 'en-us'
|
||||
if (uni.getStorageSync('index')) {
|
||||
ind = uni.getStorageSync('index')
|
||||
lang = uni.getStorageSync('Language');
|
||||
}
|
||||
if (lang) {
|
||||
items[ind].checked = true;
|
||||
this.$i18n.locale = lang;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
radioChange(e) {
|
||||
let _this = this;
|
||||
let items = _this.dataList;
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
if (items[i].value == e.target.value) {
|
||||
items[i].checked = true;
|
||||
// 存储选择的下标
|
||||
uni.setStorageSync('index', i);
|
||||
// 存储选择的语言
|
||||
uni.setStorageSync('Language', items[i].language);
|
||||
_this.$i18n.locale = items[i].language;
|
||||
}
|
||||
}
|
||||
setTimeout(function() {
|
||||
uni.navigateBack();
|
||||
}, 300);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.lang-list {
|
||||
width: 690rpx;
|
||||
height: 96rpx;
|
||||
padding: 0 15rpx;
|
||||
margin: 24rpx auto;
|
||||
// background: #FFFFFF;
|
||||
border: 1rpx solid rgba(103, 114, 148, 0.1);
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.lang-list .option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.lang-list .option .img image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.lang-list radio {
|
||||
transform: scale(0.7);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,279 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" class="forgetPage">
|
||||
<view class="forgetClose" @click="onClose">×</view>
|
||||
<image class="forgetLang" :src="i18n.login.langImg" mode="aspectFit" @click="router.push('/pages/lang/lang')"></image>
|
||||
|
||||
<view class="forgetBrand">
|
||||
<image class="forgetLogo" src="../../static/logo/logo.jpg" mode="widthFix"></image>
|
||||
<view class="forgetBrandText">C1 fund</view>
|
||||
</view>
|
||||
|
||||
<view class="forgetWrap">
|
||||
<view class="forgetTitle">{{i18n.forget.title}}</view>
|
||||
|
||||
<view class="forgetField">
|
||||
<view class="forgetLabel">{{i18n.forget.phone}}</view>
|
||||
<view class="forgetInputBox">
|
||||
<input class="forgetInput" type="text" v-model="email" :placeholder="i18n.forget.phoneTag" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="forgetField">
|
||||
<view class="forgetLabel">{{i18n.forget.code}}</view>
|
||||
<view class="forgetInputBox forgetInputBoxCode">
|
||||
<input class="forgetInput" type="text" v-model="captcha" :placeholder="i18n.forget.codeTag" />
|
||||
<text class="forgetCodeBtn" @click="cutTime()">{{codeText}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="forgetField">
|
||||
<view class="forgetLabel">{{i18n.forget.newPassword}}</view>
|
||||
<view class="forgetInputBox">
|
||||
<input class="forgetInput" type="text" v-model="pwd1" password :placeholder="i18n.forget.newTag" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="forgetField">
|
||||
<view class="forgetLabel">{{i18n.forget.confirm}}</view>
|
||||
<view class="forgetInputBox">
|
||||
<input class="forgetInput" type="text" v-model="pwd2" password :placeholder="i18n.forget.confirminput" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<button @click="forgot" class="cu-btn forgetBtn">{{i18n.forget.sure}}</button>
|
||||
<view class="height-40"></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
email: '',
|
||||
pwd1: '',
|
||||
pwd2: '',
|
||||
captcha: '',
|
||||
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.forget.get
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClose() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
forgot() {
|
||||
if (!this.flag) return
|
||||
if (this.email == '') {
|
||||
this.tos(this.i18n.forget.phoneTag)
|
||||
return
|
||||
}
|
||||
if (this.captcha == '') {
|
||||
this.tos(this.i18n.forget.codeTag)
|
||||
return
|
||||
}
|
||||
if (this.pwd1 == '') {
|
||||
this.tos(this.i18n.forget.newTag)
|
||||
return
|
||||
}
|
||||
if (this.pwd2 == '') {
|
||||
this.tos(this.i18n.forget.confirminput)
|
||||
return
|
||||
}
|
||||
if (this.pwd2 !== this.pwd1) {
|
||||
this.tos(this.i18n.forget.pwdInconsistent)
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title: this.i18n.forget.loading,
|
||||
mask: true
|
||||
})
|
||||
var obj = {
|
||||
email: this.email,
|
||||
newpassword: this.pwd2,
|
||||
captcha: this.captcha,
|
||||
types: 'pwd',
|
||||
}
|
||||
this.flag = false
|
||||
this.post('/user/resetpwd', 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?email=' + this.email
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
},
|
||||
cutTime() {
|
||||
if (!this.timeFlag) return
|
||||
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: "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
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.forgetPage {
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
padding-bottom: 60rpx;
|
||||
}
|
||||
|
||||
.forgetClose {
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
top: 24rpx;
|
||||
font-size: 44rpx;
|
||||
line-height: 44rpx;
|
||||
color: #111111;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.forgetLang {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 26rpx;
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.forgetBrand {
|
||||
padding-top: 110rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.forgetLogo {
|
||||
width: 150rpx;
|
||||
}
|
||||
|
||||
.forgetBrandText {
|
||||
margin-top: 16rpx;
|
||||
font-size: 28rpx;
|
||||
color: #111111;
|
||||
}
|
||||
|
||||
.forgetWrap {
|
||||
padding: 50rpx 60rpx 0;
|
||||
}
|
||||
|
||||
.forgetTitle {
|
||||
font-size: 44rpx;
|
||||
font-weight: 700;
|
||||
color: #111111;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
|
||||
.forgetField {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.forgetLabel {
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
color: #111111;
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.forgetInputBox {
|
||||
height: 88rpx;
|
||||
background: #EAF3FF;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 22rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.forgetInputBoxCode {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.forgetInput {
|
||||
flex: 1;
|
||||
height: 88rpx;
|
||||
font-size: 28rpx;
|
||||
color: #111111;
|
||||
}
|
||||
|
||||
.forgetCodeBtn {
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
color: #1A74FF;
|
||||
margin-left: 18rpx;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.forgetBtn {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
background: #1A74FF !important;
|
||||
border-radius: 10rpx;
|
||||
line-height: 90rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 30rpx;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,283 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" class="loginPage">
|
||||
<view class="loginClose" @click="onClose">×</view>
|
||||
<image class="loginLang" :src="i18n.login.langImg" mode="aspectFit" @click="router.push('/pages/lang/lang')"></image>
|
||||
|
||||
<view class="loginBrand">
|
||||
<image class="loginLogo" src="../../static/logo/logo.jpg" mode="widthFix"></image>
|
||||
<view class="loginBrandText">C1 fund</view>
|
||||
</view>
|
||||
|
||||
<view class="loginWrap">
|
||||
<view class="loginTitle">{{i18n.login.login}}</view>
|
||||
|
||||
<view class="loginTab">{{i18n.login.account}}</view>
|
||||
|
||||
<view class="loginField">
|
||||
<view class="loginLabel">{{i18n.login.account}}</view>
|
||||
<view class="loginInputBox">
|
||||
<input class="loginInput" type="text" v-model="account" :placeholder="i18n.login.accountTag" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="loginField">
|
||||
<view class="loginLabel">{{i18n.login.password}}</view>
|
||||
<view class="loginInputBox loginInputBoxPwd">
|
||||
<input class="loginInput" type="text" v-model="password" :password="ifcover"
|
||||
:placeholder="i18n.login.inputPassword" @confirm="login" />
|
||||
<image @click="ifcover=!ifcover" class="loginEye" :src="ifcover?ZY:BY" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="loginForget" @click="router.push('/pages/login/forget')">{{i18n.login.forget}}</view>
|
||||
|
||||
<button @click="login" class="cu-btn loginBtn">{{i18n.login.login}}</button>
|
||||
<view class="loginRegLine">
|
||||
<text>{{i18n.login.noAccount}}</text>
|
||||
<text class="loginRegLink" @click="router.push('/pages/login/register')">{{i18n.login.registration}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottomBox">
|
||||
<image @click="checked=(!checked)" class="width-28 height-28 margin-r-10" :src="checked?xuanzhong:weixuan" mode=""></image>
|
||||
<view class="line-height-30 text-center" style="max-width: 600rpx;">
|
||||
<text class="font-24">
|
||||
<span @click="checked=(!checked)">{{i18n.login.tag}}</span>
|
||||
<span @click="router.push('/pages/my/aboutUs/women?title=agreement')" class="">{{i18n.login.tag1}}</span>{{i18n.login.tag2}}
|
||||
<span @click="router.push('/pages/my/aboutUs/women?title=privacy_treaty')" class="">{{i18n.login.tag3}}</span>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
account: '',
|
||||
password: '',
|
||||
|
||||
ZY: '/static/imgs/login/zhengyan@2x.png',
|
||||
BY: '/static/imgs/login/biyan@2x.png',
|
||||
xuanzhong: '/static/imgs/quantify/xuanzhong@2x.png',
|
||||
weixuan: '/static/imgs/quantify/weixuanzhong@2x.png',
|
||||
ifcover: true,
|
||||
checked: true,
|
||||
|
||||
flag: true,
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.email) {
|
||||
this.account = option.email
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClose() {
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
},
|
||||
checkboxChange(e) {
|
||||
this.checked = e.value
|
||||
console.log(e);
|
||||
console.log(this.checked);
|
||||
},
|
||||
login() {
|
||||
if (!this.flag) return
|
||||
if (this.account == '') {
|
||||
this.tos(this.i18n.login.accountTag)
|
||||
return
|
||||
}
|
||||
if (this.password == '') {
|
||||
this.tos(this.i18n.login.inputPassword)
|
||||
return
|
||||
}
|
||||
if (!this.checked) {
|
||||
this.tos(this.i18n.login.tos1)
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title: this.i18n.login.loading,
|
||||
mask: true
|
||||
})
|
||||
this.flag = false
|
||||
this.post('/user/login', {
|
||||
account: this.account,
|
||||
password: this.password,
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
uni.hideLoading()
|
||||
this.flag = true
|
||||
if (res.code == 1) {
|
||||
console.log('登录成功', res)
|
||||
uni.setStorageSync("token", res.data.userinfo.token)
|
||||
uni.setStorageSync("user_id", res.data.userinfo.user_id)
|
||||
uni.setStorageSync("userinfo", res.data.userinfo)
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.loginPage {
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
padding-bottom: 60rpx;
|
||||
}
|
||||
|
||||
.loginClose {
|
||||
position: absolute;
|
||||
left: 30rpx;
|
||||
top: 24rpx;
|
||||
font-size: 44rpx;
|
||||
line-height: 44rpx;
|
||||
color: #111111;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.loginLang {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 26rpx;
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.loginBrand {
|
||||
padding-top: 110rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.loginLogo {
|
||||
width: 150rpx;
|
||||
}
|
||||
|
||||
.loginBrandText {
|
||||
margin-top: 16rpx;
|
||||
font-size: 28rpx;
|
||||
color: #111111;
|
||||
}
|
||||
|
||||
.loginWrap {
|
||||
padding: 50rpx 60rpx 0;
|
||||
}
|
||||
|
||||
.loginTitle {
|
||||
font-size: 44rpx;
|
||||
font-weight: 700;
|
||||
color: #111111;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
|
||||
.loginTab {
|
||||
display: inline-block;
|
||||
background: #EAF3FF;
|
||||
color: #1A74FF;
|
||||
font-size: 26rpx;
|
||||
padding: 10rpx 22rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-bottom: 26rpx;
|
||||
}
|
||||
|
||||
.loginField {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.loginLabel {
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
color: #111111;
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.loginInputBox {
|
||||
height: 88rpx;
|
||||
background: #EAF3FF;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 22rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.loginInputBoxPwd {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.loginInput {
|
||||
flex: 1;
|
||||
height: 88rpx;
|
||||
font-size: 28rpx;
|
||||
color: #111111;
|
||||
}
|
||||
|
||||
.loginEye {
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
margin-left: 16rpx;
|
||||
flex: 0 0 34rpx;
|
||||
}
|
||||
|
||||
.loginForget {
|
||||
margin-top: 6rpx;
|
||||
font-size: 26rpx;
|
||||
color: #1A74FF;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
|
||||
.loginBtn {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
background: #1A74FF !important;
|
||||
border-radius: 10rpx;
|
||||
line-height: 90rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 30rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.loginRegLine {
|
||||
margin-top: 22rpx;
|
||||
font-size: 26rpx;
|
||||
color: #111111;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
.loginRegLink {
|
||||
color: #1A74FF;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
.bottomBox {
|
||||
width: 750rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
margin-top: 80rpx;
|
||||
// position: fixed;
|
||||
// bottom: 20rpx;
|
||||
// text-align: center;
|
||||
color: #BCBCBC;
|
||||
display: flex;
|
||||
// align-items: center;
|
||||
align-items: stretch;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,344 @@
|
||||
<template>
|
||||
<view class="regPage" :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<myNav :title="''"></myNav>
|
||||
<view class="regBody">
|
||||
<!-- 标题 -->
|
||||
<text class="regTitle">{{i18n.regist.navTitle}}</text>
|
||||
|
||||
<!-- Tab -->
|
||||
<view class="regTabs">
|
||||
<view class="regTab regTabActive">
|
||||
<text class="font-26 color-white">{{i18n.regist.phone}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 邮箱 -->
|
||||
<view class="regField">
|
||||
<text class="regLabel">{{i18n.regist.phone}}</text>
|
||||
<view class="regInputBox">
|
||||
<input class="regInput" type="text" v-model="email" :placeholder="i18n.regist.phoneTag" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 手机号(可选) -->
|
||||
<view class="regField">
|
||||
<text class="regLabel">{{i18n.regist.mobile}}</text>
|
||||
<view class="regInputBox">
|
||||
<input class="regInput" type="text" v-model="mobile" :placeholder="i18n.regist.mobileTag" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 密码 -->
|
||||
<view class="regField">
|
||||
<text class="regLabel">{{i18n.regist.login}}</text>
|
||||
<view class="regInputBox">
|
||||
<input class="regInput" type="text" v-model="password" password :placeholder="i18n.regist.loginTag" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 确认密码 -->
|
||||
<view class="regField">
|
||||
<text class="regLabel">{{i18n.regist.confirm}}</text>
|
||||
<view class="regInputBox">
|
||||
<input class="regInput" type="text" v-model="password2" password :placeholder="i18n.regist.confirmTag" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 邀请码 -->
|
||||
<view class="regField">
|
||||
<text class="regLabel">{{i18n.regist.invitation}}</text>
|
||||
<view class="regInputBox">
|
||||
<input class="regInput" type="text" v-model="referral_code" :placeholder="i18n.regist.invitationTag" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 验证码 -->
|
||||
<view class="regField">
|
||||
<text class="regLabel">{{i18n.regist.code}}</text>
|
||||
<view class="regInputBox regInputRow">
|
||||
<input class="regInput" type="text" v-model="code" :placeholder="i18n.regist.codeTag" />
|
||||
<text class="regCodeBtn" @click="cutTime()">{{codeText}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 协议 -->
|
||||
<view class="regAgree" @click="agreed=!agreed">
|
||||
<view class="regCheckbox" :class="agreed?'regChecked':''">
|
||||
<text v-if="agreed" class="font-24 color-white">✓</text>
|
||||
</view>
|
||||
<text class="font-24 color-999">{{i18n.login.tag}}</text>
|
||||
<text class="font-24 regLink" @click.stop="router.push('/pages/my/aboutUs/agreement')">{{i18n.login.tag1}}</text>
|
||||
</view>
|
||||
|
||||
<!-- 注册按钮 -->
|
||||
<button @click="register" class="cu-btn regBtn">{{i18n.regist.navTitle}}</button>
|
||||
|
||||
<!-- 已有账号 -->
|
||||
<view class="regFooter">
|
||||
<text class="font-26 color-999">{{i18n.login.noAccount}}</text>
|
||||
<text class="font-26 regLink" @click="router.push('/pages/login/index')">{{i18n.login.login}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
email: '',
|
||||
mobile: '',
|
||||
password: '',
|
||||
password2: '',
|
||||
code: '',
|
||||
referral_code: '',
|
||||
flag: true,
|
||||
time: '获取验证码',
|
||||
timeFlag: true,
|
||||
agreed: false,
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
codeText() {
|
||||
if (this.time > 0) {
|
||||
return this.time + " s"
|
||||
} else {
|
||||
return this.i18n.regist.get
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
// 代理专属注册链接: 自动填入邀请码
|
||||
if (e && e.code) {
|
||||
this.referral_code = e.code
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClose() {
|
||||
uni.navigateBack({ delta: 1 })
|
||||
},
|
||||
register() {
|
||||
if (!this.flag) return
|
||||
if (this.email == '') {
|
||||
this.tos(this.i18n.regist.phoneTag)
|
||||
return
|
||||
}
|
||||
if (this.code == '') {
|
||||
this.tos(this.i18n.regist.codeTag)
|
||||
return
|
||||
}
|
||||
if (this.password == '') {
|
||||
this.tos(this.i18n.regist.loginTag)
|
||||
return
|
||||
}
|
||||
if (this.password2 == '') {
|
||||
this.tos(this.i18n.regist.confirmTag)
|
||||
return
|
||||
}
|
||||
if (this.password != this.password2) {
|
||||
this.tos(this.i18n.regist.tos1)
|
||||
return
|
||||
}
|
||||
if (!this.agreed) {
|
||||
this.tos(this.i18n.login.tos1)
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title: this.i18n.regist.loading,
|
||||
mask: true
|
||||
})
|
||||
this.flag = false
|
||||
var obj = {
|
||||
email: this.email,
|
||||
password: this.password,
|
||||
code: this.code,
|
||||
referral_code: this.referral_code,
|
||||
}
|
||||
if (this.mobile) {
|
||||
obj.mobile = this.mobile
|
||||
}
|
||||
this.post('/user/register', 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?email=' + this.email
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
},
|
||||
cutTime() {
|
||||
if (!this.timeFlag) return
|
||||
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) {
|
||||
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
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.regPage {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.regBody {
|
||||
padding: 30rpx 50rpx 60rpx;
|
||||
}
|
||||
|
||||
.regTitle {
|
||||
font-size: 48rpx;
|
||||
font-weight: 700;
|
||||
color: #111111;
|
||||
display: block;
|
||||
margin-bottom: 36rpx;
|
||||
}
|
||||
|
||||
.regTabs {
|
||||
display: flex;
|
||||
margin-bottom: 36rpx;
|
||||
}
|
||||
|
||||
.regTab {
|
||||
height: 60rpx;
|
||||
padding: 0 30rpx;
|
||||
border-radius: 8rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #D1D3D8;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.regTabActive {
|
||||
background: #10C7A0;
|
||||
}
|
||||
|
||||
.regField {
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
|
||||
.regLabel {
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
color: #333333;
|
||||
margin-bottom: 12rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.regInputBox {
|
||||
height: 88rpx;
|
||||
background: #F0F4FA;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.regInputRow {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.regInput {
|
||||
flex: 1;
|
||||
height: 88rpx;
|
||||
font-size: 28rpx;
|
||||
color: #111111;
|
||||
}
|
||||
|
||||
.regCodeBtn {
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
color: #1A74FF;
|
||||
margin-left: 18rpx;
|
||||
flex: 0 0 auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.regAgree {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 30rpx 0;
|
||||
}
|
||||
|
||||
.regCheckbox {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
border: 2rpx solid #CCCCCC;
|
||||
border-radius: 50%;
|
||||
margin-right: 14rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.regChecked {
|
||||
background: #1A74FF;
|
||||
border-color: #1A74FF;
|
||||
}
|
||||
|
||||
.regLink {
|
||||
color: #1A74FF;
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
|
||||
.regBtn {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
background: #1A74FF !important;
|
||||
border-radius: 10rpx;
|
||||
line-height: 90rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
text-align: center;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.regFooter {
|
||||
text-align: center;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<myNav :title="i18n.newWord.application"></myNav>
|
||||
|
||||
<view class="listBox">
|
||||
<view class="width-100b height-96 line-height-96">
|
||||
<text class="font-30 bold-font">{{i18n.newWord.xiangmu}}</text>
|
||||
</view>
|
||||
<view class="width-100b height-96">
|
||||
<input class="width-100b height-96 font-30" type="text" v-model="project_name"
|
||||
:placeholder="i18n.newWord.xiangmu_input" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="listBox">
|
||||
<view class="width-100b height-96 line-height-96">
|
||||
<text class="font-30 bold-font">{{i18n.newWord.desc}}</text>
|
||||
</view>
|
||||
<view class="width-100b height-96">
|
||||
<input class="width-100b height-96 font-30" type="text" v-model="describe"
|
||||
:placeholder="i18n.newWord.desc_input" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="listBox">
|
||||
<view class="width-100b height-96 line-height-96">
|
||||
<text class="font-30 bold-font">{{i18n.newWord.faxin_num}}</text>
|
||||
</view>
|
||||
<view class="width-100b height-96">
|
||||
<input class="width-100b height-96 font-30 nummedium-font" type="number" v-model="amount"
|
||||
:placeholder="i18n.newWord.faxin_num_input" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="listBox">
|
||||
<view class="width-100b height-96 line-height-96">
|
||||
<text class="font-30 bold-font">{{i18n.newWord.web_url}}</text>
|
||||
</view>
|
||||
<view class="width-100b height-96">
|
||||
<input class="width-100b height-96 font-30 nummedium-font" type="text"
|
||||
v-model="official_web" :placeholder="i18n.newWord.web_url_input" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="listBox">
|
||||
<view class="width-100b height-96 line-height-96">
|
||||
<text class="font-30 bold-font">{{i18n.newWord.white_paper}}</text>
|
||||
</view>
|
||||
<view class="width-100b height-96">
|
||||
<input class="width-100b height-96 font-30 nummedium-font" type="text" v-model="white_book"
|
||||
:placeholder="i18n.newWord.white_paper_input" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="listBox">
|
||||
<view class="width-100b height-96 line-height-96">
|
||||
<text class="font-30 bold-font">{{i18n.newWord.qun}}</text>
|
||||
</view>
|
||||
<view class="width-100b height-96">
|
||||
<input class="width-100b height-96 font-30 nummedium-font" type="text" v-model="community"
|
||||
:placeholder="i18n.newWord.qun_input" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="listBox">
|
||||
<view class="width-100b height-96 line-height-96">
|
||||
<text class="font-30 bold-font">{{i18n.newWord.email}}</text>
|
||||
</view>
|
||||
<view class="width-100b height-96">
|
||||
<input class="width-100b height-96 font-30 nummedium-font" type="text" v-model="mailbox"
|
||||
:placeholder="i18n.newWord.email_input" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="listBox">
|
||||
<view class="width-100b height-96 line-height-96">
|
||||
<text class="font-30 bold-font">{{i18n.newWord.jianjie}}</text>
|
||||
</view>
|
||||
<view class="width-100b padding-b-20">
|
||||
<textarea class="width-100b height-200 font-30" v-model="intro" :placeholder="i18n.newWord.jianjie_input"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-100b flex align-center justify-center margin-t-100 padding-b-60">
|
||||
<button @click="real" class="cu-btn loginBtn">{{i18n.mine.safety.tijiao}}</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
project_name: '', //项目名称
|
||||
describe: '', //智能链接描述
|
||||
intro: '', //简介
|
||||
amount: '', //发行量
|
||||
official_web: '', //官网
|
||||
white_book: '', //白皮书
|
||||
community: '', //社群
|
||||
mailbox: '', //联系方式(邮箱)
|
||||
|
||||
flag: true,
|
||||
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: {
|
||||
real() {
|
||||
if (!this.flag) return
|
||||
if (this.project_name == '') {
|
||||
this.tos(this.i18n.newWord.xiangmu_input)
|
||||
return
|
||||
}
|
||||
if (this.describe == '') {
|
||||
this.tos(this.i18n.newWord.desc_input)
|
||||
return
|
||||
}
|
||||
if (this.amount == '') {
|
||||
this.tos(this.i18n.newWord.faxin_num_input)
|
||||
return
|
||||
}
|
||||
if (this.official_web == '') {
|
||||
this.tos(this.i18n.newWord.web_url_input)
|
||||
return
|
||||
}
|
||||
if (this.white_book == '') {
|
||||
this.tos(this.i18n.newWord.white_paper_input)
|
||||
return
|
||||
}
|
||||
if (this.community == '') {
|
||||
this.tos(this.i18n.newWord.qun_input)
|
||||
return
|
||||
}
|
||||
if (this.mailbox == '') {
|
||||
this.tos(this.i18n.newWord.email_input)
|
||||
return
|
||||
}
|
||||
if (this.intro == '') {
|
||||
this.tos(this.i18n.newWord.jianjie_input)
|
||||
return
|
||||
}
|
||||
this.flag = false
|
||||
this.post('/index/curr_apply', {
|
||||
title: this.project_name,
|
||||
desc: this.describe,
|
||||
faxin_num: this.amount,
|
||||
web_url: this.official_web,
|
||||
white_paper: this.white_book,
|
||||
qun: this.community,
|
||||
email: this.mailbox,
|
||||
jianjie: this.intro,
|
||||
}, 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: #0165EE !important;
|
||||
border-radius: 12rpx;
|
||||
line-height: 96rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<view>
|
||||
<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.task.text18"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750">
|
||||
<!-- 表头 -->
|
||||
<view class="height-100 flex align-center justify-between padding-w-30 font-30 bold-font ">
|
||||
<text>{{i18n.orderRecord.text1}}</text>
|
||||
<text>{{i18n.task.text19}}</text>
|
||||
</view>
|
||||
<!-- 单一列表 -->
|
||||
<view v-for="(item,index) in list" :key="index"
|
||||
class="height-100 flex align-center justify-between padding-w-30 font-26 margin-b-2">
|
||||
<text>{{item.addtime}}</text>
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
<!-- 空盒子 -->
|
||||
<view class="height-40"></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) {
|
||||
setTimeout(() => {
|
||||
this.post('/index/box_log', {
|
||||
page: pageNo,
|
||||
page_num: pageSize
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -0,0 +1,122 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="i18n.newWord.business"></myNav>
|
||||
|
||||
<view 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">
|
||||
<input class="width-100b height-96 font-30 nummedium-font" type="text" v-model="mailbox" :placeholder="i18n.mine.safety.phoneTag"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<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="name" :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.address.remark}}</text>
|
||||
</view>
|
||||
<view class="width-100b padding-b-20">
|
||||
<textarea class="width-100b height-200 font-30" v-model="remark" :placeholder="i18n.mine.address.p2"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<button @click="real" class="cu-btn loginBtn">{{i18n.mine.safety.tijiao}}</button>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mailbox:'',
|
||||
name: "",
|
||||
remark: "",
|
||||
|
||||
flag:true,
|
||||
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: {
|
||||
real() {
|
||||
if(!this.flag) return
|
||||
if(this.mailbox == ''){
|
||||
this.tos(this.i18n.mine.safety.phoneTag)
|
||||
return
|
||||
}
|
||||
if(this.name == ''){
|
||||
this.tos(this.i18n.mine.safety.input1)
|
||||
return
|
||||
}
|
||||
if(this.remark == ''){
|
||||
this.tos(this.i18n.mine.address.p2)
|
||||
return
|
||||
}
|
||||
this.flag = false
|
||||
this.post('/index/cooperation', {
|
||||
email:this.mailbox,
|
||||
username:this.name,
|
||||
notice:this.remark,
|
||||
},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: #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>
|
||||
@@ -0,0 +1,443 @@
|
||||
<template>
|
||||
<view>
|
||||
<z-paging ref="paging" refresher-only @onRefresh="onRefresh"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<custom-refresher slot="refresher" slot-scope="{refresherStatus}" :status="refresherStatus">
|
||||
</custom-refresher>
|
||||
<!-- 头部 -->
|
||||
<view slot="top" class="width-750 relative flex align-center justify-center bj-92D4FF-16A2FF"
|
||||
:style="{height: `calc(${statusBar}px + 408rpx)`}">
|
||||
<view class="width-750 fixed1 bj-92D4FF-16A2FF"
|
||||
:style="{paddingTop: statusBar + 'px', height: `calc(${statusBar}px + 408rpx)`}">
|
||||
<view class="width-750 height-110 padding-w-30 flex align-center justify-center">
|
||||
<view @click="_goback" class="cuIcon-back font-40 color-white"
|
||||
style="position: absolute;left: 30rpx;"></view>
|
||||
</view>
|
||||
<view
|
||||
class="height-268 padding-c-40 flex direction-column justify-between width-100b padding-w-30 relative">
|
||||
<image style="right: 0;top: 0;z-index: 1;" class="width-294 height-294 absolute"
|
||||
src="/static/imgs/more/shape1@2x.png" mode=""></image>
|
||||
<text class="font-24 color-F6F8FB medium-font">{{i18n.task.text1}}</text>
|
||||
<text class="color-white font-42 numbold-font">{{my_num}} AP</text>
|
||||
<view class="flex align-center">
|
||||
<view @click="show2=true" class="flex align-center">
|
||||
<image class="width-38 height-31" src="/static/imgs/more/manghe@2x.png"></image>
|
||||
<text class="font-24 color-F6F8FB margin-l-10">{{i18n.task.text2}}</text>
|
||||
<u-icon name="arrow-right" color="#FFF" size="20"></u-icon>
|
||||
</view>
|
||||
<u-icon @click="show1=true" class="margin-l-20" name="question-circle" color="#FFF"
|
||||
size="32"></u-icon>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-32 relative" :style="'background-color: '+theme.bg"
|
||||
style="border-radius: 20rpx 20rpx 0 0;z-index: 100;">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-w-30 padding-b-40">
|
||||
<view class="height-80 margin-b-30 padding-c-10 flex align-center font-32 bold-font">
|
||||
<view @click="type=1" class="height-60 flex direction-column align-center">
|
||||
<view class="height-50 line-height-50">
|
||||
<text :class="type==1?'':'color-C3C3C3'">{{i18n.task.text3}}</text>
|
||||
</view>
|
||||
<view class="height-10 flex align-center">
|
||||
<view v-if="type==1" class="width-90 height-4 radiu-2 bj-0061E8"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view @click="type=2" class="height-60 flex direction-column align-center margin-l-68">
|
||||
<view class="height-50 line-height-50">
|
||||
<text :class="type==2?'':'color-C3C3C3'">{{i18n.task.text4}}</text>
|
||||
</view>
|
||||
<view class="height-10 flex align-center">
|
||||
<view v-if="type==2" class="width-90 height-4 radiu-2 bj-0061E8"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 成长任务 -->
|
||||
<view v-if="type==1">
|
||||
<!-- 单一列表 -->
|
||||
<view v-for="(item,index) in list" :key="index" class="listbox" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="height-100b flex direction-column justify-between">
|
||||
<text class="font-28 medium-font">{{item.name}}</text>
|
||||
<view class="flex align-center">
|
||||
<image class="width-33 height-31 margin-r-10" src="/static/imgs/more/zu3891@2x.png"
|
||||
mode="">
|
||||
</image>
|
||||
<text class="font-28 color-FBA700 nummedium-font">+{{item.price}}
|
||||
{{item.curr_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.status==0" @click="router.push(item.url)" class="btnbox1">{{i18n.task.text5}}
|
||||
</view>
|
||||
<view v-if="item.status==1" @click="getlinqu(item.id)" class="btnbox2">{{i18n.task.text6}}
|
||||
</view>
|
||||
<view v-if="item.status==2" class="btnbox3">{{i18n.task.text7}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 每日签到 -->
|
||||
<view v-if="type==2" class="qiandaobox" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<text class="font-28 medium-font">{{i18n.task.text8}}</text>
|
||||
<view class="height-100b padding-t-22 padding-b-32">
|
||||
<view class="flex justify-between margin-b-16">
|
||||
<view @click="getQiandao(item.status)" v-for="(item,index) in four" :key="index"
|
||||
:class="item.status==1?'bj-589FFF-1477FF':'bj-241'" class="daybox">
|
||||
<text :class="item.status==1?'color-white':'color-333333'" class="medium-font">
|
||||
{{item.status==0?day[index]:item.status==1?i18n.task.text9:item.status==2?i18n.task.text10:item.status==3?day[index]:''}}
|
||||
</text>
|
||||
<image class="width-38 height-35" src="/static/imgs/more/jinbi@2x.png"></image>
|
||||
<text :class="item.status==1?'color-white':'color-C3C3C3'"
|
||||
class="nummedium-font">{{item.score}} AP</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-between">
|
||||
<view :class="five.status==1?'bj-589FFF-1477FF':'bj-241'" class="daybox">
|
||||
<text :class="five.status==1?'color-white':'color-333333'" class="medium-font">
|
||||
{{five.status==0?day[4]:five.status==1?i18n.task.text9:five.status==2?i18n.task.text10:five.status==3?day[4]:''}}
|
||||
</text>
|
||||
<image class="width-38 height-35" src="/static/imgs/more/jinbi@2x.png"></image>
|
||||
<text :class="five.status==1?'color-white':'color-C3C3C3'"
|
||||
class="nummedium-font">{{five.score}} AP</text>
|
||||
</view>
|
||||
<view :class="six.status==1?'bj-589FFF-1477FF':'bj-241'" class="daybox">
|
||||
<text :class="six.status==1?'color-white':'color-333333'" class="medium-font">
|
||||
{{six.status==0?day[5]:six.status==1?i18n.task.text9:six.status==2?i18n.task.text10:six.status==3?day[5]:''}}
|
||||
</text>
|
||||
<image class="width-38 height-35" src="/static/imgs/more/jinbi@2x.png"></image>
|
||||
<text :class="six.status==1?'color-white':'color-C3C3C3'"
|
||||
class="nummedium-font">{{six.score}} AP</text>
|
||||
</view>
|
||||
<view :class="seven.status==1?'bj-589FFF-1477FF':'bj-241'" class="qibox">
|
||||
<view class="height-130 flex direction-column font-26 color-333333">
|
||||
<text class="medium-font">
|
||||
{{seven.status==0?day[6]:seven.status==1?i18n.task.text9:seven.status==2?i18n.task.text10:seven.status==3?day[6]:''}}
|
||||
</text>
|
||||
<text class="bold-font margin-t-20">{{i18n.task.text11}}</text>
|
||||
</view>
|
||||
<image class="width-93 height-84" src="/static/imgs/more/jinbi4@2x.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 签到成功 -->
|
||||
<u-popup v-model="show" mode="center" border-radius="20">
|
||||
<view class="width-500" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="height-120 flex align-center justify-center">
|
||||
<image class="width-80 height-80" src="/static/imgs/index/tibiok.png" mode=""></image>
|
||||
</view>
|
||||
<view class="padding-w-30 text-center">
|
||||
<text class="font-28">{{i18n.task.text12}}{{score}} AP</text>
|
||||
</view>
|
||||
<view class="height-100 line-height-100 text-center">
|
||||
<text @click="show=false" class="font-30 color-0165EE medium-font">{{i18n.task.text13}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 盲盒说明 -->
|
||||
<u-popup v-model="show1" mode="center" border-radius="20">
|
||||
<view class="width-600" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="height-100 line-height-100 text-center">
|
||||
<text class="font-30 medium-font">{{i18n.task.text14}}</text>
|
||||
</view>
|
||||
<view class="padding-w-30">
|
||||
<text v-html="manghetxt" class="font-28"></text>
|
||||
</view>
|
||||
<view class="height-100 line-height-100 text-center">
|
||||
<text @click="show1=false" class="font-30 color-0165EE medium-font">{{i18n.task.text13}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 开盲盒 -->
|
||||
<u-popup v-model="show2" mode="bottom" border-radius="20">
|
||||
<view class="width-750 padding-b-100" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="height-100 flex align-center justify-end padding-w-46">
|
||||
<u-icon @click="show2=false" name="close" :color="theme.text" size="30"></u-icon>
|
||||
</view>
|
||||
<view class="padding-w-75 flex direction-column align-center">
|
||||
<image class="width-467 height-475" src="/static/imgs/more/damanghe@2x.png"></image>
|
||||
<text class="font-26 medium-font">{{i18n.task.text15}}</text>
|
||||
<view class="width-600 margin-0-auto margin-t-60">
|
||||
<u-button @click="getchou" class="custom-style" type="primary">{{i18n.task.text16}}</u-button>
|
||||
</view>
|
||||
<view class="margin-t-22 flex align-center justify-center">
|
||||
<text @click="show2=false,router.push('/pages/more/blindbox')"
|
||||
class="font-32 color-0165EE medium-font">{{i18n.task.text17}}</text>
|
||||
<u-icon name="arrow-right" color="#0165EE" size="30"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 盲盒结果 -->
|
||||
<u-popup v-model="show3" mode="center" border-radius="20">
|
||||
<view class="width-600" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="height-100 flex align-center justify-center">
|
||||
<image class="width-76 height-71" src="/static/imgs/more/manghe@2x.png"></image>
|
||||
</view>
|
||||
<view class="padding-w-30 text-center">
|
||||
<text class="font-28">{{resmsg}}</text>
|
||||
</view>
|
||||
<view class="height-100 line-height-100 text-center">
|
||||
<text @click="show3=false" class="font-30 color-0165EE medium-font">{{i18n.task.text13}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
list: [],
|
||||
my_num: 0,
|
||||
flag: true,
|
||||
type: 1,
|
||||
show: false,
|
||||
show1: false,
|
||||
show2: false,
|
||||
show3: false,
|
||||
four: [],
|
||||
five: {},
|
||||
six: {},
|
||||
seven: {},
|
||||
resmsg: '',
|
||||
score: '',
|
||||
manghetxt: '',
|
||||
day: ['第1天', '第2天', '第3天', '第4天', '第五天', '第六天', '连签7天'],
|
||||
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.getTask()
|
||||
this.getSign()
|
||||
this.getText()
|
||||
this.day = this.i18n.task.day
|
||||
},
|
||||
methods: {
|
||||
onRefresh() {
|
||||
this.list = []
|
||||
this.getTask()
|
||||
// 以告知z-paging下拉刷新结束,这样才可以开始下一次的下拉刷新
|
||||
setTimeout(() => {
|
||||
//1.5秒之后停止刷新动画
|
||||
this.$refs.paging.complete();
|
||||
}, 1000)
|
||||
},
|
||||
getlinqu(id) {
|
||||
if (!this.flag) return
|
||||
uni.showLoading({
|
||||
mask: true
|
||||
})
|
||||
this.flag = false
|
||||
this.post('/index/task_linqu', {
|
||||
id: id
|
||||
}).then(res => {
|
||||
this.flag = true
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
this.getTask()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 开盲盒
|
||||
getchou() {
|
||||
if (!this.flag) return
|
||||
this.flag = false
|
||||
uni.showLoading({
|
||||
mask: true
|
||||
})
|
||||
this.post('/index/chou_box').then(res => {
|
||||
this.flag = true
|
||||
if (res.code == 1) {
|
||||
uni.hideLoading()
|
||||
this.resmsg = res.data.name
|
||||
this.show2 = false
|
||||
this.show3 = true
|
||||
this.getTask()
|
||||
this.getSign()
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 盲盒说明
|
||||
getText() {
|
||||
this.post('/index/box_text').then(res => {
|
||||
if (res.code == 1) {
|
||||
this.manghetxt = res.data.box_text
|
||||
}
|
||||
})
|
||||
},
|
||||
// 签到
|
||||
getQiandao(item) {
|
||||
if (!this.flag) return
|
||||
if (item != 2) return
|
||||
this.flag = false
|
||||
uni.showLoading({
|
||||
mask: true
|
||||
})
|
||||
this.post('/index/sign').then(res => {
|
||||
this.flag = true
|
||||
if (res.code == 1) {
|
||||
uni.hideLoading()
|
||||
this.getTask()
|
||||
this.getSign()
|
||||
this.score = res.data.score
|
||||
this.show = true
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 每日签到列表
|
||||
getSign() {
|
||||
this.post('/index/sign_con').then(res => {
|
||||
if (res.code == 1) {
|
||||
this.four = res.data.slice(0, 4)
|
||||
this.five = res.data[4]
|
||||
this.six = res.data[5]
|
||||
this.seven = res.data[6]
|
||||
// console.log(this.four, this.five, this.six, this.seven);
|
||||
}
|
||||
})
|
||||
},
|
||||
// 成长任务列表
|
||||
getTask() {
|
||||
this.post('/index/task_center').then(res => {
|
||||
if (res.code == 1) {
|
||||
this.list = res.data.list
|
||||
this.my_num = res.data.my_num
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.fixed1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.topbox {
|
||||
width: 750rpx;
|
||||
height: 315rpx;
|
||||
background: linear-gradient(135deg, #92D4FF 0%, #16A2FF 100%);
|
||||
}
|
||||
|
||||
.bj-92D4FF-16A2FF {
|
||||
background: linear-gradient(135deg, #92D4FF 0%, #16A2FF 100%);
|
||||
}
|
||||
|
||||
.listbox {
|
||||
width: 690rpx;
|
||||
height: 120rpx;
|
||||
/* background: #FFF; */
|
||||
border-radius: 8rpx;
|
||||
padding: 16rpx 18rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 22rpx;
|
||||
}
|
||||
|
||||
.btnbox1 {
|
||||
width: 130rpx;
|
||||
height: 52rpx;
|
||||
background: rgba(1, 101, 238, 0.2);
|
||||
border-radius: 4rpx;
|
||||
font-size: 26rpx;
|
||||
color: #0165EE;
|
||||
line-height: 52rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btnbox2 {
|
||||
width: 130rpx;
|
||||
height: 52rpx;
|
||||
background: #0165EE;
|
||||
border-radius: 4rpx;
|
||||
font-size: 26rpx;
|
||||
color: #FFF;
|
||||
line-height: 52rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btnbox3 {
|
||||
width: 130rpx;
|
||||
height: 52rpx;
|
||||
background: #eee;
|
||||
border-radius: 4rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
line-height: 52rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.qiandaobox {
|
||||
width: 690rpx;
|
||||
height: 482rpx;
|
||||
/* background: #FFF; */
|
||||
border-radius: 8rpx;
|
||||
padding: 32rpx 16rpx;
|
||||
}
|
||||
|
||||
.daybox {
|
||||
width: 133rpx;
|
||||
height: 170rpx;
|
||||
border-radius: 4rpx;
|
||||
padding: 20rpx 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.bj-589FFF-1477FF {
|
||||
background: linear-gradient(180deg, #589FFF 0%, #1477FF 100%);
|
||||
}
|
||||
|
||||
.bj-241 {
|
||||
background: rgba(241, 241, 241, 0.7);
|
||||
}
|
||||
|
||||
.qibox {
|
||||
width: 308rpx;
|
||||
height: 170rpx;
|
||||
border-radius: 4rpx;
|
||||
padding: 20rpx 34rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.custom-style {
|
||||
width: 600rpx;
|
||||
height: 86rpx;
|
||||
background: #0165EE;
|
||||
border-radius: 20rpx;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,226 @@
|
||||
<template>
|
||||
<view>
|
||||
<z-paging ref="paging" refresher-only @onRefresh="onRefresh" :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<!-- 下拉刷新 -->
|
||||
<custom-refresher slot="refresher" slot-scope="{refresherStatus}" :status="refresherStatus">
|
||||
</custom-refresher>
|
||||
|
||||
<myNav slot="top" :title="i18n.newWord.mytitle6"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750">
|
||||
<!-- 富文本 -->
|
||||
<view class="padding-c-40 padding-w-30 font-24" v-html="api_text"></view>
|
||||
<!-- 列表 -->
|
||||
<view class="flex direction-column align-center">
|
||||
<!-- 单一列表 -->
|
||||
<view @click="openshow(item)" v-for="(item,index) in list" class="apilistbox"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.fu_text">
|
||||
<view class="height-80 flex align-center justify-between">
|
||||
<view class="flex align-center">
|
||||
<text class="font-30 bold-font">{{item.notice}}</text>
|
||||
<view v-for="(itm,idx) in item.auth"
|
||||
:class="itm==1?'label1':itm==2?'label2':itm==3?'label3':''">
|
||||
<text v-if="itm==1">{{i18n.api.text1}}</text>
|
||||
<text v-if="itm==2">{{i18n.api.text2}}</text>
|
||||
<text v-if="itm==3">{{i18n.api.text3}}</text>
|
||||
</view>
|
||||
<!-- <view class="label2">提现</view> -->
|
||||
<!-- <view class="label3">交易</view> -->
|
||||
</view>
|
||||
<u-icon name="more-dot-fill" color="#979EA8" size="32"></u-icon>
|
||||
</view>
|
||||
<view class="height-120 flex">
|
||||
<view class="flex-4 height-120 padding-c-10">
|
||||
<view class="height-40 line-height-40">
|
||||
<text class="font-26 color-8B99A2">{{i18n.api.text4}}</text>
|
||||
</view>
|
||||
<view class="height-60 line-height-60">
|
||||
<text class="font-28">{{item.addtime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-4 height-120 padding-c-10">
|
||||
<view class="height-40 line-height-40">
|
||||
<text class="font-26 color-8B99A2">API Key</text>
|
||||
</view>
|
||||
<view class="height-60 line-height-60">
|
||||
<text class="font-28">{{item.api_key}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 空盒子 -->
|
||||
<view class="height-200"></view>
|
||||
</view>
|
||||
<!-- 底部 -->
|
||||
<view class="dibubox" :style="'background-color: '+theme.fu_bg">
|
||||
<button @click="router.push('/pages/my/aboutUs/applyAPI')" class="cu-btn loginBtn">{{i18n.api.text5}}</button>
|
||||
</view>
|
||||
|
||||
<!-- 操作弹窗 -->
|
||||
<u-popup mode="bottom" v-model="show">
|
||||
<view class="padding-30" :style="'background-color: '+theme.bg">
|
||||
<view @click="show=false,router.push('/pages/my/aboutUs/lookAPI?id='+id)"
|
||||
class="height-100 line-height-100 text-center">
|
||||
<text class="font-30 bold-font">{{i18n.api.text6}}</text>
|
||||
</view>
|
||||
<view @click="getDeledt" class="height-100 line-height-100 text-center">
|
||||
<text class="font-30 color-FF4040 bold-font">{{i18n.api.text7}}</text>
|
||||
</view>
|
||||
<view @click="id='',show=false" class="height-100 line-height-100 text-center">
|
||||
<text class="font-30 bold-font">{{i18n.api.text8}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
api_text: '',
|
||||
show: false,
|
||||
list: [],
|
||||
id: '',
|
||||
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.getInfo()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
onRefresh() {
|
||||
this.list = []
|
||||
this.getList()
|
||||
// 以告知z-paging下拉刷新结束,这样才可以开始下一次的下拉刷新
|
||||
setTimeout(() => {
|
||||
//1.5秒之后停止刷新动画
|
||||
this.$refs.paging.complete();
|
||||
}, 1000)
|
||||
},
|
||||
openshow(item) {
|
||||
this.id = item.id
|
||||
this.show = true
|
||||
},
|
||||
getDeledt() {
|
||||
var that = this
|
||||
uni.showModal({
|
||||
title: this.i18n.mine.tishi,
|
||||
content: this.i18n.api.text9,
|
||||
cancelText: this.i18n.mine.cancelText,
|
||||
confirmText: this.i18n.mine.confirmText,
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
that.show = false
|
||||
uni.showLoading()
|
||||
that.post('/my/api_delete', {
|
||||
id: that.id
|
||||
}).then((res) => {
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
that.getList()
|
||||
that.id = ''
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.post('/my/api_list').then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.list = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getInfo() {
|
||||
this.post('/publics/new_common_data').then(res => {
|
||||
console.log('文案说明', res)
|
||||
if (res.code == 1) {
|
||||
this.api_text = res.data.api_text
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.dibubox {
|
||||
width: 750rpx;
|
||||
height: 160rpx;
|
||||
/* background: rgba(255, 255, 255, 0.39); */
|
||||
box-shadow: 6rpx 0rpx 10rpx rgba(177, 177, 177, 0.28);
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.loginBtn {
|
||||
width: 600rpx;
|
||||
height: 96rpx;
|
||||
background: #0165EE !important;
|
||||
border-radius: 12rpx;
|
||||
color: #FFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.apilistbox {
|
||||
width: 690rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
/* background: rgba(255, 255, 255, 1); */
|
||||
box-shadow: 6rpx 0rpx 10rpx rgba(177, 177, 177, 0.3);
|
||||
}
|
||||
|
||||
.label1 {
|
||||
height: 32rpx;
|
||||
line-height: 32rpx;
|
||||
padding: 0 4rpx;
|
||||
border-radius: 4rpx;
|
||||
margin-left: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: rgb(79, 119, 192);
|
||||
background-color: rgba(79, 119, 192, 0.3);
|
||||
}
|
||||
|
||||
.label2 {
|
||||
height: 32rpx;
|
||||
line-height: 32rpx;
|
||||
padding: 0 4rpx;
|
||||
border-radius: 4rpx;
|
||||
margin-left: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: rgb(39, 151, 114);
|
||||
background-color: rgba(39, 151, 114, 0.3);
|
||||
}
|
||||
|
||||
.label3 {
|
||||
height: 32rpx;
|
||||
line-height: 32rpx;
|
||||
padding: 0 4rpx;
|
||||
border-radius: 4rpx;
|
||||
margin-left: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: rgb(205, 120, 55);
|
||||
background-color: rgba(205, 120, 55, 0.3);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<view >
|
||||
<view :style="'background-color: '+theme.bg" style="padding: 10rpx 0;">
|
||||
<myNav :title="titleFilter"></myNav>
|
||||
<view class="width-100b padding-30" v-html="content">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title:'tuikuan',
|
||||
content:'',
|
||||
theme:'',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
titleFilter(){
|
||||
if(this.title=='tuikuan'){
|
||||
return this.i18n.recharge.text18
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.title = option.title
|
||||
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('/publics/new_common_data').then(res => {
|
||||
console.log(res)
|
||||
if(res.code == 1){
|
||||
if(this.title == 'tuikuan'){
|
||||
this.content = res.data.refund_text
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -0,0 +1,309 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="i18n.api.text5"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-t-26">
|
||||
<view class="padding-w-30 padding-b-12 font-24">
|
||||
<text>{{i18n.api.text10}}</text>
|
||||
</view>
|
||||
<view class="margin-t-16 padding-w-30">
|
||||
<text class="font-28">{{i18n.api.text11}}</text>
|
||||
<view class="margin-t-20">
|
||||
<input v-model="notice" class="inputbox height-86 padding-w-15"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text"
|
||||
type="text" :placeholder="i18n.api.input1"
|
||||
placeholder-class="color-C3C3C3" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-t-16 padding-w-30">
|
||||
<view class="flex align-center">
|
||||
<text class="font-28">Passphrase</text>
|
||||
<u-icon @click="show=true" name="question-circle" color="#979EA8" size="30" class="margin-l-10"></u-icon>
|
||||
</view>
|
||||
<view class="margin-t-20">
|
||||
<input v-model="passphrase" class="inputbox height-86 padding-w-15"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text"
|
||||
type="text" :placeholder="i18n.api.input2" placeholder-class="color-C3C3C3" password />
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-t-16 padding-w-30">
|
||||
<text class="font-28">{{i18n.api.text12}}</text>
|
||||
<view class="margin-t-20">
|
||||
<textarea v-model="ip" class="inputbox height-192 padding-15" type="text"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text"
|
||||
:placeholder="i18n.api.input3" placeholder-class="color-C3C3C3" maxlength="-1" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-t-16 padding-w-30">
|
||||
<text class="font-28">{{i18n.api.text13}}</text>
|
||||
<view class="margin-t-20 flex align-center justify-between">
|
||||
<view @click="item.type=(!item.type)" v-for="(item,index) in list"
|
||||
:class="item.type?'okselect':'noselect'">
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="email!=''" class="margin-t-16 padding-w-30">
|
||||
<text class="font-28">{{i18n.withdraw.text17}}</text>
|
||||
<view class="margin-t-20 flex align-center inputbox padding-r-20"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<input v-model="code" class="flex-1 height-86 padding-w-15 font-24" type="text"
|
||||
:placeholder="i18n.withdraw.tos9" placeholder-class="color-C3C3C3" />
|
||||
<text @click="cutTime()" class="font-28 weight-bold">{{codeText}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="mobile!=''" class="margin-t-16 padding-w-30">
|
||||
<text class="font-28">{{i18n.withdraw.text18}}</text>
|
||||
<view class="margin-t-20 flex align-center inputbox padding-r-20"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<input v-model="sms_code" class="flex-1 height-86 padding-w-15 font-24" type="text"
|
||||
:placeholder="i18n.withdraw.tos10" placeholder-class="color-C3C3C3" />
|
||||
<text @click="cutTime2()" class="font-28 weight-bold">{{codeText2}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-center margin-t-40">
|
||||
<button @click="getadd_api" class="cu-btn loginBtn">{{i18n.cycle.confirm}}</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 提示弹窗 -->
|
||||
<u-popup style="z-index: 5000;" mode="center" v-model="show" border-radius="20">
|
||||
<view class="width-600 padding-w-30"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="padding-c-30">
|
||||
<text class="font-26">{{i18n.api.text14}}</text>
|
||||
</view>
|
||||
<view class="height-2 bj-D1D3D8"></view>
|
||||
<view @click="show=false" class="height-80 line-height-80 text-center">
|
||||
<text class="font-30 bold-font">{{i18n.cycle.confirm}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
time: '获取验证码',
|
||||
timeFlag: true,
|
||||
time2: '获取验证码',
|
||||
timeFlag2: true,
|
||||
|
||||
email: '',
|
||||
mobile: '',
|
||||
list: [{
|
||||
id: 1,
|
||||
name: '只读',
|
||||
type: false,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '提现',
|
||||
type: false,
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '交易',
|
||||
type: false,
|
||||
}
|
||||
],
|
||||
|
||||
notice: '',
|
||||
passphrase: '',
|
||||
ip: '',
|
||||
auth: '',
|
||||
code: '',
|
||||
sms_code: '',
|
||||
flag: true,
|
||||
show:false,
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
codeText() {
|
||||
if (this.time > 0) {
|
||||
return this.time + " S"
|
||||
} else {
|
||||
return this.i18n.withdraw.text13
|
||||
}
|
||||
},
|
||||
codeText2() {
|
||||
if (this.time2 > 0) {
|
||||
return this.time2 + " S"
|
||||
} else {
|
||||
return this.i18n.withdraw.text13
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
this.getuserinfo()
|
||||
this.list[0].name=this.i18n.api.text1
|
||||
this.list[1].name=this.i18n.api.text2
|
||||
this.list[2].name=this.i18n.api.text3
|
||||
},
|
||||
methods: {
|
||||
// 确认申请
|
||||
getadd_api() {
|
||||
if (!this.flag) return
|
||||
if (this.notice == '') return this.tos(this.i18n.api.input1)
|
||||
if (this.passphrase == '') return this.tos(this.i18n.api.input2)
|
||||
let result = this.list.some(item => item.type == true)
|
||||
if (!result) return this.tos(this.i18n.api.input4)
|
||||
if (this.email != '') {
|
||||
if (this.code == '') return this.tos(this.i18n.withdraw.tos9)
|
||||
}
|
||||
if (this.mobile != '') {
|
||||
if (this.sms_code == '') return this.tos(this.i18n.withdraw.tos10)
|
||||
}
|
||||
this.flag = false
|
||||
this.auth = ''
|
||||
this.list.forEach((item) => {
|
||||
if (item.type == true) {
|
||||
this.auth = this.auth + item.id + ','
|
||||
}
|
||||
})
|
||||
this.auth = this.auth.slice(0, this.auth.length - 1)
|
||||
let obj = {
|
||||
passphrase: this.passphrase,
|
||||
notice: this.notice,
|
||||
code: this.code,
|
||||
sms_code: this.sms_code,
|
||||
ip: this.ip,
|
||||
auth: this.auth,
|
||||
}
|
||||
this.post('/my/add_api', obj).then(res => {
|
||||
console.log(res);
|
||||
this.flag = true
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取个人信息
|
||||
getuserinfo() {
|
||||
this.post('/my/get_userinfo').then(res => {
|
||||
if (res.code == 1) {
|
||||
this.email = res.data.email
|
||||
this.mobile = res.data.mobile
|
||||
}
|
||||
})
|
||||
},
|
||||
// 验证码区域
|
||||
cutTime() {
|
||||
if (!this.timeFlag) return
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
})
|
||||
this.timeFlag = false
|
||||
this.post('/ems/send', {
|
||||
email: this.email,
|
||||
event: "withdraw",
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
this.tos(this.i18n.withdraw.tos7)
|
||||
this.time = 120
|
||||
var that = this
|
||||
let timeName = setInterval(() => {
|
||||
if (that.time > 0) {
|
||||
that.time--
|
||||
} else {
|
||||
that.time = that.i18n.withdraw.text13
|
||||
that.timeFlag = true
|
||||
clearInterval(timeName)
|
||||
}
|
||||
}, 1000)
|
||||
} else {
|
||||
this.timeFlag = true
|
||||
}
|
||||
})
|
||||
},
|
||||
cutTime2() {
|
||||
if (!this.timeFlag2) return
|
||||
uni.showLoading({
|
||||
title: '',
|
||||
})
|
||||
this.timeFlag2 = false
|
||||
this.post('/sms/send', {
|
||||
mobile: this.mobile,
|
||||
event: "withdraw",
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
this.tos(this.i18n.withdraw.tos7)
|
||||
this.time2 = 120
|
||||
var that = this
|
||||
let timeName2 = setInterval(() => {
|
||||
if (that.time2 > 0) {
|
||||
that.time2--
|
||||
} else {
|
||||
that.time2 = that.i18n.withdraw.text13
|
||||
that.timeFlag2 = true
|
||||
clearInterval(timeName2)
|
||||
}
|
||||
}, 1000)
|
||||
} else {
|
||||
this.timeFlag2 = true
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.loginBtn {
|
||||
width: 600rpx;
|
||||
height: 96rpx;
|
||||
background: #0165EE !important;
|
||||
border-radius: 12rpx;
|
||||
color: #FFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.inputbox {
|
||||
width: 690rpx;
|
||||
/* background: rgba(246, 248, 251, 0.7); */
|
||||
border-radius: 8rpx;
|
||||
font-size: 24rpx;
|
||||
/* color: #333333; */
|
||||
}
|
||||
|
||||
.noselect {
|
||||
width: 180rpx;
|
||||
height: 56rpx;
|
||||
background: rgba(246, 248, 251, 0.5);
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
line-height: 56rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.okselect {
|
||||
width: 180rpx;
|
||||
height: 56rpx;
|
||||
background: #0165EE;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
color: #FFF;
|
||||
line-height: 56rpx;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="padding: 0;">
|
||||
<myNav :title="i18n.newWord.mytitle7"></myNav>
|
||||
<view class="width-100b padding-30" v-html="shouquan_text">
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
shouquan_text:'',
|
||||
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('/publics/new_common_data').then(res => {
|
||||
console.log('文案说明',res)
|
||||
if(res.code == 1){
|
||||
this.shouquan_text = res.data.shouquan_text
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -0,0 +1,195 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="i18n.mine.about.title"></myNav>
|
||||
<view class="">
|
||||
<view class="padding flex justify-between align-center" @click="gotoNext(item.path)"
|
||||
v-for="(item,index) in menuList">
|
||||
<view class="font-30">{{item.name}}</view>
|
||||
<view class="flex align-center">
|
||||
<text v-if="item.path=='gengxin'" class="font-26 nummedium-font">V{{version}}</text>
|
||||
<view class="cuIcon-right"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="padding flex justify-between align-center" @click="clearCache">
|
||||
<view class="font-30 color-333333">清理缓存</view>
|
||||
<view class="flex align-center">
|
||||
<text class="font-26 nummedium-font color-333333 margin-r-10">{{fileSizeString}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// #ifdef APP-PLUS
|
||||
import APPUpdate, {
|
||||
getCurrentNo
|
||||
} from '@/components/APPUpdate/js_sdk/appUpdate';
|
||||
// #endif
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
fileSizeString: '0B',
|
||||
|
||||
menuList: [{
|
||||
name: "关于我们",
|
||||
path: "/pages/my/aboutUs/women?title=about_us"
|
||||
}, {
|
||||
name: "用户条款",
|
||||
path: "/pages/my/aboutUs/women?title=user_item"
|
||||
}, {
|
||||
name: "隐私条约",
|
||||
path: "/pages/my/aboutUs/women?title=privacy_treaty"
|
||||
},
|
||||
// {
|
||||
// name: "官网",
|
||||
// path: "guanwang"
|
||||
// },
|
||||
// #ifdef APP-PLUS
|
||||
{
|
||||
name: "版本",
|
||||
path: "gengxin"
|
||||
},
|
||||
// #endif
|
||||
],
|
||||
GWaddress: '',
|
||||
|
||||
version: "1.0.0" ,// 版本号
|
||||
theme:'',
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// #ifdef APP-PLUS
|
||||
getCurrentNo(res => {
|
||||
// 进页面获取当前APP版本号(用于页面显示)
|
||||
this.version = res.versionName;
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
}else{
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
// this.formatSize()
|
||||
this.menuList[0].name = this.i18n.mine.about.title
|
||||
this.menuList[1].name = this.i18n.mine.about.list1
|
||||
this.menuList[2].name = this.i18n.mine.about.list2
|
||||
// this.menuList[3].name = this.i18n.mine.about.list3
|
||||
// #ifdef APP-PLUS
|
||||
this.menuList[3].name = this.i18n.mine.about.list4
|
||||
// #endif
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 计算缓存大小
|
||||
formatSize() {
|
||||
let that = this;
|
||||
plus.cache.calculate(function(size) {
|
||||
let sizeCache = parseInt(size);
|
||||
if (sizeCache == 0) {
|
||||
that.fileSizeString = "0 B";
|
||||
} else if (sizeCache < 1024) {
|
||||
that.fileSizeString = sizeCache + " B";
|
||||
} else if (sizeCache < 1048576) {
|
||||
that.fileSizeString = (sizeCache / 1024).toFixed(2) + " KB";
|
||||
} else if (sizeCache < 1073741824) {
|
||||
that.fileSizeString = (sizeCache / 1048576).toFixed(2) + " MB";
|
||||
} else {
|
||||
that.fileSizeString = (sizeCache / 1073741824).toFixed(2) + " GB";
|
||||
}
|
||||
});
|
||||
},
|
||||
clearCache() {
|
||||
let that = this;
|
||||
let os = plus.os.name;
|
||||
uni.showLoading({
|
||||
title: '清理中',
|
||||
mask:true
|
||||
})
|
||||
if (os == 'Android') {
|
||||
let main = plus.android.runtimeMainActivity();
|
||||
let sdRoot = main.getCacheDir();
|
||||
let files = plus.android.invoke(sdRoot, "listFiles");
|
||||
let len = files.length;
|
||||
for (let i = 0; i < len; i++) {
|
||||
let filePath = '' + files[i]; // 没有找到合适的方法获取路径,这样写可以转成文件路径
|
||||
plus.io.resolveLocalFileSystemURL(filePath, function(entry) {
|
||||
if (entry.isDirectory) {
|
||||
entry.removeRecursively(function(entry) { //递归删除其下的所有文件及子目录
|
||||
uni.showToast({
|
||||
title: '缓存清理完成',
|
||||
duration: 2000
|
||||
});
|
||||
that.formatSize(); // 重新计算缓存
|
||||
}, function(e) {
|
||||
console.log(e.message)
|
||||
});
|
||||
} else {
|
||||
entry.remove();
|
||||
}
|
||||
}, function(e) {
|
||||
// console.log('文件路径读取失败')
|
||||
uni.showToast({
|
||||
title: '文件路径读取失败',
|
||||
icon:'error',
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
}
|
||||
} else { // ios
|
||||
plus.cache.clear(function() {
|
||||
uni.showToast({
|
||||
title: '缓存清理完成',
|
||||
duration: 2000
|
||||
});
|
||||
that.formatSize();
|
||||
});
|
||||
}
|
||||
},
|
||||
gotoNext(url) {
|
||||
if (url == 'gengxin') {
|
||||
this.onAPPUpdate()
|
||||
} else if (url == 'guanwang') {
|
||||
this.getGW()
|
||||
} else {
|
||||
this.router.push(url)
|
||||
}
|
||||
},
|
||||
getGW() {
|
||||
this.post('/publics/get_common_data').then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.GWaddress = res.data.web_url
|
||||
if (res.data.web_url) {
|
||||
// #ifdef APP-PLUS
|
||||
plus.runtime.openURL(this.GWaddress)
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
window.location.replace(this.GWaddress)
|
||||
// #endif
|
||||
// window.location.replace('http://www.baidu.com')
|
||||
} else {
|
||||
this.tos(this.i18n.cycle.nodata)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 检查APP是否有新版本
|
||||
onAPPUpdate() {
|
||||
// true 没有新版本的时候有提示,默认:false
|
||||
APPUpdate(true);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<myNav :title="i18n.newWord.mytitle10"></myNav>
|
||||
|
||||
<view class="topBox">
|
||||
<text class="font-40 numbold-font color-white">{{i18n.newWord.shequTitle1}}</text>
|
||||
<text class="font-24 color-white margin-t-20 text-center">{{i18n.newWord.shequTitle2}}</text>
|
||||
</view>
|
||||
|
||||
<view class="boxborder" v-for="(item,index) in list" :key="index">
|
||||
<view class="flex align-center">
|
||||
<image class="width-32 height-32 margin-r-15" :src="item.logo_image" mode=""></image>
|
||||
<text class="font-30">{{item.name}}</text>
|
||||
</view>
|
||||
<text class="font-26">{{item.title}}</text>
|
||||
<view class="flex align-center">
|
||||
<text style="word-break:break-all;" class="font-26 flex-1">{{item.content}}</text>
|
||||
<image @click="copy(item.content)" class="width-22 height-24 margin-l-50" src="/static/imgs/my/COPY1@2x.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import clipboard from "@/components/clipboard.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list:[],
|
||||
theme:'',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
this.get_shequ()
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
}else{
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
get_shequ(){
|
||||
this.post('/my/get_shequ').then(res => {
|
||||
console.log('社区列表',res)
|
||||
if(res.code == 1){
|
||||
this.list = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 复制地址
|
||||
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">
|
||||
.topBox{
|
||||
width: 690rpx;
|
||||
height: 316rpx;
|
||||
margin: 20rpx auto;
|
||||
background-image: url('../../../static/imgs/my/joinshe2@2x.png');
|
||||
background-repeat: repeat;
|
||||
background-size: 100% 100%;
|
||||
padding: 30rpx 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.boxborder{
|
||||
width: 100%;
|
||||
height: 200rpx;
|
||||
// background-color: #FFF;
|
||||
padding: 22rpx 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 1rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,247 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<!-- <z-paging ref="paging" refresher-only @onRefresh="onRefresh"> -->
|
||||
<!-- 下拉刷新 -->
|
||||
<!-- <custom-refresher slot="refresher" slot-scope="{refresherStatus}" :status="refresherStatus">
|
||||
</custom-refresher> -->
|
||||
<!-- 头部 -->
|
||||
<myNav :title="i18n.api.text15"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750">
|
||||
<!-- 输密码 -->
|
||||
<view v-if="!data">
|
||||
<view class="margin-t-16 padding-w-30">
|
||||
<view class="flex align-center">
|
||||
<text class="font-28">Passphrase</text>
|
||||
<u-icon @click="show=true" name="question-circle" color="#979EA8" size="30" class="margin-l-10">
|
||||
</u-icon>
|
||||
</view>
|
||||
<view class="margin-t-20">
|
||||
<input v-model="passphrase" class="inputbox height-86 padding-w-15" type="text"
|
||||
:placeholder="i18n.api.input2" placeholder-class="color-C3C3C3" password />
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-center margin-t-60">
|
||||
<button @click="getApi" class="cu-btn loginBtn">{{i18n.cycle.confirm}}</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- API详情 -->
|
||||
<view v-else class="padding-t-60 flex direction-column align-center">
|
||||
<view class="detailsbox" :style="'background-color: '+theme.fu_bg+';color: '+theme.fu_text">
|
||||
<!-- API Key -->
|
||||
<view class="margin-t-16">
|
||||
<text class="font-28">API Key</text>
|
||||
<view class="margin-t-10">
|
||||
<text class="font-24 nummedium-font huanhang">{{data.api_key}}</text>
|
||||
<image @click="copy(data.api_key)" class="width-22 height-24 margin-l-20"
|
||||
src="/static/imgs/my/COPY1@2x.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 备注名 -->
|
||||
<view class="margin-t-16">
|
||||
<text class="font-28">{{i18n.api.text11}}</text>
|
||||
<view class="margin-t-10">
|
||||
<text class="font-24 nummedium-font huanhang">{{data.notice}}</text>
|
||||
<image @click="copy(data.notice)" class="width-22 height-24 margin-l-20"
|
||||
src="/static/imgs/my/COPY1@2x.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 绑定IP地址(非必填) -->
|
||||
<view class="margin-t-16">
|
||||
<text class="font-28">{{i18n.api.text12}}</text>
|
||||
<view class="margin-t-10">
|
||||
<text class="font-24 nummedium-font huanhang">{{data.ip}}</text>
|
||||
<image v-show="data.ip" @click="copy(data.ip)" class="width-22 height-24 margin-l-20"
|
||||
src="/static/imgs/my/COPY1@2x.png" mode=""></image>
|
||||
<view v-if="data.ip==''" class="height-36"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 权限 -->
|
||||
<view class="margin-t-16">
|
||||
<text class="font-28">{{i18n.api.text13}}</text>
|
||||
<view class="margin-t-10 flex align-center">
|
||||
<view v-for="(itm,idx) in data.auth"
|
||||
:class="itm==1?'label1':itm==2?'label2':itm==3?'label3':''">
|
||||
<text v-if="itm==1">{{i18n.api.text1}}</text>
|
||||
<text v-if="itm==2">{{i18n.api.text2}}</text>
|
||||
<text v-if="itm==3">{{i18n.api.text3}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- SecretKey -->
|
||||
<view class="margin-t-16">
|
||||
<text class="font-28">SecretKey</text>
|
||||
<view class="margin-t-10">
|
||||
<text class="font-24 nummedium-font huanhang">{{data.secret_key}}</text>
|
||||
<image @click="copy(data.secret_key)" class="width-22 height-24 margin-l-20"
|
||||
src="/static/imgs/my/COPY1@2x.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 提示弹窗 -->
|
||||
<u-popup style="z-index: 5000;" mode="center" v-model="show" border-radius="20">
|
||||
<view class="width-600 padding-w-30"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="padding-c-30">
|
||||
<text class="font-26">{{i18n.api.text14}}</text>
|
||||
</view>
|
||||
<view class="height-2 bj-D1D3D8"></view>
|
||||
<view @click="show=false" class="height-80 line-height-80 text-center">
|
||||
<text class="font-30 bold-font">{{i18n.cycle.confirm}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
<!-- </z-paging> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import clipboard from "@/components/clipboard.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
passphrase: '',
|
||||
flag: true,
|
||||
data: '',
|
||||
show: false,
|
||||
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
},
|
||||
onLoad(e) {
|
||||
this.id = e.id
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// onRefresh() {
|
||||
// this.list = []
|
||||
// this.getList()
|
||||
// // 以告知z-paging下拉刷新结束,这样才可以开始下一次的下拉刷新
|
||||
// setTimeout(() => {
|
||||
// //1.5秒之后停止刷新动画
|
||||
// this.$refs.paging.complete();
|
||||
// }, 1000)
|
||||
// },
|
||||
// 查看API
|
||||
getApi() {
|
||||
if (!this.flag) return
|
||||
if (this.passphrase == '') return this.tos(this.i18n.api.input2)
|
||||
this.flag = false
|
||||
uni.showLoading()
|
||||
let obj = {
|
||||
id: this.id,
|
||||
passphrase: this.passphrase
|
||||
}
|
||||
this.post('/my/api_con', obj).then(res => {
|
||||
console.log(res);
|
||||
this.flag = true
|
||||
if (res.code == 1) {
|
||||
uni.hideLoading()
|
||||
this.data = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 复制地址
|
||||
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>
|
||||
.loginBtn {
|
||||
width: 690rpx;
|
||||
height: 96rpx;
|
||||
background: #0165EE !important;
|
||||
border-radius: 12rpx;
|
||||
color: #FFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.inputbox {
|
||||
width: 690rpx;
|
||||
border: 1rpx solid #DDD;
|
||||
border-radius: 8rpx;
|
||||
font-size: 24rpx;
|
||||
/* color: #333333; */
|
||||
}
|
||||
|
||||
.detailsbox {
|
||||
width: 690rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
/* background-color: #F5F5FD; */
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.huanhang {
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.label1 {
|
||||
height: 32rpx;
|
||||
line-height: 32rpx;
|
||||
padding: 0 4rpx;
|
||||
border-radius: 4rpx;
|
||||
margin-right: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: rgb(79, 119, 192);
|
||||
background-color: rgba(79, 119, 192, 0.3);
|
||||
}
|
||||
|
||||
.label2 {
|
||||
height: 32rpx;
|
||||
line-height: 32rpx;
|
||||
padding: 0 4rpx;
|
||||
border-radius: 4rpx;
|
||||
margin-right: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: rgb(39, 151, 114);
|
||||
background-color: rgba(39, 151, 114, 0.3);
|
||||
}
|
||||
|
||||
.label3 {
|
||||
height: 32rpx;
|
||||
line-height: 32rpx;
|
||||
padding: 0 4rpx;
|
||||
border-radius: 4rpx;
|
||||
margin-right: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: rgb(205, 120, 55);
|
||||
background-color: rgba(205, 120, 55, 0.3);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="i18n.newWord.mytitle4"></myNav>
|
||||
<view class="width-100b padding-30">
|
||||
<text class="font-24"></text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
user_item:'',
|
||||
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('/publics/new_common_data').then(res => {
|
||||
console.log('文案说明',res)
|
||||
if(res.code == 1){
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<myNav :title="i18n.newWord.mytitle5"></myNav>
|
||||
<view class="width-750 padding-w-30 padding-t-20">
|
||||
<view @click="setRateid(item)" v-for="(item,index) in list" :key="index" class="topBox"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="width-60 flex align-center justify-center">
|
||||
<u-icon v-if="rateid==item.id" name="checkbox-mark" color="#3ECEB2" size="30"></u-icon>
|
||||
</view>
|
||||
<view class="flex-2 text-center">
|
||||
<text class="font-36 numbold-font">1 USD</text>
|
||||
</view>
|
||||
<text class="font-36 bold-font">≈</text>
|
||||
<view class="flex-3 text-center">
|
||||
<text class="font-36 numbold-font">{{item.exchange}} {{item.name_sx}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-100b padding-w-30 padding-b-40" v-html="huilv_text"></view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
huilv_text: '',
|
||||
list: [],
|
||||
rateid: '',
|
||||
ratename:'',
|
||||
ratenum:'',
|
||||
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
this.getInfo()
|
||||
this.getlist()
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setRateid(item) {
|
||||
this.rateid = item.id
|
||||
uni.setStorageSync('rateid', item.id)
|
||||
uni.setStorageSync('ratename', item.name_sx)
|
||||
uni.setStorageSync('ratenum', item.exchange)
|
||||
},
|
||||
getlist() {
|
||||
this.post('/publics/exchange_list').then(res => {
|
||||
if (res.code == 1) {
|
||||
this.list = res.data
|
||||
if (uni.getStorageSync('rateid')) {
|
||||
this.rateid = uni.getStorageSync('rateid')
|
||||
} else {
|
||||
uni.setStorageSync('rateid', this.list[0].id)
|
||||
this.rateid = uni.getStorageSync('rateid')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getInfo() {
|
||||
this.post('/publics/new_common_data').then(res => {
|
||||
console.log('文案说明', res)
|
||||
if (res.code == 1) {
|
||||
this.huilv_text = res.data.huilv_text
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.topBox {
|
||||
width: 690rpx;
|
||||
height: 100rpx;
|
||||
padding: 0 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
/* background: rgba(255, 255, 255); */
|
||||
border-radius: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg" style="padding: 10rpx 0;">
|
||||
|
||||
<myNav :title="titleFilter"></myNav>
|
||||
<view class="width-100b padding-30" v-html="content">
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title:'about_us',
|
||||
content:'',
|
||||
theme:'',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
titleFilter(){
|
||||
if(this.title=='about_us'){
|
||||
return this.i18n.mine.about.title
|
||||
}
|
||||
if(this.title=='user_item'){
|
||||
return this.i18n.mine.about.list1
|
||||
}
|
||||
if(this.title=='privacy_treaty'){
|
||||
return this.i18n.mine.about.list2
|
||||
}
|
||||
if(this.title=='agreement'){
|
||||
return this.i18n.mine.about.list5
|
||||
}
|
||||
if(this.title=='tuikuan'){
|
||||
return this.i18n.recharge.text18
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.title = option.title
|
||||
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('/publics/get_common_data').then(res => {
|
||||
console.log(res)
|
||||
if(res.code == 1){
|
||||
if(this.title == 'about_us'){
|
||||
this.content = res.data.about_us
|
||||
}
|
||||
if(this.title == 'user_item'){
|
||||
this.content = res.data.user_item
|
||||
}
|
||||
if(this.title == 'privacy_treaty'){
|
||||
this.content = res.data.privacy_treaty
|
||||
}
|
||||
if(this.title == 'agreement'){
|
||||
this.content = res.data.agreement
|
||||
}
|
||||
if(this.title == 'tuikuan'){
|
||||
this.content = res.data.refund_text
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="id?i18n.mine.address.modify:i18n.mine.address.add"></myNav>
|
||||
|
||||
<view @click="coinType=true" class="width-100b height-96 padding-w-60 flex align-center justify-between">
|
||||
<text class="font-30 bold-font">{{i18n.mine.address.curr}}</text>
|
||||
<text class="font-30 bold-font color-0165EE">{{curr_id?curr_id:i18n.mine.address.subtit}}</text>
|
||||
</view>
|
||||
|
||||
<view class="width-100b padding-w-60">
|
||||
<view class="width-100b height-96 line-height-96">
|
||||
<text class="font-30 bold-font">{{i18n.mine.address.address}}</text>
|
||||
<text class="font-26 numbold-font color-0165EE margin-l-20">{{address|addressFilter}}</text>
|
||||
</view>
|
||||
<view class="width-100b height-96">
|
||||
<input class="width-100b height-96 font-30" type="text" v-model="address" :placeholder="i18n.mine.address.p1" placeholder-class="color-C3C3C3"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="width-100b padding-w-60">
|
||||
<view class="width-100b height-96 line-height-96">
|
||||
<text class="font-30 bold-font">{{i18n.mine.address.remark}}</text>
|
||||
</view>
|
||||
<view class="width-100b height-96">
|
||||
<input class="width-100b height-96 font-30" type="text" v-model="dsc" :placeholder="i18n.mine.address.p2" placeholder-class="color-C3C3C3"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-picker @confirm="selectCoin" v-model="coinType" mode="selector" range-key="full_name" :range="coinSelector"
|
||||
:confirm-text="i18n.mine.address.confirmText" :cancel-text="i18n.mine.address.cancelText"></u-picker>
|
||||
|
||||
<button @click="add()" class="cu-btn loginBtn">{{i18n.mine.address.save}}</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id:"",
|
||||
address:"",
|
||||
dsc:"",
|
||||
// userId:"",
|
||||
curr_id:'',
|
||||
name:'',
|
||||
|
||||
coinType:false,
|
||||
coinSelector: [''],
|
||||
|
||||
flag:true,
|
||||
theme:'',
|
||||
}
|
||||
},
|
||||
onLoad:function(option){
|
||||
// if(getApp().globalData.type = "address"){
|
||||
// this.id = getApp().globalData.data.id
|
||||
// this.dsc = getApp().globalData.data.description
|
||||
// this.address = getApp().globalData.data.address
|
||||
// this.userId = getApp().globalData.data.userId
|
||||
// getApp().globalData.data = ""
|
||||
// getApp().globalData.type = ""
|
||||
// console.log(this.id)
|
||||
// }
|
||||
console.log(option)
|
||||
this.get_curr()
|
||||
if(option.id){
|
||||
this.id = option.id
|
||||
this.getAddress(option.id)
|
||||
}
|
||||
},
|
||||
onShow:function(){
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
}else{
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
},
|
||||
filters:{
|
||||
addressFilter(item){
|
||||
if(item.length < 10) return
|
||||
if(item.slice(0,1) == 'T'){
|
||||
return 'TRC20'
|
||||
}
|
||||
if(item.slice(0,2) == '0x'){
|
||||
return 'ERC20'
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
add(){
|
||||
if(!this.flag) return
|
||||
if(this.curr_id==""){
|
||||
this.tos(this.i18n.mine.address.p0)
|
||||
return
|
||||
}
|
||||
if(this.address==""){
|
||||
this.tos(this.i18n.mine.address.p1)
|
||||
return
|
||||
}
|
||||
if(this.dsc==""){
|
||||
this.tos(this.i18n.mine.address.p2)
|
||||
return
|
||||
}
|
||||
uni.showLoading()
|
||||
this.flag = false
|
||||
if(this.id == ''){
|
||||
this.newData()
|
||||
}else{
|
||||
this.change()
|
||||
}
|
||||
},
|
||||
selectCoin(index){
|
||||
// console.log(this.coinSelector[index])
|
||||
this.curr_id = this.coinSelector[index].full_name
|
||||
// this.name = this.coinSelector[index].name_lian
|
||||
},
|
||||
get_curr(){
|
||||
this.post('/my/get_lian').then(res => {
|
||||
console.log('提现币种列表',res)
|
||||
if(res.code == 1){
|
||||
this.coinSelector = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getAddress(id){
|
||||
this.post('/my/address_con',{id: id}).then(res => {
|
||||
console.log('地址详情',res)
|
||||
if(res.code == 1){
|
||||
this.curr_id = res.data.full_name
|
||||
this.address = res.data.address
|
||||
this.dsc = res.data.notice
|
||||
// this.name = res.data.name_lian
|
||||
}
|
||||
})
|
||||
},
|
||||
newData(){
|
||||
this.post('/my/add_address', {
|
||||
full_name: this.curr_id,
|
||||
address: this.address,
|
||||
notice: this.dsc,
|
||||
}).then(res => {
|
||||
this.flag = true
|
||||
uni.hideLoading()
|
||||
if(res.code == 1){
|
||||
this.tos(res.msg)
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack()
|
||||
},500)
|
||||
}
|
||||
})
|
||||
},
|
||||
change(){
|
||||
this.post('/my/address_upd', {
|
||||
id: this.id,
|
||||
full_name: this.curr_id,
|
||||
address: this.address,
|
||||
notice: this.dsc,
|
||||
}).then(res => {
|
||||
this.flag = true
|
||||
uni.hideLoading()
|
||||
if(res.code == 1){
|
||||
this.tos(res.msg)
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack()
|
||||
},500)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.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>
|
||||
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<z-paging :language="$i18n.locale" ref="paging" v-model="list" @query="queryList" :pageSize="20" :auto="false">
|
||||
<!-- 下拉刷新 -->
|
||||
<custom-refresher slot="refresher" slot-scope="{refresherStatus}" :status="refresherStatus">
|
||||
</custom-refresher>
|
||||
|
||||
<!-- 头部 -->
|
||||
<myNav slot="top" :title="i18n.mine.address.title" :isRightext="true" :rightText="i18n.mine.address.add"
|
||||
rightextColor="#0165EE" @Jump="router.push('/pages/my/address/add')"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view>
|
||||
<view class="listBox" v-for="(item,index) in list" :key="index" :style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="width-500 height-80 flex direction-column align-start justify-between">
|
||||
<text class="width-450 font-30 numbold-font hidden-nowrap-ellipsis-1">{{item.address}}</text>
|
||||
<text class="width-450 font-26 medium-font hidden-nowrap-ellipsis-1">{{item.notice}}</text>
|
||||
</view>
|
||||
<view class="width-120 height-100 flex align-center justify-between">
|
||||
<image @click="del(item.id,index)" class="width-50 height-50"
|
||||
src="/static/imgs/my/delectImg@2x.png" mode=""></image>
|
||||
<image @click="router.push('/pages/my/address/add?id='+item.id)" class="width-50 height-50"
|
||||
src="/static/imgs/my/updataImg@2x.png" mode=""></image>
|
||||
</view>
|
||||
</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
|
||||
}
|
||||
this.queryList()
|
||||
},
|
||||
methods: {
|
||||
del(id, index) {
|
||||
var that = this
|
||||
uni.showModal({
|
||||
title: this.i18n.mine.address.tishi,
|
||||
content: this.i18n.mine.address.content,
|
||||
cancelText: this.i18n.mine.address.cancelText,
|
||||
confirmText: this.i18n.mine.address.confirmText,
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
uni.showLoading()
|
||||
that.post('/my/address_del', {
|
||||
id: id
|
||||
}).then(res => {
|
||||
console.log('删除提币地址', res)
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
that.tos(res.msg)
|
||||
that.$refs.paging.reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
this.post('/my/address_list', {
|
||||
page: pageNo,
|
||||
page_num: pageSize
|
||||
}).then(res => {
|
||||
console.log('地址',res)
|
||||
if (res.code == 1) {
|
||||
this.$refs.paging.complete(res.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.listBox {
|
||||
width: 690rpx;
|
||||
height: 140rpx;
|
||||
margin: 24rpx auto;
|
||||
// background: #FFFFFF;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<!-- 头部 -->
|
||||
<myNav :title="i18n.newWord.mytitle4"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750">
|
||||
<view class="feilvbox">
|
||||
<text class="font-30 color-white medium-font">{{i18n.newWord.allfree}}</text>
|
||||
<text class="font-46 color-white medium-font">{{my_fl}}</text>
|
||||
</view>
|
||||
<view class="padding-w-30">
|
||||
<!-- apt手续费 -->
|
||||
<view class="listBox">
|
||||
<text class="font-30">{{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 class="height-2" :style="'background-color: '+theme.fu_bg"></view>
|
||||
<view class="padding-c-24">
|
||||
<view class="font-30 medium-font">{{i18n.newWord.freetil1}}</view>
|
||||
<view class="padding-t-8 line-height-32" v-html="">
|
||||
<text class="font-24 medium-font">{{i18n.newWord.freetxt}}</text>
|
||||
</view>
|
||||
<view class="margin-t-20">
|
||||
<view class="flex">
|
||||
<view class="huibox flex-1">
|
||||
<text class="medium-font">{{i18n.newWord.freetime}}</text>
|
||||
</view>
|
||||
<view v-for="(item,index) in year_feilv" :key="index" class="huibox flex-1">
|
||||
<text class="medium-font">{{item.title}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex">
|
||||
<view class="huibox flex-1">
|
||||
<text class="medium-font">{{i18n.newWord.discount}}</text>
|
||||
</view>
|
||||
<view v-for="(item,index) in year_feilv" :key="index" class="baibox flex-1" :style="'background-color: '+theme.fu_bg+';color: '+theme.fu_text">
|
||||
<text class="nummedium-font">{{item.price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-t-12 padding-c-24 padding-w-30">
|
||||
<view class="font-30 medium-font">{{i18n.newWord.freetil2}}</view>
|
||||
<view class="margin-t-20 flex">
|
||||
<view class="flex-1 flex direction-column">
|
||||
<view class="huibox">
|
||||
<text class="medium-font">{{i18n.newWord.freeprice}}</text>
|
||||
</view>
|
||||
<view v-for="(item,index) in zy_feilv" :key="index" class="baibox" :style="'background-color: '+theme.fu_bg+';color: '+theme.fu_text">
|
||||
<text class="nummedium-font">{{item.num}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-1 flex direction-column">
|
||||
<view class="huibox">
|
||||
<text class="medium-font">{{i18n.newWord.deductible}}</text>
|
||||
</view>
|
||||
<view v-for="(item,index) in zy_feilv" :key="index" class="baibox" :style="'background-color: '+theme.fu_bg+';color: '+theme.fu_text">
|
||||
<text class="nummedium-font">{{item.price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
apy_pay: 0, //是否开启apt 0否 1是
|
||||
apt_free: 0,
|
||||
|
||||
checked: false,
|
||||
loading: false,
|
||||
// 中间变量,避免在watch中多次回调,造成无限循环
|
||||
controlStatus: false,
|
||||
|
||||
my_fl: '',
|
||||
year_feilv: [],
|
||||
zy_feilv: [],
|
||||
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.getInfo()
|
||||
this.getfeilv_con()
|
||||
},
|
||||
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.apt_free = res.data.apt_free
|
||||
if (res.data.apy_pay == 1) {
|
||||
this.checked = true
|
||||
} else {
|
||||
this.checked = false
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getfeilv_con() {
|
||||
this.post('/my/feilv_con').then(res => {
|
||||
console.log('费率详情', res)
|
||||
if (res.code == 1) {
|
||||
this.my_fl = res.data.my_fl
|
||||
this.year_feilv = res.data.year_feilv
|
||||
this.zy_feilv = res.data.zy_feilv
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.feilvbox {
|
||||
width: 750rpx;
|
||||
height: 110rpx;
|
||||
background: linear-gradient(276deg, #34AEFF 0%, #4B8DFF 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.listBox {
|
||||
width: 100%;
|
||||
height: 96rpx;
|
||||
// background-color: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.huibox {
|
||||
// width: 115rpx;
|
||||
height: 72rpx;
|
||||
// background: rgba(241, 244, 248, 0.5);
|
||||
border: 1rpx solid #ECECEC;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24rpx;
|
||||
// color: #333333;
|
||||
}
|
||||
|
||||
.baibox {
|
||||
// width: 115rpx;
|
||||
height: 72rpx;
|
||||
// background: rgb(255, 255, 255);
|
||||
border: 1rpx solid #ECECEC;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28rpx;
|
||||
// color: #333333;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<myNav :title="i18n.mine.bangzhu.details"></myNav>
|
||||
<view class="listBox" :style="'background-color: '+theme.fu_bg+';color: '+theme.fu_text">
|
||||
<p class="font-38 bold-font weight-bold">{{info.title}}</p>
|
||||
<p class="font-24 nummedium-font margin-t-20">{{info.createtime}}</p>
|
||||
</view>
|
||||
<view class="width-100b padding-30" v-html="info.content">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info:{},
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
},
|
||||
onLoad(e) {
|
||||
this.help_con(e.id)
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
help_con(id){
|
||||
this.post('/my/help_con',{id:id}).then(res => {
|
||||
console.log('帮助详情',res)
|
||||
if(res.code == 1){
|
||||
this.info = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.listBox{
|
||||
width: 100%;
|
||||
/* background: #FFFFFF; */
|
||||
padding: 20rpx 30rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<view>
|
||||
<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.bangzhu.title"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view>
|
||||
<view @click="goDetails(item.id)" :style="'background-color: '+theme.fu_bg+';color: '+theme.fu_text"
|
||||
class="listBox" v-for="(item,index) in list" :key="index">
|
||||
<text class="width-100b font-30 bold-font hidden-nowrap-ellipsis-1">{{item.title}}</text>
|
||||
<text class="font-24 nummedium-font">{{item.createtime}}</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) {
|
||||
setTimeout(()=>{
|
||||
this.post('/my/help_list', {
|
||||
page: pageNo,
|
||||
page_num: pageSize
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
},500)
|
||||
},
|
||||
goDetails(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/help/details?id=' + id
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.listBox {
|
||||
width: 100%;
|
||||
height: 160rpx;
|
||||
// background: #FFFFFF;
|
||||
padding: 34rpx 45rpx;
|
||||
margin: 0 auto 12rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,299 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<view class="relative" :style="{height: `calc(${statusBar}px + 55px)`}">
|
||||
<view class="width-100b fixed1" :style="{height: `calc(${statusBar}px + 55px)`}">
|
||||
<view class="width-100b flex align-center"
|
||||
:style="{paddingTop: statusBar + 'px', height: `calc(${statusBar}px + 55px)`}">
|
||||
<i @tap="router.goBack()" class="cuIcon-back font-30" style="position: absolute;left: 30rpx;" ></i>
|
||||
<view class="height-80 flex align-center justify-end absolute" style="right: 30rpx; min-width: 240rpx;">
|
||||
<view @tap="router.push('/pages/lang/lang')" class="lang-btn">
|
||||
<image class="lang-icon" src="/static/earth-icon.png" mode="aspectFit"></image>
|
||||
<text class="lang-text">{{i18n.lang && i18n.lang.title ? i18n.lang.title : 'Lang'}}</text>
|
||||
</view>
|
||||
<!-- 主题切换按钮已移除 -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-250 padding-w-45 flex align-center justify-between">
|
||||
<view v-if="userinfo.is_angel" @click="wacth(userinfo.avatar)"
|
||||
class="width-150 height-150 relative margin-r-20 flex align-center justify-center">
|
||||
<image class="width-110 height-110 radiu-50b" :src="userinfo.avatar" mode=""></image>
|
||||
<image class="width-150 height-150 absolute" style="top: 0;left: 0;"
|
||||
src="../../static/imgs/my/headimg@2x.png" mode=""></image>
|
||||
</view>
|
||||
<image v-else @click="wacth(userinfo.avatar)" class="width-120 height-120 margin-r-37 radiu-10"
|
||||
:src="userinfo.avatar" mode=""></image>
|
||||
|
||||
<view @click="router.push('/pages/my/person/index')" class="flex-1 flex align-center">
|
||||
<view class="flex-1 height-100 flex direction-column align-start justify-between">
|
||||
<text
|
||||
class="width-400 font-38 bold-font hidden-nowrap-ellipsis-1">{{userinfo.nickname}}</text>
|
||||
<view class="flex align-center">
|
||||
<view class="levelBox">{{userinfo.level}}</view>
|
||||
<view class="gradeBox">{{userinfo.grade}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<i class="cuIcon-right font-30"></i>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="">
|
||||
<view @click="router.push('/pages/my/address/index')" class="listBox">
|
||||
<view class="flex align-center">
|
||||
<image class="width-42 height-42 margin-r-32" src="/static/imgs/my/tibidizhi@2x.png" mode="">
|
||||
</image>
|
||||
<text class="font-32 medium-font">{{i18n.mine.address.title}}</text>
|
||||
</view>
|
||||
<i class="cuIcon-right font-30"></i>
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view @click="router.push('/pages/my/safety/index')" class="listBox">
|
||||
<view class="flex align-center">
|
||||
<image class="width-42 height-42 margin-r-32" src="/static/imgs/my/anquan.png" mode="">
|
||||
</image>
|
||||
<text class="font-32 medium-font">{{i18n.mine.safety.title}}</text>
|
||||
</view>
|
||||
<i class="cuIcon-right font-30"></i>
|
||||
</view>
|
||||
<view @click="router.push('/pages/my/safety/real')" class="listBox">
|
||||
<view class="flex align-center">
|
||||
<image class="width-42 height-42 margin-r-32" src="/static/imgs/my/shenfen@2x.png" mode="">
|
||||
</image>
|
||||
<text class="font-32 medium-font">{{i18n.mine.safety.shiming}}</text>
|
||||
</view>
|
||||
<i class="cuIcon-right font-30"></i>
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<!-- <view @click="router.push('/pages/my/butiranKadar/butiranKadar')" class="listBox">
|
||||
<view class="flex align-center">
|
||||
<image class="width-42 height-42 margin-r-32" src="/static/imgs/my/feilv@2x.png" mode="">
|
||||
</image>
|
||||
<text class="font-32 medium-font">{{i18n.newWord.mytitle4}}</text>
|
||||
</view>
|
||||
<i class="cuIcon-right font-30"></i>
|
||||
</view> -->
|
||||
<view @click="router.push('/pages/my/aboutUs/rate_overview')" class="listBox">
|
||||
<view class="flex align-center">
|
||||
<image class="width-42 height-42 margin-r-32" src="/static/imgs/my/huilv@2x.png" mode="">
|
||||
</image>
|
||||
<text class="font-32 medium-font">{{i18n.newWord.mytitle5}}</text>
|
||||
</view>
|
||||
<i class="cuIcon-right font-30"></i>
|
||||
</view>
|
||||
<!-- <view @click="router.push('/pages/my/aboutUs/API')" class="listBox">
|
||||
<view class="flex align-center">
|
||||
<image class="width-42 height-42 margin-r-32" src="/static/imgs/my/API@2x.png" mode="">
|
||||
</image>
|
||||
<text class="font-32 medium-font">{{i18n.newWord.mytitle6}}</text>
|
||||
</view>
|
||||
<i class="cuIcon-right font-30"></i>
|
||||
</view> -->
|
||||
<!-- <view @click="tos(i18n.newWord.no)" class="listBox">
|
||||
<view class="flex align-center">
|
||||
<image class="width-42 height-42 margin-r-32" src="/static/imgs/my/shouquan@2x.png" mode="">
|
||||
</image>
|
||||
<text class="font-32 medium-font">{{i18n.newWord.mytitle7}}</text>
|
||||
</view>
|
||||
<i class="cuIcon-right font-30"></i>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="">
|
||||
<view @click="router.push('/pages/my/help/index')" class="listBox">
|
||||
<view class="flex align-center">
|
||||
<image class="width-42 height-42 margin-r-32" src="/static/imgs/my/bangzhu@2x.png" mode="">
|
||||
</image>
|
||||
<text class="font-32 medium-font">{{i18n.mine.bangzhu.title}}</text>
|
||||
</view>
|
||||
<i class="cuIcon-right font-30"></i>
|
||||
</view>
|
||||
<view @click="router.push('/pages/my/share/index')" class="listBox">
|
||||
<view class="flex align-center">
|
||||
<image class="width-42 height-42 margin-r-32" src="/static/imgs/my/haoyou@2x.png" mode="">
|
||||
</image>
|
||||
<text class="font-32 medium-font">{{i18n.mine.share.title}}</text>
|
||||
</view>
|
||||
<i class="cuIcon-right font-30"></i>
|
||||
</view>
|
||||
<!-- <view @click="router.push('/pages/my/aboutUs/join_community')" class="listBox">
|
||||
<view class="flex align-center">
|
||||
<image class="width-42 height-42 margin-r-32" src="/static/imgs/my/shequn@2x.png" mode="">
|
||||
</image>
|
||||
<text class="font-32 medium-font">{{i18n.newWord.mytitle10}}</text>
|
||||
</view>
|
||||
<i class="cuIcon-right font-30"></i>
|
||||
</view> -->
|
||||
<view @click="router.push('/pages/my/aboutUs/index')" class="listBox">
|
||||
<view class="flex align-center">
|
||||
<image class="width-42 height-42 margin-r-32" src="/static/imgs/my/women@2x.png" mode="">
|
||||
</image>
|
||||
<text class="font-32 medium-font">{{i18n.mine.about.title}}</text>
|
||||
</view>
|
||||
<i class="cuIcon-right font-30"></i>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="width-600 padding-b-40" style="margin: 10% auto;">
|
||||
<button @click="logout" class="cu-btn loginBtn">{{i18n.mine.signout}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
userinfo: {},
|
||||
themeChange: true,
|
||||
theme:'',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
this.themeChange = true
|
||||
},
|
||||
onShow() {
|
||||
const lang = uni.getStorageSync('Language')
|
||||
if (lang) {
|
||||
this.$i18n.locale = lang
|
||||
}
|
||||
this.getInfo()
|
||||
},
|
||||
methods: {
|
||||
getInfo() {
|
||||
this.post('/my/get_userinfo').then((res) => {
|
||||
console.log('用户信息', res)
|
||||
if (res.code == 1) {
|
||||
this.userinfo = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
wacth(url) {
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
})
|
||||
},
|
||||
logout() {
|
||||
var that = this
|
||||
uni.showModal({
|
||||
title: this.i18n.mine.tishi,
|
||||
content: this.i18n.mine.content,
|
||||
cancelText: this.i18n.mine.cancelText,
|
||||
confirmText: this.i18n.mine.confirmText,
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
uni.showLoading()
|
||||
that.post('/user/logout').then((res) => {
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
uni.removeStorageSync('token');
|
||||
uni.removeStorageSync('user_id');
|
||||
uni.removeStorageSync('userinfo');
|
||||
that.tos(res.msg)
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/index'
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fixed1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 990;
|
||||
}
|
||||
|
||||
.listBox {
|
||||
width: 750rpx;
|
||||
height: 96rpx;
|
||||
padding: 0 46rpx;
|
||||
// background: #FFFFFF;
|
||||
border-top: 1rpx solid rgba(220, 220, 220, 0.1);
|
||||
// border-bottom: 1rpx solid rgba(220, 220, 220, 0.1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.lang-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
padding: 8rpx 14rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 1rpx solid rgba(220, 220, 220, 0.4);
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
max-width: 260rpx;
|
||||
}
|
||||
|
||||
.lang-icon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.lang-text {
|
||||
font-size: 26rpx;
|
||||
line-height: 1;
|
||||
max-width: 200rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.loginBtn {
|
||||
width: 600rpx;
|
||||
height: 96rpx;
|
||||
background: #F00 !important;
|
||||
border-radius: 12rpx;
|
||||
color: #FFF;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.levelBox {
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
margin-right: 20rpx;
|
||||
background-color: #E5F9F2;
|
||||
padding: 0 14rpx;
|
||||
font-size: 20rpx;
|
||||
color: #333;
|
||||
border-radius: 10rpx;
|
||||
font-family: "Bold" !important;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.gradeBox {
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
margin-right: 20rpx;
|
||||
background-color: #FFEBEB;
|
||||
padding: 0 14rpx;
|
||||
font-size: 20rpx;
|
||||
color: #333;
|
||||
border-radius: 10rpx;
|
||||
font-family: "Bold" !important;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="i18n.mine.introduce.title"></myNav>
|
||||
<view class="width-100b">
|
||||
<view class="width-100b height-96" style="border-top: 1rpx solid rgba(220, 220, 220, 0.1);">
|
||||
<view @click="Mshow=true" class="width-690 margin-0-auto height-96 flex align-center justify-between">
|
||||
<text class="font-32 bold-font">{{i18n.mine.introduce.avatar}}</text>
|
||||
<view class="flex align-center justify-end">
|
||||
<image class="width-60 height-60 radiu-50b margin-r-10" :src="avatar" mode=""></image>
|
||||
<i class="cuIcon-right font-24"></i>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-100b height-96 margin-c-1" style="border-top: 1rpx solid rgba(220, 220, 220, 0.1);">
|
||||
<view @click="router.push('/pages/my/person/udataName')" class="width-690 margin-0-auto height-96 flex align-center justify-between">
|
||||
<text class="font-32 bold-font">{{i18n.mine.introduce.nickname}}</text>
|
||||
<view class="line-height-96">
|
||||
<text class="font-32 bold-font margin-r-10">{{nickname}}</text>
|
||||
<i class="cuIcon-right font-24"></i>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="email" class="width-100b height-96" style="border-top: 1rpx solid rgba(220, 220, 220, 0.1);">
|
||||
<view class="width-690 margin-0-auto height-96 flex align-center justify-between">
|
||||
<text class="font-32 bold-font">{{i18n.mine.safety.email}}</text>
|
||||
<view class="line-height-96">
|
||||
<text class="font-32 numbold-font">{{email}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="mobile" class="width-100b height-96" style="border-top: 1rpx solid rgba(220, 220, 220, 0.1);">
|
||||
<view class="width-690 margin-0-auto height-96 flex align-center justify-between">
|
||||
<text class="font-32 bold-font">{{i18n.mine.safety.phone}}</text>
|
||||
<view class="line-height-96">
|
||||
<text class="font-32 numbold-font">{{mobile}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 更多弹窗 -->
|
||||
<u-popup style="z-index: 5000;" mode="bottom" v-model="Mshow">
|
||||
<view class="padding-w-75 padding-c-50" :style="'background-color: '+theme.bg">
|
||||
<view @click="updataImg('album')" :style="'background-color: '+theme.fu_bg+';color:'+theme.text"
|
||||
class="height-96 radiu-10 flex align-center justify-center font-30 bold-font margin-b-18">{{i18n.mine.introduce.album}}</view>
|
||||
<view @click="updataImg('camera')" :style="'background-color: '+theme.fu_bg+';color:'+theme.text"
|
||||
class="height-96 radiu-10 flex align-center justify-center font-30 bold-font margin-b-48">{{i18n.mine.introduce.camera}}</view>
|
||||
<view @click="Mshow=false" :style="'background-color: '+theme.fu_bg+';color:'+theme.fu_text"
|
||||
class="height-96 radiu-10 flex align-center justify-center font-30 bold-font ">{{i18n.mine.introduce.cancel}}</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
nickname: '',
|
||||
avatar: '',
|
||||
mobile:'',
|
||||
email:'',
|
||||
|
||||
Mshow: false,
|
||||
theme:''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.init()
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
}else{
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
this.post('/my/get_userinfo').then((res) => {
|
||||
// console.log('用户信息',res);
|
||||
if (res.code == 1) {
|
||||
this.avatar = res.data.avatar
|
||||
this.nickname = res.data.nickname
|
||||
this.email = res.data.email
|
||||
this.mobile = res.data.mobile
|
||||
}
|
||||
})
|
||||
},
|
||||
// 更换头像
|
||||
updataImg(type) {
|
||||
let self = this
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sourceType:[type],
|
||||
success: (chooseImageRes) => {
|
||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
||||
this.avatar = tempFilePaths[0]
|
||||
uni.showLoading({
|
||||
title: this.i18n.mine.introduce.loading,
|
||||
mask:true
|
||||
})
|
||||
uni.uploadFile({
|
||||
url: self.upload + '/publics/image_upload', //仅为示例,非真实的接口地址
|
||||
filePath: tempFilePaths[0],
|
||||
name: 'file',
|
||||
formData: {
|
||||
token: uni.getStorageSync('token')
|
||||
},
|
||||
success: (res) => {
|
||||
// console.log(res)
|
||||
let data = JSON.parse(res.data)
|
||||
if (data.code == 1) {
|
||||
// console.log(data)
|
||||
var avatarUrl = {
|
||||
avatar: data.data.url
|
||||
}
|
||||
// console.log(avatarUrl)
|
||||
this.post('/my/profile', avatarUrl).then(res1 => {
|
||||
// console.log(res1)
|
||||
uni.hideLoading()
|
||||
this.Mshow = false
|
||||
if (res1.code == 1) {
|
||||
this.tos(res1.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
@@ -0,0 +1,61 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="i18n.mine.introduce.updataName" :isRightext="true" :rightText="i18n.mine.introduce.ok" rightextColor="#0165EE" @Jump="updataName"></myNav>
|
||||
|
||||
<view class="width-100b padding-w-40 flex direction-column justify-around"
|
||||
:style="'background-color: '+theme.fu_bg" >
|
||||
<input class="width-100b height-96 font-30 bold-font" :placeholder="i18n.mine.introduce.inputname"
|
||||
type="text" v-model="name" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
name:'',
|
||||
flag:true,
|
||||
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: {
|
||||
updataName(){
|
||||
if(!this.flag) return
|
||||
if (this.name == '') {
|
||||
this.tos(this.i18n.mine.introduce.nullname);
|
||||
return
|
||||
}
|
||||
this.flag = false
|
||||
uni.showLoading()
|
||||
this.post('/my/profile',{nickname:this.name}).then((res) => {
|
||||
console.log('修改昵称',res);
|
||||
this.flag = true
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack()
|
||||
},500)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<view >
|
||||
<myNav title="佣金明细"></myNav>
|
||||
<view class="padding">
|
||||
<view class="top grid col-1 padding align-center text-white">
|
||||
<view class="">
|
||||
<view class="">{{i18n.mine.share.total}}(USDT)</view>
|
||||
<view class="margin-top text-bold text-xl">{{usdt || 0}}</view>
|
||||
<!-- <view class="margin-top-sm">≈ {{usdt_cny || 0}} CNY</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex justify-between align-center text-gray padding-lr text-xs font-30">
|
||||
<view class="flex-sub">
|
||||
{{i18n.mine.share.miaoshu}}
|
||||
</view>
|
||||
<view class="flex-sub text-center">
|
||||
{{i18n.mine.share.yongjin}}
|
||||
</view>
|
||||
<view class="flex-twice text-right">
|
||||
{{i18n.mine.share.time}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-between padding-lr padding-tb-xs align-center" v-for="(item,index) in list">
|
||||
<view class="flex-sub">
|
||||
{{item.description}}
|
||||
</view>
|
||||
<view class="flex-sub text-center">
|
||||
{{item.price}}
|
||||
</view>
|
||||
<view class="flex-twice text-right">
|
||||
{{item.createtime}}
|
||||
</view>
|
||||
</view>
|
||||
<p class="text-center margin-t-20 text-gray" v-if="list.length == 0">{{i18n.mine.share.no}}</p>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageNum:0,
|
||||
list:[],
|
||||
pages:"",
|
||||
data:"",
|
||||
usdt_cny:'',
|
||||
usdt:'',
|
||||
}
|
||||
},
|
||||
onShow:function(){
|
||||
this.reList()
|
||||
this.getInfo()
|
||||
},
|
||||
onReachBottom:function(){
|
||||
this.getList()
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
//时间戳转换
|
||||
formatDate(date) {
|
||||
var date = new Date(date);
|
||||
var YY = date.getFullYear() + '-';
|
||||
var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
||||
var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
|
||||
var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
|
||||
var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ":";
|
||||
var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
|
||||
return YY + MM + DD + " " + hh + mm + ss;
|
||||
// return MM + DD + " " + hh + mm;
|
||||
},
|
||||
getInfo(){
|
||||
this.http('api/user/my_commission', {
|
||||
pageSize:20,
|
||||
pageNum:1,
|
||||
}).then(res => {
|
||||
if(res.code == 1){
|
||||
this.usdt = res.data.usdt
|
||||
this.usdt_cny = res.data.usdt_cny
|
||||
}
|
||||
})
|
||||
},
|
||||
reList(){
|
||||
this.pageNum = 0
|
||||
this.list = []
|
||||
this.pages = ""
|
||||
this.getList()
|
||||
},
|
||||
getList(){
|
||||
if(this.pages <= this.pageNum && this.pages!==""){
|
||||
return
|
||||
}
|
||||
this.http('api/user/my_commission', {
|
||||
pageSize:20,
|
||||
pageNum:this.pageNum+1,
|
||||
}).then(res => {
|
||||
if(res.code == 1){
|
||||
this.list = this.list.concat(res.data.data.data)
|
||||
this.pages = res.data.data.last_page
|
||||
if(res.data.data.data.length==0){
|
||||
console.log("??????????")
|
||||
}else{
|
||||
this.pageNum++
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page{
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
.top{
|
||||
background-size: 100% 100%;
|
||||
width: 100%;
|
||||
height: 250rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,132 @@
|
||||
<template>
|
||||
<view class="padding-b-120" :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="i18n.mine.share.title"></myNav>
|
||||
|
||||
<view class="width-440 margin-0-auto margin-t-100 height-468">
|
||||
<image class="width-440 height-468" src="/static/imgs/my/fenxiang@2x.png" mode=""></image>
|
||||
</view>
|
||||
<view class="borderBox">
|
||||
<text class="font-32 color-0165EE">{{i18n.mine.share.code}}</text>
|
||||
<image class="width-200 height-200" :src="qrcCode?qrcCode:'/static/APEClogo@2x.png'" mode=""></image>
|
||||
<text @click="copy(referral_code)" class="font-36 numbold-font color-0165EE">{{referral_code}}</text>
|
||||
<view @click="save()" class="copyBtn">{{i18n.mine.share.copy}}</view>
|
||||
</view>
|
||||
|
||||
<view class="bottomBox" :style="'background-color: '+theme.fu_bg">
|
||||
<view @click="router.push('/pages/my/share/team')" class="width-300 margin-0-auto height-100b padding-w-20 flex align-center justify-around">
|
||||
<image class="width-28 height-22" src="/static/imgs/my/team@2x.png" mode=""></image>
|
||||
<text class="font-30">{{i18n.mine.share.team}}</text>
|
||||
</view>
|
||||
<!-- <view class="height-17 margin-w-50" style="border: 1px solid #0165EE;"></view>
|
||||
<view @click="router.push('/pages/my/share/commission')" class="width-300 height-100b padding-w-20 flex align-center justify-around">
|
||||
<image class="width-22 height-28" src="/static/imgs/my/mingxi@2x.png" mode=""></image>
|
||||
<text class="font-30 color-333333">佣金明细</text>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import clipboard from "@/components/clipboard.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
referral_code: "",
|
||||
qrcCode:'',
|
||||
theme:'',
|
||||
}
|
||||
},
|
||||
onLoad: function() {
|
||||
this.getInfo()
|
||||
},
|
||||
onShow:function(){
|
||||
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: {
|
||||
save(){
|
||||
var that = this;
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: that.qrcCode,
|
||||
success(res) {
|
||||
that.tos(that.i18n.mine.share.codeSuceed)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 复制地址
|
||||
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)
|
||||
},
|
||||
getInfo() {
|
||||
this.post('/my/get_share').then(res => {
|
||||
if (res.code == 1) {
|
||||
// console.log(res)
|
||||
this.referral_code = res.data.referral_code
|
||||
this.qrcCode = res.data.qrcode
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.borderBox{
|
||||
width: 600rpx;
|
||||
height: 584rpx;
|
||||
margin: 20rpx auto;
|
||||
padding: 50rpx 0;
|
||||
// background: #EFF6FF;
|
||||
border: 1rpx dashed #3ECEB2;
|
||||
border-radius: 10rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.copyBtn{
|
||||
width: 278rpx;
|
||||
height: 72rpx;
|
||||
background: linear-gradient(180deg, #52F3C9 0%, #3ECEB2 100%);
|
||||
box-shadow: 0rpx 6rpx 10rpx rgba(61, 128, 212, 0.12);
|
||||
border-radius: 6rpx;
|
||||
font-size: 36rpx;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.bottomBox{
|
||||
width: 100%;
|
||||
height: 120rpx;
|
||||
padding: 0 70rpx;
|
||||
// background: #EFF6FF;
|
||||
position: fixed;
|
||||
bottom: 0rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<view>
|
||||
<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.share.team"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view>
|
||||
<view class="width-100b height-200 padding-w-45 flex align-center justify-between">
|
||||
<view class="top1">
|
||||
<text class="font-26 color-white" style="opacity: 0.5;">{{i18n.mine.share.num}}</text>
|
||||
<text class="font-34 numbold-font color-white">{{team_num}}{{i18n.mine.share.ren}}</text>
|
||||
</view>
|
||||
<view class="top2">
|
||||
<text class="font-26 color-white" style="opacity: 0.5;">{{i18n.mine.share.today}}</text>
|
||||
<text class="font-34 numbold-font color-white">{{team_today}}{{i18n.mine.share.ren}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="width-100b height-70 flex direction-column align-center justify-center">
|
||||
<text class="font-26 bold-font">{{i18n.mine.share.my}}</text>
|
||||
<view class="width-48 height-4 margin-t-13" style="background-color: #3ECEB2;"></view>
|
||||
</view>
|
||||
|
||||
<view class="listBox" :style="'background-color: '+theme.fu_bg+';color: '+theme.fu_text"
|
||||
v-for="(item,index) in list" :key="index">
|
||||
<text class="font-28 bold-font">{{item.nickname}}</text>
|
||||
<text class="font-24 nummedium-font">{{item.jointime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
team_num: 0,
|
||||
team_today: 0,
|
||||
|
||||
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: {
|
||||
team_head() {
|
||||
this.post('/my/team_head').then(res => {
|
||||
if (res.code == 1) {
|
||||
this.team_num = res.data.team_num
|
||||
this.team_today = res.data.team_today
|
||||
}
|
||||
})
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
setTimeout(() => {
|
||||
this.post('/my/team_push', {
|
||||
page: pageNo,
|
||||
page_num: pageSize
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
this.team_head()
|
||||
}, 500)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.top1 {
|
||||
background-image: url(../../../static/imgs/my/top1@2x.png);
|
||||
background-repeat: repeat;
|
||||
background-size: 100% 100%;
|
||||
width: 312rpx;
|
||||
height: 154rpx;
|
||||
padding: 28rpx 45rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.top2 {
|
||||
background-image: url(../../../static/imgs/my/top2@2x.png);
|
||||
background-repeat: repeat;
|
||||
background-size: 100% 100%;
|
||||
width: 312rpx;
|
||||
height: 154rpx;
|
||||
padding: 28rpx 45rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.listBox {
|
||||
width: 100%;
|
||||
height: 160rpx;
|
||||
/* background: #FFFFFF; */
|
||||
padding: 34rpx 45rpx;
|
||||
margin: 0 auto 12rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,319 @@
|
||||
<template>
|
||||
<view>
|
||||
<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>
|
||||
|
||||
<!-- 头部 -->
|
||||
<view slot="top" class="width-750 relative flex align-center justify-center bj-8EBEFF"
|
||||
:style="{height: `calc(${statusBar}px + 176rpx)`}">
|
||||
<view class="width-750 fixed1"
|
||||
:style="{paddingTop: statusBar + 'px', height: `calc(${statusBar}px + 176rpx)`}">
|
||||
<view class="width-750 height-110 padding-w-30 bgimg1 flex align-center justify-center">
|
||||
<view @click="_goback" class="cuIcon-back font-40"
|
||||
style="position: absolute;left: 30rpx;"></view>
|
||||
<text class="font-36 weight-bold">{{i18n.TranRecord.title1}}</text>
|
||||
<image @click="show=true" class="width-36 height-36 absolute" style="right: 30rpx;"
|
||||
src="/static/imgs/index/shaixuan@2x.png"></image>
|
||||
</view>
|
||||
<view class="height-66 flex align-center">
|
||||
<view @click="selectMeun(index)" v-for="(item,index) in meunList" class="flex-1 height-66">
|
||||
<view class="height-60 line-height-60 text-center">
|
||||
<text
|
||||
:class="meunIndex==index?'font-28 color-0165EE weight-bold':'color-C3C3C3 font-26'">{{item}}</text>
|
||||
</view>
|
||||
<view class="height-4 flex align-center justify-center">
|
||||
<view v-if="meunIndex==index" class="width-40 height-4 bj-0165EE"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-b-40">
|
||||
<view>
|
||||
<view v-for="(item,index) in list" class="padding-w-30 margin-t-8"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="height-96 flex align-center justify-between">
|
||||
<view class="flex align-center font-28 numbold-font">
|
||||
<image class="width-52 height-52 radiu-26 margin-r-12" :src="item.image" mode="">
|
||||
</image>
|
||||
<text :class="item.type==1?'color-00C481':'color-FF4040'">{{item.type==1?i18n.TranRecord.text1:i18n.TranRecord.text2}}</span>{{item.coinname}}</text>
|
||||
</view>
|
||||
<text class="font-24 color-C3C3C3">{{item.createtime}}</text>
|
||||
</view>
|
||||
<view class="padding-c-20">
|
||||
<view class="flex align-center margin-b-8">
|
||||
<text class="font-24 color-C3C3C3">{{i18n.TranRecord.text3}}:</text>
|
||||
<text class="font-24 numbold-font">{{item.order_sn}}</text>
|
||||
</view>
|
||||
<view class="flex align-center margin-b-8">
|
||||
<text
|
||||
class="font-24 color-C3C3C3">{{item.type == 1?i18n.TranRecord.text1:i18n.TranRecord.text2}}{{i18n.TranRecord.text4}}:</text>
|
||||
<text class="font-24 numbold-font">{{item.num}}</text>
|
||||
</view>
|
||||
<view class="flex align-center margin-b-8">
|
||||
<text
|
||||
class="font-24 color-C3C3C3">{{item.type == 1?i18n.TranRecord.text1:i18n.TranRecord.text2}}{{i18n.TranRecord.text5}}:</text>
|
||||
<text class="font-24 numbold-font">{{item.amount}}</text>
|
||||
</view>
|
||||
<view class="flex align-center margin-b-8">
|
||||
<text
|
||||
class="font-24 color-C3C3C3">{{item.type == 1?i18n.TranRecord.text1:i18n.TranRecord.text2}}{{i18n.TranRecord.text6}}:</text>
|
||||
<text class="font-24 numbold-font">{{item.price}}</text>
|
||||
</view>
|
||||
<view class="flex align-center margin-b-8">
|
||||
<text class="font-24 color-C3C3C3">{{i18n.TranRecord.text7}}:</text>
|
||||
<text class="font-24 numbold-font">{{item.fee}}</text>
|
||||
</view>
|
||||
<view class="flex align-center margin-b-8">
|
||||
<text class="font-24 color-C3C3C3">{{i18n.TranRecord.text8}}:</text>
|
||||
<text class="font-24 numbold-font">{{item.bc_time}}</text>
|
||||
</view>
|
||||
<view class="flex align-center">
|
||||
<text class="font-24 color-C3C3C3">{{i18n.TranRecord.text9}}:</text>
|
||||
<text class="font-24 numbold-font">{{item.income}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</z-paging>
|
||||
|
||||
<!-- 筛选弹窗 -->
|
||||
<u-popup v-model="show" mode="bottom" border-radius="25">
|
||||
<view class="width-100b padding-w-20"
|
||||
:style="'background-color: '+theme.bg+';color: '+theme.text"
|
||||
style="height:570rpx; border-radius: 20rpx 20rpx 0 0;">
|
||||
<view class="width-100b height-70 text-center line-height-100">
|
||||
<text class="font-28 weight-bold">{{i18n.TranRecord.text10}}</text>
|
||||
</view>
|
||||
<!-- <view class="width-100b height-160 padding-w-30 margin-c-10 flex direction-column justify-around">
|
||||
<text class="font-30 weight-bold">{{i18n.TranRecord.text11}}</text>
|
||||
<view class="width-100b flex align-center">
|
||||
<view @click="selectBourse(index)" :class="bourseIndex==index+1?'select_on':'select_off'"
|
||||
v-for="(item,index) in bourseList" :key="index">{{item}}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="width-100b height-150 margin-c-10 padding-w-30 flex direction-column justify-around">
|
||||
<text class="font-28 weight-bold line-height-64">{{i18n.TranRecord.text12}} <span
|
||||
class="font-26">({{i18n.TranRecord.text13}})</span></text>
|
||||
<input class="width-100b height-86 font-28 numbold-font"
|
||||
:placeholder="i18n.TranRecord.tos2" type="text" v-model="coin" />
|
||||
</view>
|
||||
<view class="width-100b height-160 margin-c-10 padding-w-30 flex direction-column justify-around">
|
||||
<text class="font-28 weight-bold">{{i18n.TranRecord.text14}}</text>
|
||||
<view class="width-100b height-70 flex align-center justify-between">
|
||||
<view @click="tshow1=true" class="selectTime">
|
||||
<view class="picker">
|
||||
{{startTime}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-20 height-6 radiu-3 bj-0165EE"></view>
|
||||
<view @click="tshow2=true" class="selectTime">
|
||||
<view class="picker">
|
||||
{{endTime}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-100b height-100 padding-30 flex align-center justify-between">
|
||||
<view class="resetBtn" @click="reset">{{i18n.TranRecord.text15}}</view>
|
||||
<view class="inquireBtn" @click="chechOrder">{{i18n.TranRecord.text16}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-picker mode="time" v-model="tshow1" @confirm="startTimeChange" :cancelText="i18n.Tactics.text28"
|
||||
:confirmText="i18n.Tactics.text29"></u-picker>
|
||||
<u-picker mode="time" v-model="tshow2" @confirm="endTimeChange" :cancelText="i18n.Tactics.text28"
|
||||
:confirmText="i18n.Tactics.text29"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
meunList: ['全部', '买入', '卖出'],
|
||||
meunIndex: 0,
|
||||
|
||||
show: false,
|
||||
|
||||
bourseList: ['HUOBI'],
|
||||
// bourseList: ['HUOBI', 'Binance', 'OKEx', 'Coinbase'],
|
||||
bourseIndex: 1,
|
||||
|
||||
coin: '',
|
||||
|
||||
startTime: '请选择时间',
|
||||
endTime: '请选择时间',
|
||||
tshow1: false,
|
||||
tshow2: false,
|
||||
|
||||
list: [],
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.meunList[0] = this.i18n.TranRecord.text17
|
||||
this.meunList[1] = this.i18n.TranRecord.text1
|
||||
this.meunList[2] = this.i18n.TranRecord.text2
|
||||
this.startTime = this.i18n.TranRecord.text18
|
||||
this.endTime = this.i18n.TranRecord.text18
|
||||
console.log(e)
|
||||
if (e.symbol) {
|
||||
this.coin = e.symbol
|
||||
}
|
||||
if (e.exchange_id) {
|
||||
this.bourseIndex = e.exchange_id
|
||||
}
|
||||
// this.top()
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
chechOrder() {
|
||||
// var obj = {
|
||||
// coin: this.coin,
|
||||
// bourseIndex: this.bourseIndex,
|
||||
// startTime: this.startTime,
|
||||
// endTime: this.endTime,
|
||||
// exchange_id: this.bourseIndex
|
||||
// }
|
||||
// console.log(obj)
|
||||
this.show = false
|
||||
this.list = []
|
||||
this.queryList(1, 10)
|
||||
},
|
||||
selectMeun(index) {
|
||||
this.list = []
|
||||
this.meunIndex = index
|
||||
this.queryList(1, 10)
|
||||
},
|
||||
// selectStatus(index) {
|
||||
// this.statusIndex = index
|
||||
// },
|
||||
selectBourse(index) {
|
||||
this.bourseIndex = index + 1
|
||||
},
|
||||
startTimeChange: function(e) {
|
||||
console.log('开始时间', e)
|
||||
this.startTime = e.year + '-' + e.month + '-' + e.day
|
||||
},
|
||||
endTimeChange: function(e) {
|
||||
console.log('结束时间', e)
|
||||
this.endTime = e.year + '-' + e.month + '-' + e.day
|
||||
},
|
||||
reset() {
|
||||
this.statusIndex = 0
|
||||
this.bourseIndex = 1
|
||||
this.coin = ''
|
||||
this.startTime = this.i18n.TranRecord.text18
|
||||
this.endTime = this.i18n.TranRecord.text18
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
let obj = {
|
||||
page: pageNo,
|
||||
page_num: pageSize,
|
||||
type: this.meunIndex,
|
||||
exchange_id: this.bourseIndex == '' ? '' : this.bourseIndex,
|
||||
symbol: this.coin == '' ? '' : this.coin,
|
||||
starttime: this.startTime == this.i18n.TranRecord.text18 ? '' : this.startTime,
|
||||
endtime: this.endTime == this.i18n.TranRecord.text18 ? '' : this.endTime
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.post('/strategy/get_order', obj).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res)
|
||||
this.$refs.paging.complete(res.data.data);
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fixed1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 1010;
|
||||
}
|
||||
|
||||
.selectTime {
|
||||
width: 300rpx;
|
||||
height: 66rpx;
|
||||
background: rgba(160, 171, 181, 0.2);
|
||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(255, 255, 255, 0.5);
|
||||
border-radius: 10rpx;
|
||||
color: #8B99A2;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
line-height: 66rpx;
|
||||
}
|
||||
|
||||
.select_on {
|
||||
width: 180rpx;
|
||||
height: 66rpx;
|
||||
margin-right: 20rpx;
|
||||
line-height: 66rpx;
|
||||
background: #0165EE;
|
||||
border-radius: 10rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.select_off {
|
||||
width: 180rpx;
|
||||
height: 66rpx;
|
||||
margin-right: 20rpx;
|
||||
line-height: 66rpx;
|
||||
background: #8B99A2;
|
||||
border-radius: 10rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.resetBtn {
|
||||
width: 300rpx;
|
||||
height: 86rpx;
|
||||
line-height: 86rpx;
|
||||
background: rgba(160, 171, 181, 0.2);
|
||||
border-radius: 10rpx;
|
||||
color: #8B99A2;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.inquireBtn {
|
||||
width: 300rpx;
|
||||
height: 86rpx;
|
||||
line-height: 86rpx;
|
||||
background: #0165EE;
|
||||
border-radius: 10rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,424 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="i18n.setTransaction.title"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750">
|
||||
<!-- 首单 -->
|
||||
<view class="height-183 padding-w-30 padding-c-14 flex direction-column justify-between">
|
||||
<view class="flex align-center">
|
||||
<image class="width-42 height-42 margin-r-8" src="/static/imgs/quantify/shoudan.png" mode="">
|
||||
</image>
|
||||
<text class="font-28">{{i18n.setTransaction.text1}}</text>
|
||||
</view>
|
||||
<text class="font-24 color-C3C3C3">{{i18n.setTransaction.text2}}</text>
|
||||
<view class="flex align-center">
|
||||
<input class="font-28 flex-1 numbold-font padding-r-20" type="text" v-model="first_num"
|
||||
:placeholder="i18n.setTransaction.tos1" placeholder-class="color-333333" />
|
||||
<text class="font-28 numbold-font">USDT</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 最低 -->
|
||||
<view class="height-186 padding-w-30 margin-t-26">
|
||||
<view class="height-93 flex align-center justify-between">
|
||||
<text class="font-28">{{i18n.setTransaction.text3}}</text>
|
||||
<view class="flex align-center flex-1">
|
||||
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
|
||||
v-model="min_price" :placeholder="i18n.setTransaction.tos2"
|
||||
placeholder-class="color-0165EE" />
|
||||
<text class="font-28 weight-bold">USDT</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-93 flex direction-column justify-center font-24 color-FF4040">
|
||||
<text>{{i18n.setTransaction.text4}}</text>
|
||||
<text>{{i18n.setTransaction.text5}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 其它 -->
|
||||
<view class="margin-t-26">
|
||||
<view class="height-96 flex align-center justify-between padding-w-30 margin-b-1">
|
||||
<text class="font-28">{{i18n.setTransaction.text6}}</text>
|
||||
<view class="flex align-center">
|
||||
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
|
||||
v-model="order_num" :placeholder="i18n.setTransaction.tos3"
|
||||
placeholder-class="color-0165EE" />
|
||||
<text class="font-28 weight-bold">{{i18n.setTransaction.text7}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-between padding-w-30 margin-b-1">
|
||||
<text class="font-28">{{i18n.setTransaction.text8}}</text>
|
||||
<view class="flex align-center">
|
||||
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
|
||||
v-model="zy_percent" :placeholder="i18n.setTransaction.tos4"
|
||||
placeholder-class="color-0165EE" />
|
||||
<text class="font-28 weight-bold">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-between padding-w-30 margin-b-1">
|
||||
<text class="font-28">{{i18n.setTransaction.text9}}</text>
|
||||
<view class="flex align-center">
|
||||
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
|
||||
v-model="zy_ht" :placeholder="i18n.setTransaction.tos5" placeholder-class="color-0165EE" />
|
||||
<text class="font-28 weight-bold">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-between padding-w-30 margin-b-1">
|
||||
<text class="font-28">{{i18n.setTransaction.text10}}</text>
|
||||
<view @click="bcShow=true" class="flex align-center">
|
||||
<text
|
||||
class="font-28 color-0165EE nummedium-font">{{bcs_1 == ''?i18n.setTransaction.text14:i18n.setTransaction.text15}}</text>
|
||||
<u-icon name="arrow-right" color="#0165EE" size="28"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-between padding-w-30 margin-b-1">
|
||||
<text class="font-28">{{i18n.setTransaction.text11}}</text>
|
||||
<view class="flex align-center">
|
||||
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
|
||||
v-model="bc_ht" :placeholder="i18n.setTransaction.tos6" placeholder-class="color-0165EE" />
|
||||
<text class="font-28 weight-bold">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-between padding-w-30 margin-b-1">
|
||||
<text class="font-28">{{i18n.setTransaction.text12}}</text>
|
||||
<u-switch @change="change" size="36" v-model="pc_status" active-color="#0165EE" inactive-color="#F1F4F8">
|
||||
</u-switch>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-between padding-w-30 margin-b-1">
|
||||
<text class="font-28">{{i18n.setTransaction.text13}}</text>
|
||||
<u-switch @change="change1" size="36" v-model="rc_status" active-color="#0165EE" inactive-color="#F1F4F8">
|
||||
</u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view @click="get_cionSetting" class="btn">{{i18n.setTransaction.text16}}</view>
|
||||
</view>
|
||||
|
||||
<!-- 补仓跌幅弹窗 -->
|
||||
<u-popup v-model="bcShow" mode="bottom" border-radius="20">
|
||||
<view class="padding-b-80" :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="height-110 flex align-center justify-center">
|
||||
<text class="font-28">{{i18n.setTransaction.text17}}</text>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-between padding-w-30">
|
||||
<text class="font-28">{{i18n.setTransaction.text18}}</text>
|
||||
<view class="flex align-center">
|
||||
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
|
||||
v-model="bcs_1" :placeholder="i18n.setTransaction.tos7" placeholder-class="color-0165EE" />
|
||||
<text class="font-28 weight-bold">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-between padding-w-30">
|
||||
<text class="font-28">{{i18n.setTransaction.text19}}</text>
|
||||
<view class="flex align-center">
|
||||
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
|
||||
v-model="bcs_2" :placeholder="i18n.setTransaction.tos7" placeholder-class="color-0165EE" />
|
||||
<text class="font-28 weight-bold">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-between padding-w-30">
|
||||
<text class="font-28">{{i18n.setTransaction.text20}}</text>
|
||||
<view class="flex align-center">
|
||||
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
|
||||
v-model="bcs_3" :placeholder="i18n.setTransaction.tos7" placeholder-class="color-0165EE" />
|
||||
<text class="font-28 weight-bold">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-between padding-w-30">
|
||||
<text class="font-28">{{i18n.setTransaction.text21}}</text>
|
||||
<view class="flex align-center">
|
||||
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
|
||||
v-model="bcs_4" :placeholder="i18n.setTransaction.tos7" placeholder-class="color-0165EE" />
|
||||
<text class="font-28 weight-bold">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-between padding-w-30">
|
||||
<text class="font-28">{{i18n.setTransaction.text22}}</text>
|
||||
<view class="flex align-center">
|
||||
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
|
||||
v-model="bcs_5" :placeholder="i18n.setTransaction.tos7" placeholder-class="color-0165EE" />
|
||||
<text class="font-28 weight-bold">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-between padding-w-30">
|
||||
<text class="font-28">{{i18n.setTransaction.text23}}</text>
|
||||
<view class="flex align-center">
|
||||
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
|
||||
v-model="bcs_6" :placeholder="i18n.setTransaction.tos7" placeholder-class="color-0165EE" />
|
||||
<text class="font-28 weight-bold">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-96 flex align-center justify-between padding-w-30">
|
||||
<text class="font-28">{{i18n.setTransaction.text24}}</text>
|
||||
<view class="flex align-center">
|
||||
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
|
||||
v-model="bcs_7" :placeholder="i18n.setTransaction.tos7" placeholder-class="color-0165EE" />
|
||||
<text class="font-28 weight-bold">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-t-60 flex align-center justify-around">
|
||||
<view @click="bcShow=false" class="width-300 height-96 radiu-20 line-height-96 text-center"
|
||||
style="background: rgba(195,195,195,0.5);">
|
||||
<text class="font-28 color-white">{{i18n.setTransaction.text25}}</text>
|
||||
</view>
|
||||
<view @click="confirmBC" class="width-300 height-96 radiu-20 line-height-96 text-center bj-0165EE">
|
||||
<text class="font-28 color-white">{{i18n.setTransaction.text16}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 去实名 -->
|
||||
<u-popup style="z-index: 5000;" border-radius="18" mode="center" v-model="TSShow">
|
||||
<view class="width-600 padding-b-20" :style="'background-color: '+theme.bg+';color: '+theme.text">
|
||||
<view class="width-100b height-220 padding-w-30 padding-c-40 flex direction-column align-center justify-between">
|
||||
<image class="width-64 height-64" src="/static/imgs/quantify/tongzhi@2x.png" mode=""></image>
|
||||
<view class="font-28 weight-bold text-center padding-w-20">
|
||||
{{i18n.setTransaction.text26}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-100b height-90 flex align-center justify-center">
|
||||
<view @click="TSShow=false,router.push('/pages/my/safety/real')" class="qcbtn3">
|
||||
{{i18n.setTransaction.text27}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
bcShow: false,
|
||||
coin_id: '', //币种id数组
|
||||
first_num: '', //首单额度
|
||||
min_price: 0, //最低入场价格
|
||||
pc_status: true, //0=正常补仓 1=停止补仓
|
||||
rc_status: true, //0=关闭 1=开启
|
||||
order_num: '', //交易单数
|
||||
zy_percent: '', //止盈比例
|
||||
zy_ht: '', //止盈回调
|
||||
bc_ht: '', //补仓回调
|
||||
bcjson: {}, //补仓设置,数组[‘1’=>0.02,’2’=>0.03….]
|
||||
bcs_1: '',
|
||||
bcs_2: '',
|
||||
bcs_3: '',
|
||||
bcs_4: '',
|
||||
bcs_5: '',
|
||||
bcs_6: '',
|
||||
bcs_7: '',
|
||||
|
||||
flag: true,
|
||||
TSShow: false,
|
||||
theme: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
// 价格过滤器(保留小数点后两位)
|
||||
percentFilter: function(item) {
|
||||
return (item * 100).toFixed(2)
|
||||
}
|
||||
},
|
||||
onLoad: function(option) {
|
||||
if (option.idArr) {
|
||||
this.coin_id = option.idArr
|
||||
console.log(this.coin_id)
|
||||
this.get_strategy()
|
||||
}
|
||||
if (option.item) {
|
||||
// decodeURIComponent 解密传过来的对象字符串
|
||||
const item = JSON.parse(option.item)
|
||||
console.log(item)
|
||||
this.coin_id = item.coin_id
|
||||
this.first_num = item.first_num
|
||||
this.order_num = item.order_num
|
||||
this.min_price = item.in_price
|
||||
this.pc_status = item.pc_status == 0 ? true : false
|
||||
this.rc_status = item.is_now == 0 ? false : true
|
||||
this.zy_percent = (item.zy_percent * 100).toFixed(2)
|
||||
this.zy_ht = (item.zy_ht * 100).toFixed(2)
|
||||
this.bc_ht = (item.bc_ht * 100).toFixed(2)
|
||||
this.bcs_1 = (item.bcs_1 * 100).toFixed(2)
|
||||
this.bcs_2 = (item.bcs_2 * 100).toFixed(2)
|
||||
this.bcs_3 = (item.bcs_3 * 100).toFixed(2)
|
||||
this.bcs_4 = (item.bcs_4 * 100).toFixed(2)
|
||||
this.bcs_5 = (item.bcs_5 * 100).toFixed(2)
|
||||
this.bcs_6 = (item.bcs_6 * 100).toFixed(2)
|
||||
this.bcs_7 = (item.bcs_7 * 100).toFixed(2)
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("theme") == "dark") {
|
||||
this.theme = this.$store.state.darkTheme
|
||||
} else {
|
||||
this.theme = this.$store.state.lightTheme
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
change(status) {
|
||||
console.log(this.pc_status);
|
||||
},
|
||||
change1(status) {
|
||||
console.log(this.rc_status);
|
||||
},
|
||||
// 批量设置时获取默认值
|
||||
get_strategy() {
|
||||
this.post('/strategy/get_strategy_ori').then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
var item = res.data
|
||||
this.first_num = item.first_num
|
||||
this.order_num = item.order_num
|
||||
this.min_price = 0
|
||||
this.pc_status = true
|
||||
this.rc_status = false
|
||||
this.zy_percent = (item.zy_percent * 100).toFixed(2)
|
||||
this.zy_ht = (item.zy_ht * 100).toFixed(2)
|
||||
this.bc_ht = (item.bc_ht * 100).toFixed(2)
|
||||
this.bcs_1 = (item.bcs_1 * 100).toFixed(2)
|
||||
this.bcs_2 = (item.bcs_2 * 100).toFixed(2)
|
||||
this.bcs_3 = (item.bcs_3 * 100).toFixed(2)
|
||||
this.bcs_4 = (item.bcs_4 * 100).toFixed(2)
|
||||
this.bcs_5 = (item.bcs_5 * 100).toFixed(2)
|
||||
this.bcs_6 = (item.bcs_6 * 100).toFixed(2)
|
||||
this.bcs_7 = (item.bcs_7 * 100).toFixed(2)
|
||||
}
|
||||
})
|
||||
},
|
||||
confirmBC() {
|
||||
this.bcShow = false
|
||||
},
|
||||
get_cionSetting(id) {
|
||||
if (!this.flag) return
|
||||
if (this.first_num == '') {
|
||||
this.tos(this.i18n.setTransaction.tos8)
|
||||
return
|
||||
}
|
||||
if (this.min_price === '') {
|
||||
this.tos(this.i18n.setTransaction.tos9)
|
||||
return
|
||||
}
|
||||
if (this.order_num == '') {
|
||||
this.tos(this.i18n.setTransaction.tos10)
|
||||
return
|
||||
}
|
||||
if (this.zy_percent == '') {
|
||||
this.tos(this.i18n.setTransaction.tos4)
|
||||
return
|
||||
}
|
||||
if (this.zy_ht == '') {
|
||||
this.tos(this.i18n.setTransaction.tos5)
|
||||
return
|
||||
}
|
||||
if (this.bcs_1 == '') {
|
||||
this.tos(this.i18n.setTransaction.tos11)
|
||||
return
|
||||
}
|
||||
if (this.bcs_2 == '') {
|
||||
this.tos(this.i18n.setTransaction.tos12)
|
||||
return
|
||||
}
|
||||
if (this.bcs_3 == '') {
|
||||
this.tos(this.i18n.setTransaction.tos13)
|
||||
return
|
||||
}
|
||||
if (this.bcs_4 == '') {
|
||||
this.tos(this.i18n.setTransaction.tos14)
|
||||
return
|
||||
}
|
||||
if (this.bcs_5 == '') {
|
||||
this.tos(this.i18n.setTransaction.tos15)
|
||||
return
|
||||
}
|
||||
if (this.bcs_6 == '') {
|
||||
this.tos(this.i18n.setTransaction.tos16)
|
||||
return
|
||||
}
|
||||
if (this.bcs_7 == '') {
|
||||
this.tos(this.i18n.setTransaction.tos17)
|
||||
return
|
||||
}
|
||||
let that = this
|
||||
uni.showLoading({
|
||||
title: that.i18n.setTransaction.tos18
|
||||
})
|
||||
this.flag = false
|
||||
var obj = {
|
||||
coin_id: this.coin_id,
|
||||
first_num: this.first_num,
|
||||
order_num: this.order_num,
|
||||
in_price: this.min_price,
|
||||
pc_status: this.pc_status ? '0' : '1',
|
||||
is_now: this.rc_status ? '1' : '0',
|
||||
zy_percent: (this.zy_percent / 100).toFixed(4),
|
||||
zy_ht: (this.zy_ht / 100).toFixed(4),
|
||||
bc_ht: (this.bc_ht / 100).toFixed(4),
|
||||
bcs_1: (this.bcs_1 / 100).toFixed(4),
|
||||
bcs_2: (this.bcs_2 / 100).toFixed(4),
|
||||
bcs_3: (this.bcs_3 / 100).toFixed(4),
|
||||
bcs_4: (this.bcs_4 / 100).toFixed(4),
|
||||
bcs_5: (this.bcs_5 / 100).toFixed(4),
|
||||
bcs_6: (this.bcs_6 / 100).toFixed(4),
|
||||
bcs_7: (this.bcs_7 / 100).toFixed(4),
|
||||
}
|
||||
console.log(obj)
|
||||
this.post('/strategy/set_strategy', obj).then(res => {
|
||||
uni.hideLoading()
|
||||
this.flag = true
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 800)
|
||||
} else {
|
||||
uni.hideToast()
|
||||
if (res.data.jump == 1) {
|
||||
this.TSShow = true
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fixed1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 690rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 20rpx;
|
||||
background-color: #0165EE;
|
||||
line-height: 96rpx;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
margin: 100rpx auto 200rpx;
|
||||
}
|
||||
|
||||
.qcbtn3 {
|
||||
width: 320rpx;
|
||||
height: 86rpx;
|
||||
background: #0165EE;
|
||||
border-radius: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
|
||||
<myNav :title="i18n.TranRecord.title2"></myNav>
|
||||
<!-- 身体 -->
|
||||
<view class="width-750 padding-w-30 padding-t-16">
|
||||
<view class="height-76 flex align-center">
|
||||
<text class="font-28">{{i18n.TranRecord.text19}}:</text>
|
||||
</view>
|
||||
<view class="height-96 flex align-center">
|
||||
<input class="flex-1 font-28 color-C3C3C3" type="number" v-model="BCnum" :placeholder="i18n.TranRecord.tos1" placeholder-class="color-C3C3C3" >
|
||||
</view>
|
||||
<view @click="sureBC" class="btn">{{i18n.TranRecord.text20}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBar: uni.getSystemInfoSync().statusBarHeight,
|
||||
BCnum: '0',
|
||||
flag: true,
|
||||
|
||||
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.get_strategy()
|
||||
},
|
||||
methods: {
|
||||
// 获取补仓限制
|
||||
get_strategy() {
|
||||
this.post('/strategy/get_strategy_setting', {
|
||||
exchange_id: uni.getStorageSync('exchange_id')
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.BCnum = res.data.bc_min_limit
|
||||
}
|
||||
})
|
||||
},
|
||||
sureBC() {
|
||||
if (!this.flag) return
|
||||
if (this.BCnum == '') {
|
||||
this.tos(this.i18n.TranRecord.tos1);
|
||||
return
|
||||
}
|
||||
this.flag = false
|
||||
uni.showLoading({
|
||||
title: ''
|
||||
})
|
||||
this.post('/strategy/setbc_limit', {
|
||||
bc_min_limit: this.BCnum,
|
||||
exchange_id: uni.getStorageSync('exchange_id')
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
this.flag = true
|
||||
uni.hideLoading()
|
||||
if (res.code == 1) {
|
||||
this.tos(res.msg)
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fixed1 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
.btn{
|
||||
width: 690rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 20rpx;
|
||||
background-color: #0165EE;
|
||||
line-height: 96rpx;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 200rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<view @click="goIndex" class="tiaoguo">{{i18n.startup.skip}}</view>
|
||||
<view class="checked">
|
||||
<view v-if="lineVisible[0]" class="txt">{{i18n.startup.line1}}</view>
|
||||
<view v-if="lineVisible[1]" class="txt">{{i18n.startup.line2}}</view>
|
||||
<view v-if="lineVisible[2]" class="txt">{{i18n.startup.line3}}</view>
|
||||
<view v-if="lineVisible[3]" class="txt">{{i18n.startup.line4}}</view>
|
||||
</view>
|
||||
<view class="foot">{{i18n.startup.slogan}}</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
timers: '',
|
||||
lineVisible: [false, false, false, false],
|
||||
lineTimers: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message')
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// #ifdef H5
|
||||
// if(window.location.hostname == 'localhost'){
|
||||
// console.log('本地运行',window.location.hostname)
|
||||
// }else{
|
||||
// var width = uni.getSystemInfoSync().windowWidth
|
||||
// if(width>=500){
|
||||
// window.location.href='https://www.apec.io/'
|
||||
// }
|
||||
// }
|
||||
// #endif
|
||||
const firstLaunch = !uni.getStorageSync('startupShown')
|
||||
if (!firstLaunch) {
|
||||
// 非首次,直接进入首页
|
||||
this.goIndex()
|
||||
return
|
||||
}
|
||||
// 首次,正常显示启动页
|
||||
uni.setStorageSync('startupShown', true)
|
||||
this.timers = setTimeout(() => {
|
||||
this.goIndex()
|
||||
}, 2000)
|
||||
// 顺序加载文案
|
||||
this.lineVisible = [false, false, false, false]
|
||||
this.lineTimers = []
|
||||
for (let i = 0; i < 4; i++) {
|
||||
const t = setTimeout(() => {
|
||||
this.$set(this.lineVisible, i, true)
|
||||
}, i * 400)
|
||||
this.lineTimers.push(t)
|
||||
}
|
||||
},
|
||||
onHide() {
|
||||
clearTimeout(this.timers)
|
||||
this.lineTimers.forEach(t => clearTimeout(t))
|
||||
this.lineTimers = []
|
||||
},
|
||||
onUnload() {
|
||||
clearTimeout(this.timers)
|
||||
this.lineTimers.forEach(t => clearTimeout(t))
|
||||
this.lineTimers = []
|
||||
},
|
||||
methods: {
|
||||
goIndex() {
|
||||
clearTimeout(this.timers)
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-image: url(/static/start.jpg);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
/* background: #121418; */
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tiaoguo {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 8rpx 24rpx;
|
||||
font-size: 26rpx;
|
||||
color: rgba(255,255,255,0.92);
|
||||
position: fixed;
|
||||
top: 120rpx;
|
||||
right: 40rpx;
|
||||
border: 2rpx solid rgba(255,255,255,0.92);
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
|
||||
.checked {
|
||||
position: fixed;
|
||||
left: 48rpx;
|
||||
bottom: 170rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 18rpx;
|
||||
}
|
||||
|
||||
.txt {
|
||||
font-size: 28rpx;
|
||||
line-height: 1.2;
|
||||
color: #2E62FF;
|
||||
opacity: 0.95;
|
||||
}
|
||||
|
||||
.foot {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 46rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
color: #2E62FF;
|
||||
font-weight: 500;
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
.imgs {
|
||||
width: 330rpx;
|
||||
height: 330rpx;
|
||||
position: fixed;
|
||||
top: 400rpx;
|
||||
left: 50%;
|
||||
margin-left: -165rpx;
|
||||
animation: myfirst 0.8s;
|
||||
}
|
||||
|
||||
@keyframes myfirst {
|
||||
from {
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
width: 330rpx;
|
||||
height: 330rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<!-- <myNav :title="titleName"></myNav> -->
|
||||
<u-navbar :title="titleName" z-index="10100" back-icon-color="#FFFFFF" title-color="#fff" :background="{ background: '#080A17' }"
|
||||
height="55" :border-bottom="false" :custom-back="goHome"></u-navbar>
|
||||
<view class="">
|
||||
<web-view :src="src"></web-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
src: '',
|
||||
titleName: "",
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
},
|
||||
onLoad(option) {
|
||||
this.src = "/hybrid/html/h5.html?symbol=" + option.symbol + "&title=" + option.title + '&bb_type='+ option.bb_type + "&lang=" + uni.getStorageSync('Language') + '&h5_url='+ uni.getStorageSync('h5_url')
|
||||
this.titleName = option.title
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
goHome() {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
@@ -0,0 +1,619 @@
|
||||
<template>
|
||||
<view :style="'background-color: #080A17;color: #FFFFFF;'">
|
||||
<!-- <myNav :title="titleName" ></myNav> -->
|
||||
<u-navbar :title="titleName" z-index="10100" back-icon-color="#FFFFFF" title-color="#fff"
|
||||
:background="{ background: '#080A17' }" height="55" :border-bottom="false"></u-navbar>
|
||||
<view style="height: 60px;" class="flex align-center justify-between padding-w-30">
|
||||
<view class="flex-1 height-100 padding-c-8 flex direction-column align-start justify-between">
|
||||
<view :class="lastData.close>lastData.open?'color-00C481':'color-FF4040'" class="font-44 numbold-font">
|
||||
{{Number(lastData.close).toFixed(price_jd)||0}}
|
||||
</view>
|
||||
<view :class="lastData.close>lastData.open?'color-00C481':'color-FF4040'"
|
||||
class="font-28 nummedium-font">≈
|
||||
{{(Number(lastData.close)*exchange_rate).toFixed(price_jd)||0}} {{name_sx}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-1 height-60 flex direction-column align-end justify-between">
|
||||
<view class="font-20 nummedium-font color-C3C3C3">
|
||||
{{i18n.line.highprice}}:{{Number(dayData.high).toFixed(price_jd)||0}}
|
||||
</view>
|
||||
<view class="font-20 nummedium-font color-C3C3C3">
|
||||
{{i18n.line.lowprice}}:{{Number(dayData.low).toFixed(price_jd)||0}}
|
||||
</view>
|
||||
<!-- <view class="font-20 nummedium-font color-C3C3C3">24h交易额:{{(lastData.close*6.25*lastData.amount/100000000).toFixed(2)}}亿</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- #ifdef H5 -->
|
||||
<!-- <view class="width-100b text-center" style="border: 1rpx solid #EDEDED;" :style="{ 'height': h5Height + 'px' }">
|
||||
<text class="font-26 color-C3C3C3">请在app上查看</text>
|
||||
</view> -->
|
||||
<!-- #endif -->
|
||||
<view :style="{ 'height': h5Height + 'px' }"></view>
|
||||
|
||||
<view class="list">
|
||||
<view class="height-72 padding-w-40 flex align-center justify-between">
|
||||
<view @click="tabsChange(index)"
|
||||
class="flex-1 height-46 flex direction-column align-center justify-between"
|
||||
v-for="(item,index) in tablist" :key="index">
|
||||
<text :class="current==index?'color-0165EE':'color-C3C3C3'"
|
||||
class="bold-font font-26">{{item}}</text>
|
||||
<view :style="current==index?'':'visibility: hidden;'" class="heng"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 委托列表 -->
|
||||
<view v-if="current==0" class="">
|
||||
<view class="height-72 padding-w-30 flex align-center justify-between">
|
||||
<text class="font-24 nummedium-font color-00C481">{{i18n.line.buyP}}</text>
|
||||
<text class="font-24 nummedium-font color-C3C3C3">{{i18n.line.num}}</text>
|
||||
<text class="width-300 text-center font-24 nummedium-font color-C3C3C3">{{i18n.line.price}}</text>
|
||||
<text class="font-24 nummedium-font color-C3C3C3">{{i18n.line.num}}</text>
|
||||
<text class="font-24 nummedium-font color-FF4040">{{i18n.line.sellP}}</text>
|
||||
</view>
|
||||
<view class="padding-w-30 width-100b flex align-start justify-between">
|
||||
<view class="width-330 flex direction-column justify-start">
|
||||
<view v-if="index<10" class="height-72 flex align-center justify-between relative"
|
||||
v-for="(item,index) in tick.bids" :key="index">
|
||||
<text class="font-24 nummedium-font color-C3C3C3">{{index+1}}</text>
|
||||
<text class="font-24 nummedium-font color-C3C3C3">{{item[1] | numFilter}}</text>
|
||||
<text
|
||||
class="font-24 nummedium-font color-00C481">{{Number(item[0]).toFixed(price_jd)}}</text>
|
||||
<view class="right progress bj-E5F9F2"
|
||||
:style="'width:'+ dethWidth(index,item[1],tick.bids) +'%;'">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="width-330 flex direction-column justify-start">
|
||||
<view v-if="index<10" class="height-72 flex align-center justify-between relative"
|
||||
v-for="(item,index) in tick.asks" :key="index">
|
||||
<text
|
||||
class="font-24 nummedium-font color-FF4040">{{Number(item[0]).toFixed(price_jd)}}</text>
|
||||
<text class="font-24 nummedium-font color-C3C3C3">{{item[1] | numFilter}}</text>
|
||||
<text class="font-24 nummedium-font color-C3C3C3">{{index+1}}</text>
|
||||
<view class="left progress bj-FFEBEB"
|
||||
:style="'width:'+ dethWidth(index,item[1],tick.asks) +'%;'">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 信息 -->
|
||||
<view v-if="current==1" class="">
|
||||
<view class="listBox">
|
||||
<view class="flex align-center">
|
||||
<image class="width-42 height-42 radiu-50b" :src="coinInfo.logo_image" mode=""></image>
|
||||
<text class="font-26 numbold-font margin-l-10">{{coinInfo.name}}</text>
|
||||
</view>
|
||||
<!-- <text class="font-26 color-0165EE numbold-font">{{coinInfo.jys}}</text> -->
|
||||
</view>
|
||||
<!-- <view class="listBox">
|
||||
<text class="font-26 color-C3C3C3 numbold-font">{{i18n.line.ranking}}</text>
|
||||
<text class="font-26 nummedium-font">{{'NO.'}}{{coinInfo.level}}</text>
|
||||
</view> -->
|
||||
<!-- <view class="listBox">
|
||||
<text class="font-26 color-C3C3C3 numbold-font">{{i18n.line.value}}</text>
|
||||
<text class="font-26 nummedium-font">{{coinInfo.count_price}}</text>
|
||||
</view> -->
|
||||
<view class="listBox">
|
||||
<text class="font-26 color-C3C3C3 numbold-font">{{i18n.line.number}}</text>
|
||||
<text class="font-26 nummedium-font">{{coinInfo.liutong_num}}</text>
|
||||
</view>
|
||||
<view class="listBox">
|
||||
<text class="font-26 color-C3C3C3 numbold-font">{{i18n.line.supply}}</text>
|
||||
<text class="font-26 nummedium-font">{{coinInfo.gongji_num}}</text>
|
||||
</view>
|
||||
<view class="listBox">
|
||||
<text class="font-26 color-C3C3C3 numbold-font">{{i18n.line.allNum}}</text>
|
||||
<text class="font-26 nummedium-font">{{coinInfo.count_num}}</text>
|
||||
</view>
|
||||
<view class="listBox">
|
||||
<text class="font-26 color-C3C3C3 numbold-font">{{i18n.line.issuingDate}}</text>
|
||||
<text class="font-26 nummedium-font">{{coinInfo.faxin_time}}</text>
|
||||
</view>
|
||||
<view class="listBox">
|
||||
<text class="font-26 color-C3C3C3 numbold-font">{{i18n.line.issuePrice}}</text>
|
||||
<text class="font-26 nummedium-font">{{coinInfo.faxin_price}}</text>
|
||||
</view>
|
||||
<view @click="goURL(coinInfo.qukuai)" class="listBox1">
|
||||
<view class="width-180 height-66 line-height-66">
|
||||
<text class="font-26 color-C3C3C3 numbold-font">{{i18n.line.qukuai}}</text>
|
||||
</view>
|
||||
<view class="" style="width:480rpx;word-wrap:break-word;padding: 8rpx 0px;text-align: right;">
|
||||
<text class="font-26 color-0165EE nummedium-font">{{coinInfo.qukuai}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="listBox">
|
||||
<text class="font-26 color-C3C3C3 numbold-font">{{i18n.line.jieshao}}</text>
|
||||
</view>
|
||||
<view class="padding-w-30 padding-c-10 font-26">
|
||||
{{coinInfo.desc}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="height-140"></view>
|
||||
<view class="bottomBox">
|
||||
<button @click="goTabBar('buy')" class="cu-btn loginBtn"
|
||||
style="background-color: #04DC9B;">{{i18n.line.buyIn}}</button>
|
||||
<button @click="goTabBar('sell')" class="cu-btn loginBtn"
|
||||
style="background-color: #FF2B41;">{{i18n.line.sellout}}</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var wv; //计划创建的webview
|
||||
export default {
|
||||
components: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
Language: uni.getStorageSync('Language'),
|
||||
name_sx: '',
|
||||
src: '',
|
||||
titleName: "",
|
||||
symbol: '',
|
||||
exchange_rate: 6, //usdt汇率
|
||||
|
||||
tablist: ['委托订单', '信息'],
|
||||
current: 0,
|
||||
|
||||
coinInfo: {},
|
||||
|
||||
lastData: {
|
||||
amount: 0.000000,
|
||||
close: 0.000000,
|
||||
count: 0.000000,
|
||||
high: 0.000000,
|
||||
id: 1637307480,
|
||||
low: 0.000000,
|
||||
open: 0.000000,
|
||||
vol: 0.000000,
|
||||
},
|
||||
dayData: "",
|
||||
tick: "",
|
||||
|
||||
market_jd: 6,
|
||||
price_jd: 4,
|
||||
timer: null
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
//过滤数字位数
|
||||
numFilter(item) {
|
||||
if (item == undefined || item == null) {
|
||||
return 0;
|
||||
} else {
|
||||
if (Number(item) < 10) {
|
||||
return Number(item).toFixed(6);
|
||||
} else if (Number(item) >= 10 && Number(item) < 1000) {
|
||||
return Number(item).toFixed(4);
|
||||
} else if (Number(item) >= 1000 && Number(item) < 1000000) {
|
||||
return (Number(item) / 1000).toFixed(4) + ' K';
|
||||
} else if (Number(item) >= 1000000 && Number(item) < 10000000000) {
|
||||
return (Number(item) / 1000000).toFixed(2) + ' M';
|
||||
} else {
|
||||
return (Number(item) / 10000000000).toFixed(2) + ' B';
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
h5Height() {
|
||||
return uni.getSystemInfoSync().windowWidth * 1.14 + 30;
|
||||
},
|
||||
topHeight() {
|
||||
return uni.getSystemInfoSync().statusBarHeight + 60 + 55;
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.tablist = this.i18n.line.tablist
|
||||
this.titleName = option.title
|
||||
console.log('传入参数', option)
|
||||
if (option.symbol) {
|
||||
this.lastData.close = option.close
|
||||
this.symbol = option.symbol
|
||||
this.getCionInfo(option.symbol)
|
||||
this.getDay()
|
||||
getApp().globalData.symbol = this.symbol
|
||||
}
|
||||
let that = this;
|
||||
uni.getSystemInfo({
|
||||
success: function(res) { // console.log(res)
|
||||
// console.log(res.system.split(' ')[0])
|
||||
let system = res.system.split(' ')[0]
|
||||
if (system == 'iOS') {
|
||||
// K线网页
|
||||
that.src = "https://exchange.v5ico-kline.coddex.xyz/index.html?symbol=" + option.symbol +
|
||||
'&bb_type=' + option.bb_type + "&title=" + option.title + '&lang=' + uni
|
||||
.getStorageSync('Language')
|
||||
} else {
|
||||
that.src = "/hybrid/html/index.html?symbol=" + option.symbol + '&bb_type=' + option
|
||||
.bb_type + "&title=" + option.title + '&lang=' + uni.getStorageSync('Language')
|
||||
}
|
||||
}
|
||||
})
|
||||
// #ifdef APP-PLUS
|
||||
wv = plus.webview.create(this.src, 'custom-webview', {
|
||||
'kernel': 'WKWebview', //UIWebview或者'WKWebview'
|
||||
position: 'static',
|
||||
top: that.topHeight,
|
||||
left: '0px',
|
||||
width: '100%',
|
||||
height: that.h5Height,
|
||||
zindex: 900,
|
||||
});
|
||||
var currentWebview = this.$scope
|
||||
.$getAppWebview(); //此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效,非v3编译模式使用this.$mp.page.$getAppWebview()
|
||||
currentWebview.append(wv); //一定要append到当前的页面里!!!才能跟随当前页面一起做动画,一起关闭
|
||||
// #endif
|
||||
},
|
||||
onShow() {
|
||||
this.onSocketMessage()
|
||||
this.linkSocket() //链接socket订阅
|
||||
uni.$on('reConnect', (res) => {
|
||||
console.log("重连WebSocket")
|
||||
this.onSocketMessage()
|
||||
})
|
||||
// this.getexchange()
|
||||
this.exchange_rate = uni.getStorageSync('ratenum')
|
||||
this.name_sx = uni.getStorageSync('ratename')
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// 确保WebView已经加载
|
||||
if (wv) {
|
||||
setTimeout(() => {
|
||||
// 向WebView发送最新数据
|
||||
if (this.dayData) {
|
||||
wv.evalJS(`
|
||||
if (typeof Event !== 'undefined') {
|
||||
Event.emit('newDay', ${JSON.stringify(this.dayData)});
|
||||
}
|
||||
`);
|
||||
}
|
||||
|
||||
if (this.lastData) {
|
||||
wv.evalJS(`
|
||||
if (typeof Event !== 'undefined') {
|
||||
Event.emit('realTime', ${JSON.stringify(this.lastData)});
|
||||
Event.emit('newData', ${JSON.stringify(this.lastData)});
|
||||
}
|
||||
`);
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
onUnload: function() {
|
||||
clearTimeout(this.timer)
|
||||
uni.$off('reConnect')
|
||||
this.cancelSocket() //取消socket订阅
|
||||
},
|
||||
methods: {
|
||||
onSocketMessage() {
|
||||
uni.$on('market', (res) => {
|
||||
// 解析并处理WebSocket消息
|
||||
try {
|
||||
if (res.ch && res.ch.includes(this.symbol) && res.tick) {
|
||||
// 更新最新交易数据
|
||||
this.lastData = res.tick;
|
||||
|
||||
// 如果是WebView显示K线,向WebView发送消息
|
||||
// #ifdef APP-PLUS
|
||||
if (wv) {
|
||||
// 向WebView发送处理好的K线数据
|
||||
wv.evalJS(`
|
||||
if (typeof Event !== 'undefined') {
|
||||
Event.emit('realTime', ${JSON.stringify(res.tick)});
|
||||
Event.emit('newData', ${JSON.stringify(res.tick)});
|
||||
}
|
||||
`);
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("处理WebSocket消息时出错:", e);
|
||||
}
|
||||
})
|
||||
},
|
||||
getDay() {
|
||||
this.post('/market/get_day_kline', {
|
||||
symbol: this.symbol
|
||||
}).then(res => {
|
||||
console.log('获取一天最高最低', res)
|
||||
if (res.code == 1) {
|
||||
this.dayData = res.data
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// 向WebView发送日K线数据
|
||||
if (wv) {
|
||||
wv.evalJS(`
|
||||
if (typeof Event !== 'undefined') {
|
||||
Event.emit('newDay', ${JSON.stringify(res.data)});
|
||||
}
|
||||
`);
|
||||
}
|
||||
// #endif
|
||||
|
||||
this.timer = setTimeout(() => {
|
||||
this.getDay()
|
||||
}, 10000)
|
||||
}
|
||||
})
|
||||
},
|
||||
getexchange() {
|
||||
let that = this
|
||||
this.post('/publics/exchange_list').then(res => {
|
||||
if (res.code == 1) {
|
||||
let data = res.data
|
||||
let cha = data.find(item => item.id == 2)
|
||||
|
||||
if (that.Language == 'zh-cn') {
|
||||
// that.exchange_rate=res.data
|
||||
let obj = data.find(item => item.id == 2)
|
||||
if (obj) {
|
||||
that.exchange_rate = obj.exchange
|
||||
that.name_sx = obj.name_sx
|
||||
}
|
||||
}
|
||||
if (that.Language == 'en-us') {
|
||||
// that.exchange_rate=res.data
|
||||
let obj = data.find(item => item.id == 4)
|
||||
if (obj) {
|
||||
that.exchange_rate = obj.exchange
|
||||
that.name_sx = obj.name_sx
|
||||
} else {
|
||||
that.exchange_rate = cha.exchange
|
||||
that.name_sx = cha.name_sx
|
||||
}
|
||||
}
|
||||
if (that.Language == 'mn') {
|
||||
// that.exchange_rate=res.data
|
||||
let obj = data.find(item => item.id == 11)
|
||||
if (obj) {
|
||||
that.exchange_rate = obj.exchange
|
||||
that.name_sx = obj.name_sx
|
||||
} else {
|
||||
that.exchange_rate = cha.exchange
|
||||
that.name_sx = cha.name_sx
|
||||
}
|
||||
}
|
||||
if (that.Language == 'ms') {
|
||||
// that.exchange_rate=res.data
|
||||
let obj = data.find(item => item.id == 5)
|
||||
if (obj) {
|
||||
that.exchange_rate = obj.exchange
|
||||
that.name_sx = obj.name_sx
|
||||
} else {
|
||||
that.exchange_rate = cha.exchange
|
||||
that.name_sx = cha.name_sx
|
||||
}
|
||||
}
|
||||
if (that.Language == 'kr') {
|
||||
// that.exchange_rate=res.data
|
||||
let obj = data.find(item => item.id == 7)
|
||||
if (obj) {
|
||||
that.exchange_rate = obj.exchange
|
||||
that.name_sx = obj.name_sx
|
||||
} else {
|
||||
that.exchange_rate = cha.exchange
|
||||
that.name_sx = cha.name_sx
|
||||
}
|
||||
}
|
||||
if (that.Language == 'fre') {
|
||||
// that.exchange_rate=res.data
|
||||
let obj = data.find(item => item.id == 9)
|
||||
if (obj) {
|
||||
that.exchange_rate = obj.exchange
|
||||
that.name_sx = obj.name_sx
|
||||
} else {
|
||||
that.exchange_rate = cha.exchange
|
||||
that.name_sx = cha.name_sx
|
||||
}
|
||||
}
|
||||
if (that.Language == 'ger') {
|
||||
// that.exchange_rate=res.data
|
||||
let obj = data.find(item => item.id == 3)
|
||||
if (obj) {
|
||||
that.exchange_rate = obj.exchange
|
||||
that.name_sx = obj.name_sx
|
||||
} else {
|
||||
that.exchange_rate = cha.exchange
|
||||
that.name_sx = cha.name_sx
|
||||
}
|
||||
}
|
||||
if (that.Language == 'ily') {
|
||||
// that.exchange_rate=res.data
|
||||
let obj = data.find(item => item.id == 10)
|
||||
if (obj) {
|
||||
that.exchange_rate = obj.exchange
|
||||
that.name_sx = obj.name_sx
|
||||
} else {
|
||||
that.exchange_rate = cha.exchange
|
||||
that.name_sx = cha.name_sx
|
||||
}
|
||||
}
|
||||
if (that.Language == 'jp') {
|
||||
// that.exchange_rate=res.data
|
||||
let obj = data.find(item => item.id == 8)
|
||||
if (obj) {
|
||||
that.exchange_rate = obj.exchange
|
||||
that.name_sx = obj.name_sx
|
||||
} else {
|
||||
that.exchange_rate = cha.exchange
|
||||
that.name_sx = cha.name_sx
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
goURL(url) {
|
||||
plus.runtime.openURL(url)
|
||||
},
|
||||
dethWidth(index, item, list) {
|
||||
var temp = 0
|
||||
let num = list.length
|
||||
if (num == 0) return
|
||||
if (num > 10) {
|
||||
num = 10
|
||||
}
|
||||
for (var i = 0; i < num; i++) {
|
||||
temp += Number(list[i][1])
|
||||
}
|
||||
return Number(item / temp).toFixed(2) * 100
|
||||
},
|
||||
tabsChange(index) {
|
||||
this.current = index;
|
||||
},
|
||||
goTabBar(buyType) {
|
||||
getApp().globalData.buyType = buyType
|
||||
getApp().globalData.symbol = this.symbol
|
||||
uni.switchTab({
|
||||
url: '/pages/transaction/index'
|
||||
})
|
||||
},
|
||||
getCionInfo(symbol) {
|
||||
this.post('/Contract/get_curr_con', {
|
||||
symbol: symbol
|
||||
}).then(res => {
|
||||
console.log('币种信息', res)
|
||||
if (res.code == 1) {
|
||||
this.coinInfo = res.data
|
||||
// this.exchange_rate = res.data.exchange_rate
|
||||
this.market_jd = res.data.market_jd
|
||||
this.price_jd = res.data.price_jd
|
||||
}
|
||||
})
|
||||
},
|
||||
// 取消socket订阅
|
||||
cancelSocket() {
|
||||
this.sendSocketMessage({
|
||||
'subs': 'depth',
|
||||
"user_id": uni.getStorageSync("user_id"),
|
||||
"unsub": "market." + this.symbol + ".depth.step0",
|
||||
"id": "BTC",
|
||||
})
|
||||
this.sendSocketMessage({
|
||||
'subs': 'tradenow',
|
||||
"user_id": uni.getStorageSync("user_id"),
|
||||
"unsub": "market." + this.symbol + ".kline.1min",
|
||||
"id": "BTC",
|
||||
})
|
||||
// this.sendSocketMessage({
|
||||
// 'subs': 'tradenow',
|
||||
// "user_id": uni.getStorageSync("user_id"),
|
||||
// "unsub": "market." + this.symbol + ".kline.1day",
|
||||
// "id": "BTC",
|
||||
// })
|
||||
},
|
||||
// 链接socket订阅
|
||||
linkSocket() {
|
||||
this.sendSocketMessage({
|
||||
'subs': 'depth',
|
||||
"user_id": uni.getStorageSync("user_id"),
|
||||
"sub": "market." + this.symbol + ".depth.step0",
|
||||
"id": "BTC",
|
||||
})
|
||||
this.sendSocketMessage({
|
||||
'subs': 'tradenow',
|
||||
"user_id": uni.getStorageSync("user_id"),
|
||||
"sub": "market." + this.symbol + ".kline.1min",
|
||||
"id": "BTC",
|
||||
})
|
||||
// this.sendSocketMessage({
|
||||
// 'subs': 'tradenow',
|
||||
// "user_id": uni.getStorageSync("user_id"),
|
||||
// "sub": "market." + this.symbol + ".kline.1day",
|
||||
// "id": "BTC",
|
||||
// })
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.list {
|
||||
width: 100%;
|
||||
padding: 10rpx;
|
||||
padding-bottom: calc(100rpx + env(safe-area-inset-bottom));
|
||||
border-top-left-radius: 10rpx;
|
||||
border-top-right-radius: 10rpx;
|
||||
// background-color: #fff;
|
||||
box-shadow: 2rpx 2rpx 4rpx #181b2a;
|
||||
}
|
||||
|
||||
.progress {
|
||||
height: 100%;
|
||||
max-width: 330rpx;
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.right {
|
||||
right: 0rpx;
|
||||
border-top-left-radius: 10rpx;
|
||||
border-bottom-left-radius: 10rpx;
|
||||
}
|
||||
|
||||
.left {
|
||||
left: 0rpx;
|
||||
border-top-right-radius: 10rpx;
|
||||
border-bottom-right-radius: 10rpx;
|
||||
}
|
||||
|
||||
.heng {
|
||||
width: 48rpx;
|
||||
height: 4rpx;
|
||||
margin: 10 auto;
|
||||
background: #0165EE;
|
||||
}
|
||||
|
||||
.bottomBox {
|
||||
width: 100%;
|
||||
height: 140rpx;
|
||||
padding: 0 30rpx 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
// background: #FFFFFF;
|
||||
position: fixed;
|
||||
bottom: 0rpx;
|
||||
box-shadow: 0rpx 0rpx 10rpx rgba(0, 0, 0, 0.16);
|
||||
}
|
||||
|
||||
.loginBtn {
|
||||
// width: 320rpx;
|
||||
flex: 1;
|
||||
height: 74rpx;
|
||||
margin: 0 20rpx;
|
||||
box-shadow: 0rpx 6rpx 10rpx rgba(16, 194, 168, 0.18);
|
||||
border-radius: 4rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.listBox {
|
||||
width: 100%;
|
||||
height: 66rpx;
|
||||
border-bottom: 1rpx solid #313135;
|
||||
padding: 0 30rpx;
|
||||
color: #8B99A2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.listBox1 {
|
||||
width: 100%;
|
||||
min-height: 66rpx;
|
||||
border-bottom: 1rpx solid #313135;
|
||||
padding: 0 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user