Browse Source

修改密码

master
李双庆 1 year ago
parent
commit
9923858e50
  1. 2
      components/AQ/AQTabber.vue
  2. 9
      pages.json
  3. 41
      pages/common/privacy_agreement.vue
  4. 17
      pages/student/my/set_up.vue
  5. 101
      pages/student/my/update_pass.vue

2
components/AQ/AQTabber.vue

@ -27,7 +27,7 @@
methods: { methods: {
async init(){ async init(){
uni.setStorageSync('userType','1') uni.setStorageSync('userType','3')
let userType = uni.getStorageSync('userType') let userType = uni.getStorageSync('userType')
this.userType = userType this.userType = userType

9
pages.json

@ -99,6 +99,15 @@
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
} }
}, },
{
"path" : "pages/student/my/update_pass",
"style": {
"navigationBarTitleText": "修改密码",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
},

41
pages/common/privacy_agreement.vue

@ -1,6 +1,6 @@
<template> <template>
<view> <view class="assemble">
<view class="html-style" v-html="text"></view>
</view> </view>
</template> </template>
@ -8,15 +8,46 @@
export default { export default {
data() { data() {
return { return {
type: 1, // 1,2
text: '',
} }
}, },
onLoad(item) {
console.log(item.type, '类型')
this.init(item.type)
},
methods: { methods: {
//
init(type) {
if (type == 1) {
//
this.text = '用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议用户协议'
uni.setNavigationBarTitle({
title: '用户协议'
});
} else if (type == 2) {
//
this.text = '隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略隐私策略'
uni.setNavigationBarTitle({
title: '隐私策略'
});
}
}
} }
} }
</script> </script>
<style> <style lang="less" scoped>
.assemble {
width: 100%;
height: 100vh;
overflow: auto;
background-color: #fff;
}
.html-style {
padding: 10rpx 20rpx;
line-height: 1.8;
font-size: 30rpx;
}
</style> </style>

17
pages/student/my/set_up.vue

@ -1,9 +1,9 @@
<template> <template>
<view class="assemble"> <view class="assemble">
<view style="height: 30rpx;"></view> <view style="height: 30rpx;"></view>
<view class="option">修改密码</view> <view class="option" @click="update_pass()">修改密码</view>
<view class="option">用户协议</view> <view class="option" @click="privacy_agreement(1)">用户协议</view>
<view class="option">隐私策略</view> <view class="option" @click="privacy_agreement(2)">隐私策略</view>
<view class="option">清空缓存</view> <view class="option">清空缓存</view>
<view style="width:90%;margin: 60rpx auto;"> <view style="width:90%;margin: 60rpx auto;">
@ -20,7 +20,16 @@
} }
}, },
methods: { methods: {
privacy_agreement(type){
uni.navigateTo({
url: '/pages/common/privacy_agreement?type='+type
})
},
update_pass(){
uni.navigateTo({
url: '/pages/student/my/update_pass'
})
}
} }
} }
</script> </script>

101
pages/student/my/update_pass.vue

@ -0,0 +1,101 @@
<template>
<view>
<view class="title">
<view :class="{'green-text': tset_style === 1}">1.验证手机号码</view>
<view :class="{'green-text': tset_style === 2}">2.设置新密码</view>
</view>
<view :style="{'background-color':'#fff','width':'100%','height':'100vh' }">
<view style="width: 95%;height: 30rpx;"></view>
<view v-if="tset_style == 1">
<view class="describe">
为保障您的账号安全修改密码前请填写原密码
</view>
<view style="width: 95%;margin:30rpx auto;">
<fui-input borderTop placeholder="请输入原登录密码" v-model="user" @input="input"
backgroundColor="#f2f2f2"></fui-input>
</view>
</view>
<view v-if="tset_style == 2">
<view style="width: 95%;margin:30rpx auto;">
<fui-input borderTop placeholder="请设置6-20位新的登录密码" v-model="user" @input="input"
backgroundColor="#f2f2f2"></fui-input>
</view>
<view style="width: 95%;margin: auto;">
<fui-input borderTop :padding="['20rpx','32rpx']" v-model="code" placeholder="请再次输入新的登录密码" @input="input"
backgroundColor="#f2f2f2">
</fui-input>
</view>
</view>
<view style="width: 95%;margin:60rpx auto;">
<fui-button background="#00be8c" radius="5rpx" @click="nextStep" v-if="tset_style == 1">下一步</fui-button>
<fui-button background="#00be8c" radius="5rpx" @click="submit" v-if="tset_style == 2">提交</fui-button>
<view style="width: 95%;margin:60rpx auto;">
<fui-button background="#fff" radius="5rpx" @click="forgot" color="#999999" v-if="tset_style == 1">忘记原密码</fui-button>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
code: '',
user: '',
tset_style: 1,
}
},
onLoad() {
},
methods: {
sendCode() {
//
setTimeout(() => {
//
//...
//success
this.$refs.fui_cdv && this.$refs.fui_cdv.success()
}, 800)
},
nextStep(){
this.tset_style = 2
}
}
}
</script>
<style lang="less" scoped>
page {
font-weight: normal;
}
.fui-section__title {
margin-left: 32rpx;
}
.fui-left__icon {
padding-right: 24rpx;
}
.title {
display: flex;
justify-content: space-around;
align-items: center;
height: 100rpx;
width: 100%;
background-color: #fff;
font-size: 26rpx;
border: 4rpx #f5f5f5 solid;
}
.green-text{
color: #36d6b9;
}
.describe{
color: #999999;
padding-left: 30rpx;
}
</style>
Loading…
Cancel
Save