运营活动
This commit is contained in:
@@ -24,9 +24,7 @@
|
||||
</div>
|
||||
|
||||
<div class="times">
|
||||
<span class="timesCont">{{ item.beginTime }}</span>
|
||||
|
||||
<span>至 {{ item.endTime }}</span>
|
||||
<span class="timesCont">{{ item.createTime }}</span>
|
||||
</div>
|
||||
|
||||
<div class="areaName" v-if="item.areaName || item.address">{{ item.areaName }}{{ item.address }}</div>
|
||||
@@ -44,6 +42,23 @@
|
||||
<!-- <AiFixedBtn>
|
||||
<div class="addBtn iconfont iconfont-iconfangda" @tap.stop="toAdd()" />
|
||||
</AiFixedBtn> -->
|
||||
<div class="add-btn" @click="toCalendar">
|
||||
<div>打卡</div>
|
||||
</div>
|
||||
<u-modal v-model="show" :show-cancel-button="true" @confirm="bindPhoneConfirm" @cancel="cancel">
|
||||
<div class="item">
|
||||
<span class="label"><span class="tips">*</span>手机号</span>
|
||||
<div class="value">
|
||||
<u-input type="tel" placeholder="请填写手机号" v-model="phone" input-align="right" placeholder-style="color:#999;font-size:15px;" height="42" :maxlength="11" :clearable="false" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="item">
|
||||
<span class="label"><span class="tips">*</span>验证码</span>
|
||||
<div class="value">
|
||||
<u-input type="tel" placeholder="请填写验证码" v-model="form.code" input-align="right" placeholder-style="color:#999;font-size:15px;" height="42" :maxlength="6" :clearable="false" />
|
||||
</div>
|
||||
</div> -->
|
||||
</u-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -61,6 +76,8 @@ export default {
|
||||
current: 1,
|
||||
size: 6,
|
||||
total: '',
|
||||
show: false,
|
||||
phone: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -68,14 +85,7 @@ export default {
|
||||
},
|
||||
watch: {},
|
||||
onLoad() {
|
||||
this.$dict.load(['villageActivityStatus']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
|
||||
uni.$on('updateList', () => {
|
||||
this.current = 1
|
||||
this.getList()
|
||||
})
|
||||
this.getList()
|
||||
},
|
||||
onShow() {
|
||||
document.title = '运营活动'
|
||||
@@ -86,8 +96,6 @@ export default {
|
||||
params: {
|
||||
size: this.size,
|
||||
current: this.current,
|
||||
// createUserId: this.currentTabs == 1 ? this.user.id : '',
|
||||
// areaId: this.user.areaId,
|
||||
},
|
||||
}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
@@ -99,28 +107,40 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
change(index) {
|
||||
this.datas = []
|
||||
this.current = 1
|
||||
this.currentTabs = index
|
||||
this.getList()
|
||||
},
|
||||
|
||||
toAdd() {
|
||||
uni.navigateTo({ url: `./Add` })
|
||||
},
|
||||
|
||||
toDetail(item) {
|
||||
uni.navigateTo({ url: `./Detail?id=${item.id}` })
|
||||
},
|
||||
|
||||
previewImage(images, img) {
|
||||
uni.previewImage({
|
||||
urls: images.map((v) => v.url),
|
||||
current: img,
|
||||
bindPhoneConfirm() {
|
||||
if(!this.phone) {
|
||||
return this.$u.toast('请输入手机号')
|
||||
}
|
||||
let regTel = /^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/
|
||||
if (!regTel.test(this.phone)) {
|
||||
return this.$u.toast('请输入正确的手机号')
|
||||
}
|
||||
|
||||
this.$http.post(`/appactivityinfo/bindPhone?phone=${this.phone}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.getUserInfo()
|
||||
this.$u.toast('绑定成功')
|
||||
}
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
this.phone = ''
|
||||
this.show = false
|
||||
},
|
||||
getUserInfo () {
|
||||
this.$http.post('/api/user/info').then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$store.commit('setUser', res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
toCalendar() {
|
||||
uni.navigateTo({url: './ActiveCalendar'})
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current = this.current + 1
|
||||
@@ -222,22 +242,22 @@ uni-page-body {
|
||||
}
|
||||
}
|
||||
|
||||
.AiFixedBtn {
|
||||
.movableArea {
|
||||
.addBtn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
flex-shrink: 0;
|
||||
background: $uni-color-primary;
|
||||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
|
||||
font-size: 48px;
|
||||
background: #fff;
|
||||
color: #1365dd;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.add-btn {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
div {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background: #3975C6;
|
||||
text-align: center;
|
||||
line-height: 100px;
|
||||
color: #fff;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,43 +1,15 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="header-content">
|
||||
<!-- <div class="header-top">
|
||||
<img :src="detail.url && detail.url[0].url" alt="" @click.stop="previewImage(detail.url, detail.url[0].url)" />
|
||||
</div> -->
|
||||
|
||||
<div class="header-middle">
|
||||
<div class="img-title">{{ detail.title }}</div>
|
||||
|
||||
<div class="header-middle-bottom">
|
||||
<div class="left">
|
||||
<div class="left-btn" :class="'status' + detail.status">{{ $dict.getLabel('villageActivityStatus', detail.status) }}</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<img :src="detail.avatar" alt="" v-if="detail.avatar" />
|
||||
<img src="./user-img.png" alt="" v-else />
|
||||
|
||||
<span v-if="detail.createUserName">{{ detail.createUserName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cards">
|
||||
<div class="cards-left">活动时间</div>
|
||||
<div class="cards-right">{{ detail.beginTime && detail.beginTime.substring(0, detail.beginTime.length - 3) }}至{{ detail.endTime && detail.beginTime.substring(0, detail.beginTime.length - 3) }}</div>
|
||||
</div>
|
||||
|
||||
<div class="cards">
|
||||
<div class="cards-left">活动人数</div>
|
||||
<div class="cards-right">
|
||||
<span style="color: #1c6bdf">{{ detail.signUpCount }}</span>
|
||||
</div>
|
||||
<div class="cards-left">发布时间</div>
|
||||
<div class="cards-right">{{ detail.createTime && detail.createTime.substring(0, detail.createTime.length - 9) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header-bottom">
|
||||
<div class="tab-title">
|
||||
<span>活动详情</span>
|
||||
</div>
|
||||
|
||||
<div class="content-details">
|
||||
<div v-html="detail.content"></div>
|
||||
</div>
|
||||
@@ -48,9 +20,6 @@
|
||||
<div class="add-btn" v-if="!detail.mySignUP" @click="signUp">
|
||||
<div>参与活动</div>
|
||||
</div>
|
||||
<div class="add-btn" v-else @click="toCalendar">
|
||||
<div>活动日历</div>
|
||||
</div>
|
||||
|
||||
|
||||
<u-modal v-model="show" :show-cancel-button="true" @confirm="bindPhoneConfirm" @cancel="cancel">
|
||||
|
||||
Reference in New Issue
Block a user