chengjie 6 år sedan
förälder
incheckning
e2dbafbb26
8 ändrade filer med 74 tillägg och 10 borttagningar
  1. 16 1
      app.js
  2. 4 3
      app.json
  3. 8 4
      pages/main/detail.js
  4. 9 2
      pages/main/index.js
  5. 6 0
      pages/main/index.wxml
  6. 22 0
      pages/main/index.wxss
  7. 2 0
      project.config.json
  8. 7 0
      sitemap.json

+ 16 - 1
app.js

@@ -9,9 +9,21 @@ App({
9 9
   },
10 10
   getSystemInfo: function () {
11 11
     this.globalData.systemInfo = wx.getSystemInfoSync();
12
+    if (this.globalData.systemInfo.system.indexOf("Android") >= 0) {
13
+      this.globalData.IsIOS = false;
14
+      this.globalData.IsAndroid = true;
15
+    }
16
+    else if (this.globalData.systemInfo.system.indexOf("iOS") >= 0) {
17
+      this.globalData.IsIOS = true;
18
+      this.globalData.IsAndroid = false;
19
+    }
20
+
21
+    if (this.globalData.systemInfo.model.indexOf("iPad") >= 0) {
22
+      this.globalData.IsIPad = true;
23
+    }
12 24
   },
13 25
   globalData: {
14
-    Version: "1.2.5",
26
+    Version: "1.2.7",
15 27
     IsProduction: true,
16 28
     ProgramID: 106,
17 29
     AppID: "wx313a8f2c0741efe1",
@@ -37,6 +49,9 @@ App({
37 49
     BaiduToken:"",//百度开发平台token
38 50
     IsShow: 0,
39 51
     IsLocked: 0,
52
+    IsIOS: true,
53
+    IsAndroid: false,
54
+    IsIPad: false,
40 55
     NewUserNumberMax:6,//邀请新用户最大值
41 56
     IsSaveCustom:false,//是否保存了定制
42 57
     goto:"",//用于服务直达的跳转

+ 4 - 3
app.json

@@ -14,9 +14,9 @@
14 14
   "window": {
15 15
     "backgroundTextStyle": "light",
16 16
     "navigationBarBackgroundColor": "#F5E2BE",
17
-    "navigationBarTitleText":"语文识字",
17
+    "navigationBarTitleText": "语文识字",
18 18
     "navigationBarTextStyle": "black",
19
-    "backgroundColor": "#F5E2BE"   
19
+    "backgroundColor": "#F5E2BE"
20 20
   },
21 21
   "navigateToMiniProgramAppIdList": [
22 22
     "wxa5441bbf344692ba",
@@ -58,5 +58,6 @@
58 58
         "package4"
59 59
       ]
60 60
     }
61
-  }
61
+  },
62
+  "sitemapLocation": "sitemap.json"
62 63
 }

+ 8 - 4
pages/main/detail.js

@@ -373,15 +373,19 @@ Page({
373 373
 
374 374
           var Name = this.data.List[this.data.CurrentIndex].Name;
375 375
           if (!this.data.IsAudioLengthChecked || (e && e.currentTarget.dataset.pinyin)) {
376
-            url = url.replace("[word]", Name + pinyinStr);
376
+            url = url.replace("[word]", e.currentTarget.dataset.pinyin);
377 377
             url = url.replace("spd=3", "spd=1");
378 378
           }
379 379
           else {
380 380
             var CombineWords = this.data.List[this.data.CurrentIndex].CombineWords;
381
-            if (CombineWords)
381
+            if (CombineWords && CombineWords.length>0){
382 382
               CombineWords = "," + CombineWords.replace(Name, Name + pinyinStr) + "的(de5)" + Name;
383
-
384
-            url = url.replace("[word]", Name + pinyinStr + CombineWords + pinyinStr);
383
+              url = url.replace("[word]", Name + pinyinStr + CombineWords + pinyinStr);
384
+            }
385
+            else{
386
+              url = url.replace("[word]", pinyinItem);
387
+              url = url.replace("spd=3", "spd=1");
388
+            }
385 389
           }
386 390
         }
387 391
       }

+ 9 - 2
pages/main/index.js

@@ -22,8 +22,7 @@ Page({
22 22
     NavClass2: "nav2",
23 23
     IsRemind: false,
24 24
     IsMemberForeverRemind: 0,
25
-  },
26
-  onReady: function (e) {
25
+    IsExit: false,
27 26
   },
28 27
   onLoad: function (options) {
29 28
     //app.globalData.userInfo.UserID=5;
@@ -50,6 +49,14 @@ Page({
50 49
     })
51 50
 
52 51
     common.getStorageValue(this, "IsRemind", true, function () { });
52
+    
53
+    if (app.globalData.IsIPad) {
54
+      if (app.globalData.systemInfo.windowHeight < app.globalData.systemInfo.windowWidth) {
55
+        this.setData({
56
+          IsExit: true,
57
+        });
58
+      }
59
+    }
53 60
   },
54 61
   onShow: function () {
55 62
     this.setData({

+ 6 - 0
pages/main/index.wxml

@@ -148,4 +148,10 @@
148 148
     <image src='../images/home_banner.png' class="home_banner" bindtap='switchProgram' data-appid='{{ListProgram[0].appId}}' data-path='{{ListProgram[0].path}}' />
149 149
   </view>
150 150
   
151
+</view>
152
+
153
+
154
+<view wx:if="{{IsExit}}" class="IsExitContainer container FlexColumn" style='height:{{Height}}rpx;'>
155
+  <view class='IsExitText'>请竖起屏幕再打开小程序</view>
156
+  <navigator class='isExit' open-type="exit" target="miniProgram">确认</navigator>
151 157
 </view>

+ 22 - 0
pages/main/index.wxss

@@ -358,3 +358,25 @@
358 358
 }
359 359
 
360 360
 
361
+
362
+.IsExitContainer{
363
+  background-color: #F5E2BE;
364
+  z-index: 100;
365
+  position: fixed;
366
+  top:0;
367
+}
368
+.IsExitText{
369
+  margin-top: 200rpx;
370
+  color:#1e1e1e;
371
+  font-size:36rpx;
372
+}
373
+.isExit{
374
+  border: 1rpx solid #1e1e1e;
375
+  color:#1e1e1e;
376
+  border-radius: 10rpx;
377
+  margin-top: 80rpx;
378
+  padding: 20rpx;
379
+  width:100rpx;
380
+  font-size:36rpx;
381
+  text-align: center;
382
+}

+ 2 - 0
project.config.json

@@ -12,6 +12,8 @@
12 12
 	"appid": "wx313a8f2c0741efe1",
13 13
 	"projectname": "%E8%AF%86%E5%AD%97",
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
+}