Merge branch 'dev_vite' of http://18.167.251.121:10003/aidlab/aida_front into dev_vite
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<div class="operate-menu flex">
|
||||
<div class="menu-btn flex align-center save" @click="handleClickMenu('draft')">
|
||||
<span>{{ $t("SellerListEdit.saveDraft") }}</span>
|
||||
<SvgIcon name="CSave" size="16" />
|
||||
<SvgIcon name="CSave" size="16" />
|
||||
</div>
|
||||
<div
|
||||
class="menu-btn flex align-center publish"
|
||||
@@ -83,6 +83,8 @@
|
||||
import ProductImageList from "./components/ProductImageList.vue"
|
||||
import TopImageSection from "./components/TopImageSection.vue"
|
||||
import { useStore } from "vuex"
|
||||
import { debounce } from "lodash-es"
|
||||
|
||||
import {
|
||||
fetchSketchDetail,
|
||||
uploadFile,
|
||||
@@ -594,15 +596,16 @@
|
||||
})
|
||||
await fetchUpdateListing(paramsList)
|
||||
}
|
||||
const handleClickMenu = async (status: StatusType) => {
|
||||
const handleClickMenu = debounce(async (status: StatusType) => {
|
||||
// async (status: StatusType) => {
|
||||
if (!validatePublishRequired()) return
|
||||
|
||||
await handleSaveForm(status)
|
||||
|
||||
|
||||
// 从 sessionStorage 获取参数
|
||||
const paramsStr = sessionStorage.getItem('listingEditParams')
|
||||
const paramsStr = sessionStorage.getItem("listingEditParams")
|
||||
const params = paramsStr ? JSON.parse(paramsStr) : {}
|
||||
|
||||
|
||||
if (status === "draft") {
|
||||
ROUTER.push({
|
||||
name: "Status",
|
||||
@@ -622,7 +625,8 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
// }
|
||||
}, 1000)
|
||||
|
||||
const handleFetchItemDetial = (list) => {
|
||||
fetchSketchDetail(list).then((res: SketchDetailResponse[]) => {
|
||||
@@ -664,9 +668,9 @@
|
||||
resetScrollPositions()
|
||||
|
||||
// 从 sessionStorage 获取参数
|
||||
const paramsStr = sessionStorage.getItem('listingEditParams')
|
||||
const paramsStr = sessionStorage.getItem("listingEditParams")
|
||||
const data = paramsStr ? JSON.parse(paramsStr) : {}
|
||||
|
||||
|
||||
if (data?.type === "edit") {
|
||||
itemId.value = data?.id
|
||||
handleGetDetailById()
|
||||
@@ -683,7 +687,6 @@
|
||||
// console.log("list", list.length, list)
|
||||
handleFetchItemDetial(list)
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user