Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
techbook
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
front-end-dev
techbook
Commits
c80c2cb6
Commit
c80c2cb6
authored
May 22, 2020
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交测试打包是否刷新
parent
ad17726a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
10 deletions
+45
-10
.env
.env
+1
-1
.env.dev
.env.dev
+1
-1
App.vue
src/App.vue
+1
-1
PageTop.vue
src/components/index/PageTop.vue
+1
-1
main.js
src/main.js
+1
-1
router.js
src/router.js
+24
-5
tryRefresh.vue
src/views/tryRefresh.vue
+16
-0
No files found.
.env
View file @
c80c2cb6
NODE_ENV="production"
VUE_APP_URL="prod"
API_ROOT="/"
VUE_APP_UPDATED="3.
0
.01"
VUE_APP_UPDATED="3.
1
.01"
VUE_APP_UPLOAD_IMG="/base/upload/uploadPicture"
VUE_APP_UPLOAD_FILE="/base/upload/uploadFile"
VUE_APP_UPLOAD_LOGO="/base/upload/uploadLogo"
.env.dev
View file @
c80c2cb6
NODE_ENV="production"
VUE_APP_URL="dev"
API_ROOT="/"
VUE_APP_UPDATED="3.
0
.01"
VUE_APP_UPDATED="3.
1
.01"
VUE_APP_UPLOAD_IMG="/base/upload/uploadPicture"
VUE_APP_UPLOAD_FILE="/base/upload/uploadFile"
VUE_APP_UPLOAD_LOGO="/base/upload/uploadLogo"
src/App.vue
View file @
c80c2cb6
...
...
@@ -65,7 +65,7 @@
}
});
var
version
=
this
.
version
;
//版本号(每次上线前需要更新下版本号)
var
vvv
=
'3.
0
.01'
var
vvv
=
'3.
1
.01'
if
(
vvv
!=
version
){
this
.
version
=
vvv
;
location
.
reload
();
...
...
src/components/index/PageTop.vue
View file @
c80c2cb6
...
...
@@ -7,7 +7,7 @@
<img
src=
"../../assets/img/index/techbook-LOGO-02@2x.png"
alt=
""
v-if=
"initStyle&&isShow&¤tIndex>-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>
{{
$t
(
"topNav.logoTitle"
)
}}
</span>
<span
@
click=
"$router.push('/tryNewPage')"
>
{{
$t
(
"topNav.logoTitle"
)
}}
</span>
</div>
<div
class=
"header-content"
v-if=
"isShow"
:class=
"lang=='en'?'ieEnUl':''"
>
...
...
src/main.js
View file @
c80c2cb6
...
...
@@ -170,7 +170,7 @@ router.beforeEach((to, from, next) => {
if
(
i18n
.
locale
==
"zh-CN"
)
router
.
replace
({
path
:
'/loginByPhone'
,
query
:
to
.
query
});
}
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
{
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'
){
...
...
src/router.js
View file @
c80c2cb6
...
...
@@ -52,6 +52,7 @@ const adminDashboard = () => import('views/dashboard/pages/index');//运营看
const
loadEmail
=
()
=>
import
(
'views/sendEmail/pages/loadEmail'
);
//加在邮件
const
openEmail
=
()
=>
import
(
'views/sendEmail/pages/openEmail'
);
//打开邮件
const
viewRequire
=
()
=>
import
(
'views/sendEmail/pages/viewRequire'
);
//无需登录需求详情
const
tryNewPage
=
()
=>
import
(
'views/tryRefresh'
);
//试一下新页面 //TODO:点点滴滴
//手机端
const
indexView
=
()
=>
import
(
'views/mobile/mbindex'
);
...
...
@@ -104,7 +105,7 @@ const originalPush = Router.prototype.push;
Router
.
prototype
.
push
=
function
replace
(
location
)
{
return
originalPush
.
call
(
this
,
location
).
catch
(
err
=>
err
);
};
export
default
new
Router
({
const
router
=
new
Router
({
routes
:
[
{
path
:
'*'
,
component
:
notFind
},
{
...
...
@@ -1131,9 +1132,9 @@ export default new Router({
]
},
{
path
:
'/minePublished'
,
name
:
"minePublished"
,
component
:
minePublished
,
path
:
'/minePublished'
,
name
:
"minePublished"
,
component
:
minePublished
,
children
:[
{
name
:
"minePublished"
,
...
...
@@ -1213,7 +1214,25 @@ export default new Router({
path
:
"/mobilesearch"
,
name
:
"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
;
src/views/tryRefresh.vue
0 → 100644
View file @
c80c2cb6
<
template
>
<div>
我是新页面
</div>
</
template
>
<
script
>
export
default
{
name
:
"tryRefresh"
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment