大屏功能合并

This commit is contained in:
xg-29 2024-09-25 16:01:02 +08:00
commit 22bc0a87e3
9 changed files with 2355 additions and 134 deletions

View File

@ -3,9 +3,8 @@ import {
} from "/tool/index.js"
export default {
baseUrl: 'https://syjk.yhy.ren/xcx-test/', // 测试
//baseUrl: 'https://syjk.yhy.ren/xcx-api/', // 生产
// baseUrl: 'https://health.lilinyiliao.com/xcx-api/', // 一体机报告
// baseUrl: 'https://syjk.yhy.ren/xcx-api/', // 生产
// baseUrl:'http://192.171.1.17:8082/',
post(url, param) {
return this.ajax('post', url, param)

74
api/config1.js Normal file
View File

@ -0,0 +1,74 @@
import {
toast
} from "/tool/index.js"
export default {
// baseUrl:'http://syjk.yhy.ren/prod-api/',//大屏-线上
baseUrl:'http://syjk.yhy.ren:9999/prod-api', //大屏测试
post(url, param) {
return this.ajax('post', url, param)
},
get(url, param) {
return this.ajax('get', url, param)
},
put(url, param) {
return this.ajax('put', url, param)
},
getUrl(url) {
return `${this.baseUrl}${url}`
},
setHeader(url) {
let header = {
'content-type': 'application/x-www-form-urlencoded',
'clientType': 'h5'
}
if (url.indexOf('application') != -1) header['content-type'] = 'application/json'
return header
},
setParams(param) {
const openId = uni.getStorageSync('openId') || ''
const userId = param.userId || uni.getStorageSync('userId') || ''
param['openId'] = openId
param['token'] = openId
param['userId'] = userId
return param
},
setUrlParams(isUrlParam, param, url) {
if (!isUrlParam) return ''
let str = []
for (let i in param) {
str.push(i + '=' + param[i])
}
return `${(url.indexOf('?')!=-1?'&':'?')}${str.join('&')}`
},
ajax(type, url, param = {}) {
return new Promise((resolve, reject) => {
let requestData = this.setParams(param.data || {})
let urlObj = this.setUrlParams(param.isUrlParam, requestData, url)
let request = {
url: `${this.baseUrl}${url}${urlObj}`,
method: type,
header: this.setHeader(url),
sslVerify: false,
dataType: 'json',
timeout: 300000,
data: requestData,
success: (response) => {
if (response.data.code == 500) {
return toast(response.data.msg)
}
let is = typeof response === 'object'
let data = response.data
resolve(is ? data : response)
},
fail: (err) => {
reject(err)
},
}
uni.request(request)
})
},
}

View File

@ -1,4 +1,5 @@
import ajax from './config'
import ajax1 from "./config1"
export default { // 所有接口
// 心理评估接口
list: (param) => ajax.post('psychology/dict/list', param), // 获取心理主页数据
@ -121,4 +122,8 @@ export default { // 所有接口
testReportDetails: (param) => ajax.get(`ytj-report/testReportDetails`, param),
queryLargeScreenData: (param) => ajax1.get(`dataDetection/facilityChart/queryLargeScreenData`, param), //数据大屏
queryLargeScreenData2: (param) => ajax1.get(`dataDetection/facilityChart/queryLargeScreenData2`, param), //数据大屏-健康趋势
queryLargeScreenData3: (param) => ajax1.get(`dataDetection/facilityChart/queryLargeScreenData3`, param), //数据大屏-部门对比分析
}

5
package-lock.json generated
View File

@ -5677,6 +5677,11 @@
"integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==",
"dev": true
},
"bootstrap": {
"version": "3.4.1",
"resolved": "https://registry.npmmirror.com/bootstrap/-/bootstrap-3.4.1.tgz",
"integrity": "sha512-yN5oZVmRCwe5aKwzRj6736nSmKDX7pLYwsXiCj/EYmo16hODaBiT4En5btW/jhBF/seV+XMx3aYwukYC3A49DA=="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz",

View File

@ -69,6 +69,7 @@
"@dcloudio/uni-stat": "^2.0.2-3081220230817001",
"@vue/shared": "^3.0.0",
"autoprefixer": "^8.0.0",
"bootstrap": "^3.4.1",
"core-js": "^3.8.3",
"flyio": "^0.6.2",
"less": "^4.2.0",

View File

@ -12,6 +12,7 @@
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.js"></script>
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
</head>

View File

@ -3,6 +3,9 @@ import App from './App'
import API from '/api/index.js'
import SMOKE from '/api/smoke.js'
import REGIST from '/api/regist.js'
import 'bootstrap'
import 'bootstrap/dist/css/bootstrap.min.css'
import "bootstrap/dist/js/bootstrap.min.js";
Vue.config.productionTip = false
Vue.prototype.$API = API
Vue.prototype.$SMOKE = SMOKE

View File

@ -1,135 +1,140 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/detail/detail",
"style": {
"navigationBarTitleText": "评估详情页"
}
},
{
"path": "pages/psychological-assessment/index/index",
"style": {
"navigationBarTitleText": "心理评估"
}
},
{
"path": "pages/psychological-assessment/result/result",
"style": {
"navigationBarTitleText": "评估报告"
}
},
{
"path": "pages/health-risks/basicReport/basicReport",
"style": {
"navigationBarTitleText": "生活方式评估报告"
}
},
{
"path": "pages/health-risks/evaluationResults/evaluationResults",
"style": {
"navigationBarTitleText": "评估报告"
}
},
{
"path": "pages/health-risks/index/index",
"style": {
"navigationBarTitleText": "评估问卷"
}
},
{
"path": "pages/health-risks/guideDetails/guideDetails",
"style": {
"navigationBarTitleText": "指南详情"
}
},
{
"path": "pages/plan-questionnaire/diseaseIndex/diseaseIndex",
"style": {
"navigationBarTitleText": "问卷"
}
},
{
"path": "pages/plan-questionnaire/psychologicalIndex/psychologicalIndex",
"style": {
"navigationBarTitleText": "问卷"
}
},
{
"path": "pages/plan-questionnaire/planningReport/planningReport",
"style": {
"navigationBarTitleText": "评估报告",
"onReachBottomDistance": 50
}
},
{
"path": "pages/plan-questionnaire/moodRequest/moodRequest",
"style": {
"navigationBarTitleText": "评估报告",
"onReachBottomDistance": 50
}
},
{
"path": "pages/Integral/home/home",
"style": {
"navigationBarTitleText": "积分兑换",
"onReachBottomDistance": 50
}
},
{
"path": "pages/Integral/exchangeRecords/exchangeRecords",
"style": {
"navigationBarTitleText": "兑换记录",
"onReachBottomDistance": 50
}
},
{
"path": "pages/Integral/home/details/details",
"style": {
"navigationBarTitleText": "商品详情",
"onReachBottomDistance": 50
}
},
{
"path": "pages/Integral/home/Confirmed/Confirmed",
"style": {
"navigationBarTitleText": "确认兑换",
"onReachBottomDistance": 50
}
},
{
"path": "pages/Integral/home/orderDetails/orderDetails",
"style": {
"navigationBarTitleText": "详情",
"onReachBottomDistance": 50
}
},
{
"path": "pages/health-risks/newBasicReport/basicReport",
"style": {
"navigationBarTitleText": "基础评估报告"
}
},
{
"path" : "pages/machineReport/report/report",
"style" :
{
"navigationBarTitleText" : "一体机检测报告"
}
},
{
"path" : "pages/machineReport/reportDetail/reportDetail",
"style" :
{
"navigationBarTitleText" : "检测报告"
}
}
],
"pages": [
//pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/detail/detail",
"style": {
"navigationBarTitleText": "评估详情页"
}
},
{
"path": "pages/psychological-assessment/index/index",
"style": {
"navigationBarTitleText": "心理评估"
}
},
{
"path": "pages/psychological-assessment/result/result",
"style": {
"navigationBarTitleText": "评估报告"
}
},
{
"path": "pages/health-risks/basicReport/basicReport",
"style": {
"navigationBarTitleText": "生活方式评估报告"
}
},
{
"path": "pages/health-risks/evaluationResults/evaluationResults",
"style": {
"navigationBarTitleText": "评估报告"
}
},
{
"path": "pages/health-risks/index/index",
"style": {
"navigationBarTitleText": "评估问卷"
}
},
{
"path": "pages/health-risks/guideDetails/guideDetails",
"style": {
"navigationBarTitleText": "指南详情"
}
},
{
"path": "pages/plan-questionnaire/diseaseIndex/diseaseIndex",
"style": {
"navigationBarTitleText": "问卷"
}
},
{
"path": "pages/plan-questionnaire/psychologicalIndex/psychologicalIndex",
"style": {
"navigationBarTitleText": "问卷"
}
},
{
"path": "pages/plan-questionnaire/planningReport/planningReport",
"style": {
"navigationBarTitleText": "评估报告",
"onReachBottomDistance": 50
}
},
{
"path": "pages/plan-questionnaire/moodRequest/moodRequest",
"style": {
"navigationBarTitleText": "评估报告",
"onReachBottomDistance": 50
}
},
{
"path": "pages/Integral/home/home",
"style": {
"navigationBarTitleText": "积分兑换",
"onReachBottomDistance": 50
}
},
{
"path": "pages/Integral/exchangeRecords/exchangeRecords",
"style": {
"navigationBarTitleText": "兑换记录",
"onReachBottomDistance": 50
}
},
{
"path": "pages/Integral/home/details/details",
"style": {
"navigationBarTitleText": "商品详情",
"onReachBottomDistance": 50
}
},
{
"path": "pages/Integral/home/Confirmed/Confirmed",
"style": {
"navigationBarTitleText": "确认兑换",
"onReachBottomDistance": 50
}
},
{
"path": "pages/Integral/home/orderDetails/orderDetails",
"style": {
"navigationBarTitleText": "详情",
"onReachBottomDistance": 50
}
},
{
"path": "pages/health-risks/newBasicReport/basicReport",
"style": {
"navigationBarTitleText": "基础评估报告"
}
},
{
"path": "pages/machineReport/report/report",
"style": {
"navigationBarTitleText": "一体机检测报告"
}
},
{
"path": "pages/machineReport/reportDetail/reportDetail",
"style": {
"navigationBarTitleText": "检测报告"
}
},
{
"path": "pages/largeDataScreen/largeDataScreen",
"style": {
"navigationBarTitleText": "数据大屏"
}
}
],
"globalStyle": {
"navigationBarTitleText": "鲨鱼云康",

File diff suppressed because it is too large Load Diff