HuaJingwen 7 年之前
父節點
當前提交
f3a9d2be8d
共有 3 個文件被更改,包括 13 次插入9 次删除
  1. 7 3
      pages/getPhone/getPhone.js
  2. 5 5
      pages/signup/signup.js
  3. 1 1
      project.config.json

+ 7 - 3
pages/getPhone/getPhone.js

@@ -6,10 +6,14 @@ Page({
6 6
     preid: ''
7 7
   },
8 8
   onLoad: function (options) {
9
-    console.log(options.from);
9
+    // console.log(options.from);
10 10
     var that = this;
11
-    that.setData({from: options.from, preid: options.preid});
12
-    // console.log(that.data.preid);
11
+    if (options.preid) {
12
+        that.setData({from: options.from, preid: options.preid});
13
+    }else{
14
+        that.setData({from: options.from});
15
+    }
16
+    // console.log(that.data.from, options.preid);
13 17
   },
14 18
   getPhoneNumber: function(e) {
15 19
     var that = this;

+ 5 - 5
pages/signup/signup.js

@@ -15,7 +15,7 @@ Page({
15 15
   onLoad: function (options) {
16 16
     var from = options.from, preid = options.preid || 0
17 17
     this.setData({from: from, preid: preid})
18
-    // console.log(from, preid);
18
+    console.log(from, preid);
19 19
   },
20 20
   onReady: function () {
21 21
 
@@ -145,18 +145,18 @@ Page({
145 145
               },
146 146
               success: function (res) {
147 147
                 if (res.data.errno == '0') {
148
-                  wx.setStorage({key:"tel", data: value})
148
+                  wx.setStorage({key:"tel", data: phone})
149 149
                   if (from === 'mine') {
150 150
                     wx.redirectTo({
151
-                      url: '/pages/application/application?tel=' + value
151
+                      url: '/pages/application/application?tel=' + phone
152 152
                     })
153 153
                   }else if(from === 'mineFeedback'){
154 154
                       wx.redirectTo({
155
-                        url: '/pages/feedback/feedback?tel=' + value
155
+                        url: '/pages/feedback/feedback?tel=' + phone
156 156
                       })
157 157
                   }else{
158 158
                       wx.redirectTo({
159
-                        url: '/pages/getIt/getIt?from='+ from +'&preid='+ preid +'&tel=' + value
159
+                        url: '/pages/getIt/getIt?from='+ from +'&preid='+ preid +'&tel=' + phone
160 160
                       })
161 161
                   }
162 162
                 }else{

+ 1 - 1
project.config.json

@@ -24,7 +24,7 @@
24 24
 			"list": []
25 25
 		},
26 26
 		"miniprogram": {
27
-			"current": 1,
27
+			"current": -1,
28 28
 			"list": [
29 29
 				{
30 30
 					"id": -1,