Browse Source

社区讯息调整,bug修改

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

43
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() {
@ -77,7 +81,7 @@ export default {
} }
}, },
methods: { methods: {
checkIfPast() { checkIfPast() {
const currentTimestamp = Date.now(); const currentTimestamp = Date.now();
const specifiedTimestamp = new Date(this.info.cutOffTime.replace(/-/g, '/')).getTime(); const specifiedTimestamp = new Date(this.info.cutOffTime.replace(/-/g, '/')).getTime();
@ -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,23 +107,28 @@ export default {
this.detail(this.$route.query.id) this.detail(this.$route.query.id)
}, },
async save() { async save() {
this.signUp.forEach((item) => { if (this.$store.state.app.userInfo.mobile) {
item.activityId = this.info.id; this.signUp.forEach((item) => {
item.applicationId = this.$store.state.app.userInfo.id; item.activityId = this.info.id;
item.customerId = this.$store.state.app.userInfo.customerId; item.applicationId = this.$store.state.app.userInfo.id;
}) item.customerId = this.$store.state.app.userInfo.customerId;
let parm = { })
formDTOList: this.signUp let parm = {
} formDTOList: this.signUp
let res = await addActivityRecord(parm) }
if (res) { let res = await addActivityRecord(parm)
this.$toast.success(res) if (res) {
this.signUp = [{ name: "", mobile: "", remark: "" }] this.$toast.success(res)
this.detail(this.$route.query.id) this.signUp = [{ name: "", mobile: "", remark: "" }]
this.detail(this.$route.query.id)
}
} else {
this.showRegister = true;
} }
}, },
}, },
components: { Share }, components: { Share, registerDialog },
computed: {}, computed: {},
watch: {}, watch: {},
} }

33
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,11 +11,11 @@
<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>
</div> </div>
</div> </div>
</div> </div>
@ -66,24 +67,20 @@ export default {
this.activityList = this.activityList.concat(res.list); this.activityList = this.activityList.concat(res.list);
} }
}, },
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;
}
} }
} }
}, },
components: {registerDialog}, components: { registerDialog },
computed: { computed: {
recordFlag(){ recordFlag() {
return (item)=>{ return (item) => {
if(!item.recordList) return false if (!item.recordList) return false
return item.recordList.findIndex(itemC=>itemC.mobile === this.$store.state.app.userInfo.mobile) != -1 return item.recordList.findIndex(itemC => itemC.mobile === this.$store.state.app.userInfo.mobile) != -1
} }
}, },
}, },

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 {

8
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