diff --git a/.env.development b/.env.development index 09a2b67..15aa236 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ ENV = 'development' VITE_CLI_PORT = 8088 VITE_SERVER_PORT = 8888 VITE_BASE_API = /api -VITE_BASE_PATH = http://e07b2b5.r9.cpolar.top +VITE_BASE_PATH = https://api.jimingyiliao.com/ VITE_EDITOR = vscode // VITE_EDITOR = webstorm 如果使用webstorm开发且要使用dom定位到代码行功能 请先自定添加 webstorm到环境变量 再将VITE_EDITOR值修改为webstorm // 如果使用docker-compose开发模式,设置为下面的地址或本机主机IP diff --git a/src/view/lbtManage/index.vue b/src/view/lbtManage/index.vue index b9298ce..1242e2c 100644 --- a/src/view/lbtManage/index.vue +++ b/src/view/lbtManage/index.vue @@ -175,9 +175,27 @@ function handleSizeChange(val) { getLbtList() } const state_loading = ref(false) -async function changeStateFunc(row) { // 改变状态 +async function changeStateFunc(event, row) { // 改变状态 + // console.log('changeStateFunc is ====', row, event) + // state_loading.value = true + // const res = await api.editLbtState({ status: row.status }) + // state_loading.value = false + // // eslint-disable-next-line no-empty + // if (res.code === 0) { + // ElMessage({ + // type: 'success', + // message: '修改成功!' + // }) + // return true + // } else { + // return false + // } +} +async function beforeChangeFunc(index, row) { + // console.log(row, index) + // return false state_loading.value = true - const res = await api.editLbtState({ status: row.status }) + const res = await api.editLbtState({ ID: row.ID, status: row.status == 1 ? 2 : 1 }) state_loading.value = false // eslint-disable-next-line no-empty if (res.code === 0) { @@ -222,7 +240,7 @@ async function changeStateFunc(row) { // 改变状态