ソースを参照

Merge branch 'develop' into test

test
JinxChen 1年前
コミット
f2abc3ea16
5個のファイルの変更121行の追加7行の削除
  1. +12
    -2
      README.md
  2. +2
    -2
      src/config/models.js
  3. +10
    -0
      src/router/index.js
  4. +77
    -0
      src/views/ai-call-alarm/index.vue
  5. +20
    -3
      vue.config.js

+ 12
- 2
README.md ファイルの表示

@@ -1,7 +1,7 @@
<!--
* @Date: 2022-08-17 16:19:13
* @LastEditors: JinxChen
* @LastEditTime: 2023-06-01 14:50:57
* @LastEditTime: 2023-06-07 11:24:44
* @FilePath: \TelpoH5FrontendWeb\README.md
* @description: 项目说明
-->
@@ -467,4 +467,14 @@ feature
update
- 心理健康
- 建模进度查询,问卷调查,心理详情汇总和心理健康抑郁,压力和疲劳详情页面
- 增加 接口请求时带上从随手精灵传过来的token
- 增加 接口请求时带上从随手精灵传过来的token

## v1.0.58
`2023.6.7`
update
- ai语音告警
- 增加 一个ai语音呼叫中间页
- 增加 获取long_link的接口
- vue.config.js
- 增加 关于ai水域告警接口跨域代理设置
- 因项目接口地址不同,发布线上时取消ai水域告警接口跨域代理,仅在本地调试开启

+ 2
- 2
src/config/models.js ファイルの表示

@@ -1,11 +1,11 @@
/*
* @Date: 2021-11-20 10:26:39
* @LastEditors: JinxChen
* @LastEditTime: 2023-06-01 18:06:38
* @LastEditTime: 2023-06-07 11:25:02
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
export const VERSION_MODEL = '1.0.57F'; //版本号
export const VERSION_MODEL = '1.0.58F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',


+ 10
- 0
src/router/index.js ファイルの表示

@@ -1,3 +1,10 @@
/*
* @Date: 2023-06-01 18:41:50
* @LastEditors: JinxChen
* @LastEditTime: 2023-06-07 10:40:03
* @FilePath: \TelpoH5FrontendWeb\src\router\index.js
* @description:
*/
/*
* @Date: 2023-05-30 15:37:06
* @LastEditors: JinxChen
@@ -47,6 +54,9 @@ const routes = [
{ path: '/psychological', name: 'psychological', component: resolve => require(['@/views/health/psychological'], resolve) },
// 健康-抑郁,压力和疲劳汇总入口
{ path: '/psychologicalMain', name: 'psychologicalMain', component: resolve => require(['@/views/health/psychological-main'], resolve) },

// 告警详情-中间页
{ path: '/aiCallAlarm', name: 'aiCallAlarm', component: resolve => require(['@/views/ai-call-alarm'], resolve) },
];

const router = new VueRouter({


+ 77
- 0
src/views/ai-call-alarm/index.vue ファイルの表示

@@ -0,0 +1,77 @@
<template>
<div class="ai-call-container"></div>
</template>

<script>
import axios from 'axios';
export default {
name:'',
data(){
return {
code: '',
createTime: '',
}
},
created() {
this.loadParams();
},
methods: {
loadParams() {
let params = this.$route.query;
if( params ) {
this.code = params.code;
this.getLongLink();
}
},
getLongLink() {
let reqParams = {
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`;
axios.get(reqUrl, {
params: { ...reqParams },
}).then(res =>{
const data = res.data.data;
if(data.length > 0) {
let longLink = '';
// 把接口中关于随手精灵公众号的链接地址替换成h5的链接地址
if(data[0].long_link.indexOf('ai.ssjlai.com/parentweb') > -1) {
// ai是正式环境
longLink = data[0].long_link.replace('https://ai.ssjlai.com/parentweb/#/dangerAreaDetails', 'https://ai.ssjlai.com/h5-frontendweb/#/alarmDetails');
} else if( data[0].long_link.indexOf('id.ssjlai.com/parentweb') > -1 ) {
// id是测试环境
longLink = data[0].long_link.replace('https://id.ssjlai.com/parentweb/#/dangerAreaDetails', 'https://id.ssjlai.com/h5-frontendweb/#/alarmDetails');
} else {
// 防止链接已经是h5的链接地址
longLink = data[0].long_link;
}
const createTime = data[0].create_time;
const nowTime = new Date().getTime();
const twoHours = 7200;
if(nowTime - createTime > twoHours) {
// 增加过期失效判断,根据接口返回的创建时间与现在时间比较,超过两个小时提示链接过期并且不再跳转
console.log("::已经超过两个小时");
this.$dialog.confirm({
message: '链接已失效',
showCancelButton: false
})
} else {
window.location.href = longLink;
}
} else {
this.$dialog.confirm({
message: '参数错误',
showCancelButton: false
})
}
})
},
}
}
</script>

<style scoped>

</style>

+ 20
- 3
vue.config.js ファイルの表示

@@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2020-04-15 10:00:32
* @LastEditTime: 2023-02-26 09:19:56
* @LastEditTime: 2023-06-07 11:21:38
* @LastEditors: JinxChen
* @Description: In User Settings Edit
* @FilePath: \TelpoH5FrontendWeb\vue.config.js
@@ -14,7 +14,24 @@ const pxtorem = require('postcss-pxtorem'); // 把代码中px转为rem

const CompressionPlugin = require("compression-webpack-plugin");
const port = process.env.port || process.env.npm_config_port || 8080;/* 7788 */ // dev port

const proxy = process.env.NODE_ENV === 'development' ?{
// 调试完毕需要把这个代理注释掉,否则发布到线上会有问题产生
/* '/api/id': {
target: 'https://id.ssjlai.com/watersoutboundapi/',
changeOrigin: true,
pathRewrite: {
'^/api/id': ''
}
},
'/api/ai': {
target: 'https://ai.ssjlai.com/watersoutboundapi/',
changeOrigin: true,
pathRewrite: {
'^/api/ai': ''
}
} */
}
: null;
module.exports = {
// 注意: 多页面配置 不再使用全路径,单页面时可以开启
publicPath: './',
@@ -29,7 +46,7 @@ module.exports = {
warnings: false,
errors: true
},
/* proxy: proxy, */
proxy: proxy,
/* host: '192.168.3.186', */// 原为: hotst: 'localhost', 可在同一ip局域网下通过网址生成二维码的方式调试h5, 注意:调试完毕请注释
//disableHostCheck: true, //真机调试开启
},


読み込み中…
キャンセル
保存