Parcourir la source

授权支付调试

zhashaonan il y a 6 ans
Parent
commit
1a405647a0
4 fichiers modifiés avec 10 ajouts et 6 suppressions
  1. 6 3
      app.js
  2. 1 1
      config.js
  3. 2 2
      pages/index/index.js
  4. 1 0
      pages/login/login.js

+ 6 - 3
app.js

@@ -13,13 +13,15 @@ App({
           url: self.host,
           // data:{
           //   act:"login",
-          //   op:"ministart",
+          //   op:"iosstart",
           //   code: res.code,
           //   client_type:"ios"
           // },
           url: `https://api.weixin.qq.com/sns/jscode2session?appid=wxfdaeb25e38c4c47e&secret=e5b5055cbc608d10c6de0d877c221270&js_code=${res.code}&grant_type=authorization_code`,
           success:function(res){
-            // console.log(res);
+            // self.globalData.userId.openid = res.data.datas.openid;
+            // self.globalData.userId.unionid = res.data.datas.unionid;
+
             self.globalData.userId.openid = res.data.openid;
             self.globalData.userId.unionid = res.data.unionid;
             // 获取用户信息
@@ -37,6 +39,7 @@ App({
                           data: {
                             user_info: userInfo,
                             act: "login",
+                            // op: "wxauthen",
                             op: "wxauthor",
                             client_type: "ios"
                           },
@@ -79,11 +82,11 @@ App({
                             data: {
                               user_info: userInfo,
                               act: "login",
+                              // op: "wxauthen",
                               op: "wxauthor",
                               client_type: "ios"
                             },
                             success: function (res) {
-                              // console.log(res);
                               // console.log(res.data.datas.HPHPSESSID)
                               wx.setStorageSync('session_id', res.data.datas.HPHPSESSID);
                               if (res.statusCode == 200) {

+ 1 - 1
config.js

@@ -1,7 +1,7 @@
 
 let api = "https://passport.lrlz.com/mobile/index.php";
 // let api = "http://121.43.114.153/mobile/index.php"
-// let api = "http://192.168.0.131/mobile/index.php";
+// let api = "http://192.168.0.200/mobile/index.php";
 
 
 function getReq(data, callback, fail) {

+ 2 - 2
pages/index/index.js

@@ -32,8 +32,8 @@ Page({
       op: 'tabs'
     }, function (res) {
       if (res.code == 200) {
-        // self.getDatas(res.datas.tabs[0].special_id);
-        self.getDatas(1364);
+        self.getDatas(res.datas.tabs[0].special_id);
+        // self.getDatas(1364);
         self.setData({
           tabs: res.datas.tabs
         });

+ 1 - 0
pages/login/login.js

@@ -69,6 +69,7 @@ Page({
         data: {
           user_info: userInfo,
           act: "login",
+          // op: "wxauthen",
           op: "wxauthor",
           client_type: "ios"
         },