| | |
| | | </view> |
| | | |
| | | <view class="flex-1"> |
| | | <view class="activity-item" v-if="activityData.fee > 0"> |
| | | <view class="activity-item"> |
| | | <view class="gray6 f24">活动费用</view> |
| | | <view class="info">¥{{activityData.fee}}/人</view> |
| | | <view class="info" v-if="activityData.fee > 0">¥{{activityData.fee}}/人</view> |
| | | <view class="info" v-else>免费</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="activity-item d-b-c" v-if="activityData.is_visit == 1"> |
| | | <view class="flex-1"> |
| | | <view class="gray6 f24">活动地点</view> |
| | | <view class="info">{{activityData.address}}</view> |
| | | </view> |
| | | <view> |
| | | <view class="d-s-c contact ml20"> |
| | | <view class="d-c-c d-c" @click="openLocation()"> |
| | | <text class="iconfont icon-dizhi"></text> |
| | | <text class="text">导航</text> |
| | | </view> |
| | | <view class="d-c-c d-c ml20" @click="callPhone()"> |
| | | <text class="iconfont icon-002dianhua"></text> |
| | | <text class="text">电话</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="gray6 f24">活动发起分会</view> |
| | | <view class="info">{{activityData.branch.name}}</view> |
| | | </view> |
| | | <view class="activity-item d-b-c" v-if="activityData.fee > 0"> |
| | | <view class="activity-item"> |
| | | <view> |
| | | <view class="gray6 f24">已报名人数</view> |
| | | <view class="info">{{activityData.total}}</view> |
| | | <view class="gray6 f24">已报名人员({{activityData.total}}人)</view> |
| | | <view class="info"></view> |
| | | </view> |
| | | <view class="avatar-list d-s-c"> |
| | | <image :src="item.avatarUrl" mode="aspectFill" v-for="(item, index) in userList" |
| | | :key="index"></image> |
| | | <view class="more" v-if="activityData.total > 8"></view> |
| | | <view class="avatar-list d-s-c pt10"> |
| | | <view class="d-c-c d-c avatar-item" v-for="(item, index) in userList" :key="index"> |
| | | <image :src="item.avatarUrl" mode="aspectFill"></image> |
| | | <text class="text-ellipsis">{{item.real_name}}</text> |
| | | </view> |
| | | <view class="more d-c-c d-c" v-if="activityData.total > 5" @click="openUser"> |
| | | <view class="d-c-c more-icon"> |
| | | <text class="iconfont icon-gengduo"></text> |
| | | </view> |
| | | <text>更多</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 活动结束图标 --> |
| | | <view class="status-image" v-if="activityData.is_finish"> |
| | | <view class="status-image" v-if="activityData.status_text.status==2"> |
| | | <image :src="remoteImg('finish')"></image> |
| | | </view> |
| | | <!-- 活动进行中图标 --> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="detail-footer"> |
| | | <!-- 如果已经报名 --> |
| | | <block v-if="activityData.is_reg"> |
| | | <!-- 如果已经核销 --> |
| | | <view class="d-c-c finish-btn" v-if="activityData.is_verify"> |
| | | <button class='modifyBnt' @click="onAlbum">活动相册</button> |
| | | <!-- 如果有走访企业,跳转企业店铺 --> |
| | | <button class='modifyBnt' @click="gotoSupplier" v-if="activityData.is_visit">超值购</button> |
| | | <button class='modifyBnt' @click="showShare" v-else>分享给好友</button> |
| | | </view> |
| | | <button v-else-if="activityData.status_text.status==1" class='modifyBnt' |
| | | @click="onVerify">马上签到</button> |
| | | <button v-else-if="activityData.status_text.status==2" class='modifyBnt disabled'>您缺席了这场活动</button> |
| | | <button v-else class='modifyBnt disabled'>活动未开始</button> |
| | | </block> |
| | | <!-- 如果是扫码进来的,都显示可以签到 --> |
| | | <view :class="{'d-c-c two-col-btn':canReg == 1}" v-if="user_verify"> |
| | | <button class='modifyBnt disabled' v-if="activityData.is_verify">您已签到</button> |
| | | <button class='modifyBnt' @click="onVerify" v-else>马上签到</button> |
| | | <button class='modifyBnt' @click="onReg(true)" v-if="canReg==1">帮朋友报名</button> |
| | | </view> |
| | | <!-- 如果活动已结束 --> |
| | | <view class="d-c-c two-col-btn" v-else-if="activityData.status_text.status==2"> |
| | | <button class='modifyBnt' @click="onAlbum">活动相册</button> |
| | | <!-- 如果有走访企业,跳转企业店铺 --> |
| | | <button class='modifyBnt' @click="gotoSupplier" v-if="activityData.is_visit">走访企业的店铺</button> |
| | | <button class='modifyBnt' @click="showShare" v-else>分享给好友</button> |
| | | </view> |
| | | <block v-else> |
| | | <button v-if="activityData.status_text.reg_status==0" class='modifyBnt disabled'>报名未开始</button> |
| | | <block v-else-if="activityData.status_text.reg_status==1"> |
| | | <button v-if="activityData.limit_num==activityData.total && activityData.limit_num!=0" |
| | | class='modifyBnt disabled'>已报满</button> |
| | | <button v-else class='modifyBnt' @click="onReg">提交报名</button> |
| | | <!-- 如果已经报名 --> |
| | | <view class="d-c-c two-col-btn" v-if="activityData.is_reg"> |
| | | <button class='modifyBnt disabled' v-if="activityData.is_verify">您已签到</button> |
| | | <button class='modifyBnt disabled' v-else @click="scanCode">您已报名</button> |
| | | <button class='modifyBnt' @click="onReg(true)" v-if="canReg==1">帮朋友报名</button> |
| | | <block v-else> |
| | | <button class='modifyBnt' @click="showShare" v-if="activityData.is_verify">分享给好友</button> |
| | | <button class='modifyBnt' @click="scanCode" v-else>扫码签到</button> |
| | | </block> |
| | | </view> |
| | | <!-- 如果还没有报名 --> |
| | | <block v-else> |
| | | <view class="d-c-c two-col-btn" v-if="canReg==1"> |
| | | <button class='modifyBnt' @click="onReg(false)">我要报名</button> |
| | | <button class='modifyBnt' @click="onReg(true)">帮朋友报名</button> |
| | | </view> |
| | | <view class="d-c-c" v-else> |
| | | <button v-if="canReg==0" class='modifyBnt disabled'>报名未开始</button> |
| | | <button v-else-if="canReg==3" class='modifyBnt disabled'>已报满</button> |
| | | <button v-else class='modifyBnt disabled'>报名已结束</button> |
| | | </view> |
| | | </block> |
| | | <button v-else class='modifyBnt disabled'>报名已结束</button> |
| | | </block> |
| | | |
| | | |
| | | </view> |
| | | </view> |
| | | <!-- 活动购物图标(仅在活动进行时显示) --> |
| | | <view class="shopping-box" @click="gotoPage('pages/branch/activity/product/index?activity_id='+activity_id)" v-if="activityData.is_visit && activityData.status_text.status == 1 && activityData.is_verify"> |
| | | <image :src="remoteImg('activity_shopping')"></image> |
| | | </view> |
| | | <!--报名成功弹窗--> |
| | | <view class="success-box" v-if="isShowbox"> |
| | |
| | | <!-- #endif --> |
| | | </view> |
| | | </uniPopup> |
| | | <!--核销失败弹窗--> |
| | | <uniPopup :show="isShowVerify" type="middle" @hidePopup="popupVerifyFunc(null)"> |
| | | <view class="d-c-c d-c verify-choose"> |
| | | <view class="f30 fb">签到失败了,因为您还没报名</view> |
| | | <view class="p-20-0 f28 gray6">如果您朋友已经帮您报名了,请输入您的手机号重新签到:</view> |
| | | <input class="ww100 f30 fb tc verify-input" type="text" maxlength="30" placeholder="请输入手机号码" v-model="verify_mobile" placeholder-class="placeholder" /> |
| | | <view class="foot"> |
| | | <view class="btn" @click="popupVerifyFunc('reg')">现在报名</view> |
| | | <view class="btn" @click="popupVerifyFunc('retry')">重新签到</view> |
| | | </view> |
| | | </view> |
| | | </uniPopup> |
| | | <!-- 报名弹窗 --> |
| | | <RegForm ref="regForm" :isOpenReg="isOpenReg" :in_radius="in_radius" @close="closeRegFunc"></RegForm> |
| | | <RegForm ref="regForm" :isOpenReg="isOpenReg" :in_radius="in_radius" :is_friend="is_friend" @close="closeRegFunc"></RegForm> |
| | | <!--分享底部弹窗--> |
| | | <Share :isbottmpanel="isbottmpanel" :activity_id="activity_id" @close="closeBottmpanel"></Share> |
| | | <!--app分享--> |
| | | <AppShare :isAppShare="isAppShare" :appParams="appParams" @close="closeAppShare"></AppShare> |
| | | <!-- 打开活动相册 --> |
| | | <Album ref="album" :isOpenAlbum="isOpenAlbum" :activity_id="activity_id" @close="closeAlbumFunc"></Album> |
| | | <!-- 打开报名用户名单 --> |
| | | <User ref="user" :isOpenUser="isOpenUser" :activity_id="activity_id" @close="closeUserFunc"></User> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | import Album from './popup/album.vue'; // 相册 |
| | | import uniPopup from '@/components/uni-popup.vue'; |
| | | import utils from '@/common/utils.js'; |
| | | import User from './popup/user.vue'; // 相册 |
| | | export default { |
| | | components: { |
| | | RegForm, |
| | | AppShare, |
| | | Share, |
| | | Album, |
| | | uniPopup |
| | | uniPopup, |
| | | User, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | balance: 0, |
| | | activity_id: 0, |
| | | activityData: {}, |
| | | activityData: { |
| | | status_text: { |
| | | reg_status: 0 |
| | | } |
| | | }, |
| | | userList: [], |
| | | /*是否显示支付宝支付,只有在h5,非微信内打开才显示*/ |
| | | showAlipay: false, |
| | |
| | | isVerify: false, // 签到成功弹窗 |
| | | in_radius: false, // 用户是否在活动地点限定范围内 |
| | | user_verify: 0, // 核销标识,只有扫核销码进来值才是1 |
| | | is_friend: false, // 是否是帮朋友报名 |
| | | isShowVerify: false, // 核销选择框(针对核销时返回未报名的情况,选择是否有朋友帮报名) |
| | | verify_mobile: '', // 朋友帮报名填的手机号 |
| | | isOpenUser: false, // 报名用户名单弹窗 |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | |
| | | }, |
| | | onUnload() { |
| | | this.stopWatchingLocation(); |
| | | }, |
| | | computed: { |
| | | canReg() { |
| | | let status = this.activityData.status_text.reg_status; // 0未开始 1可报 2报名已结束 3报满 |
| | | if (this.activityData.status_text.reg_status == 1 && (this.activityData.limit_num > this.activityData.total || this.activityData.limit_num == 0)) { |
| | | status = 1; |
| | | } else if (this.activityData.limit_num == this.activityData.total && this.activityData.limit_num > 0) { |
| | | status = 3; |
| | | } |
| | | return status; |
| | | }, |
| | | }, |
| | | methods: { |
| | | /*获取数据*/ |
| | |
| | | // }); |
| | | // }, |
| | | |
| | | onReg() { |
| | | onReg(e) { |
| | | this.$refs.regForm.activityData = this.activityData; |
| | | if (this.activityData.fee > 0) { |
| | | /* this.$refs.regForm.branch_name = this.activityData.branch.name; |
| | | this.$refs.regForm.formData.branch_id = this.activityData.branch_id; */ |
| | | this.is_friend = e; |
| | | //if (this.activityData.fee > 0 || e || !this.activityData.is_member) { |
| | | this.isOpenReg = true; |
| | | } else { |
| | | this.$refs.regForm.onSubmit(); |
| | | } |
| | | /* } else { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确定要报名吗?', |
| | | success: (modalRes) => { |
| | | if (modalRes.confirm) { |
| | | this.$refs.regForm.onSubmit(); |
| | | } |
| | | } |
| | | }); |
| | | } */ |
| | | }, |
| | | |
| | | closeRegFunc(e) { |
| | |
| | | }); |
| | | self._post( |
| | | 'branch.activityUser/verify', { |
| | | activity_id: self.activity_id |
| | | activity_id: self.activity_id, |
| | | verify_mobile: self.verify_mobile |
| | | }, |
| | | function(res) { |
| | | uni.hideLoading(); |
| | | if (res.data.result =='not_reg') { |
| | | self.isShowVerify = true; |
| | | return; |
| | | } |
| | | self.isVerify = true; |
| | | self.getData(); |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | // 签到失败弹窗处理 |
| | | popupVerifyFunc(e) { |
| | | if (e == 'reg') { |
| | | this.onReg(false); |
| | | } else if (e == 'retry') { // 朋友帮报名,输入手机号重新签到 |
| | | if (this.verify_mobile == '') { |
| | | uni.showToast({ |
| | | title: '请输入手机号', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(this.verify_mobile)) { |
| | | uni.showToast({ |
| | | title: '请输入正确的手机号', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | this.doVierfy(); |
| | | } |
| | | this.verify_mobile = ''; |
| | | this.isShowVerify = false; |
| | | }, |
| | | |
| | | // 计算坐标距离 |
| | |
| | | // 打开相册 |
| | | onAlbum() { |
| | | this.isOpenAlbum = true; |
| | | this.$refs.album.initData(); |
| | | this.$refs.album.getData(); |
| | | }, |
| | | |
| | | closeAlbumFunc(e) { |
| | |
| | | gotoSupplier() { |
| | | this.gotoPage('pages/shop/shop?shop_supplier_id=' + this.activityData.visit_supplier_id); |
| | | }, |
| | | |
| | | scanCode() { |
| | | let self = this; |
| | | //#ifndef H5 |
| | | // 只允许通过相机扫码 |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: function(res) { |
| | | if (res.errMsg == 'scanCode:ok') { |
| | | if (res.path != 'undefined') { |
| | | self.gotoPage(res.path); |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '扫码失败,请重试' |
| | | }) |
| | | } |
| | | } |
| | | }); |
| | | //#endif |
| | | }, |
| | | |
| | | callPhone(){ |
| | | uni.makePhoneCall({ |
| | | phoneNumber: this.activityData.phone + '' |
| | | }); |
| | | }, |
| | | |
| | | /*导航*/ |
| | | openLocation() { |
| | | let self = this; |
| | | uni.openLocation({ |
| | | latitude: Number(this.activityData.latitude), |
| | | longitude: Number(this.activityData.longitude), |
| | | address: this.activityData.address |
| | | }); |
| | | }, |
| | | |
| | | // 打开报名名单 |
| | | openUser() { |
| | | this.isOpenUser = true; |
| | | }, |
| | | |
| | | closeUserFunc(e) { |
| | | this.isOpenUser = false; |
| | | }, |
| | | |
| | | }, |
| | | onShareAppMessage() { |
| | | if (this.activityData) { |
| | | return { |
| | | title: `${this.activityData.name}`, |
| | | path: `/pages/plus/business/detail?activity_id=${this.activity_id}` |
| | | }; |
| | | } |
| | | return { |
| | | title: '活动详情', |
| | | path: `/pages/plus/business/detail?activity_id=${this.activity_id}` |
| | | }; |
| | | }, |
| | | onShareTimeline() { |
| | | if (this.activityData) { |
| | | return { |
| | | title: `${this.activityData.name}`, |
| | | path: `/pages/plus/business/detail?activity_id=${this.activity_id}` |
| | | }; |
| | | } |
| | | return { |
| | | title: '活动详情', |
| | | path: `/pages/plus/business/detail?activity_id=${this.activity_id}` |
| | | }; |
| | | } |
| | | } |
| | | </script> |
| | |
| | | } |
| | | |
| | | .iconfont { |
| | | margin-right: 17rpx; |
| | | // margin-right: 17rpx; |
| | | font-size: 34rpx; |
| | | } |
| | | |
| | | .activity-item { |
| | | .avatar-list { |
| | | .avatar-item { |
| | | width: 90rpx; |
| | | padding-right: 10rpx; |
| | | } |
| | | image { |
| | | width: 70rpx; |
| | | height: 70rpx; |
| | | border-radius: 70rpx; |
| | | border: 2rpx solid #ffffff; |
| | | margin-left: -20rpx; |
| | | } |
| | | |
| | | .more { |
| | | position: relative; |
| | | width: 140rpx; |
| | | height: 70rpx; |
| | | margin-left: -140rpx; |
| | | background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, .9)); |
| | | padding-left: 10rpx; |
| | | |
| | | .more-icon { |
| | | width: 70rpx; |
| | | height: 70rpx; |
| | | border-radius: 70rpx; |
| | | background: #f1f1f1; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .contact { |
| | | .iconfont { |
| | | font-size: 30rpx; |
| | | // font-weight: bold; |
| | | color: #333333; |
| | | margin-right: 0; |
| | | } |
| | | |
| | | .text { |
| | | font-size: 24rpx; |
| | | color: #333333; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | .personal-data .finish-btn .modifyBnt { |
| | | .personal-data .two-col-btn .modifyBnt { |
| | | width: 325rpx; |
| | | margin: 0 20rpx; |
| | | } |
| | |
| | | box-shadow: 0 8rpx 16rpx 0 rgba(226, 35, 26, 0.6); |
| | | } |
| | | } |
| | | |
| | | .verify-choose { |
| | | padding-bottom: 78rpx; |
| | | |
| | | .verify-input { |
| | | border: 1rpx solid #ddd; |
| | | border-radius: 12rpx; |
| | | padding: 16rpx 0; |
| | | } |
| | | |
| | | .foot { |
| | | height: 78rpx; |
| | | border-top: 1px solid #EAEAEA; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | width: 100%; |
| | | position: absolute; |
| | | bottom: 0; |
| | | left: 0; |
| | | |
| | | .btn { |
| | | color: #999999; |
| | | font-size: 26rpx; |
| | | width: 50%; |
| | | text-align: center; |
| | | height: 78rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | +.btn { |
| | | color: #E93323; |
| | | position: relative; |
| | | |
| | | &::before { |
| | | content: ""; |
| | | display: block; |
| | | width: 1px; |
| | | height: 78rpx; |
| | | background: #EAEAEA; |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | @keyframes pulse { |
| | | 0% { |
| | | transform: scale(1); |
| | | } |
| | | 50% { |
| | | transform: scale(1.2); /* 放大到1.2倍 */ |
| | | } |
| | | 100% { |
| | | transform: scale(1); |
| | | } |
| | | } |
| | | .shopping-box { |
| | | |
| | | image { |
| | | width: 180rpx; |
| | | height: 180rpx; |
| | | position: fixed; |
| | | bottom: 130rpx; |
| | | right: 20rpx; |
| | | animation: pulse 0.8s infinite; /* 动画名称,持续时间,无限循环 */ |
| | | } |
| | | } |
| | | </style> |