Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
pingan-life-index-pro
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
55dc70ff
authored
2020-05-11 11:02:36 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
平安福三语修改
1 parent
8be6ffa1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
212 deletions
src/common/lang/tc.js
src/common/lang/zh.js
src/pages/index/index.js
src/common/lang/tc.js
View file @
55dc70f
...
...
@@ -1098,8 +1098,8 @@ module.exports = {
t3
:
"優惠碼:CISAVE20"
},
title
:
{
t1
:
"「平安
.
傳家福」分紅終身壽險計劃"
,
t2
:
"美好重要的事物總是值得更好的守護,「平安
.
傳家福」分紅終身壽險計劃,提供長期儲蓄回報和終身人壽保障,幫助您持續滾存財富,保護您的收入和財富。 「平安.傳家福」設計具有獨特的功能,並保證最低回報,為您及摯愛家庭的未來做好準備。"
,
t1
:
"「平安
·
傳家福」分紅終身壽險計劃"
,
t2
:
"美好重要的事物總是值得更好的守護,「平安
·
傳家福」分紅終身壽險計劃,提供長期儲蓄回報和終身人壽保障,幫助您持續滾存財富,保護您的收入和財富。 「平安.傳家福」設計具有獨特的功能,並保證最低回報,為您及摯愛家庭的未來做好準備。"
,
t3
:
""
,
t4
:
""
,
},
...
...
src/common/lang/zh.js
View file @
55dc70f
...
...
@@ -1103,8 +1103,8 @@ module.exports = {
t3
:
"優惠碼:CISAVE20"
},
title
:
{
t1
:
"「平安
.
传家福」分红终身寿险计划"
,
t2
:
"美好重要的事物总是值得更好的守护,「平安
.
传家福」分红终身寿险计划,提供长期储蓄回报和终身人寿保障,帮助您持续滚存财富,保护您的收入和财富。 「平安.传家福」设计具有独特的功能,并保证最低回报,为您及挚爱家庭的未来做好准备。"
,
t1
:
"「平安
·
传家福」分红终身寿险计划"
,
t2
:
"美好重要的事物总是值得更好的守护,「平安
·
传家福」分红终身寿险计划,提供长期储蓄回报和终身人寿保障,帮助您持续滚存财富,保护您的收入和财富。 「平安.传家福」设计具有独特的功能,并保证最低回报,为您及挚爱家庭的未来做好准备。"
,
t3
:
""
,
t4
:
""
,
},
...
...
src/pages/index/index.js
View file @
55dc70f
...
...
@@ -8,240 +8,32 @@ import {
httpGet
,
httpPost
}
from
'@/api/fetch-api.js'
;
import
{
mapGetters
,
mapActions
,
mapState
}
from
"vuex"
;
var
UA
=
require
(
"ua-device"
);
export
default
{
data
()
{
return
{
key
:
'value'
,
// swiper
swiperOption
:
{
navigation
:
{
nextEl
:
'.swiper-button-next'
,
prevEl
:
'.swiper-button-prev'
},
pagination
:
{
el
:
'.swiper-pagination'
,
clickable
:
true
,
},
autoplay
:
{
delay
:
5000
,
stopOnLastSlide
:
false
,
disableOnInteraction
:
false
},
speed
:
1000
,
},
bannerList
:
[],
bannerCandidateList
:
[],
// 视频
playerOptions
:
{},
}
},
components
:
{},
computed
:
{
...
mapState
({
isSmallScreen
:
state
=>
state
.
isSmallScreen
,
isMobile
:
state
=>
state
.
isMobile
}),
locale
()
{
return
this
.
$i18n
.
locale
||
'tc'
;
},
i18n
()
{
return
this
.
$i18n
.
messages
&&
this
.
$i18n
.
locale
?
this
.
$i18n
.
messages
[
this
.
$i18n
.
locale
]
:
{};
},
player
()
{
return
this
.
$refs
.
videoPlayer
.
player
},
},
methods
:
{
toVhis
()
{
// gotoVHIS(this.locale);
this
.
$router
.
push
({
path
:
"/vhis"
,
query
:
{
p
:
"VHIS001"
}
});
},
/**
* 推荐产品
*/
onRecommendHandler
(
val
)
{
if
(
val
==
1
)
{
this
.
toVhis
();
}
if
(
val
==
2
)
{
this
.
$router
.
push
({
path
:
"/custom/service?q=m6"
})
}
if
(
val
==
3
)
{
this
.
$router
.
push
({
path
:
"/custom/product"
})
}
if
(
val
==
4
)
{
this
.
$router
.
push
({
path
:
"/news/list"
})
}
},
/**
* 推荐产品
*/
onMoreNewsHandler
()
{
this
.
$router
.
push
({
path
:
"/news/list"
})
},
/**
* 去新闻详情页面
* 需要带id
*/
toNewsDetail
()
{
this
.
$router
.
push
({
path
:
'/news/detail'
})
},
toProfile
()
{
this
.
$router
.
push
({
path
:
'/profile'
})
},
refreshVideoPlayer
()
{
let
videoUrl
=
sessionStorage
.
getItem
(
"_video_url"
);
let
posterUrl
=
sessionStorage
.
getItem
(
"_poster_url"
);
let
playerOptions
=
{
width
:
800
,
height
:
450
,
// aspectRatio: '16:9', // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
autoplay
:
false
,
//如果true,浏览器准备好时开始回放。
muted
:
true
,
// 默认情况下将会消除任何音频。
language
:
'en'
,
// playbackRates: [0.7, 1.0, 1.5, 2.0],//播放速度
sources
:
[{
type
:
"video/mp4"
,
// mp4
src
:
videoUrl
,
// webm
// src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
}],
poster
:
posterUrl
,
controlBar
:
{
timeDivider
:
true
,
durationDisplay
:
true
,
remainingTimeDisplay
:
false
,
fullscreenToggle
:
true
//全屏按钮
}
}
let
output
=
new
UA
(
navigator
.
userAgent
);
let
deviceType
=
output
.
device
.
type
;
let
isMobile
=
deviceType
==
"mobile"
;
// if (this.isSmallScreen) {
if
(
isMobile
)
{
playerOptions
.
aspectRatio
=
"16:9"
;
}
this
.
playerOptions
=
playerOptions
;
},
initData
()
{
this
.
fetchBanner
().
then
(
res
=>
{
this
.
bannerCandidateList
=
res
;
this
.
refreshBanner
();
});
this
.
fetchIndexVideo
().
then
(
res
=>
{
this
.
refreshVideoPlayer
();
});
// if (!this.isMobile) {
// window.addEventListener('resize', () => this.refreshVideoPlayer(), false);
// }
},
fetchBanner
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
httpPost
({
url
:
api
.
banner
}).
then
(
res
=>
{
resolve
(
res
);
});
});
},
fetchIndexVideo
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
httpPost
({
url
:
api
.
indexVideo
}).
then
(
res
=>
{
sessionStorage
.
setItem
(
"_video_url"
,
res
.
videoUrl
);
sessionStorage
.
setItem
(
"_poster_url"
,
res
.
posterUrl
);
resolve
(
res
);
});
});
},
refreshBanner
()
{
let
key
=
this
.
locale
;
if
(
key
==
"zh"
)
{
key
=
"cn"
;
}
let
bannerList
=
[];
this
.
bannerCandidateList
.
forEach
(
element
=>
{
bannerList
.
push
(
element
[
key
]);
});
this
.
$set
(
this
,
'bannerList'
,
bannerList
);
},
btnNavigateTo
(
type
,
link
)
{
switch
(
type
)
{
case
"none"
:
break
;
case
"news"
:
this
.
$router
.
push
({
path
:
"/news/detail"
,
query
:
{
c
:
link
}
});
break
;
case
"product"
:
break
;
case
"vhis"
:
this
.
$router
.
push
({
path
:
"/vhis"
,
query
:
{
p
:
link
}
});
break
;
default
:
location
.
href
=
link
;
break
;
}
}
},
beforeDestroy
()
{
// window.removeEventListener('resize', this.refreshVideoPlayer(), false);
},
mounted
()
{
this
.
initData
();
setTimeout
(()
=>
{
// console.log("queryConfigData:", this.$root.queryConfigData);
// console.log("queryConfigData:", window.vueInstance.queryConfigData); // 挂载到windows的访问方法
// 放localStorage直接是localStorage.getItem("queryConfig");
},
3000
)
},
created
()
{
this
.
$root
.
eventBus
.
$on
(
"langChange"
,
()
=>
{
try
{
this
.
refreshBanner
();
}
catch
(
e
)
{
}
});
}
...
...
Please
register
or
sign in
to post a comment