Browse Source

Merge branch 'hella_online_20240803' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp into hella_online_20240803

lijuncheng0816
lijuncheng 1 month ago
parent
commit
5f7d5c99cf
  1. 2
      src/api/request2.js
  2. 15
      src/pages/setter/passwordpage.vue

2
src/api/request2.js

@ -92,7 +92,7 @@ export function updateUserPwd(oldPassword, newPassword) {
return request({
url: baseApi + '/system/user/profile/update-password',
method: 'PUT',
params: data
data: data
})
}

15
src/pages/setter/passwordpage.vue

@ -14,11 +14,15 @@
<view class="new_btn_bot">
<button class="new_save_btn" @click="submit">确认修改</button>
</view>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import { updateUserPwd } from '@/api/request2.js';
import {
navigateBack,
} from '@/common/basic.js';
export default {
data() {
return {
@ -87,14 +91,21 @@
//
submit() {
this.$refs.form.validate().then(res=>{
console.log(res)
updateUserPwd(res.oldpassword,res.newpassword).then((ress)=>{
console.log('返回结果:', ress);
if(ress.data){
this.showCommitSuccessMessage("修改成功")
}
})
}).catch(err =>{
console.log('表单错误信息:', err);
})
}
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
navigateBack(1)
})
},
}
}
</script>

Loading…
Cancel
Save