houwei 3 年之前
父节点
当前提交
37e01bd800
共有 5 个文件被更改,包括 11 次插入20 次删除
  1. 1 0
      app.json
  2. 0 10
      pages/index/index.js
  3. 9 8
      pages/myActive/myActive.js
  4. 1 1
      pages/myActive/myActive.wxml
  5. 0 1
      pages/onSiteActivity/onSiteActivity.js

+ 1 - 0
app.json

@@ -1,5 +1,6 @@
 {
   "pages": [
+    
     "pages/index/index",
     "pages/share/share",
     "pages/targetInfo/targetInfo",

+ 0 - 10
pages/index/index.js

@@ -25,7 +25,6 @@ Page({
   },
   // 关闭信件
   closeLetter() {
-    console.log('1')
     this.setData({
       letterStatus: true
     })
@@ -62,7 +61,6 @@ Page({
       url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/actives',
       method: "get",
       success: (res) => {
-        console.log(res)
         if (res.data.code == 0) {
           this.setData({
             arr: res.data.actives
@@ -97,20 +95,15 @@ Page({
     })
   },
   getletterStauts() {
-    console.log(wx.getStorageSync('letterStatus'))
     if (wx.getStorageSync('letterStatus') == true) {
-      console.log('我缓存里有值是1')
       this.setData({
         letterStatus: true
       })
-      // this.closeLetter();
     } else {
-      console.log('我没有缓存、')
       this.setData({
         letterStatus: false
       })
     }
-    console.log(this.data.letterStatus)
   },
   getInfos() {
     wx.request({
@@ -125,7 +118,6 @@ Page({
           }else{
             sex1='男'
           }
-          console.log(sex1)
           this.setData({
             myInfo: res.data.info,
             [config]:JSON.stringify({
@@ -158,7 +150,6 @@ Page({
               ])
             })
           })
-          console.log(this.data.ysf.config)
         }
       }
     })
@@ -183,7 +174,6 @@ Page({
       this.setData({
         userInfo:JSON.parse(res.rawData)
       })
-      console.log(this.data.userInfo)
     }).catch(err => {
       console.log(err)
     })

+ 9 - 8
pages/myActive/myActive.js

@@ -1,19 +1,20 @@
 const app = require('../../utils/util.js');
 const tool = require('../../utils/tool.js');
 Page({
-
-  /**
-   * 页面的初始数据
-   */
   data: {
     arr: []
   },
   goActive(e) {
-    console.log(e.currentTarget.dataset.id)
-
-    wx.redirectTo({
-      url: '/pages/onSiteActivity/onSiteActivity?id=' + e.currentTarget.dataset.id,
+    console.log(e.currentTarget.dataset.sign)
+    if(e.currentTarget.dataset.sign==1){
+      wx.redirectTo({
+        url: '/pages/onSiteActivity/onSiteActivity?id=' + e.currentTarget.dataset.id,
+      })
+    }else{
+      wx.showModal({
+        title: '请您在现场扫码签到哦'
     })
+  }
   },
   /**
    * 生命周期函数--监听页面加载

+ 1 - 1
pages/myActive/myActive.wxml

@@ -6,7 +6,7 @@
 			<view class="remark">{{item.remark}}</view>
 		</view>
 		<view wx:if="{{item.activeStatus==0}}" class="btn btn1">未开始</view>
-		<view wx:if="{{item.activeStatus==1}}" class="btn btn2" data-id='{{item.id}}' bindtap="goActive">进行中</view>
+		<view wx:if="{{item.activeStatus==1}}" class="btn btn2" data-id='{{item.id}}' data-sign='{{item.isSign}}' bindtap="goActive">进行中</view>
     <view wx:if="{{item.activeStatus==2}}" class="btn btn3">已结束</view>
 	</view>
 	<image src="../../images/activeimg.png" class="img2"></image>

+ 0 - 1
pages/onSiteActivity/onSiteActivity.js

@@ -119,7 +119,6 @@ Page({
       }
     })
     wx.request({
-      // this.data.activeId
       url: app.globalData.publicUrl + '/wx/actives/' + this.data.openid + '/' + this.data.activeId + '/sign',
       method: "get",
       success: (res) => {