修改手机号和密码
This commit is contained in:
parent
0caee43f6d
commit
6d06545d9e
17
api/Modifyphonenumber/Modifyphonenumber.js
Normal file
17
api/Modifyphonenumber/Modifyphonenumber.js
Normal file
@ -0,0 +1,17 @@
|
||||
import request from "../request.js"
|
||||
|
||||
//修改手机号
|
||||
export function update(data) {
|
||||
return request({
|
||||
url: '/system/hospitalPerson/update',
|
||||
method: 'post',
|
||||
data:data,
|
||||
})
|
||||
}
|
||||
|
||||
// export function createMobileToken() {
|
||||
// return request({
|
||||
// url: `/nurseApplet/authorization/createMobileToken`,
|
||||
// method: 'GET'
|
||||
// })
|
||||
// }
|
||||
@ -2,23 +2,25 @@
|
||||
<view class="app">
|
||||
<view class="name">
|
||||
密码
|
||||
<u-input v-model="list.personPassword" :type="type" :border="border" placeholder="请输入密码" />
|
||||
<u-input v-model="list.personPassword" type="password" placeholder="请输入密码" />
|
||||
</view>
|
||||
<view class="submit">提交
|
||||
<view class="submit" @tap="submit">提交
|
||||
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
update,
|
||||
} from '@/api/Modifyphonenumber/Modifyphonenumber.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
list: [{
|
||||
personPassword: '',
|
||||
}],
|
||||
list: [],
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
@ -27,7 +29,26 @@
|
||||
console.log(this.list)
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
methods: {
|
||||
submit() {
|
||||
update(this.list).then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
this.$refs.uToast.show({
|
||||
title: '修改成功',
|
||||
type: 'success',
|
||||
duration: '1500'
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -2,20 +2,23 @@
|
||||
<view class="app">
|
||||
<view class="name">
|
||||
手机号
|
||||
<u-input v-model="list.personPhone" type="number" placeholder="请输入手机号" />
|
||||
<u-input v-model="list.personPhone" type="number" maxlength="11" placeholder="请输入手机号" />
|
||||
</view>
|
||||
<view class="submit">提交
|
||||
<view class="submit" @tap="submit">提交
|
||||
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
update,
|
||||
} from '@/api/Modifyphonenumber/Modifyphonenumber.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
list: [],
|
||||
}
|
||||
},
|
||||
@ -25,7 +28,27 @@
|
||||
console.log(this.list)
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
methods: {
|
||||
submit() {
|
||||
// this.list.id = uni.getStorageSync("id")
|
||||
update(this.list).then(res => {
|
||||
console.log(res)
|
||||
if(res.code==200){
|
||||
this.$refs.uToast.show({
|
||||
title: '修改成功',
|
||||
type: 'success',
|
||||
duration: '1500'
|
||||
})
|
||||
}else{
|
||||
this.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 泉医 -->
|
||||
<!-- 泉医 -->
|
||||
<view class="Quanyi" v-if="status=='2'">
|
||||
<div class="imgs">
|
||||
</div>
|
||||
@ -100,8 +100,8 @@
|
||||
name: ''
|
||||
},
|
||||
status: '',
|
||||
id:'',
|
||||
list:[],
|
||||
id: '',
|
||||
list: [],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@ -112,10 +112,10 @@
|
||||
this.info()
|
||||
},
|
||||
methods: {
|
||||
info(){
|
||||
this.id=uni.getStorageSync("id")
|
||||
hospitalPerson(this.id).then(res=>{
|
||||
this.list=res.data
|
||||
info() {
|
||||
this.id = uni.getStorageSync("id")
|
||||
hospitalPerson(this.id).then(res => {
|
||||
this.list = res.data
|
||||
})
|
||||
},
|
||||
gopassword() {
|
||||
@ -130,7 +130,7 @@
|
||||
},
|
||||
// 个人信息
|
||||
personlinfo() {
|
||||
console.log(this.list,'66')
|
||||
console.log(this.list, '66')
|
||||
uni.navigateTo({
|
||||
url: `/pages/Personalinfo/Personalinfo?list=${JSON.stringify(this.list)}`
|
||||
})
|
||||
@ -367,4 +367,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user