update
This commit is contained in:
+59
-61
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div v-if="data" class="platform_home" >
|
||||
<div v-if="data" class="platform_home">
|
||||
<van-search v-model="value" readonly placeholder="寺院、主持、监寺" @click="onSearch" />
|
||||
<div class="container">
|
||||
<div class="swiper">
|
||||
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
|
||||
<van-swipe-item v-for="(banner, index) in data.banner_data" :key="index">
|
||||
<img :src="banner.cover" alt="" @click="onLocationTo(banner)"/>
|
||||
<img :src="banner.cover" alt="" @click="onLocationTo(banner)" />
|
||||
</van-swipe-item>
|
||||
</van-swipe>
|
||||
</div>
|
||||
@@ -57,7 +57,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<thanks-giving :temple-id="query.temple_id " :agent-id="query.agent_id"></thanks-giving>
|
||||
<thanks-giving :temple-id="query.temple_id" :agent-id="query.agent_id"></thanks-giving>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -66,13 +66,12 @@
|
||||
import { getPlatformHome, getTempleIndex } from "@/api";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
},
|
||||
inject: ['safeAreaInsetBottom'],
|
||||
components: {},
|
||||
inject: ["safeAreaInsetBottom"],
|
||||
data() {
|
||||
return {
|
||||
query: this.$route.query,
|
||||
value: '',
|
||||
value: "",
|
||||
data: null,
|
||||
mescrollDown: {},
|
||||
mescrollUp: {},
|
||||
@@ -83,74 +82,74 @@ export default {
|
||||
this.getTempleIndex();
|
||||
},
|
||||
methods: {
|
||||
onLocationTo({url}){
|
||||
if(url){
|
||||
onLocationTo({ url }) {
|
||||
if (url) {
|
||||
location.href = url;
|
||||
}
|
||||
},
|
||||
mescrollInit(mescroll){
|
||||
mescrollInit(mescroll) {
|
||||
this.mescroll = mescroll;
|
||||
},
|
||||
onToGoods(goods){
|
||||
onToGoods(goods) {
|
||||
this.$router.push({
|
||||
name: 'goods-detail',
|
||||
name: "goods-detail",
|
||||
query: {
|
||||
goods_id: goods.goods_id,
|
||||
temple_id: goods.temple_id,
|
||||
goods_type: goods.goods_type
|
||||
}
|
||||
})
|
||||
goods_type: goods.goods_type,
|
||||
},
|
||||
});
|
||||
},
|
||||
locationTo(nav) {
|
||||
// nav.type: 0外部链接,1日行一善商品,2添砖加瓦类商品,3通用商品,4功德箱,5进展动态
|
||||
if(nav.icon_type === 6){
|
||||
if (nav.icon_type === 6) {
|
||||
this.$router.push({
|
||||
name: 'goods-light-detail',
|
||||
name: "goods-light-detail",
|
||||
query: {
|
||||
goods_type: nav.goods_type,
|
||||
temple_id: nav.temple_id,
|
||||
}
|
||||
})
|
||||
return
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if(nav.icon_type === 0){
|
||||
if (nav.icon_type === 0) {
|
||||
window.location.href = nav.url;
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
if(nav.icon_type === 5){
|
||||
if (nav.icon_type === 5) {
|
||||
this.$router.push({
|
||||
name: 'buddha-detail',
|
||||
query: { id: nav.dynamic_id }
|
||||
})
|
||||
return
|
||||
name: "buddha-detail",
|
||||
query: { id: nav.dynamic_id },
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if(nav.icon_type === 4){
|
||||
if (nav.icon_type === 4) {
|
||||
this.$router.push({
|
||||
name: 'merit-box'
|
||||
})
|
||||
return
|
||||
name: "merit-box",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if(nav.icon_type === 3){
|
||||
if (nav.icon_type === 3) {
|
||||
this.$router.push({
|
||||
name: 'goods-detail',
|
||||
name: "goods-detail",
|
||||
query: {
|
||||
goods_type: nav.goods_type,
|
||||
goods_id: nav.goods_id ,
|
||||
goods_id: nav.goods_id,
|
||||
temple_id: nav.temple_id,
|
||||
}
|
||||
})
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if(nav.icon_type === 1 || nav.icon_type === 2){
|
||||
if (nav.icon_type === 1 || nav.icon_type === 2) {
|
||||
this.$router.push({
|
||||
name: 'everyday-donation',
|
||||
name: "everyday-donation",
|
||||
query: {
|
||||
goods_type: nav.goods_type,
|
||||
goods_id: nav.goods_id ,
|
||||
goods_id: nav.goods_id,
|
||||
temple_id: nav.temple_id,
|
||||
},
|
||||
});
|
||||
@@ -159,27 +158,26 @@ export default {
|
||||
async getTempleIndex() {
|
||||
const { agent_id } = this.$route.query;
|
||||
let res;
|
||||
if(agent_id){
|
||||
res = await getPlatformHome(agent_id)
|
||||
if (agent_id) {
|
||||
res = await getPlatformHome(agent_id);
|
||||
} else {
|
||||
res = await getTempleIndex(this.query.temple_id);
|
||||
}
|
||||
this.data = res;
|
||||
this.$store.commit('setTempleMeritId', res.temple_merit_id);
|
||||
this.$store.commit("setTempleMeritId", res.temple_merit_id);
|
||||
this.data.icon_data = this.sliceNav(res.icon_data);
|
||||
console.log(123, this.data)
|
||||
setTimeout(() => {
|
||||
document.title = '自在福田';
|
||||
}, 10)
|
||||
document.title = "自在福田";
|
||||
}, 10);
|
||||
},
|
||||
onMoreProcess() {
|
||||
this.$router.push({
|
||||
name: 'buddha-activity',
|
||||
name: "buddha-activity",
|
||||
});
|
||||
},
|
||||
onSearch() {
|
||||
this.$router.push({
|
||||
name: 'search',
|
||||
name: "search",
|
||||
query: {},
|
||||
});
|
||||
},
|
||||
@@ -204,13 +202,13 @@ export default {
|
||||
}
|
||||
.merit-rank-container {
|
||||
}
|
||||
.van-search{
|
||||
padding: .4rem
|
||||
.van-search {
|
||||
padding: 0.4rem;
|
||||
}
|
||||
.goods-panel-body{
|
||||
.buddha-process{
|
||||
padding-left: .4rem;
|
||||
padding-right: .4rem;
|
||||
.goods-panel-body {
|
||||
.buddha-process {
|
||||
padding-left: 0.4rem;
|
||||
padding-right: 0.4rem;
|
||||
}
|
||||
}
|
||||
.container {
|
||||
@@ -228,7 +226,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.swiper {
|
||||
margin-bottom: 0
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.van-notice-bar {
|
||||
border: 1px solid #e6b759;
|
||||
@@ -254,7 +252,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.van-swipe__indicators {
|
||||
bottom: .1rem;
|
||||
bottom: 0.1rem;
|
||||
.van-swipe__indicator {
|
||||
width: 20px;
|
||||
height: 2px;
|
||||
@@ -264,20 +262,20 @@ export default {
|
||||
background: $primary-color;
|
||||
}
|
||||
}
|
||||
.panel{
|
||||
.panel {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
}
|
||||
.merit-scroll-container{
|
||||
margin: 0 .4rem;
|
||||
.merit-scroll-container {
|
||||
margin: 0 0.4rem;
|
||||
height: 3.39rem;
|
||||
overflow-x: auto;
|
||||
.merit-scroll-wrapper{
|
||||
.merit-scroll-wrapper {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
.merit-group{
|
||||
padding-bottom: .4rem;
|
||||
.merit-group {
|
||||
padding-bottom: 0.4rem;
|
||||
}
|
||||
.merit {
|
||||
width: 3.39rem;
|
||||
|
||||
Reference in New Issue
Block a user