浏览代码

add request method on PresentRegister

StephenArk30 6 年之前
父节点
当前提交
e2c613f7f0

+ 12 - 1
sourcecode/h5app/vue/src/views/PresentRegister.vue

@@ -116,7 +116,18 @@
                     photo: this.photo
                 };
                 console.log(present);
-                this.$router.push('index');
+                BasicFunction.get_data("ajaxpostpresent", function (response) {
+                    console.log("------ Data Rcvd in PresentReg --------");
+                    console.log(response);
+                    if(response.ret === "10000"){
+                        // 不需要 设置 SessionID, 已经自动保存在jSessionID中
+                        this.$router.push('index');
+                    } else {
+                        // 注册失败的处理
+                        Toast.fail("上传失败,请检查网络");
+                    }
+                }, {});
+                // this.$router.push('index');
             },
             onReadPhoto(file) {
                 this.photo = file;

+ 12 - 1
sourcecode/h5app/vue/src/views/SecurityVerify.vue

@@ -176,7 +176,18 @@
                     photo: this.photo
                 };
                 console.log(user);
-                this.$router.push('presentRegister');
+                BasicFunction.get_data("ajaxregister?user=" + JSON.stringify(user), function (response) {
+                    console.log("------ Data Rcvd in Reg --------");
+                    console.log(response);
+                    if(response.ret === "10000"){
+                        // 不需要 设置 SessionID, 已经自动保存在jSessionID中
+                        this.$router.push('presentRegister');
+                    } else {
+                        // 注册失败的处理
+                        Toast.fail("注册失败,请检查网络");
+                    }
+                }, {});
+                // this.$router.push('presentRegister');
             },
             onReadPhoto(file) {
                 this.photo = file;

+ 1 - 11
sourcecode/h5app/vue/src/views/login.vue

@@ -97,17 +97,7 @@
                 // this.$router.push('index');
             },
             Register() {
-                BasicFunction.get_data("ajaxregister", function (response) {
-                    console.log("------ Data Rcvd in Reg --------");
-                    console.log(response);
-                    if(response.ret === "10000"){
-                        // 不需要 设置 SessionID, 已经自动保存在jSessionID中
-                        this.$router.push('verify');
-                    } else {
-                        // 注册失败的处理
-                        console.warn("注册失败");
-                    }
-                }, {u: this.phone, p: this.passWord,});
+                    this.$router.push('verify');
             },
             SendOTP() {
                 BasicFunction.get_data("ajaxsendotp", function (response) {