Browse Source

社区讯息调整,bug修改

feature
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>
<Share :show="showShare" @closeShare="showShare = false" />
<register-dialog v-if="showRegister" @close="showRegister = false"></register-dialog>
</div>
</template>
<script>
import { addActivityRecord, detail, communityActivityApplicationRecordDelete } from "@/api/activity"
import Share from "@/components/Share"
import registerDialog from '@/components/registerDialog';
export default {
data() {
return {
@ -65,7 +68,8 @@ export default {
],
info: {},
isPast: false,
showShare: false
showShare: false,
showRegister: false
};
},
created() {
@ -77,7 +81,7 @@ export default {
}
},
methods: {
checkIfPast() {
const currentTimestamp = Date.now();
const specifiedTimestamp = new Date(this.info.cutOffTime.replace(/-/g, '/')).getTime();
@ -87,7 +91,7 @@ export default {
let res = await detail(id)
if (res) {
this.info = res;
if (res.recordList) {
if (res.recordList.length != 0) {
this.signUp = res.recordList;
}
if (res.cutOffTime) {
@ -103,23 +107,28 @@ export default {
this.detail(this.$route.query.id)
},
async save() {
this.signUp.forEach((item) => {
item.activityId = this.info.id;
item.applicationId = this.$store.state.app.userInfo.id;
item.customerId = this.$store.state.app.userInfo.customerId;
})
let parm = {
formDTOList: this.signUp
}
let res = await addActivityRecord(parm)
if (res) {
this.$toast.success(res)
this.signUp = [{ name: "", mobile: "", remark: "" }]
this.detail(this.$route.query.id)
if (this.$store.state.app.userInfo.mobile) {
this.signUp.forEach((item) => {
item.activityId = this.info.id;
item.applicationId = this.$store.state.app.userInfo.id;
item.customerId = this.$store.state.app.userInfo.customerId;
})
let parm = {
formDTOList: this.signUp
}
let res = await addActivityRecord(parm)
if (res) {
this.$toast.success(res)
this.signUp = [{ name: "", mobile: "", remark: "" }]
this.detail(this.$route.query.id)
}
} else {
this.showRegister = true;
}
},
},
components: { Share },
components: { Share, registerDialog },
computed: {},
watch: {},
}

33
src/views/activity/index.vue

@ -2,7 +2,8 @@
<div class='container'>
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="communityActivity" class="card"
: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;">
<div class="flex flex-y flex1 flex-end" style="overflow: hidden;">
<div class="van-ellipsis">{{ item.activityName }}</div>
@ -10,11 +11,11 @@
<div class="time gray font-size14">时间{{ item.startTime }}</div>
<div class="flex flex-end" v-if="item.online === 1">
<div>
<span>报名人数</span> <span class="font-size18 orange">{{ item.currentParticipants }}</span>/<span
class="font-size14">{{ item.participants }}</span>
<span>报名人数</span> <span class="font-size18 orange">{{ item.currentParticipants
}}</span>/<span class="font-size14">{{ item.participants }}</span>
</div>
<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>
<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>
</div>
</div>
</div>
@ -66,24 +67,20 @@ export default {
this.activityList = this.activityList.concat(res.list);
}
},
handelClickJump(path,item) {
console.log(path,item);
if(path === 'activityDetail'){
if (this.$store.state.app.userInfo.mobile) {
this.$router.push({ path: `/${path}`,query:{id:item.id} });
} else {
this.showRegister = true;
}
handelClickJump(path, item) {
console.log(path, item);
if (path === 'activityDetail') {
this.$router.push({ path: `/${path}`, query: { id: item.id } });
}
}
},
components: {registerDialog},
components: { registerDialog },
computed: {
recordFlag(){
return (item)=>{
if(!item.recordList) return false
return item.recordList.findIndex(itemC=>itemC.mobile === this.$store.state.app.userInfo.mobile) != -1
recordFlag() {
return (item) => {
if (!item.recordList) return false
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 = {
pageSize: 10,
pageNo: 1,
status: 0,
status: 1,
tagName: null
}
let res = await advertisingTag(parm)

2
src/views/discussion/discusionDetail.vue

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

8
src/views/home/index.vue

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

2
src/views/selectAgency/index.vue

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

Loading…
Cancel
Save