解决退款速度慢,写真退款失败问题v2.0.1
This commit is contained in:
parent
8ef71c69fb
commit
c090972acb
166
package-lock.json
generated
166
package-lock.json
generated
|
@ -829,11 +829,19 @@
|
|||
"version": "20.17.6",
|
||||
"resolved": "https://registry.npmmirror.com/@types/node/-/node-20.17.6.tgz",
|
||||
"integrity": "sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"undici-types": "~6.19.2"
|
||||
}
|
||||
},
|
||||
"@types/node-fetch": {
|
||||
"version": "2.6.12",
|
||||
"resolved": "https://registry.npmmirror.com/@types/node-fetch/-/node-fetch-2.6.12.tgz",
|
||||
"integrity": "sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==",
|
||||
"requires": {
|
||||
"@types/node": "*",
|
||||
"form-data": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"@types/web-bluetooth": {
|
||||
"version": "0.0.16",
|
||||
"resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz",
|
||||
|
@ -1280,11 +1288,27 @@
|
|||
"resolved": "https://registry.npmmirror.com/@wangeditor/video-module/-/video-module-1.1.4.tgz",
|
||||
"integrity": "sha512-ZdodDPqKQrgx3IwWu4ZiQmXI8EXZ3hm2/fM6E3t5dB8tCaIGWQZhmqd6P5knfkRAd3z2+YRSRbxOGfoRSp/rLg=="
|
||||
},
|
||||
"abort-controller": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
|
||||
"requires": {
|
||||
"event-target-shim": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"acorn": {
|
||||
"version": "8.14.0",
|
||||
"resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.14.0.tgz",
|
||||
"integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA=="
|
||||
},
|
||||
"agentkeepalive": {
|
||||
"version": "4.6.0",
|
||||
"resolved": "https://registry.npmmirror.com/agentkeepalive/-/agentkeepalive-4.6.0.tgz",
|
||||
"integrity": "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==",
|
||||
"requires": {
|
||||
"humanize-ms": "^1.2.1"
|
||||
}
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-6.2.1.tgz",
|
||||
|
@ -1300,6 +1324,11 @@
|
|||
"picomatch": "^2.0.4"
|
||||
}
|
||||
},
|
||||
"argparse": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz",
|
||||
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
|
||||
},
|
||||
"async-validator": {
|
||||
"version": "4.2.5",
|
||||
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz",
|
||||
|
@ -1619,8 +1648,7 @@
|
|||
"entities": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz",
|
||||
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="
|
||||
},
|
||||
"errno": {
|
||||
"version": "0.1.8",
|
||||
|
@ -1733,6 +1761,11 @@
|
|||
"es5-ext": "~0.10.14"
|
||||
}
|
||||
},
|
||||
"event-target-shim": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/event-target-shim/-/event-target-shim-5.0.1.tgz",
|
||||
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
|
||||
},
|
||||
"execa": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/execa/-/execa-8.0.1.tgz",
|
||||
|
@ -1800,6 +1833,20 @@
|
|||
"mime-types": "^2.1.12"
|
||||
}
|
||||
},
|
||||
"form-data-encoder": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmmirror.com/form-data-encoder/-/form-data-encoder-1.7.2.tgz",
|
||||
"integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A=="
|
||||
},
|
||||
"formdata-node": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmmirror.com/formdata-node/-/formdata-node-4.4.1.tgz",
|
||||
"integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==",
|
||||
"requires": {
|
||||
"node-domexception": "1.0.0",
|
||||
"web-streams-polyfill": "4.0.0-beta.3"
|
||||
}
|
||||
},
|
||||
"fs-minipass": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/fs-minipass/-/fs-minipass-2.1.0.tgz",
|
||||
|
@ -1913,6 +1960,14 @@
|
|||
"resolved": "https://registry.npmmirror.com/human-signals/-/human-signals-5.0.0.tgz",
|
||||
"integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ=="
|
||||
},
|
||||
"humanize-ms": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/humanize-ms/-/humanize-ms-1.2.1.tgz",
|
||||
"integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",
|
||||
"requires": {
|
||||
"ms": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"i18next": {
|
||||
"version": "20.6.1",
|
||||
"resolved": "https://registry.npmmirror.com/i18next/-/i18next-20.6.1.tgz",
|
||||
|
@ -2070,6 +2125,14 @@
|
|||
"tslib": "^2.3.0"
|
||||
}
|
||||
},
|
||||
"linkify-it": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/linkify-it/-/linkify-it-5.0.0.tgz",
|
||||
"integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==",
|
||||
"requires": {
|
||||
"uc.micro": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"local-pkg": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmmirror.com/local-pkg/-/local-pkg-0.5.0.tgz",
|
||||
|
@ -2165,6 +2228,24 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"markdown-it": {
|
||||
"version": "14.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-14.1.0.tgz",
|
||||
"integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==",
|
||||
"requires": {
|
||||
"argparse": "^2.0.1",
|
||||
"entities": "^4.4.0",
|
||||
"linkify-it": "^5.0.0",
|
||||
"mdurl": "^2.0.0",
|
||||
"punycode.js": "^2.3.1",
|
||||
"uc.micro": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"mdurl": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/mdurl/-/mdurl-2.0.0.tgz",
|
||||
"integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w=="
|
||||
},
|
||||
"memoize-one": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-6.0.0.tgz",
|
||||
|
@ -2335,6 +2416,19 @@
|
|||
"integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node-domexception": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/node-domexception/-/node-domexception-1.0.0.tgz",
|
||||
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.7.0.tgz",
|
||||
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
|
||||
"requires": {
|
||||
"whatwg-url": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"node-fetch-native": {
|
||||
"version": "1.6.4",
|
||||
"resolved": "https://registry.npmmirror.com/node-fetch-native/-/node-fetch-native-1.6.4.tgz",
|
||||
|
@ -2418,6 +2512,35 @@
|
|||
"mimic-fn": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"openai": {
|
||||
"version": "4.89.0",
|
||||
"resolved": "https://registry.npmmirror.com/openai/-/openai-4.89.0.tgz",
|
||||
"integrity": "sha512-XNI0q2l8/Os6jmojxaID5EhyQjxZgzR2gWcpEjYWK5hGKwE7AcifxEY7UNwFDDHJQXqeiosQ0CJwQN+rvnwdjA==",
|
||||
"requires": {
|
||||
"@types/node": "^18.11.18",
|
||||
"@types/node-fetch": "^2.6.4",
|
||||
"abort-controller": "^3.0.0",
|
||||
"agentkeepalive": "^4.2.1",
|
||||
"form-data-encoder": "1.7.2",
|
||||
"formdata-node": "^4.3.2",
|
||||
"node-fetch": "^2.6.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "18.19.83",
|
||||
"resolved": "https://registry.npmmirror.com/@types/node/-/node-18.19.83.tgz",
|
||||
"integrity": "sha512-D69JeR5SfFS5H6FLbUaS0vE4r1dGhmMBbG4Ed6BNS4wkDK8GZjsdCShT5LCN59vOHEUHnFCY9J4aclXlIphMkA==",
|
||||
"requires": {
|
||||
"undici-types": "~5.26.4"
|
||||
}
|
||||
},
|
||||
"undici-types": {
|
||||
"version": "5.26.5",
|
||||
"resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-5.26.5.tgz",
|
||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"pako": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/pako/-/pako-2.1.0.tgz",
|
||||
|
@ -2540,6 +2663,11 @@
|
|||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"punycode.js": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmmirror.com/punycode.js/-/punycode.js-2.3.1.tgz",
|
||||
"integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA=="
|
||||
},
|
||||
"querystring": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/querystring/-/querystring-0.2.1.tgz",
|
||||
|
@ -2796,6 +2924,11 @@
|
|||
"is-number": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||
},
|
||||
"tslib": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz",
|
||||
|
@ -2813,6 +2946,11 @@
|
|||
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
|
||||
"dev": true
|
||||
},
|
||||
"uc.micro": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/uc.micro/-/uc.micro-2.1.0.tgz",
|
||||
"integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A=="
|
||||
},
|
||||
"ufo": {
|
||||
"version": "1.5.4",
|
||||
"resolved": "https://registry.npmmirror.com/ufo/-/ufo-1.5.4.tgz",
|
||||
|
@ -2847,8 +2985,7 @@
|
|||
"undici-types": {
|
||||
"version": "6.19.8",
|
||||
"resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.19.8.tgz",
|
||||
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="
|
||||
},
|
||||
"unicorn-magic": {
|
||||
"version": "0.1.0",
|
||||
|
@ -3010,11 +3147,30 @@
|
|||
"semver": "^7.5.4"
|
||||
}
|
||||
},
|
||||
"web-streams-polyfill": {
|
||||
"version": "4.0.0-beta.3",
|
||||
"resolved": "https://registry.npmmirror.com/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz",
|
||||
"integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug=="
|
||||
},
|
||||
"webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
|
||||
},
|
||||
"webpack-virtual-modules": {
|
||||
"version": "0.6.2",
|
||||
"resolved": "https://registry.npmmirror.com/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz",
|
||||
"integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ=="
|
||||
},
|
||||
"whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
||||
"requires": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"which": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/which/-/which-3.0.1.tgz",
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
"compressorjs": "^1.2.1",
|
||||
"dayjs": "^1.11.13",
|
||||
"element-plus": "^2.9.0",
|
||||
"markdown-it": "^14.1.0",
|
||||
"mitt": "^3.0.1",
|
||||
"openai": "^4.89.0",
|
||||
"pinia": "^2.0.35",
|
||||
"pinia-plugin-persistedstate": "^4.1.2",
|
||||
"querystring": "^0.2.1",
|
||||
|
|
|
@ -4,11 +4,11 @@ import router from '../router'
|
|||
|
||||
const myAxios = axios.create({
|
||||
withCredentials:true,
|
||||
// baseURL: 'http://localhost:9092/api'
|
||||
baseURL: 'http://localhost:9092/api'
|
||||
// baseURL: 'http://123.249.108.160:8888/api' //测试服务器
|
||||
// baseURL: 'http://154.8.193.216:9092/api', //隋雨霏服务器
|
||||
// baseURL: 'http://154.8.193.216:9093/api' //隋雨霏服务器测试环境
|
||||
baseURL: 'https://www.carboner.cn:8888/api'
|
||||
// baseURL: 'https://www.carboner.cn:8888/api'
|
||||
});
|
||||
// 添加请求拦截器
|
||||
axios.interceptors.request.use(function (config) {
|
||||
|
|
|
@ -3,13 +3,14 @@
|
|||
<el-menu
|
||||
background-color="rgb(170, 113, 81)"
|
||||
:collapse="isCollapse"
|
||||
:collapse-transition="false"
|
||||
collapse-transition
|
||||
text-color="#fff"
|
||||
router
|
||||
:default-active="currentRoute"
|
||||
active-text-color="#ffd04b"
|
||||
unique-opened
|
||||
style="height: 100%;overflow-y: scroll;overflow-y: auto;"
|
||||
style="height: 100%;
|
||||
overflow-y: auto;"
|
||||
>
|
||||
<div style="height: 80px; color: white; font-weight: bold;
|
||||
display: flex; align-items: center; justify-content: center">
|
||||
|
@ -129,7 +130,7 @@ const currentRoute = router.currentRoute.value.fullPath //当前路由信息
|
|||
// console.log('router--->',router.options.routes);
|
||||
|
||||
onMounted(()=>{
|
||||
// console.log('uid--->',router.currentRoute.value.fullPath)
|
||||
console.log('uid--->',router.currentRoute.value.fullPath)
|
||||
})
|
||||
|
||||
// 创建图标映射表
|
||||
|
@ -178,7 +179,7 @@ const menuRoutes = computed(() => {
|
|||
}
|
||||
// 如果路由设置为隐藏,则跳过
|
||||
if (route.meta?.hidden ) {
|
||||
console.log('11',route.children);
|
||||
// console.log('11',route.children);
|
||||
return [];
|
||||
}
|
||||
return route;
|
||||
|
@ -190,4 +191,7 @@ const menuRoutes = computed(() => {
|
|||
|
||||
</script>
|
||||
<style scoped>
|
||||
.no-active {
|
||||
color: #ffffff;
|
||||
}
|
||||
</style>
|
|
@ -2,7 +2,7 @@
|
|||
<el-breadcrumb :separator-icon="ArrowRight" class="bread">
|
||||
<el-breadcrumb-item v-for="(item,index) in routers" :key="item.path" :to="item.path">
|
||||
<!-- {{ item?.meta?.title }} -->
|
||||
<span v-if="item.redirect === 'noredirect' || index === routers.length - 1" class="no-redirect">
|
||||
<span v-if="item.redirect === 'noredirect' || index === routers.length - 1">
|
||||
{{ item.meta.title }}
|
||||
</span>
|
||||
<!-- 如果没有重定向,使用 router-link 来跳转到对应路径 -->
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//上传链接
|
||||
// export const uploadUrl : string = 'http://localhost:9092/api/file/uploadFile'
|
||||
export const uploadUrl : string= 'https://www.carboner.cn:8888/api/file/uploadFile'
|
||||
export const uploadUrl : string = 'http://localhost:9092/api/file/uploadFile'
|
||||
// export const uploadUrl : string= 'https://www.carboner.cn:8888/api/file/uploadFile'
|
||||
export const downloadUrl : string = 'https://www.carboner.cn:8888/api/file/downloadFile?objectKey='
|
||||
|
|
|
@ -45,7 +45,7 @@ const compressImage =(file: any)=> { //图片压缩方法
|
|||
new Compressor(file.file, {
|
||||
quality: 0.2, //压缩质量,越高文件越大
|
||||
success(result) {
|
||||
console.log('res--->',result)
|
||||
// console.log('res--->',result)
|
||||
// 压缩成功后的处理
|
||||
const compressedFile = new File([result], file.file.name, { type: result.type });
|
||||
// 可以在这里预览、上传或者做其他处理
|
||||
|
|
|
@ -57,7 +57,7 @@ const compressImage =(file: any)=> { //图片压缩方法
|
|||
new Compressor(file.file, {
|
||||
quality: 0.2, //压缩质量,越高文件越大
|
||||
success(result) {
|
||||
console.log('res--->',result)
|
||||
// console.log('res--->',result)
|
||||
// 压缩成功后的处理
|
||||
const compressedFile = new File([result], file.file.name, { type: result.type });
|
||||
// 可以在这里预览、上传或者做其他处理
|
||||
|
|
|
@ -148,6 +148,7 @@ const onSubmit = async () => {
|
|||
festivalName: form.value.festivalName,
|
||||
label: form.value.label
|
||||
})
|
||||
// console.log('添加商品---->',res.data)
|
||||
if (res.data.code === 1) {
|
||||
SuccessInfo('提交成功')
|
||||
form.value = {} //12.18改
|
||||
|
@ -179,6 +180,7 @@ const addLabel = () => { //添加商品标签按钮的方法
|
|||
if (labelList.value.length < 4) {
|
||||
labelList.value.push('')
|
||||
}
|
||||
addLabelList()
|
||||
}
|
||||
|
||||
const deleteLabel = () => { //删除标签的方法
|
||||
|
|
|
@ -66,10 +66,10 @@
|
|||
发货
|
||||
</el-button>
|
||||
<el-popconfirm confirm-button-text='是' cancel-button-text='否' icon="InfoFilled" icon-color="red"
|
||||
title="订单是否完成?" @confirm="orderTransaction(scope.row.id,'交易完成')" width=180>
|
||||
title="订单是否完成?" @confirm="orderTransaction(scope.row.id,'交易成功')" width=180>
|
||||
<template #reference>
|
||||
<el-button v-if="['待收货'].includes(scope.row.orderStatus)" size="small" type="success"
|
||||
plain>交易完成</el-button>
|
||||
plain>交易成功</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
<el-popconfirm confirm-button-text='确定' cancel-button-text='取消' icon="InfoFilled" icon-color="red"
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
</template>
|
||||
</el-popconfirm>
|
||||
<el-popconfirm confirm-button-text='是' cancel-button-text='否' icon="InfoFilled" icon-color="red"
|
||||
title="订单已完成?" @confirm="orderTransaction(scope.row.id,'交易完成')" width=180>
|
||||
title="订单已完成?" @confirm="orderTransaction(scope.row.id,'交易成功')" width=180>
|
||||
<template #reference>
|
||||
<el-button v-if="['待收货'].includes(scope.row.orderStatus)" size="small" type="primary"
|
||||
plain>完成订单</el-button>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
</template>
|
||||
</el-popconfirm>
|
||||
<el-popconfirm confirm-button-text='是' cancel-button-text='否' icon="InfoFilled" icon-color="red"
|
||||
title="租赁是否完成?" @confirm="changeOrderStatus(scope.row,'交易完成')" width=180 v-if="['待收货'].includes(scope.row.orderStatus)">
|
||||
title="租赁是否完成?" @confirm="changeOrderStatus(scope.row,'交易成功')" width=180 v-if="['待收货'].includes(scope.row.orderStatus)">
|
||||
<template #reference>
|
||||
<el-button size="small" type="primary" plain>租赁完成</el-button>
|
||||
</template>
|
||||
|
|
|
@ -1,94 +1,88 @@
|
|||
<template>
|
||||
<el-upload
|
||||
v-model:file-list="ImgList"
|
||||
:action="uploadUrl"
|
||||
list-type="picture-card"
|
||||
:http-request="customUpload"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove"
|
||||
:on-exceed="ExceedImg"
|
||||
limit="7"
|
||||
v-loading="loading"
|
||||
>
|
||||
<el-icon><Plus /></el-icon>
|
||||
</el-upload>
|
||||
<div style="display: flex">
|
||||
<el-input v-model="message[0].content" style="width: 240px" placeholder="Please input" /><el-button type="primary" @click="main()">启动!</el-button>
|
||||
<div class="box1" v-html="markdown.render(reasoning_content)"></div>
|
||||
<div class="box" v-html="markdown.render(content)"></div>
|
||||
|
||||
<el-dialog v-model="dialogVisible">
|
||||
<el-image :src="dialogImageUrl"/>
|
||||
</el-dialog>
|
||||
<el-button type="primary" @click="submitForm">看看删除后的图片</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import myAxios from '@/api/myAxios'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import type { UploadProps, UploadUserFile } from 'element-plus'
|
||||
import { uploadUrl, downloadUrl } from '@/utils/formatImgUpload'
|
||||
import { WarnInfo } from "@/utils/messageInfo";
|
||||
<script setup>
|
||||
import OpenAI from "openai";
|
||||
import {onMounted, ref} from "vue";
|
||||
import MarkdownIt from "markdown-it";
|
||||
import myAxios from "@/api/myAxios";
|
||||
|
||||
const goodImgStr = ref('') //图片字符串
|
||||
const goodImgArr= ref<String[]>([]) //后端数据库返回的图片objectKey
|
||||
const dialogImageUrl = ref('')
|
||||
const dialogVisible = ref(false)
|
||||
const loading = ref(false)
|
||||
|
||||
|
||||
const content = ref('')
|
||||
const reasoning_content = ref('')
|
||||
const msg = ref('')
|
||||
const markdown = new MarkdownIt()
|
||||
const productNum = ref('')
|
||||
|
||||
onMounted(()=>{
|
||||
getProductInfo()
|
||||
// console.log(123123)
|
||||
// main()
|
||||
getTotalProduct()
|
||||
})
|
||||
|
||||
const getProductInfo = async () => {
|
||||
const res = await myAxios.post('/goods/getById',{id: 498})
|
||||
console.log('图片信息--->',res.data.data.goodImg)
|
||||
goodImgArr.value = res.data.data.goodImg.split(';')
|
||||
console.log('图片数组---->',goodImgArr.value)
|
||||
goodImgArr.value.forEach(item => { //回显
|
||||
ImgList.value.push({
|
||||
url: downloadUrl + item
|
||||
})
|
||||
})
|
||||
const message = ref([
|
||||
{
|
||||
role: "user",
|
||||
content: ""
|
||||
}
|
||||
])
|
||||
|
||||
const ImgList: any = ref([])
|
||||
|
||||
const handleRemove: UploadProps['onRemove'] = (uploadFile, uploadFiles) => { //前者是删掉的,后者是删掉后得数组
|
||||
console.log(uploadFile, uploadFiles)
|
||||
let deleteObjKey = uploadFile.url?.substring(downloadUrl.length)
|
||||
goodImgArr.value = goodImgArr.value.filter(item => item !== deleteObjKey)
|
||||
}
|
||||
|
||||
const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile) => {
|
||||
dialogImageUrl.value = uploadFile.url!
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
const submitForm = ()=>{ //测试格式化后的
|
||||
goodImgStr.value = goodImgArr.value.join(';')
|
||||
console.log('提交表单的goodImgStr',goodImgStr.value)
|
||||
}
|
||||
|
||||
const ExceedImg: UploadProps['onExceed'] = (files) => { //覆盖商品照片 'onExceed'当文件个数超过限制时,做出的判断
|
||||
WarnInfo('最多只能上传七张图片!')
|
||||
}
|
||||
//图片上传方法
|
||||
const customUpload = async (e:any) => {
|
||||
loading.value = true
|
||||
const res = await myAxios({
|
||||
url: e.action,
|
||||
method: 'post',
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
data: {
|
||||
biz: "test",
|
||||
file: e.file
|
||||
}
|
||||
})
|
||||
console.log('图片上传结果--->',res.data)
|
||||
const getTotalProduct = async ()=> {
|
||||
const res = await myAxios.get('/global/getAllGoods')
|
||||
if(res.data.code === 1) {
|
||||
goodImgArr.value.push(res.data.data)
|
||||
loading.value = false
|
||||
// message.value[1].content = JSON.stringify(Object.entries(res.data.data))
|
||||
}
|
||||
console.log(JSON.stringify(Object.entries(res.data.data)));
|
||||
// JSON.stringify(Object.fromEntries(map))
|
||||
}
|
||||
|
||||
|
||||
const openAI = new OpenAI({
|
||||
baseURL: 'https://api.deepseek.com',
|
||||
apiKey: 'sk-d9ab76d589d642f19198ed92acd182c5',
|
||||
dangerouslyAllowBrowser: true
|
||||
});
|
||||
|
||||
const main = async () => {
|
||||
const completion = await openAI.chat.completions.create({
|
||||
model:'deepseek-reasoner',
|
||||
messages: message.value,
|
||||
stream: true
|
||||
});
|
||||
|
||||
for await ( const chunk of completion) {
|
||||
// console.log('chunk--->',chunk)
|
||||
if(chunk.choices[0].delta.reasoning_content != null) {
|
||||
reasoning_content.value += chunk.choices[0].delta.reasoning_content
|
||||
}
|
||||
if(chunk.choices[0].delta.content != null) {
|
||||
content.value += chunk.choices[0].delta.content
|
||||
}
|
||||
if(chunk.choices[0].finish_reason === 'stop') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// console.log(content)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.box1{
|
||||
width: 500px;
|
||||
height: 100%;
|
||||
border: 1px solid red;
|
||||
}
|
||||
.box {
|
||||
width: 500px;
|
||||
height: 100%;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user