Ejemplo n.º 1
0
    def post(self, card_id):
        mobile = self.get_argument("mobile", "")
        department = self.get_argument("department", "")
        position = self.get_argument("position", "")

        auth_dao.update_user_by_card_id(card_id, {"department": department, "position": position, "mobile": mobile})
        self.redirect("/admin/user_list/")
Ejemplo n.º 2
0
Archivo: views.py Proyecto: lpcpp/Benz
    def post(self):
        check_user = self.get_argument('check_user', '')
        card_id = self.get_argument('card_id', '')
        if check_user == 'pass':
            status = auth_enums.USER_STATUS_NORMAL
        elif check_user == 'active':
            status = auth_enums.USER_STATUS_NORMAL
        elif check_user == 'nopass':
            status = auth_enums.USER_STATUS_NOPASS
        elif check_user == 'forbid':
            status = auth_enums.USER_STATUS_FORBID
        elif check_user == 'delete':
            status = auth_enums.USER_STATUS_DELETE
        else:
            self.write(
                json.dumps({
                    'status': 'fail',
                    'err_msg': 'args mistake'
                }))
            return

        print 1111, card_id
        auth_dao.update_user_by_card_id(card_id, {'status': status})
        self.write(json.dumps({'status': 'ok'}))
        return
Ejemplo n.º 3
0
    def post(self, card_id):
        department = self.get_argument('department', '')
        position = self.get_argument('position', '')
        mobile = self.get_argument('mobile', '')

        auth_dao.update_user_by_card_id(card_id, {'department': department, 'position': position, 'mobile': mobile})
        self.redirect('/admin/user_list/')
Ejemplo n.º 4
0
    def post(self):
        login_user = self.get_current_user()
        user = dao.get_user(login_user)
        mobile = self.get_argument("mobile", "")
        emergency_contact = self.get_argument("emergency_contact", "")

        dao.update_user_by_card_id(user.card_id, {"mobile": mobile, "emergency_contact": emergency_contact})
        self.redirect("/member/")
Ejemplo n.º 5
0
    def post(self):
        user = self.get_current_user()
        user = dao.get_user(user)
        mobile = self.get_argument('mobile')
        emergency_contact = self.get_argument('emergency_contact')

        dao.update_user_by_card_id(user.card_id, {'mobile': mobile, 'emergency_contact': emergency_contact})
        self.redirect('/member/')
Ejemplo n.º 6
0
    def post(self, card_id):
        mobile = self.get_argument("mobile", "")
        department = self.get_argument("department", "")
        position = self.get_argument("position", "")

        auth_dao.update_user_by_card_id(card_id, {
            "department": department,
            "position": position,
            "mobile": mobile
        })
        self.redirect("/admin/user_list/")
Ejemplo n.º 7
0
Archivo: views.py Proyecto: lpcpp/Benz
    def post(self, card_id):
        department = self.get_argument('department', '')
        position = self.get_argument('position', '')
        mobile = self.get_argument('mobile', '')

        auth_dao.update_user_by_card_id(card_id, {
            'department': department,
            'position': position,
            'mobile': mobile
        })
        self.redirect('/admin/user_list/')
Ejemplo n.º 8
0
    def post(self):
        login_user = self.get_current_user()
        user = dao.get_user(login_user)
        mobile = self.get_argument("mobile", "")
        emergency_contact = self.get_argument("emergency_contact", "")

        dao.update_user_by_card_id(user.card_id, {
            "mobile": mobile,
            "emergency_contact": emergency_contact
        })
        self.redirect("/member/")
Ejemplo n.º 9
0
    def post(self):
        user = self.get_current_user()
        user = dao.get_user(user)
        mobile = self.get_argument('mobile')
        emergency_contact = self.get_argument('emergency_contact')

        dao.update_user_by_card_id(user.card_id, {
            'mobile': mobile,
            'emergency_contact': emergency_contact
        })
        self.redirect('/member/')
Ejemplo n.º 10
0
    def post(self):
        check_user = self.get_argument("check_user", "")
        card_id = self.get_argument("card_id", "")
        if check_user == "pass":
            status = auth_enums.USER_STATUS_NORMAL
        elif check_user == "active":
            status = auth_enums.USER_STATUS_NORMAL
        elif check_user == "nopass":
            status = auth_enums.USER_STATUS_NOPASS
        elif check_user == "forbid":
            status = auth_enums.USER_STATUS_FORBID
        elif check_user == 'delete':
            status = auth_enums.USER_STATUS_DELETE
        else:
            self.write(json.dumps({"status": "faile", "err_msg": u"参数错误"}))
            return

        auth_dao.update_user_by_card_id(card_id, {'status': status})
        self.write(json.dumps({"status": "ok"}))
        return
Ejemplo n.º 11
0
    def post(self):
        check_user = self.get_argument("check_user", "")
        card_id = self.get_argument("card_id", "")
        if check_user == "pass":
            status = auth_enums.USER_STATUS_NORMAL
        elif check_user == "active":
            status = auth_enums.USER_STATUS_NORMAL
        elif check_user == "nopass":
            status = auth_enums.USER_STATUS_NOPASS
        elif check_user == "forbid":
            status = auth_enums.USER_STATUS_FORBID
        elif check_user == 'delete':
            status = auth_enums.USER_STATUS_DELETE
        else:
            self.write(json.dumps({"status": "faile", "err_msg": u"参数错误"}))
            return

        auth_dao.update_user_by_card_id(card_id, {'status': status})
        self.write(json.dumps({"status": "ok"}))
        return
Ejemplo n.º 12
0
    def post(self):
        check_user = self.get_argument('check_user', '')
        card_id = self.get_argument('card_id', '')
        if check_user == 'pass':
            status = auth_enums.USER_STATUS_NORMAL
        elif check_user == 'active':
            status = auth_enums.USER_STATUS_NORMAL
        elif check_user == 'nopass':
            status = auth_enums.USER_STATUS_NOPASS
        elif check_user == 'forbid':
            status = auth_enums.USER_STATUS_FORBID
        elif check_user == 'delete':
            status = auth_enums.USER_STATUS_DELETE
        else:
            self.write(json.dumps({'status': 'fail', 'err_msg': 'args mistake'}))
            return

        print 1111, card_id
        auth_dao.update_user_by_card_id(card_id, {'status': status})
        self.write(json.dumps({'status': 'ok'}))
        return