Commit 3903cd87 authored by FE-安焕焕's avatar FE-安焕焕 👣

Merge branch 'link' into 'master'

fix(回首页): 修改首页的地址

See merge request !8
parents a0ea3f12 7e9b19c4
export default [
{
path: '/',
redirect: '/home'
redirect: '/vipLife'
},
{
path: '/home',
......
......@@ -41,6 +41,16 @@ const mutations = {
state.title = title;
}
document.title = state.title;
// 如果是 iOS 设备,则使用如下 hack 的写法实现页面标题的更新
if (/ip(hone|od|ad)/i.test(navigator.userAgent.toLowerCase())) {
const hackIframe = document.createElement('iframe');
hackIframe.style.display = 'none';
hackIframe.src = '/public/fixIosTitle.html?r=' + Math.random();
document.body.appendChild(hackIframe);
setTimeout(() => {
document.body.removeChild(hackIframe);
}, 300);
}
},
[types.CHANGE_META](state, meta) {
for (let i in meta) {
......
......@@ -64,10 +64,11 @@ export default {
this.phoneRecharge[`${name}Type`]
);
this.$emit('changeRechargetype', name);
this.rechargeList[name] = [...data?.rechargeList] || [];
const rechargeList = data?.rechargeList || [];
this.rechargeList[name] = [...rechargeList] || [];
this.selectedRechargeInfo = this.rechargeList[name][0];
this.rechargeList[name].forEach(element => {
if (element.salePrice === '100.00') {
if (element?.salePrice === '100.00') {
this.selectedRechargeInfo = { ...element };
}
});
......
......@@ -70,6 +70,7 @@ export default {
},
async goOrderList(type) {
if (type === 'cs') {
this.$store.commit('CHANGE_TITLE', '客服中心'); // 改变title
window.location.href =
'https://kdspstatic.91xr.cn/kdsp/mine/service/customer-service/customer-service-prod2.html';
return;
......
......@@ -57,7 +57,7 @@ export default {
return (
this.rechargePhoneInfo.phoneNo &&
checkPhoneFormat(this.rechargePhoneInfo.phoneNo) &&
this.selectedRechargeInfo.salePrice
this.selectedRechargeInfo?.salePrice
);
}
},
......@@ -77,7 +77,7 @@ export default {
},
methods: {
throttle,
selectedRecharge({ rechargeInfo }) {
selectedRecharge({ rechargeInfo = {} }) {
this.selectedRechargeInfo = rechargeInfo;
},
async goOrderApi() {
......
......@@ -189,6 +189,7 @@ export default {
this.orderInfo = res;
},
contractCS() {
this.$store.commit('CHANGE_TITLE', '客服中心'); // 改变title
window.location.href =
'https://kdspstatic.91xr.cn/kdsp/mine/service/customer-service/customer-service-prod2.html';
},
......@@ -220,7 +221,7 @@ export default {
},
toGoods() {
this.$router.push({
path: this.isKeyChange ? '/vipLife' : '/home'
path: '/vipLife'
});
},
orderNotify() {
......
......@@ -113,7 +113,7 @@ export default {
},
toGoods() {
this.$router.push({
path: this.isKeyChange ? '/vipLife' : '/home'
path: '/vipLife'
});
},
orderNotify() {
......
......@@ -15,7 +15,7 @@ export const goUrlExtends = {
window.location.replace(`${returnUrl}`);
return;
}
this.$router.replace({ name: 'home' });
this.$router.replace({ name: 'vipLife' });
}, 500);
},
goOrderList(payStatus) {
......
......@@ -101,7 +101,7 @@ export default {
}
},
mounted() {
this.currentTab = +this.$route.query.spuType || 0;
this.currentTab = +this.$route.query.spuType || 1;
this.$nextTick(() => {
this.getList();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment