浏览代码

修改注册

zs 3 年之前
父节点
当前提交
619a1a1f1e
共有 1 个文件被更改,包括 17 次插入18 次删除
  1. 17 18
      pages/register/index.js

+ 17 - 18
pages/register/index.js

@@ -47,24 +47,23 @@ Page({
       if (params.password !== params.is_password) {
         wx.showToast({ title: '密码输入不一致', duration: 2000, icon: 'error', })
       } else {
-        console.log(params);
-        // wx.request({
-        //   url: `${app.globalData.publicUrl}/courtAdmin/api/user`, //接口地址
-        //   method: 'post',
-        //   data: params,
-        //   success(res) {
-        //     if (res.data.errcode == 0) {
-        //       wx.showToast({
-        //         title: '注册账号成功',
-        //         duration: 2000,
-        //         icon: 'success',
-        //         success: (res) => { that.back() }
-        //       })
-        //     } else {
-        //       wx.showToast({ title: res.data.errmsg, icon: 'error', duration: 2000 })
-        //     }
-        //   }
-        // })
+        wx.request({
+          url: `${app.globalData.publicUrl}/courtAdmin/api/user`, //接口地址
+          method: 'post',
+          data: params,
+          success(res) {
+            if (res.data.errcode == 0) {
+              wx.showToast({
+                title: '注册账号成功',
+                duration: 2000,
+                icon: 'success',
+                success: (res) => { that.back() }
+              })
+            } else {
+              wx.showToast({ title: res.data.errmsg, icon: 'error', duration: 2000 })
+            }
+          }
+        })
       }
     }
   },