ソースを参照

注册成功清除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 })
             }
         }