소스 검색

注册成功清除form

zs 1 년 전
부모
커밋
b5d28faa8a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      pagesCommon/login/index.js

+ 1 - 1
pagesCommon/login/index.js

@@ -55,7 +55,7 @@ Page({
                 const res = await app.$api('user', 'POST', params);
                 if (res.errcode === 0) {
                     wx.showToast({ title: `账号注册成功`, icon: 'success', duration: 2000 }) //登录成功提示
-                    that.setData({ current: 1 })
+                    that.setData({ current: 1, form: {} })
                 } else wx.showToast({ title: res.errmsg, icon: 'none', duration: 2000 })
             }
         }