@@ -1,7 +1,7 @@ | |||
<!-- | |||
* @Date: 2022-08-17 16:19:13 | |||
* @LastEditors: JinxChen | |||
* @LastEditTime: 2023-08-16 09:39:56 | |||
* @LastEditTime: 2023-08-21 10:29:15 | |||
* @FilePath: \TelpoH5FrontendWeb\README.md | |||
* @description: 项目说明 | |||
--> | |||
@@ -674,4 +674,9 @@ update | |||
- 增加 获取 accessToken 接口 | |||
- 增加 url无 accessToken 参数时重新获取 accessToken | |||
- 调整 问卷与佩戴提醒2个小时顺序 | |||
- 修改 心理健康baseUrl,https://dbmq.rzliot.com/heart => https://dbmq.rzliot.com/auth_heart | |||
- 修改 心理健康baseUrl,https://dbmq.rzliot.com/heart => https://dbmq.rzliot.com/auth_heart | |||
## v1.0.84 | |||
`2023.8.21` | |||
update | |||
- 增加 区分心里健康接口正式环境和测试环境 |
@@ -5,7 +5,7 @@ | |||
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js | |||
* @description: | |||
*/ | |||
export const VERSION_MODEL = '1.0.83F'; //版本号 | |||
export const VERSION_MODEL = '1.0.84F'; //版本号 | |||
export const IMAGE_URL = { | |||
production: 'http://zfb.ssjlai.com/web/', | |||
test: 'http://zfb.ssjlai.com/web/', | |||
@@ -57,4 +57,7 @@ export const EmotionModel = { | |||
title2: '疲劳算法原理', | |||
article2: `<p>设备的疲劳值是生理疲劳和心理疲劳的综合值,主要通过个体日常生活中的心率,心率变异性的变化及运动体力的变化情况来进行科学计算而来。</p>`, | |||
} | |||
}; | |||
}; | |||
//心理健康相关接口地址 | |||
export const PsyBaseUrl = process.env.NODE_ENV === 'production' ? 'https://dbmq.rzliot.com/auth_heart' : 'https://dbmq.rzliot.com/heart'; |
@@ -42,7 +42,8 @@ | |||
<script> | |||
import axios from "axios"; | |||
import { isNotNull} from "@/utils/index"; | |||
import { isNotNull } from "@/utils/index"; | |||
import { PsyBaseUrl } from "@/config/models"; | |||
import APICore from "@/api/core"; | |||
export default { | |||
name: 'psychologicalMain', | |||
@@ -104,7 +105,7 @@ export default { | |||
// 获取首页数据 | |||
getHomeData() { | |||
this.$toast.loading('数据加载中'); | |||
let reqUrl = `https://dbmq.rzliot.com/auth_heart/api/Data/GetHomeData`; | |||
let reqUrl = `${PsyBaseUrl}/api/Data/GetHomeData`; | |||
let reqParams = { | |||
uid: this.uid, | |||
date: this.routeDate || this.$dayjs(new Date()).format('YYYY-MM-DD') | |||
@@ -210,7 +210,7 @@ | |||
</template> | |||
<script> | |||
import { EmotionModel } from "@/config/models"; | |||
import { EmotionModel, PsyBaseUrl } from "@/config/models"; | |||
import axios from "axios"; | |||
export default { | |||
name: "psychological-monitor", | |||
@@ -693,7 +693,7 @@ export default { | |||
let currentDate = new Date(); | |||
// 获取最近30天的心情等级日历数据 | |||
let dateList = this.getPostDate(currentDate, 30, true); | |||
let reqUrl = `https://dbmq.rzliot.com/auth_heart/api/Data/GetCalendarData`; | |||
let reqUrl = `${PsyBaseUrl}/api/Data/GetCalendarData`; | |||
let reqParams = { | |||
uid: this.uid, | |||
startDate: dateList[0], | |||
@@ -753,7 +753,7 @@ export default { | |||
type: this.emoType | |||
}; | |||
console.log("请求参数", reqParams); | |||
let reqUrl = `https://dbmq.rzliot.com/auth_heart/api/Data/GetHisData`; | |||
let reqUrl = `${PsyBaseUrl}/api/Data/GetHisData`; | |||
axios | |||
.get(reqUrl, { | |||
params: { ...reqParams }, | |||
@@ -190,7 +190,7 @@ export default { | |||
this.$router.replace(`/PsychologicalQuestionnaire?uid=${this.uid}`) | |||
}, | |||
api(url, config, token) { | |||
let baseUrl = 'https://dbmq.rzliot.com/auth_heart' | |||
let baseUrl = process.env.NODE_ENV === 'production' ? 'https://dbmq.rzliot.com/auth_heart' : 'https://dbmq.rzliot.com/heart'; | |||
setTimeout(() => { | |||
this.$toast.loading({ | |||
message: '', | |||
@@ -229,7 +229,7 @@ export default { | |||
duration: 1500, | |||
}) | |||
}, 100) | |||
let baseUrl = 'https://dbmq.rzliot.com/auth_heart' | |||
let baseUrl = process.env.NODE_ENV === 'production' ? 'https://dbmq.rzliot.com/auth_heart' : 'https://dbmq.rzliot.com/heart'; | |||
return new Promise((res) => { | |||
axios({ | |||
url: `${baseUrl}${url}`, | |||