[liang] 3 years ago
parent
commit
44b8bb8a65
  1. 97
      pages/me/about.vue
  2. 149
      pages/me/aboutUs.vue
  3. 69
      pages/me/changeLoginPassword.vue
  4. 2
      utils/api.js
  5. 5
      utils/axios.js
  6. 6
      utils/language/en_US.js

97
pages/me/about.vue

@ -1,97 +0,0 @@
<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>

149
pages/me/aboutUs.vue

@ -1,86 +1,93 @@
<template>
<view class="main">
<!-- nav -->
<navigation :bgTransparent="true">{{ i18n.AboutUs }}</navigation>
<!-- 列表 -->
<view class="content">
<view class="card" v-for="(item, index) in 5" :key="index">
<view class="title">{{ i18n.Consulting }}</view>
<view class="text">A Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem
Ipsum has been the industry's standard dummy text ever since the 1500s, </view>
</view>
</view>
</view>
<view class="main">
<!-- nav -->
<navigation :bgTransparent="true">{{ i18n.AboutUs }}</navigation>
<!-- 列表 -->
<view class="content">
<view class="card" v-for="(item, index) in aboutus" :key="index">
<view class="title">{{ item.title }}</view>
<view class="text" v-html="item.content"></view>
</view>
</view>
</view>
</template>
<script>
export default {
name: "aboutUs",
data() {
return {
};
},
computed: {
i18n() {
return this.$t("me");
},
},
onLoad() {
},
onShow() { },
methods: {
import api from '@/utils/api'
export default {
name: "aboutUs",
data() {
return {
aboutus:[],
};
},
computed: {
i18n() {
return this.$t("me");
},
},
onLoad() {
this.about()
},
},
}
onShow() {},
methods: {
about() {
api.aboutus().then(res => {
this.aboutus = res
})
},
},
}
</script>
<style lang="scss" scoped>
.main {
background-image: url(../../static/me/image.png);
background-repeat: no-repeat;
background-size: 750rpx 424rpx;
overflow: hidden;
.main {
background-image: url(../../static/me/image.png);
background-repeat: no-repeat;
background-size: 750rpx 424rpx;
overflow: hidden;
&::after {
content: "";
position:fixed;
bottom: 0px;
right: 0px;
width: 418rpx;
height: 260rpx;
background-image: url(../../static/me/tarBg.png);
background-repeat: no-repeat;
background-size: cover;
}
&::after {
content: "";
position: fixed;
bottom: 0px;
right: 0px;
width: 418rpx;
height: 260rpx;
background-image: url(../../static/me/tarBg.png);
background-repeat: no-repeat;
background-size: cover;
}
.content {
margin-top: 200rpx;
overflow: hidden;
.content {
margin-top: 200rpx;
overflow: hidden;
.card {
margin: 32rpx 32rpx 0;
border-radius: 40rpx;
padding: 20rpx;
padding-bottom: 40rpx;
background-color: rgba(0, 221, 156, 0.03);
.card {
margin: 32rpx 32rpx 0;
border-radius: 40rpx;
padding: 20rpx;
padding-bottom: 40rpx;
background-color: rgba(0, 221, 156, 0.03);
.title {
font-size: 32rpx;
line-height: 64rpx;
background: linear-gradient(65.75deg, #6BB7A8 13.22%, #631FFD 65.49%, #FF844B 114.4%), #FFFFFF;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
text-fill-color: transparent;
}
.title {
font-size: 32rpx;
line-height: 64rpx;
background: linear-gradient(65.75deg, #6BB7A8 13.22%, #631FFD 65.49%, #FF844B 114.4%), #FFFFFF;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
text-fill-color: transparent;
}
.text {
line-height: 150%;
font-size: 24rpx;
color: #80AB9E;
}
}
}
.text {
line-height: 150%;
font-size: 24rpx;
color: #80AB9E;
}
}
}
}
}
</style>

69
pages/me/changeLoginPassword.vue

@ -6,12 +6,14 @@
<u-input class="input" type="password" v-model="oldPassword" color="#A1A0A8" fontSize="28rpx" border="none"
:placeholder="i18n.PleaseEnterTheOldPassword">
</u-input>
<u-input class="input" type="password" v-model="newPassword" color="#A1A0A8" fontSize="28rpx" border="none"
<u-input class="input" type="password" v-model="password" color="#A1A0A8" fontSize="28rpx" border="none"
:placeholder="i18n.CreateNewLoginPassword">
</u-input>
<!-- 修改登录密码按钮 -->
<u-button class="button" color="#00E8A2" throttleTime="500" :disabled="disabled">
<u-input class="input" type="password" v-model="confirmPassword" color="#A1A0A8" fontSize="28rpx" border="none"
:placeholder="i18n.confirmPassword">
</u-input>
<!-- 修改登录密码按钮 :disabled="disabled"-->
<u-button class="button" color="#00E8A2" throttleTime="500" @click="changePassword()" :throttleTime="500">
{{ i18n.Confirm }}
</u-button>
</view>
@ -19,13 +21,19 @@
</template>
<script>
import api from '@/utils/api'
import md5 from 'js-md5'
export default {
name: "changeLoginPassword",
data() {
return {
oldPassword: '',
newPassword: '',
oldPassword: '',
password: '',
confirmPassword:'',
disabled: true,
//
isCanPassword: false,
};
},
computed: {
@ -33,11 +41,58 @@ export default {
return this.$t("me");
},
},
watch: {
'password': {
handler(newValue) {
const numberReg = /^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])[A-Za-z0-9 _]{6,20}$/
this.isCanPassword = numberReg.test(newValue)
}
},
},
onLoad() {
},
onShow() { },
methods: {
//
changePassword() {
if (!this.password) {
uni.$u.toast(this.$t("login").passwordInputMessage)
return
}
if (!this.isCanPassword) {
let message = this.$t("login").passwordRule
uni.$u.toast(message)
return
}
//
if (this.password !== this.confirmPassword) {
uni.$u.toast(this.$t("login").passwordConfirm)
return
}
if (!this.oldPassword) {
uni.$u.toast(this.$t("login").PleaseEnterTheOldPassword)
return
}
let userInfo = {
oldPassword:md5(this.oldPassword),
password: md5(this.password),
confirmPassword: md5(this.confirmPassword),
}
api.updatePassword(userInfo).then(res => {
setTimeout(() => {
uni.showToast({
title: this.$t("me").ModifiedSuccessfully
})
}, 600)
uni.setStorageSync('ticket',null)
uni.reLaunch({
url: '/pages/login/index'
})
})
},
},
}
</script>

