大屏功能提交

This commit is contained in:
xg-29 2024-09-25 14:57:48 +08:00
parent 21d3afdcc0
commit ce803f4955
6 changed files with 2050 additions and 98 deletions

View File

@ -4,6 +4,8 @@ import {
export default {
// baseUrl: 'https://syjk.yhy.ren/xcx-test/', // 测试
baseUrl: 'https://syjk.yhy.ren/xcx-api/', // 生产
// baseUrl:'http://192.171.1.17:8082/',
baseUrl1:'http://syjk.yhy.ren/prod-api',//大屏
post(url, param) {
return this.ajax('post', url, param)

73
api/config1.js Normal file
View File

@ -0,0 +1,73 @@
import {
toast
} from "/tool/index.js"
export default {
baseUrl:'http://syjk.yhy.ren/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), // 获取心理主页数据
@ -112,5 +113,8 @@ export default { // 所有接口
// getIntegralOrderDetailFlow: (param) => ajax.get(`order/integralOrderDetail/getIntegralOrderDetailFlow`, param), // 获取商品兑换记录
getCustomerInfoByUserId: (param) => ajax.get(`sysUser/customerWorkDept/getCustomerUserInfo`, 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), //数据大屏-部门对比分析
}

39
package-lock.json generated
View File

@ -4224,6 +4224,27 @@
"whatwg-fetch": "^3.6.2"
},
"dependencies": {
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
}
},
"acorn": {
"version": "8.10.0",
"resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.10.0.tgz",
@ -4479,19 +4500,6 @@
"resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.3.4.tgz",
"integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ=="
},
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
}
},
"@vue/web-component-wrapper": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/@vue/web-component-wrapper/-/web-component-wrapper-1.3.0.tgz",
@ -11780,11 +11788,6 @@
"@sideway/pinpoint": "^2.0.0"
}
},
"jquery": {
"version": "3.7.1",
"resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz",
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
},
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",

View File

@ -72,7 +72,6 @@
"bootstrap": "^3.4.1",
"core-js": "^3.8.3",
"flyio": "^0.6.2",
"jquery": "^3.7.1",
"less": "^4.2.0",
"less-loader": "^11.1.3",
"markdown-it-vue": "^1.1.7",

File diff suppressed because it is too large Load Diff