stanley-king 4 år sedan
förälder
incheckning
f71bf5151c
7 ändrade filer med 16 tillägg och 17 borttagningar
  1. 1 2
      app.js
  2. 1 1
      app.json
  3. 5 5
      config.js
  4. 3 3
      pages/index/index.js
  5. 3 2
      pages/login/login.wxml
  6. 2 2
      project.config.json
  7. 1 2
      utils/WxAuthor.js

+ 1 - 2
app.js

@@ -2,11 +2,10 @@
 import WxAuthor from './utils/WxAuthor'
 
 App({
-    onLaunch: function () {
+    onLaunch: function() {
         let self = this;
         // 登录
         new WxAuthor(self)
-
     },
     globalData: {
         userId: {

+ 1 - 1
app.json

@@ -23,7 +23,7 @@
   "window": {
     "backgroundTextStyle": "dark",
     "navigationBarBackgroundColor": "#2B2B2B",
-    "navigationBarTitleText": "熊猫美妆",
+    "navigationBarTitleText": "椰子充值",
     "navigationBarTextStyle": "white",
     "onReachBottomDistance": 200
   },

+ 5 - 5
config.js

@@ -1,7 +1,8 @@
-
 // let api = "https://passport.lrlz.com/mobile/index.php";
-let api = "http://192.168.1.200/mobile/index.php";
-function getReq(data, callback, method) {
+let api = "http://121.89.223.81/mobile/index.php";
+
+function getReq(data, callback, method) 
+{
   let options = {
     client_type: 'mini'
   }
@@ -21,7 +22,7 @@ function getReq(data, callback, method) {
 
   if (method == 'POST') {
     header = {
-      'content-type': 'application/x-www-form-urlencoded', // 数据转换成 query string 
+      'content-type': 'application/x-www-form-urlencoded', //数据转换成 query string 
       'Cookie': 'MPHPSESSID=' + session_id
     }
   }
@@ -42,7 +43,6 @@ function getReq(data, callback, method) {
             wx.reLaunch({
               url: "/pages/index/index"
             })
-
           } else if (res.cancel) {
             console.log('用户点击取消')
           }

+ 3 - 3
pages/index/index.js

@@ -37,8 +37,8 @@ Page({
   },
 
   onLoad: function () {
-    this.req_tabs(); // old
-    // this.getDatas(0)
+    // this.req_tabs(); // old
+    this.getDatas(0)
   },
   freeBonus() {
     if (this.data.daliy_bonus) {
@@ -60,7 +60,7 @@ Page({
     getReq({
       act: 'special',
       op: 'index',
-      special_id,
+      special_id: special_id,
       page: 10,
       curpage: 1,
       from: fromSource

+ 3 - 2
pages/login/login.wxml

@@ -2,6 +2,7 @@
   <view class="auth_text">
     <view>您暂未获取微信授权,将无法领取红包、加入购物车、下单等功能。点击“授权登录”后,您将使用全部功能。</view>
   </view>
-  <button style='margin-top:160rpx;width:82%;height: 92rpx;background: #2b2b2b;color: #fff;' open-type="getUserInfo"
-    bindgetuserinfo="userInfoHandler">授权登录</button>
+  <button style='margin-top:160rpx;width:82%;height: 92rpx;background: #2b2b2b;color: #fff;' 
+          open-type="getUserInfo"
+          bindgetuserinfo="userInfoHandler">授权登录</button>
 </view>

+ 2 - 2
project.config.json

@@ -24,12 +24,12 @@
 			"outputPath": ""
 		},
 		"useIsolateContext": true,
-		"useCompilerModule": false,
+		"useCompilerModule": true,
 		"userConfirmedUseCompilerModuleSwitch": false
 	},
 	"compileType": "miniprogram",
 	"libVersion": "2.11.2",
-	"appid": "wx41c4be947a99bc26",
+	"appid": "wx4139a76ccb1f74b3",
 	"projectname": "panda_small_%20routine",
 	"isGameTourist": false,
 	"simulatorType": "wechat",

+ 1 - 2
utils/WxAuthor.js

@@ -27,8 +27,7 @@ export default class WxAuthor {
         if (openid && unionid) {
           this.setId(openid, unionid)
           this.getSetting(false)
-        }
-        else {
+        } else {
           this.getSetting(true)
         }
       }