diff --git a/src/router/index.js b/src/router/index.js
index 4df08f9..89568c3 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -42,7 +42,20 @@ const routes = [
},
]
}
-
+ ,
+ {
+ path: '/opentime',
+ name: 'Opentime',
+ redirect: '/opentime/index',
+ component: layout,
+ meta: { title: '修改开服时间', icon: 'mdi-protocol' },
+ children: [
+ {
+ path: 'index',
+ component: () => import('@/views/opentime/Index.vue'),
+ },
+ ]
+ }
]
diff --git a/src/utils/upload.js b/src/utils/upload.js
index 48ccb1c..ea4e522 100644
--- a/src/utils/upload.js
+++ b/src/utils/upload.js
@@ -29,10 +29,15 @@ export function uploadformData (url, formData, progress) {
onUploadProgress: (evt) => {
if (evt.lengthComputable) {
var percent = Math.round(evt.loaded * 100 / evt.total);
- progress(percent)
+ if (progress != null) {
+ progress(percent)
+ }
+
}
else {
- progress(100)
+ if (progress != null) {
+ progress(100)
+ }
}
}
}).then(response => {
diff --git a/src/views/opentime/Index.vue b/src/views/opentime/Index.vue
new file mode 100644
index 0000000..56a3fec
--- /dev/null
+++ b/src/views/opentime/Index.vue
@@ -0,0 +1,119 @@
+
+
+
+
+ 开服时间设置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+
+
+
+
+
+ {{ errstr }}
+
+
+ Close
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/vue.config.js b/vue.config.js
index cf585c0..39d9698 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -9,8 +9,8 @@ module.exports = defineConfig({
},
devServer: {
+ port: 8848,
open: true,
-
proxy: {
'/api': {
target: 'http://127.0.0.1:8000',//要代理的本地api地址,也可以换成线上测试地址
@@ -21,6 +21,16 @@ module.exports = defineConfig({
target: 'http://127.0.0.1:8000',//要代理的本地api地址,也可以换成线上测试地址
changeOrigin: true,//允许跨域
pathRewrite: { "^/upload": "/upload" }//将/api开头替换为/api
+ },
+ '/getopentime': {
+ target: 'http://127.0.0.1:8000',//要代理的本地api地址,也可以换成线上测试地址
+ changeOrigin: true,//允许跨域
+ pathRewrite: { "^/getopentime": "/getopentime" }//将/api开头替换为/api
+ },
+ '/modifyopentime': {
+ target: 'http://127.0.0.1:8000',//要代理的本地api地址,也可以换成线上测试地址
+ changeOrigin: true,//允许跨域
+ pathRewrite: { "^/modifyopentime": "/modifyopentime" }//将/api开头替换为/api
}
}
},