chengjie пре 7 година
родитељ
комит
88a1db0ae6
3 измењених фајлова са 7 додато и 4 уклоњено
  1. 1 1
      app.js
  2. 5 2
      pages/main/index.js
  3. 1 1
      project.config.json

+ 1 - 1
app.js

@@ -12,7 +12,7 @@ App({
12
   },
12
   },
13
   globalData: {
13
   globalData: {
14
     Version: "1.0.0",
14
     Version: "1.0.0",
15
-    IsProduction: true,
15
+    IsProduction: false,
16
     ProgramID: 106,
16
     ProgramID: 106,
17
     AppID: "wx313a8f2c0741efe1",
17
     AppID: "wx313a8f2c0741efe1",
18
     ShareTitle:"赢在阅读起跑线",
18
     ShareTitle:"赢在阅读起跑线",

+ 5 - 2
pages/main/index.js

@@ -55,7 +55,6 @@ Page({
55
   },
55
   },
56
   getAccredit: function () {
56
   getAccredit: function () {
57
     if (!this.data.IsAccredit) {
57
     if (!this.data.IsAccredit) {
58
-
59
       var that = this;
58
       var that = this;
60
       wx.getSetting({
59
       wx.getSetting({
61
         success(res) {
60
         success(res) {
@@ -85,7 +84,7 @@ Page({
85
     wx.login({
84
     wx.login({
86
       success: function (res0) {
85
       success: function (res0) {
87
         wx.getUserInfo({
86
         wx.getUserInfo({
88
-          withCredentials: false,
87
+          withCredentials: true,
89
           success: function (res) {
88
           success: function (res) {
90
             app.globalData.userInfo = res.userInfo;
89
             app.globalData.userInfo = res.userInfo;
91
 
90
 
@@ -99,6 +98,8 @@ Page({
99
             });
98
             });
100
 
99
 
101
             app.globalData.userInfo.Code = res0.code;
100
             app.globalData.userInfo.Code = res0.code;
101
+            app.globalData.userInfo.iv = res.iv;
102
+            app.globalData.userInfo.encryptedData = res.encryptedData;
102
             that.login(app.globalData.userInfo);
103
             that.login(app.globalData.userInfo);
103
 
104
 
104
           },
105
           },
@@ -142,6 +143,8 @@ Page({
142
         UserSource: app.globalData.userSource,
143
         UserSource: app.globalData.userSource,
143
         SourceID: app.globalData.SourceID,
144
         SourceID: app.globalData.SourceID,
144
         LastUserSource: app.globalData.userSource,
145
         LastUserSource: app.globalData.userSource,
146
+        encryptedData: param.encryptedData,
147
+        iv: param.iv,
145
       }, function (data) {
148
       }, function (data) {
146
 
149
 
147
       });
150
       });

+ 1 - 1
project.config.json

@@ -1,7 +1,7 @@
1
 {
1
 {
2
 	"description": "项目配置文件。",
2
 	"description": "项目配置文件。",
3
 	"setting": {
3
 	"setting": {
4
-		"urlCheck": true,
4
+		"urlCheck": false,
5
 		"es6": true,
5
 		"es6": true,
6
 		"postcss": true,
6
 		"postcss": true,
7
 		"minified": true,
7
 		"minified": true,