修正日行一善

This commit is contained in:
2022-01-21 11:26:47 +08:00
parent 6484d35232
commit 62a7d349cc
22 changed files with 594 additions and 101 deletions
+42 -1
View File
@@ -96,7 +96,48 @@ export default {
})
},
locationTo(nav) {
window.location.href = nav.url;
// nav.type: 0外部链接,1日行一善商品,2添砖加瓦类商品,3通用商品,4功德箱,5进展动态
if(nav.type === 0){
window.location.href = nav.url;
return
}
if(nav.type === 5){
this.$router.push({
name: 'buddha-detail',
query: { id: nav.dynamic_id }
})
return
}
if(nav.type === 4){
this.$router.push({
name: 'merit-box'
})
return
}
if(nav.type === 3){
this.$router.push({
name: 'goods-detail',
query: {
goods_type: nav.type,
goods_id: nav.goods_id ,
temple_id: nav.temple_id,
}
})
}
if(nav.type === 1 || nav.type === 2){
this.$router.push({
name: 'everyday-donation',
query: {
goods_type: nav.type,
goods_id: nav.goods_id ,
temple_id: nav.temple_id,
},
});
}
},
async getTempleIndex() {
const res = await getTempleIndex(this.query.temple_id);