From c5fb597626194cb7de9e1526a267809d563f009f Mon Sep 17 00:00:00 2001 From: axlrose2333 <690927457@qq.com> Date: Fri, 3 Feb 2023 17:09:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BD=AE=E6=92=AD=E5=9B=BE?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=EF=BC=9B?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=88=86=E7=B1=BBleve=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E4=B8=8D=E5=87=86=E7=A1=AE=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 2 +- .gitignore | 1 + src/utils/index.js | 8 ++++---- src/view/course/courseCategory/index.vue | 10 +++------- src/view/lbtManage/index.vue | 17 +++++++++++++---- 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.env.production b/.env.production index 2e3d72d..696385f 100644 --- a/.env.production +++ b/.env.production @@ -4,4 +4,4 @@ VITE_CLI_PORT = 8080 VITE_SERVER_PORT = 8888 VITE_BASE_API = /api #下方修改为你的线上ip -VITE_BASE_PATH = https://demo.gin-vue-admin.com +VITE_BASE_PATH = http://118.31.78.83 diff --git a/.gitignore b/.gitignore index 3bec83e..77e290d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ docs/_book test/ node_modules +dist diff --git a/src/utils/index.js b/src/utils/index.js index 789dfe3..788c509 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -14,9 +14,7 @@ export function parseTime(time, cFormat) { if (arguments.length === 0) { return null } - if (time_str.indexOf('01-01-01') > -1) { - return '-' - } + const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}' let date if (typeof time === 'object') { @@ -45,7 +43,9 @@ export function parseTime(time, cFormat) { if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] } return value.toString().padStart(2, '0') }) - + if (time_str.indexOf('01-01-01') > -1) { + return '-' + } return time_str } diff --git a/src/view/course/courseCategory/index.vue b/src/view/course/courseCategory/index.vue index ef4c4be..e874350 100644 --- a/src/view/course/courseCategory/index.vue +++ b/src/view/course/courseCategory/index.vue @@ -41,7 +41,7 @@ onMounted(() => { async function getSubjectList() { const res = await api.getSubjectList(queryParams.value) subjectList.value = res.data.records - if(res.code == 0) { + if(res.code === 0) { subjectList.value = res.data.records total.value = res.data.total subjectList.value = addTreeFormatSubject(subjectList.value) @@ -52,7 +52,7 @@ function addTreeFormatSubject(data) { data.map( item => { item.label = item.name item.value = item.id - if(item.level == 3) { + if(item.level === 3) { item.disabled = true } if(item.children) { @@ -80,14 +80,12 @@ const handleSelectionChange = (val) => { apis.value = val } function editApiFunc(row) { - // console.log(row) for(let prop in form.value) { if(row[prop]){ form.value[prop] = row[prop] } } form.value.id = row.id - // console.log(form.value) // return openDialog('edit') } @@ -149,7 +147,7 @@ function findLevel(data,val){ let l_id = 0 for(let i =0;i - + + +