bayi 1 year ago
parent
commit
1c7ddef245

+ 14 - 0
pages/invite/index.js

@@ -332,6 +332,20 @@ Page({
             }
             }
         })
         })
     },
     },
+    applyOr({
+        currentTarget
+    }) {
+        if (this.data.count < currentTarget.dataset.num) {
+            this.setData({
+                state: true,
+                modelInfo: {
+                    title: '加油!冲关!',
+                    text: '保持积极的态度和努力的精神, 相信您可以顺利完成后面的关卡',
+                    text2: '展示您的实力吧!🏆'
+                }
+            })
+        }
+    },
     closeMediaBox() {
     closeMediaBox() {
         this.setData({
         this.setData({
             state: false
             state: false

+ 3 - 2
pages/invite/index.less

@@ -6,7 +6,7 @@
     overflow: hidden;
     overflow: hidden;
 
 
     .ranking {
     .ranking {
-        position: fixed;
+        position: absolute;
         top: 164rpx;
         top: 164rpx;
         right: 20rpx;
         right: 20rpx;
         width: 100rpx;
         width: 100rpx;
@@ -15,7 +15,7 @@
     }
     }
 
 
     .strategy {
     .strategy {
-        position: fixed;
+        position: absolute;
         top: 290rpx;
         top: 290rpx;
         right: 10rpx;
         right: 10rpx;
         width: 120rpx;
         width: 120rpx;
@@ -45,6 +45,7 @@
                 position: absolute;
                 position: absolute;
                 width: 100%;
                 width: 100%;
                 bottom: 40rpx;
                 bottom: 40rpx;
+                font-weight: bold;
                 text-align: center;
                 text-align: center;
                 font-size: 26rpx;
                 font-size: 26rpx;
                 color: #FFFFFF;
                 color: #FFFFFF;

+ 1 - 1
pages/invite/index.wxml

@@ -5,7 +5,7 @@
         data-iconDetail="http://reader-wx.ai160.com/images/reader/v3/yxgl.jpg" bindtap="jumpIntro" />
         data-iconDetail="http://reader-wx.ai160.com/images/reader/v3/yxgl.jpg" bindtap="jumpIntro" />
     <view class="body">
     <view class="body">
         <view class="pennant" wx:for="{{list}}" wx:key="num" id="p{{item.num}}"
         <view class="pennant" wx:for="{{list}}" wx:key="num" id="p{{item.num}}"
-            style="top:{{item.top}}rpx;left:{{item.left}}rpx">
+            style="top:{{item.top}}rpx;left:{{item.left}}rpx" data-num='{{item.num}}' bindtap="applyOr">
             <image src="{{filters.showPennant(count,item.num)}}" class='icon' />
             <image src="{{filters.showPennant(count,item.num)}}" class='icon' />
             <view class="num">邀{{item.num}}人</view>
             <view class="num">邀{{item.num}}人</view>
         </view>
         </view>

+ 3 - 2
pages/invite/index.wxss

@@ -6,7 +6,7 @@
   overflow: hidden;
   overflow: hidden;
 }
 }
 .invite .ranking {
 .invite .ranking {
-  position: fixed;
+  position: absolute;
   top: 164rpx;
   top: 164rpx;
   right: 20rpx;
   right: 20rpx;
   width: 100rpx;
   width: 100rpx;
@@ -14,7 +14,7 @@
   z-index: 2;
   z-index: 2;
 }
 }
 .invite .strategy {
 .invite .strategy {
-  position: fixed;
+  position: absolute;
   top: 290rpx;
   top: 290rpx;
   right: 10rpx;
   right: 10rpx;
   width: 120rpx;
   width: 120rpx;
@@ -42,6 +42,7 @@
   position: absolute;
   position: absolute;
   width: 100%;
   width: 100%;
   bottom: 40rpx;
   bottom: 40rpx;
+  font-weight: bold;
   text-align: center;
   text-align: center;
   font-size: 26rpx;
   font-size: 26rpx;
   color: #FFFFFF;
   color: #FFFFFF;

+ 1 - 16
pages/inviteRanking/index.js

@@ -1,5 +1,4 @@
 import {
 import {
-    getRankingData,
     getInviteRanking
     getInviteRanking
 } from '~/api/global'
 } from '~/api/global'
 import {
 import {
@@ -29,7 +28,6 @@ Page({
         this.setData({
         this.setData({
             userInfo: getApp().globalData.userInfo
             userInfo: getApp().globalData.userInfo
         })
         })
-        this.getRankingData(2)
         let {
         let {
             list
             list
         } = await getInviteList({
         } = await getInviteList({
@@ -49,20 +47,7 @@ Page({
             myCount
             myCount
         })
         })
     },
     },
-    async getRankingData(id) {
-        let {
-            ranking,
-            userList,
-            title,
-        } = await getRankingData(id)
-        wx.setNavigationBarTitle({
-            title
-        })
-        this.setData({
-            ranking,
-            userList,
-        })
-    },
+
     jumpIndex() {
     jumpIndex() {
         wx.switchTab({
         wx.switchTab({
             url: '/pages/index/index',
             url: '/pages/index/index',

+ 1 - 1
pages/inviteRanking/index.json

@@ -2,5 +2,5 @@
     "usingComponents": {
     "usingComponents": {
         "popUp": "/components/popUp/index"
         "popUp": "/components/popUp/index"
     },
     },
-    "navigationBarTitleText": "排行榜"
+    "navigationBarTitleText": "邀新总榜"
 }
 }