9 changed files with 840 additions and 573 deletions
@ -1,216 +1,280 @@ |
|||||
<template> |
<template> |
||||
<view class="main"> |
<view class="main"> |
||||
<navigation>{{ i18n.ForgotPassword }}</navigation> |
<navigation>{{ i18n.ForgotPassword }}</navigation> |
||||
<view class="body"> |
<view class="body"> |
||||
<u--form class="form" :model="userInfo" :rules="rules" ref="form1" errorType="toast"> |
<u--form class="form" :model="userInfo" :rules="rules" ref="uForm" errorType="toast"> |
||||
<!-- 邮箱 --> |
<!-- 邮箱 --> |
||||
<u-form-item class="input-item" prop="email" ref="item1"> |
<u-form-item class="input-item" prop="email" ref="item1"> |
||||
<u-icon class="icon" |
<u-icon class="icon" |
||||
:name="userInfo.email ? '../../static/login/email_pr.png' : '../../static/login/email_de.png'" |
:name="userInfo.email ? '../../static/login/email_pr.png' : '../../static/login/email_de.png'" |
||||
size="48rpx" width="48rpx"></u-icon> |
size="48rpx" width="48rpx"></u-icon> |
||||
<u-input class="input" v-model="userInfo.email" color="#fff" fontSize="32rpx" border="none" |
<u-input class="input" v-model="userInfo.email" color="#fff" fontSize="32rpx" border="none" |
||||
:placeholder="i18n.emailInputText"> |
:placeholder="i18n.emailInputText"> |
||||
</u-input> |
</u-input> |
||||
</u-form-item> |
</u-form-item> |
||||
<!-- 验证码 --> |
<!-- 验证码 --> |
||||
<u-form-item class="input-item vCode" prop="code" ref="item1"> |
<u-form-item class="input-item vCode" prop="code" ref="item1"> |
||||
<u-icon class="icon" |
<u-icon class="icon" |
||||
:name="userInfo.code ? '../../static/login/code_pr.png' : '../../static/login/code_de.png'" |
:name="userInfo.code ? '../../static/login/code_pr.png' : '../../static/login/code_de.png'" |
||||
size="48rpx" width="48rpx"></u-icon> |
size="48rpx" width="48rpx"></u-icon> |
||||
<u-input class="input" v-model="userInfo.code" color="#fff" fontSize="32rpx" border="none" |
<u-input class="input" v-model="userInfo.code" color="#fff" fontSize="32rpx" border="none" |
||||
:placeholder="i18n.registerWelcomeText" maxlength="6"> |
:placeholder="i18n.registerWelcomeText" maxlength="6"> |
||||
</u-input> |
</u-input> |
||||
<u-code startText="Get code" :seconds="seconds" ref="uCode" keep-running unique-key="login" |
<u-code startText="Get code" :seconds="seconds" ref="uCode" keep-running unique-key="login" |
||||
@change="codeChange"> |
@change="codeChange"> |
||||
</u-code> |
</u-code> |
||||
<u-button class="getVCodeBtn" color="#323045" @tap="getCode">{{tips}}</u-button> |
<u-button class="getVCodeBtn" color="#323045" @tap="getCode">{{tips}}</u-button> |
||||
</u-form-item> |
</u-form-item> |
||||
<!-- 密码 --> |
<!-- 密码 --> |
||||
<u-form-item class="input-item" prop="password" ref="item1"> |
<u-form-item class="input-item" prop="password" ref="item1"> |
||||
<u-icon class="icon" |
<u-icon class="icon" |
||||
:name="userInfo.password ? '../../static/login/Password_pr.png' : '../../static/login/Password_de.png'" |
:name="userInfo.password ? '../../static/login/Password_pr.png' : '../../static/login/Password_de.png'" |
||||
size="48rpx" width="48rpx"></u-icon> |
size="48rpx" width="48rpx"></u-icon> |
||||
<u-input class="input" type="password" v-model="userInfo.password" color="#fff" fontSize="32rpx" border="none" |
<u-input class="input" type="password" v-model="userInfo.password" color="#fff" fontSize="32rpx" |
||||
:placeholder="i18n.passwordText"> |
border="none" :placeholder="i18n.passwordText"> |
||||
</u-input> |
</u-input> |
||||
</u-form-item> |
</u-form-item> |
||||
<!-- 重复密码 --> |
<!-- 重复密码 --> |
||||
<u-form-item class="input-item" prop="confirmPassword" ref="item1"> |
<u-form-item class="input-item" prop="confirmPassword" ref="item1"> |
||||
<u-icon class="icon" |
<u-icon class="icon" |
||||
:name="userInfo.confirmPassword ? '../../static/login/Password_pr.png' : '../../static/login/Password_de.png'" |
:name="userInfo.confirmPassword ? '../../static/login/Password_pr.png' : '../../static/login/Password_de.png'" |
||||
size="48rpx" width="48rpx"></u-icon> |
size="48rpx" width="48rpx"></u-icon> |
||||
<u-input class="input" type="password" v-model="userInfo.confirmPassword" color="#fff" fontSize="32rpx" |
<u-input class="input" type="password" v-model="userInfo.confirmPassword" color="#fff" |
||||
border="none" :placeholder="i18n.confirmPasswordText"> |
fontSize="32rpx" border="none" :placeholder="i18n.confirmPasswordText"> |
||||
</u-input> |
</u-input> |
||||
</u-form-item> |
</u-form-item> |
||||
|
|
||||
</u--form> |
</u--form> |
||||
<u-button class="button" color="#00E8A2" throttleTime="500" :disabled="!agreeFlag">{{ i18n.Save }} |
<u-button class="button" color="#00E8A2" throttleTime="500" :disabled="!agreeFlag" @click="forgotPassword" :throttleTime="500">{{ i18n.Save }} |
||||
</u-button> |
</u-button> |
||||
</view> |
</view> |
||||
|
|
||||
|
|
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import UButton from '../../uview-ui/components/u-button/u-button.vue' |
import UButton from '../../uview-ui/components/u-button/u-button.vue' |
||||
export default { |
import api from '@/utils/api' |
||||
name: "ForgotPassword", |
import md5 from 'js-md5' |
||||
data() { |
export default { |
||||
return { |
name: "ForgotPassword", |
||||
// 验证码倒计时 |
data() { |
||||
tips: '', |
return { |
||||
seconds: 60, |
// 验证码倒计时 |
||||
// 邮箱号码是否正确 |
tips: '', |
||||
isCanGetCode: false, |
seconds: 60, |
||||
userInfo: { |
// 邮箱号码是否正确 |
||||
name: "", |
isCanGetCode: false, |
||||
password: "", |
// 密码格式对不对 |
||||
}, |
isCanPassword: false, |
||||
rules: { |
userInfo: { |
||||
email: { |
email: "", |
||||
type: "string", |
password: "", |
||||
required: true, |
confirmPassword: "", |
||||
message: this.$t("login.emailInputMessage"), |
code:"", |
||||
trigger: ["blur", "change"], |
}, |
||||
}, |
rules: { |
||||
code: { |
email: { |
||||
type: "string", |
type: "string", |
||||
required: true, |
required: true, |
||||
message: this.$t("login.verificationCodeMessage"), |
message: this.$t("login").emailInputMessage, |
||||
trigger: ["blur", "change"] |
trigger: ["blur", "change"], |
||||
}, |
}, |
||||
password: { |
code: { |
||||
type: "string", |
type: "string", |
||||
required: true, |
required: true, |
||||
message: this.$t("login.passwordInputMessage"), |
message: this.$t("login").verificationCodeMessage, |
||||
trigger: ["blur", "change"] |
trigger: ["blur", "change"] |
||||
}, |
}, |
||||
}, |
password: { |
||||
agreeFlag: false, |
type: "string", |
||||
}; |
required: true, |
||||
}, |
message: this.$t("login").passwordInputMessage, |
||||
computed: { |
trigger: ["blur", "change"] |
||||
i18n() { |
}, |
||||
return this.$t("login"); |
confirmPassword: { |
||||
}, |
type: "string", |
||||
}, |
required: true, |
||||
watch: { |
message: this.$t("login").passwordInputMessage, |
||||
'userInfo.email': { |
trigger: ["blur", "change"] |
||||
handler(newValue) { |
}, |
||||
this.isCanGetCode = uni.$u.test.email(newValue); |
}, |
||||
} |
}; |
||||
} |
|
||||
}, |
|
||||
onLoad() { |
|
||||
// console.log(this.$t('login.emailInputMessage')); |
|
||||
}, |
|
||||
onShow() { }, |
|
||||
methods: { |
|
||||
// 验证码相关 |
|
||||
codeChange(text) { |
|
||||
this.tips = text; |
|
||||
}, |
}, |
||||
// 验证码获取 |
computed: { |
||||
getCode() { |
i18n() { |
||||
if (!this.userInfo.email) { |
return this.$t("login"); |
||||
uni.$u.toast(this.$t("login.Emailempty")) |
}, |
||||
return |
agreeFlag() { |
||||
} |
return this.userInfo.email && this.userInfo.password && this.userInfo.confirmPassword && this.userInfo.code |
||||
if (!this.isCanGetCode) { |
|
||||
uni.$u.toast(this.$t("login.Emailincorrect")) |
|
||||
return |
|
||||
} |
} |
||||
if (this.$refs.uCode.canGetCode) { |
}, |
||||
const data = { |
watch: { |
||||
email: this.userInfo.email, |
'userInfo.email': { |
||||
type: 0, |
handler(newValue) { |
||||
|
this.isCanGetCode = uni.$u.test.email(newValue); |
||||
} |
} |
||||
// 模拟向后端请求验证码 |
}, |
||||
uni.showLoading({ |
'userInfo.password': { |
||||
title: this.$t("login.GettingVerificationCode") |
handler(newValue) { |
||||
}) |
const numberReg = /^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])[A-Za-z0-9 _]{6,20}$/ |
||||
this.$api.sendEmailCode(data).then(res => { |
this.isCanPassword = numberReg.test(newValue) |
||||
if (res.code === 200) { |
} |
||||
uni.hideLoading(); |
}, |
||||
|
}, |
||||
|
onLoad() { |
||||
|
// console.log(this.$t('login.emailInputMessage')); |
||||
|
}, |
||||
|
onShow() {}, |
||||
|
methods: { |
||||
|
// 验证码相关 |
||||
|
codeChange(text) { |
||||
|
this.tips = text; |
||||
|
if (text.length == 7) { |
||||
|
text = text.slice(0, 2); //截取第二个到第四个之间的字符 cd |
||||
|
this.tips = text + "s"; |
||||
|
} |
||||
|
if (text.length == 6) { |
||||
|
text = text.substring(0, 1) |
||||
|
this.tips = text + "s"; |
||||
|
} |
||||
|
if (text.length == 4) { |
||||
|
this.tips = this.$t("login").Getcode |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
// 验证码获取 |
||||
|
getCode() { |
||||
|
if (!this.userInfo.email) { |
||||
|
uni.$u.toast(this.$t("login").Emailempty) |
||||
|
return |
||||
|
} |
||||
|
if (!this.isCanGetCode) { |
||||
|
uni.$u.toast(this.$t("login").Emailincorrect) |
||||
|
return |
||||
|
} |
||||
|
if (this.$refs.uCode.canGetCode) { |
||||
|
const data = { |
||||
|
email: this.userInfo.email, |
||||
|
type: 0, |
||||
|
} |
||||
|
// 模拟向后端请求验证码 |
||||
|
uni.showLoading({ |
||||
|
title: this.$t("login").GettingVerificationCode |
||||
|
}) |
||||
|
api.sendEmailCode(data).then(res => { |
||||
|
uni.hideLoading(this.$t("login").CodeHasSent); |
||||
// 这里此提示会被this.start()方法中的提示覆盖 |
// 这里此提示会被this.start()方法中的提示覆盖 |
||||
uni.$u.toast(this.$t("login.CodeHasSent")); |
uni.$u.toast(this.$t("login").CodeHasSent); |
||||
// 通知验证码组件内部开始倒计时 |
// 通知验证码组件内部开始倒计时 |
||||
this.$refs.uCode.start(); |
this.$refs.uCode.start(); |
||||
} else { |
}) |
||||
uni.$u.toast(res.msg) |
} else { |
||||
|
uni.$u.toast(this.$t("login").SendAfter); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
// 输入密码 |
||||
|
forgotPassword() { |
||||
|
if (!this.isCanPassword) { |
||||
|
uni.$u.toast(this.$t("login").passwordRule) |
||||
|
return |
||||
|
} |
||||
|
// 验证重复输入的密码 |
||||
|
if (this.userInfo.password !== this.userInfo.confirmPassword) { |
||||
|
uni.$u.toast(this.$t("login").passwordConfirm) |
||||
|
return |
||||
|
} |
||||
|
this.$refs.uForm.validate().then(res => { |
||||
|
let userInfo = { |
||||
|
email: this.userInfo.email, |
||||
|
password: md5(this.userInfo.password), |
||||
|
confirmPassword: md5(this.userInfo.confirmPassword), |
||||
|
code: this.userInfo.code, |
||||
} |
} |
||||
|
api.forgotPassword(userInfo).then(res => { |
||||
|
setTimeout(() => { |
||||
|
uni.showToast({ |
||||
|
title: this.$t("login").resSuccess |
||||
|
}) |
||||
|
}, 600) |
||||
|
uni.reLaunch({ |
||||
|
url: '/pages/login/index' |
||||
|
}) |
||||
|
}) |
||||
|
}).catch(errors => { |
||||
|
console.log('err') |
||||
}) |
}) |
||||
} else { |
|
||||
uni.$u.toast(this.$t("login.SendAfter")); |
}, |
||||
} |
|
||||
}, |
}, |
||||
}, |
components: { |
||||
components: { UButton } |
UButton |
||||
} |
} |
||||
|
} |
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||
.main { |
.main { |
||||
|
|
||||
.body { |
.body { |
||||
margin-top: 204rpx; |
margin-top: 204rpx; |
||||
padding: 0 64rpx; |
padding: 0 64rpx; |
||||
overflow: hidden; |
overflow: hidden; |
||||
|
|
||||
.form { |
.form { |
||||
font-size: 32rpx; |
font-size: 32rpx; |
||||
margin-top: 48rpx; |
margin-top: 48rpx; |
||||
|
|
||||
.input-item { |
.input-item { |
||||
height: 112rpx; |
height: 112rpx; |
||||
line-height: 112rpx; |
line-height: 112rpx; |
||||
background: #211F32; |
background: #211F32; |
||||
margin-bottom: 48rpx; |
margin-bottom: 48rpx; |
||||
border-radius: 32rpx; |
border-radius: 32rpx; |
||||
|
|
||||
.icon { |
.icon { |
||||
margin: 0 24rpx; |
margin: 0 24rpx; |
||||
} |
} |
||||
|
|
||||
/deep/.u-form-item__body { |
/deep/.u-form-item__body { |
||||
padding: 0; |
padding: 0; |
||||
} |
} |
||||
|
|
||||
.input { |
.input { |
||||
height: 112rpx; |
height: 112rpx; |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
.vCode { |
.vCode { |
||||
|
|
||||
.getVCodeBtn { |
.getVCodeBtn { |
||||
// position: absolute; |
// position: absolute; |
||||
width: 154rpx; |
width: 154rpx; |
||||
height: 56rpx; |
height: 56rpx; |
||||
right: 28rpx; |
right: 28rpx; |
||||
// top: 14px; |
// top: 14px; |
||||
border-radius: 8px; |
border-radius: 8px; |
||||
line-height: 56rpx; |
line-height: 56rpx; |
||||
font-size: 24rpx; |
font-size: 24rpx; |
||||
color: #00E8A2 !important; |
color: #00E8A2 !important; |
||||
padding: 0; |
padding: 0; |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
.button { |
.button { |
||||
margin-top: 64rpx; |
margin-top: 64rpx; |
||||
height: 112rpx; |
height: 112rpx; |
||||
line-height: 112rpx; |
line-height: 112rpx; |
||||
border-radius: 32rpx; |
border-radius: 32rpx; |
||||
font-size: 32rpx; |
font-size: 32rpx; |
||||
color: #15141F !important; |
color: #15141F !important; |
||||
} |
} |
||||
|
|
||||
|
|
||||
} |
} |
||||
|
|
||||
} |
} |
||||
</style> |
</style> |
||||
|
@ -0,0 +1,97 @@ |
|||||
|
<template> |
||||
|
<view class="main"> |
||||
|
<!-- nav --> |
||||
|
<navigation>{{ i18n.AboutUs }}</navigation> |
||||
|
<view class="body"> |
||||
|
|
||||
|
|
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import api from '@/utils/api' |
||||
|
export default { |
||||
|
name: "AboutUs", |
||||
|
data() { |
||||
|
return { |
||||
|
|
||||
|
}; |
||||
|
}, |
||||
|
computed: { |
||||
|
i18n() { |
||||
|
return this.$t("me"); |
||||
|
}, |
||||
|
}, |
||||
|
onLoad() { |
||||
|
this.about(); |
||||
|
}, |
||||
|
onShow() { }, |
||||
|
methods: { |
||||
|
// 关于我们 |
||||
|
about() { |
||||
|
api.aboutus().then(res => { |
||||
|
console.log(res) |
||||
|
}) |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.main { |
||||
|
|
||||
|
.body { |
||||
|
overflow: hidden; |
||||
|
margin-top: 200rpx; |
||||
|
padding: 0 48rpx; |
||||
|
|
||||
|
.shareText { |
||||
|
margin-top: 104rpx; |
||||
|
font-size: 60rpx; |
||||
|
font-weight: 800; |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
.scanText { |
||||
|
font-size: 32rpx; |
||||
|
text-align: center; |
||||
|
color: #A2A0A8; |
||||
|
} |
||||
|
|
||||
|
.QRCode { |
||||
|
box-sizing: border-box; |
||||
|
margin: 66rpx auto; |
||||
|
width: 520rpx; |
||||
|
height: 520rpx; |
||||
|
background-image: url(../../static/me/bg_QR_code.png); |
||||
|
background-repeat: no-repeat; |
||||
|
background-size: 520rpx; |
||||
|
padding: 52rpx; |
||||
|
|
||||
|
.QRCodeImg { |
||||
|
margin-left: 8rpx; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.myIdText { |
||||
|
font-size: 48rpx; |
||||
|
font-weight: 800; |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
.button { |
||||
|
height: 112rpx; |
||||
|
margin: 72rpx 0; |
||||
|
border-radius: 32rpx; |
||||
|
color: #15141F !important; |
||||
|
font-weight: 700; |
||||
|
font-size: 32rpx; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
</style> |
@ -1,378 +1,408 @@ |
|||||
<template> |
<template> |
||||
<view class="main"> |
<view class="main"> |
||||
<view class="contentBody"> |
<view class="contentBody"> |
||||
<!-- 用户头像和id --> |
<!-- 用户头像和id --> |
||||
<view class="userInfo"> |
<view class="userInfo"> |
||||
<u-image class="headImg" src="../../static/me/Ellipse 85.png" width="160rpx" height="160rpx" |
<u-image class="headImg" src="../../static/me/Ellipse 85.png" width="160rpx" height="160rpx" |
||||
radius="160rpx"></u-image> |
radius="160rpx"></u-image> |
||||
<view class="idAndAccount"> |
<view class="idAndAccount"> |
||||
<view class="id">ID:984934</view> |
<view class="id">ID:{{userInfo.uid}}</view> |
||||
<view class="account">{{ i18n.account }}:348798457498579</view> |
<view class="account">{{ i18n.account }}:{{userInfo.email}}</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<!-- 三个按钮 --> |
<!-- 三个按钮 --> |
||||
<view class="btnDiv" > |
<view class="btnDiv"> |
||||
<!-- 充值 --> |
<!-- 充值 --> |
||||
<view class="item" id='recharge' @click="goto"> |
<view class="item" id='recharge' @click="goto"> |
||||
<view class="img" id='recharge'></view> |
<view class="img" id='recharge'></view> |
||||
<view class="title" id='recharge'>{{ i18n.Recharge }}</view> |
<view class="title" id='recharge'>{{ i18n.Recharge }}</view> |
||||
</view> |
</view> |
||||
<!-- 取现 --> |
<!-- 取现 --> |
||||
<view class="item" id='withdrawal' @click="goto"> |
<view class="item" id='withdrawal' @click="goto"> |
||||
<view class="img" id='withdrawal'></view> |
<view class="img" id='withdrawal'></view> |
||||
<view class="title" id='withdrawal'>{{ i18n.Withdrawal }}</view> |
<view class="title" id='withdrawal'>{{ i18n.Withdrawal }}</view> |
||||
</view> |
</view> |
||||
<!-- 兑换 --> |
<!-- 兑换 --> |
||||
<view class="item" id='transfer' @click="goto"> |
<view class="item" id='transfer' @click="goto"> |
||||
<view class="img" id='transfer'></view> |
<view class="img" id='transfer'></view> |
||||
<view class="title" id='transfer'>{{ i18n.Transfer }}</view> |
<view class="title" id='transfer'>{{ i18n.Transfer }}</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<!-- 余额相关 --> |
<!-- 余额相关 --> |
||||
<view class="balanceRow"> |
<view class="balanceRow"> |
||||
<!-- 可用余额 --> |
<!-- 可用余额 --> |
||||
<view class="item"> |
<view class="item"> |
||||
<view class="number">0</view> |
<view class="number">{{userInfoBalance.balance}}</view> |
||||
<view class="title">{{ i18n.Balance }}</view> |
<view class="title">{{ i18n.Balance }}</view> |
||||
</view> |
</view> |
||||
<!-- 质押余额 --> |
<!-- 质押余额 --> |
||||
<view class="item"> |
<view class="item"> |
||||
<view class="number">0</view> |
<view class="number">{{userInfoBalance.pledge}}</view> |
||||
<view class="title">{{ i18n.Pledge }}</view> |
<view class="title">{{ i18n.Pledge }}</view> |
||||
</view> |
</view> |
||||
<!-- 合约余额 --> |
<!-- 合约余额 --> |
||||
<view class="item"> |
<view class="item"> |
||||
<view class="number">0</view> |
<view class="number">{{userInfoBalance.contract}}</view> |
||||
<view class="title">{{ i18n.Contarct }}</view> |
<view class="title">{{ i18n.Contarct }}</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<!-- General --> |
<!-- General --> |
||||
<view class="GeneralPart"> |
<view class="GeneralPart"> |
||||
<view class="General">{{ i18n.General }}</view> |
<view class="General">{{ i18n.General }}</view> |
||||
<view class="list" @click="goto"> |
<view class="list" @click="goto"> |
||||
<!-- 邀请朋友 --> |
<!-- 邀请朋友 --> |
||||
<view class="item" id="InviteFriends">{{ i18n.InviteFriends }}</view> |
<view class="item" id="InviteFriends">{{ i18n.InviteFriends }}</view> |
||||
<!-- 账户信息 --> |
<!-- 账户信息 --> |
||||
<view class="item" id="AccountInfo">{{ i18n.AccountInfo }}</view> |
<view class="item" id="AccountInfo">{{ i18n.AccountInfo }}</view> |
||||
<!-- 我的团队 --> |
<!-- 我的团队 --> |
||||
<view class="item" id="MyTeam">{{ i18n.MyTeam }}</view> |
<view class="item" id="MyTeam">{{ i18n.MyTeam }}</view> |
||||
<!-- 钱包历史 --> |
<!-- 钱包历史 --> |
||||
<view class="item" id="WalletHistory">{{ i18n.WalletHistory }}</view> |
<view class="item" id="WalletHistory">{{ i18n.WalletHistory }}</view> |
||||
<!-- 通知 --> |
<!-- 通知 --> |
||||
<view class="item" id="Notification">{{ i18n.Notification }}</view> |
<view class="item" id="Notification">{{ i18n.Notification }}</view> |
||||
<!-- 捐赠记录 --> |
<!-- 捐赠记录 --> |
||||
<view class="item" id="DonateRecord">{{ i18n.DonateRecord }}</view> |
<view class="item" id="DonateRecord">{{ i18n.DonateRecord }}</view> |
||||
<!-- 语言 --> |
<!-- 语言 --> |
||||
<view class="item" id="Language">{{ i18n.Language }}</view> |
<view class="item" id="Language">{{ i18n.Language }}</view> |
||||
<!-- 关于我们 --> |
<!-- 关于我们 --> |
||||
<view class="item" id="AboutUs">{{ i18n.AboutUs }}</view> |
<view class="item" id="AboutUs">{{ i18n.AboutUs }}</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
|
|
||||
<!-- 退出登录 --> |
<!-- 退出登录 --> |
||||
<u-button class="logOutButton" color="#323045" throttleTime="500"> |
<u-button class="logOutButton" color="#323045" throttleTime="500" @click="showLogOut=true"> |
||||
<view class="title">{{ i18n.LogOut }}</view> |
<view class="title">{{ i18n.LogOut }}</view> |
||||
</u-button> |
</u-button> |
||||
|
|
||||
</view> |
</view> |
||||
|
<!-- tabBar --> |
||||
|
<tab-bar :selectActive="5"></tab-bar> |
||||
<!-- tabBar --> |
<!-- 确认退出登录 --> |
||||
<tab-bar :selectActive="5"></tab-bar> |
<u-modal :show="showLogOut" :showCancelButton="true" :confirmText="i18n.Confirm" :cancelText="i18n.Cancel" |
||||
</view> |
:content="i18n.isLogOut" @confirm="logOut" @cancel="showLogOut=false"></u-modal> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
export default { |
import api from '@/utils/api' |
||||
name: 'me', |
export default { |
||||
data() { |
name: 'me', |
||||
return { |
data() { |
||||
|
return { |
||||
} |
// 退出登录模态框的显示与否。 |
||||
}, |
showLogOut: false, |
||||
onLoad() { |
// 用户信息 |
||||
|
userInfo:{}, |
||||
}, |
// 用户余额 |
||||
onShow() { |
userInfoBalance:{}, |
||||
|
} |
||||
}, |
}, |
||||
onHide() { |
onLoad() { |
||||
}, |
|
||||
computed: { |
}, |
||||
i18n() { |
onShow() { |
||||
return this.$t('me') |
// 获取用户信息 |
||||
} |
this.getUserInfo() |
||||
}, |
// 获取用户余额信息 |
||||
methods: { |
this.getUserInfoBalance(); |
||||
goto(e) { |
}, |
||||
// console.log(e.target); |
onHide() {}, |
||||
// console.log(e.target.id); |
computed: { |
||||
const id = e.target.id; |
i18n() { |
||||
let url = ''; |
return this.$t('me') |
||||
switch (id) { |
} |
||||
case 'recharge': |
}, |
||||
url = '/pages/recharge/recharge' |
methods: { |
||||
break; |
// 获取用户信息 |
||||
case 'withdrawal': |
getUserInfo() { |
||||
url = '/pages/withdrawal/withdrawal' |
api.userInfo().then(res => { |
||||
break; |
this.userInfo=res |
||||
case 'transfer': |
}) |
||||
url = '/pages/me/transfer' |
}, |
||||
break; |
// 获取用户余额信息 |
||||
case 'InviteFriends': |
getUserInfoBalance() { |
||||
url = '/pages/me/inviteFriends' |
api.userAccount().then(res => { |
||||
break; |
this.userInfoBalance=res |
||||
case 'AccountInfo': |
}) |
||||
url = '/pages/me/accountInfo' |
}, |
||||
break; |
// 退出登录 |
||||
case 'MyTeam': |
logOut() { |
||||
url = '/pages/me/myTeam' |
api.loginOut().then(res => { |
||||
break; |
uni.setStorageSync('ticket',null) |
||||
case 'WalletHistory': |
uni.reLaunch({ |
||||
url = '/pages/me/walletHistory' |
url: '/pages/login/index' |
||||
break; |
}) |
||||
case 'Notification': |
}) |
||||
url = '/pages/me/notification' |
}, |
||||
break; |
goto(e) { |
||||
case 'DonateRecord': |
// console.log(e.target); |
||||
url = '/pages/me/donateRecord' |
// console.log(e.target.id); |
||||
break; |
const id = e.target.id; |
||||
case 'Language': |
let url = ''; |
||||
url = '/pages/me/language' |
switch (id) { |
||||
break; |
case 'recharge': |
||||
case 'AboutUs': |
url = '/pages/recharge/recharge' |
||||
break; |
break; |
||||
default: |
case 'withdrawal': |
||||
break; |
url = '/pages/withdrawal/withdrawal' |
||||
} |
break; |
||||
if (url) { |
case 'transfer': |
||||
// console.log(url); |
url = '/pages/me/transfer' |
||||
uni.navigateTo({ |
break; |
||||
url, |
case 'InviteFriends': |
||||
}); |
url = '/pages/me/inviteFriends' |
||||
} |
break; |
||||
|
case 'AccountInfo': |
||||
} |
url = '/pages/me/accountInfo' |
||||
} |
break; |
||||
} |
case 'MyTeam': |
||||
|
url = '/pages/me/myTeam' |
||||
|
break; |
||||
|
case 'WalletHistory': |
||||
|
url = '/pages/me/walletHistory' |
||||
|
break; |
||||
|
case 'Notification': |
||||
|
url = '/pages/me/notification' |
||||
|
break; |
||||
|
case 'DonateRecord': |
||||
|
url = '/pages/me/donateRecord' |
||||
|
break; |
||||
|
case 'Language': |
||||
|
url = '/pages/me/language' |
||||
|
break; |
||||
|
case 'AboutUs': |
||||
|
url = '/pages/me/about' |
||||
|
break; |
||||
|
default: |
||||
|
break; |
||||
|
} |
||||
|
if (url) { |
||||
|
// console.log(url); |
||||
|
uni.navigateTo({ |
||||
|
url, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||
.main { |
.main { |
||||
padding-top: 88rpx; |
padding-top: 88rpx; |
||||
padding-bottom: 198rpx; // 避免底部TabBar盖住内容 |
padding-bottom: 198rpx; // 避免底部TabBar盖住内容 |
||||
|
|
||||
.contentBody { |
.contentBody { |
||||
|
|
||||
box-sizing: border-box; |
box-sizing: border-box; |
||||
width: 100%; |
width: 100%; |
||||
background: #211F32; |
background: #211F32; |
||||
border-radius: 64rpx 64rpx 0 0; |
border-radius: 64rpx 64rpx 0 0; |
||||
padding: 44rpx 48rpx; |
padding: 44rpx 48rpx; |
||||
overflow: hidden; |
overflow: hidden; |
||||
|
|
||||
|
|
||||
.userInfo { |
.userInfo { |
||||
height: 168rpx; |
height: 168rpx; |
||||
display: flex; |
display: flex; |
||||
flex-wrap: wrap; |
flex-wrap: wrap; |
||||
|
|
||||
.headImg { |
.headImg { |
||||
height: 160rpx; |
height: 160rpx; |
||||
width: 160rpx; |
width: 160rpx; |
||||
border-radius: 160rpx; |
border-radius: 160rpx; |
||||
border: 4rpx solid #F6A609; |
border: 4rpx solid #F6A609; |
||||
} |
} |
||||
|
|
||||
.idAndAccount { |
.idAndAccount { |
||||
margin-left: 40rpx; |
margin-left: 40rpx; |
||||
|
|
||||
.id { |
.id { |
||||
height: 56rpx; |
height: 56rpx; |
||||
width: 378rpx; |
width: 378rpx; |
||||
font-weight: 600; |
font-weight: 600; |
||||
font-size: 40rpx; |
font-size: 40rpx; |
||||
margin: 16rpx 0; |
margin: 16rpx 0; |
||||
} |
} |
||||
|
|
||||
.account { |
.account { |
||||
position: relative; |
position: relative; |
||||
height: 56rpx; |
height: 56rpx; |
||||
line-height: 56rpx; |
line-height: 56rpx; |
||||
width: 378rpx; |
width: 378rpx; |
||||
background: rgba(255, 188, 31, 0.1); |
background: rgba(255, 188, 31, 0.1); |
||||
border-radius: 16rpx; |
border-radius: 16rpx; |
||||
font-size: 24rpx; |
font-size: 24rpx; |
||||
color: #FFBC1F; |
color: #FFBC1F; |
||||
text-align: center; |
text-align: left; |
||||
padding-left: 20rpx; |
padding-left: 20rpx; |
||||
|
|
||||
&::before { |
&::before { |
||||
display: block; |
display: block; |
||||
position: absolute; |
position: absolute; |
||||
content: ''; |
content: ''; |
||||
background-image: url(../../static/me/ranking.png); |
background-image: url(../../static/me/ranking.png); |
||||
background-repeat: no-repeat; |
background-repeat: no-repeat; |
||||
background-size: 32rpx; |
background-size: 32rpx; |
||||
width: 32rpx; |
width: 32rpx; |
||||
height: 32rpx; |
height: 32rpx; |
||||
top: 12rpx; |
top: 12rpx; |
||||
left: 20rpx; |
left: 20rpx; |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
|
|
||||
} |
} |
||||
|
|
||||
.btnDiv { |
.btnDiv { |
||||
margin: 32rpx 0; |
margin: 32rpx 0; |
||||
|
|
||||
.item { |
.item { |
||||
display: inline-block; |
display: inline-block; |
||||
width: 200rpx; |
width: 200rpx; |
||||
height: 190rpx; |
height: 190rpx; |
||||
text-align: center; |
text-align: center; |
||||
background: #323045; |
background: #323045; |
||||
border-radius: 52rpx; |
border-radius: 52rpx; |
||||
box-sizing: border-box; |
box-sizing: border-box; |
||||
|
|
||||
.img { |
.img { |
||||
height: 64rpx; |
height: 64rpx; |
||||
width: 64rpx; |
width: 64rpx; |
||||
margin: 32rpx auto; |
margin: 32rpx auto; |
||||
background-image: url(../../static/me/ic_u_recharge.png); |
background-image: url(../../static/me/ic_u_recharge.png); |
||||
background-repeat: no-repeat; |
background-repeat: no-repeat; |
||||
background-size: 64rpx; |
background-size: 64rpx; |
||||
|
|
||||
} |
} |
||||
|
|
||||
&:nth-child(2) { |
&:nth-child(2) { |
||||
margin: 0 26rpx; |
margin: 0 26rpx; |
||||
|
|
||||
.img { |
.img { |
||||
background-image: url(../../static/me/ic_u_withdrawal.png); |
background-image: url(../../static/me/ic_u_withdrawal.png); |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
&:nth-child(3) .img { |
&:nth-child(3) .img { |
||||
background-image: url(../../static/me/ic_u_transfer.png); |
background-image: url(../../static/me/ic_u_transfer.png); |
||||
} |
} |
||||
|
|
||||
.title { |
.title { |
||||
font-size: 26rpx; |
font-size: 26rpx; |
||||
} |
} |
||||
|
|
||||
|
|
||||
} |
} |
||||
|
|
||||
|
|
||||
} |
} |
||||
|
|
||||
.balanceRow { |
.balanceRow { |
||||
margin: 32rpx 0; |
margin: 32rpx 0; |
||||
background: #323045; |
background: #323045; |
||||
border-radius: 52rpx; |
border-radius: 52rpx; |
||||
box-sizing: border-box; |
box-sizing: border-box; |
||||
|
|
||||
.item { |
.item { |
||||
display: inline-block; |
display: inline-block; |
||||
width: 218rpx; |
width: 218rpx; |
||||
height: 200rpx; |
height: 200rpx; |
||||
text-align: center; |
text-align: center; |
||||
|
|
||||
|
|
||||
.number { |
.number { |
||||
margin: 32rpx auto; |
margin: 32rpx auto; |
||||
font-size: 48rpx; |
font-size: 48rpx; |
||||
|
|
||||
|
|
||||
} |
} |
||||
|
|
||||
|
|
||||
|
|
||||
.title { |
.title { |
||||
font-size: 28rpx; |
font-size: 28rpx; |
||||
} |
} |
||||
|
|
||||
|
|
||||
} |
} |
||||
|
|
||||
|
|
||||
} |
} |
||||
|
|
||||
.GeneralPart { |
.GeneralPart { |
||||
.General { |
.General { |
||||
font-size: 28rpx; |
font-size: 28rpx; |
||||
color: #A1A0A8; |
color: #A1A0A8; |
||||
} |
} |
||||
|
|
||||
.list { |
.list { |
||||
font-size: #fff; |
font-size: #fff; |
||||
|
|
||||
.item { |
.item { |
||||
position: relative; |
position: relative; |
||||
height: 116rpx; |
height: 116rpx; |
||||
font-size: 32rpx; |
font-size: 32rpx; |
||||
line-height: 116rpx; |
line-height: 116rpx; |
||||
border-bottom: 2rpx solid #323045; |
border-bottom: 2rpx solid #323045; |
||||
|
|
||||
&::after { |
&::after { |
||||
display: block; |
display: block; |
||||
position: absolute; |
position: absolute; |
||||
content: ''; |
content: ''; |
||||
background-image: url(../../static/me/arrow-right.png); |
background-image: url(../../static/me/arrow-right.png); |
||||
background-repeat: no-repeat; |
background-repeat: no-repeat; |
||||
background-size: 48rpx; |
background-size: 48rpx; |
||||
width: 48rpx; |
width: 48rpx; |
||||
height: 48rpx; |
height: 48rpx; |
||||
top: 32rpx; |
top: 32rpx; |
||||
right: 0rpx; |
right: 0rpx; |
||||
} |
} |
||||
|
|
||||
&:last-child { |
&:last-child { |
||||
border-bottom: none; |
border-bottom: none; |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
.logOutButton { |
.logOutButton { |
||||
position: relative; |
position: relative; |
||||
margin-top: 14rpx; |
margin-top: 14rpx; |
||||
height: 112rpx; |
height: 112rpx; |
||||
line-height: 112rpx; |
line-height: 112rpx; |
||||
border-radius: 32rpx; |
border-radius: 32rpx; |
||||
font-size: 36rpx; |
font-size: 36rpx; |
||||
color: #A1A0A8 !important; |
color: #A1A0A8 !important; |
||||
|
|
||||
|
|
||||
.title { |
.title { |
||||
padding-left: 80rpx; |
padding-left: 80rpx; |
||||
|
|
||||
&::before { |
&::before { |
||||
display: block; |
display: block; |
||||
position: absolute; |
position: absolute; |
||||
content: ''; |
content: ''; |
||||
background-image: url(../../static/me/ic_logout.png); |
background-image: url(../../static/me/ic_logout.png); |
||||
background-repeat: no-repeat; |
background-repeat: no-repeat; |
||||
background-size: 48rpx; |
background-size: 48rpx; |
||||
width: 48rpx; |
width: 48rpx; |
||||
height: 48rpx; |
height: 48rpx; |
||||
top: 30rpx; |
top: 30rpx; |
||||
left: 220rpx; |
left: 220rpx; |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
|
|
||||
} |
} |
||||
|
|
||||
} |
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
} |
} |
||||
</style> |
</style> |
||||
|
Loading…
Reference in new issue