Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cauchy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
cauchy-ui
Commits
7e9b19c4
Commit
7e9b19c4
authored
Aug 16, 2021
by
FE-安焕焕
👣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:页面title不变的问题
parent
c74eb32d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
22 deletions
+15
-22
module.js
src/store/module.js
+11
-14
RechargeTop.vue
src/views/home/components/RechargeTop.vue
+2
-4
index.vue
src/views/orderDetail/index.vue
+2
-4
No files found.
src/store/module.js
View file @
7e9b19c4
...
...
@@ -40,20 +40,17 @@ const mutations = {
if
(
title
)
{
state
.
title
=
title
;
}
setTimeout
(
function
()
{
//利用iframe的onload事件刷新页面
document
.
title
=
state
.
title
;
var
iframe
=
document
.
createElement
(
'
iframe
'
);
iframe
.
style
.
visibility
=
'
hidden
'
;
iframe
.
style
.
width
=
'
1px
'
;
iframe
.
style
.
height
=
'
1px
'
;
iframe
.
onload
=
function
()
{
setTimeout
(
function
()
{
document
.
body
.
removeChild
(
iframe
);
},
0
);
};
document
.
body
.
appendChild
(
iframe
);
},
0
);
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
)
{
...
...
src/views/home/components/RechargeTop.vue
View file @
7e9b19c4
...
...
@@ -71,10 +71,8 @@ export default {
async
goOrderList
(
type
)
{
if
(
type
===
'
cs
'
)
{
this
.
$store
.
commit
(
'
CHANGE_TITLE
'
,
'
客服中心
'
);
// 改变title
setTimeout
(()
=>
{
window
.
location
.
href
=
'
https://kdspstatic.91xr.cn/kdsp/mine/service/customer-service/customer-service-prod2.html
'
;
},
0
);
window
.
location
.
href
=
'
https://kdspstatic.91xr.cn/kdsp/mine/service/customer-service/customer-service-prod2.html
'
;
return
;
}
const
token
=
localStorage
.
get
(
'
vccToken
'
);
...
...
src/views/orderDetail/index.vue
View file @
7e9b19c4
...
...
@@ -190,10 +190,8 @@ export default {
},
contractCS
()
{
this
.
$store
.
commit
(
'
CHANGE_TITLE
'
,
'
客服中心
'
);
// 改变title
setTimeout
(()
=>
{
window
.
location
.
href
=
'
https://kdspstatic.91xr.cn/kdsp/mine/service/customer-service/customer-service-prod2.html
'
;
},
0
);
window
.
location
.
href
=
'
https://kdspstatic.91xr.cn/kdsp/mine/service/customer-service/customer-service-prod2.html
'
;
},
openCancelPopup
()
{
this
.
$dialog
({
...
...
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