|
@@ -98,8 +98,6 @@ class PcTest(View):
|
|
|
return self.initPass(request_dict, userID, response)
|
|
|
elif operation == 'staff/updatePass':
|
|
|
return self.updatePass(request_dict, userID, response)
|
|
|
- elif operation == 'staff/updatePass':
|
|
|
- return self.updatePass(request_dict, userID, response)
|
|
|
else:
|
|
|
return response.json(404)
|
|
|
|
|
@@ -403,25 +401,25 @@ class PcTest(View):
|
|
|
if newpass1 != newpass2:
|
|
|
return response.json(10,'两次密码不相同,请重新输入')
|
|
|
|
|
|
- user_list.update(password='newpass2')
|
|
|
+ user_list.update(password=newpass1)
|
|
|
|
|
|
return response.json(0)
|
|
|
|
|
|
- def updatePass(self, request_dict, userID, response):
|
|
|
-
|
|
|
- id = request_dict.get('id', None)
|
|
|
- password = request_dict.get('password', None)
|
|
|
- param_flag = CommonService.get_param_flag(
|
|
|
- data=[id,password])
|
|
|
- if param_flag is not True:
|
|
|
- return response.json(444)
|
|
|
-
|
|
|
- # 判断员工与岗位是否存在,员工存在返回174
|
|
|
- user_list = PctestuserModel.objects.filter(id=id)
|
|
|
- if user_list.exists():
|
|
|
- user_list.update(password=password)
|
|
|
-
|
|
|
- return response.json(0)
|
|
|
+ # def updatePass(self, request_dict, userID, response):
|
|
|
+ #
|
|
|
+ # id = request_dict.get('id', None)
|
|
|
+ # password = request_dict.get('password', None)
|
|
|
+ # param_flag = CommonService.get_param_flag(
|
|
|
+ # data=[id,password])
|
|
|
+ # if param_flag is not True:
|
|
|
+ # return response.json(444)
|
|
|
+ #
|
|
|
+ # # 判断员工与岗位是否存在,员工存在返回174
|
|
|
+ # user_list = PctestuserModel.objects.filter(id=id)
|
|
|
+ # if user_list.exists():
|
|
|
+ # user_list.update(password=password)
|
|
|
+ #
|
|
|
+ # return response.json(0)
|
|
|
|
|
|
|
|
|
|