dac7f686 by joe

接入cms

1 parent c239842d
......@@ -8,4 +8,4 @@ VUE_APP_INDEX_VIDEO = 'https://ow.go.qudone.com/jyesupload/ee516bb327484197b7ca7
VUE_APP_CONTENT_ENCRYPT_KEY = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA1SNj4qiOEmvTkZfp+Gt0UOLTCdxuEqRE+k0fROhgZdN2GmtDg6jcZV/CXKdwQGGdwOYdxEngRQb2K/SXd5Rnu4MkuAoHopDNrBRVqoJNQi6VOv6fvAEzeYivtS9aMM7IvdZuN1QlASCz2vxfUKJ3BaijMQqQE9m0pVm+0BDEfwIDAQAB'
VUE_APP_CONTENT_ENCRYPT_SWITCH = true
\ No newline at end of file
VUE_APP_CONTENT_ENCRYPT_SWITCH = false
\ No newline at end of file
......
......@@ -70,7 +70,7 @@ let encryptWhileList = [
// 请求拦截器
axios.interceptors.request.use(
config => {
if (encryptSwitch) {
if (encryptSwitch == "true") {
for (let index = 0; index < encryptPattern.length; index++) {
let element = encryptPattern[index];
if (element.test(config.url)) {
......
......@@ -24,7 +24,7 @@ module.exports = {
nav: {
loginData: {
name: "login",
path: "",
path: "/login",
list: [{
name: "register",
path: "/register",
......@@ -59,19 +59,20 @@ module.exports = {
navList: [{
name: "Products",
path: "",
value: "gotoVHIS",
list: [{
name: "VHIS - Standard Plan",
name: "VHIS",
path: "",
value: "gotoVHIS"
},
{
name: "Dividen Life Insurance",
name: "Insurance with Investment Focus",
path: "/product"
}]
},
{
name: "Customer Service",
path: "",
path: "/custom/product",
list: [
{
name: "Customer Service",
......@@ -113,9 +114,9 @@ module.exports = {
},
{
name: "About Us",
path: "",
path: "/profile",
list: [{
name: "Ping An (Life) HK",
name: "About Ping An (Life) HK",
path: "/profile"
},
{
......@@ -136,7 +137,7 @@ module.exports = {
},
{
name: "Join Us",
path: "",
path: "/empty",
list: [{
name: "Corporate Culture",
path: "/empty"
......@@ -767,5 +768,11 @@ module.exports = {
goto: "Go to",
per: "page",
page: ""
},
newsDetail : {
back : "Back",
publishAt : "Publish time",
readers : "Number of reader",
per : ""
}
}
......
......@@ -24,7 +24,7 @@ module.exports = {
nav: {
loginData: {
name: "登入",
path: "",
path: "/login",
list: [{
name: "註冊",
path: "/register",
......@@ -61,18 +61,18 @@ module.exports = {
name: "產品介紹",
path: "",
list: [{
name: "VHIS",
name: "自願醫保計劃",
path: "",
value: "gotoVHIS"
},
{
name: "分紅終身",
name: "投資成份保險",
path: "/product"
}]
},
{
name: "客戶服務",
path: "",
path: "/custom/product",
list: [
{
name: "客戶服務導航",
......@@ -114,9 +114,9 @@ module.exports = {
},
{
name: "關於我們",
path: "",
path: "/profile",
list: [{
name: "平安人壽香港",
name: "有關平安人壽香港",
path: "/profile"
},
{
......@@ -137,7 +137,7 @@ module.exports = {
},
{
name: "加入我們",
path: "",
path: "/empty",
list: [{
name: "企業文化",
path: "/empty"
......@@ -766,5 +766,11 @@ module.exports = {
goto: "跳轉",
per: "第",
page: "頁"
},
newsDetail : {
back : "回到列表頁",
publishAt : "發佈時間",
readers : "閱讀人數",
per : "人"
}
}
......
......@@ -24,7 +24,7 @@ module.exports = {
nav: {
loginData: {
name: "登陆",
path: "",
path: "/login",
list: [{
name: "注册",
path: "/register",
......@@ -59,19 +59,20 @@ module.exports = {
navList: [{
name: "产品介绍",
path: "",
value: "gotoVHIS",
list: [{
name: "自愿医保基本计划",
path: "",
value: "gotoVHIS"
},
{
name: "分红终身寿险",
name: "投资成份保险",
path: "/product"
}]
},
{
name: "客户服务",
path: "",
path: "/custom/product",
list: [{
name: "客户服务导航",
path: "/custom/product"
......@@ -112,9 +113,9 @@ module.exports = {
},
{
name: "关于我们",
path: "",
path: "/profile",
list: [{
name: "平安人寿香港",
name: "有关平安香港",
path: "/profile"
},
{
......@@ -136,7 +137,7 @@ module.exports = {
},
{
name: "加入我们",
path: "",
path: "/empty",
list: [{
name: "企业文化",
path: "/empty"
......@@ -766,5 +767,11 @@ module.exports = {
goto: "跳转",
per: "第",
page: "页"
},
newsDetail : {
back : "回到列表页",
publishAt : "发布时间",
readers : "阅读人数",
per : "人"
}
}
......
......@@ -162,19 +162,20 @@ export default {
},
loadIdentify() {
return new Promise((resolve, reject) => {
httpPost({
url: api.load,
data: {
clientNo: "501381573194155227"
}
}).then(response => {
this.$store.commit("SET_USER_INFO", response.data);
resolve();
})
// httpPost({
// url: api.load,
// data: {
// clientNo: "501381573194155227"
// }
// }).then(response => {
// this.$store.commit("SET_USER_INFO", response.data);
// resolve();
// })
resolve();
});
},
checkCnName() {
if (!this.information.cnName) {
if (!this.information.firstName || !this.information.lastName) {
let message = this.i18n.infomationImprove.errorTips.e1;
this.errorTips.e1 = message;
return false;
......@@ -280,6 +281,7 @@ export default {
},
'birthDate': function () {
this.errorTips.e3 = "";
this.information.birthDate = this.birthDate;
},
'information.idNo': function () {
this.errorTips.e4 = "";
......
......@@ -63,7 +63,7 @@
</div>
<div class="ipt-wrap">
<!-- <input class="ipt" type="date" :class="{err : errorTips.e3.length > 0}" v-model="birthDate"> -->
<date-picker class="date" v-model="information.birthDate" :filtModel="['future','today']"></date-picker>
<date-picker class="date" v-model="birthDate" :filtModel="['future','today']"></date-picker>
</div>
<div class="validator" v-if="errorTips.e3.length > 0 ">
<img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e3}}
......
......@@ -43,10 +43,10 @@ export default {
tip: "" // 显示的文字
},
loginForm: {
userId: "18334783910",
password: "qweqwe123",
// userId: "18145729463",
// password: "ccc123!@#",
// userId: "18334783910",
// password: "qweqwe123",
userId: "18145729463",
password: "ccc123!@#",
// userId: "",
// password: "",
......
......@@ -4,12 +4,26 @@ import {
httpPost
} from '@/api/fetch-api.js'
import { getDateYMD } from "@/utils/biz.js";
export default {
data() {
return {
key: 'value'
key: 'value',
data: {
title: "",
content: "",
dateFormat: "",
pv: 0,
},
hadData: true
}
},
computed: {
...mapState({
userInfo: state => state.userInfo
}),
},
components: {},
methods: {
toNewsList() {
......@@ -18,9 +32,29 @@ export default {
// })
this.$router.go(-1);
},
initData() {}
initData() {
console.log(this.$route);
let c = this.$route.query.c;
let l = this.$i18n.locale;
let params = {
l: l,
newsCode: c
};
httpGet({ url: api.newsDetail, data: params }).then(res => {
if (!res) {
this.hadData = false;
return;
}
this.data.title = res.title;
this.data.content = res.content;
this.data.dateFormat = getDateYMD(res.createAt);
this.data.pv = res.pv;
});
}
},
mounted() {
this.initData();
},
mounted() {},
created() {
document.documentElement.scrollTop = 0;
document.body.scrollTop = 0;
......
<template>
<div class="content">
<div >
<div class="top-space"></div>
<h2 class="tit">{{data.title}}</h2>
<div @click="toNewsList" class="box back"> {{$t('newsDetail.back')}} ></div>
<div class="box dat">
<div class="date"> <img class="icon-clock" src="@/assets/images/news-detail/icon-clock.png" alt=""> {{$t('newsDetail.publishAt')}}{{data.dateFormat}}</div>
<div class="pv">{{$t('newsDetail.readers')}}{{data.pv}} {{$t('newsDetail.per')}}</div>
</div>
<div class="box desc" v-html="data.content">
{{data.content}}
</div>
</div>
<!--
<div v-if="$i18n.locale == 'zh'">
<div class="top-space"></div>
<h2 class="tit">中国平安,与时代同行!</h2>
......@@ -93,6 +108,7 @@
</div>
</div>
-->
</div>
</template>
......
......@@ -5,6 +5,7 @@ import {
} from '@/api/fetch-api.js'
import Pagination from '@/components/pagination/pagination.vue'
import { getDateYMD } from "@/utils/biz.js";
export default {
name: "newsList",
......@@ -14,73 +15,46 @@ export default {
data() {
return {
key: 'value',
items: []
queryForm: {
l: "tc",
page: 1,
size: 10
},
total: 0,
news: []
}
},
methods: {
toNewsDetail() {
toNewsDetail(newsCode) {
this.$router.push({
path: "/news/detail"
})
path: "/news/detail",
query: {
c: newsCode
}
});
},
selPage(val) {
let {
page
} = val;
console.log("page:", page);
this.queryForm.page = page;
this.initData();
},
initData() {
// 初始化数据
// this.items = new Array(12);
if (this.$i18n.locale == 'zh') {
this.items = [
"平安人寿2019年2季度保险消费报告出炉!",
"公益献礼华诞年,创新开拓扶贫路",
"平安920要放大招啦!内含超强攻略!",
"突发!平安人寿迅速应对广东阳江大巴交通事故",
"伴成长、助扶贫,平安人寿客服节给家庭“AI”的力量",
"“平安行动 种子计划”推进急救知识全民普及",
"科技助力客户体验升级,平安人寿打造智慧服务生态",
"连续11年进入世界500强,中国平安,稳!",
"全国第四!财富中国500强平安再创佳绩",
"平安福又双叒叕获大奖,平安人寿获奖产品大盘点",
"突发!平安人寿迅速应对四川宜宾地震",
"超硬核新产品,今年司庆有安排!",
]
} else if (this.$i18n.locale == 'tc') {
this.items = [
"平安人壽2019年2季度保險消費報告出爐!",
"公益獻禮華誕年,創新開拓扶貧路",
"平安920要放大招啦!內含超強攻略!",
"突發!平安人壽迅速應對廣東陽江大巴交通事故",
"伴成長、助扶貧,平安人壽客服節給家庭“AI”的力量",
"“平安行動 種子計劃”推進急救知識全民普及",
"科技助力客戶體驗升級,平安人壽打造智慧服務生態",
"連續11年進入世界500強,中國平安,穩!",
"全國第四!財富中國500強平安再創佳績",
"平安福又雙叒叕獲大獎,平安人壽獲獎產品大盤點",
"突發!平安人壽迅速應對四川宜賓地震",
"超硬核新產品,今年司慶有安排!",
]
} else {
this.items = [
"PINGAN life insurance consumption report for the second quarter of 2019 is released! ",
"Public welfare gift year, innovation and development of poverty alleviation road",
"Ping an 920 to magnify it! Contains super strategy!",
"A sudden! Ping an life quickly responded to the bus accident in yangjiang, guangdong province ",
"With growth, help poverty alleviation, ping an life customer service festival to the family \"AI\" power",
"\"Safe action seed plan\" promotes the popularization of first aid knowledge to all people",
"Technology helps customer experience upgrade, ping an life to create a smart service ecology",
"Enter the world top 500 for 11 consecutive years, China is safe and stable!",
"Fourth in the country! Fortune China top 500 ping an achieves more achievements",
"Peace and double won awards, ping an life insurance the award-winning products inventory",
"A sudden! Ping an life quickly responded to the earthquake in yibin, sichuan province ",
"Super hard core new products, this year siqing has arranged! ",
]
}
let l = this.$i18n.locale;
this.queryForm.l = l;
httpGet({ url: api.newsList, data: this.queryForm }).then(res => {
let newsList = res.list;
newsList.forEach(element => {
element.dateFormat = getDateYMD(element.createAt);
});
this.$set(this, 'news', newsList);
console.log(newsList);
this.total = res.total;
});
}
},
mounted() {},
mounted() { },
created() {
document.documentElement.scrollTop = 0;
document.body.scrollTop = 0;
......
......@@ -9,16 +9,16 @@
<div class="top-space"></div>
<div class="box">
<div class="news">
<div @click="toNewsDetail()" v-for="(item,index) in items" :key="index" class="news-item">
<div @click="toNewsDetail(item.newsCode)" v-for="(item,index) in news" :key="index" class="news-item">
<div class="news-item-tit">
<div class="point"></div>
<div class="tit">{{item}}</div>
<img v-if="index < 3" class="new" src="@/assets/images/news-list/news-list-new.png">
<div class="tit">{{item.title}}</div>
<img v-if="item.hadNewTag == 1" class="new" src="@/assets/images/news-list/news-list-new.png">
</div>
<div class="news-item-date">2019-09-27</div>
<div class="news-item-date">{{item.dateFormat}}</div>
</div>
</div>
<pagination @selpage="selPage" :total="23" class="pagination"></pagination>
<pagination @selpage="selPage" :total="total" class="pagination"></pagination>
</div>
</div>
</div>
......
......@@ -17,4 +17,14 @@ export function gotoVHIS(lan) {
}
url += "&partnerId=PA001&productCode=VHIS001";
window.location.href = url;
}
export function getDateYMD(timestamp) {
let day = new Date(timestamp);
let y = day.getFullYear();
let m = day.getMonth() + 1;
let d = day.getDate();
let s = y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
return s;
}
\ No newline at end of file
......