856f4cc7 by simon

默认提交

1 parent e8d215ed
......@@ -4,7 +4,7 @@
## 介绍
中国平安人寿(香港) 官网
本工程为“中国平安人寿(香港) 官网”前端项目工程。
---
......@@ -104,7 +104,7 @@ npm run sandbox
#### 样式规范
- 优先使用 \_var.scss 声明的样式变量
- 优先使用 _var.scss 声明的样式变量
- font-family 名字顺序 Arial -> Microsoft YaHei
#### z-index 权重划分
......@@ -123,6 +123,8 @@ npm run sandbox
- 与 bootstrap 相比,purecss 更为轻量。
---
## 前后端数据交互
#### 简述
......@@ -176,6 +178,15 @@ npm run sandbox
---
## 备注
pages目录下,只有一个空vue文件的目录均为顺应要求临时占坑。
#### 本地测试账号
91249124/ccc123!@# (可能会失效)
---
## TODO
- [x] 项目后期需补充 SEO 优化插件 PrerenderSPAPlugin
- [x] 后期需补充SEO优化,目标页面需讨论协商。
......
......@@ -9,7 +9,7 @@ let encryptSwitch = process.env.VUE_APP_CONTENT_ENCRYPT_SWITCH;
let rsa = new JsEncrypt();
rsa.setPublicKey(key);
let chars = "0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z".split(",");
// 生成随机AES秘钥
function randomAesKey() {
let res = "";
for (let i = 0; i < 16; i++) {
......@@ -19,6 +19,11 @@ function randomAesKey() {
return res;
};
/**
* 对内容进行加密
* 结构约定为 {k,v}
* @param {*} obj
*/
function encryptContent(obj) {
let aesKey = randomAesKey();
let key = CryptoJS.enc.Utf8.parse(aesKey);
......@@ -36,16 +41,10 @@ function encryptContent(obj) {
return result;
};
// import {
// Toast
// } from 'vant';
function Toast(msg) {
console.log("msg:", msg);
}
// function Toast(msg) {
// console.log("msg:", msg);
// }
// axios的默认url
// axios.defaults.baseURL = ""
// 服务器地址
// let base = process.env.REQUEST_DOMAIN || "http://localhost:9101";
......@@ -57,11 +56,11 @@ if (window.location.href.indexOf("192.168") != -1) {
baseURL = "https://ow.go.qudone.com";
}
const axios = axiosIns.create({
// baseURL: process.env.VUE_APP_BASE_URL,
baseURL: baseURL,
timeout: 10000
})
// 加密模式
let encryptPattern = [
/^\/pingan_hklife_webapi\/policy.*/,
/^\/pingan_hklife_webapi\/user.*/,
......@@ -70,6 +69,7 @@ let encryptPattern = [
/^\/pingan_hklife_webapi\/reset.*/,
]
// 加密接口白名单,上传接口不需要加密
let encryptWhileList = [
"/pingan_hklife_webapi/policy/idPicUpload",
"/pingan_hklife_webapi/policy/updateIdFileV2",
......
......@@ -131,7 +131,7 @@ export default {
},
watch: {
userInfo(val) {
this._buildLoginMenu();
this.buildLoginMenu();
}
},
created() {
......
......@@ -90,6 +90,7 @@ export default {
}
}
},
// 获取登陆cid
loadCidIfLogin() {
let param = {
sid: this.userInfo.sid
......@@ -114,6 +115,7 @@ export default {
this.step = 1;
});
},
// 校验cid
checkCid() {
let param = {
cid: this.cid
......
/**
* 页面描述:客户服务
*/
import api from '@/api/api'
import {
httpGet,
......
/**
* 页面描述:客户服务
* 承载客户服务的各个菜单页面
*/
import api from '@/api/api'
import {
httpGet,
httpPost
} from '@/api/fetch-api.js'
// 联系我们
import ContactUs from './components/contact-us.vue'
import InsuranceQuery from './components/insurance-query.vue'
import reservation from './components/reservation.vue'
// 缴付保费
import PaymentType from './components/payment-type.vue'
import ComplaintAcceptance from './components/complaint-acceptance.vue'
import CommonForm from './components/common-form.vue'
// 保单查询
import InsuranceQuery from './components/insurance-query.vue'
// 保单变更指引
import PolicyChangeGuide from './components/policy-change-guide.vue'
// 保单方式变更
import PolicyChangeContact from './components/policy-change-contact.vue'
// 客户资料变更
import PolicyChangeInformation from './components/policy-change-information.vue'
// 理赔申请
import Clarms from './components/clarms-comp.vue'
// 预约服务
import Reservation from './components/reservation.vue'
// 投诉受理
import ComplaintAcceptance from './components/complaint-acceptance.vue'
// 常用表格
import CommonForm from './components/common-form.vue'
export default {
data() {
......@@ -36,7 +54,7 @@ export default {
if (a == "m4") {
a = "m41"
}
if(a == "m5"){
if (a == "m5") {
this.$router.push({
path: "/clarms",
query: {}
......@@ -61,7 +79,7 @@ export default {
},
created() {
let activity = this.$route.query.q;
if(activity == "m5"){
if (activity == "m5") {
this.$router.push({
path: "/clarms",
query: {}
......@@ -73,7 +91,7 @@ export default {
components: {
ContactUs,
InsuranceQuery,
reservation,
Reservation,
PaymentType,
ComplaintAcceptance,
CommonForm,
......
/**
* 页面描述:完善基本信息
*
*/
import api from '@/api/api'
import {
httpGet,
......
/**
* 页面描述:官网首页
*/
import api from '@/api/api';
import {
httpGet,
......
/**
* 页面描述:五项信息首页
*/
import api from '@/api/api'
import {
httpGet,
......
/**
* 页面描述:登陆页面
*
*/
import {
mapGetters,
mapActions,
......@@ -161,18 +167,11 @@ export default {
this.modalSimpleVisiable = false;
this.modalProtocolVisiable = false;
},
onCheckHandler() {
},
onCheckHandler() {},
onProtocolHandler() {
this.modalProtocolVisiable = true;
// this.$router.push({
// path: "/protocol"
// })
},
onSubmitHandler() {
},
onSubmitHandler() {},
toRegisterPage() {
this.$router.push({
path: "/register"
......@@ -197,6 +196,7 @@ export default {
this.mobileOptions = mobileOptions;
this.mobileTip = this.mobileOptions[0];
},
// 获取并判断是否显示图形验证码
handlerIsShowImageVcode() {
return new Promise((resolve, reject) => {
httpPost({
......@@ -260,6 +260,7 @@ export default {
}
return true;
},
// 登陆
selfLogin() {
if (this.pwdLoginDisabled) {
return;
......@@ -295,8 +296,8 @@ export default {
})
},
_passwordLogin() {
// 刷新图形二维码
_passwordLogin() {
if (!this.loginForm.userId) {
this._showEmptyInputTips();
return;
......@@ -392,6 +393,7 @@ export default {
path: path
});
},
// opt登陆
_otpLogin() {
this._checkOptParams().then(() => {
let data = {
......@@ -461,6 +463,7 @@ export default {
});
});
},
// 刷新
handlerRefreshImageValue() {
httpPost({
url: api.stdRefreshVcode,
......
/**
* 页面描述:VHIS产品页面
*/
import api from '@/api/api'
import {
httpGet,
......@@ -94,14 +99,9 @@ export default {
break;
}
},
// 初始化视频组件
refreshVideoPlayer(videoUrl, posterUrl) {
// let videoUrl = sessionStorage.getItem("_video_url");
// let posterUrl = sessionStorage.getItem("_poster_url");
let playerOptions = {
// width: 800,
// height: 450,
// width: 1200,
// height: 675,
aspectRatio: '16:9', // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
autoplay: false, //如果true,浏览器准备好时开始回放。
muted: true, // 默认情况下将会消除任何音频。
......@@ -109,9 +109,7 @@ export default {
// 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,
......@@ -146,18 +144,15 @@ export default {
element.showMore = false;
});
}
// console.log("productList:", productList);
this.productList = productList;
},
onShowMoreHandler(idx) {
// console.log("idx:", idx);
let productList = this.productList;
let curProduct = productList[idx];
if (curProduct) {
curProduct.showMore = !curProduct.showMore;
}
this.productList = productList;
// console.log("this.productList:", this.productList);
},
initData() {
this.initProduct();
......@@ -189,13 +184,6 @@ export default {
this.bottomBtnType = targetData.bottomUrlType;
this.bottomBtnLink = targetData.bottomUrlLink;
}
// this.fetchBanner().then(res => {
// this.bannerCandidateList = res;
// this.refreshBanner();
// });
// this.fetchIndexVideo().then(res => {
// this.refreshVideoPlayer();
// });
},
initActivity() {
let d = localStorage.getItem("voluntaryInfo");
......
/**
* 页面描述:vhis
* 嵌套平安提供的iFrame
*/
import {
mapState
} from "vuex";
......