| @@ -11,6 +11,7 @@ | |||||
| "pages/spellGroup/spellGroup", | "pages/spellGroup/spellGroup", | ||||
| "pages/complete/index", | "pages/complete/index", | ||||
| "pages/topicDetail/index", | "pages/topicDetail/index", | ||||
| "pages/acSignIn/index", | |||||
| "pages/main/index", | "pages/main/index", | ||||
| "pages/index/searchbar/index", | "pages/index/searchbar/index", | ||||
| "pages/index/merchantList/index", | "pages/index/merchantList/index", | ||||
| @@ -0,0 +1,55 @@ | |||||
| const util = require("../../utils/util.js"); | |||||
| const Http = require("../../utils/HttpBasics"); | |||||
| const config = require("../../config/config"); | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| showPage: false, | |||||
| showPage1:false | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad: function (options) { | |||||
| let that = this; | |||||
| if(options&&options.id){ | |||||
| that.signIn(options.id); | |||||
| that.setData({ | |||||
| id:options.id | |||||
| }) | |||||
| } | |||||
| }, | |||||
| signIn(id){ | |||||
| let that = this; | |||||
| Http.post({ | |||||
| url: config.api.activitySign, | |||||
| data: { | |||||
| activityId:id | |||||
| } | |||||
| }).then(res => { | |||||
| console.log(res) | |||||
| that.setData({ | |||||
| showPage:true | |||||
| }) | |||||
| }).catch(err=>{ | |||||
| console.log(err); | |||||
| that.setData({ | |||||
| showPage1: true | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| //跳转到报名详情页 | |||||
| goSignUp(e) { | |||||
| let activityId = e.currentTarget.dataset.id; | |||||
| wx.navigateTo({ | |||||
| url: `/pages/radetail/joinActivity/edit?activityId=${activityId}`, | |||||
| }) | |||||
| }, | |||||
| goback: function () { | |||||
| wx.switchTab({ | |||||
| url: '/pages/main/index', | |||||
| }) | |||||
| }, | |||||
| }) | |||||
| @@ -0,0 +1,3 @@ | |||||
| { | |||||
| "navigationBarTitleText": "签到" | |||||
| } | |||||
| @@ -0,0 +1,10 @@ | |||||
| <view class='success' wx:if="{{showPage}}"> | |||||
| <text class='tit'>签到成功</text> | |||||
| <button class='goback' bindtap='goback'>返回首页</button> | |||||
| </view> | |||||
| <view class='success' wx:if="{{showPage1}}"> | |||||
| <text class='tit'>对不起,您未报名参加该活动</text> | |||||
| <button class='goback' data-id='{{id}}' bindtap='goSignUp'>我要报名</button> | |||||
| <button class='goback' bindtap='goback'>返回首页</button> | |||||
| </view> | |||||
| @@ -0,0 +1,71 @@ | |||||
| .success text{ | |||||
| display: block; | |||||
| text-align: center; | |||||
| } | |||||
| .tit{ | |||||
| font-size: 40rpx; | |||||
| font-weight:bold; | |||||
| } | |||||
| .mess{ | |||||
| margin-top: 40rpx; | |||||
| font-size: 30rpx; | |||||
| } | |||||
| .fl{ | |||||
| float: left; | |||||
| } | |||||
| .fr{ | |||||
| float: right; | |||||
| } | |||||
| .goback{ | |||||
| width:400rpx!important; | |||||
| height:80rpx; | |||||
| line-height: 80rpx; | |||||
| border-radius:10rpx; | |||||
| background: orange; | |||||
| color: #fff; | |||||
| font-size: 32rpx; | |||||
| margin-top: 20rpx; | |||||
| } | |||||
| .btns { | |||||
| padding-bottom: 37rpx; | |||||
| padding-top: 37rpx; | |||||
| z-index: 100; | |||||
| background: #fff; | |||||
| width: 625rpx; | |||||
| margin:100rpx auto 0; | |||||
| } | |||||
| .success{ | |||||
| margin-top: 200rpx; | |||||
| } | |||||
| .btns > button { | |||||
| width: 277rpx; | |||||
| height: 95rpx; | |||||
| border-radius: 10rpx; | |||||
| text-align: center; | |||||
| } | |||||
| .btns .fl { | |||||
| margin-left: 20rpx; | |||||
| color: #fff; | |||||
| background: rgba(255, 169, 2, 1); | |||||
| box-shadow: 0px 8px 8px 1px rgba(255, 169, 2, 0.32); | |||||
| } | |||||
| .btns .fl text { | |||||
| display: block; | |||||
| font-size: 30rpx; | |||||
| line-height: 34rpx; | |||||
| } | |||||
| .btns .fl text:nth-of-type(1) { | |||||
| margin-top: 12rpx; | |||||
| } | |||||
| .btns .fr { | |||||
| font-size: 30rpx; | |||||
| color: #fff; | |||||
| margin-right: 20rpx; | |||||
| line-height: 95rpx; | |||||
| background: rgba(236, 59, 45, 1); | |||||
| box-shadow: 0px 8px 8px 1px rgba(246, 93, 51, 0.32); | |||||
| } | |||||
| @@ -133,6 +133,12 @@ Page({ | |||||
| url: `/pages/radetail/index?id=${that.data.optionData.id}`, | url: `/pages/radetail/index?id=${that.data.optionData.id}`, | ||||
| }) | }) | ||||
| } | } | ||||
| // 报名签到 | |||||
| else if (that.data.optionData.id && app.globalData.type == 'si') { | |||||
| wx.redirectTo({ | |||||
| url: `/pages/acSignIn/index?id=${that.data.optionData.id}`, | |||||
| }) | |||||
| } | |||||
| // 门店详情 | // 门店详情 | ||||
| else if (that.data.optionData.id && app.globalData.type == 'md') { | else if (that.data.optionData.id && app.globalData.type == 'md') { | ||||
| wx.redirectTo({ | wx.redirectTo({ | ||||
| @@ -68,6 +68,9 @@ Page({ | |||||
| } else if (options.type == 'ra') { | } else if (options.type == 'ra') { | ||||
| //活动详情 | //活动详情 | ||||
| options.id = this.data.newArr[2]; | options.id = this.data.newArr[2]; | ||||
| } else if (options.type == 'si') { | |||||
| //活动签到 | |||||
| options.id = this.data.newArr[2]; | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -167,6 +170,12 @@ Page({ | |||||
| url: `/pages/radetail/index?id=${options.id}`, | url: `/pages/radetail/index?id=${options.id}`, | ||||
| }) | }) | ||||
| } | } | ||||
| //活动签到 | |||||
| else if (options && options.id && app.globalData.type == 'si') { | |||||
| wx.redirectTo({ | |||||
| url: `/pages/acSignIn/index?id=${options.id}`, | |||||
| }) | |||||
| } | |||||
| // 宣传页详情 | // 宣传页详情 | ||||
| else if (options && options.bt && options.id && app.globalData.type == 'bd') { | else if (options && options.bt && options.id && app.globalData.type == 'bd') { | ||||
| if (options.bt == '2') { | if (options.bt == '2') { | ||||
| @@ -36,11 +36,13 @@ Page({ | |||||
| that.setData({ | that.setData({ | ||||
| data: res.data.activity | data: res.data.activity | ||||
| }) | }) | ||||
| if (res.data && res.data.activity && res.data.activity.question){ | |||||
| that.setData({ | |||||
| question: JSON.parse(res.data.activity.question) | |||||
| }) | |||||
| } | |||||
| that.setData({ | |||||
| activityStartTime:util.formatTime(res.data.activity.activityStartTime, "yyyy-MM-dd hh:mm:ss"), | |||||
| activityEndTime:util.formatTime(res.data.activity.activityEndTime, "yyyy-MM-dd hh:mm:ss"), | |||||
| startTime: util.formatTime(res.data.activity.startTime, "yyyy-MM-dd hh:mm:ss"), | |||||
| endTime: util.formatTime(res.data.activity.endTime, "yyyy-MM-dd hh:mm:ss") | |||||
| }) | |||||
| if (res.data.activity.type == 2) { | if (res.data.activity.type == 2) { | ||||
| wx.request({ | wx.request({ | ||||
| url: configUrls + config.api.acPrintHtmlById, | url: configUrls + config.api.acPrintHtmlById, | ||||
| @@ -13,13 +13,13 @@ | |||||
| <text class='txt002'>{{data.subTitle}}</text> | <text class='txt002'>{{data.subTitle}}</text> | ||||
| <view class="proct" wx:if="{{data.type == 1}}"> | <view class="proct" wx:if="{{data.type == 1}}"> | ||||
| <text>活动说明</text> | <text>活动说明</text> | ||||
| <text>{{data.detail}}</text> | |||||
| <view class='detail'>{{data.detail}}</view> | |||||
| </view> | </view> | ||||
| <view class='member'>活动人数:30人</view> | |||||
| <view class='time'>活动开始时间:2019.06.11 08:11:30</view> | |||||
| <view class='time'>活动结束时间:2019.06.11 08:11:30</view> | |||||
| <view class='time'>报名开始时间:2019.06.11 08:11:30</view> | |||||
| <view class='time'>报名结束时间:2019.06.11 08:11:30</view> | |||||
| <view class='member'>活动人数:{{data.personLimit}}人</view> | |||||
| <view class='time'>活动开始时间:{{activityStartTime}}</view> | |||||
| <view class='time'>活动结束时间:{{activityEndTime}}</view> | |||||
| <view class='time'>报名开始时间:{{startTime}}</view> | |||||
| <view class='time'>报名结束时间:{{endTime}}</view> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -31,6 +31,6 @@ | |||||
| </view> | </view> | ||||
| <button wx:if="{{status == 0}}" disabled class='signUp' hover-class='opacity'>报名未开始</button> | <button wx:if="{{status == 0}}" disabled class='signUp' hover-class='opacity'>报名未开始</button> | ||||
| <button wx:if="{{status == 1}}" class='signUp'data-activityId="{{activityId}}" bindtap='goSignUp' hover-class='opacity'>我要报名</button> | |||||
| <button wx:if="{{status == 1}}" class='signUp' data-activityId="{{activityId}}" bindtap='goSignUp' hover-class='opacity'>我要报名</button> | |||||
| <button wx:if="{{status == 2}}" disabled class='signUp' hover-class='opacity'>活动已结束</button> | <button wx:if="{{status == 2}}" disabled class='signUp' hover-class='opacity'>活动已结束</button> | ||||
| <button wx:if="{{status == 3}}" disabled class='signUp' hover-class='opacity'>已报名</button> | <button wx:if="{{status == 3}}" disabled class='signUp' hover-class='opacity'>已报名</button> | ||||
| @@ -23,7 +23,6 @@ | |||||
| .act { | .act { | ||||
| position: relative; | position: relative; | ||||
| z-index: 1000000000; | |||||
| background: #fff; | background: #fff; | ||||
| border-radius: 12rpx; | border-radius: 12rpx; | ||||
| width: 705rpx; | width: 705rpx; | ||||
| @@ -85,13 +84,6 @@ | |||||
| letter-spacing: 0; | letter-spacing: 0; | ||||
| margin: 0 auto; | margin: 0 auto; | ||||
| } | } | ||||
| .orbg { | |||||
| position: absolute; | |||||
| top: 256rpx; | |||||
| z-index: 1000000; | |||||
| } | |||||
| .banner text { | .banner text { | ||||
| position: absolute; | position: absolute; | ||||
| right: 0; | right: 0; | ||||
| @@ -563,6 +555,7 @@ button::after{ border: none; } | |||||
| .coupons { | .coupons { | ||||
| width: 100%; | width: 100%; | ||||
| position: relative; | position: relative; | ||||
| margin-bottom: 160rpx; | |||||
| } | } | ||||
| .coupons-body { | .coupons-body { | ||||
| @@ -584,11 +577,9 @@ button::after{ border: none; } | |||||
| .act { | .act { | ||||
| position: relative; | position: relative; | ||||
| z-index: 1000000000; | |||||
| background: #fff; | background: #fff; | ||||
| border-radius: 12rpx; | border-radius: 12rpx; | ||||
| width: 705rpx; | width: 705rpx; | ||||
| /* height: 212rpx; */ | |||||
| margin: 24rpx auto 0; | margin: 24rpx auto 0; | ||||
| padding-bottom: 20rpx; | padding-bottom: 20rpx; | ||||
| } | } | ||||
| @@ -652,12 +643,6 @@ button::after{ border: none; } | |||||
| margin: 0 auto; | margin: 0 auto; | ||||
| } | } | ||||
| .orbg { | |||||
| position: absolute; | |||||
| top: 256rpx; | |||||
| z-index: 1000000; | |||||
| } | |||||
| .banner text { | .banner text { | ||||
| position: absolute; | position: absolute; | ||||
| right: 0; | right: 0; | ||||
| @@ -1096,28 +1081,6 @@ scroll-view { | |||||
| font-size: 26rpx; | font-size: 26rpx; | ||||
| line-height: 15rpx; | line-height: 15rpx; | ||||
| } | } | ||||
| button::after{ border: none; } | |||||
| .goback{ | |||||
| position: fixed; | |||||
| right: 50rpx; | |||||
| bottom: 60rpx; | |||||
| width:100rpx!important; | |||||
| height:100rpx; | |||||
| z-index: 100; | |||||
| background:rgba(255,255,255,1); | |||||
| line-height: 95rpx; | |||||
| border:1rpx solid rgba(227,227,227,1); | |||||
| border-radius:50%; | |||||
| } | |||||
| .goback image{ | |||||
| position: absolute; | |||||
| width: 60rpx; | |||||
| left: 0; | |||||
| right: 0; | |||||
| top: 0; | |||||
| bottom: 0; | |||||
| margin: auto; | |||||
| } | |||||
| .signUp{ | .signUp{ | ||||
| position: fixed; | position: fixed; | ||||
| bottom: 30rpx; | bottom: 30rpx; | ||||
| @@ -1150,4 +1113,10 @@ button::after{ border: none; } | |||||
| font-size: 40rpx; | font-size: 40rpx; | ||||
| border-top:6rpx solid orange; | border-top:6rpx solid orange; | ||||
| margin: 20rpx auto 0; | margin: 20rpx auto 0; | ||||
| } | |||||
| .detail{ | |||||
| font-size: 26rpx; | |||||
| line-height: 40rpx; | |||||
| margin-bottom: 20rpx; | |||||
| color: #666; | |||||
| } | } | ||||
| @@ -26,7 +26,8 @@ | |||||
| </view> | </view> | ||||
| <view class='ques' wx:if="{{question&&question.length>0}}"> | <view class='ques' wx:if="{{question&&question.length>0}}"> | ||||
| <text class='questionTitle'>调查问卷</text> | <text class='questionTitle'>调查问卷</text> | ||||
| <view class='answer' wx:for="{{question}}" wx:key="index">{{index+1}}.{{item.ques}} | |||||
| <view class='answer' wx:for="{{question}}" wx:key="index" wx:if="{{item.ques}}"> | |||||
| <text>{{item.ques}}</text> | |||||
| <textarea name="answer{{index}}" bindinput='change' type="textarea" placeholder='请填写您的回答?'></textarea> | <textarea name="answer{{index}}" bindinput='change' type="textarea" placeholder='请填写您的回答?'></textarea> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -92,7 +92,7 @@ radio { | |||||
| } | } | ||||
| .ques text{ | .ques text{ | ||||
| display: block; | display: block; | ||||
| text-align: center; | |||||
| text-align: left; | |||||
| } | } | ||||
| .questionTitle{ | .questionTitle{ | ||||
| width: 180rpx; | width: 180rpx; | ||||
| @@ -100,6 +100,7 @@ radio { | |||||
| border-top:6rpx solid orange; | border-top:6rpx solid orange; | ||||
| border-bottom:6rpx solid orange; | border-bottom:6rpx solid orange; | ||||
| margin: 40rpx auto 0; | margin: 40rpx auto 0; | ||||
| text-align: center!important; | |||||
| } | } | ||||
| .ques text{ | .ques text{ | ||||
| display: block; | display: block; | ||||
| @@ -20,6 +20,11 @@ Page({ | |||||
| index1: 0, | index1: 0, | ||||
| showPage:false | showPage:false | ||||
| }, | }, | ||||
| gotomyAc(){ | |||||
| wx.navigateTo({ | |||||
| url: '/pages/user/myactivity/index', | |||||
| }) | |||||
| }, | |||||
| /** | /** | ||||
| * 获得生日 | * 获得生日 | ||||
| */ | */ | ||||
| @@ -7,7 +7,7 @@ | |||||
| <button class="fl" bindtap='goback'> | <button class="fl" bindtap='goback'> | ||||
| 返回首页 | 返回首页 | ||||
| </button> | </button> | ||||
| <button class="fr"> | |||||
| <button class="fr" bindtap='gotomyAc'> | |||||
| 我的活动 | 我的活动 | ||||
| </button> | </button> | ||||
| </view> | </view> | ||||