H5首页更新
This commit is contained in:
parent
f9b67254d9
commit
69c760421c
@ -295,14 +295,15 @@ export default {
|
||||
init(config = {}) {
|
||||
if (this._inited) return
|
||||
this._inited = true
|
||||
const isH5 = !!(vm.$route && vm.$route.path && vm.$route.path.startsWith('/h5HomePage'))
|
||||
this._config = Object.assign({
|
||||
avatarUrl: '',
|
||||
name: vm.$t('yunbao.name'),
|
||||
submitUrl: '',
|
||||
products: vm.getYunbaoProducts(),
|
||||
pages: {
|
||||
contract: '/homePage/agentStore/contractCase',
|
||||
decision: '/homePage/agentStore/decisionCase'
|
||||
contract: isH5 ? '/h5HomePage/contract-case' : '/homePage/agentStore/contractCase',
|
||||
decision: isH5 ? '/h5HomePage/decision-case' : '/homePage/agentStore/decisionCase'
|
||||
}
|
||||
}, config)
|
||||
this.injectCSS()
|
||||
@ -431,7 +432,9 @@ export default {
|
||||
return
|
||||
}
|
||||
if (action === 'goContract') {
|
||||
vm.$router.push(this._config.pages.contract || '/homePage/agentStore/contractCase').catch(() => {})
|
||||
const isH5 = !!(vm.$route && vm.$route.path && vm.$route.path.startsWith('/h5HomePage'))
|
||||
const path = isH5 ? '/h5HomePage/contract-case' : (this._config.pages.contract || '/homePage/agentStore/contractCase')
|
||||
vm.$router.push(path).catch(() => {})
|
||||
this.close()
|
||||
setTimeout(() => {
|
||||
this.addBotMsg(vm.$t('yunbao.openedContract'), this.getProductTags(), 'tags')
|
||||
@ -446,7 +449,9 @@ export default {
|
||||
return
|
||||
}
|
||||
if (action === 'goInvest') {
|
||||
vm.$router.push(this._config.pages.decision || '/homePage/agentStore/decisionCase').catch(() => {})
|
||||
const isH5 = !!(vm.$route && vm.$route.path && vm.$route.path.startsWith('/h5HomePage'))
|
||||
const path = isH5 ? '/h5HomePage/decision-case' : (this._config.pages.decision || '/homePage/agentStore/decisionCase')
|
||||
vm.$router.push(path).catch(() => {})
|
||||
this.close()
|
||||
setTimeout(() => {
|
||||
this.addBotMsg(vm.$t('yunbao.openedDecision'), this.getProductTags(), 'tags')
|
||||
|
||||
@ -122,11 +122,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
if (window.history.length > 1) {
|
||||
this.$router.back()
|
||||
return
|
||||
}
|
||||
this.$router.push('/h5HomePage/index')
|
||||
this.$router.push('/h5HomePage/index').catch((error) => {
|
||||
if (!error || error.name !== 'NavigationDuplicated') throw error
|
||||
})
|
||||
},
|
||||
scrollTo(id) {
|
||||
this.activeTab = id
|
||||
|
||||
@ -95,11 +95,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
if (window.history.length > 1) {
|
||||
this.$router.back()
|
||||
return
|
||||
}
|
||||
this.$router.push('/h5HomePage/index')
|
||||
this.$router.push('/h5HomePage/index').catch((error) => {
|
||||
if (!error || error.name !== 'NavigationDuplicated') throw error
|
||||
})
|
||||
},
|
||||
scrollTo(id) {
|
||||
this.activeTab = id
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user