司机注册
This commit is contained in:
@@ -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() {
|
||||
|
||||
14
api/user.js
Normal file
14
api/user.js
Normal file
@@ -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
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user