2025年6月9日10:23:02

This commit is contained in:
17792275749
2025-06-09 10:23:05 +08:00
commit 9df8b7e8e2
146 changed files with 23980 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
# 测试环境
NODE_ENV=development
# axios 请求地址
VUE_APP_ST_REQUEST_URL = http://192.168.1.210/gateway
VUE_APP_CT_REQUEST_URL = http://vip.shuziweidao.com
# VUE_APP_CT_REQUEST_URL = http://192.168.10.7:9092
# mqtt 通信地址
VUE_APP_ST_MQTT_URL = 192.168.1.210
VUE_APP_ST_MQTT_PORT = 61614
VUE_APP_CT_MQTT_URL = vip.shuziweidao.com
VUE_APP_CT_MQTT_PORT = 61614
+12
View File
@@ -0,0 +1,12 @@
# 正式环境
NODE_ENV=production
# axios 请求地址
VUE_APP_ST_REQUEST_URL = http://192.168.1.210/gateway
VUE_APP_CT_REQUEST_URL = http://vip.shuziweidao.com
# mqtt 通信地址
VUE_APP_ST_MQTT_URL = 192.168.1.210
VUE_APP_ST_MQTT_PORT = 61614
VUE_APP_CT_MQTT_URL = vip.shuziweidao.com
VUE_APP_CT_MQTT_PORT = 61614
+23
View File
@@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
+19
View File
@@ -0,0 +1,19 @@
# restaurant-floor-screen
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
+9
View File
@@ -0,0 +1,9 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset',
"@babel/preset-env",
],
plugins: [
"@babel/plugin-transform-private-methods"
]
}
+19
View File
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}
+19305
View File
File diff suppressed because it is too large Load Diff
+48
View File
@@ -0,0 +1,48 @@
{
"name": "restaurant-floor-screen",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@babel/core": "^7.26.0",
"@babel/plugin-transform-private-methods": "^7.25.9",
"@babel/preset-env": "^7.26.0",
"amfe-flexible": "^2.2.1",
"axios": "^1.7.9",
"babel-loader": "^9.2.1",
"buffer": "^6.0.3",
"core-js": "^3.40.0",
"crypto-browserify": "^3.12.1",
"mqtt": "^4.3.8",
"postcss-pxtorem": "^6.1.0",
"process": "^0.11.10",
"regenerator-runtime": "^0.14.1",
"stream-browserify": "^3.0.0",
"url": "^0.11.4",
"util": "^0.12.5",
"vue": "^2.6.14",
"vue-count-to": "^1.0.13",
"vue-router": "^3.5.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"less": "^4.2.1",
"less-loader": "^8.0.0",
"vue-loader": "^16.0.0",
"vue-template-compiler": "^2.6.14",
"webpack": "^5.0.0",
"webpack-cli": "^5.0.0",
"webpack-dev-server": "^4.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
+14
View File
@@ -0,0 +1,14 @@
module.exports = {
plugins: [
require('postcss-pxtorem')({
rootValue:({ file }) => {
if (file.includes('userRanking') || file.includes('dietaryNutritionTips')) {
return 108;
} else {
return 192;
}
},
propList: ['*'],
})
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

+17
View File
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,height=device-height, user-scalable=no,initial-scale=1, minimum-scale=1, maximum-scale=1,target-densitydpi=device-dpi ">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
+32
View File
@@ -0,0 +1,32 @@
<template>
<div id="app">
<router-view></router-view>
</div>
</template>
<style lang="less">
@font-face {
font-family: "PingFang";
src: url("@/assets/fonts/PingFang.ttf") format("opentype");
font-weight: 500;
font-style: normal;
}
* {
border: 0;
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body, #app {
width: 100%;
height: 100%;
overflow: hidden;
font-family: "PingFang";
}
img {
width: 100%;
}
</style>
+69
View File
@@ -0,0 +1,69 @@
/**
* 封装 XMLHttpRequest 请求
* @param {string} method - 请求方法 ('GET' 或 'POST')
* @param {string} url - 请求的 URL
* @param {Object} params - 请求参数(对于 GET 请求会拼接到 URL,对于 POST 请求放在请求体中)
* @param {Object} headers - 请求头对象(键值对形式)
* @returns {Promise} 返回一个 Promise,解析为响应数据或拒绝为错误
*/
export function httpRequest(method, url, params, headers) {
return new Promise(function(resolve, reject) {
let xhr = new XMLHttpRequest();
// xhr.withCredentials = true;
let queryString = '';
// 将 params 转为查询字符串(仅对 GET 请求有效)
if (params && method.toUpperCase() === 'GET') {
queryString = Object.keys(params).map(function(key) {
return encodeURIComponent(key) + '=' + encodeURIComponent(params[key]);
}).join('&');
url += (url.indexOf('?') === -1 ? '?' : '&') + queryString;
}
xhr.open(method.toUpperCase(), url, true);
// 设置请求头
if (headers) {
for (let key in headers) {
if (headers.hasOwnProperty(key)) {
xhr.setRequestHeader(key, headers[key]);
}
}
}
// 监听请求状态变化
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) { // 请求完成
if (xhr.status >= 200 && xhr.status < 300) { // 请求成功
try {
let response = JSON.parse(xhr.responseText); // 尝试解析为 JSON
resolve(response);
} catch (e) {
resolve(xhr.responseText); // 如果不是 JSON,返回原始文本
}
} else {
reject({
status: xhr.status,
statusText: xhr.statusText,
response: xhr.responseText
});
}
}
};
xhr.onerror = function() {
reject({
status: xhr.status,
statusText: xhr.statusText
});
};
// 发送请求(对于 POST 请求需要发送 JSON 格式的参数)
if (method.toUpperCase() === 'POST') {
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(JSON.stringify(params));
} else {
xhr.send();
}
});
}
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 711 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 832 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Some files were not shown because too many files have changed in this diff Show More