chengjie 6 年之前
父節點
當前提交
87ed62b134
共有 7 個文件被更改,包括 65 次插入3 次删除
  1. 16 1
      app.js
  2. 2 1
      app.json
  3. 9 0
      pages/main/default.js
  4. 6 1
      pages/main/default.wxml
  5. 23 0
      pages/main/default.wxss
  6. 2 0
      project.config.json
  7. 7 0
      sitemap.json

+ 16 - 1
app.js

@@ -12,9 +12,21 @@ App({
12
   },
12
   },
13
   getSystemInfo: function () {
13
   getSystemInfo: function () {
14
     this.globalData.systemInfo = wx.getSystemInfoSync();
14
     this.globalData.systemInfo = wx.getSystemInfoSync();
15
+    if (this.globalData.systemInfo.system.indexOf("Android") >= 0) {
16
+      this.globalData.IsIOS = false;
17
+      this.globalData.IsAndroid = true;
18
+    }
19
+    else if (this.globalData.systemInfo.system.indexOf("iOS") >= 0) {
20
+      this.globalData.IsIOS = true;
21
+      this.globalData.IsAndroid = false;
22
+    }
23
+
24
+    if (this.globalData.systemInfo.model.indexOf("iPad") >= 0) {
25
+      this.globalData.IsIPad = true;
26
+    }
15
   },
27
   },
16
   globalData: {
28
   globalData: {
17
-    version: "1.1.6",
29
+    version: "1.1.7",
18
     IsProduction: true,
30
     IsProduction: true,
19
     ProgramID: 105,
31
     ProgramID: 105,
20
     AppID: "wx1fef080f74481cbd",
32
     AppID: "wx1fef080f74481cbd",
@@ -40,5 +52,8 @@ App({
40
     NewUserNumberMax: 6,//邀请新用户最大值
52
     NewUserNumberMax: 6,//邀请新用户最大值
41
     IsSaveCustom: false,//是否保存了定制
53
     IsSaveCustom: false,//是否保存了定制
42
     IsRefresh: false,
54
     IsRefresh: false,
55
+    IsIOS: true,
56
+    IsAndroid: false,
57
+    IsIPad: false,
43
   }
58
   }
44
 })
59
 })

+ 2 - 1
app.json

@@ -59,5 +59,6 @@
59
         "package4"
59
         "package4"
60
       ]
60
       ]
61
     }
61
     }
62
-  }
62
+  },
63
+  "sitemapLocation": "sitemap.json"
63
 }
64
 }

+ 9 - 0
pages/main/default.js

@@ -15,6 +15,7 @@ Page({
15
     IsMember: 1,
15
     IsMember: 1,
16
     AvatarUrl: "",
16
     AvatarUrl: "",
17
     IsAccredit: false,
17
     IsAccredit: false,
18
+    IsExit: false,
18
   },
19
   },
19
   onLoad: function () {
20
   onLoad: function () {
20
     var that = this;
21
     var that = this;
@@ -30,6 +31,14 @@ Page({
30
       }
31
       }
31
     });
32
     });
32
 
33
 
34
+    if (app.globalData.IsIPad) {
35
+      if (app.globalData.systemInfo.windowHeight < app.globalData.systemInfo.windowWidth) {
36
+        this.setData({
37
+          IsExit: true,
38
+        });
39
+      }
40
+    }
41
+
33
   },
42
   },
34
   onUnload: function () {
43
   onUnload: function () {
35
 
44
 

+ 6 - 1
pages/main/default.wxml

@@ -125,4 +125,9 @@
125
 <image hidden="{{HelpHidden1}}" bindtap='closeHelp' class="Help_aside_homepage" src="../images/Help_aside_homepage.png" />
125
 <image hidden="{{HelpHidden1}}" bindtap='closeHelp' class="Help_aside_homepage" src="../images/Help_aside_homepage.png" />
126
 
126
 
127
 <audio hidden='true' id="myAudio"></audio>
127
 <audio hidden='true' id="myAudio"></audio>
128
-<canvas class='Canvas' canvas-id="MyCanvas"></canvas>
128
+<canvas class='Canvas' canvas-id="MyCanvas"></canvas>
129
+
130
+<view wx:if="{{IsExit}}" class="IsExitContainer container FlexColumn" style='height:{{Containnerheight}}rpx;'>
131
+  <view class='IsExitText'>请竖起屏幕再打开小程序</view>
132
+  <navigator class='isExit' open-type="exit" target="miniProgram">确认</navigator>
133
+</view>

+ 23 - 0
pages/main/default.wxss

@@ -466,4 +466,27 @@
466
   position: fixed;
466
   position: fixed;
467
   left:760rpx;
467
   left:760rpx;
468
   top:0rpx;
468
   top:0rpx;
469
+}
470
+
471
+
472
+.IsExitContainer{
473
+  background-color: #B9DC5D;
474
+  z-index: 100;
475
+  position: fixed;
476
+  top:0;
477
+}
478
+.IsExitText{
479
+  margin-top: 200rpx;
480
+  color:#1e1e1e;
481
+  font-size:36rpx;
482
+}
483
+.isExit{
484
+  border: 1rpx solid #1e1e1e;
485
+  color:#1e1e1e;
486
+  border-radius: 10rpx;
487
+  margin-top: 80rpx;
488
+  padding: 20rpx;
489
+  width:100rpx;
490
+  font-size:36rpx;
491
+  text-align: center;
469
 }
492
 }

+ 2 - 0
project.config.json

@@ -12,6 +12,8 @@
12
 	"appid": "wx1fef080f74481cbd",
12
 	"appid": "wx1fef080f74481cbd",
13
 	"projectname": "%E6%95%B0%E5%AD%A6%E8%AE%A1%E7%AE%97%E9%A2%98",
13
 	"projectname": "%E6%95%B0%E5%AD%A6%E8%AE%A1%E7%AE%97%E9%A2%98",
14
 	"isGameTourist": false,
14
 	"isGameTourist": false,
15
+	"simulatorType": "wechat",
16
+	"simulatorPluginLibVersion": {},
15
 	"condition": {
17
 	"condition": {
16
 		"search": {
18
 		"search": {
17
 			"current": -1,
19
 			"current": -1,

+ 7 - 0
sitemap.json

@@ -0,0 +1,7 @@
1
+{
2
+  "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3
+  "rules": [{
4
+  "action": "allow",
5
+  "page": "*"
6
+  }]
7
+}