Explorar o código

注册成功清除form

zs %!s(int64=2) %!d(string=hai) anos
pai
achega
b5d28faa8a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 })
             }
         }