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' })
}
}
}).catch(err=>{
next({ path: '/selectAgency' })
})
} else {
if (getQueryStringByName('code') && to.path != '/houseQR'&& to.path != '/event') {

7
src/views/activity/index.vue

@ -2,7 +2,7 @@
<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>
@ -19,11 +19,13 @@
</div>
</div>
</van-list>
<register-dialog v-if="showRegister" @close="showRegister = false"></register-dialog>
</div>
</template>
<script>
import { communityActivity } from '@/api/home';
import registerDialog from '@/components/registerDialog';
export default {
data() {
@ -65,6 +67,7 @@ export default {
}
},
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} });
@ -75,7 +78,7 @@ export default {
}
},
components: {},
components: {registerDialog},
computed: {},
watch: {},
}

8
src/views/home/index.vue

@ -56,7 +56,7 @@
<span>社区活动</span>
<span @click="$router.push('/activity')">更多</span>
</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;">
<div class="flex flex-y flex1 flex-end" style="overflow: hidden;">
<div class="van-ellipsis">{{ item.activityName }}</div>
@ -321,7 +321,11 @@ export default {
this.showRegister = true;
}
} 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