Browse Source

成为组织者

wangningfei 4 years ago
parent
commit
0e0ad8f142
3 changed files with 36 additions and 9 deletions
  1. 27 9
      pages/my/index.js
  2. 1 0
      pages/my/index.wxml
  3. 8 0
      pages/my/index.wxss

+ 27 - 9
pages/my/index.js

@@ -14,6 +14,7 @@ Page({
     BASEIMGURL: app.globalData.BASEIMGURL,
     BASEIMGURL1: app.globalData.BASEIMGURL1,
     loading: true,
+    isShowTip: true
     // hideGetInfo: true
   },
   onLoad: function () {
@@ -165,10 +166,13 @@ Page({
       })
     }
   },
-  onTabItemTap(e){ 
-    console.log(1,e)
+  onTabItemTap(e) {
+    console.log(1, e)
   },
-  onUnload(){ 
+  onHide(){
+    clearTimeout(this.timer)
+  },
+  onUnload() {
     // this.setData({
     //   hideGetInfo: true
     // })
@@ -201,12 +205,26 @@ Page({
       })
     }
   },
-  onShow(){ 
+  onShow() {
     if (typeof this.getTabBar === 'function' &&
-        this.getTabBar()) {
-        this.getTabBar().setData({
-          selected: 1
-        })
-      }
+      this.getTabBar()) {
+      this.getTabBar().setData({
+        selected: 1
+      })
+    }
+    this.setData({  
+      isShowTip: true
+    })
+    this.timer = setTimeout(()=>{
+      this.setData({
+        isShowTip: false
+      })
+    },15000)
+  },
+  showCode(){ 
+    wx.previewImage({
+      current: this.data.BASEIMGURL1 + 'HamiltonQR.jpeg', // 当前显示图片的http链接
+      urls: [this.data.BASEIMGURL1 + 'HamiltonQR.jpeg'] // 需要预览的图片http链接列表
+    })
   }
 })

+ 1 - 0
pages/my/index.wxml

@@ -3,6 +3,7 @@
 <template is="skeleton" wx:if="{{loading}}" />
 <wxs module="filter" src="../../utils/filter.wxs"></wxs>
 <view class="container">
+	<view class="tip" wx:if="{{isShowTip}}" bindtap="showCode">扫码申请成为组织者</view>
 	<!-- <navBar 
     title-text="CoffeeTalk" 
     back-icon="/img/nav/back@3x.png"

+ 8 - 0
pages/my/index.wxss

@@ -378,4 +378,12 @@ page {
   clear: both;
   overflow: hidden;
   font-size: 0;
+}
+.tip{
+  position: fixed;
+  top: 10rpx;
+  left: 20rpx;
+  color: #fff;
+  font-size: 28rpx;
+  z-index: 10000;
 }