diff --git a/answer/package-lock.json b/answer/package-lock.json index 4534fa2b27cee8b9d3e6211f2d7101b1a89dad54..3eaffff5632a76affede573a6bee1357e4f0989c 100644 --- a/answer/package-lock.json +++ b/answer/package-lock.json @@ -1642,9 +1642,9 @@ "dev": true }, "node_modules/element-plus": { - "version": "2.4.4", - "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.4.4.tgz", - "integrity": "sha512-TlKubXJgxwhER0dw+8ULn9hr9kZjraV4R6Q/eidwWUwCKxwXYPBGmMKsZ/85tlxlhMYbcLZd/YZh6G3QkHX4fg==", + "version": "2.5.0", + "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.5.0.tgz", + "integrity": "sha512-NE58a5Exf0/vxgxRRR2Ibs7AjiqB72lMrg7plmSoZwgZy17IQAWgzOe7ZyRtEQM/3q3BAuJDTUUAuhP/mKVPKg==", "dependencies": { "@ctrl/tinycolor": "^3.4.1", "@element-plus/icons-vue": "^2.3.1", diff --git a/answer/src/stores/counter.js b/answer/src/stores/counter.js index a8731400e41c6e3a6d9fcf5a6b01163efe87d12f..909630375c1d2111cc8cbfdec264148c7e967f92 100644 --- a/answer/src/stores/counter.js +++ b/answer/src/stores/counter.js @@ -1,11 +1,15 @@ import { ref, computed } from "vue"; import { defineStore } from "pinia"; -export const useCounterStore = defineStore("counter", { + const useCounterStore = defineStore("counter", { state: () => ({ - count: 0, + count: 1, + + arr:[1,2,3,4,5] }), - getters: {}, + getters: { + // 计算属性 + }, actions: { addNum() { this.count++; @@ -13,3 +17,4 @@ export const useCounterStore = defineStore("counter", { }, persist: true, }); +export default useCounterStore; diff --git a/answer/src/views/ch/index.vue b/answer/src/views/ch/index.vue index 06188e906e136ac4775d415bf8e40c761c16e6c6..bd0be26921abdc98dcabe468d9bc8c1898599b68 100644 --- a/answer/src/views/ch/index.vue +++ b/answer/src/views/ch/index.vue @@ -1,13 +1,148 @@ - \ No newline at end of file +.con2_2::-webkit-scrollbar { + width: 0px; +} +.con2_2:hover::-webkit-scrollbar { + width: 2px; +} +.con2_2:hover::-webkit-scrollbar-thumb { + background-color: rgba(0, 0, 0, 0.5); +} +.con2_2::-webkit-scrollbar-thumb { + background: red; +} +.con { + overflow: none; +} + diff --git a/answer/src/views/ch/ti.vue b/answer/src/views/ch/ti.vue new file mode 100644 index 0000000000000000000000000000000000000000..e778fb85e76c9b2865c2081bb5d3265601cdc036 --- /dev/null +++ b/answer/src/views/ch/ti.vue @@ -0,0 +1,22 @@ + + \ No newline at end of file diff --git a/answer/vite.config.js b/answer/vite.config.js index 8ba71da5ac4e68ca45955a6474f9e7d77be5ce97..6ce32b7b28ffa7e3e15ac2bf72b64566043912f9 100644 --- a/answer/vite.config.js +++ b/answer/vite.config.js @@ -4,6 +4,7 @@ import Components from 'unplugin-vue-components/vite' import { ElementPlusResolver } from 'unplugin-vue-components/resolvers' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' + import vueJsx from '@vitejs/plugin-vue-jsx' //pc适配 import postCssPxToRem from "postcss-pxtorem" diff --git a/answer/yarn.lock b/answer/yarn.lock index 2842fbbe6f5e0cbf25180e36b48460c7b2264d42..699a4844c5ad02b3eae19704e22032bf81d36309 100644 --- a/answer/yarn.lock +++ b/answer/yarn.lock @@ -21,7 +21,7 @@ integrity sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA== dependencies: "@babel/highlight" "^7.23.4" - chalk "^2.4.2" + "chalk" "^2.4.2" "@babel/compat-data@^7.22.9": version "7.23.5" @@ -57,7 +57,7 @@ "@babel/types" "^7.23.5" "@jridgewell/gen-mapping" "^0.3.2" "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" + "jsesc" "^2.5.1" "@babel/helper-annotate-as-pure@^7.22.5": version "7.22.5" @@ -90,7 +90,7 @@ "@babel/helper-replace-supers" "^7.22.20" "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" "@babel/helper-split-export-declaration" "^7.22.6" - semver "^6.3.1" + "semver" "^6.3.1" "@babel/helper-environment-visitor@^7.22.20": version "7.22.20" @@ -209,8 +209,8 @@ integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== dependencies: "@babel/helper-validator-identifier" "^7.22.20" - chalk "^2.4.2" - js-tokens "^4.0.0" + "chalk" "^2.4.2" + "js-tokens" "^4.0.0" "@babel/parser@^7.15.8", "@babel/parser@^7.22.15", "@babel/parser@^7.23.5": version "7.23.5" @@ -273,7 +273,7 @@ dependencies: "@babel/helper-string-parser" "^7.23.4" "@babel/helper-validator-identifier" "^7.22.20" - to-fast-properties "^2.0.0" + "to-fast-properties" "^2.0.0" "@ctrl/tinycolor@^3.4.1": version "3.6.1" @@ -348,7 +348,7 @@ integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== dependencies: "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" + "run-parallel" "^1.1.9" "@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": version "2.0.5" @@ -361,7 +361,7 @@ integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== dependencies: "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" + "fastq" "^1.6.0" "@popperjs/core@npm:@sxzz/popperjs-es@^2.11.7": version "2.11.7" @@ -556,7 +556,7 @@ "@types/web-bluetooth" "^0.0.16" "@vueuse/metadata" "9.13.0" "@vueuse/shared" "9.13.0" - vue-demi "*" + "vue-demi" "*" "@vueuse/metadata@9.13.0": version "9.13.0" @@ -675,14 +675,14 @@ chokidar@^3.5.3: normalize-path "~3.0.0" readdirp "~3.6.0" optionalDependencies: - fsevents "~2.3.2" + "fsevents" "~2.3.2" color-convert@^1.9.0: version "1.9.3" resolved "https://registry.npmmirror.com/color-convert/-/color-convert-1.9.3.tgz" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: - color-name "1.1.3" + "color-name" "1.1.3" color-name@1.1.3: version "1.1.3" @@ -694,7 +694,7 @@ combined-stream@^1.0.8: resolved "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: - delayed-stream "~1.0.0" + "delayed-stream" "~1.0.0" convert-source-map@^2.0.0: version "2.0.0" @@ -716,7 +716,7 @@ debug@^4.1.0, debug@^4.3.4: resolved "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: - ms "2.1.2" + "ms" "2.1.2" delayed-stream@~1.0.0: version "1.0.0" @@ -1298,11 +1298,16 @@ vant@^4.8.0: resolved "https://registry.npmmirror.com/vite/-/vite-5.0.6.tgz" integrity sha512-MD3joyAEBtV7QZPl2JVVUai6zHms3YOmLR+BpMzLlX2Yzjfcc4gTgNi09d/Rua3F4EtC8zdwPU8eQYyib4vVMQ== dependencies: - esbuild "^0.19.3" - postcss "^8.4.32" - rollup "^4.2.0" + "esbuild" "^0.19.3" + "postcss" "^8.4.32" + "rollup" "^4.2.0" optionalDependencies: - fsevents "~2.3.3" + "fsevents" "~2.3.3" + +"vue-demi@*": + "integrity" "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==" + "resolved" "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.6.tgz" + "version" "0.14.6" vue-demi@*: version "0.14.6" diff --git a/node/app.js b/node/app.js index 64f30f851286b8f0292459f12180c2c61908224e..e805684837ed1864de2ce9fa026a11ba0f312c00 100644 --- a/node/app.js +++ b/node/app.js @@ -5,11 +5,14 @@ var cookieParser = require('cookie-parser'); var logger = require('morgan'); var indexRouter = require('./routes/wcx'); -var usersRouter = require('./routes/users'); + +var indexRouterch = require('./routes/ch.js'); + var cors=require('cors'); var app = express(); app.use('/upload',express.static('upload')) app.use(cors()); + // view engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); @@ -21,8 +24,8 @@ app.use(cookieParser()); app.use(express.static(path.join(__dirname, 'public'))); app.use('/', indexRouter); -app.use('/users', usersRouter); - +// app.use('/users', usersRouter); +app.use('/ch',indexRouterch) // catch 404 and forward to error handler app.use(function(req, res, next) { next(createError(404)); diff --git a/node/node_modules/tr46/index.js b/node/node_modules/tr46/index.js index 7ce053272432cb2a932079c196782432fd74b780..f6ca73f7e7158e8a40e1dc5de2a2fb0b50322a7e 100644 --- a/node/node_modules/tr46/index.js +++ b/node/node_modules/tr46/index.js @@ -1,6 +1,6 @@ "use strict"; -const punycode = require("punycode"); +const punycode = require("punycode/"); const regexes = require("./lib/regexes.js"); const mappingTable = require("./lib/mappingTable.json"); const { STATUS_MAPPING } = require("./lib/statusMapping.js"); diff --git a/node/routes/ch.js b/node/routes/ch.js index 25269f69803a7dedc05037776c00377e161d3e05..da0799527b2c234620e443eae6e6422e7363fee0 100644 --- a/node/routes/ch.js +++ b/node/routes/ch.js @@ -1,9 +1,13 @@ var express = require('express'); var router = express.Router(); -let { }=require('../model/model/kjq.js') +let {qestionsModel,quebankModel }=require('../model/model/kjq.js') /* GET home page. */ -router.get('/', function(req, res, next) { - res.render('index', { title: 'Express' }); -}); +router.get('/test', async(req,res)=>{ + let bank=await quebankModel.find() + // const a=bank[Math.floor(Math.random()*bank.length)] + let data=await qestionsModel.find({qid:'659cb405c9d3506fc6bc9d6e'}).populate('qtype').populate('qid') + + res.send({data}) +}) module.exports = router;