2
utils/api.js

@ -84,7 +84,7 @@ const api = {
aboutus: (params) => Vue.prototype.$axios.post('/api/index/aboutus',params),//关于我们
loginOut: (params) => Vue.prototype.$axios.post('/api/user/loginOut',params),//退出登录
forgotPassword: (params) => Vue.prototype.$axios.post('/api/user/forgotPassword',params),//忘记密码
updatePassword: () => Vue.prototype.$axios.get('/api/user/updatePassword'),//修改登录密码
updatePassword: (params) => Vue.prototype.$axios.post('/api/user/updatePassword',params),//修改登录密码
userAccount: (params) => Vue.prototype.$axios.post('/api/user/userAccount',params),//用户余额信息
bankCardInfo: (params) => Vue.prototype.$axios.post('/api/user/bankCardInfo',params),//获取银行卡信息
bindBank: (params) => Vue.prototype.$axios.post('/api/user/bindBank',params),//绑定/修改银行卡

5
utils/axios.js

@ -41,7 +41,9 @@ service.interceptors.request.use(
const ticket = uni.getStorageSync('ticket')
if (ticket) {
config.data = {};
if(!config.data){
config.data = {};
}
config.data['ticket'] = ticket
}
if (Vue.prototype.$showDialog) {
@ -71,7 +73,6 @@ service.interceptors.request.use(
}
//console.log(config.url,111111,config.data,dataStr)
config.data = {};
dataStr.forEach(function(e) {
config.data[e.split('=')[0]] = e.split('=')[1];
});

6
utils/language/en_US.js

@ -327,6 +327,7 @@ export default {
isLogOut:'Are you sure you want to log out?',
account: 'account',
Recharge: 'Recharge',
confirmPassword: 'Confirm Password',
Withdrawal: 'Withdrawal',
Transfer: 'Transfer',
Balance: 'Balance(U)',
@ -361,7 +362,7 @@ export default {
Cancel: 'Cancel',
ModifyWithdrawalPassword: 'Modify Withdrawal Password',
CreateNewPassword: 'Create new password',
ModifiedSuccessfully:'Modified successfully',
Fresh: 'Fresh',
Release: 'Release',
@ -380,9 +381,6 @@ export default {
TransferNumber: 'Transfer number',
PleaseEnterNumber: 'Please enter number',
Usable: 'Usable :',
ALL: 'ALL',
Consulting:'Consulting',
}
}

Loading…
Cancel
Save