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>
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user