修改轮播图无限制访问接口的bug
This commit is contained in:
parent
ba45ca26bb
commit
fe816585f0
@ -2,7 +2,7 @@ ENV = 'development'
|
|||||||
VITE_CLI_PORT = 8088
|
VITE_CLI_PORT = 8088
|
||||||
VITE_SERVER_PORT = 8888
|
VITE_SERVER_PORT = 8888
|
||||||
VITE_BASE_API = /api
|
VITE_BASE_API = /api
|
||||||
VITE_BASE_PATH = http://e07b2b5.r9.cpolar.top
|
VITE_BASE_PATH = https://api.jimingyiliao.com/
|
||||||
VITE_EDITOR = vscode
|
VITE_EDITOR = vscode
|
||||||
// VITE_EDITOR = webstorm 如果使用webstorm开发且要使用dom定位到代码行功能 请先自定添加 webstorm到环境变量 再将VITE_EDITOR值修改为webstorm
|
// VITE_EDITOR = webstorm 如果使用webstorm开发且要使用dom定位到代码行功能 请先自定添加 webstorm到环境变量 再将VITE_EDITOR值修改为webstorm
|
||||||
// 如果使用docker-compose开发模式,设置为下面的地址或本机主机IP
|
// 如果使用docker-compose开发模式,设置为下面的地址或本机主机IP
|
||||||
|
@ -175,9 +175,27 @@ function handleSizeChange(val) {
|
|||||||
getLbtList()
|
getLbtList()
|
||||||
}
|
}
|
||||||
const state_loading = ref(false)
|
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
|
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
|
state_loading.value = false
|
||||||
// eslint-disable-next-line no-empty
|
// eslint-disable-next-line no-empty
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
@ -222,7 +240,7 @@ async function changeStateFunc(row) { // 改变状态
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="left" label="是否启用" min-width="150" prop="status">
|
<el-table-column align="left" label="是否启用" min-width="150" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-switch v-model="scope.row.status" :active-value="1" :loadiing="state_loading" :inactive-value="2" active-text="启用" inactive-text="禁用" :before-change="changeStateFunc(scope.row)" />
|
<el-switch v-model="scope.row.status" :active-value="1" :loading="state_loading" :inactive-value="2" active-text="启用" inactive-text="禁用" :before-change="()=>{return beforeChangeFunc($event, scope.row)}" @change="changeStateFunc($event,scope.row)" />
|
||||||
<!-- {{ scope.row.status == '1'?'启用':'禁用' }} -->
|
<!-- {{ scope.row.status == '1'?'启用':'禁用' }} -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
Loading…
Reference in New Issue
Block a user