提交 a44b2985 编写于 作者: 张磊's avatar 张磊

name reg

上级 064e3a68
......@@ -6,7 +6,7 @@ export const getEntitlementList = async (externalOrderNo, projectEquityNo) => {
method: 'get',
url: `/tis/insurance/projectEquityNo/externalOrderNo?externalOrderNo=${externalOrderNo}&projectEquityNo=${projectEquityNo}`,
withCredentials: true,
hasLoading: true,
// hasLoading: true,
});
};
......@@ -16,7 +16,7 @@ export const getBanner = async (pageType, yunOrderNo) => {
method: 'get',
url: `/tis/insurance/explain/${yunOrderNo}/${pageType}`,
withCredentials: true,
hasLoading: true,
// hasLoading: true,
});
};
......
export const formatDate = (datetime) => {
var date = new Date(datetime); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
var year = date.getFullYear(),
month = ('0' + (date.getMonth() + 1)).slice(-2),
sdate = ('0' + date.getDate()).slice(-2),
hour = ('0' + date.getHours()).slice(-2),
minute = ('0' + date.getMinutes()).slice(-2),
second = ('0' + date.getSeconds()).slice(-2);
// 拼接
var result =
year + '-' + month + '-' + sdate + ' ' + hour + ':' + minute + ':' + second;
// 返回
return result;
var date = new Date(datetime); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
var year = date.getFullYear(),
month = ('0' + (date.getMonth() + 1)).slice(-2),
sdate = ('0' + date.getDate()).slice(-2),
hour = ('0' + date.getHours()).slice(-2),
minute = ('0' + date.getMinutes()).slice(-2),
second = ('0' + date.getSeconds()).slice(-2);
// 拼接
var result =
year + '-' + month + '-' + sdate + ' ' + hour + ':' + minute + ':' + second;
// 返回
return result;
};
export const formatDay = (datetime) => {
var date = new Date(datetime);
var year = date.getFullYear(),
month = ('0' + (date.getMonth() + 1)).slice(-2),
day = ('0' + date.getDate()).slice(-2);
// 拼接
var result = year + '-' + month + '-' + day;
// 返回
return result;
var date = new Date(datetime);
var year = date.getFullYear(),
month = ('0' + (date.getMonth() + 1)).slice(-2),
day = ('0' + date.getDate()).slice(-2);
// 拼接
var result = year + '-' + month + '-' + day;
// 返回
return result;
};
// 判断是否是微信
export function isWeixin() {
const ua = window.navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i) == 'micromessenger' || ua.match(/_SQ_/i) == '_sq_') {
// if(ua.match(/MicroMessenger/i) == 'micromessenger' || ua.match(/_SQ_/i) == '_sq_') {
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
return true;
} else{
} else {
return false;
}
}
// 时间戳 格式化为 时分秒(00: 00: 00)
export const formatDuring = (time) => {
const s = Math.floor(time / 1000);
if (!s) {
return '';
const s = Math.floor(time / 1000);
if (!s) {
return '';
}
let t = '';
if (s > -1) {
const hour = Math.floor(s / 3600);
const min = Math.floor(s / 60) % 60;
const sec = s % 60;
if (hour) {
if (hour < 10) {
t = '0' + hour + ':';
} else {
t = hour + ':';
}
}
let t = '';
if (s > -1) {
const hour = Math.floor(s / 3600);
const min = Math.floor(s / 60) % 60;
const sec = s % 60;
if (hour) {
if (hour < 10) {
t = '0' + hour + ':';
} else {
t = hour + ':';
}
}
if (min < 10) {
t += '0';
}
t += min + ':';
if (sec < 10) {
t += '0';
}
t += sec.toFixed(0);
if (min < 10) {
t += '0';
}
return t;
t += min + ':';
if (sec < 10) {
t += '0';
}
t += sec.toFixed(0);
}
return t;
};
export function toDecimal2(x) {
......
......@@ -353,7 +353,7 @@ export default {
.item {
font-size: 14px;
display: flex;
align-items: top;
align-items: center;
margin-bottom: 5px;
.label {
display: inline-block;
......
......@@ -220,6 +220,8 @@ import {
} from '@/api/question';
import { getBanner, getCardTypes } from '@/api/entitlement';
import DatePicker from './date-picker.vue';
import { isWeixin } from '@/utils/index';
let that;
export default {
components: { DatePicker },
......@@ -295,8 +297,22 @@ export default {
return rules;
},
},
created() {
if (!isWeixin()) {
this.$dialog
.alert({
type: 'warning',
title: '提示',
message: '请在微信中扫码打开!',
confirmButtonText: '我知道了',
})
.then(() => {
// on close
});
}
},
mounted() {
document.title = '癌筛权益领取';
document.title = this.headerInfo.title;
that = this;
const { externalOrderNo, projectEquityNo, channelCode } = this.$route.query;
if (channelCode) {
......@@ -335,8 +351,8 @@ export default {
// idCard: '411302199009092234',
// idType: 2 /** 默认为1:身份证 */,
// name: '乔先生',
// sex: '',
// birthTime: '',
// sex: 1,
// birthTime: '1990-09-09',
// };
this.inherentUserInfo = data;
......@@ -412,7 +428,7 @@ export default {
l +
`/pica-insurance${url}?projectEquityNo=${projectEquityNo}&externalOrderNo=${externalOrderNo}`;
window.location.href = hr;
} else if (statusCode == '0103' || versionNumber == 4) {
} else if (statusCode == '0103' || [4, 5].includes(versionNumber)) {
this.showProtocol = true;
this.openWebAppConfigPositive.path = `pagesInsurance/all-entrance/index?channelSource=insurance_channel&projectEquityNo=${projectEquityNo}&yunOrderNo=${yunOrderNo}&externalOrderNo=${externalOrderNo}`;
console.log(
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册