Commit c80c2cb6 authored by zhangyanni's avatar zhangyanni

提交测试打包是否刷新

parent ad17726a
NODE_ENV="production" NODE_ENV="production"
VUE_APP_URL="prod" VUE_APP_URL="prod"
API_ROOT="/" API_ROOT="/"
VUE_APP_UPDATED="3.0.01" VUE_APP_UPDATED="3.1.01"
VUE_APP_UPLOAD_IMG="/base/upload/uploadPicture" VUE_APP_UPLOAD_IMG="/base/upload/uploadPicture"
VUE_APP_UPLOAD_FILE="/base/upload/uploadFile" VUE_APP_UPLOAD_FILE="/base/upload/uploadFile"
VUE_APP_UPLOAD_LOGO="/base/upload/uploadLogo" VUE_APP_UPLOAD_LOGO="/base/upload/uploadLogo"
NODE_ENV="production" NODE_ENV="production"
VUE_APP_URL="dev" VUE_APP_URL="dev"
API_ROOT="/" API_ROOT="/"
VUE_APP_UPDATED="3.0.01" VUE_APP_UPDATED="3.1.01"
VUE_APP_UPLOAD_IMG="/base/upload/uploadPicture" VUE_APP_UPLOAD_IMG="/base/upload/uploadPicture"
VUE_APP_UPLOAD_FILE="/base/upload/uploadFile" VUE_APP_UPLOAD_FILE="/base/upload/uploadFile"
VUE_APP_UPLOAD_LOGO="/base/upload/uploadLogo" VUE_APP_UPLOAD_LOGO="/base/upload/uploadLogo"
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
} }
}); });
var version = this.version; //版本号(每次上线前需要更新下版本号) var version = this.version; //版本号(每次上线前需要更新下版本号)
var vvv ='3.0.01' var vvv ='3.1.01'
if(vvv!=version){ if(vvv!=version){
this.version=vvv; this.version=vvv;
location.reload(); location.reload();
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<img src="../../assets/img/index/techbook-LOGO-02@2x.png" alt="" v-if="initStyle&&isShow&&currentIndex>-2" @click="$router.push('/')"> <img src="../../assets/img/index/techbook-LOGO-02@2x.png" alt="" v-if="initStyle&&isShow&&currentIndex>-2" @click="$router.push('/')">
<img src="../../assets/img/index/techbook-LOGO-01@2x.png" alt="" v-if="(!initStyle&&isShow)||!isShow||currentIndex==-2" @click="$router.push('/')"> <img src="../../assets/img/index/techbook-LOGO-01@2x.png" alt="" v-if="(!initStyle&&isShow)||!isShow||currentIndex==-2" @click="$router.push('/')">
<span>|</span> <span>|</span>
<span>{{$t("topNav.logoTitle")}}</span> <span @click="$router.push('/tryNewPage')">{{$t("topNav.logoTitle")}}</span>
</div> </div>
<div class="header-content" v-if="isShow" :class="lang=='en'?'ieEnUl':''"> <div class="header-content" v-if="isShow" :class="lang=='en'?'ieEnUl':''">
......
...@@ -170,7 +170,7 @@ router.beforeEach((to, from, next) => { ...@@ -170,7 +170,7 @@ router.beforeEach((to, from, next) => {
if (i18n.locale== "zh-CN") router.replace({path:'/loginByPhone',query:to.query}); if (i18n.locale== "zh-CN") router.replace({path:'/loginByPhone',query:to.query});
} }
if(!publicFun.getCookie("userInfo")){ if(!publicFun.getCookie("userInfo")){
if(to.name == 'dashboard'||to.name=='indexView'|| to.name == 'login' || to.name == 'mobileLoginCmpt'|| to.name == 'emailLoginCmpt'|| to.name == 'mobileRegisterCmpt'|| to.name == 'emailRegisterCmpt'||to.name=='completeInfoCmpt'|| to.name == 'successCmpt'||to.name=='findPasswordCmpt'||to.name=='modifyPasswordCmpt'||to.name=='passSuccessCmpt'||to.name=='indexView'||to.name=="mobileIndex"||to.name=="mobileLogin"||to.name=="loginByPhone"||to.name=="loginByEmail"||to.name=="mobileRegister"||to.name=="duijieshareRequire"||to.name=="duijieshareProject"||to.name=="knowledgeList"||to.name=="knowledgeDetail"||to.name=='vip'||to.name=='vipList'||to.name=='loadEmail'||to.name=='openEmail'||to.name=="viewRequire"||to.name=="duijiephoneBusinessList"||to.name=="duijiephoneBusinessDetail"||to.name=="duijiephoneRequireDetail"||to.name=="bigBusinessList"||to.name=="bigBusinessDetail"||to.name=="requireDetail"||to.name=="mixSearch"||to.name=="activitylist"||to.name=="activitydetail"||to.name=="activitySearchResult"||to.name=="activityapplyForProject"||to.name=='wechatLogin'||to.name=='newPage'||to.name=='bindAccount'||to.name=='subjectsecondStage'||to.name=='subjectsecondStageDetail'||to.name=='subjectmasterComment'||to.name=='subjectmasterList'||to.name=='subjectmasterDetail'||to.name=='subjectfirstStage'||to.name=='subjectcommentMore'||to.name=='subjectList'||to.name=="subjectresultpage"||to.name=="mineIndex"||to.name=="subjectStage"||to.name=="articleList"||to.name=="articleFlagList"||to.name=="articleDetail"||to.name=="mobileSearch"){ if(to.name == 'dashboard'||to.name=='indexView'|| to.name == 'login' || to.name == 'mobileLoginCmpt'|| to.name == 'emailLoginCmpt'|| to.name == 'mobileRegisterCmpt'|| to.name == 'emailRegisterCmpt'||to.name=='completeInfoCmpt'|| to.name == 'successCmpt'||to.name=='findPasswordCmpt'||to.name=='modifyPasswordCmpt'||to.name=='passSuccessCmpt'||to.name=='indexView'||to.name=="mobileIndex"||to.name=="mobileLogin"||to.name=="loginByPhone"||to.name=="loginByEmail"||to.name=="mobileRegister"||to.name=="duijieshareRequire"||to.name=="duijieshareProject"||to.name=="knowledgeList"||to.name=="knowledgeDetail"||to.name=='vip'||to.name=='vipList'||to.name=='loadEmail'||to.name=='openEmail'||to.name=="viewRequire"||to.name=="duijiephoneBusinessList"||to.name=="duijiephoneBusinessDetail"||to.name=="duijiephoneRequireDetail"||to.name=="bigBusinessList"||to.name=="bigBusinessDetail"||to.name=="requireDetail"||to.name=="mixSearch"||to.name=="activitylist"||to.name=="activitydetail"||to.name=="activitySearchResult"||to.name=="activityapplyForProject"||to.name=='wechatLogin'||to.name=='newPage'||to.name=='bindAccount'||to.name=='subjectsecondStage'||to.name=='subjectsecondStageDetail'||to.name=='subjectmasterComment'||to.name=='subjectmasterList'||to.name=='subjectmasterDetail'||to.name=='subjectfirstStage'||to.name=='subjectcommentMore'||to.name=='subjectList'||to.name=="subjectresultpage"||to.name=="mineIndex"||to.name=="subjectStage"||to.name=="articleList"||to.name=="articleFlagList"||to.name=="articleDetail"||to.name=="mobileSearch"||to.name=="tryNewPage"){
} else{ } else{
if(to.path == '/contentall'||to.path == '/contentdetail'||to.path == '/tabconnect'||to.path == '/thirdStage'||to.path == '/questionfill'||to.path == '/questionfillpc'||to.path == '/casedetailschild'||to.path == '/lndustryfocuschild'||to.path == '/successfulcasechild'||to.path == '/projectdetails'||to.path == '/seeprojectlist'||to.path == '/projectlist'||to.path == '/viewproject'||to.path == '/templateMobile1'||to.path == '/knowledge'||to.path == '/knowledgedetails'||to.path == '/termserviceed'||to.path == '/privacypolicyed'||to.path == '/contactused'||to.path == '/aboutused'||to.path == '/casedetailsed'||to.path == '/lndustryfocused'||to.path == '/successfulcaseed'||to.path == '/usehelped'||to.path == '/useHelp'||to.path == '/reminder'||to.path == '/contactus' ||to.path == '/privacypolicy' ||to.path == '/termservice' ||to.path == '/casedetails' ||to.path == '/successfulcase' ||to.path == '/lndustryfocus' ||to.path == '/aboutus'||to.path=='/applicationnotice' ){ if(to.path == '/contentall'||to.path == '/contentdetail'||to.path == '/tabconnect'||to.path == '/thirdStage'||to.path == '/questionfill'||to.path == '/questionfillpc'||to.path == '/casedetailschild'||to.path == '/lndustryfocuschild'||to.path == '/successfulcasechild'||to.path == '/projectdetails'||to.path == '/seeprojectlist'||to.path == '/projectlist'||to.path == '/viewproject'||to.path == '/templateMobile1'||to.path == '/knowledge'||to.path == '/knowledgedetails'||to.path == '/termserviceed'||to.path == '/privacypolicyed'||to.path == '/contactused'||to.path == '/aboutused'||to.path == '/casedetailsed'||to.path == '/lndustryfocused'||to.path == '/successfulcaseed'||to.path == '/usehelped'||to.path == '/useHelp'||to.path == '/reminder'||to.path == '/contactus' ||to.path == '/privacypolicy' ||to.path == '/termservice' ||to.path == '/casedetails' ||to.path == '/successfulcase' ||to.path == '/lndustryfocus' ||to.path == '/aboutus'||to.path=='/applicationnotice' ){
......
...@@ -52,6 +52,7 @@ const adminDashboard = () => import('views/dashboard/pages/index');//运营看 ...@@ -52,6 +52,7 @@ const adminDashboard = () => import('views/dashboard/pages/index');//运营看
const loadEmail = () => import('views/sendEmail/pages/loadEmail');//加在邮件 const loadEmail = () => import('views/sendEmail/pages/loadEmail');//加在邮件
const openEmail = () => import('views/sendEmail/pages/openEmail');//打开邮件 const openEmail = () => import('views/sendEmail/pages/openEmail');//打开邮件
const viewRequire = () => import('views/sendEmail/pages/viewRequire');//无需登录需求详情 const viewRequire = () => import('views/sendEmail/pages/viewRequire');//无需登录需求详情
const tryNewPage = () => import('views/tryRefresh');//试一下新页面 //TODO:点点滴滴
//手机端 //手机端
const indexView = () => import('views/mobile/mbindex'); const indexView = () => import('views/mobile/mbindex');
...@@ -104,7 +105,7 @@ const originalPush = Router.prototype.push; ...@@ -104,7 +105,7 @@ const originalPush = Router.prototype.push;
Router.prototype.push = function replace(location) { Router.prototype.push = function replace(location) {
return originalPush.call(this, location).catch(err => err); return originalPush.call(this, location).catch(err => err);
}; };
export default new Router({ const router = new Router({
routes: [ routes: [
{path: '*', component: notFind}, {path: '*', component: notFind},
{ {
...@@ -1131,9 +1132,9 @@ export default new Router({ ...@@ -1131,9 +1132,9 @@ export default new Router({
] ]
}, },
{ {
path:'/minePublished', path:'/minePublished',
name:"minePublished", name:"minePublished",
component:minePublished, component:minePublished,
children:[ children:[
{ {
name:"minePublished", name:"minePublished",
...@@ -1213,7 +1214,25 @@ export default new Router({ ...@@ -1213,7 +1214,25 @@ export default new Router({
path:"/mobilesearch", path:"/mobilesearch",
name:"mobileSearch", name:"mobileSearch",
component:mobileSearch component:mobileSearch
},
{
name:"tryNewPage",
path:"/tryNewPage",
component:tryNewPage
} }
] ]
}) });
router.onError((error) => {
const pattern = /Loading chunk (\d)+ failed/g;
const isChunkLoadFailed = error.message.match(pattern);
// const targetPath = router.history.pending.fullPath;
if (isChunkLoadFailed) {
// router.replace(targetPath);
location.reload();
}
});
export default router;
<template>
<div>
我是新页面
</div>
</template>
<script>
export default {
name: "tryRefresh"
}
</script>
<style scoped>
</style>
\ No newline at end of file
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