Browse Source

没有注册弹注册页面

dev
mk 1 year ago
parent
commit
e89e59482c
  1. 2
      src/router/index.js
  2. 7
      src/views/activity/index.vue
  3. 8
      src/views/home/index.vue

2
src/router/index.js

@ -90,6 +90,8 @@ router.beforeEach((to, from, next) => {
next({ path: '/selectAgency' }) next({ path: '/selectAgency' })
} }
} }
}).catch(err=>{
next({ path: '/selectAgency' })
}) })
} else { } else {
if (getQueryStringByName('code') && to.path != '/houseQR'&& to.path != '/event') { if (getQueryStringByName('code') && to.path != '/houseQR'&& to.path != '/event') {

7
src/views/activity/index.vue

@ -2,7 +2,7 @@
<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>
@ -19,11 +19,13 @@
</div> </div>
</div> </div>
</van-list> </van-list>
<register-dialog v-if="showRegister" @close="showRegister = false"></register-dialog>
</div> </div>
</template> </template>
<script> <script>
import { communityActivity } from '@/api/home'; import { communityActivity } from '@/api/home';
import registerDialog from '@/components/registerDialog';
export default { export default {
data() { data() {
@ -65,6 +67,7 @@ export default {
} }
}, },
handelClickJump(path,item) { handelClickJump(path,item) {
console.log(path,item);
if(path === 'activityDetail'){ if(path === 'activityDetail'){
if (this.$store.state.app.userInfo.mobile) { 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} });
@ -75,7 +78,7 @@ export default {
} }
}, },
components: {}, components: {registerDialog},
computed: {}, computed: {},
watch: {}, watch: {},
} }

8
src/views/home/index.vue

@ -56,7 +56,7 @@
<span>社区活动</span> <span>社区活动</span>
<span @click="$router.push('/activity')">更多</span> <span @click="$router.push('/activity')">更多</span>
</div> </div>
<div class="activity_content flex" v-for="(item, index) in activityList" :key="index" @click="$router.push({ path: `/activityDetail`,query: { id:item.id} })"> <div class="activity_content flex" v-for="(item, index) in activityList" :key="index" @click="handelClickJump(`activityDetail`,item)">
<img :src="item.coverPic" alt="" class="mr10" style="width: 75px;height: 95px;"> <img :src="item.coverPic" alt="" class="mr10" 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>
@ -321,7 +321,11 @@ export default {
this.showRegister = true; this.showRegister = true;
} }
} else { } else {
this.$router.push({ path: `/${path}`,query:{id:item.id} }) if (this.$store.state.app.userInfo.mobile) {
this.$router.push({ path: `/${path}`,query:{id:item.id} })
} else {
this.showRegister = true;
}
} }
}, },

Loading…
Cancel
Save