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