feat: 前端全量更新 - 含所有本次需求
- 移除秒合约页面及UI - 合约页Tab改为Position Held/Transaction Record - 存款/提款/转账页增加BTC/ETH - 资产页重构(用户信息+盈亏+多语言) - 注册页改版(匹配新设计稿) - 日文全面翻译+首页菜单多语言 - 代理专属注册链接支持(?code=) - 10个locale文件同步更新
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user