Merge pull request '司机注册' (#1) from lc into caolc
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
@@ -86,6 +86,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import loginBottom from './components/loginBottom.vue'
|
import loginBottom from './components/loginBottom.vue'
|
||||||
import authApi from '@/api/auth.js'
|
import authApi from '@/api/auth.js'
|
||||||
|
import userApi from '@/api/user.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
loginBottom
|
loginBottom
|
||||||
@@ -110,11 +111,30 @@
|
|||||||
onShow() {},
|
onShow() {},
|
||||||
methods: {
|
methods: {
|
||||||
savePwd() {
|
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() {
|
skipPwd() {
|
||||||
uni.switchTab({
|
uni.reLaunch({
|
||||||
url: '/pages/tabbar/home/home'
|
url: '/BagAuth/pages/login/login'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
sendRandom() {
|
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