3 Commits

Author SHA1 Message Date
chenzhen 86ea21b18b 可以进行测试 2 months ago
chenzhen 2c4ef4ccc0 删除了错误的wrongquestion.vue 2 months ago
chenzhen ddd77ccefb 跨域 2 months ago
  1. 6
      src/views/HomeView.vue
  2. 830
      src/views/TextView.vue
  3. 30
      vue.config.js

6
src/views/HomeView.vue

@ -21,9 +21,9 @@ export default {
// jwcode:90098889,// // jwcode:90098889,//
// jwcode:90098890,// // jwcode:90098890,//
// jwcode:90098891,// // jwcode:90098891,//
jwcode:90098892,//
// jwcode:90098892,//
// jwcode:90098893,// // jwcode:90098893,//
// jwcode:90098894,//
jwcode:90098894,//
}; };
localStorage.setItem('submissionData', JSON.stringify(submissionData)); localStorage.setItem('submissionData', JSON.stringify(submissionData));
console.log('存储的数据:', localStorage.getItem('submissionData')); console.log('存储的数据:', localStorage.getItem('submissionData'));
@ -65,7 +65,7 @@ export default {
} }
.image { .image {
position: absolute;
position: fixed;
width: 200px; width: 200px;
min-height: 160px; min-height: 160px;
max-height: 160px; max-height: 160px;

830
src/views/TextView.vue
File diff suppressed because it is too large
View File

30
vue.config.js

@ -1,4 +1,32 @@
// const { defineConfig } = require('@vue/cli-service')
// module.exports = defineConfig({
// transpileDependencies: true
// })
const { defineConfig } = require('@vue/cli-service') const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({ module.exports = defineConfig({
transpileDependencies: true
devServer: {
proxy: {
// 代理所有以 /api 开头的请求
'/api': {
target: 'http://192.168.40.48:8081', // 你的后端地址
changeOrigin: true, // 允许跨域
pathRewrite: {
'^/api': '' // 重写路径,去掉 /api 前缀
},
secure: false, // 如果是https接口,需要配置这个参数
logLevel: 'debug' // 查看代理日志
},
// 可以配置多个代理
'/upload': {
target: 'http://localhost:3000',
changeOrigin: true
}
},
// 允许外部访问
host: '0.0.0.0',
port: 8080
}
}) })
Loading…
Cancel
Save