Browse Source

新版本增加升级成功弹窗

Limengbo 3 years ago
parent
commit
9c08943410
6 changed files with 33 additions and 5 deletions
  1. 3 1
      app.js
  2. 2 1
      component/video-swiper/index.wxss
  3. 8 2
      pages/index/index.js
  4. 3 0
      pages/index/index.wxml
  5. 16 0
      pages/index/index.wxss
  6. 1 1
      project.config.json

+ 3 - 1
app.js

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

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

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

+ 8 - 2
pages/index/index.js

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

+ 3 - 0
pages/index/index.wxml

@@ -57,6 +57,9 @@
 <view hidden="{{hide}}">
 <view hidden="{{hide}}">
   <Dialog bindmyevent="jurisdiction" />
   <Dialog bindmyevent="jurisdiction" />
 </view>
 </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}}" />
 <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>
  <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{
 .change_grade .change_brage_wrapper .change_item_blank{
   background: #ffffff !important;
   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,
 		"preloadBackgroundData": false,
 		"minified": true,
 		"minified": true,
 		"newFeature": true,
 		"newFeature": true,
-		"coverView": true,
 		"autoAudits": false,
 		"autoAudits": false,
+		"coverView": true,
 		"showShadowRootInWxmlPanel": true,
 		"showShadowRootInWxmlPanel": true,
 		"scopeDataCheck": false,
 		"scopeDataCheck": false,
 		"checkInvalidKey": true,
 		"checkInvalidKey": true,