houwei hace 4 años
padre
commit
dcab83e2ac

BIN
images/ac2.png


BIN
images/activeDefault1.png


BIN
images/activeimg.png


BIN
images/add_top.png


BIN
images/icon6.png


BIN
images/icon7.png


BIN
images/icon8.png


BIN
images/show1.png


BIN
images/tuijian.png


+ 3 - 3
pages/activeDefaultDetails/activeDefaultDetails.wxml

@@ -1,4 +1,4 @@
-<view style="padding:0">
-<image src='../../images/activeDefault1.png' style="width:750rpx;height:1780rpx;"/>
-<image src='../../images/activeDefault2.png' style="width:750rpx;height:1900rpx;margin-top:-12rpx"/>
+<view style="padding:0;font-size:0">
+<image src='https://yuehe-1257653330.cos.ap-beijing.myqcloud.com/d1.jpg' style="width:750rpx;height:1594rpx;"/>
+<image src='https://yuehe-1257653330.cos.ap-beijing.myqcloud.com/d2.jpg' style="width:750rpx;height:1582rpx;margin-top:-2rpx"/>
 </view>

+ 6 - 1
pages/activeDefaultDetails/activeDefaultDetails.wxss

@@ -1 +1,6 @@
-/* pages/activeDefaultDetails/activeDefaultDetails.wxss */
+/* pages/activeDefaultDetails/activeDefaultDetails.wxss */
+image{
+  display:block;
+  vertical-align:top;
+  float:left;
+}

+ 3 - 1
pages/activeDetail/activeDetail.js

@@ -6,6 +6,7 @@ Page({
   },
   isOk() {
     tool.isLogin().then(result => {
+      console.log(result)
       this.setData({
         loginStatus: true
       })
@@ -28,8 +29,9 @@ Page({
         })
       })
     }).catch(err => {
+      console.log(err)
       this.setData({
-        loginStatus: true
+        loginStatus: false
       })
     })
   },

+ 3 - 1
pages/activeDetail/activeDetail.wxml

@@ -1,5 +1,6 @@
 <view style="background:#fff">
-	<image src="{{posterUrl}}" style="width:690rpx;height:360rpx;margin-left:35rpx"></image>
+	<image src="{{posterUrl}}" style="width:750rpx;" mode="widthFix"></image>
+	<view style="margin-bottom:200rpx;">
 	<view class="line">
 		<van-icon name="like-o" size="40rpx" color="#906cff" style="margin-left:35rpx;margin-bottom:35rpx" />
 		<p style='margin-left:35rpx'>已报名{{actualCount}}/{{planCount}}</p>
@@ -22,6 +23,7 @@
 		{{remark}}
 	</view>
 	<image src="../../images/remarked.png" class="remarkImg" wx:if="{{isInit&&activeOpenid !='null'}}"></image>
+	</view>
 	<!--  -->
 	<view class="btn_area" wx:if="{{isInit&&(!activeOpenid||activeOpenid=='null')}}">
 		<view class="btn" bindtap="baoming">报名</view>

+ 1 - 0
pages/activeDetail/activeDetail.wxss

@@ -19,6 +19,7 @@
   position: fixed;
   bottom: 0;
   left: 0;
