Kaynağa Gözat

小学课文朗读2.34版本新增升级弹窗

Limengbo 3 yıl önce
ebeveyn
işleme
730b45f64d

+ 2 - 1
app.json

@@ -35,5 +35,6 @@
     "onReachBottomDistance": 50,
     "enablePullDownRefresh": true
   },
-  "debug": false
+  "debug": false,
+  "sitemapLocation": "sitemap.json"
 }

+ 23 - 1
pages/index/index.js

@@ -66,7 +66,8 @@ Page({
     ifHaveMore: true,
     indexSignDialog: false,
     indexMissionDialog: false,
-    unfinishedCount: 0
+    unfinishedCount: 0,
+    upgradeHide: false
   },
   jurisdiction: function() {
     //隐藏弹框
@@ -76,6 +77,27 @@ Page({
     //登录页信息
     this.onShow();
   },
+  closeUpgrade: function () {
+    //隐藏弹框
+    this.setData({
+      upgradeHide: true
+    })
+  },
+  goUpgrade: function () {
+    wx.navigateToMiniProgram({
+      appId: 'wx8961a3e5512f307c',
+      extraData: {
+        upgrade: false
+      },
+      envVersion: 'develop',
+      success (res) {
+        console.log('成功')
+      },
+      fail (error) {
+        console.log('失败')
+      }
+    })
+  },
   //tab点击
   switcher: function({
     currentTarget

+ 6 - 0
pages/index/index.wxml

@@ -42,4 +42,10 @@
     <view class="index-dialog-text">还有<text class="red-text">{{unfinishedCount}}</text>个小红花任务哦</view>
     <view class="index-dialog-btn" >查看任务</view>
   </view>
+</view>
+<view class="upgrade" hidden="{{upgradeHide}}">
+  <view class="upgrade-main">
+    <image class="close" bindtap="closeUpgrade" src="../../static/image/close.png"></image>
+    <image class="upgrade-icon" bindtap="goUpgrade" src="https://reader-wx.ai160.com/images/reader/upgrade.png"></image>
+  </view> 
 </view>

+ 28 - 0
pages/index/index.wxss

@@ -309,4 +309,32 @@ margin-left: 4rpx;
   position: absolute;
   background: rgba(0,0,0, 0);
   top: 0;
+}
+.upgrade {
+  position: fixed;
+  left: 0;
+  top: 0;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 100%;
+  height: 100%;
+  background: rgba(0, 0, 0, .6);
+  z-index:9999;
+}
+.upgrade-main {
+ position: relative;
+ width: 553rpx;
+ height: 727rpx;
+}
+.upgrade-main .close {
+  position: absolute;
+  right: 30rpx;
+  top: 32rpx;  
+  width: 65rpx;
+  height: 149rpx;
+}
+.upgrade-main .upgrade {
+  width: 553rpx;
+  height: 727rpx;
 }

+ 18 - 1
project.config.json

@@ -7,8 +7,23 @@
 		"urlCheck": true,
 		"es6": true,
 		"postcss": true,
+		"preloadBackgroundData": false,
 		"minified": true,
-		"newFeature": true
+		"newFeature": true,
+		"coverView": true,
+		"autoAudits": false,
+		"showShadowRootInWxmlPanel": true,
+		"scopeDataCheck": false,
+		"checkInvalidKey": true,
+		"checkSiteMap": true,
+		"uploadWithSourceMap": true,
+		"babelSetting": {
+			"ignore": [],
+			"disablePlugins": [],
+			"outputPath": ""
+		},
+		"useCompilerModule": false,
+		"userConfirmedUseCompilerModuleSwitch": false
 	},
 	"compileType": "miniprogram",
 	"libVersion": "2.3.2",
@@ -18,6 +33,8 @@
 		"hidedInDevtools": []
 	},
 	"isGameTourist": false,
+	"simulatorType": "wechat",
+	"simulatorPluginLibVersion": {},
 	"condition": {
 		"search": {
 			"current": -1,

+ 7 - 0
sitemap.json

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

BIN
static/image/close.png