添加佛前供灯
This commit is contained in:
+28
-4
@@ -57,13 +57,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<thanks-giving :temple-id="query.temple_id || '1' "></thanks-giving>
|
||||
<thanks-giving :temple-id="query.temple_id " :agent-id="query.agent_id"></thanks-giving>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTempleIndex } from '@/api';
|
||||
import { getPlatformHome, getTempleIndex } from "@/api";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -97,6 +97,17 @@ export default {
|
||||
},
|
||||
locationTo(nav) {
|
||||
// nav.type: 0外部链接,1日行一善商品,2添砖加瓦类商品,3通用商品,4功德箱,5进展动态
|
||||
if(nav.type === 6){
|
||||
this.$router.push({
|
||||
name: 'goods-light-detail',
|
||||
query: {
|
||||
goods_type: nav.type,
|
||||
temple_id: nav.temple_id,
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if(nav.type === 0){
|
||||
window.location.href = nav.url;
|
||||
return
|
||||
@@ -140,9 +151,21 @@ export default {
|
||||
}
|
||||
},
|
||||
async getTempleIndex() {
|
||||
const res = await getTempleIndex(this.query.temple_id);
|
||||
const { agent_id } = this.$route.query;
|
||||
let res;
|
||||
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.data.icon_data = this.sliceNav(res.icon_data);
|
||||
console.log(res.temple_data.unit_name)
|
||||
setTimeout(() => {
|
||||
document.title = res.temple_data.unit_name;
|
||||
console.log(document.title)
|
||||
}, 10)
|
||||
},
|
||||
onMoreProcess() {
|
||||
this.$router.push({
|
||||
@@ -163,13 +186,14 @@ export default {
|
||||
const b = navData.slice(i * slice, i * slice + slice);
|
||||
nav.push(b);
|
||||
}
|
||||
|
||||
return nav;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scope>
|
||||
<style lang="scss">
|
||||
.van-nav-bar__title {
|
||||
color: white;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user