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 - + + +