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 3 months 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({ return request({
url: baseApi + '/system/user/profile/update-password', url: baseApi + '/system/user/profile/update-password',
method: 'PUT', method: 'PUT',
params: data data: data
}) })
} }

15
src/pages/setter/passwordpage.vue

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

Loading…
Cancel
Save