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 13
   getSystemInfo: function () {
14 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 28
   globalData: {
17
-    version: "1.1.6",
29
+    version: "1.1.7",
18 30
     IsProduction: true,
19 31
     ProgramID: 105,
20 32
     AppID: "wx1fef080f74481cbd",
@@ -40,5 +52,8 @@ App({
40 52
     NewUserNumberMax: 6,//邀请新用户最大值
41 53
     IsSaveCustom: false,//是否保存了定制
42 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 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 15
     IsMember: 1,
16 16
     AvatarUrl: "",
17 17
     IsAccredit: false,
18
+    IsExit: false,
18 19
   },
19 20
   onLoad: function () {
20 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 43
   onUnload: function () {
35 44
 

+ 6 - 1
pages/main/default.wxml

@@ -125,4 +125,9 @@
125 125
 <image hidden="{{HelpHidden1}}" bindtap='closeHelp' class="Help_aside_homepage" src="../images/Help_aside_homepage.png" />
126 126
 
127 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 466
   position: fixed;
467 467
   left:760rpx;
468 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 12
 	"appid": "wx1fef080f74481cbd",
13 13
 	"projectname": "%E6%95%B0%E5%AD%A6%E8%AE%A1%E7%AE%97%E9%A2%98",
14 14
 	"isGameTourist": false,
15
+	"simulatorType": "wechat",
16
+	"simulatorPluginLibVersion": {},
15 17
 	"condition": {
16 18
 		"search": {
17 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
+}