Browse Source

2.1.6增加添加小程序弹窗并修改弹窗位置

Limengbo 4 years ago
parent
commit
03389fc25e
7 changed files with 21 additions and 9 deletions
  1. BIN
      .DS_Store
  2. 1 1
      pages/index/index.js
  3. 4 1
      pages/index/index.wxml
  4. 16 7
      pages/index/index.wxss
  5. BIN
      static/.DS_Store
  6. BIN
      static/image/.DS_Store
  7. BIN
      static/image/close.png

BIN
.DS_Store


+ 1 - 1
pages/index/index.js

@@ -82,7 +82,7 @@ Page({
       title: "小学语文朗读配音", //标题
     },
     grade: wx.getStorageSync('grade'),
-    upgradeHide: app.globalData.upgradeHide
+    upgradeHide: false
   },
   jurisdiction: function () {
     //隐藏弹框

+ 4 - 1
pages/index/index.wxml

@@ -58,7 +58,10 @@
   <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 class="upgrade-main">
+    <image class="upgrade-icon" src="https://reader-wx.ai160.com/images/reader/upgrade_success.png"></image>
+    <image class="close" bindtap="hideUpgrade" src="../../static/image/close.png"></image>
+  </view> 
 </view>
 <shareDialog id="share-dialog" shareType='works' bindShareDialogClose="shareDialogClose" shareId="{{id}}" />
 

+ 16 - 7
pages/index/index.wxss

@@ -404,16 +404,25 @@
   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;
-  margin-top: -120rpx;
+.upgrade-main {
+  position: absolute;
+  right: 20rpx;
+  top: -10rpx;  
+}
+.upgrade-icon {
+  width: 443rpx;
+  height: 236rpx;
+}
+.close {
+  position: absolute;
+  left: 50%;
+  transform: translateX(-50%);
+  top: 260rpx;
+  width: 65rpx;
+  height: 65rpx;  
 }

BIN
static/.DS_Store


BIN
static/image/.DS_Store


BIN
static/image/close.png