|
@@ -22,11 +22,16 @@
|
|
|
<text class="u-primary-color u-font-24 line-34">{{detail.join_count - detail.join_number}}</text>
|
|
<text class="u-primary-color u-font-24 line-34">{{detail.join_count - detail.join_number}}</text>
|
|
|
<text class="u-content-color u-font-24 line-34">剩余名额</text>
|
|
<text class="u-content-color u-font-24 line-34">剩余名额</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="u-flex u-row-between u-p-t-22 line-34">
|
|
|
|
|
|
|
+ <view class="u-flex u-row-between u-p-t-22">
|
|
|
<text class="u-content-color">{{detail.join_number}}已参与</text>
|
|
<text class="u-content-color">{{detail.join_number}}已参与</text>
|
|
|
<button class="share-btn u-primary-color u-font-24 line-34"
|
|
<button class="share-btn u-primary-color u-font-24 line-34"
|
|
|
open-type="share">分享活动</button>
|
|
open-type="share">分享活动</button>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <image v-if="platBanner"
|
|
|
|
|
+ :src="platBanner.img"
|
|
|
|
|
+ class="detail-banner line-34 u-m-t-32"
|
|
|
|
|
+ mode="widthFix"
|
|
|
|
|
+ @click="dealJumpInfo(platBanner)"></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="shop-info u-m-t-16">
|
|
<view class="shop-info u-m-t-16">
|
|
@@ -44,14 +49,14 @@
|
|
|
<view class="divider-right"></view>
|
|
<view class="divider-right"></view>
|
|
|
<block v-if="detail.plat_type === 8">
|
|
<block v-if="detail.plat_type === 8">
|
|
|
<view class="to-btn u-p-l-28"
|
|
<view class="to-btn u-p-l-28"
|
|
|
- @click="openOtherApplte()">
|
|
|
|
|
|
|
+ @click="copyShopName()">
|
|
|
<view class="icon-mt-wh icon-elm"></view>
|
|
<view class="icon-mt-wh icon-elm"></view>
|
|
|
<view class="u-m-t-2 u-font-22 u-content-color line-32">打开饿了么</view>
|
|
<view class="u-m-t-2 u-font-22 u-content-color line-32">打开饿了么</view>
|
|
|
</view>
|
|
</view>
|
|
|
</block>
|
|
</block>
|
|
|
<block v-if="detail.plat_type === 9">
|
|
<block v-if="detail.plat_type === 9">
|
|
|
<view class="to-btn u-p-l-40"
|
|
<view class="to-btn u-p-l-40"
|
|
|
- @click="openOtherApplte()">
|
|
|
|
|
|
|
+ @click="copyShopName()">
|
|
|
<view class="icon-mt-wh icon-mt"></view>
|
|
<view class="icon-mt-wh icon-mt"></view>
|
|
|
<view class="u-m-t-2 u-font-22 u-content-color line-32">打开美团</view>
|
|
<view class="u-m-t-2 u-font-22 u-content-color line-32">打开美团</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -118,7 +123,7 @@
|
|
|
@click="cancelJoin"
|
|
@click="cancelJoin"
|
|
|
v-show="!isExpire">取消报名</button>
|
|
v-show="!isExpire">取消报名</button>
|
|
|
<button :class="isExpire ? 'sign-up-btn u-font-28 line-40 u-m-l-16' : 'submit-btn u-font-28 line-40 u-m-l-16'"
|
|
<button :class="isExpire ? 'sign-up-btn u-font-28 line-40 u-m-l-16' : 'submit-btn u-font-28 line-40 u-m-l-16'"
|
|
|
- @click="toSubmiteOrder">提交结果</button>
|
|
|
|
|
|
|
+ @click="toSubmiteOrder">提交订单</button>
|
|
|
</view>
|
|
</view>
|
|
|
</block>
|
|
</block>
|
|
|
</block>
|
|
</block>
|
|
@@ -135,7 +140,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
<block v-if="status * 1 === 1 && !isExpire">
|
|
<block v-if="status * 1 === 1 && !isExpire">
|
|
|
<button :class="isStart ? 'sign-up-btn u-font-30 bold line-42' : 'sign-up-btn u-font-30 bold line-42'"
|
|
<button :class="isStart ? 'sign-up-btn u-font-30 bold line-42' : 'sign-up-btn u-font-30 bold line-42'"
|
|
|
- @click="join">{{isStart ? '我要报名' : '即将开始'}}</button>
|
|
|
|
|
|
|
+ @click="join">{{isStart ? '免费报名' : '即将开始'}}</button>
|
|
|
</block>
|
|
</block>
|
|
|
</block>
|
|
</block>
|
|
|
<block v-if="status * 1 === 3 || status * 1 === 4">
|
|
<block v-if="status * 1 === 3 || status * 1 === 4">
|
|
@@ -183,7 +188,15 @@
|
|
|
@click.stop="copyShopName">复制店名</view>
|
|
@click.stop="copyShopName">复制店名</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <activity-join-dialog @onClose="isDialog = false"
|
|
|
|
|
+ @onOpen="onDialogOpen()"
|
|
|
|
|
+ :title="dlgTitle"
|
|
|
|
|
+ :shopName="detail.shop_name"
|
|
|
|
|
+ :platType="detail.plat_type*1"
|
|
|
|
|
+ :steps="detail.steps"
|
|
|
|
|
+ v-if="isDialog"></activity-join-dialog>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
@@ -191,10 +204,12 @@ import fixedBottom from '@/components/fixedBottom'
|
|
|
import imgText from '@/components/imgText'
|
|
import imgText from '@/components/imgText'
|
|
|
import { getActivityDetail } from '@/api/activityApi'
|
|
import { getActivityDetail } from '@/api/activityApi'
|
|
|
import { editJoinActivity, cancelJoinActivity } from '@/api/userApi'
|
|
import { editJoinActivity, cancelJoinActivity } from '@/api/userApi'
|
|
|
|
|
+import activityJoinDialog from '@/components/activityJoinDialog'
|
|
|
export default {
|
|
export default {
|
|
|
- components: { fixedBottom, imgText },
|
|
|
|
|
|
|
+ components: { fixedBottom, imgText, activityJoinDialog },
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ isDialog: false,
|
|
|
showErr: false,
|
|
showErr: false,
|
|
|
errMsg: '',
|
|
errMsg: '',
|
|
|
nowTime: '',
|
|
nowTime: '',
|
|
@@ -203,6 +218,8 @@ export default {
|
|
|
currentTab: 0,
|
|
currentTab: 0,
|
|
|
activityId: '',
|
|
activityId: '',
|
|
|
recordId: '',
|
|
recordId: '',
|
|
|
|
|
+ dlgTitle: '复制成功',
|
|
|
|
|
+ dlgType: 1,
|
|
|
detail: {
|
|
detail: {
|
|
|
imgs: '',
|
|
imgs: '',
|
|
|
activity_type: '',
|
|
activity_type: '',
|
|
@@ -222,6 +239,21 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
|
|
+ platBanner () {
|
|
|
|
|
+ if (this.detail) {
|
|
|
|
|
+ const list = this.$store.state.home_minipro
|
|
|
|
|
+ const mapList = list.filter((item) => {
|
|
|
|
|
+ return item.plat_type === this.detail.plat_type
|
|
|
|
|
+ })
|
|
|
|
|
+ if (mapList.length > 0) {
|
|
|
|
|
+ return mapList[0]
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return null
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return null
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
isCommissionEnable () {
|
|
isCommissionEnable () {
|
|
|
return this.$store.state.enable_commission * 1 === 1
|
|
return this.$store.state.enable_commission * 1 === 1
|
|
|
},
|
|
},
|
|
@@ -353,6 +385,14 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ onDialogOpen () {
|
|
|
|
|
+ uni.setClipboardData({
|
|
|
|
|
+ data: this.detail.search_key ? this.detail.search_key : this.detail.shop_name
|
|
|
|
|
+ })
|
|
|
|
|
+ this.isDialog = false
|
|
|
|
|
+ this.getDetailData()
|
|
|
|
|
+ this.openOtherApplte()
|
|
|
|
|
+ },
|
|
|
onClickShare () {
|
|
onClickShare () {
|
|
|
uni.navigateTo({ url: '/pagesSub/commission/invite' })
|
|
uni.navigateTo({ url: '/pagesSub/commission/invite' })
|
|
|
},
|
|
},
|
|
@@ -426,9 +466,11 @@ export default {
|
|
|
const { code, msg } = type === 1 ? await editJoinActivity(params) : await cancelJoinActivity(params)
|
|
const { code, msg } = type === 1 ? await editJoinActivity(params) : await cancelJoinActivity(params)
|
|
|
if (code === 200) {
|
|
if (code === 200) {
|
|
|
if (type === 1) {
|
|
if (type === 1) {
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: `/pagesSub/activity/signUpOutcome?endTime=${this.detail.end_time}&platType=${this.detail.plat_type}`
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.isDialog = true
|
|
|
|
|
+ this.dlgTitle = '报名成功'
|
|
|
|
|
+ // uni.navigateTo({
|
|
|
|
|
+ // url: `/pagesSub/activity/signUpOutcome?endTime=${this.detail.end_time}&platType=${this.detail.plat_type}`
|
|
|
|
|
+ // })
|
|
|
} else {
|
|
} else {
|
|
|
this.getDetailData()
|
|
this.getDetailData()
|
|
|
}
|
|
}
|
|
@@ -463,19 +505,7 @@ export default {
|
|
|
uni.requestSubscribeMessage({
|
|
uni.requestSubscribeMessage({
|
|
|
tmplIds: this.$store.state.joinTemplateIds,
|
|
tmplIds: this.$store.state.joinTemplateIds,
|
|
|
complete: () => {
|
|
complete: () => {
|
|
|
- if (this.detail.tips) {
|
|
|
|
|
- uni.showModal({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- content: this.detail.tips,
|
|
|
|
|
- success: (res) => {
|
|
|
|
|
- if (res.confirm) {
|
|
|
|
|
- this.joinActivity(1)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- this.joinActivity(1)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.joinActivity(1)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -512,15 +542,8 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
copyShopName () {
|
|
copyShopName () {
|
|
|
- uni.setClipboardData({
|
|
|
|
|
- data: this.detail.search_key,
|
|
|
|
|
- success: () => {
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- icon: 'none',
|
|
|
|
|
- title: '搜索关键字复制成功'
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.isDialog = true
|
|
|
|
|
+ this.dlgTitle = '复制成功'
|
|
|
},
|
|
},
|
|
|
copyWx () {
|
|
copyWx () {
|
|
|
uni.setClipboardData({
|
|
uni.setClipboardData({
|
|
@@ -595,6 +618,12 @@ export default {
|
|
|
.detail-over {
|
|
.detail-over {
|
|
|
padding: 24px 40px 28px;
|
|
padding: 24px 40px 28px;
|
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
|
|
+ margin-top: 16rpx;
|
|
|
|
|
+ .detail-banner {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ border-radius: 24rpx;
|
|
|
|
|
+ box-shadow: 0px 4rpx 16px 0px rgba(0, 0, 0, 0.1);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
.detail-title {
|
|
.detail-title {
|
|
|
max-width: 670px;
|
|
max-width: 670px;
|