司机注册

pull/1/head
骆超 2 years ago
parent 7d7462ff25
commit be394190c5
  1. 24
      BagAuth/pages/login/register.vue
  2. 14
      api/user.js

@ -86,6 +86,7 @@
<script>
import loginBottom from './components/loginBottom.vue'
import authApi from '@/api/auth.js'
import userApi from '@/api/user.js'
export default {
components: {
loginBottom
@ -110,11 +111,30 @@
onShow() {},
methods: {
savePwd() {
userApi.setUserPwd({
userName:this.driver.username,
password:this.password
}).then(res=>{
if(res.code===20000){
uni.showToast({
title: '修改密码成功',
icon: 'success',
duration: 2000
})
this.skipPwd()
}else{
uni.showToast({
title: '修改密码失败',
icon: 'success',
duration: 2000
})
}
})
},
skipPwd() {
uni.switchTab({
url: '/pages/tabbar/home/home'
uni.reLaunch({
url: '/BagAuth/pages/login/login'
})
},
sendRandom() {

@ -0,0 +1,14 @@
import request from '@/utils/request'
const service_name = "xkhl-user"
const group_name = "sysSecurityUserPsw"
export default {
//统计用户油卡总数量、总余额
setUserPwd (data) {
return request({
url: `/${service_name}/${group_name}/setUserPwd`,
method: 'post',
data
})
},
}
Loading…
Cancel
Save