李双庆 1 year ago
parent
commit
b2e667caaa
  1. 30
      api/member.js
  2. 8
      common/config.js
  3. 19
      pages/student/index/index.vue
  4. 66
      pages/student/my/update_pass.vue

30
api/member.js

@ -1,15 +1,27 @@
import http from '../common/axios.js'
//获取学员信息
function member(data) {
let url = '/member/member'
return http.get(url,data).then(res => {
return res;
})
}
export default {
member,
//学员详情
member(data) {
let url = '/member/member'
return http.get(url,data).then(res => {
return res;
})
},
//验证原始密码
is_pass(data) {
let url = '/member/is_pass'
return http.post(url,data).then(res => {
return res;
})
},
//设置新密码
set_pass(data) {
let url = '/member/set_pass'
return http.post(url,data).then(res => {
return res;
})
},
// 业务员端配置项(关于我们)
setFeedback(data) {
let url = '/member/set_feedback'

8
common/config.js

@ -1,10 +1,10 @@
// 线上地址
// const Api_url='http://146.56.228.75:20021/api'
// const img_domian = 'http://146.56.228.75:20021/'
const Api_url='http://146.56.228.75:20021/api'
const img_domian = 'http://146.56.228.75:20021/'
//本地测试地址
const Api_url='http://zhjw.cc/api'
const img_domian = 'http://zhjw.cc/'
// const Api_url='http://zhjw.cc/api'
// const img_domian = 'http://zhjw.cc/'
const IsDemo = false

19
pages/student/index/index.vue

@ -136,25 +136,6 @@
url: '/pages/student/index/physical_examination'
})
}
// fetchData(um_id) {
// user.activity_index({
// um_id: um_id
// }).then(res => {
// console.log(res)
// if(res.status == 200){
// if(res.data == null){
// this.list = []
// }else{
// this.list = res.data
// }
// }else{
// uni.showToast({
// title: res.msg,
// icon: 'none'
// })
// }
// });
// },
}
}
</script>

66
pages/student/my/update_pass.vue

@ -1,7 +1,7 @@
<template>
<view>
<view class="title">
<view :class="{'green-text': tset_style === 1}">1.验证手机号</view>
<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' }">
@ -11,18 +11,18 @@
为保障您的账号安全修改密码前请填写原密码
</view>
<view style="width: 95%;margin:30rpx auto;">
<fui-input borderTop placeholder="请输入原登录密码" v-model="user" @input="input"
<fui-input borderTop placeholder="请输入原登录密码" v-model="password" @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"
<fui-input borderTop placeholder="请设置6-20位新的登录密码" v-model="passwords" @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 borderTop :padding="['20rpx','32rpx']" v-model="old_password" placeholder="请再次输入新的登录密码"
@input="input" backgroundColor="#f2f2f2">
</fui-input>
</view>
</view>
@ -30,7 +30,8 @@
<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>
<fui-button background="#fff" radius="5rpx" @click="forgot" color="#999999"
v-if="tset_style == 1">忘记原密码</fui-button>
</view>
</view>
</view>
@ -38,11 +39,13 @@
</template>
<script>
import member from '@/api/member.js';
export default {
data() {
return {
code: '',
user: '',
password: '',
passwords: '',
old_password: '',
tset_style: 1,
}
},
@ -50,17 +53,36 @@
},
methods: {
sendCode() {
//
setTimeout(() => {
//
//...
//success
this.$refs.fui_cdv && this.$refs.fui_cdv.success()
}, 800)
//
nextStep() {
member.is_pass({
password: this.password
}).then(res => {
if (res.code == 1) {
this.tset_style = 2
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
},
nextStep(){
this.tset_style = 2
//
submit() {
member.set_pass({
password: this.passwords,
old_password: this.old_password,
}).then(res => {
if (res.code == 1) {
this.$util.logout();
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
},
forgot() {
uni.navigateTo({
@ -94,12 +116,12 @@
font-size: 26rpx;
border: 4rpx #f5f5f5 solid;
}
.green-text{
.green-text {
color: #36d6b9;
}
.describe{
.describe {
color: #999999;
padding-left: 30rpx;
}

Loading…
Cancel
Save