居民活动
This commit is contained in:
387
src/apps/AppActive/ActiveDetail.vue
Normal file
387
src/apps/AppActive/ActiveDetail.vue
Normal file
@@ -0,0 +1,387 @@
|
||||
<template>
|
||||
<div class="page" v-if="pageShow">
|
||||
<div class="header">
|
||||
<div class="user-info">
|
||||
<image class="user-name-bg" :src="info.avatar" />
|
||||
<div class="info">
|
||||
<div>{{ info.name }}</div>
|
||||
<p>{{ info.createTime }}<span v-if="info.userId == user.id" @click="del">删除帖子</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-content">{{ info.content }}</p>
|
||||
<div class="img-list" v-if="info.images.length">
|
||||
<img :src="item.url" :key="index" v-for="(item, index) in info.images" @click.stop="previewImage(info.images, item.url)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="reply-list">
|
||||
<div class="item" v-for="(item, index) in info.replyList" :key="index" @click="replyClick(item)">
|
||||
<div class="user-img">
|
||||
<img :src="item.headPortrait" alt="" />
|
||||
</div>
|
||||
<div class="item-info">
|
||||
<div class="user-info">
|
||||
<span class="user-name">{{ item.createUserName }}</span>
|
||||
<span class="time">{{ item.createTime }}</span>
|
||||
</div>
|
||||
<p class="text">
|
||||
<span v-if="item.lastReplyName"
|
||||
>回复<span class="color-365D92">{{ item.lastReplyName }}</span></span
|
||||
>{{ item.content }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="reply-bottom">
|
||||
<div class="input" @click="showReply = true">我来说两句…</div>
|
||||
<div class="support" @click="support()">
|
||||
<!-- <AiIcon icon="iconpraiseactive2x" size="18" v-if="info.mySupport == 1" style="vertical-align: middle" />
|
||||
<i class="iconfont" v-else></i>赞 -->
|
||||
</div>
|
||||
</div>
|
||||
<u-popup v-model="showReply" mode="bottom">
|
||||
<div class="reply-content">
|
||||
<u-input v-model.trim="content" type="textarea" :height="144" :auto-height="true" placeholder="写下你的想法…" placeholder-style="color:#999999;font-size:24rpx;" maxlength="1000" />
|
||||
<div class="btn">
|
||||
<span class="clear" @click="content = ''">清空内容</span>
|
||||
<span class="confirm" @click="confirmReply()">发表</span>
|
||||
</div>
|
||||
</div>
|
||||
</u-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'ActiveDetail',
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
pageShow: false,
|
||||
id: '',
|
||||
supportFlag: true,
|
||||
showReply: false,
|
||||
content: '',
|
||||
lastReplyId: '',
|
||||
lastReplyName: '',
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(query) {
|
||||
this.id = query.id
|
||||
this.getInfo()
|
||||
uni.$emit('refresh')
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo() {
|
||||
this.$loading()
|
||||
this.$http.post(`/app/apppostinfo/queryDetailById?id=${this.id}`).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
|
||||
if (res.data.images) {
|
||||
this.info.images = JSON.parse(res.data.images)
|
||||
} else {
|
||||
this.info.images = []
|
||||
}
|
||||
if (res.data.replyList.length) {
|
||||
res.data.replyList.map((item) => {
|
||||
item.createTime = item.createTime.substring(0, 19)
|
||||
})
|
||||
}
|
||||
uni.setNavigationBarTitle({ title: this.info.userId == this.user.id ? '我的帖子' : 'Ta的帖子' })
|
||||
this.$nextTick(() => {
|
||||
this.pageShow = true
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
support() {
|
||||
if (this.supportFlag) {
|
||||
this.supportFlag = false
|
||||
this.$http
|
||||
.post(`/app/apppostsupport/support`, {
|
||||
postId: this.id,
|
||||
createUserId: this.user.partyId,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
uni.$emit('refresh')
|
||||
this.supportFlag = true
|
||||
if (this.info.mySupport == 1) {
|
||||
this.info.mySupport = 0
|
||||
} else {
|
||||
this.info.mySupport = 1
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
confirmReply() {
|
||||
if (!this.content) {
|
||||
return this.$toast('请输入回复内容')
|
||||
}
|
||||
var params = {
|
||||
postId: this.id,
|
||||
content: this.content,
|
||||
createUserId: this.user.partyId,
|
||||
createUserName: this.user.realName,
|
||||
headPortrait: this.user.avatarUrl,
|
||||
lastReplyId: this.lastReplyId ? this.lastReplyId : '',
|
||||
lastReplyName: this.lastReplyName ? this.lastReplyName : '',
|
||||
}
|
||||
this.$http.post(`/app/apppostreply/addOrUpdate`, params).then((res) => {
|
||||
if (res.code == 0) {
|
||||
uni.$emit('refresh')
|
||||
this.$toast('提交成功')
|
||||
this.lastReplyId = ''
|
||||
this.lastReplyName = ''
|
||||
this.content = ''
|
||||
this.showReply = false
|
||||
this.getInfo()
|
||||
}
|
||||
})
|
||||
},
|
||||
replyClick(e) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `是否回复${e.createUserName}的评论?`,
|
||||
confirmText: '确定',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.$emit('refresh')
|
||||
this.showReply = true
|
||||
this.lastReplyId = e.id
|
||||
this.lastReplyName = e.createUserName
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
del() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `是否删除该帖子?`,
|
||||
confirmText: '确定',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.confirmDel()
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
confirmDel() {
|
||||
this.$http.post(`/app/apppostinfo/delete?id=${this.id}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$toast('删除成功')
|
||||
setTimeout(() => {
|
||||
uni.$emit('refresh')
|
||||
uni.navigateBack({ delta: 1 })
|
||||
}, 3000)
|
||||
}
|
||||
})
|
||||
},
|
||||
previewImage(images, img) {
|
||||
uni.previewImage({
|
||||
urls: images.map((v) => v.url),
|
||||
current: img,
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
.color-365D92 {
|
||||
color: #365d92;
|
||||
}
|
||||
.header {
|
||||
background-color: #fff;
|
||||
padding: 26px 30px 32px;
|
||||
.user-info {
|
||||
display: flex;
|
||||
margin-bottom: 32px;
|
||||
.user-name-bg {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
line-height: 64px;
|
||||
text-align: center;
|
||||
background: #4e8eee;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #fff;
|
||||
margin-right: 16px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.info {
|
||||
div {
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 26px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
p {
|
||||
font-size: 22px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
line-height: 22px;
|
||||
}
|
||||
span {
|
||||
color: #3376fd;
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.text-content {
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
line-height: 42px;
|
||||
word-break: break-all;
|
||||
}
|
||||
.img-list {
|
||||
margin-top: 16px;
|
||||
img {
|
||||
width: 224px;
|
||||
height: 224px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
img:nth-of-type(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.reply-list {
|
||||
padding: 0 32px 112px;
|
||||
.item {
|
||||
display: flex;
|
||||
padding: 32px 0;
|
||||
border-bottom: 2px solid #eee;
|
||||
.user-img {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
margin-right: 24px;
|
||||
img {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.item-info {
|
||||
width: calc(100% - 116px);
|
||||
}
|
||||
.user-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
.user-name {
|
||||
font-size: 30px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #365d92;
|
||||
line-height: 42px;
|
||||
}
|
||||
.time {
|
||||
font-size: 22px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
line-height: 42px;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #333;
|
||||
line-height: 40px;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
}
|
||||
.reply-bottom {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 104px;
|
||||
padding: 22px 30px 24px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
font-size: 30px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #333;
|
||||
line-height: 58px;
|
||||
.input {
|
||||
display: inline-block;
|
||||
width: 580px;
|
||||
height: 58px;
|
||||
line-height: 58px;
|
||||
text-align: center;
|
||||
background: #f0f0f0;
|
||||
border-radius: 30px;
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #666;
|
||||
margin-right: 42px;
|
||||
}
|
||||
.support {
|
||||
display: inline-block;
|
||||
}
|
||||
.iconfont {
|
||||
display: inline-block;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
font-size: 36px;
|
||||
color: #333;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
.reply-content {
|
||||
width: 100%;
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
::v-deep .u-input {
|
||||
background-color: #f7f7f7 !important;
|
||||
border-radius: 8px !important;
|
||||
padding: 24px !important;
|
||||
font-size: 26px !important;
|
||||
}
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 24px 0;
|
||||
span {
|
||||
line-height: 64px;
|
||||
}
|
||||
.clear {
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #666;
|
||||
}
|
||||
.confirm {
|
||||
width: 144px;
|
||||
height: 64px;
|
||||
text-align: center;
|
||||
background: #135ab8;
|
||||
border-radius: 32px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,25 +0,0 @@
|
||||
<template>
|
||||
<div class="Add">Add</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Add',
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.Add {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
466
src/apps/AppActive/AddActive.vue
Normal file
466
src/apps/AppActive/AddActive.vue
Normal file
@@ -0,0 +1,466 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="textarea-div border">
|
||||
<div class="title mar-b32"><span>*</span>活动标题</div>
|
||||
<div class="pad-l20">
|
||||
<u-input type="textarea" v-model="params.title" :border="false" height="44" :auto-height="true" placeholder="请输入标题(60字以内)" :placeholder-style="placeholderStyle" maxlength="60" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="textarea-div mar-b16">
|
||||
<div class="title mar-b32"><span>*</span>活动详情</div>
|
||||
<div class="pad-l20">
|
||||
<u-input type="textarea" v-model="params.content" :border="false" :height="140" :auto-height="true" placeholder="请输入活动详情(500字以内)" :placeholder-style="placeholderStyle" maxlength="500" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="textarea-div mar-b16">
|
||||
<div class="title mar-b32"><span>*</span>活动封面图</div>
|
||||
<div class="pad-l20">
|
||||
<AiUploader v-model="files"></AiUploader>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-div">
|
||||
<div class="border-content border">
|
||||
<div class="title"><span>*</span>活动主题</div>
|
||||
<div class="value" @click="selectClick(topicList, 'target')">
|
||||
<span :class="params.target ? '' : 'color-999'">{{ params.target || '请选择' }}</span>
|
||||
<img src="https://cdn.cunwuyun.cn/img/right-icon-999.png" alt="" class="right-icon" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-div">
|
||||
<div class="border-content border">
|
||||
<div class="title"><span>*</span>活动类型</div>
|
||||
<div class="value" @click="selectClick(activeTypeList, 'type')">
|
||||
<span :class="params.type ? '' : 'color-999'">{{ params.type || '请选择' }}</span>
|
||||
<img src="https://cdn.cunwuyun.cn/img/right-icon-999.png" alt="" class="right-icon" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-div">
|
||||
<div class="border-content border">
|
||||
<div class="title"><span>*</span>报名范围</div>
|
||||
<div class="value" @click="selectClick($dict.getDict('activityScope'), 'scope')">
|
||||
<span :class="params.scope === '' ? 'color-999' : ''">{{ $dict.getLabel('activityScope', params.scope) || '请选择' }}</span>
|
||||
<img src="https://cdn.cunwuyun.cn/img/right-icon-999.png" alt="" class="right-icon" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-div" v-if="params.scope == 1">
|
||||
<div class="border-content border">
|
||||
<div class="title"><span>*</span>发布单位</div>
|
||||
<div class="value">
|
||||
<AIsEarchPopup title="请选择发布单位" placeholder="搜索单位名称" :ops="{ label: 'name', search: 'name' }" url="/admin/partyOrganization/queryPartyOrganizationListByName" @select="(v) => (selectedOrg = v)">
|
||||
<div class="picker-input" slot="btn">
|
||||
<view class="uni-input color-999" v-if="!selectedOrg.id">请选择</view>
|
||||
<view class="uni-input" v-else>{{ selectedOrg.name }}</view>
|
||||
<image src="https://cdn.cunwuyun.cn/img/right-icon-999.png" class="right-icon"></image>
|
||||
</div>
|
||||
</AIsEarchPopup>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input-div" v-if="params.scope == 2">
|
||||
<div class="border-content border">
|
||||
<div class="title"><span>*</span>发布小区</div>
|
||||
<div class="value" @click="estateSelect = true">
|
||||
<span :class="params.communityName ? '' : 'color-999'">{{ params.communityName || '请选择' }}</span>
|
||||
<img src="https://cdn.cunwuyun.cn/img/right-icon-999.png" alt="" class="right-icon" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<u-select v-model="estateSelect" mode="mutil-column-auto" :list="estateTreeData" @confirm="handleBindEstate" value-name="id" label-name="name" />
|
||||
|
||||
<div class="input-div mar-b16">
|
||||
<div class="border-content">
|
||||
<div class="title"><span>*</span>活动名额</div>
|
||||
<div class="value">
|
||||
<u-input type="input" v-model="params.total" :border="false" :height="44" :auto-height="true" placeholder="如不限制人数,填写0" input-align="right" :placeholder-style="placeholderStyle" maxlength="5" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-div">
|
||||
<div class="border-content border">
|
||||
<div class="title"><span>*</span>开始时间</div>
|
||||
<div class="value" @click="selectDate('beginTime')">
|
||||
<span :class="params.beginTime ? '' : 'color-999'">{{ params.beginTime || '请选择' }}</span>
|
||||
<img src="https://cdn.cunwuyun.cn/img/right-icon-999.png" alt="" class="right-icon" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-div">
|
||||
<div class="border-content border">
|
||||
<div class="title"><span>*</span>结束时间</div>
|
||||
<div class="value" @click="selectDate('endTime')">
|
||||
<span :class="params.endTime ? '' : 'color-999'">{{ params.endTime || '请选择' }}</span>
|
||||
<img src="https://cdn.cunwuyun.cn/img/right-icon-999.png" alt="" class="right-icon" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-div">
|
||||
<div class="border-content border">
|
||||
<div class="title"><span>*</span>报名截止时间</div>
|
||||
<div class="value" @click="selectDate('stopSignupTime')">
|
||||
<span :class="params.stopSignupTime ? '' : 'color-999'">{{ params.stopSignupTime || '请选择' }}</span>
|
||||
<img src="https://cdn.cunwuyun.cn/img/right-icon-999.png" alt="" class="right-icon" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-div mar-b16">
|
||||
<div class="border-content">
|
||||
<div class="title"><span>*</span>活动地点</div>
|
||||
<div class="value">
|
||||
<input type="text" maxlength="20" v-model="params.address" :border="false" :height="44" :auto-height="true" placeholder="请输入" input-align="right" :placeholder-style="placeholderStyle" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-div">
|
||||
<div class="border-content border">
|
||||
<div class="title"><span>*</span>联系人</div>
|
||||
<div class="value">
|
||||
<u-input type="input" v-model="params.contactPerson" :border="false" :height="44" :auto-height="true" placeholder="请输入" input-align="right" :placeholder-style="placeholderStyle" maxlength="10" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-div mar-b16 pad-b220">
|
||||
<div class="border-content">
|
||||
<div class="title"><span>*</span>联系方式</div>
|
||||
<div class="value">
|
||||
<u-input type="input" v-model="params.contactPhone" :border="false" :height="44" :auto-height="true" placeholder="请输入" input-align="right" :placeholder-style="placeholderStyle" maxlength="11" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-btn">
|
||||
<div class="btn" @click="add">保存</div>
|
||||
</div>
|
||||
|
||||
<u-select v-model="showSelect" :list="selectList" label-name="dictName" value-name="dictValue" @confirm="selectConfirm"></u-select>
|
||||
<u-picker mode="time" v-model="showDate" :start-year="startYear" @confirm="dateConfirm" :params="timeParams"></u-picker>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AddActive',
|
||||
components: {},
|
||||
computed: {
|
||||
...mapState(['user', 'global']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
files: [],
|
||||
showSelect: false,
|
||||
selectList: [],
|
||||
topicList: [], //活动主题分类
|
||||
activeTypeList: [],
|
||||
selectData: '',
|
||||
showDate: false,
|
||||
startYear: '',
|
||||
beginTimestamp: '',
|
||||
params: {
|
||||
title: '',
|
||||
content: '',
|
||||
url: '',
|
||||
target: '',
|
||||
type: '',
|
||||
scope: '',
|
||||
total: '',
|
||||
address: '',
|
||||
beginTime: '',
|
||||
endTime: '',
|
||||
stopSignupTime: '',
|
||||
contactPerson: '',
|
||||
contactPhone: '',
|
||||
status: 0,
|
||||
createUserId: '',
|
||||
createUserName: '',
|
||||
orgName: '',
|
||||
avatar: '',
|
||||
id: '',
|
||||
orgId: '',
|
||||
orgName: '',
|
||||
communityId: '',
|
||||
communityName: '',
|
||||
},
|
||||
timeParams: {
|
||||
year: true,
|
||||
month: true,
|
||||
day: true,
|
||||
hour: true,
|
||||
minute: true,
|
||||
second: true,
|
||||
timestamp: true,
|
||||
},
|
||||
placeholderStyle: 'color:#999;font-size:16px;',
|
||||
selectedOrg: {},
|
||||
estateTreeData: [],
|
||||
estateSelect: false,
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.$dict.load('activityScope').then(() => {
|
||||
this.getTopicList()
|
||||
console.log(option)
|
||||
if (option.id) {
|
||||
uni.setNavigationBarTitle({ title: '编辑活动' })
|
||||
this.params.id = option.id
|
||||
this.getDetail()
|
||||
} else {
|
||||
this.params.contactPerson = this.user.realName
|
||||
this.params.contactPhone = this.user.phone
|
||||
}
|
||||
})
|
||||
var date = new Date()
|
||||
this.startYear = date.getFullYear()
|
||||
this.getEstates()
|
||||
},
|
||||
methods: {
|
||||
getEstates() {
|
||||
this.$http.post(`/app/appvanguardcommunityinfo/getTree?type=1&areaId=${this.global.areaId}`).then((res) => {
|
||||
if (res?.data) {
|
||||
this.estateTreeData = res.data?.children
|
||||
}
|
||||
})
|
||||
},
|
||||
handleBindEstate(e) {
|
||||
this.params.communityId = e[2].value
|
||||
this.params.communityName = e[2].label
|
||||
},
|
||||
getDetail() {
|
||||
this.$http.post(`/app/appactivityinfo/queryDetailById?id=${this.params.id}`).then((res) => {
|
||||
if (res?.data) {
|
||||
this.files = [
|
||||
{
|
||||
url: res.data.url,
|
||||
},
|
||||
]
|
||||
this.params = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getTopicList() {
|
||||
this.$http.post(`/app/appactivitytopic/list?status=1&size=1000`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
res.data.records.map((item) => {
|
||||
;(item.dictName = item.name), (item.dictValue = item.content)
|
||||
})
|
||||
this.topicList = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
selectClick(list, data) {
|
||||
if (data == 'type' && !list.length) {
|
||||
//活动类型
|
||||
return this.$toast('请先选择活动主题')
|
||||
}
|
||||
this.selectData = data
|
||||
this.selectList = list
|
||||
this.showSelect = true
|
||||
},
|
||||
selectConfirm(e) {
|
||||
console.log(e)
|
||||
if (this.selectData == 'target' || this.selectData == 'type') {
|
||||
this.params[this.selectData] = e[0].label
|
||||
} else {
|
||||
this.params[this.selectData] = e[0].value
|
||||
}
|
||||
|
||||
if (this.selectData == 'target') {
|
||||
//选择主题分类
|
||||
var content = e[0].value.split(',')
|
||||
this.activeTypeList = []
|
||||
this.type = ''
|
||||
content.map((items) => {
|
||||
var info = { dictName: items }
|
||||
this.activeTypeList.push(info)
|
||||
})
|
||||
}
|
||||
},
|
||||
selectDate(data) {
|
||||
if (data == 'endTime' && !this.params.beginTime) {
|
||||
return this.$toast('请先选择活动开始时间')
|
||||
}
|
||||
if (data == 'stopSignupTime' && !this.params.beginTime) {
|
||||
return this.$toast('请先选择活动开始时间')
|
||||
}
|
||||
this.selectData = data
|
||||
this.showDate = true
|
||||
},
|
||||
dateConfirm(e) {
|
||||
console.log(e)
|
||||
if (this.selectData == 'beginTime') {
|
||||
this.beginTimestamp = e.timestamp
|
||||
this.params.endTime = ''
|
||||
this.params.stopSignupTime = ''
|
||||
}
|
||||
if (this.selectData == 'endTime' && e.timestamp < this.beginTimestamp) {
|
||||
return this.$toast('活动结束时间不能晚于开始时间')
|
||||
}
|
||||
|
||||
if (this.selectData == 'stopSignupTime' && e.timestamp > this.beginTimestamp) {
|
||||
return this.$toast('报名截止时间不能早于开始时间')
|
||||
}
|
||||
this.params[this.selectData] = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`
|
||||
},
|
||||
add() {
|
||||
if (!this.params.title) {
|
||||
return this.$toast('请输入活动标题')
|
||||
}
|
||||
if (!this.params.content) {
|
||||
return this.$toast('请输入活动标题')
|
||||
}
|
||||
if (!this.files.length) {
|
||||
return this.$toast('请上传活动封面')
|
||||
}
|
||||
if (!this.params.target) {
|
||||
return this.$toast('请选择活动主题')
|
||||
}
|
||||
if (!this.params.type) {
|
||||
return this.$toast('请选择活动类型')
|
||||
}
|
||||
if (this.params.scope === '') {
|
||||
return this.$toast('请选择报名范围')
|
||||
}
|
||||
if (this.params.scope == 1 && !this.selectedOrg.id) {
|
||||
return this.$toast('请选择发布单位')
|
||||
}
|
||||
if (this.params.scope == 2 && !this.params.communityId) {
|
||||
return this.$toast('请选择发布小区')
|
||||
}
|
||||
|
||||
if (!this.params.total) {
|
||||
return this.$toast('请输入活动名额')
|
||||
}
|
||||
if (!this.params.address) {
|
||||
return this.$toast('请输入活动地点')
|
||||
}
|
||||
if (!this.params.beginTime) {
|
||||
return this.$toast('请选择开始时间')
|
||||
}
|
||||
if (!this.params.endTime) {
|
||||
return this.$toast('请选择结束时间')
|
||||
}
|
||||
if (!this.params.stopSignupTime) {
|
||||
return this.$toast('请选择报名截止时间')
|
||||
}
|
||||
if (!this.params.contactPerson) {
|
||||
return this.$toast('请输入联系人')
|
||||
}
|
||||
if (!this.params.contactPhone) {
|
||||
return this.$toast('请输入联系方式')
|
||||
}
|
||||
if (this.params.scope == 1) {
|
||||
this.params.orgId = this.selectedOrg.id
|
||||
this.params.orgName = this.selectedOrg.name
|
||||
}
|
||||
this.params.url = this.files[0].url
|
||||
this.params.createUserId = this.user.partyId
|
||||
this.params.createUserName = this.user.realName
|
||||
this.params.orgName = this.user.partyOrgName
|
||||
this.params.avatar = this.user.avatarUrl
|
||||
this.confirmAdd()
|
||||
},
|
||||
confirmAdd() {
|
||||
this.$http.post(`/app/appactivityinfo/addOrUpdate`, this.params).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$toast(this.params.id ? '活动编辑成功' : '活动新增成功')
|
||||
setTimeout(() => {
|
||||
uni.$emit('refresh')
|
||||
uni.navigateBack()
|
||||
}, 2000)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.textarea-div {
|
||||
width: 100%;
|
||||
padding: 32px 32px 38px 32px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
}
|
||||
.input-div {
|
||||
width: 100%;
|
||||
padding-left: 32px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
.border-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 44px;
|
||||
color: #333;
|
||||
padding: 34px 32px 34px 0;
|
||||
.right-icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-left: 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.color-999 {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
.title {
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
span {
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #ff4466;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
.border {
|
||||
border-bottom: 2px solid #ddd;
|
||||
}
|
||||
.mar-b32 {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
.pad-l20 {
|
||||
padding-left: 20px;
|
||||
}
|
||||
.mar-b16 {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.pad-b220 {
|
||||
padding-bottom: 220px;
|
||||
}
|
||||
.footer-btn {
|
||||
width: 100%;
|
||||
padding: 116px 32px 32px;
|
||||
box-sizing: border-box;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: #f3f6f9;
|
||||
z-index: 99;
|
||||
.btn {
|
||||
width: 100%;
|
||||
height: 92px;
|
||||
line-height: 92px;
|
||||
text-align: center;
|
||||
background: #1365dd;
|
||||
border-radius: 8px;
|
||||
font-size: 34px;
|
||||
color: #fff;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
.value {
|
||||
width: calc(100% - 240px);
|
||||
text-align: right;
|
||||
}
|
||||
::v-deep ai-search-popup {
|
||||
width: 100%;
|
||||
.uni-input {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
137
src/apps/AppActive/AddPosts.vue
Normal file
137
src/apps/AppActive/AddPosts.vue
Normal file
@@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="textarea-div mar-b16">
|
||||
<div class="title mar-b32"><span></span>帖子内容</div>
|
||||
<div class="pad-l20">
|
||||
<u-input v-model="form.content" type="textarea" :border="false" :height="140" :auto-height="true" placeholder="请输入内容(1000字以内)" placeholder-style="color:#999;font-size:16px;" maxLength="140" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="textarea-div pad-b208">
|
||||
<div class="title mar-b32"><span></span>图片(最多9张)</div>
|
||||
<div class="pad-l20">
|
||||
<AiUploader :limit="9" v-model="form.images"></AiUploader>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-btn">
|
||||
<div class="btn" @click="addPost">立即发布</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AddPosts',
|
||||
components: {},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
files: [],
|
||||
id: '',
|
||||
flag: false,
|
||||
form: {
|
||||
content: '',
|
||||
images: [],
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(o) {
|
||||
this.id = o.id || ''
|
||||
},
|
||||
methods: {
|
||||
addPost() {
|
||||
if (this.flag) return
|
||||
|
||||
if (!this.form.content && !this.form.images.length) {
|
||||
return this.$u.toast('帖子内容不能为空')
|
||||
}
|
||||
this.flag = true
|
||||
|
||||
let imagesList = []
|
||||
if (this.form.images) {
|
||||
this.form.images.map((item) => {
|
||||
imagesList.push({ id: item.id, url: item.url })
|
||||
})
|
||||
}
|
||||
|
||||
this.$http
|
||||
.post(`/app/apppostinfo/addOrUpdate`, {
|
||||
content: this.form.content,
|
||||
avatar: this.user.avatarUrl,
|
||||
name: this.user.realName,
|
||||
phone: this.user.phone ? this.user.phone : '',
|
||||
userId: this.user.partyId,
|
||||
activityId: this.id,
|
||||
images: JSON.stringify(imagesList),
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast('发布成功')
|
||||
this.flag = false
|
||||
uni.$emit('refresh')
|
||||
uni.navigateBack()
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.textarea-div {
|
||||
width: 100%;
|
||||
padding: 32px 32px 38px 32px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
}
|
||||
.title {
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
span {
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #ff4466;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
.border {
|
||||
border-bottom: 2px solid #ddd;
|
||||
}
|
||||
.mar-b32 {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
.pad-l20 {
|
||||
padding-left: 20px;
|
||||
}
|
||||
.mar-b16 {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.pad-b208 {
|
||||
padding-bottom: 208px;
|
||||
}
|
||||
.footer-btn {
|
||||
width: 100%;
|
||||
padding: 116px 32px 32px;
|
||||
box-sizing: border-box;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: #f3f6f9;
|
||||
z-index: 99;
|
||||
.btn {
|
||||
width: 100%;
|
||||
height: 92px;
|
||||
line-height: 92px;
|
||||
text-align: center;
|
||||
background: #1365dd;
|
||||
border-radius: 8px;
|
||||
font-size: 34px;
|
||||
color: #fff;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,178 +1,372 @@
|
||||
<template>
|
||||
<div class="AppActive">
|
||||
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
|
||||
|
||||
<div class="dataTop">
|
||||
<div class="dataLeft">活动列表</div>
|
||||
|
||||
<div class="dataRight">
|
||||
<span>共</span>
|
||||
<span class="specialColor">12</span>
|
||||
<span>个活动</span>
|
||||
<div class="page">
|
||||
<div class="po-f">
|
||||
<view class="nav-box flex-row">
|
||||
<view
|
||||
class="nav-item"
|
||||
:class="tabIndex == index ? 'active' : ''"
|
||||
v-for="(item, index) in tabList"
|
||||
:key="index"
|
||||
@click="tabClick(index)"
|
||||
>{{ item }}<span></span
|
||||
></view>
|
||||
</view>
|
||||
<div v-if="tabIndex == 0" class="header-tab">
|
||||
<div class="header-info" v-if="newsList.length">
|
||||
<span class="tips">公告</span>
|
||||
<div class="text-content">
|
||||
<u-notice-bar @click="noticeClick"
|
||||
mode="vertical"
|
||||
:list="newsList"
|
||||
:volume-icon="false"
|
||||
type="none"
|
||||
color="#333"
|
||||
></u-notice-bar>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-title">
|
||||
<p class="text">帖子列表</p>
|
||||
<!-- <div class="right-select" @click="showSelect=true">
|
||||
{{selectText}}<img src="../../static/img/right-icon-666.png" alt="" />
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="tabIndex == 1" class="header-tab">
|
||||
<div class="header-info">活动报名大于{{num}}人时组团成功,人数不足时活动失效。</div>
|
||||
<div class="header-title">
|
||||
<p class="text">活动列表</p>
|
||||
<div class="right-select" @click="showSelect=true">
|
||||
{{selectText}}<img src="./components/right-icon-666.png" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="tabIndex == 2" class="header-tab">
|
||||
<!-- <AiHeaderSearchBar placeholder="请输入活动标题或者地点" barBgColor="#fff" inputBgColor="#F5F5F5" inputColor="#333" inputPlaceholderColor="#999" searchIconColor="#ccc" @change="search"></AiHeaderSearchBar> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template v-if="datas.length < 1">
|
||||
<AiCard v-for="(item, i) in 6" :key="i" @click.native="toDetail(item, 1)">
|
||||
<template #custom>
|
||||
<div class="left">
|
||||
<div class="titles">【敬老爱幼】带你在洞庭湖兜兜风 寻觅江豚的身影</div>
|
||||
|
||||
<div class="nums">
|
||||
<span class="specialColor">6人</span>
|
||||
<span>已报名</span>
|
||||
<div class="list-content">
|
||||
<div v-if="tabIndex == 0" :class="isPadding ? 'pad-t308' : 'pad-t200'">
|
||||
<div class="forum-list">
|
||||
<div class="forum-item" v-for="(item, index) in list" :key="index" @click="toBBSDetail(item.id)">
|
||||
<div class="user-info">
|
||||
<image :src="item.avatar" class="user-name-bg"></image>
|
||||
<div class="info">
|
||||
<div>{{ item.name }}</div>
|
||||
<p>{{ item.createTime }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="times">
|
||||
<span class="timesCont">2021-12-16</span>
|
||||
|
||||
<span>| 2天</span>
|
||||
<p class="conent-text">{{ item.content }}</p>
|
||||
<div class="img-list" v-if="item.images.length">
|
||||
<image v-for="(img, i) in item.images" :key="i" :src="img.url" @click.stop="previewImage(item.images, img.url)" v-if="i<3">
|
||||
</div>
|
||||
<div class="bottom-icon">
|
||||
<div>
|
||||
<i class="iconfont"></i>
|
||||
<span>{{ item.viewNum }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<i class="iconfont"></i>
|
||||
<span>{{ item.replyNum }}</span>
|
||||
</div>
|
||||
<!-- <div @click.stop="support(item, index)">
|
||||
<AiIcon icon="iconpraiseactive2x" size="18" v-if="item.mySupport==1" style="vertical-align: middle;" />
|
||||
<i class="iconfont" v-else></i>
|
||||
<span>{{ item.supportNum }}</span>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div class="areaNmae">湖南省岳阳市岳阳县荣家湾镇六…湖南省岳阳市岳阳县荣家湾镇六…</div>
|
||||
</div>
|
||||
|
||||
<img src="./yan.jpg" alt="" />
|
||||
</template>
|
||||
</AiCard>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="tabIndex == 1" class="pad-t308">
|
||||
<div class="active-list mar-t32">
|
||||
<div class="active-item" v-for="(item, index) in list" :key="index" @click="toActiveDetail(item)">
|
||||
<div class="img-div">
|
||||
<div class="status" :class="'status'+item.status">{{ $dict.getLabel('newActivityStatus', item.status) }}</div>
|
||||
<img :src="item.url" alt="">
|
||||
</div>
|
||||
<div class="right-info">
|
||||
<p class="title">{{ item.title }}</p>
|
||||
<div class="time"><span>{{ item.realNum }}人</span>已报名</div>
|
||||
<div class="time">{{ item.beginTime }} </div>
|
||||
<div class="time address">{{ item.address }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="tabIndex == 2" class="pad-t200">
|
||||
<div class="active-list mar-t32">
|
||||
<div class="active-item" v-for="(item, index) in list" :key="index" @click="toActiveDetail(item)">
|
||||
<div class="img-div">
|
||||
<div class="status" :class="'status'+item.status">{{ $dict.getLabel('newActivityStatus', item.status) }}</div>
|
||||
<img :src="item.url" alt="">
|
||||
</div>
|
||||
<div class="right-info">
|
||||
<p class="title">{{ item.title }}</p>
|
||||
<div class="time"><span>{{ item.realNum }}人</span>已报名</div>
|
||||
<div class="time">{{ item.beginTime }} </div>
|
||||
<div class="time address">{{ item.address }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length"/>
|
||||
</div>
|
||||
<u-select v-model="showSelect" mode="mutil-column-auto" :list="selectList" @confirm="confirmSelect" />
|
||||
<!-- <img src="../../static/img/add-icon.png" alt="" class="add-icon" @click="toAdd"> -->
|
||||
|
||||
<AiFixedBtn>
|
||||
<div class="addBtn iconfont iconfont-iconfangda" @tap.stop="toAdd()" />
|
||||
</AiFixedBtn>
|
||||
|
||||
<u-back-top :scrollTop="scrollTop" :iconStyle="iconStyle" icon="arrow-up" :customStyle="customStyle" bottom="72" right="32"></u-back-top>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AppActive',
|
||||
name: 'AppActive',
|
||||
appName: '居民活动',
|
||||
components: {},
|
||||
props: {},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
datas: [],
|
||||
tabList: [
|
||||
{
|
||||
name: '全部活动',
|
||||
},
|
||||
{
|
||||
name: '我发布的',
|
||||
},
|
||||
],
|
||||
currentTabs: 0,
|
||||
current: 1,
|
||||
list: [],
|
||||
isMore: false,
|
||||
current: 0,
|
||||
pageShow: false,
|
||||
tabIndex: 0,
|
||||
tabList: ["论坛", "活动", "动态"],
|
||||
list: [],
|
||||
newsList: [],
|
||||
iconStyle: {
|
||||
fontSize: '56rpx',
|
||||
color: '#1365DD',
|
||||
fontWeight: '700'
|
||||
},
|
||||
customStyle: {
|
||||
width: '96rpx',
|
||||
height: '96rpx',
|
||||
backgroundColor: '#fff',
|
||||
boxShadow: '0px 8rpx 16rpx 0px rgba(0, 0, 0, 0.2)',
|
||||
},
|
||||
scrollTop: 0,
|
||||
supportFlag: true,
|
||||
num: '',
|
||||
title: '',
|
||||
selectText: '最新活动',
|
||||
showSelect: false,
|
||||
selectList: [{label: '最新活动'}, {label: '我的活动'}],
|
||||
noticeList: [],
|
||||
isPadding: false
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if(option.tabIndex) {
|
||||
this.tabIndex = option.tabIndex
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
onLoad() {
|
||||
this.getList()
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
getList() {},
|
||||
this.$dict.load(['newActivityStatus']).then(() => {
|
||||
this.getList()
|
||||
this.getActiveNum()
|
||||
})
|
||||
|
||||
change(index) {
|
||||
this.currentTabs = index
|
||||
uni.$on('refresh', () => {
|
||||
this.getListInit()
|
||||
})
|
||||
|
||||
this.getNewList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
search(v) {
|
||||
this.title = v
|
||||
this.getListInit()
|
||||
},
|
||||
confirmSelect(e) {
|
||||
this.selectText = e[0].label
|
||||
this.getListInit()
|
||||
},
|
||||
tabClick(index) {
|
||||
this.tabIndex = index
|
||||
this.getListInit()
|
||||
},
|
||||
|
||||
toBBSDetail (id) {
|
||||
uni.navigateTo({
|
||||
url: `./Detail?id=${id}`
|
||||
})
|
||||
},
|
||||
|
||||
toAdd () {
|
||||
if (this.tabIndex == 0) {
|
||||
uni.navigateTo({
|
||||
url: `./AddPosts`
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `./AddActive`
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
previewImage (images, img) {
|
||||
uni.previewImage({
|
||||
urls: images.map(v => v.url),
|
||||
current: img
|
||||
})
|
||||
},
|
||||
|
||||
getListInit() {
|
||||
this.current = 0
|
||||
this.isMore = false
|
||||
this.getList()
|
||||
},
|
||||
getList () {
|
||||
if (this.isMore) return
|
||||
|
||||
toAdd() {
|
||||
uni.navigateTo({ url: `./Add` })
|
||||
this.$loading()
|
||||
let url = this.tabIndex == 0 ? `/app/apppostinfo/list` : `/app/appactivityinfo/list`
|
||||
let params = `&searchUserId=${this.user.partyId}`
|
||||
|
||||
if(this.tabIndex == 1 && this.selectText == '我的活动') { //我的活动
|
||||
params = `&createUserId=${this.user.partyId}`
|
||||
}
|
||||
if (this.tabIndex == 2) {
|
||||
params = `&status=5&title=${this.title}`
|
||||
}
|
||||
|
||||
|
||||
this.$http.post(`${url}?size=10¤t=${this.current + 1}${params}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
if (!this.current) {
|
||||
this.list = []
|
||||
}
|
||||
|
||||
if (!res.data.records.length) {
|
||||
this.$hideLoading()
|
||||
this.isMore = true
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.pageShow = true
|
||||
})
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
const data = res.data.records.map(item => {
|
||||
if (this.tabIndex == 0) {
|
||||
if (item.images) {
|
||||
item.images = JSON.parse(item.images)
|
||||
}
|
||||
}
|
||||
|
||||
return item
|
||||
})
|
||||
|
||||
this.list.push(...data)
|
||||
this.current = this.current + 1
|
||||
|
||||
this.$hideLoading()
|
||||
this.$nextTick(() => {
|
||||
this.pageShow = true
|
||||
})
|
||||
} else {
|
||||
this.$hideLoading()
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$hideLoading()
|
||||
})
|
||||
},
|
||||
|
||||
toDetail(item) {
|
||||
uni.navigateTo({ url: `./Detail` })
|
||||
// uni.navigateTo({ url: `./Detail?id=${item.id}` })
|
||||
support(e, index) {
|
||||
if (this.supportFlag) {
|
||||
this.supportFlag = false;
|
||||
this.$http.post(`/app/apppostsupport/support`, {
|
||||
postId: e.id,
|
||||
createUserId: this.user.partyId
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.supportFlag = true
|
||||
if(e.mySupport == 1) {
|
||||
this.list[index].mySupport = 0
|
||||
this.list[index].supportNum = this.list[index].supportNum-1
|
||||
}else {
|
||||
this.list[index].mySupport = 1
|
||||
this.list[index].supportNum = this.list[index].supportNum+1
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
toActiveDetail(e) {
|
||||
uni.navigateTo({url: `./ActiveDetail?id=${e.id}`})
|
||||
},
|
||||
getActiveNum() {
|
||||
this.$http.post(`/app/appactivityconfig/queryDetail`).then(res => {
|
||||
if(res.code == 0) {
|
||||
this.num = res.data.num
|
||||
}
|
||||
})
|
||||
},
|
||||
getNewList() {
|
||||
this.$http.post(`/app/apppolicypromotion/listWechat`, {
|
||||
type: 3,
|
||||
areaId: this.$areaId,
|
||||
current: 1,
|
||||
size: 5
|
||||
}).then(res => {
|
||||
if(res.code == 0) {
|
||||
if(res.data && res.data.records.length) {
|
||||
this.isPadding = true
|
||||
this.noticeList = res.data.records
|
||||
res.data.records.map((item) => {
|
||||
this.newsList.push(item.title)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
noticeClick(e) {
|
||||
console.log(e)
|
||||
this.linkTo(`./notice?id=${this.noticeList[0].id}`)
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current = this.current + 1
|
||||
|
||||
onReachBottom (){
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
|
||||
onPageScroll(e) {
|
||||
this.scrollTop = e.scrollTop;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
uni-page-body {
|
||||
<style lang="scss" scoped>
|
||||
.po-f{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 99;
|
||||
}
|
||||
.pad-t200{
|
||||
padding-top: 200rpx;
|
||||
}
|
||||
.pad-t308{
|
||||
padding-top: 308rpx;
|
||||
}
|
||||
.header-tab{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.AppActive {
|
||||
height: 100%;
|
||||
background: #f3f6f9;
|
||||
.list-content{
|
||||
// padding-top: 96px;
|
||||
}
|
||||
|
||||
.dataTop {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 48px;
|
||||
margin-bottom: 8px;
|
||||
padding: 0 32px;
|
||||
.dataLeft {
|
||||
font-size: 38px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.dataRight {
|
||||
font-size: 28px;
|
||||
color: #666666;
|
||||
.specialColor {
|
||||
color: #4181ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .AiCard {
|
||||
background: #f3f6f9;
|
||||
.start {
|
||||
background: #fff;
|
||||
padding: 32px;
|
||||
border-radius: 16px;
|
||||
.fill {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// align-items: center;
|
||||
.left {
|
||||
width: calc(100% - 205px);
|
||||
// background: pink;
|
||||
.titles {
|
||||
margin-bottom: 8px;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
font-size: 30px;
|
||||
line-height: 1.3;
|
||||
word-break: break-all;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
.nums {
|
||||
.specialColor {
|
||||
color: #4181ff;
|
||||
}
|
||||
}
|
||||
.times {
|
||||
.timesCont {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.areaNmae {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
img {
|
||||
width: 182px;
|
||||
height: 182px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.AiFixedBtn {
|
||||
.AiFixedBtn {
|
||||
.movableArea {
|
||||
.addBtn {
|
||||
display: flex;
|
||||
@@ -190,5 +384,261 @@ uni-page-body {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav-box {
|
||||
background-color: #3671ee;
|
||||
height: 96px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
.active {
|
||||
display: block;
|
||||
position: relative;
|
||||
span {
|
||||
position: absolute;
|
||||
top: 78px;
|
||||
left: 50%;
|
||||
margin-left: -20px;
|
||||
width: 40px;
|
||||
height: 4px;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
.nav-item {
|
||||
flex: 1;
|
||||
color: #ffffff;
|
||||
font-size: 28px;
|
||||
line-height: 96px;
|
||||
text-align: center;
|
||||
}
|
||||
.header-info {
|
||||
width: 100%;
|
||||
height: 112px;
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
background: #fefaea;
|
||||
color: #FFA13E;
|
||||
font-size: 28px;
|
||||
.tips {
|
||||
display: inline-block;
|
||||
width: 104px;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
text-align: center;
|
||||
background: #ffa13e;
|
||||
border-radius: 16px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #fff;
|
||||
vertical-align: top;
|
||||
margin-right: 16px;
|
||||
}
|
||||
.text-content {
|
||||
display: inline-block;
|
||||
width: calc(100% - 122px);
|
||||
margin-top: -10px;
|
||||
}
|
||||
}
|
||||
.header-title {
|
||||
width: 100%;
|
||||
height: 108px;
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2px solid #f3f6f9;
|
||||
.text {
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
}
|
||||
.right-select {
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #666;
|
||||
line-height: 36px;
|
||||
img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-left: 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
.forum-item{
|
||||
padding: 26px 30px 28px;
|
||||
background-color: #fff;
|
||||
.user-info{
|
||||
display: flex;
|
||||
margin-bottom: 32px;
|
||||
.user-name-bg{
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
line-height: 64px;
|
||||
text-align: center;
|
||||
background: #4E8EEE;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFF;
|
||||
margin-right: 16px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.info{
|
||||
div{
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 26px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
p{
|
||||
font-size: 22px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
line-height: 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.conent-text{
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
line-height: 42px;
|
||||
word-break: break-all;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 4;
|
||||
line-clamp: 4;
|
||||
-webkit-box-orient: vertical;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.img-list{
|
||||
image {
|
||||
width: 224px;
|
||||
height: 224px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
img:nth-of-type(3n){
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
.bottom-icon{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.iconfont{
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
span{
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #333;
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.active-item{
|
||||
padding: 24px;
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
width: 686px;
|
||||
background: #FFF;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.02);
|
||||
border-radius: 4px;
|
||||
margin: 0 0 32px 32px;
|
||||
box-sizing: border-box;
|
||||
.img-div{
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
margin-right: 24px;
|
||||
position: relative;
|
||||
img{
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.status{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 44px;
|
||||
padding: 0 8px;
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #FFF;
|
||||
}
|
||||
.status0{
|
||||
background: #000;
|
||||
}
|
||||
.status1{
|
||||
background: #FF883C;
|
||||
}
|
||||
.status3{
|
||||
background: #1AAAFF;
|
||||
}
|
||||
.status2{
|
||||
background: #42D784;
|
||||
}
|
||||
.status4, .status5{
|
||||
background: #E4E4E4;
|
||||
}
|
||||
}
|
||||
.right-info{
|
||||
width: calc(100% - 224px);
|
||||
.title{
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
word-break: break-all;
|
||||
margin-bottom: 8px;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.time{
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #666;
|
||||
line-height: 36px;
|
||||
margin-bottom: 4px;
|
||||
word-break: break-all;
|
||||
span{
|
||||
color: #3376FD;
|
||||
}
|
||||
}
|
||||
.address{
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
}
|
||||
.add-icon{
|
||||
position: fixed;
|
||||
right: 16px;
|
||||
bottom: 160px;
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
}
|
||||
.mar-t32{
|
||||
margin-top: 32px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,25 +1,387 @@
|
||||
<template>
|
||||
<div class="Detail">Detail</div>
|
||||
<div class="page" v-if="pageShow">
|
||||
<div class="header">
|
||||
<div class="user-info">
|
||||
<image class="user-name-bg" :src="info.avatar" />
|
||||
<div class="info">
|
||||
<div>{{ info.name }}</div>
|
||||
<p>{{ info.createTime }}<span v-if="info.userId == user.id" @click="del">删除帖子</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-content">{{ info.content }}</p>
|
||||
<div class="img-list" v-if="info.images.length">
|
||||
<img :src="item.url" :key="index" v-for="(item, index) in info.images" @click.stop="previewImage(info.images, item.url)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="reply-list">
|
||||
<div class="item" v-for="(item, index) in info.replyList" :key="index" @click="replyClick(item)">
|
||||
<div class="user-img">
|
||||
<img :src="item.headPortrait" alt="" />
|
||||
</div>
|
||||
<div class="item-info">
|
||||
<div class="user-info">
|
||||
<span class="user-name">{{ item.createUserName }}</span>
|
||||
<span class="time">{{ item.createTime }}</span>
|
||||
</div>
|
||||
<p class="text">
|
||||
<span v-if="item.lastReplyName"
|
||||
>回复<span class="color-365D92">{{ item.lastReplyName }}</span></span
|
||||
>{{ item.content }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="reply-bottom">
|
||||
<div class="input" @click="showReply = true">我来说两句…</div>
|
||||
<div class="support" @click="support()">
|
||||
<!-- <AiIcon icon="iconpraiseactive2x" size="18" v-if="info.mySupport == 1" style="vertical-align: middle" />
|
||||
<i class="iconfont" v-else></i>赞 -->
|
||||
</div>
|
||||
</div>
|
||||
<u-popup v-model="showReply" mode="bottom">
|
||||
<div class="reply-content">
|
||||
<u-input v-model.trim="content" type="textarea" :height="144" :auto-height="true" placeholder="写下你的想法…" placeholder-style="color:#999999;font-size:24rpx;" maxlength="1000" />
|
||||
<div class="btn">
|
||||
<span class="clear" @click="content = ''">清空内容</span>
|
||||
<span class="confirm" @click="confirmReply()">发表</span>
|
||||
</div>
|
||||
</div>
|
||||
</u-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Detail',
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
return {}
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
pageShow: false,
|
||||
id: '',
|
||||
supportFlag: true,
|
||||
showReply: false,
|
||||
content: '',
|
||||
lastReplyId: '',
|
||||
lastReplyName: '',
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(query) {
|
||||
this.id = query.id
|
||||
this.getInfo()
|
||||
uni.$emit('refresh')
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo() {
|
||||
this.$loading()
|
||||
this.$http.post(`/app/apppostinfo/queryDetailById?id=${this.id}`).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
|
||||
if (res.data.images) {
|
||||
this.info.images = JSON.parse(res.data.images)
|
||||
} else {
|
||||
this.info.images = []
|
||||
}
|
||||
if (res.data.replyList.length) {
|
||||
res.data.replyList.map((item) => {
|
||||
item.createTime = item.createTime.substring(0, 19)
|
||||
})
|
||||
}
|
||||
uni.setNavigationBarTitle({ title: this.info.userId == this.user.id ? '我的帖子' : 'Ta的帖子' })
|
||||
this.$nextTick(() => {
|
||||
this.pageShow = true
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
support() {
|
||||
if (this.supportFlag) {
|
||||
this.supportFlag = false
|
||||
this.$http
|
||||
.post(`/app/apppostsupport/support`, {
|
||||
postId: this.id,
|
||||
createUserId: this.user.partyId,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
uni.$emit('refresh')
|
||||
this.supportFlag = true
|
||||
if (this.info.mySupport == 1) {
|
||||
this.info.mySupport = 0
|
||||
} else {
|
||||
this.info.mySupport = 1
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
confirmReply() {
|
||||
if (!this.content) {
|
||||
return this.$toast('请输入回复内容')
|
||||
}
|
||||
var params = {
|
||||
postId: this.id,
|
||||
content: this.content,
|
||||
createUserId: this.user.partyId,
|
||||
createUserName: this.user.realName,
|
||||
headPortrait: this.user.avatarUrl,
|
||||
lastReplyId: this.lastReplyId ? this.lastReplyId : '',
|
||||
lastReplyName: this.lastReplyName ? this.lastReplyName : '',
|
||||
}
|
||||
this.$http.post(`/app/apppostreply/addOrUpdate`, params).then((res) => {
|
||||
if (res.code == 0) {
|
||||
uni.$emit('refresh')
|
||||
this.$toast('提交成功')
|
||||
this.lastReplyId = ''
|
||||
this.lastReplyName = ''
|
||||
this.content = ''
|
||||
this.showReply = false
|
||||
this.getInfo()
|
||||
}
|
||||
})
|
||||
},
|
||||
replyClick(e) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `是否回复${e.createUserName}的评论?`,
|
||||
confirmText: '确定',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.$emit('refresh')
|
||||
this.showReply = true
|
||||
this.lastReplyId = e.id
|
||||
this.lastReplyName = e.createUserName
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
del() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `是否删除该帖子?`,
|
||||
confirmText: '确定',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.confirmDel()
|
||||
}
|
||||
},
|
||||
})
|
||||
},
|
||||
confirmDel() {
|
||||
this.$http.post(`/app/apppostinfo/delete?id=${this.id}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$toast('删除成功')
|
||||
setTimeout(() => {
|
||||
uni.$emit('refresh')
|
||||
uni.navigateBack({ delta: 1 })
|
||||
}, 3000)
|
||||
}
|
||||
})
|
||||
},
|
||||
previewImage(images, img) {
|
||||
uni.previewImage({
|
||||
urls: images.map((v) => v.url),
|
||||
current: img,
|
||||
})
|
||||
},
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.Detail {
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
.color-365D92 {
|
||||
color: #365d92;
|
||||
}
|
||||
.header {
|
||||
background-color: #fff;
|
||||
padding: 26px 30px 32px;
|
||||
.user-info {
|
||||
display: flex;
|
||||
margin-bottom: 32px;
|
||||
.user-name-bg {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
line-height: 64px;
|
||||
text-align: center;
|
||||
background: #4e8eee;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #fff;
|
||||
margin-right: 16px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.info {
|
||||
div {
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 26px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
p {
|
||||
font-size: 22px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
line-height: 22px;
|
||||
}
|
||||
span {
|
||||
color: #3376fd;
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.text-content {
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
line-height: 42px;
|
||||
word-break: break-all;
|
||||
}
|
||||
.img-list {
|
||||
margin-top: 16px;
|
||||
img {
|
||||
width: 224px;
|
||||
height: 224px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
img:nth-of-type(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.reply-list {
|
||||
padding: 0 32px 112px;
|
||||
.item {
|
||||
display: flex;
|
||||
padding: 32px 0;
|
||||
border-bottom: 2px solid #eee;
|
||||
.user-img {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
margin-right: 24px;
|
||||
img {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.item-info {
|
||||
width: calc(100% - 116px);
|
||||
}
|
||||
.user-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
.user-name {
|
||||
font-size: 30px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #365d92;
|
||||
line-height: 42px;
|
||||
}
|
||||
.time {
|
||||
font-size: 22px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
line-height: 42px;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #333;
|
||||
line-height: 40px;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
}
|
||||
.reply-bottom {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 104px;
|
||||
padding: 22px 30px 24px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
font-size: 30px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #333;
|
||||
line-height: 58px;
|
||||
.input {
|
||||
display: inline-block;
|
||||
width: 580px;
|
||||
height: 58px;
|
||||
line-height: 58px;
|
||||
text-align: center;
|
||||
background: #f0f0f0;
|
||||
border-radius: 30px;
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #666;
|
||||
margin-right: 42px;
|
||||
}
|
||||
.support {
|
||||
display: inline-block;
|
||||
}
|
||||
.iconfont {
|
||||
display: inline-block;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
font-size: 36px;
|
||||
color: #333;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
.reply-content {
|
||||
width: 100%;
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
::v-deep .u-input {
|
||||
background-color: #f7f7f7 !important;
|
||||
border-radius: 8px !important;
|
||||
padding: 24px !important;
|
||||
font-size: 26px !important;
|
||||
}
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 24px 0;
|
||||
span {
|
||||
line-height: 64px;
|
||||
}
|
||||
.clear {
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #666;
|
||||
}
|
||||
.confirm {
|
||||
width: 144px;
|
||||
height: 64px;
|
||||
text-align: center;
|
||||
background: #135ab8;
|
||||
border-radius: 32px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
164
src/apps/AppActive/SignUser.vue
Normal file
164
src/apps/AppActive/SignUser.vue
Normal file
@@ -0,0 +1,164 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<!-- <div class="title">已签到(2)</div>
|
||||
<div class="user-list">
|
||||
<div class="item">
|
||||
<div class="item-border">
|
||||
<div class="left">
|
||||
<span class="user-name-bg">李毅</span>李毅
|
||||
</div>
|
||||
<div class="right">
|
||||
<span>157****8456</span>
|
||||
<img src="../../static/img/phone-icon.png" alt="">
|
||||
<img src="../../static/img/del-icon.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title">未签到(3)</div> -->
|
||||
<div class="user-list" v-for="(item, index) in list" :key="index">
|
||||
<div class="item">
|
||||
<div class="item-border">
|
||||
<div class="left">
|
||||
<span class="user-name-bg">{{$formatName(item.name)}}</span>{{item.name}}
|
||||
</div>
|
||||
<div class="right">
|
||||
<span>{{formatPhone(item.phone)}}</span>
|
||||
<img src="./components/phone-icon.png" alt="" v-if="isAdmin" @click="callPhone(item.phone)">
|
||||
<img src="./components/del-icon.png" alt="" v-if="isAdmin && status < 2" @click="del(item.id)">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty description="暂无活动报名人员" v-if="!list.length" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isAdmin: 0,
|
||||
id: '',
|
||||
list: [],
|
||||
status: 0
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.id = option.id
|
||||
this.isAdmin = option.isAdmin
|
||||
this.status = Number(option.status)
|
||||
console.log(option)
|
||||
this.getUserList()
|
||||
},
|
||||
methods: {
|
||||
getUserList() {
|
||||
this.$http.post(`/app/appactivityuser/list?activityId=${this.id}&status=1`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.list = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
formatPhone(value) {
|
||||
const start = value.slice(0, 3)
|
||||
const end = value.slice(-4)
|
||||
return `${start}****${end}`
|
||||
},
|
||||
callPhone(phone) {
|
||||
uni.makePhoneCall({phoneNumber: phone})
|
||||
},
|
||||
del(id) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: `是否删除该报名人?`,
|
||||
confirmText: "确定",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.confirmDel(id)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
confirmDel(id) {
|
||||
this.$http.post(`/app/appactivityuser/removeReport`, {
|
||||
id: id
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$toast('删除成功')
|
||||
this.getUserList()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.title{
|
||||
width: 100%;
|
||||
height: 108px;
|
||||
line-height: 108px;
|
||||
background: #FFF;
|
||||
padding-left: 32px;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.item{
|
||||
padding: 0 32px;
|
||||
background-color: #fff;
|
||||
.item-border{
|
||||
border-bottom: 2px solid #ddd;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20px 0;
|
||||
.left{
|
||||
line-height: 80px;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
.user-name-bg{
|
||||
display: inline-block;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
line-height: 80px;
|
||||
text-align: center;
|
||||
background: #4E8EEE;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFF;
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
.right{
|
||||
span{
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #999;
|
||||
line-height: 80px;
|
||||
}
|
||||
img{
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: 50%;
|
||||
margin-left: 32px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.iconfont{
|
||||
display: inline-block;
|
||||
font-size: 26px;
|
||||
color: #3671EE;
|
||||
}
|
||||
.bg-blue{
|
||||
// width: 56px;
|
||||
// height: 56px;
|
||||
// background: #EAF0FD;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/apps/AppActive/components/del-icon.png
Normal file
BIN
src/apps/AppActive/components/del-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
src/apps/AppActive/components/phone-icon.png
Normal file
BIN
src/apps/AppActive/components/phone-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/apps/AppActive/components/right-icon-666.png
Normal file
BIN
src/apps/AppActive/components/right-icon-666.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 267 B |
Binary file not shown.
|
Before Width: | Height: | Size: 88 KiB |
Reference in New Issue
Block a user