解决退款速度慢,写真退款失败问题v2.0.1

This commit is contained in:
yuanteng 2025-03-25 22:52:16 +08:00
parent 8ef71c69fb
commit c090972acb
13 changed files with 260 additions and 102 deletions

166
package-lock.json generated
View File

@ -829,11 +829,19 @@
"version": "20.17.6", "version": "20.17.6",
"resolved": "https://registry.npmmirror.com/@types/node/-/node-20.17.6.tgz", "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.17.6.tgz",
"integrity": "sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==", "integrity": "sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==",
"dev": true,
"requires": { "requires": {
"undici-types": "~6.19.2" "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": { "@types/web-bluetooth": {
"version": "0.0.16", "version": "0.0.16",
"resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz", "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", "resolved": "https://registry.npmmirror.com/@wangeditor/video-module/-/video-module-1.1.4.tgz",
"integrity": "sha512-ZdodDPqKQrgx3IwWu4ZiQmXI8EXZ3hm2/fM6E3t5dB8tCaIGWQZhmqd6P5knfkRAd3z2+YRSRbxOGfoRSp/rLg==" "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": { "acorn": {
"version": "8.14.0", "version": "8.14.0",
"resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.14.0.tgz", "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.14.0.tgz",
"integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==" "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": { "ansi-styles": {
"version": "6.2.1", "version": "6.2.1",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-6.2.1.tgz", "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-6.2.1.tgz",
@ -1300,6 +1324,11 @@
"picomatch": "^2.0.4" "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": { "async-validator": {
"version": "4.2.5", "version": "4.2.5",
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz", "resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz",
@ -1619,8 +1648,7 @@
"entities": { "entities": {
"version": "4.5.0", "version": "4.5.0",
"resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz",
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="
"dev": true
}, },
"errno": { "errno": {
"version": "0.1.8", "version": "0.1.8",
@ -1733,6 +1761,11 @@
"es5-ext": "~0.10.14" "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": { "execa": {
"version": "8.0.1", "version": "8.0.1",
"resolved": "https://registry.npmmirror.com/execa/-/execa-8.0.1.tgz", "resolved": "https://registry.npmmirror.com/execa/-/execa-8.0.1.tgz",
@ -1800,6 +1833,20 @@
"mime-types": "^2.1.12" "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": { "fs-minipass": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmmirror.com/fs-minipass/-/fs-minipass-2.1.0.tgz", "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", "resolved": "https://registry.npmmirror.com/human-signals/-/human-signals-5.0.0.tgz",
"integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==" "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": { "i18next": {
"version": "20.6.1", "version": "20.6.1",
"resolved": "https://registry.npmmirror.com/i18next/-/i18next-20.6.1.tgz", "resolved": "https://registry.npmmirror.com/i18next/-/i18next-20.6.1.tgz",
@ -2070,6 +2125,14 @@
"tslib": "^2.3.0" "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": { "local-pkg": {
"version": "0.5.0", "version": "0.5.0",
"resolved": "https://registry.npmmirror.com/local-pkg/-/local-pkg-0.5.0.tgz", "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": { "memoize-one": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-6.0.0.tgz", "resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-6.0.0.tgz",
@ -2335,6 +2416,19 @@
"integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",
"dev": true "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": { "node-fetch-native": {
"version": "1.6.4", "version": "1.6.4",
"resolved": "https://registry.npmmirror.com/node-fetch-native/-/node-fetch-native-1.6.4.tgz", "resolved": "https://registry.npmmirror.com/node-fetch-native/-/node-fetch-native-1.6.4.tgz",
@ -2418,6 +2512,35 @@
"mimic-fn": "^4.0.0" "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": { "pako": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmmirror.com/pako/-/pako-2.1.0.tgz", "resolved": "https://registry.npmmirror.com/pako/-/pako-2.1.0.tgz",
@ -2540,6 +2663,11 @@
"dev": true, "dev": true,
"optional": 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": { "querystring": {
"version": "0.2.1", "version": "0.2.1",
"resolved": "https://registry.npmmirror.com/querystring/-/querystring-0.2.1.tgz", "resolved": "https://registry.npmmirror.com/querystring/-/querystring-0.2.1.tgz",
@ -2796,6 +2924,11 @@
"is-number": "^7.0.0" "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": { "tslib": {
"version": "2.8.1", "version": "2.8.1",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz", "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz",
@ -2813,6 +2946,11 @@
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
"dev": true "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": { "ufo": {
"version": "1.5.4", "version": "1.5.4",
"resolved": "https://registry.npmmirror.com/ufo/-/ufo-1.5.4.tgz", "resolved": "https://registry.npmmirror.com/ufo/-/ufo-1.5.4.tgz",
@ -2847,8 +2985,7 @@
"undici-types": { "undici-types": {
"version": "6.19.8", "version": "6.19.8",
"resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.19.8.tgz", "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="
"dev": true
}, },
"unicorn-magic": { "unicorn-magic": {
"version": "0.1.0", "version": "0.1.0",
@ -3010,11 +3147,30 @@
"semver": "^7.5.4" "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": { "webpack-virtual-modules": {
"version": "0.6.2", "version": "0.6.2",
"resolved": "https://registry.npmmirror.com/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", "resolved": "https://registry.npmmirror.com/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz",
"integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==" "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": { "which": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmmirror.com/which/-/which-3.0.1.tgz", "resolved": "https://registry.npmmirror.com/which/-/which-3.0.1.tgz",

View File

@ -18,7 +18,9 @@
"compressorjs": "^1.2.1", "compressorjs": "^1.2.1",
"dayjs": "^1.11.13", "dayjs": "^1.11.13",
"element-plus": "^2.9.0", "element-plus": "^2.9.0",
"markdown-it": "^14.1.0",
"mitt": "^3.0.1", "mitt": "^3.0.1",
"openai": "^4.89.0",
"pinia": "^2.0.35", "pinia": "^2.0.35",
"pinia-plugin-persistedstate": "^4.1.2", "pinia-plugin-persistedstate": "^4.1.2",
"querystring": "^0.2.1", "querystring": "^0.2.1",

View File

@ -4,11 +4,11 @@ import router from '../router'
const myAxios = axios.create({ const myAxios = axios.create({
withCredentials:true, withCredentials:true,
// baseURL: 'http://localhost:9092/api' baseURL: 'http://localhost:9092/api'
// baseURL: 'http://123.249.108.160:8888/api' //测试服务器 // baseURL: 'http://123.249.108.160:8888/api' //测试服务器
// baseURL: 'http://154.8.193.216:9092/api', //隋雨霏服务器 // baseURL: 'http://154.8.193.216:9092/api', //隋雨霏服务器
// baseURL: 'http://154.8.193.216:9093/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) { axios.interceptors.request.use(function (config) {

View File

@ -3,13 +3,14 @@
<el-menu <el-menu
background-color="rgb(170, 113, 81)" background-color="rgb(170, 113, 81)"
:collapse="isCollapse" :collapse="isCollapse"
:collapse-transition="false" collapse-transition
text-color="#fff" text-color="#fff"
router router
:default-active="currentRoute" :default-active="currentRoute"
active-text-color="#ffd04b" active-text-color="#ffd04b"
unique-opened 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; <div style="height: 80px; color: white; font-weight: bold;
display: flex; align-items: center; justify-content: center"> display: flex; align-items: center; justify-content: center">
@ -129,7 +130,7 @@ const currentRoute = router.currentRoute.value.fullPath //当前路由信息
// console.log('router--->',router.options.routes); // console.log('router--->',router.options.routes);
onMounted(()=>{ 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 ) { if (route.meta?.hidden ) {
console.log('11',route.children); // console.log('11',route.children);
return []; return [];
} }
return route; return route;
@ -190,4 +191,7 @@ const menuRoutes = computed(() => {
</script> </script>
<style scoped> <style scoped>
.no-active {
color: #ffffff;
}
</style> </style>

View File

@ -2,7 +2,7 @@
<el-breadcrumb :separator-icon="ArrowRight" class="bread"> <el-breadcrumb :separator-icon="ArrowRight" class="bread">
<el-breadcrumb-item v-for="(item,index) in routers" :key="item.path" :to="item.path"> <el-breadcrumb-item v-for="(item,index) in routers" :key="item.path" :to="item.path">
<!-- {{ item?.meta?.title }} --> <!-- {{ 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 }} {{ item.meta.title }}
</span> </span>
<!-- 如果没有重定向使用 router-link 来跳转到对应路径 --> <!-- 如果没有重定向使用 router-link 来跳转到对应路径 -->

View File

@ -1,4 +1,4 @@
//上传链接 //上传链接
// export const uploadUrl : string = 'http://localhost:9092/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 uploadUrl : string= 'https://www.carboner.cn:8888/api/file/uploadFile'
export const downloadUrl : string = 'https://www.carboner.cn:8888/api/file/downloadFile?objectKey=' export const downloadUrl : string = 'https://www.carboner.cn:8888/api/file/downloadFile?objectKey='

View File

@ -45,7 +45,7 @@ const compressImage =(file: any)=> { //图片压缩方法
new Compressor(file.file, { new Compressor(file.file, {
quality: 0.2, // quality: 0.2, //
success(result) { success(result) {
console.log('res--->',result) // console.log('res--->',result)
// //
const compressedFile = new File([result], file.file.name, { type: result.type }); const compressedFile = new File([result], file.file.name, { type: result.type });
// //

View File

@ -57,7 +57,7 @@ const compressImage =(file: any)=> { //图片压缩方法
new Compressor(file.file, { new Compressor(file.file, {
quality: 0.2, // quality: 0.2, //
success(result) { success(result) {
console.log('res--->',result) // console.log('res--->',result)
// //
const compressedFile = new File([result], file.file.name, { type: result.type }); const compressedFile = new File([result], file.file.name, { type: result.type });
// //

View File

@ -148,6 +148,7 @@ const onSubmit = async () => {
festivalName: form.value.festivalName, festivalName: form.value.festivalName,
label: form.value.label label: form.value.label
}) })
// console.log('---->',res.data)
if (res.data.code === 1) { if (res.data.code === 1) {
SuccessInfo('提交成功') SuccessInfo('提交成功')
form.value = {} //12.18 form.value = {} //12.18
@ -179,6 +180,7 @@ const addLabel = () => { //添加商品标签按钮的方法
if (labelList.value.length < 4) { if (labelList.value.length < 4) {
labelList.value.push('') labelList.value.push('')
} }
addLabelList()
} }
const deleteLabel = () => { // const deleteLabel = () => { //

View File

@ -66,10 +66,10 @@
发货 发货
</el-button> </el-button>
<el-popconfirm confirm-button-text='' cancel-button-text='' icon="InfoFilled" icon-color="red" <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> <template #reference>
<el-button v-if="['待收货'].includes(scope.row.orderStatus)" size="small" type="success" <el-button v-if="['待收货'].includes(scope.row.orderStatus)" size="small" type="success"
plain>交易</el-button> plain>交易</el-button>
</template> </template>
</el-popconfirm> </el-popconfirm>
<el-popconfirm confirm-button-text='确定' cancel-button-text='取消' icon="InfoFilled" icon-color="red" <el-popconfirm confirm-button-text='确定' cancel-button-text='取消' icon="InfoFilled" icon-color="red"

View File

@ -62,7 +62,7 @@
</template> </template>
</el-popconfirm> </el-popconfirm>
<el-popconfirm confirm-button-text='' cancel-button-text='' icon="InfoFilled" icon-color="red" <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> <template #reference>
<el-button v-if="['待收货'].includes(scope.row.orderStatus)" size="small" type="primary" <el-button v-if="['待收货'].includes(scope.row.orderStatus)" size="small" type="primary"
plain>完成订单</el-button> plain>完成订单</el-button>

View File

@ -56,7 +56,7 @@
</template> </template>
</el-popconfirm> </el-popconfirm>
<el-popconfirm confirm-button-text='' cancel-button-text='' icon="InfoFilled" icon-color="red" <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> <template #reference>
<el-button size="small" type="primary" plain>租赁完成</el-button> <el-button size="small" type="primary" plain>租赁完成</el-button>
</template> </template>

View File

@ -1,94 +1,88 @@
<template> <template>
<el-upload <div style="display: flex">
v-model:file-list="ImgList" <el-input v-model="message[0].content" style="width: 240px" placeholder="Please input" /><el-button type="primary" @click="main()">启动</el-button>
:action="uploadUrl" <div class="box1" v-html="markdown.render(reasoning_content)"></div>
list-type="picture-card" <div class="box" v-html="markdown.render(content)"></div>
:http-request="customUpload"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:on-exceed="ExceedImg"
limit="7"
v-loading="loading"
>
<el-icon><Plus /></el-icon>
</el-upload>
<el-dialog v-model="dialogVisible"> </div>
<el-image :src="dialogImageUrl"/>
</el-dialog>
<el-button type="primary" @click="submitForm">看看删除后的图片</el-button>
</template> </template>
<script lang="ts" setup> <script setup>
import myAxios from '@/api/myAxios' import OpenAI from "openai";
import { ref, onMounted } from 'vue' import {onMounted, ref} from "vue";
import { Plus } from '@element-plus/icons-vue' import MarkdownIt from "markdown-it";
import type { UploadProps, UploadUserFile } from 'element-plus' import myAxios from "@/api/myAxios";
import { uploadUrl, downloadUrl } from '@/utils/formatImgUpload'
import { WarnInfo } from "@/utils/messageInfo";
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(()=>{ onMounted(()=>{
getProductInfo() // console.log(123123)
// main()
getTotalProduct()
}) })
const getProductInfo = async () => { const message = ref([
const res = await myAxios.post('/goods/getById',{id: 498}) {
console.log('图片信息--->',res.data.data.goodImg) role: "user",
goodImgArr.value = res.data.data.goodImg.split(';') content: ""
console.log('图片数组---->',goodImgArr.value)
goodImgArr.value.forEach(item => { //
ImgList.value.push({
url: downloadUrl + item
})
})
}
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)
if(res.data.code === 1) {
goodImgArr.value.push(res.data.data)
loading.value = false
} }
])
const getTotalProduct = async ()=> {
const res = await myAxios.get('/global/getAllGoods')
if(res.data.code === 1) {
// 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))
} }
</script>
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>