Kaynağa Gözat

新版本增加升级成功弹窗

Limengbo 3 yıl önce
ebeveyn
işleme
9c08943410

+ 3 - 1
app.js

@@ -8,13 +8,15 @@ App({
   onLaunch: function (options) {
     // 判断设备是否为 iPhone X
     this.checkIsIPhoneX()
+    options.referrerInfo.extraData && (this.globalData.upgradeHide = options.referrerInfo.extraData.upgrade)
   },
   globalData: {
     isIPX: false, // 当前设备是否为 iPhone X
     isIOS: false, // 判断设备是否为苹果
     userInfo: null,
     statusBarHeight: wx.getSystemInfoSync()['statusBarHeight'],
-    userGrade: '二年级'
+    userGrade: '二年级',
+    upgradeHide: true
   },
   checkIsIPhoneX: function () {
     const self = this

+ 2 - 1
component/video-swiper/index.wxss

@@ -38,11 +38,12 @@
   top: 0;
 }
 .swiper_container .swiper_item .head_box .user_box {
-  width: 378rpx;
+  width: 360rpx;
   height: 100%;
   display: flex;
   align-items: center;
   position: relative;
+  overflow: hidden;
 }
 .swiper_container .swiper_item .head_box .user_box .avatar {
   width: 80rpx;

+ 8 - 2
pages/index/index.js

@@ -81,8 +81,8 @@ Page({
       isshowbtn: true, //是否显示按钮
       title: "小学语文朗读配音", //标题
     },
-    grade: wx.getStorageSync('grade')
-
+    grade: wx.getStorageSync('grade'),
+    upgradeHide: app.globalData.upgradeHide
   },
   jurisdiction: function () {
     //隐藏弹框
@@ -92,6 +92,12 @@ Page({
     //登录页信息
     this.updateData(0)
   },
+  // 隐藏升级弹窗
+  hideUpgrade() {
+    this.setData({
+      upgradeHide: true
+    })
+  },
   //tab点击
   switcher: function ({
     currentTarget

+ 3 - 0
pages/index/index.wxml

@@ -57,6 +57,9 @@
 <view hidden="{{hide}}">
   <Dialog bindmyevent="jurisdiction" />
 </view>
+<view class="upgrade" hidden="{{upgradeHide}}">
+  <image class="upgrade-icon" bindtap="hideUpgrade" src="https://reader-wx.ai160.com/images/reader/upgrade_success.png"></image>
+</view>
 <shareDialog id="share-dialog" shareType='works' bindShareDialogClose="shareDialogClose" shareId="{{id}}" />
 
  <canvas canvas-id="myCanvas" style="width:300px; height: 525px; position: absolute; left: -999rpx; top: -9999rpx;"></canvas>

+ 16 - 0
pages/index/index.wxss

@@ -399,4 +399,20 @@
 
 .change_grade .change_brage_wrapper .change_item_blank{
   background: #ffffff !important;
+}
+.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 image {
+  width: 487rpx;
+  height: 665rpx;
 }

+ 1 - 1
project.config.json

@@ -10,8 +10,8 @@
 		"preloadBackgroundData": false,
 		"minified": true,
 		"newFeature": true,
-		"coverView": true,
 		"autoAudits": false,
+		"coverView": true,
 		"showShadowRootInWxmlPanel": true,
 		"scopeDataCheck": false,
 		"checkInvalidKey": true,