Browse Source

社区讯息调整,bug修改

dev
mk 1 year ago
parent
commit
23ecf85070
  1. 15
      src/views/activity/detail.vue
  2. 11
      src/views/activity/index.vue
  3. 2
      src/views/communityPublicity/index.vue
  4. 2
      src/views/discussion/discusionDetail.vue
  5. 6
      src/views/home/index.vue
  6. 2
      src/views/selectAgency/index.vue

15
src/views/activity/detail.vue

@ -50,12 +50,15 @@
</div> </div>
</div> </div>
<Share :show="showShare" @closeShare="showShare = false" /> <Share :show="showShare" @closeShare="showShare = false" />
<register-dialog v-if="showRegister" @close="showRegister = false"></register-dialog>
</div> </div>
</template> </template>
<script> <script>
import { addActivityRecord, detail, communityActivityApplicationRecordDelete } from "@/api/activity" import { addActivityRecord, detail, communityActivityApplicationRecordDelete } from "@/api/activity"
import Share from "@/components/Share" import Share from "@/components/Share"
import registerDialog from '@/components/registerDialog';
export default { export default {
data() { data() {
return { return {
@ -65,7 +68,8 @@ export default {
], ],
info: {}, info: {},
isPast: false, isPast: false,
showShare: false showShare: false,
showRegister: false
}; };
}, },
created() { created() {
@ -87,7 +91,7 @@ export default {
let res = await detail(id) let res = await detail(id)
if (res) { if (res) {
this.info = res; this.info = res;
if (res.recordList) { if (res.recordList.length != 0) {
this.signUp = res.recordList; this.signUp = res.recordList;
} }
if (res.cutOffTime) { if (res.cutOffTime) {
@ -103,6 +107,7 @@ export default {
this.detail(this.$route.query.id) this.detail(this.$route.query.id)
}, },
async save() { async save() {
if (this.$store.state.app.userInfo.mobile) {
this.signUp.forEach((item) => { this.signUp.forEach((item) => {
item.activityId = this.info.id; item.activityId = this.info.id;
item.applicationId = this.$store.state.app.userInfo.id; item.applicationId = this.$store.state.app.userInfo.id;
@ -117,9 +122,13 @@ export default {
this.signUp = [{ name: "", mobile: "", remark: "" }] this.signUp = [{ name: "", mobile: "", remark: "" }]
this.detail(this.$route.query.id) this.detail(this.$route.query.id)
} }
} else {
this.showRegister = true;
}
}, },
}, },
components: { Share }, components: { Share, registerDialog },
computed: {}, computed: {},
watch: {}, watch: {},
} }

11
src/views/activity/index.vue

@ -2,7 +2,8 @@
<div class='container'> <div class='container'>
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="communityActivity" class="card" <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="communityActivity" class="card"
:offset="50"> :offset="50">
<div class="activity_content flex" v-for="(item, index) in activityList" :key="index" @click="handelClickJump('activityDetail',item)"> <div class="activity_content flex" v-for="(item, index) in activityList" :key="index"
@click="handelClickJump('activityDetail', item)">
<img :src="item.coverPic" alt="" class="mr10 img_round" style="width: 75px;height: 95px;"> <img :src="item.coverPic" alt="" class="mr10 img_round" style="width: 75px;height: 95px;">
<div class="flex flex-y flex1 flex-end" style="overflow: hidden;"> <div class="flex flex-y flex1 flex-end" style="overflow: hidden;">
<div class="van-ellipsis">{{ item.activityName }}</div> <div class="van-ellipsis">{{ item.activityName }}</div>
@ -10,8 +11,8 @@
<div class="time gray font-size14">时间{{ item.startTime }}</div> <div class="time gray font-size14">时间{{ item.startTime }}</div>
<div class="flex flex-end" v-if="item.online === 1"> <div class="flex flex-end" v-if="item.online === 1">
<div> <div>
<span>报名人数</span> <span class="font-size18 orange">{{ item.currentParticipants }}</span>/<span <span>报名人数</span> <span class="font-size18 orange">{{ item.currentParticipants
class="font-size14">{{ item.participants }}</span> }}</span>/<span class="font-size14">{{ item.participants }}</span>
</div> </div>
<van-button type="info" size="small" round @click="handelClickJump('activityDetail', item)" <van-button type="info" size="small" round @click="handelClickJump('activityDetail', item)"
:disabled="new Date(item.cutOffTime.replace(/-/g, '/')).getTime() < Date.now() || item.currentParticipants >= item.participants">{{ recordFlag(item) ? '已报名' : '报名' }}</van-button> :disabled="new Date(item.cutOffTime.replace(/-/g, '/')).getTime() < Date.now() || item.currentParticipants >= item.participants">{{ recordFlag(item) ? '已报名' : '报名' }}</van-button>
@ -69,11 +70,7 @@ export default {
handelClickJump(path, item) { handelClickJump(path, item) {
console.log(path, item); console.log(path, item);
if (path === 'activityDetail') { if (path === 'activityDetail') {
if (this.$store.state.app.userInfo.mobile) {
this.$router.push({ path: `/${path}`, query: { id: item.id } }); this.$router.push({ path: `/${path}`, query: { id: item.id } });
} else {
this.showRegister = true;
}
} }
} }

2
src/views/communityPublicity/index.vue

@ -84,7 +84,7 @@ export default {
let parm = { let parm = {
pageSize: 10, pageSize: 10,
pageNo: 1, pageNo: 1,
status: 0, status: 1,
tagName: null tagName: null
} }
let res = await advertisingTag(parm) let res = await advertisingTag(parm)

2
src/views/discussion/discusionDetail.vue

@ -37,7 +37,7 @@
</template> </template>
<script> <script>
import { andelClicDetail, icEventOldDiscuss, advertisingTag, communityPublicity, handelClicsupport } from '@/api/home'; import { andelClicDetail, handelClicsupport } from '@/api/home';
export default { export default {
data() { data() {
return { return {

6
src/views/home/index.vue

@ -323,18 +323,14 @@ export default {
} }
}, },
handelClickJump(path,item) { handelClickJump(path,item) {
if (path === 'event' || path === 'service' || path === 'activity' || path === 'Enjoyableservices' || item === 'tab') { if (path === 'event') {
if (this.$store.state.app.userInfo.mobile) { if (this.$store.state.app.userInfo.mobile) {
this.$router.push({ path: `/${path}` }); this.$router.push({ path: `/${path}` });
} else { } else {
this.showRegister = true; this.showRegister = true;
} }
} else { } else {
if (this.$store.state.app.userInfo.mobile) {
this.$router.push({ path: `/${path}`,query:{id:item.id} }) this.$router.push({ path: `/${path}`,query:{id:item.id} })
} else {
this.showRegister = true;
}
} }
}, },

2
src/views/selectAgency/index.vue

@ -44,7 +44,7 @@ export default {
methods: { methods: {
restAddress() { restAddress() {
this.district = null; this.district = null;
this.selfCity = null; this.selfCity = [];
this.getAgency(); this.getAgency();
}, },
signWX() { signWX() {

Loading…
Cancel
Save