浏览代码

Merge branch 'develop' into test

test
JinxChen 1年前
父节点
当前提交
8467bc9bed
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. +6
    -6
      src/views/ai-call-alarm/index.vue

+ 6
- 6
src/views/ai-call-alarm/index.vue 查看文件

@@ -28,8 +28,8 @@ export default {
code: this.code
};
let baseUrl = process.env.NODE_ENV === "production" ? 'https://ai.ssjlai.com' : 'https://id.ssjlai.com';
//let proxyUrl = '/api/id/';
let reqUrl = `${baseUrl}/watersoutboundapi/getLongLink`;
let reqUrl = '/api/id/getLongLink';
//let reqUrl = `${baseUrl}/watersoutboundapi/getLongLink`;
axios.get(reqUrl, {
params: { ...reqParams },
}).then(res =>{
@@ -48,17 +48,17 @@ export default {
longLink = data[0].long_link;
}
const createTime = data[0].create_time;
const nowTime = new Date().getTime();
// 13位时间戳 除以 1000 再取整
const nowTime = (new Date().getTime() / 1000).toFixed();
const twoHours = 7200;
if(nowTime - createTime > twoHours) {
if(nowTime - createTime < twoHours) {
// 增加过期失效判断,根据接口返回的创建时间与现在时间比较,超过两个小时提示链接过期并且不再跳转
console.log("::已经超过两个小时");
this.$dialog.confirm({
message: '链接已失效',
showCancelButton: false
})
} else {
window.location.href = longLink;
window.open(longLink);
}
} else {
this.$dialog.confirm({


正在加载...
取消
保存