平安福三语修改
Showing
3 changed files
with
4 additions
and
212 deletions
| ... | @@ -1098,8 +1098,8 @@ module.exports = { | ... | @@ -1098,8 +1098,8 @@ module.exports = { |
| 1098 | t3: "優惠碼:CISAVE20" | 1098 | t3: "優惠碼:CISAVE20" |
| 1099 | }, | 1099 | }, |
| 1100 | title: { | 1100 | title: { |
| 1101 | t1: "「平安.傳家福」分紅終身壽險計劃", | 1101 | t1: "「平安·傳家福」分紅終身壽險計劃", |
| 1102 | t2: "美好重要的事物總是值得更好的守護,「平安.傳家福」分紅終身壽險計劃,提供長期儲蓄回報和終身人壽保障,幫助您持續滾存財富,保護您的收入和財富。 「平安.傳家福」設計具有獨特的功能,並保證最低回報,為您及摯愛家庭的未來做好準備。", | 1102 | t2: "美好重要的事物總是值得更好的守護,「平安·傳家福」分紅終身壽險計劃,提供長期儲蓄回報和終身人壽保障,幫助您持續滾存財富,保護您的收入和財富。 「平安.傳家福」設計具有獨特的功能,並保證最低回報,為您及摯愛家庭的未來做好準備。", |
| 1103 | t3: "", | 1103 | t3: "", |
| 1104 | t4: "", | 1104 | t4: "", |
| 1105 | }, | 1105 | }, | ... | ... |
| ... | @@ -1103,8 +1103,8 @@ module.exports = { | ... | @@ -1103,8 +1103,8 @@ module.exports = { |
| 1103 | t3: "優惠碼:CISAVE20" | 1103 | t3: "優惠碼:CISAVE20" |
| 1104 | }, | 1104 | }, |
| 1105 | title: { | 1105 | title: { |
| 1106 | t1: "「平安.传家福」分红终身寿险计划", | 1106 | t1: "「平安·传家福」分红终身寿险计划", |
| 1107 | t2: "美好重要的事物总是值得更好的守护,「平安.传家福」分红终身寿险计划,提供长期储蓄回报和终身人寿保障,帮助您持续滚存财富,保护您的收入和财富。 「平安.传家福」设计具有独特的功能,并保证最低回报,为您及挚爱家庭的未来做好准备。", | 1107 | t2: "美好重要的事物总是值得更好的守护,「平安·传家福」分红终身寿险计划,提供长期储蓄回报和终身人寿保障,帮助您持续滚存财富,保护您的收入和财富。 「平安.传家福」设计具有独特的功能,并保证最低回报,为您及挚爱家庭的未来做好准备。", |
| 1108 | t3: "", | 1108 | t3: "", |
| 1109 | t4: "", | 1109 | t4: "", |
| 1110 | }, | 1110 | }, | ... | ... |
| ... | @@ -8,240 +8,32 @@ import { | ... | @@ -8,240 +8,32 @@ import { |
| 8 | httpGet, | 8 | httpGet, |
| 9 | httpPost | 9 | httpPost |
| 10 | } from '@/api/fetch-api.js'; | 10 | } from '@/api/fetch-api.js'; |
| 11 | import { | ||
| 12 | mapGetters, | ||
| 13 | mapActions, | ||
| 14 | mapState | ||
| 15 | } from "vuex"; | ||
| 16 | var UA = require("ua-device"); | ||
| 17 | 11 | ||
| 18 | export default { | 12 | export default { |
| 19 | data() { | 13 | data() { |
| 20 | return { | 14 | return { |
| 21 | key: 'value', | 15 | key: 'value', |
| 22 | // swiper | ||
| 23 | swiperOption: { | ||
| 24 | navigation: { | ||
| 25 | nextEl: '.swiper-button-next', | ||
| 26 | prevEl: '.swiper-button-prev' | ||
| 27 | }, | ||
| 28 | pagination: { | ||
| 29 | el: '.swiper-pagination', | ||
| 30 | clickable: true, | ||
| 31 | }, | ||
| 32 | autoplay: { | ||
| 33 | delay: 5000, | ||
| 34 | stopOnLastSlide: false, | ||
| 35 | disableOnInteraction: false | ||
| 36 | }, | ||
| 37 | speed: 1000, | ||
| 38 | }, | ||
| 39 | bannerList: [], | ||
| 40 | bannerCandidateList: [], | ||
| 41 | // 视频 | ||
| 42 | playerOptions: {}, | ||
| 43 | 16 | ||
| 44 | } | 17 | } |
| 45 | }, | 18 | }, |
| 46 | components: {}, | 19 | components: {}, |
| 47 | computed: { | 20 | computed: { |
| 48 | ...mapState({ | ||
| 49 | isSmallScreen: state => state.isSmallScreen, | ||
| 50 | isMobile: state => state.isMobile | ||
| 51 | }), | ||
| 52 | locale() { | 21 | locale() { |
| 53 | return this.$i18n.locale || 'tc'; | 22 | return this.$i18n.locale || 'tc'; |
| 54 | }, | 23 | }, |
| 55 | i18n() { | 24 | i18n() { |
| 56 | return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {}; | 25 | return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {}; |
| 57 | }, | 26 | }, |
| 58 | player() { | ||
| 59 | return this.$refs.videoPlayer.player | ||
| 60 | }, | ||
| 61 | |||
| 62 | }, | 27 | }, |
| 63 | methods: { | 28 | methods: { |
| 64 | toVhis() { | ||
| 65 | // gotoVHIS(this.locale); | ||
| 66 | this.$router.push({ | ||
| 67 | path: "/vhis", | ||
| 68 | query: { | ||
| 69 | p: "VHIS001" | ||
| 70 | } | ||
| 71 | }); | ||
| 72 | }, | ||
| 73 | /** | ||
| 74 | * 推荐产品 | ||
| 75 | */ | ||
| 76 | onRecommendHandler(val) { | ||
| 77 | if (val == 1) { | ||
| 78 | this.toVhis(); | ||
| 79 | } | ||
| 80 | if (val == 2) { | ||
| 81 | this.$router.push({ | ||
| 82 | path: "/custom/service?q=m6" | ||
| 83 | }) | ||
| 84 | } | ||
| 85 | if (val == 3) { | ||
| 86 | this.$router.push({ | ||
| 87 | path: "/custom/product" | ||
| 88 | }) | ||
| 89 | } | ||
| 90 | if (val == 4) { | ||
| 91 | this.$router.push({ | ||
| 92 | path: "/news/list" | ||
| 93 | }) | ||
| 94 | } | ||
| 95 | |||
| 96 | }, | ||
| 97 | |||
| 98 | /** | ||
| 99 | * 推荐产品 | ||
| 100 | */ | ||
| 101 | onMoreNewsHandler() { | ||
| 102 | this.$router.push({ | ||
| 103 | path: "/news/list" | ||
| 104 | }) | ||
| 105 | }, | ||
| 106 | |||
| 107 | /** | ||
| 108 | * 去新闻详情页面 | ||
| 109 | * 需要带id | ||
| 110 | */ | ||
| 111 | toNewsDetail() { | ||
| 112 | this.$router.push({ | ||
| 113 | path: '/news/detail' | ||
| 114 | }) | ||
| 115 | }, | ||
| 116 | toProfile() { | ||
| 117 | this.$router.push({ | ||
| 118 | path: '/profile' | ||
| 119 | }) | ||
| 120 | }, | ||
| 121 | refreshVideoPlayer() { | ||
| 122 | let videoUrl = sessionStorage.getItem("_video_url"); | ||
| 123 | let posterUrl = sessionStorage.getItem("_poster_url"); | ||
| 124 | let playerOptions = { | ||
| 125 | width: 800, | ||
| 126 | height: 450, | ||
| 127 | // aspectRatio: '16:9', // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3") | ||
| 128 | autoplay: false, //如果true,浏览器准备好时开始回放。 | ||
| 129 | muted: true, // 默认情况下将会消除任何音频。 | ||
| 130 | language: 'en', | ||
| 131 | // playbackRates: [0.7, 1.0, 1.5, 2.0],//播放速度 | ||
| 132 | sources: [{ | ||
| 133 | type: "video/mp4", | ||
| 134 | // mp4 | ||
| 135 | src: videoUrl, | ||
| 136 | // webm | ||
| 137 | // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm" | ||
| 138 | }], | ||
| 139 | poster: posterUrl, | ||
| 140 | controlBar: { | ||
| 141 | timeDivider: true, | ||
| 142 | durationDisplay: true, | ||
| 143 | remainingTimeDisplay: false, | ||
| 144 | fullscreenToggle: true //全屏按钮 | ||
| 145 | } | ||
| 146 | } | ||
| 147 | let output = new UA(navigator.userAgent); | ||
| 148 | let deviceType = output.device.type; | ||
| 149 | let isMobile = deviceType == "mobile"; | ||
| 150 | // if (this.isSmallScreen) { | ||
| 151 | if (isMobile) { | ||
| 152 | playerOptions.aspectRatio = "16:9"; | ||
| 153 | } | ||
| 154 | this.playerOptions = playerOptions; | ||
| 155 | }, | ||
| 156 | initData() { | ||
| 157 | this.fetchBanner().then(res => { | ||
| 158 | this.bannerCandidateList = res; | ||
| 159 | this.refreshBanner(); | ||
| 160 | }); | ||
| 161 | this.fetchIndexVideo().then(res => { | ||
| 162 | this.refreshVideoPlayer(); | ||
| 163 | }); | ||
| 164 | // if (!this.isMobile) { | ||
| 165 | // window.addEventListener('resize', () => this.refreshVideoPlayer(), false); | ||
| 166 | // } | ||
| 167 | }, | ||
| 168 | fetchBanner() { | ||
| 169 | return new Promise((resolve, reject) => { | ||
| 170 | httpPost({ | ||
| 171 | url: api.banner | ||
| 172 | }).then(res => { | ||
| 173 | resolve(res); | ||
| 174 | }); | ||
| 175 | }); | ||
| 176 | }, | ||
| 177 | fetchIndexVideo() { | ||
| 178 | return new Promise((resolve, reject) => { | ||
| 179 | httpPost({ | ||
| 180 | url: api.indexVideo | ||
| 181 | }).then(res => { | ||
| 182 | sessionStorage.setItem("_video_url", res.videoUrl); | ||
| 183 | sessionStorage.setItem("_poster_url", res.posterUrl); | ||
| 184 | resolve(res); | ||
| 185 | }); | ||
| 186 | }); | ||
| 187 | }, | ||
| 188 | refreshBanner() { | ||
| 189 | let key = this.locale; | ||
| 190 | if (key == "zh") { | ||
| 191 | key = "cn"; | ||
| 192 | } | ||
| 193 | let bannerList = []; | ||
| 194 | this.bannerCandidateList.forEach(element => { | ||
| 195 | bannerList.push(element[key]); | ||
| 196 | }); | ||
| 197 | this.$set(this, 'bannerList', bannerList); | ||
| 198 | }, | ||
| 199 | btnNavigateTo(type, link) { | ||
| 200 | switch (type) { | ||
| 201 | case "none": | ||
| 202 | break; | ||
| 203 | case "news": | ||
| 204 | this.$router.push({ | ||
| 205 | path: "/news/detail", | ||
| 206 | query: { | ||
| 207 | c: link | ||
| 208 | } | ||
| 209 | }); | ||
| 210 | break; | ||
| 211 | case "product": | ||
| 212 | break; | ||
| 213 | case "vhis": | ||
| 214 | this.$router.push({ | ||
| 215 | path: "/vhis", | ||
| 216 | query: { | ||
| 217 | p: link | ||
| 218 | } | ||
| 219 | }); | ||
| 220 | break; | ||
| 221 | default: | ||
| 222 | location.href = link; | ||
| 223 | break; | ||
| 224 | } | ||
| 225 | } | ||
| 226 | }, | 29 | }, |
| 227 | beforeDestroy() { | 30 | beforeDestroy() { |
| 228 | // window.removeEventListener('resize', this.refreshVideoPlayer(), false); | ||
| 229 | }, | 31 | }, |
| 230 | mounted() { | 32 | mounted() { |
| 231 | this.initData(); | ||
| 232 | |||
| 233 | setTimeout(() => { | ||
| 234 | // console.log("queryConfigData:", this.$root.queryConfigData); | ||
| 235 | // console.log("queryConfigData:", window.vueInstance.queryConfigData); // 挂载到windows的访问方法 | ||
| 236 | // 放localStorage直接是localStorage.getItem("queryConfig"); | ||
| 237 | }, 3000) | ||
| 238 | }, | 33 | }, |
| 239 | |||
| 240 | created() { | 34 | created() { |
| 241 | |||
| 242 | this.$root.eventBus.$on("langChange", () => { | 35 | this.$root.eventBus.$on("langChange", () => { |
| 243 | try { | 36 | try { |
| 244 | this.refreshBanner(); | ||
| 245 | } catch (e) { } | 37 | } catch (e) { } |
| 246 | }); | 38 | }); |
| 247 | } | 39 | } | ... | ... |
-
Please register or sign in to post a comment