最近有朋友反映大通小程序的业务域名(H5)配置后打不开,显示大通的域名,如下图:
如果出现上述问题域名模板更改,可以按如下方式修改,然后重新测试。 流程如下:
1.前端代码:/pages/base/webview/webview.vue
2.将页面代码更改为以下内容:
/*
* 追格小程序
* 作者: 追格
* 文档: https://www.zhuige.com/docs/zg.html
* gitee: https://gitee.com/zhuige_com/zhuige_xcx
* github: https://github.com/zhuige-com/zhuige_xcx
* Copyright © 2022-2023 www.zhuige.com All rights reserved.
*/
import Util from '@/utils/util';
export default {
data() {
return {
src: ''
};
},
onLoad(options) {
if (!options.src) {
uni.reLaunch({
url: '/pages/tabs/index/index'
})
return;
}
Util.addShareScore(options.source);
this.src = decodeURIComponent(options.src);
},
onShareAppMessage(options) {
return {
title: getApp().globalData.appName,
path: Util.addShareSource('pages/base/webview/webview?src=' + encodeURIComponent(options.webViewUrl))
};
}
}
ps:如有问题域名模板更改,会在V1.6.2之后的版本中优化该问题!