HuaJingwen 7 years ago
parent
commit
f3a9d2be8d
3 changed files with 13 additions and 9 deletions
  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
     preid: ''
6
     preid: ''
7
   },
7
   },
8
   onLoad: function (options) {
8
   onLoad: function (options) {
9
-    console.log(options.from);
9
+    // console.log(options.from);
10
     var that = this;
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
   getPhoneNumber: function(e) {
18
   getPhoneNumber: function(e) {
15
     var that = this;
19
     var that = this;

+ 5 - 5
pages/signup/signup.js

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

+ 1 - 1
project.config.json

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