+  background-color: #fff;
 }
 
 .btn {

+ 36 - 30
pages/index/index.js

@@ -30,21 +30,27 @@ Page({
     wx.setStorageSync('letterStatus', true)
   },
   goShare() {
-    wx.redirectTo({
+    wx.navigateTo({
       url: '/pages/share/share',
     })
   },
   // 跳转活动详情页面
   goActive(e) {
-    console.log(e)
-    let id = e.currentTarget.dataset.id
-    let openId = e.currentTarget.dataset.openid
-    wx.navigateTo({
-      url: '/pages/activeDetail/activeDetail?id=' + id + '&openId=' + openId,
-    })
+    if(e.currentTarget.dataset.activestatus != -1) {
+      let id = e.currentTarget.dataset.id
+      let openId = e.currentTarget.dataset.openid
+      wx.navigateTo({
+        url: '/pages/activeDetail/activeDetail?id=' + id + '&openId=' + openId,
+      })
+    }else{
+      wx.showModal({
+        title: '活动已经结束啦',
+        showCancel: false
+      });
+    }
   },
   goActiveDefault() {
-    wx.redirectTo({
+    wx.navigateTo({
       url: '/pages/activeDefaultDetails/activeDefaultDetails',
     })
   },
@@ -53,9 +59,9 @@ Page({
     wx.request({
       url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/actives',
       method: "get",
-      data: {
-        activeStatus: 0
-      },
+      // data: {
+      //   activeStatus: 0
+      // },
       success: (res) => {
         console.log(res)
         if (res.data.code == 0) {
@@ -68,23 +74,23 @@ Page({
         wx.hideLoading();
       }
     })
-    wx.request({
-      url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/actives',
-      method: "get",
-      data: {
-        activeStatus: 1
-      },
-      success: (res) => {
-        if (res.data.code == 0) {
-          this.setData({
-            arr1: res.data.actives
-          })
-        }
-      },
-      complete() {
-        wx.hideLoading();
-      }
-    })
+    // wx.request({
+    //   url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/actives',
+    //   method: "get",
+    //   data: {
+    //     activeStatus: 1
+    //   },
+    //   success: (res) => {
+    //     if (res.data.code == 0) {
+    //       this.setData({
+    //         arr1: res.data.actives
+    //       })
+    //     }
+    //   },
+    //   complete() {
+    //     wx.hideLoading();
+    //   }
+    // })
   },
   goMy() {
     wx.redirectTo({
@@ -105,13 +111,13 @@ Page({
   },
   getletterStauts() {
     console.log(wx.getStorageSync('letterStatus'))
-    if (wx.getStorageSync('letterStatus')==true) {
+    if (wx.getStorageSync('letterStatus') == true) {
       console.log('我缓存里有值是1')
       this.setData({
         letterStatus: true
       })
       // this.closeLetter();
-    }else{
+    } else {
       console.log('我没有缓存、')
       this.setData({
         letterStatus: false

+ 30 - 26
pages/index/index.wxml

@@ -12,33 +12,34 @@
 	</view>
 	<!-- <image wx:if='{{arr.length==0&&arr1.length==0}}' src="../../images/empty.png" style="width:320rpx;height:320rpx;margin-left:215rpx"></image>
 	<view wx:if='{{arr.length==0&&arr1.length==0}}' style="color:#999;width:750rpx;height:320rpx;top:550rpx;left:0rpx;text-align:center">近期还没有活动呦</view> -->
-	<view style="margin-bottom:150rpx;position:relative">
-		<image wx:if='{{arr.length==0}}' bindtap="goActiveDefault" style="width:750rpx;height:280rpx" src="../../images/activeDefault0.jpg"></image>
-		<view wx:for="{{arr}}" wx:key="index" class="box" bindtap="goActive" data-id='{{item.id}}' data-openId='{{item.openId}}'>
-			<view class="top">
-				<image src="../../images/logo.png" style="width:80rpx;height:80rpx;"></image>
-				<view class="text">
-					<view class="title">{{item.title}}</view>
-					<view class="remark">{{item.remark}}</view>
-				</view>
-				<view wx:if="{{item.openId==null}}" class="btn btn1">报名</view>
-				<view wx:if="{{item.enterStatus==0}}" class="btn btn1">审核中</view>
-				<view wx:if="{{item.enterStatus==1}}" class="btn btn1">审核通过</view>
-				<view wx:if="{{item.enterStatus==-1}}" class="btn btn1">审核失败</view>
-			</view>
-			<image src="{{item.posterUrl}}" class="img2"></image>
-			<view class="p1">
-				<van-icon name="clock-o" color="#a267ff" size="35rpx" />
-				<view style="margin-left:15rpx">活动时间:{{item.activeTime}}</view>
-			</view>
-			<view class="p1">
-				<van-icon name="location-o" color="#a267ff" size="35rpx" />
-				<view style="margin-left:15rpx">活动地点:{{item.address}}</view>
+
+	<image wx:if='{{arr.length==0}}' bindtap="goActiveDefault" style="width:750rpx;height:280rpx" src="../../images/activeDefault0.jpg"></image>
+	<view wx:for="{{arr}}" wx:key="index" class="box" bindtap="goActive" data-activeStatus='{{item.activeStatus}}' data-id='{{item.id}}' data-openId='{{item.openId}}'>
+		<view class="top">
+			<image src="../../images/logo.png" style="width:80rpx;height:75rpx;border-radius:20rpx"></image>
+			<view class="text">
+				<view class="title">{{item.title}}</view>
+				<view class="remark">{{item.remark}}</view>
 			</view>
+			<view wx:if="{{item.openId==null&&item.activeStatus!=-1}}" class="btn btn1">报名</view>
+			<view wx:if="{{item.enterStatus==0&&item.activeStatus!=-1}}" class="btn btn1">审核中</view>
+			<view wx:if="{{item.enterStatus==1&&item.activeStatus!=-1}}" class="btn btn1">审核通过</view>
+			<view wx:if="{{item.enterStatus==-1&&item.activeStatus!=-1}}" class="btn btn1">审核失败</view>
+			<view wx:if="{{item.activeStatus==-1}}" class="btn btn1">已结束</view>
 		</view>
-		<view wx:for="{{arr1}}" wx:key="index" class="box" bindtap="goActive" data-id='{{item.id}}' data-openId='{{item.openId}}'>
+		<image src="{{item.faceUrl}}" class="img2"></image>
+		<view class="p1">
+			<van-icon name="clock-o" color="#a267ff" size="35rpx" />
+			<view style="margin-left:15rpx">活动时长:{{item.activeTime}}</view>
+		</view>
+		<view class="p1">
+			<van-icon name="location-o" color="#a267ff" size="35rpx" />
+			<view style="margin-left:15rpx">活动地点:{{item.address}}</view>
+		</view>
+	</view>
+	<!-- <view wx:for="{{arr1}}" wx:key="index" class="box" bindtap="goActive" data-id='{{item.id}}' data-openId='{{item.openId}}'>
 			<view class="top">
-				<image src="../../images/logo.png" style="width:80rpx;height:80rpx;"></image>
+				<image src="../../images/logo.png" style="width:80rpx;height:75rpx;border-radius:20rpx"></image>
 				<view class="text">
 					<view class="title">{{item.title}}</view>
 					<view class="remark">{{item.remark}}</view>
@@ -48,7 +49,7 @@
 				<view wx:if="{{item.enterStatus==1}}" class="btn btn1">审核通过</view>
 				<view wx:if="{{item.enterStatus==-1}}" class="btn btn1">审核失败</view>
 			</view>
-			<image src="{{item.posterUrl}}" class="img2"></image>
+			<image src="{{item.faceUrl}}" class="img2"></image>
 			<view class="p1">
 				<van-icon name="clock-o" color="#a267ff" size="35rpx" />
 				<view style="margin-left:15rpx">活动时间:{{item.activeTime}}</view>
@@ -57,7 +58,10 @@
 				<van-icon name="location-o" color="#a267ff" size="35rpx" />
 				<view style="margin-left:15rpx">活动地点:{{item.address}}</view>
 			</view>
-		</view>
+		</view> -->
+	<!-- </view> -->
+	<view style="margin-bottom:150rpx;position:relative">
+		<van-divider customStyle="color: #666666; border-color: #999999; font-size: 28rpx;" contentPosition="center">仅展示最近一个月的数据</van-divider>
 	</view>
 </view>
 <view class="tabbar">

+ 6 - 73
pages/personal/personal.js

@@ -28,7 +28,7 @@ Page({
   },
   goTab(e) {
     console.log(e.currentTarget.dataset.index)
-    if (e.currentTarget.dataset.index != 2 && e.currentTarget.dataset.index != 3) {
+    if (e.currentTarget.dataset.index == 0 || e.currentTarget.dataset.index == 1) {
       if (this.data.loginStatus) {
         wx.navigateTo({
           url: e.currentTarget.dataset.src
@@ -39,6 +39,10 @@ Page({
           showCancel: false
         });
       }
+    }if (e.currentTarget.dataset.index == 4){
+      wx.navigateTo({
+        url: '/pages/share/share'
+      })
     }
   },
   goIndex() {
@@ -46,38 +50,6 @@ Page({
       url: '/pages/index/index',
     })
   },
-  // onShareAppMessage: function (options) {
-  //   console.log(options)
-  //   var that = this;
-  //   // 设置菜单中的转发按钮触发转发事件时的转发内容
-  //   var shareObj = {
-  //     title: "月合文化", // 默认是小程序的名称(可以写slogan等)
-  //     path: '/pages/personal/personal', // 默认是当前页面,必须是以‘/’开头的完整路径
-  //     imageUrl: '../../images/photo.jpg', //自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
-  //     success: function (res) {
-  //       console.log(res)
-  //       // 转发成功之后的回调
-  //       if (res.errMsg == 'shareAppMessage:ok') {}
-  //     },
-  //     fail: function () {
-  //       // 转发失败之后的回调
-  //       if (res.errMsg == 'shareAppMessage:fail cancel') {
-  //         // 用户取消转发
-  //       } else if (res.errMsg == 'shareAppMessage:fail') {
-  //         // 转发失败,其中 detail message 为详细失败信息
-  //       }
-  //     }
-  //   }
-  //   // 来自页面内的按钮的转发
-  //   if (options.from == 'button') {
-  //     var eData = options.target.dataset;
-  //     console.log(eData.name); // shareBtn
-  //     // 此处可以修改 shareObj 中的内容
-  //     shareObj.path = '/pages/btnname/btnname?btn_name=' + eData.name;
-  //   }
-  //   // 返回shareObj
-  //   return shareObj;
-  // },
   bindGetUserInfo: function (e) {
     console.log(e.detail.userInfo)
     this.setData({
@@ -157,44 +129,5 @@ Page({
       this.getInfos();
       this.getTimes();
     })
-  },
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-  onShareTimeline: function () {
-    return {
-      title: '测试',
-      query: {
-        id: 0
-      },
-      imageUrl: '../../images/icon1.png'
-    }
-  },
+  }
 })

+ 15 - 43
pages/share/share.js

@@ -50,12 +50,7 @@ Page({
     })
   },
   getEwm() {
-    tool.isLogin().then(result => {
-      // console.log(result,'我完善头像了并获取授权了')
       tool.isFinishInfo().then(result2 => {
-        console.log(result2.id,'我完善了')
-        tool.isFinishTargetInfo().then(redult3 => {
-          wx.showLoading();
           wx.request({
             url: app.globalData.publicUrl + '/wx/mpuser/wxeef6678b92b6c856/qrCode',
             method: "get",
@@ -70,48 +65,24 @@ Page({
               wx.hideLoading();
             }
           })
-        }).catch(err => {
-          wx.showModal({
-            title: '您还未完善择偶信息',
-            showCancel: false,
-            success(res) {
-              if (res.confirm) {
-                wx.redirectTo({
-                  url: '/pages/targetInfo/targetInfo',
-                })
-              }
-            }
-          })
-          return false;
-        })
       }).catch(err => {
-        wx.showModal({
-          title: '您还未完善个人或者详细信息',
-          showCancel: false,
-          success(res) {
-            if (res.confirm) {
-              wx.redirectTo({
-                url: '/pages/personInfo/personInfo',
-              })
-            }
+        // wx.showLoading();
+        wx.request({
+          url: app.globalData.publicUrl + '/wx/mpuser/wxeef6678b92b6c856/qrCode',
+          method: "get",
+          data: {
+            memberId:0
+          },
+          success: (res) => {
+            console.log(res)
+              this.draw(res.data);
+          },
+          fail() {
+            wx.hideLoading();
           }
         })
-        return false;
       })
-    }).catch(err => {
-      wx.showModal({
-        title: '您还未登录',
-        showCancel: false,
-        success(res) {
-          if (res.confirm) {
-            wx.redirectTo({
-              url: '/pages/personal/personal',
-            })
-          }
-        }
-      });
-      return false;
-    })
+
   },
   draw(qrcode) {
     wx.downloadFile({
@@ -159,6 +130,7 @@ Page({
   //   })
   // },
   onLoad: function (options) {
+    wx.showLoading();
     tool.openidStatus().then(result => {
       this.setData({
         openid: result[0],

+ 5 - 1
pages/share/share.wxml

@@ -1,4 +1,8 @@
 <view style="position:relative;top:80rpx">
 	<canvas canvas-id="myCanvasId" style="width:750rpx;height:700rpx;"></canvas>
 	<button id="sunbmit" bindtap="save">保存二维码</button>
-</view>
+	<view class="wz" style="margin-top:20rpx">我们是月老手底下的打工人</view>
+		<view class="wz">扫描二维码来领对象啦!</view>
+		<view class="wz">不定期与吉林省慈善总会联合举办免费相亲会</view>
+		<view class="wz">对象都给你准备好了。。。。。。你倒是扫啊!</view>
+	</view>

+ 15 - 6
pages/share/share.wxss

@@ -1,11 +1,20 @@
-#sunbmit{
-  width:300rpx;
+#sunbmit {
+  width: 300rpx;
   background: -webkit-linear-gradient(left, #bd64ff, #8873ff);
   color: #fff;
-  height: 80rpx!important;
-  line-height: 50rpx!important;
-  border-radius: 50rpx!important;
-  font-weight: normal!important;
+  height: 80rpx !important;
+  line-height: 50rpx !important;
+  border-radius: 50rpx !important;
+  font-weight: normal !important;
   margin: 0rpx 235rpx;
   font-size: 30rpx;
+}
+
+.wz {
+  color:#999;
+  font-size: 28rpx;
+  /* padding: 50rpx; */
+  text-indent: 56rpx;
+  text-align: center;
+  line-height: 50rpx;
 }

+ 0 - 1
utils/tool.js

@@ -70,7 +70,6 @@ const isLogin = () => {
       success: res => {
         console.log(res)
         if (res.authSetting['scope.userInfo']) {
-          // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
           wx.getUserInfo({
             success: res => {
               resolve(res)