|
@@ -1,59 +1,130 @@
|
|
|
<template>
|
|
|
-<div>
|
|
|
- <header class="mui-bar mui-bar-nav">
|
|
|
- <h1 class="mui-title">我发起的活动</h1>
|
|
|
- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
|
|
|
- </header>
|
|
|
+ <div>
|
|
|
+ <common ref="common" @asynCallBack="asynCallBack"></common>
|
|
|
+ <top-header :pageTitle="pageTitle"></top-header>
|
|
|
+
|
|
|
<div class="mui-content vongi-hdsq">
|
|
|
<div class="mui-slider-group">
|
|
|
<ul class="mui-table-view">
|
|
|
- <li class="mui-table-view-cell">
|
|
|
- <a href="">
|
|
|
+ <li v-for="(item,index) in recordList" class="mui-table-view-cell">
|
|
|
+ <router-link :to="{name:'MasterActivityMyInfo',query:{id:item.id}}">
|
|
|
<div class="mui-media-body flew-sp">
|
|
|
- <div class="mui-col-xs-9">欢迎加入恒大名都业主羽毛球群!</div>
|
|
|
+ <div class="mui-col-xs-9" v-text="item.title"></div>
|
|
|
<div class="mui-col-xs-3"><button type="button" class="mui-btn mui-btn-greye mui-btn-outlined">待审核</button></div>
|
|
|
</div>
|
|
|
<p class="flew-items flew-sp">
|
|
|
- 活动时间:2020-10-25至2020-11-25
|
|
|
- <span class='mui-ellipsis'>10-15</span>
|
|
|
- </p>
|
|
|
- </a>
|
|
|
- </li>
|
|
|
- <li class="mui-table-view-cell">
|
|
|
- <a href="">
|
|
|
- <div class="mui-media-body flew-sp">
|
|
|
- <div class="mui-col-xs-9">欢迎加入恒大名都业主羽毛球群——羽你同行!欢迎加入恒大名都业主羽毛球群——羽你同行!</div>
|
|
|
- <div class="mui-col-xs-3"><button type="button" class="mui-btn mui-btn-success mui-btn-outlined">已批准</button></div>
|
|
|
- </div>
|
|
|
- <p class="flew-items flew-sp">
|
|
|
- 活动时间:2020-10-25至2020-11-25
|
|
|
- <span class='mui-ellipsis'>10-15</span>
|
|
|
- </p>
|
|
|
- </a>
|
|
|
- </li>
|
|
|
- <li class="mui-table-view-cell">
|
|
|
- <a href="">
|
|
|
- <div class="mui-media-body flew-sp">
|
|
|
- <div class="mui-col-xs-9">欢迎加入恒大名都业主羽毛球群——羽你同行!欢迎加入恒大名都业主羽毛球群——羽你同行!</div>
|
|
|
- <div class="mui-col-xs-3"><button type="button" class="mui-btn mui-btn-danger mui-btn-outlined">未批准</button></div>
|
|
|
- </div>
|
|
|
- <p class="flew-items flew-sp">
|
|
|
- 活动时间:2020-10-25至2020-11-25
|
|
|
- <span class='mui-ellipsis'>10-15</span>
|
|
|
+ 活动时间:{{item.startTime}}至{{item.endTime}}
|
|
|
+ <span class='mui-ellipsis'>{{item.createTime.substring(5,9)}}</span>
|
|
|
</p>
|
|
|
- </a>
|
|
|
+ </router-link>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
<div class="fyy-footer">
|
|
|
- <div class="bindfyy-btn"><button type="submit" class="mui-btn mui-btn-primary ">发起活动</button></div>
|
|
|
+ <div class="bindfyy-btn"><button @click="goToAdd" type="button" class="mui-btn mui-btn-primary ">发起活动</button></div>
|
|
|
</div>
|
|
|
-</div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import * as API_Activity from '@/apis/Master/activity'
|
|
|
+ import Common from '$project/components/Common.vue'
|
|
|
+ import Loading from '$project/components/Loading.vue'
|
|
|
+ import TopHeader from '$project/components/TopHeader.vue'
|
|
|
+ import NavMenu from '@/components/NavMenu.vue'
|
|
|
+ import {
|
|
|
+ mapGetters,
|
|
|
+ mapMutations
|
|
|
+ } from 'vuex'
|
|
|
+ export default {
|
|
|
+ name: 'MasterActivityMyList',
|
|
|
+ components: {
|
|
|
+ Common,
|
|
|
+ Loading,
|
|
|
+ TopHeader,
|
|
|
+ NavMenu
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ isLoading: false,
|
|
|
+
|
|
|
+ pageTitle: '我发起的活动',
|
|
|
+
|
|
|
+ listForm: {
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ totalPage: 1,
|
|
|
+ },
|
|
|
+ recordList: [],
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ methods: {
|
|
|
+ //获取列表
|
|
|
+ getList() {
|
|
|
+ this.isLoading = true;
|
|
|
+ API_Activity.getMyActivityList(this.listForm).then(response => {
|
|
|
+ if (response) {
|
|
|
+ if (this.listForm.pageIndex == 1) {
|
|
|
+ this.recordList = response.data;
|
|
|
+ this.listForm.pageIndex = response.pageNumber;
|
|
|
+ this.listForm.totalPage = response.totalPage;
|
|
|
+ } else {
|
|
|
+ this.recordList = [
|
|
|
+ ...this.recordList,
|
|
|
+ ...response.data
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.listForm.pageIndex++;
|
|
|
+ this.isLoading = false;
|
|
|
+ }).catch(error => {
|
|
|
+ this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //下拉事件
|
|
|
+ handleScrool() {
|
|
|
+ if (isReachBottom()) {
|
|
|
+ console.log('到达底部')
|
|
|
+ if (this.listForm.pageIndex <= this.listForm.totalPage && this.isLoading == false) {
|
|
|
+ this.getList();
|
|
|
+ } else {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ goToAdd() {
|
|
|
+ this.$router.push({
|
|
|
+ name: 'MasterActivityAdd'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ asynCallBack() {
|
|
|
+
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getList();
|
|
|
+ //监控下拉加载事件
|
|
|
+ var _this = this;
|
|
|
+ window.addEventListener('scroll', _this.handleScrool);
|
|
|
+ },
|
|
|
+ destroyed() {
|
|
|
+ //销毁监听事件
|
|
|
+ var _this = this;
|
|
|
+ window.removeEventListener('scroll', _this.handleScrool);
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ openId: 'wx_openid',
|
|
|
+ token: 'token',
|
|
|
+ person_data: 'person_data',
|
|
|
+ person_popedom: 'person_popedom',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
<style scoped src="$project/assets/css/xpwyfyy.css"></style>
|