vue返回后端的数据
- consume层返回一个ResultMsg类
1 | // 首页忘记密码 修改 (value = "修改个人密码", notes = "个人中心-修改个人密码") ("/editPasswordIndex") public ResultMsg<String> editPasswordIndex(@RequestParam("mobile") String mobile, @RequestParam("newPwd") String newPwd) throws Exception { if (StringUtils.isEmpty(newPwd)) throw new Exception("错误:新密码不能为空"); UserParam up = new UserParam(); up.setMobile(mobile); List<User> list = userService.getList(up).getList(); if (list.size()!=1)throw new Exception("错误:没有该用户或者该用户有误!"); User o = list.get(0); o.setPassword(HashKit.sha256(o.getUsername() + newPwd)); userService.edit(o); |
- ResultMsg类
1 |
|
- js
1 | forgetPhone2() { |
- html
1 | <div slot="footer" class="dialog1-footer" v-show="isShow2"> |