index bug

This commit is contained in:
花有清香月有阴
2021-12-23 10:31:10 +08:00
parent 8d52641c97
commit c635c55699
4 changed files with 67 additions and 25 deletions

View File

@@ -13,7 +13,7 @@
<div class="line"></div>
<u-form-item label="活动封面图" prop="fileIds" required :border-bottom="false" class="avatars" label-position="top">
<AiUploader :def.sync="forms.fileIds" multiple placeholder="上传图片" :limit="9"></AiUploader>
<AiUploader :def.sync="forms.fileIds" multiple placeholder="上传图片" :limit="1"></AiUploader>
</u-form-item>
<div class="line"></div>
@@ -194,11 +194,11 @@ export default {
this.flag = true
this.$http
.post(`/app/appvisitvondolence/addOrUpdate`, {
.post(`/app/appvillageactivityinfo/addOrUpdate`, {
title: this.forms.title,
content: this.forms.content,
// images: JSON.stringify(imgs) || [],
images: imgs || [],
images: JSON.stringify(imgs) || [],
// images: imgs || [],
status: this.forms.statusValue ? this.forms.statusValue : this.forms.status,
fanwe: this.forms.fanwe,
@@ -217,7 +217,7 @@ export default {
if (res.code == 0) {
this.$u.toast('发布成功')
this.flag = false
uni.navigateTo({ url: `./AppActive` })
uni.navigateTo({ url: `./AppResidentActivities` })
}
})
} else {
@@ -255,6 +255,7 @@ export default {
padding-bottom: 112px;
.header-description {
padding-bottom: 112px;
::v-deep .u-form {
.u-form-item {
padding: 0 45px !important;

View File

@@ -7,32 +7,32 @@
<div class="dataRight">
<span></span>
<span class="specialColor">12</span>
<span class="specialColor">{{ total }}</span>
<span>个活动</span>
</div>
</div>
<template v-if="datas.length > 0">
<AiCard v-for="(item, i) in 6" :key="i" @click.native="toDetail(item, 1)">
<AiCard v-for="(item, i) in datas" :key="i" @click.native="toDetail(item, 1)">
<template #custom>
<div class="left">
<div class="titles">敬老爱幼带你在洞庭湖兜兜风 寻觅江豚的身影</div>
<div class="titles">{{ item.title }}</div>
<div class="nums">
<span class="specialColor">6</span>
<span class="specialColor">{{ item.realNum }}</span>
<span>已报名</span>
</div>
<div class="times">
<span class="timesCont">2021-12-16</span>
<span class="timesCont">{{ item.beginTime }}</span>
<span>| 2</span>
</div>
<div class="areaNmae">湖南省岳阳市岳阳县荣家湾镇六湖南省岳阳市岳阳县荣家湾镇六</div>
<div class="areaNmae">{{ item.areaName }}</div>
</div>
<img src="./yan.jpg" alt="" />
<img :src="item.url[0].url" alt="" />
</template>
</AiCard>
</template>
@@ -44,6 +44,8 @@
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'AppResidentActivities',
appName: '居民活动',
@@ -62,16 +64,45 @@ export default {
],
currentTabs: 0,
current: 1,
size: 6,
total: '',
}
},
computed: {},
computed: {
...mapState(['user']),
},
watch: {},
onLoad() {
this.getList()
},
mounted() {},
methods: {
getList() {},
getList() {
this.$http
.post('/app/appvillageactivityinfo/list', null, {
params: {
size: this.size,
current: this.current,
createUserId: this.currentTabs == 1 ? this.user.id : '',
},
})
.then((res) => {
if (res.code == 0) {
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
this.total = res.data.total
this.pages = res.data.pages
if (this.datas) {
this.datas.map((item) => {
if (item.url) {
item.url = JSON.parse(item.url || '[]')
}
return item
})
}
}
})
},
change(index) {
this.currentTabs = index
@@ -83,8 +114,7 @@ export default {
},
toDetail(item) {
uni.navigateTo({ url: `./Detail` })
// uni.navigateTo({ url: `./Detail?id=${item.id}` })
uni.navigateTo({ url: `./Detail?id=${item.id}` })
},
},
onReachBottom() {
@@ -149,16 +179,19 @@ uni-page-body {
overflow: hidden;
}
.nums {
margin-top: 8px;
.specialColor {
color: #4181ff;
}
}
.times {
margin-top: 8px;
.timesCont {
margin-right: 10px;
}
}
.areaNmae {
margin-top: 8px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

View File

@@ -103,7 +103,7 @@
</div>
</div>
<div class="addicon" @click="toPublicPage()">
<!-- <div class="addicon" @click="toPublicPage()">
<u-icon name="plus" color="#1365DD" size="50"></u-icon>
</div>
@@ -129,21 +129,21 @@
<div class="btn" v-if="detail.realNum == detail.total && detail.status == 1 && detail.status == 1 && detail.total != 0">
<div class="max">已满员</div>
</div>
</div> -->
<div class="btn" v-if="detail.myReport == 1 && detail.status == 2">
<!-- <div class="btn" v-if="detail.myReport == 1 && detail.status == 2">
<div class="edit" @click="callPhone(detail.contactPhone)">联系负责人</div>
<div class="public" style="background: #ffd8df; color: #ff4466" v-if="detail.allow1 == 0">未签到</div>
<div class="public" style="background: #3671ee; color: #ffffff" v-if="detail.allow1 == 1" @click="sign(0)">签到</div>
<div class="public" style="background: #cbead9; color: #20bc65" v-if="detail.allow1 == 2">已签到</div>
</div>
</div> -->
<div class="btn" v-if="detail.status == 5">
<!-- <div class="btn" v-if="detail.status == 5">
<div class="edit" @click="callPhone(detail.contactPhone)">联系负责人</div>
<div class="public" style="background: #cbead9; color: #20bc65" v-if="detail.allow2 == 1" @click="sign(1)">离场签到</div>
<div class="public" style="background: #cbead9; color: #20bc65" v-if="detail.allow2 == 2">已离场签到</div>
<div class="public" style="background: #ffd8df; color: #ff4466" v-if="detail.allow2 == 0">未离场签到</div>
</div>
</div> -->
</div>
</template>
@@ -180,7 +180,7 @@ export default {
},
methods: {
getDetail() {
this.$instance.post(`/app/appactivityinfo/queryDetailById?id=${this.id}&partyId=${this.user.partyId}`).then((res) => {
this.$http.post(`/app/appactivityinfo/queryDetailById?id=${this.id}&partyId=${this.user.partyId}`).then((res) => {
if (res?.data) {
res.data.beginTime = res.data.beginTime.substring(0, 16)
res.data.endTime = res.data.endTime.substring(0, 16)
@@ -191,7 +191,7 @@ export default {
},
getActiveList() {
this.$instance.post(`/app/apppostinfo/list?activityId=${this.id}`).then((res) => {
this.$http.post(`/app/apppostinfo/list?activityId=${this.id}`).then((res) => {
if (res?.data) {
this.activeList = res.data.records

View File

@@ -136,6 +136,7 @@ export default {
props: {},
data() {
return {
index: '',
lists: [
{
iconPath: 'home',
@@ -198,9 +199,16 @@ export default {
...mapState(['user', 'global']),
},
watch: {},
onLoad() {
onLoad(o) {
if (o.index) {
this.indexBar = o.index
}
this.getEchart1()
this.getEchart2()
this.getList()
this.getList2()
this.currentTabBar = this.indexBar
this.areaId = this.user.areaId
},
mounted() {