style: 布局
This commit is contained in:
parent
d611345b7a
commit
3d55fca864
8
App.vue
8
App.vue
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
export default {
|
||||
onLoad() {
|
||||
uni.onNetworkStatusChange((res) => {
|
||||
console.log('网络类型变化:', res.networkType);
|
||||
console.log('连接网络状态变化:', res.isConnected ? '已连接' : '断开连接');
|
||||
});
|
||||
// uni.onNetworkStatusChange((res) => {
|
||||
// console.log('网络类型变化:', res.networkType);
|
||||
// console.log('连接网络状态变化:', res.isConnected ? '已连接' : '断开连接');
|
||||
// });
|
||||
},
|
||||
onLaunch: async function() {
|
||||
// APP 横屏
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view>
|
||||
<z-paging ref="paging"refresher-only @onRefresh="onRefresh">
|
||||
<view class="flx jcsb ac">
|
||||
<view class="flx jcsb ac" style="margin-bottom: 100rpx">
|
||||
<view class="left">
|
||||
<view class="content-header">
|
||||
<view class="sha-dow"></view>
|
||||
|
|
@ -98,27 +98,7 @@
|
|||
<image src="../../static/icon/xuetang.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-item" @click="toPageCom('bloodOxygen')">
|
||||
<view class="title">
|
||||
{{getNameByKey('bloodOxygen')}}
|
||||
</view>
|
||||
<view class="time">
|
||||
{{dataListsNew.bloodOxygen.data_msg? dataListsNew.bloodOxygen.device_real_time + '更新' : '--'}}
|
||||
</view>
|
||||
<view class="date">
|
||||
<view class="flex_data">
|
||||
<view class="f_left">
|
||||
{{dataListsNew.bloodOxygen.data_msg? (dataListsNew.bloodOxygen.data_msg[0]) : '--'}}
|
||||
</view>
|
||||
<view class="f_right">
|
||||
<text class="icon">%</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg">
|
||||
<image src="../../static/icon/xueyang.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 血压 -->
|
||||
<view class="content-item" @click="toPageCom('bloodPressure')">
|
||||
<view class="title">
|
||||
{{getNameByKey('bloodPressure')}}
|
||||
|
|
@ -141,93 +121,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content-item" @click="toPageCom('bodyTemperature')">
|
||||
<view class="title">
|
||||
{{getNameByKey('bodyTemperature')}}
|
||||
</view>
|
||||
<view class="time">
|
||||
{{dataListsNew.bodyTemperature.data_msg? dataListsNew.bodyTemperature.device_real_time + '更新' : '--'}}
|
||||
</view>
|
||||
<view class="date">
|
||||
<view class="flex_data">
|
||||
<view class="f_left">
|
||||
{{dataListsNew.bodyTemperature.data_msg? (dataListsNew.bodyTemperature.data_msg) : '--'}}
|
||||
</view>
|
||||
<view class="f_right">
|
||||
<text class="icon">℃</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg">
|
||||
<image src="../../static/icon/wendu.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content-item" @click="toPageCom('pulseReat')">
|
||||
<view class="title">
|
||||
{{getNameByKey('pulseReat')}}
|
||||
</view>
|
||||
<view class="time">
|
||||
{{dataListsNew.pulseReat.data_msg? dataListsNew.pulseReat.device_real_time + '更新' : '--'}}
|
||||
</view>
|
||||
<view class="date">
|
||||
<view class="flex_data">
|
||||
<view class="f_left">
|
||||
{{dataListsNew.pulseReat.data_msg? (dataListsNew.pulseReat.data_msg[0]) : '--'}}
|
||||
</view>
|
||||
<view class="f_right">
|
||||
<text class="icon">次/分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg">
|
||||
<image src="../../static/icon/mailv.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-item" @click="toPageCom('ECGData')">
|
||||
<view class="title">
|
||||
心电图
|
||||
</view>
|
||||
<view class="time">
|
||||
{{dataListsNew.ECGData.data_msg? dataListsNew.ECGData.device_real_time + '更新' : '--'}}
|
||||
</view>
|
||||
<view class="date">
|
||||
<view class="flex_data">
|
||||
<view class="f_left">
|
||||
{{dataListsNew.ECGData.data_msg? (dataListsNew.ECGData.data_msg.heartRate || dataListsNew.ECGData.data_msg.meanHeartRate) : '--'}}
|
||||
</view>
|
||||
<view class="f_right">
|
||||
<text class="icon">次/分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg">
|
||||
<image src="../../static/icon/xindiantu.png" style="width: 220rpx;" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content-item" @click="toPageCom('bodyData')">
|
||||
<view class="title">
|
||||
身体成分
|
||||
</view>
|
||||
<view class="time">
|
||||
{{dataListsNew.bodyData.data_msg? dataListsNew.bodyData.device_real_time + '更新' : '--'}}
|
||||
</view>
|
||||
<view class="date">
|
||||
<view class="flex_data">
|
||||
<view class="f_left">
|
||||
{{dataListsNew.bodyData.data_msg? (dataListsNew.bodyData.data_msg.BMI ) : '--'}}
|
||||
</view>
|
||||
<view class="f_right">
|
||||
<text class="icon">BMI</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg">
|
||||
<image src="../../static/icon/rtcf.png" style="width: 220rpx;" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 尿酸 -->
|
||||
<view class="content-item" @click="toPageCom('bloodLiquid')">
|
||||
<view class="title">
|
||||
尿酸
|
||||
|
|
@ -250,6 +144,30 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 心率 -->
|
||||
<view class="content-item" @click="toPageCom('pulseReat')">
|
||||
<view class="title">
|
||||
{{getNameByKey('pulseReat')}}
|
||||
</view>
|
||||
<view class="time">
|
||||
{{dataListsNew.pulseReat.data_msg? dataListsNew.pulseReat.device_real_time + '更新' : '--'}}
|
||||
</view>
|
||||
<view class="date">
|
||||
<view class="flex_data">
|
||||
<view class="f_left">
|
||||
{{dataListsNew.pulseReat.data_msg? (dataListsNew.pulseReat.data_msg[0]) : '--'}}
|
||||
</view>
|
||||
<view class="f_right">
|
||||
<text class="icon">次/分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg">
|
||||
<image src="../../static/icon/mailv.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 血脂 -->
|
||||
<view class="content-item" @click="toPageCom('bloodLiquidAll')">
|
||||
<view class="title">
|
||||
{{getNameByKey('bloodLiquidAll')}}
|
||||
|
|
@ -296,6 +214,104 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 身体成分 -->
|
||||
<view class="content-item">
|
||||
<view @click="toPageCom('bodyData')">
|
||||
<view class="title">
|
||||
身体成分
|
||||
</view>
|
||||
<view class="time">
|
||||
{{dataListsNew.bodyData.data_msg? dataListsNew.bodyData.device_real_time + '更新' : '--'}}
|
||||
</view>
|
||||
<view class="date">
|
||||
<view class="flex_data">
|
||||
<view class="f_left">
|
||||
{{dataListsNew.bodyData.data_msg? (dataListsNew.bodyData.data_msg.BMI ) : '--'}}
|
||||
</view>
|
||||
<view class="f_right">
|
||||
<text class="icon">BMI</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg" style="bottom: 220rpx">
|
||||
<image src="../../static/icon/rtcf.png" style="width: 220rpx;" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view @click="toPageCom('ECGData')">
|
||||
<view class="title">
|
||||
心电图
|
||||
</view>
|
||||
<view class="time">
|
||||
{{dataListsNew.ECGData.data_msg? dataListsNew.ECGData.device_real_time + '更新' : '--'}}
|
||||
</view>
|
||||
<view class="date">
|
||||
<view class="flex_data">
|
||||
<view class="f_left">
|
||||
{{dataListsNew.ECGData.data_msg? (dataListsNew.ECGData.data_msg.heartRate || dataListsNew.ECGData.data_msg.meanHeartRate) : '--'}}
|
||||
</view>
|
||||
<view class="f_right">
|
||||
<text class="icon">次/分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg">
|
||||
<image src="../../static/icon/xindiantu.png" style="width: 220rpx;" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 心电图 -->
|
||||
<!-- <view class="content-item" @click="toPageCom('ECGData')">
|
||||
|
||||
</view> -->
|
||||
|
||||
<!-- 血氧 -->
|
||||
<view class="content-item" @click="toPageCom('bloodOxygen')">
|
||||
<view class="title">
|
||||
{{getNameByKey('bloodOxygen')}}
|
||||
</view>
|
||||
<view class="time">
|
||||
{{dataListsNew.bloodOxygen.data_msg? dataListsNew.bloodOxygen.device_real_time + '更新' : '--'}}
|
||||
</view>
|
||||
<view class="date">
|
||||
<view class="flex_data">
|
||||
<view class="f_left">
|
||||
{{dataListsNew.bloodOxygen.data_msg? (dataListsNew.bloodOxygen.data_msg[0]) : '--'}}
|
||||
</view>
|
||||
<view class="f_right">
|
||||
<text class="icon">%</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg">
|
||||
<image src="../../static/icon/xueyang.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 体温 -->
|
||||
<view class="content-item" @click="toPageCom('bodyTemperature')">
|
||||
<view class="title">
|
||||
{{getNameByKey('bodyTemperature')}}
|
||||
</view>
|
||||
<view class="time">
|
||||
{{dataListsNew.bodyTemperature.data_msg? dataListsNew.bodyTemperature.device_real_time + '更新' : '--'}}
|
||||
</view>
|
||||
<view class="date">
|
||||
<view class="flex_data">
|
||||
<view class="f_left">
|
||||
{{dataListsNew.bodyTemperature.data_msg? (dataListsNew.bodyTemperature.data_msg) : '--'}}
|
||||
</view>
|
||||
<view class="f_right">
|
||||
<text class="icon">℃</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg">
|
||||
<image src="../../static/icon/wendu.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -154,35 +154,26 @@
|
|||
var endTime = 10; // 结束时间(以秒为单位)
|
||||
var timeUpdateListener; // 保存timeupdate事件的监听器
|
||||
|
||||
var onLine = 'false';
|
||||
// var onLine = 'false';
|
||||
|
||||
// 在线离线
|
||||
function checkNetworkStatus() {
|
||||
if (navigator.onLine) {
|
||||
onLine = true;
|
||||
console.log('在线');
|
||||
} else {
|
||||
onLine = false;
|
||||
console.log('离线');
|
||||
}
|
||||
}
|
||||
// // 在线离线
|
||||
// function checkNetworkStatus() {
|
||||
// if (navigator.onLine) {
|
||||
// onLine = true;
|
||||
// console.log('在线');
|
||||
// } else {
|
||||
// onLine = false;
|
||||
// console.log('离线');
|
||||
// }
|
||||
// }
|
||||
|
||||
// 初始检查网络状态
|
||||
checkNetworkStatus();
|
||||
// checkNetworkStatus();
|
||||
|
||||
// 遮罩视频
|
||||
var shadowDom = document.getElementById('shadow');
|
||||
var shadowText = document.getElementById('shadow-text');
|
||||
|
||||
setTimeout(() => {
|
||||
if (onLine) {
|
||||
shadowDom.style.display = 'none';
|
||||
} else {
|
||||
shadowText.innerHTML = '环境异常,请检查网络'
|
||||
}
|
||||
}, 500);
|
||||
|
||||
|
||||
// 指定段落
|
||||
function playVideoSegment(startTime, endTime) {
|
||||
videoElement.currentTime = startTime;
|
||||
|
|
@ -246,6 +237,16 @@
|
|||
var user = userInfo(JSON.parse(getURLParameter('user')));
|
||||
var apitoken = getURLParameter('token');
|
||||
var deviceId = getURLParameter('deviceId');
|
||||
var loading = getURLParameter('loading');
|
||||
|
||||
setTimeout(() => {
|
||||
if (loading) {
|
||||
shadowDom.style.display = 'none';
|
||||
} else {
|
||||
alert('异常')
|
||||
shadowText.innerHTML = '环境异常,请检查网络'
|
||||
}
|
||||
}, 500);
|
||||
|
||||
|
||||
// 获取微软token
|
||||
|
|
@ -343,16 +344,23 @@
|
|||
}
|
||||
|
||||
if (result.dataKey == 'bloodLiquid') {
|
||||
let uricAcidVal = [];
|
||||
let lowDensity = [];
|
||||
let triacylglycerol = [];
|
||||
let highDensity = [];
|
||||
let cholesterol = [];
|
||||
TargetData.map(item => {
|
||||
item.data_msg.cholesterol = (item.data_msg.cholesterol/100).toFixed(2);
|
||||
item.data_msg.highDensity = (item.data_msg.highDensity/100).toFixed(2);
|
||||
item.data_msg.triacylglycerol = (item.data_msg.triacylglycerol/100).toFixed(2);
|
||||
item.data_msg.uricAcidVal = (item.data_msg.uricAcidVal/10000).toFixed(2);
|
||||
item.data_msg.lowDensity = (item.data_msg.lowDensity/100).toFixed(2);
|
||||
item.data_msg.cholesterol = cholesterol.push((item.data_msg.cholesterol/100).toFixed(2));
|
||||
item.data_msg.highDensity = highDensity.push((item.data_msg.highDensity/100).toFixed(2));
|
||||
item.data_msg.triacylglycerol = triacylglycerol.push((item.data_msg.triacylglycerol/100).toFixed(2));
|
||||
item.data_msg.uricAcidVal = uricAcidVal.push((item.data_msg.uricAcidVal/10).toFixed(2));
|
||||
item.data_msg.lowDensity = lowDensity.push((item.data_msg.lowDensity/100).toFixed(2));
|
||||
})
|
||||
|
||||
TargetData = '尿酸: ' + JSON.stringify(uricAcidVal) + ',高密度脂蛋白: ' + JSON.stringify(highDensity) + ',低密度脂蛋白: ' + JSON.stringify(lowDensity) + ',甘油三脂: ' + JSON.stringify(triacylglycerol) + ',总胆固醇: ' + JSON.stringify(cholesterol);
|
||||
}
|
||||
|
||||
Question = `请模仿全科医生的口吻与我: ${user}对话,我最近测量的${result.dataKey}数据为${JSON.stringify(TargetData)}, #提示:data_msg为值,hour_minute为检测时间。#提示:“[]”表示数据为空,请在小程序上传数据。#限制:回复不要带英文,要都转化成汉语。#限制:回复内容控制在150字。#限制:忽略“压力指数、疲劳指数、心肌炎风险、冠心病风险和动脉硬化”等数据。`
|
||||
Question = `请模仿全科医生的口吻与我: ${user}对话,我最近测量的${result.dataKey}数据为${JSON.stringify(TargetData)}, #提示:data_msg为值,hour_minute为检测时间。#提示:“[]”表示数据为空,请在小程序上传数据。#限制:回复不要带英文,要都转化成汉语。#限制:回复内容控制在150字。#限制:忽略“压力指数、疲劳指数、心肌炎风险、冠心病风险和动脉硬化”等数据。提示:回答尿酸时单位转换成“微摩尔/升”`
|
||||
|
||||
console.log(Question, '问题=========================问题');
|
||||
|
||||
|
|
@ -517,6 +525,11 @@
|
|||
// 关闭识别
|
||||
endRec.addEventListener("click", function() {
|
||||
closeShibie();
|
||||
|
||||
// 直接开始
|
||||
setTimeout(() => {
|
||||
startShibie();
|
||||
}, 100);
|
||||
});
|
||||
|
||||
// 暂停识别
|
||||
|
|
|
|||
|
|
@ -102,6 +102,11 @@
|
|||
|
||||
onShow() {
|
||||
this.onRefresh();
|
||||
|
||||
// 监测网络变化
|
||||
uni.onNetworkStatusChange((res) => {
|
||||
console.log('111111')
|
||||
});
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
|
|
@ -119,7 +124,7 @@
|
|||
}, 1000);
|
||||
// #endif
|
||||
|
||||
this.urlLink = `/hybrid/html/ai.html`;
|
||||
this.urlLink = `/hybrid/html/ai.html?loading=false`;
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
|
|
@ -211,7 +216,7 @@
|
|||
this.loading = false;
|
||||
}, 1000);
|
||||
|
||||
this.urlLink = `/hybrid/html/ai.html?data=${JSON.stringify(this.dataListsNew)}&user=${JSON.stringify(this.getUserInfo)}&token=${store.getters['api/getApiToken']}&deviceId=${this.getActiceDevice.device_id}`;
|
||||
this.urlLink = `/hybrid/html/ai.html?data=${JSON.stringify(this.dataListsNew)}&user=${JSON.stringify(this.getUserInfo)}&token=${store.getters['api/getApiToken']}&deviceId=${this.getActiceDevice.device_id}&loading=${this.loading}`;
|
||||
}
|
||||
);
|
||||
},
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -154,35 +154,26 @@
|
|||
var endTime = 10; // 结束时间(以秒为单位)
|
||||
var timeUpdateListener; // 保存timeupdate事件的监听器
|
||||
|
||||
var onLine = 'false';
|
||||
// var onLine = 'false';
|
||||
|
||||
// 在线离线
|
||||
function checkNetworkStatus() {
|
||||
if (navigator.onLine) {
|
||||
onLine = true;
|
||||
console.log('在线');
|
||||
} else {
|
||||
onLine = false;
|
||||
console.log('离线');
|
||||
}
|
||||
}
|
||||
// // 在线离线
|
||||
// function checkNetworkStatus() {
|
||||
// if (navigator.onLine) {
|
||||
// onLine = true;
|
||||
// console.log('在线');
|
||||
// } else {
|
||||
// onLine = false;
|
||||
// console.log('离线');
|
||||
// }
|
||||
// }
|
||||
|
||||
// 初始检查网络状态
|
||||
checkNetworkStatus();
|
||||
// checkNetworkStatus();
|
||||
|
||||
// 遮罩视频
|
||||
var shadowDom = document.getElementById('shadow');
|
||||
var shadowText = document.getElementById('shadow-text');
|
||||
|
||||
setTimeout(() => {
|
||||
if (onLine) {
|
||||
shadowDom.style.display = 'none';
|
||||
} else {
|
||||
shadowText.innerHTML = '环境异常,请检查网络'
|
||||
}
|
||||
}, 500);
|
||||
|
||||
|
||||
// 指定段落
|
||||
function playVideoSegment(startTime, endTime) {
|
||||
videoElement.currentTime = startTime;
|
||||
|
|
@ -246,6 +237,16 @@
|
|||
var user = userInfo(JSON.parse(getURLParameter('user')));
|
||||
var apitoken = getURLParameter('token');
|
||||
var deviceId = getURLParameter('deviceId');
|
||||
var loading = getURLParameter('loading');
|
||||
|
||||
setTimeout(() => {
|
||||
if (loading) {
|
||||
shadowDom.style.display = 'none';
|
||||
} else {
|
||||
alert('异常')
|
||||
shadowText.innerHTML = '环境异常,请检查网络'
|
||||
}
|
||||
}, 500);
|
||||
|
||||
|
||||
// 获取微软token
|
||||
|
|
@ -343,16 +344,23 @@
|
|||
}
|
||||
|
||||
if (result.dataKey == 'bloodLiquid') {
|
||||
let uricAcidVal = [];
|
||||
let lowDensity = [];
|
||||
let triacylglycerol = [];
|
||||
let highDensity = [];
|
||||
let cholesterol = [];
|
||||
TargetData.map(item => {
|
||||
item.data_msg.cholesterol = (item.data_msg.cholesterol/100).toFixed(2);
|
||||
item.data_msg.highDensity = (item.data_msg.highDensity/100).toFixed(2);
|
||||
item.data_msg.triacylglycerol = (item.data_msg.triacylglycerol/100).toFixed(2);
|
||||
item.data_msg.uricAcidVal = (item.data_msg.uricAcidVal/10000).toFixed(2);
|
||||
item.data_msg.lowDensity = (item.data_msg.lowDensity/100).toFixed(2);
|
||||
item.data_msg.cholesterol = cholesterol.push((item.data_msg.cholesterol/100).toFixed(2));
|
||||
item.data_msg.highDensity = highDensity.push((item.data_msg.highDensity/100).toFixed(2));
|
||||
item.data_msg.triacylglycerol = triacylglycerol.push((item.data_msg.triacylglycerol/100).toFixed(2));
|
||||
item.data_msg.uricAcidVal = uricAcidVal.push((item.data_msg.uricAcidVal/10).toFixed(2));
|
||||
item.data_msg.lowDensity = lowDensity.push((item.data_msg.lowDensity/100).toFixed(2));
|
||||
})
|
||||
|
||||
TargetData = '尿酸: ' + JSON.stringify(uricAcidVal) + ',高密度脂蛋白: ' + JSON.stringify(highDensity) + ',低密度脂蛋白: ' + JSON.stringify(lowDensity) + ',甘油三脂: ' + JSON.stringify(triacylglycerol) + ',总胆固醇: ' + JSON.stringify(cholesterol);
|
||||
}
|
||||
|
||||
Question = `请模仿全科医生的口吻与我: ${user}对话,我最近测量的${result.dataKey}数据为${JSON.stringify(TargetData)}, #提示:data_msg为值,hour_minute为检测时间。#提示:“[]”表示数据为空,请在小程序上传数据。#限制:回复不要带英文,要都转化成汉语。#限制:回复内容控制在150字。#限制:忽略“压力指数、疲劳指数、心肌炎风险、冠心病风险和动脉硬化”等数据。`
|
||||
Question = `请模仿全科医生的口吻与我: ${user}对话,我最近测量的${result.dataKey}数据为${JSON.stringify(TargetData)}, #提示:data_msg为值,hour_minute为检测时间。#提示:“[]”表示数据为空,请在小程序上传数据。#限制:回复不要带英文,要都转化成汉语。#限制:回复内容控制在150字。#限制:忽略“压力指数、疲劳指数、心肌炎风险、冠心病风险和动脉硬化”等数据。提示:回答尿酸时单位转换成“微摩尔/升”`
|
||||
|
||||
console.log(Question, '问题=========================问题');
|
||||
|
||||
|
|
@ -517,6 +525,11 @@
|
|||
// 关闭识别
|
||||
endRec.addEventListener("click", function() {
|
||||
closeShibie();
|
||||
|
||||
// 直接开始
|
||||
setTimeout(() => {
|
||||
startShibie();
|
||||
}, 100);
|
||||
});
|
||||
|
||||
// 暂停识别
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -154,35 +154,26 @@
|
|||
var endTime = 10; // 结束时间(以秒为单位)
|
||||
var timeUpdateListener; // 保存timeupdate事件的监听器
|
||||
|
||||
var onLine = 'false';
|
||||
// var onLine = 'false';
|
||||
|
||||
// 在线离线
|
||||
function checkNetworkStatus() {
|
||||
if (navigator.onLine) {
|
||||
onLine = true;
|
||||
console.log('在线');
|
||||
} else {
|
||||
onLine = false;
|
||||
console.log('离线');
|
||||
}
|
||||
}
|
||||
// // 在线离线
|
||||
// function checkNetworkStatus() {
|
||||
// if (navigator.onLine) {
|
||||
// onLine = true;
|
||||
// console.log('在线');
|
||||
// } else {
|
||||
// onLine = false;
|
||||
// console.log('离线');
|
||||
// }
|
||||
// }
|
||||
|
||||
// 初始检查网络状态
|
||||
checkNetworkStatus();
|
||||
// checkNetworkStatus();
|
||||
|
||||
// 遮罩视频
|
||||
var shadowDom = document.getElementById('shadow');
|
||||
var shadowText = document.getElementById('shadow-text');
|
||||
|
||||
setTimeout(() => {
|
||||
if (onLine) {
|
||||
shadowDom.style.display = 'none';
|
||||
} else {
|
||||
shadowText.innerHTML = '环境异常,请检查网络'
|
||||
}
|
||||
}, 500);
|
||||
|
||||
|
||||
// 指定段落
|
||||
function playVideoSegment(startTime, endTime) {
|
||||
videoElement.currentTime = startTime;
|
||||
|
|
@ -246,6 +237,16 @@
|
|||
var user = userInfo(JSON.parse(getURLParameter('user')));
|
||||
var apitoken = getURLParameter('token');
|
||||
var deviceId = getURLParameter('deviceId');
|
||||
var loading = getURLParameter('loading');
|
||||
|
||||
setTimeout(() => {
|
||||
if (loading) {
|
||||
shadowDom.style.display = 'none';
|
||||
} else {
|
||||
alert('异常')
|
||||
shadowText.innerHTML = '环境异常,请检查网络'
|
||||
}
|
||||
}, 500);
|
||||
|
||||
|
||||
// 获取微软token
|
||||
|
|
@ -343,16 +344,23 @@
|
|||
}
|
||||
|
||||
if (result.dataKey == 'bloodLiquid') {
|
||||
let uricAcidVal = [];
|
||||
let lowDensity = [];
|
||||
let triacylglycerol = [];
|
||||
let highDensity = [];
|
||||
let cholesterol = [];
|
||||
TargetData.map(item => {
|
||||
item.data_msg.cholesterol = (item.data_msg.cholesterol/100).toFixed(2);
|
||||
item.data_msg.highDensity = (item.data_msg.highDensity/100).toFixed(2);
|
||||
item.data_msg.triacylglycerol = (item.data_msg.triacylglycerol/100).toFixed(2);
|
||||
item.data_msg.uricAcidVal = (item.data_msg.uricAcidVal/10000).toFixed(2);
|
||||
item.data_msg.lowDensity = (item.data_msg.lowDensity/100).toFixed(2);
|
||||
item.data_msg.cholesterol = cholesterol.push((item.data_msg.cholesterol/100).toFixed(2));
|
||||
item.data_msg.highDensity = highDensity.push((item.data_msg.highDensity/100).toFixed(2));
|
||||
item.data_msg.triacylglycerol = triacylglycerol.push((item.data_msg.triacylglycerol/100).toFixed(2));
|
||||
item.data_msg.uricAcidVal = uricAcidVal.push((item.data_msg.uricAcidVal/10).toFixed(2));
|
||||
item.data_msg.lowDensity = lowDensity.push((item.data_msg.lowDensity/100).toFixed(2));
|
||||
})
|
||||
|
||||
TargetData = '尿酸: ' + JSON.stringify(uricAcidVal) + ',高密度脂蛋白: ' + JSON.stringify(highDensity) + ',低密度脂蛋白: ' + JSON.stringify(lowDensity) + ',甘油三脂: ' + JSON.stringify(triacylglycerol) + ',总胆固醇: ' + JSON.stringify(cholesterol);
|
||||
}
|
||||
|
||||
Question = `请模仿全科医生的口吻与我: ${user}对话,我最近测量的${result.dataKey}数据为${JSON.stringify(TargetData)}, #提示:data_msg为值,hour_minute为检测时间。#提示:“[]”表示数据为空,请在小程序上传数据。#限制:回复不要带英文,要都转化成汉语。#限制:回复内容控制在150字。#限制:忽略“压力指数、疲劳指数、心肌炎风险、冠心病风险和动脉硬化”等数据。`
|
||||
Question = `请模仿全科医生的口吻与我: ${user}对话,我最近测量的${result.dataKey}数据为${JSON.stringify(TargetData)}, #提示:data_msg为值,hour_minute为检测时间。#提示:“[]”表示数据为空,请在小程序上传数据。#限制:回复不要带英文,要都转化成汉语。#限制:回复内容控制在150字。#限制:忽略“压力指数、疲劳指数、心肌炎风险、冠心病风险和动脉硬化”等数据。提示:回答尿酸时单位转换成“微摩尔/升”`
|
||||
|
||||
console.log(Question, '问题=========================问题');
|
||||
|
||||
|
|
@ -517,6 +525,11 @@
|
|||
// 关闭识别
|
||||
endRec.addEventListener("click", function() {
|
||||
closeShibie();
|
||||
|
||||
// 直接开始
|
||||
setTimeout(() => {
|
||||
startShibie();
|
||||
}, 100);
|
||||
});
|
||||
|
||||
// 暂停识别
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1944,6 +1944,7 @@ var render = function () {
|
|||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(3, "sc"),
|
||||
style: _vm._$g(3, "s"),
|
||||
attrs: { _i: 3 },
|
||||
on: {
|
||||
click: function ($event) {
|
||||
|
|
@ -3317,7 +3318,11 @@ var render = function () {
|
|||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{ staticClass: _vm._$g(2, "sc"), attrs: { _i: 2 } },
|
||||
{
|
||||
staticClass: _vm._$g(2, "sc"),
|
||||
staticStyle: { "margin-bottom": "100rpx" },
|
||||
attrs: { _i: 2 },
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
|
|
@ -3862,7 +3867,7 @@ var render = function () {
|
|||
staticClass: _vm._$g(62, "sc"),
|
||||
attrs: { _i: 62 },
|
||||
},
|
||||
[_vm._v("%")]
|
||||
[_vm._v("mmHG")]
|
||||
),
|
||||
],
|
||||
1
|
||||
|
|
@ -3911,7 +3916,7 @@ var render = function () {
|
|||
staticClass: _vm._$g(66, "sc"),
|
||||
attrs: { _i: 66 },
|
||||
},
|
||||
[_vm._v(_vm._$g(66, "t0-0"))]
|
||||
[_vm._v("尿酸")]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
|
|
@ -3956,7 +3961,7 @@ var render = function () {
|
|||
staticClass: _vm._$g(72, "sc"),
|
||||
attrs: { _i: 72 },
|
||||
},
|
||||
[_vm._v("mmHG")]
|
||||
[_vm._v("微摩尔/升")]
|
||||
),
|
||||
],
|
||||
1
|
||||
|
|
@ -3975,6 +3980,7 @@ var render = function () {
|
|||
},
|
||||
[
|
||||
_c("v-uni-image", {
|
||||
staticStyle: { width: "220rpx" },
|
||||
attrs: {
|
||||
src: _vm._$g(74, "a-src"),
|
||||
mode: "widthFix",
|
||||
|
|
@ -4050,7 +4056,7 @@ var render = function () {
|
|||
staticClass: _vm._$g(82, "sc"),
|
||||
attrs: { _i: 82 },
|
||||
},
|
||||
[_vm._v("℃")]
|
||||
[_vm._v("次/分")]
|
||||
),
|
||||
],
|
||||
1
|
||||
|
|
@ -4129,7 +4135,7 @@ var render = function () {
|
|||
staticClass: _vm._$g(90, "sc"),
|
||||
attrs: { _i: 90 },
|
||||
},
|
||||
[_vm._v(_vm._$g(90, "t0-0"))]
|
||||
[_vm._v("总胆固醇")]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
|
|
@ -4138,13 +4144,14 @@ var render = function () {
|
|||
attrs: { _i: 91 },
|
||||
},
|
||||
[
|
||||
_vm._v(_vm._$g(91, "t0-0")),
|
||||
_c(
|
||||
"v-uni-text",
|
||||
{
|
||||
staticClass: _vm._$g(92, "sc"),
|
||||
attrs: { _i: 92 },
|
||||
},
|
||||
[_vm._v("次/分")]
|
||||
[_vm._v("毫摩尔/升")]
|
||||
),
|
||||
],
|
||||
1
|
||||
|
|
@ -4152,93 +4159,110 @@ var render = function () {
|
|||
],
|
||||
1
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(93, "sc"),
|
||||
attrs: { _i: 93 },
|
||||
},
|
||||
[
|
||||
_c("v-uni-image", {
|
||||
attrs: {
|
||||
src: _vm._$g(94, "a-src"),
|
||||
mode: "widthFix",
|
||||
_i: 94,
|
||||
},
|
||||
}),
|
||||
],
|
||||
1
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(95, "sc"),
|
||||
attrs: { _i: 95 },
|
||||
on: {
|
||||
click: function ($event) {
|
||||
return _vm.$handleViewEvent($event)
|
||||
},
|
||||
},
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(96, "sc"),
|
||||
attrs: { _i: 96 },
|
||||
},
|
||||
[_vm._v("心电图")]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(97, "sc"),
|
||||
attrs: { _i: 97 },
|
||||
},
|
||||
[_vm._v(_vm._$g(97, "t0-0"))]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(98, "sc"),
|
||||
attrs: { _i: 98 },
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(99, "sc"),
|
||||
attrs: { _i: 99 },
|
||||
staticClass: _vm._$g(93, "sc"),
|
||||
attrs: { _i: 93 },
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(100, "sc"),
|
||||
attrs: { _i: 100 },
|
||||
staticClass: _vm._$g(94, "sc"),
|
||||
attrs: { _i: 94 },
|
||||
},
|
||||
[_vm._v(_vm._$g(100, "t0-0"))]
|
||||
[_vm._v("甘油三脂")]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(101, "sc"),
|
||||
attrs: { _i: 101 },
|
||||
staticClass: _vm._$g(95, "sc"),
|
||||
attrs: { _i: 95 },
|
||||
},
|
||||
[
|
||||
_vm._v(_vm._$g(95, "t0-0")),
|
||||
_c(
|
||||
"v-uni-text",
|
||||
{
|
||||
staticClass: _vm._$g(102, "sc"),
|
||||
attrs: { _i: 102 },
|
||||
staticClass: _vm._$g(96, "sc"),
|
||||
attrs: { _i: 96 },
|
||||
},
|
||||
[_vm._v("次/分")]
|
||||
[_vm._v("毫摩尔/升")]
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(97, "sc"),
|
||||
attrs: { _i: 97 },
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(98, "sc"),
|
||||
attrs: { _i: 98 },
|
||||
},
|
||||
[_vm._v("高密度脂蛋白")]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(99, "sc"),
|
||||
attrs: { _i: 99 },
|
||||
},
|
||||
[
|
||||
_vm._v(_vm._$g(99, "t0-0")),
|
||||
_c(
|
||||
"v-uni-text",
|
||||
{
|
||||
staticClass: _vm._$g(100, "sc"),
|
||||
attrs: { _i: 100 },
|
||||
},
|
||||
[_vm._v("毫摩尔/升")]
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(101, "sc"),
|
||||
attrs: { _i: 101 },
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(102, "sc"),
|
||||
attrs: { _i: 102 },
|
||||
},
|
||||
[_vm._v("低密度脂蛋白")]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(103, "sc"),
|
||||
attrs: { _i: 103 },
|
||||
},
|
||||
[
|
||||
_vm._v(_vm._$g(103, "t0-0")),
|
||||
_c(
|
||||
"v-uni-text",
|
||||
{
|
||||
staticClass: _vm._$g(104, "sc"),
|
||||
attrs: { _i: 104 },
|
||||
},
|
||||
[_vm._v("毫摩尔/升")]
|
||||
),
|
||||
],
|
||||
1
|
||||
|
|
@ -4249,62 +4273,40 @@ var render = function () {
|
|||
],
|
||||
1
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(103, "sc"),
|
||||
attrs: { _i: 103 },
|
||||
},
|
||||
[
|
||||
_c("v-uni-image", {
|
||||
staticStyle: { width: "220rpx" },
|
||||
attrs: {
|
||||
src: _vm._$g(104, "a-src"),
|
||||
mode: "widthFix",
|
||||
_i: 104,
|
||||
},
|
||||
}),
|
||||
],
|
||||
1
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(105, "sc"),
|
||||
attrs: { _i: 105 },
|
||||
on: {
|
||||
click: function ($event) {
|
||||
return _vm.$handleViewEvent($event)
|
||||
},
|
||||
},
|
||||
},
|
||||
{ staticClass: _vm._$g(105, "sc"), attrs: { _i: 105 } },
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(106, "sc"),
|
||||
attrs: { _i: 106 },
|
||||
},
|
||||
[_vm._v("身体成分")]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(107, "sc"),
|
||||
attrs: { _i: 107 },
|
||||
},
|
||||
[_vm._v(_vm._$g(107, "t0-0"))]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(108, "sc"),
|
||||
attrs: { _i: 108 },
|
||||
on: {
|
||||
click: function ($event) {
|
||||
return _vm.$handleViewEvent($event)
|
||||
},
|
||||
},
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(107, "sc"),
|
||||
attrs: { _i: 107 },
|
||||
},
|
||||
[_vm._v("身体成分")]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(108, "sc"),
|
||||
attrs: { _i: 108 },
|
||||
},
|
||||
[_vm._v(_vm._$g(108, "t0-0"))]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
|
|
@ -4318,22 +4320,32 @@ var render = function () {
|
|||
staticClass: _vm._$g(110, "sc"),
|
||||
attrs: { _i: 110 },
|
||||
},
|
||||
[_vm._v(_vm._$g(110, "t0-0"))]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(111, "sc"),
|
||||
attrs: { _i: 111 },
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"v-uni-text",
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(111, "sc"),
|
||||
attrs: { _i: 111 },
|
||||
},
|
||||
[_vm._v(_vm._$g(111, "t0-0"))]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(112, "sc"),
|
||||
attrs: { _i: 112 },
|
||||
},
|
||||
[_vm._v("BMI")]
|
||||
[
|
||||
_c(
|
||||
"v-uni-text",
|
||||
{
|
||||
staticClass: _vm._$g(113, "sc"),
|
||||
attrs: { _i: 113 },
|
||||
},
|
||||
[_vm._v("BMI")]
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
],
|
||||
1
|
||||
|
|
@ -4341,65 +4353,55 @@ var render = function () {
|
|||
],
|
||||
1
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(114, "sc"),
|
||||
staticStyle: { bottom: "220rpx" },
|
||||
attrs: { _i: 114 },
|
||||
},
|
||||
[
|
||||
_c("v-uni-image", {
|
||||
staticStyle: { width: "220rpx" },
|
||||
attrs: {
|
||||
src: _vm._$g(115, "a-src"),
|
||||
mode: "widthFix",
|
||||
_i: 115,
|
||||
},
|
||||
}),
|
||||
],
|
||||
1
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(113, "sc"),
|
||||
attrs: { _i: 113 },
|
||||
},
|
||||
[
|
||||
_c("v-uni-image", {
|
||||
staticStyle: { width: "220rpx" },
|
||||
attrs: {
|
||||
src: _vm._$g(114, "a-src"),
|
||||
mode: "widthFix",
|
||||
_i: 114,
|
||||
},
|
||||
}),
|
||||
],
|
||||
1
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(115, "sc"),
|
||||
attrs: { _i: 115 },
|
||||
on: {
|
||||
click: function ($event) {
|
||||
return _vm.$handleViewEvent($event)
|
||||
},
|
||||
},
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(116, "sc"),
|
||||
attrs: { _i: 116 },
|
||||
},
|
||||
[_vm._v("尿酸")]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(117, "sc"),
|
||||
attrs: { _i: 117 },
|
||||
},
|
||||
[_vm._v(_vm._$g(117, "t0-0"))]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(118, "sc"),
|
||||
attrs: { _i: 118 },
|
||||
on: {
|
||||
click: function ($event) {
|
||||
return _vm.$handleViewEvent($event)
|
||||
},
|
||||
},
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(117, "sc"),
|
||||
attrs: { _i: 117 },
|
||||
},
|
||||
[_vm._v("心电图")]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(118, "sc"),
|
||||
attrs: { _i: 118 },
|
||||
},
|
||||
[_vm._v(_vm._$g(118, "t0-0"))]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
|
|
@ -4413,22 +4415,32 @@ var render = function () {
|
|||
staticClass: _vm._$g(120, "sc"),
|
||||
attrs: { _i: 120 },
|
||||
},
|
||||
[_vm._v(_vm._$g(120, "t0-0"))]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(121, "sc"),
|
||||
attrs: { _i: 121 },
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"v-uni-text",
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(121, "sc"),
|
||||
attrs: { _i: 121 },
|
||||
},
|
||||
[_vm._v(_vm._$g(121, "t0-0"))]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(122, "sc"),
|
||||
attrs: { _i: 122 },
|
||||
},
|
||||
[_vm._v("微摩尔/升")]
|
||||
[
|
||||
_c(
|
||||
"v-uni-text",
|
||||
{
|
||||
staticClass: _vm._$g(123, "sc"),
|
||||
attrs: { _i: 123 },
|
||||
},
|
||||
[_vm._v("次/分")]
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
],
|
||||
1
|
||||
|
|
@ -4436,24 +4448,24 @@ var render = function () {
|
|||
],
|
||||
1
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(123, "sc"),
|
||||
attrs: { _i: 123 },
|
||||
},
|
||||
[
|
||||
_c("v-uni-image", {
|
||||
staticStyle: { width: "220rpx" },
|
||||
attrs: {
|
||||
src: _vm._$g(124, "a-src"),
|
||||
mode: "widthFix",
|
||||
_i: 124,
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(124, "sc"),
|
||||
attrs: { _i: 124 },
|
||||
},
|
||||
}),
|
||||
[
|
||||
_c("v-uni-image", {
|
||||
staticStyle: { width: "220rpx" },
|
||||
attrs: {
|
||||
src: _vm._$g(125, "a-src"),
|
||||
mode: "widthFix",
|
||||
_i: 125,
|
||||
},
|
||||
}),
|
||||
],
|
||||
1
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
|
|
@ -4463,8 +4475,8 @@ var render = function () {
|
|||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(125, "sc"),
|
||||
attrs: { _i: 125 },
|
||||
staticClass: _vm._$g(126, "sc"),
|
||||
attrs: { _i: 126 },
|
||||
on: {
|
||||
click: function ($event) {
|
||||
return _vm.$handleViewEvent($event)
|
||||
|
|
@ -4472,14 +4484,6 @@ var render = function () {
|
|||
},
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(126, "sc"),
|
||||
attrs: { _i: 126 },
|
||||
},
|
||||
[_vm._v(_vm._$g(126, "t0-0"))]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
|
|
@ -4494,37 +4498,44 @@ var render = function () {
|
|||
staticClass: _vm._$g(128, "sc"),
|
||||
attrs: { _i: 128 },
|
||||
},
|
||||
[_vm._v(_vm._$g(128, "t0-0"))]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(129, "sc"),
|
||||
attrs: { _i: 129 },
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(129, "sc"),
|
||||
attrs: { _i: 129 },
|
||||
staticClass: _vm._$g(130, "sc"),
|
||||
attrs: { _i: 130 },
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(130, "sc"),
|
||||
attrs: { _i: 130 },
|
||||
},
|
||||
[_vm._v("总胆固醇")]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(131, "sc"),
|
||||
attrs: { _i: 131 },
|
||||
},
|
||||
[_vm._v(_vm._$g(131, "t0-0"))]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(132, "sc"),
|
||||
attrs: { _i: 132 },
|
||||
},
|
||||
[
|
||||
_vm._v(_vm._$g(131, "t0-0")),
|
||||
_c(
|
||||
"v-uni-text",
|
||||
{
|
||||
staticClass: _vm._$g(132, "sc"),
|
||||
attrs: { _i: 132 },
|
||||
staticClass: _vm._$g(133, "sc"),
|
||||
attrs: { _i: 133 },
|
||||
},
|
||||
[_vm._v("毫摩尔/升")]
|
||||
[_vm._v("%")]
|
||||
),
|
||||
],
|
||||
1
|
||||
|
|
@ -4532,110 +4543,93 @@ var render = function () {
|
|||
],
|
||||
1
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(134, "sc"),
|
||||
attrs: { _i: 134 },
|
||||
},
|
||||
[
|
||||
_c("v-uni-image", {
|
||||
attrs: {
|
||||
src: _vm._$g(135, "a-src"),
|
||||
mode: "widthFix",
|
||||
_i: 135,
|
||||
},
|
||||
}),
|
||||
],
|
||||
1
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(136, "sc"),
|
||||
attrs: { _i: 136 },
|
||||
on: {
|
||||
click: function ($event) {
|
||||
return _vm.$handleViewEvent($event)
|
||||
},
|
||||
},
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(137, "sc"),
|
||||
attrs: { _i: 137 },
|
||||
},
|
||||
[_vm._v(_vm._$g(137, "t0-0"))]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(138, "sc"),
|
||||
attrs: { _i: 138 },
|
||||
},
|
||||
[_vm._v(_vm._$g(138, "t0-0"))]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(139, "sc"),
|
||||
attrs: { _i: 139 },
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(133, "sc"),
|
||||
attrs: { _i: 133 },
|
||||
staticClass: _vm._$g(140, "sc"),
|
||||
attrs: { _i: 140 },
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(134, "sc"),
|
||||
attrs: { _i: 134 },
|
||||
staticClass: _vm._$g(141, "sc"),
|
||||
attrs: { _i: 141 },
|
||||
},
|
||||
[_vm._v("甘油三脂")]
|
||||
[_vm._v(_vm._$g(141, "t0-0"))]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(135, "sc"),
|
||||
attrs: { _i: 135 },
|
||||
},
|
||||
[
|
||||
_vm._v(_vm._$g(135, "t0-0")),
|
||||
_c(
|
||||
"v-uni-text",
|
||||
{
|
||||
staticClass: _vm._$g(136, "sc"),
|
||||
attrs: { _i: 136 },
|
||||
},
|
||||
[_vm._v("毫摩尔/升")]
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(137, "sc"),
|
||||
attrs: { _i: 137 },
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(138, "sc"),
|
||||
attrs: { _i: 138 },
|
||||
},
|
||||
[_vm._v("高密度脂蛋白")]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(139, "sc"),
|
||||
attrs: { _i: 139 },
|
||||
},
|
||||
[
|
||||
_vm._v(_vm._$g(139, "t0-0")),
|
||||
_c(
|
||||
"v-uni-text",
|
||||
{
|
||||
staticClass: _vm._$g(140, "sc"),
|
||||
attrs: { _i: 140 },
|
||||
},
|
||||
[_vm._v("毫摩尔/升")]
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(141, "sc"),
|
||||
attrs: { _i: 141 },
|
||||
},
|
||||
[
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(142, "sc"),
|
||||
attrs: { _i: 142 },
|
||||
},
|
||||
[_vm._v("低密度脂蛋白")]
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(143, "sc"),
|
||||
attrs: { _i: 143 },
|
||||
},
|
||||
[
|
||||
_vm._v(_vm._$g(143, "t0-0")),
|
||||
_c(
|
||||
"v-uni-text",
|
||||
{
|
||||
staticClass: _vm._$g(144, "sc"),
|
||||
attrs: { _i: 144 },
|
||||
staticClass: _vm._$g(143, "sc"),
|
||||
attrs: { _i: 143 },
|
||||
},
|
||||
[_vm._v("毫摩尔/升")]
|
||||
[_vm._v("℃")]
|
||||
),
|
||||
],
|
||||
1
|
||||
|
|
@ -4646,6 +4640,23 @@ var render = function () {
|
|||
],
|
||||
1
|
||||
),
|
||||
_c(
|
||||
"uni-view",
|
||||
{
|
||||
staticClass: _vm._$g(144, "sc"),
|
||||
attrs: { _i: 144 },
|
||||
},
|
||||
[
|
||||
_c("v-uni-image", {
|
||||
attrs: {
|
||||
src: _vm._$g(145, "a-src"),
|
||||
mode: "widthFix",
|
||||
_i: 145,
|
||||
},
|
||||
}),
|
||||
],
|
||||
1
|
||||
),
|
||||
],
|
||||
1
|
||||
),
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
<div id="shadow-text">模型正在启动……</div>
|
||||
</div>
|
||||
<video id="myVideo" muted loop autoplay playsinline>
|
||||
<source src="https://img.agrimedia.cn/bmsc/%E9%A3%9E%E4%B9%A620240918-175041.mp4" type="video/mp4">
|
||||
<source src="./demo/ple.mp4" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
<audio
|
||||
|
|
@ -154,35 +154,26 @@
|
|||
var endTime = 10; // 结束时间(以秒为单位)
|
||||
var timeUpdateListener; // 保存timeupdate事件的监听器
|
||||
|
||||
var onLine = 'false';
|
||||
// var onLine = 'false';
|
||||
|
||||
// 在线离线
|
||||
function checkNetworkStatus() {
|
||||
if (navigator.onLine) {
|
||||
onLine = true;
|
||||
console.log('在线');
|
||||
} else {
|
||||
onLine = false;
|
||||
console.log('离线');
|
||||
}
|
||||
}
|
||||
// // 在线离线
|
||||
// function checkNetworkStatus() {
|
||||
// if (navigator.onLine) {
|
||||
// onLine = true;
|
||||
// console.log('在线');
|
||||
// } else {
|
||||
// onLine = false;
|
||||
// console.log('离线');
|
||||
// }
|
||||
// }
|
||||
|
||||
// 初始检查网络状态
|
||||
checkNetworkStatus();
|
||||
// checkNetworkStatus();
|
||||
|
||||
// 遮罩视频
|
||||
var shadowDom = document.getElementById('shadow');
|
||||
var shadowText = document.getElementById('shadow-text');
|
||||
|
||||
setTimeout(() => {
|
||||
if (onLine) {
|
||||
shadowDom.style.display = 'none';
|
||||
} else {
|
||||
shadowText.innerHTML = '环境异常,请检查网络'
|
||||
}
|
||||
}, 500);
|
||||
|
||||
|
||||
// 指定段落
|
||||
function playVideoSegment(startTime, endTime) {
|
||||
videoElement.currentTime = startTime;
|
||||
|
|
@ -246,6 +237,16 @@
|
|||
var user = userInfo(JSON.parse(getURLParameter('user')));
|
||||
var apitoken = getURLParameter('token');
|
||||
var deviceId = getURLParameter('deviceId');
|
||||
var loading = getURLParameter('loading');
|
||||
|
||||
setTimeout(() => {
|
||||
if (loading) {
|
||||
shadowDom.style.display = 'none';
|
||||
} else {
|
||||
alert('异常')
|
||||
shadowText.innerHTML = '环境异常,请检查网络'
|
||||
}
|
||||
}, 500);
|
||||
|
||||
|
||||
// 获取微软token
|
||||
|
|
@ -343,16 +344,23 @@
|
|||
}
|
||||
|
||||
if (result.dataKey == 'bloodLiquid') {
|
||||
let uricAcidVal = [];
|
||||
let lowDensity = [];
|
||||
let triacylglycerol = [];
|
||||
let highDensity = [];
|
||||
let cholesterol = [];
|
||||
TargetData.map(item => {
|
||||
item.data_msg.cholesterol = (item.data_msg.cholesterol/100).toFixed(2);
|
||||
item.data_msg.highDensity = (item.data_msg.highDensity/100).toFixed(2);
|
||||
item.data_msg.triacylglycerol = (item.data_msg.triacylglycerol/100).toFixed(2);
|
||||
item.data_msg.uricAcidVal = (item.data_msg.uricAcidVal/10000).toFixed(2);
|
||||
item.data_msg.lowDensity = (item.data_msg.lowDensity/100).toFixed(2);
|
||||
item.data_msg.cholesterol = cholesterol.push((item.data_msg.cholesterol/100).toFixed(2));
|
||||
item.data_msg.highDensity = highDensity.push((item.data_msg.highDensity/100).toFixed(2));
|
||||
item.data_msg.triacylglycerol = triacylglycerol.push((item.data_msg.triacylglycerol/100).toFixed(2));
|
||||
item.data_msg.uricAcidVal = uricAcidVal.push((item.data_msg.uricAcidVal/10).toFixed(2));
|
||||
item.data_msg.lowDensity = lowDensity.push((item.data_msg.lowDensity/100).toFixed(2));
|
||||
})
|
||||
|
||||
TargetData = '尿酸: ' + JSON.stringify(uricAcidVal) + ',高密度脂蛋白: ' + JSON.stringify(highDensity) + ',低密度脂蛋白: ' + JSON.stringify(lowDensity) + ',甘油三脂: ' + JSON.stringify(triacylglycerol) + ',总胆固醇: ' + JSON.stringify(cholesterol);
|
||||
}
|
||||
|
||||
Question = `请模仿全科医生的口吻与我: ${user}对话,我最近测量的${result.dataKey}数据为${JSON.stringify(TargetData)}, #提示:data_msg为值,hour_minute为检测时间。#提示:“[]”表示数据为空,请在小程序上传数据。#限制:回复不要带英文,要都转化成汉语。#限制:回复内容控制在150字。#限制:忽略“压力指数、疲劳指数、心肌炎风险、冠心病风险和动脉硬化”等数据。`
|
||||
Question = `请模仿全科医生的口吻与我: ${user}对话,我最近测量的${result.dataKey}数据为${JSON.stringify(TargetData)}, #提示:data_msg为值,hour_minute为检测时间。#提示:“[]”表示数据为空,请在小程序上传数据。#限制:回复不要带英文,要都转化成汉语。#限制:回复内容控制在150字。#限制:忽略“压力指数、疲劳指数、心肌炎风险、冠心病风险和动脉硬化”等数据。提示:回答尿酸时单位转换成“微摩尔/升”`
|
||||
|
||||
console.log(Question, '问题=========================问题');
|
||||
|
||||
|
|
@ -517,6 +525,11 @@
|
|||
// 关闭识别
|
||||
endRec.addEventListener("click", function() {
|
||||
closeShibie();
|
||||
|
||||
// 直接开始
|
||||
setTimeout(() => {
|
||||
startShibie();
|
||||
}, 100);
|
||||
});
|
||||
|
||||
// 暂停识别
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue