| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420 |
- <template>
- <view class="safe-area-inset-bottom">
- <my-bar title="活动详情" :transparent="transparent">
- <view slot="content" class="publish">
- <image @click="$util.preview(detail.poster)" :src="detail.poster" style="height: 340rpx;width: 100%;">
- </image>
- </view>
- </my-bar>
- <view class="clock">
- </view>
- <view class="content">
- <text class="title">{{detail.title}}</text>
- <view class="data flex" style="margin-top: 30rpx;">
- <u-icon name="eye" color="#EF9944"></u-icon>
- <view v-if="detail.auditStatus=='WAITING_MALL'" class="margin-left-10">
- 审核状态:
- <text style="color: #EF9944;">待审核</text>
- </view>
- <view v-if="detail.auditStatus=='WAITING_PLATFORM'" class="margin-left-10">
- 审核状态:
- <text style="color: #EF9944;">待平台审核</text>
- </view>
- <view v-if="detail.auditStatus=='PASS'" class="margin-left-10">
- 审核状态:
- <text style="color: #19be6b;">审核通过</text>
- </view>
- <view v-if="detail.auditStatus=='FAIL'" class="margin-left-10">
- 审核状态:
- <text style="color: #fa3534;">审核不通过</text>
- </view>
- <view v-if="detail.auditStatus=='STOP'" class="margin-left-10">
- 审核状态:
- <text style="color: #fa3534;">活动已停用</text>
- </view>
- </view>
- <view class="data" style="margin-top: 30rpx;">
- <u-icon name="clock" color="#EF9944"></u-icon>
- <text class="margin-left-10">开始时间:{{detail.beginTime}}</text>
- </view>
- <view class="data" style="margin-top: 30rpx;">
- <u-icon name="clock" color="#EF9944"></u-icon>
- <text class="margin-left-10">结束时间:{{detail.endTime}}</text>
- </view>
- <view class="data" style="margin-top: 30rpx;">
- <u-icon name="coupon" color="#EF9944"></u-icon>
- <text class="margin-left-10">活动折扣:{{discount(detail.discount)}}</text>
- </view>
- </view>
- <view class="attend" v-if="!$isEmpty(joinRecords)">
- <view class="margin-bottom-20">
- <u-icon name="calendar-fill" color="#EF9944"></u-icon>
- <text class="margin-left-10">已参加</text>
- </view>
- <view class="flex">
- <view class="flex " style="width: 90%;">
- <view class="data" v-for="(item,index) in joinRecords" :key="index">
- <view class="item">
- <image style="border-radius: 50%;" :src="item.joinLogo" mode="aspectFill"></image>
- <view>
- <text>{{item.joinName | ellipsis}}</text>
- <text>{{discount(item.discount)}}</text>
- </view>
- </view>
- </view>
- </view>
- <view v-if="detail.activityJoinRecords.length>3" class="center" style="width: 10%;margin-right: 15rpx;">
- <u-icon name="more-circle" size="80" color="#ababab"></u-icon>
- </view>
- </view>
- </view>
- <view class="intro">
- <view class="flex">
- <u-icon name="bookmark" color="#EF9944"></u-icon>
- <text class="margin-left-10">活动介绍</text>
- </view>
- <view class="desc">
- {{detail.intro}}
- </view>
- </view>
- <view class="" v-if="current==0">
- <view @click="open=!open" class="intro" style="width: 100%;">
- <text class="text-bold text-lg">审核流程</text>
- <text :class="open?'cuIcon-fold':'cuIcon-unfold'" class=" margin-left-10"></text>
- </view>
- <view class="history" v-if="open" :style="{marginBottom:safeAreaBottom}">
- <u-time-line>
- <u-time-line-item nodeTop="2" v-for="(item,index) in historyList" :key="index">
- <template v-slot:node>
- <view class="u-node bg-white">
- <u-icon name="clock-fill" color="#e0e3ea" :size="28"></u-icon>
- </view>
- </template>
- <template v-slot:content>
- <view>
- <view class="">{{item.createTime}}</view>
- <view style="width: 636rpx;">
- <view class="content">
- <view class="nav-title">
- <view class="">
- <text>【{{item.assigneeName?item.assigneeName:'联兑通平台'}}】在
- [{{item.createTime}}] 开始处理 [{{item.historyActivityName}}] 环节</text>
- </view>
- <view class="" v-if="item.historyActivityDurationTime">
- 任务历时:
- [{{item.historyActivityDurationTime}}]
- </view>
- <view class="" v-if="item.comment">
- 批复意见:
- [{{item.comment}}]
- </view>
- <view class="" v-if="item.endTime">
- 结束时间:
- [{{item.endTime}}]
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- </u-time-line-item>
- </u-time-line>
- </view>
- </view>
- <block v-if="isShowBtn">
- <view class="" style="height: 50rpx;"></view>
- <view :style="{paddingBottom:safeAreaBottom}" class=" center" :class="current==0?'':'footer-fixed'">
- <view @click="operate" class="cu-btn df btn-bg-color radius " style="width: 90%;height: 80rpx;">
- <text v-if="current==1">参加活动</text>
- <text v-if="current==2">退出活动</text>
- </view>
- </view>
- </block>
- <u-modal :show-cancel-button="true" confirm-color="#FF9447" @confirm="join" title="提示" :mask-close-able="true"
- v-model="modalShow">
- <view class="slot-content" style="margin: 20rpx;">
- <u-form label-width="150" ref="uForm">
- <u-form-item :border-bottom="false">
- <view class="flex center">
- <u-input style="width: 80%;" height="150" placeholder="请输入活动折扣(如输入9,表示9折)"
- v-model="discount" />
- <text class="center margin-left-10">折</text>
- </view>
- </u-form-item>
- </u-form>
- </view>
- </u-modal>
- </view>
- </template>
- <script>
- import myBar from "@/components/my-bar.vue"
- export default {
- components: {
- myBar
- },
- onPageScroll(obj) {
- this.transparent = obj.scrollTop * 0.006;
- },
- filters: {
- // 名称超出显示省略号
- ellipsis(value) {
- if (!value) return '';
- if (value.length > 4) {
- return value.slice(0, 3) + '...'
- }
- return value
- }
- },
- data() {
- return {
- id: '',
- current: 0,
- transparent: '',
- //活动详情
- detail: {},
- //流程详情
- flowDetail: {},
- //审核历史
- open: true,
- historyList: [],
- //参加活动
- discount: '',
- joinRecords: [],
- isShowBtn: false,
- modalShow: false,
- //退出活动
- joinRecordId: ''
- }
- },
- onLoad(options) {
- this.id = options.id
- this.current = options.current
- this.joinRecordId = options.joinRecordId ? options.joinRecordId : ''
- if (!this.id) {
- this.$u.toast('系统错误')
- return
- }
- this.fetchDetail()
- this.getJoinRecord()
- },
- methods: {
- getJoinRecord() {
- let params = {
- activityId: this.id
- }
- this.$api.joinRecord.list(params).then(res => {
- this.joinRecords = res.data.records
- })
- },
- async getHistoryFlowList(processInstanceId) {
- this.$api.flow.historyFlowList({
- processInstanceId
- }).then(res => {
- this.historyList = res.data
- })
- },
- fetchDetail() {
- this.$api.activity.detail({
- id: this.id
- }).then(res => {
- this.detail = res.data
- if (!this.detail.auditStatus.includes('WAITING') && this.detail.auditStatus != this.$global
- .SHOP_AUDIT.FAIL &&this.current!=0) {
- this.isShowBtn = true
- }
- this.getHistoryFlowList(this.detail.processInstanceId)
- })
- },
- operate() {
- if (this.current == 0) {
- //暂时不需要停用活动这个操作
- } else if (this.current == 1) {
- this.modalShow = true
- } else if (this.current == 2) {
- this.exit()
- }
- },
- stop() {
- let item = this.$u.deepClone(this.detail)
- item.auditStatus = this.$global.SHOP_AUDIT.STOP
- this.$dialog.showModal('确定停用?').then(() => {
- this.$api.activity.stop(item).then(res => {
- if (res.success) {
- this.$util.isReloadAndBack()
- }
- })
- })
- },
- join() {
- let shop = this.$cache.get('selectedShop')
- let params = {
- activityId: this.id,
- joinType: this.$global.SHOP,
- joinId: this.vuex_shopId,
- joinName: shop.name,
- discount: this.discount ? (this.discount / 10) : this.detail.discount,
- joinLogo: shop.cover
- }
- this.$api.joinRecord.submit(params).then(res => {
- if (res.success) {
- this.$util.isReloadAndBack()
- }
- })
- },
- exit() {
- this.$dialog.showModal('确定退出活动?').then(() => {
- this.$api.joinRecord.remove(this.joinRecordId).then(res => {
- if (res.success) {
- this.$util.isReloadAndBack()
- }
- })
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .publish {
- overflow: hidden;
- border-radius: 10rpx;
- height: 320rpx;
- position: absolute;
- bottom: 20rpx;
- left: 0;
- right: 0;
- width: 90%;
- margin: 0 auto -50rpx;
- border-radius: 10rpx;
- box-shadow: 0rpx 16rpx 8rpx -8rpx #a8a8a8;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
- text {
- font-size: 26rpx;
- color: #797979;
- }
- }
- .clock {
- background-color: #FFFFFF;
- height: 80rpx;
- padding-bottom: 20rpx;
- display: flex;
- flex-direction: column;
- justify-content: flex-end;
- align-items: center;
- .tips {
- margin-top: 10rpx;
- font-size: 24rpx;
- color: #FF9447;
- }
- }
- .content {
- padding: 0rpx 30rpx 15rpx;
- background-color: #FFFFFF;
- .title {
- line-height: 50rpx;
- font-weight: 800;
- font-size: 32rpx;
- }
- .data {
- margin: 20rpx 0;
- color: #787878;
- }
- }
- .intro {
- margin-top: 15rpx;
- padding: 15rpx 30rpx;
- background-color: #FFFFFF;
- .desc {
- color: #9a9a9a;
- margin-top: 20rpx;
- line-height: 46rpx;
- font-size: 28rpx;
- }
- }
- .attend {
- margin-top: 15rpx;
- padding: 15rpx 0 15rpx 30rpx;
- background-color: #FFFFFF;
- .data {
- margin: 10rpx 20rpx 10rpx 0;
- $width: 80rpx;
- .item {
- width: 200rpx;
- height: $width;
- background-color: #f0f0f0;
- border-radius: 50rpx;
- display: flex;
- image {
- width: $width;
- height: $width;
- }
- view {
- padding-left: 10rpx;
- display: flex;
- flex-direction: column;
- justify-content: center;
- font-size: 20rpx;
- text:first-child {
- margin-bottom: 4rpx;
- }
- }
- }
- }
- }
- .history {
- background-color: #ffff;
- box-sizing: border-box;
- padding: 40rpx 20rpx 20rpx 50rpx;
- }
- .nav-title {
- font-weight: 300;
- font-size: 28upx;
- padding-top: 20rpx;
- line-height: 50rpx;
- }
- .content {
- box-shadow: 0 8rpx 10rpx rgba(234, 234, 234, 0.5), 8rpx 0rpx 10rpx rgba(234, 234, 234, .5), -8rpx 0rpx 10rpx rgba(234, 234, 234, .5);
- background-color: #FFFFFF;
- padding: 20rpx;
- border-radius: 10rpx;
- margin: 20rpx 0;
- }
- </style>
|