diff --git a/seller/src/App.vue b/seller/src/App.vue
index 56c6fe7e5..52a8915b8 100644
--- a/seller/src/App.vue
+++ b/seller/src/App.vue
@@ -22,7 +22,6 @@ onMounted(() => {
util.bootstrapDynamicRoutesFromCache();
util.initRouter();
appStore.setOpenedList();
- appStore.initCachepage();
if (!localStorage.getItem("category")) {
getCategoryTree()
.then((res) => {
diff --git a/seller/src/libs/util.js b/seller/src/libs/util.js
index 67f7a4f0d..98d757135 100644
--- a/seller/src/libs/util.js
+++ b/seller/src/libs/util.js
@@ -313,7 +313,6 @@ util.setCurrentPath = function (name) {
];
}
}
- appStore.setCurrentPath(currentPathArr);
return currentPathArr;
};
@@ -351,7 +350,6 @@ util.openNewPage = function (name, argu, query) {
appStore.increateTag(tag);
}
}
- appStore.setCurrentPageName(name);
};
util.toDefaultPage = function (routers, name, route, next) {
@@ -451,16 +449,8 @@ util.initMenuData = function (data) {
}
appStore.setNavList(navList);
let currNav = window.localStorage.getItem("currNav");
- if (currNav) {
- for (let item of navList) {
- if (item.name == currNav) {
- appStore.setCurrNavTitle(item.title);
- break;
- }
- }
- } else {
+ if (!currNav) {
currNav = HOME_NAV_NAME;
- appStore.setCurrNavTitle(HOME_NAV_ITEM.title);
}
appStore.setCurrNav(currNav);
diff --git a/seller/src/stores/app.js b/seller/src/stores/app.js
index 3cda0c3fa..054785eaa 100644
--- a/seller/src/stores/app.js
+++ b/seller/src/stores/app.js
@@ -13,13 +13,8 @@ export const useAppStore = defineStore("app", {
added: false,
navList: [],
currNav: "",
- currNavTitle: "",
- cachePage: [],
lang: "",
- isFullScreen: false,
openedSubmenuArr: [],
- menuTheme: "dark",
- themeColor: "",
storeOpenedList: [
{
title: "首页",
@@ -27,19 +22,9 @@ export const useAppStore = defineStore("app", {
name: "home_index",
},
],
- currentPageName: "",
- currentPath: [
- {
- title: "首页",
- path: "",
- name: "home_index",
- },
- ],
menuList: [],
routers: [otherRouter],
tagsList: [...otherRouter.children],
- messageCount: 0,
- dontCache: ["test", "test"],
refMenu: "",
}),
actions: {
@@ -62,9 +47,6 @@ export const useAppStore = defineStore("app", {
setCurrNav(v) {
this.currNav = v;
},
- setCurrNavTitle(v) {
- this.currNavTitle = v;
- },
setTagsList(list) {
this.tagsList.push(...list);
},
@@ -76,19 +58,6 @@ export const useAppStore = defineStore("app", {
this.openedSubmenuArr.push(name);
}
},
- closePage(name) {
- this.cachePage.forEach((item, index) => {
- if (item == name) {
- this.cachePage.splice(index, 1);
- }
- });
- localStorage.cachePage = JSON.stringify(this.cachePage);
- },
- initCachepage() {
- if (localStorage.cachePage) {
- this.cachePage = JSON.parse(localStorage.cachePage);
- }
- },
removeTag(name) {
this.storeOpenedList.map((item, index) => {
if (item.name == name) {
@@ -105,8 +74,6 @@ export const useAppStore = defineStore("app", {
},
clearAllTags() {
this.storeOpenedList.splice(1);
- this.cachePage.length = 0;
- localStorage.cachePage = "";
localStorage.storeOpenedList = JSON.stringify(this.storeOpenedList);
},
clearOtherTags(currentName) {
@@ -122,8 +89,6 @@ export const useAppStore = defineStore("app", {
this.storeOpenedList.splice(currentIndex + 1);
this.storeOpenedList.splice(1, currentIndex - 1);
}
- this.cachePage = this.cachePage.filter((item) => item == currentName);
- localStorage.cachePage = JSON.stringify(this.cachePage);
localStorage.storeOpenedList = JSON.stringify(this.storeOpenedList);
},
setOpenedList() {
@@ -131,12 +96,6 @@ export const useAppStore = defineStore("app", {
? JSON.parse(localStorage.storeOpenedList)
: [otherRouter.children[0]];
},
- setCurrentPath(pathArr) {
- this.currentPath = pathArr;
- },
- setCurrentPageName(name) {
- this.currentPageName = name;
- },
setAvatarPath(path) {
localStorage.avatorImgPath = path;
},
@@ -147,14 +106,7 @@ export const useAppStore = defineStore("app", {
clearOpenedSubmenu() {
this.openedSubmenuArr.length = 0;
},
- setMessageCount(count) {
- this.messageCount = count;
- },
increateTag(tagObj) {
- if (this.dontCache.indexOf(tagObj.name) < 0) {
- this.cachePage.push(tagObj.name);
- localStorage.cachePage = JSON.stringify(this.cachePage);
- }
this.storeOpenedList.push(tagObj);
localStorage.storeOpenedList = JSON.stringify(this.storeOpenedList);
},
diff --git a/seller/src/views/Main.vue b/seller/src/views/Main.vue
index f0d80136d..dd6cce6b0 100644
--- a/seller/src/views/Main.vue
+++ b/seller/src/views/Main.vue
@@ -93,7 +93,6 @@ import util from "@/libs/util.js";
import { logout } from "@/api/index";
import { getIMDetail } from "@/api/common";
import { userMsg } from "@/api/index";
-import config from "@/config/index.js";
import { Message } from "@/utils/message";
import { getStore, setStore } from "@/libs/storage";
import { useAppStore } from "@/stores/app";
@@ -199,13 +198,11 @@ function resize() {
watch(
() => route.name,
(name) => {
- appStore.setCurrentPageName(name);
const pathArr = util.setCurrentPath(name);
if (pathArr.length > 2) {
appStore.addOpenSubmenu(pathArr[1].name);
}
checkTag(name);
- localStorage.currentPageName = name;
}
);
diff --git a/seller/src/views/appointment/components/ServiceAreaFence.vue b/seller/src/views/appointment/components/ServiceAreaFence.vue
index f82aaf997..7982eac3e 100644
--- a/seller/src/views/appointment/components/ServiceAreaFence.vue
+++ b/seller/src/views/appointment/components/ServiceAreaFence.vue
@@ -73,7 +73,6 @@ let editor = null;
let polygon = null;
let suggestion = null;
let TMap = null;
-let geometryId = "";
let draftRing = [];
let clickRing = [];
let areas = [];
diff --git a/seller/src/views/goods/goods-seller/alertQuantity.vue b/seller/src/views/goods/goods-seller/alertQuantity.vue
index bba4e82dc..d29b9ffb1 100644
--- a/seller/src/views/goods/goods-seller/alertQuantity.vue
+++ b/seller/src/views/goods/goods-seller/alertQuantity.vue
@@ -221,7 +221,7 @@ async function exportStock() {
navigator.msSaveBlob(blob, randomNumber + ".xlsx");
}
})
- .catch((err) => console.log(err));
+ .catch(() => {});
}
function openImportStock() {
importModal.value = true;
diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue
index 2859d8ecb..73c060f6f 100644
--- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue
+++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue
@@ -745,8 +745,6 @@ const loadingVideo = ref(false);
const listImages = ref([]);
const newSkuValues = ref([]);
const contentImage = ref("");
-const previewImage = ref(''); // 预览图片地址
-const global = ref(0);
const accessToken = ref(""); //令牌token
const goodsParams = ref([]);
const categoryId = ref(""); // 商品分类第三级id
@@ -764,8 +762,6 @@ const previewGoodsPicture = ref("");
const visible = ref(false);
//展示商品图片
const goodsPictureVisible = ref(false);
-//展示sku图片
-const showSkuPicture = ref(false);
//选择的sku
const selectedSku = ref({});
@@ -809,47 +805,10 @@ const baseInfoForm = ref({
// 原 Options API 中直接挂在 this 上的非响应式字段
let goodsId;
let currentSkuItem = "";
-let form;
-let editTitle;
-let selectCount;
let scrollParent = null;
let _onPublishScroll;
let _scrollTick = false;
let _scrollClickTimer;
-let skuIndex;
-
-const wholesalePreviewColumns = [
- {
- title: "销售规则",
- width: 480,
- render: (h, params) => {
- let guide =
- "当商品购买数量 ≥" +
- params.row.num +
- " 时,售价为 ¥" +
- params.row.price +
- " /" +
- baseInfoForm.value.goodsUnit;
- return h("div", guide);
- },
- },
-];
-
-const wholesaleColumns = [
- {
- title: "购买数量",
- key: "num",
- align: "center",
- slot: "wholesaleNum",
- },
- {
- title: "商品单价",
- key: "price",
- align: "center",
- width: "280px",
- slot: "wholesalePrice",
- },
-];
const wholesaleData = ref([
{
@@ -890,7 +849,6 @@ const params_panel = ref([]);
/** 存储未通过校验的单元格位置 */
const validateError = ref([]);
const currentSkuVal = ref("");
-const skuInfoRules = ref({});
/** 品牌列表 */
const brandList = ref([]);
/** 店铺分类列表 */
@@ -1035,13 +993,6 @@ function changeSkuOpenImage() {
})
}
}
-// ship大小不正确
-function handleVideoMaxSize(file) {
- Notice.warning({
- title: "超过文件大小限制",
- desc: "视频大小不能超过10MB",
- });
-}
function parseOssSelectionUrl(item) {
if (!item) return "";
if (typeof item === "string") {
@@ -1108,22 +1059,6 @@ function refresh(v) {
getGoodsBrandList('localRefresh');
}
}
-function getImages(v) {
- previewImage.value = v;
- visible.value = true;
-}
-function mouseOver(v) {
- showContent.value = true
- listImages.value = v
- if (listImages.value.images.length <= 0) {
- contentImage.value = '规格专属图片暂无'
- } else {
- contentImage.value = '当前规格专属图片'
- }
-}
-function mouseLeave() {
- // showContent.value = false
-}
function getParamOptions(options) {
if (!options) return [];
return String(options)
@@ -1179,15 +1114,6 @@ function selectParams(params, value, paramsIndex) {
// 同步更新表单项的值
params.paramValue = value;
}
-// 编辑sku图片
-function editSkuPicture(row) {
- showContent.value = false
- if (row.images && row.images.length > 0) {
- previewPicture.value = row.images[0];
- }
- selectedSku.value = row;
- showSkuPicture.value = true;
-}
// 初始化视频操作
async function initVideo() {
if (baseInfoForm.value.goodsVideo) {
@@ -1349,17 +1275,6 @@ function assignSkuTableIndex() {
row._index = index;
});
}
-// 更新sku图片
-function updateSkuPicture() {
- baseInfoForm.value.regeneratorSkuFlag = true;
- let _index = selectedSku.value._index;
- if (_index === undefined || _index === null) {
- _index = skuTableData.value.indexOf(selectedSku.value);
- }
- if (_index >= 0) {
- skuTableData.value[_index] = selectedSku.value;
- }
-}
// sku图片上传成功
function handleSuccess(res, file, images) {
if (file.response) {
@@ -1460,20 +1375,6 @@ function checkWholesalePrice(index) {
renderTableData(skuTableData.value);
syncWholesalePriceToSku();
}
-// 商品图片上传成功
-function handleSuccessGoodsPicture(res, file) {
- if (file.response) {
- file.url = file.response.result;
- baseInfoForm.value.goodsGalleryFiles.push(file.url);
- }
-}
-// 图片格式不正确
-function handleFormatError(file) {
- Notice.warning({
- title: "文件格式不正确",
- desc: "文件 " + file.name + " 的格式不正确",
- });
-}
function beforeVideoUpload(file) {
const allowTypes = ["avi", "wmv", "mpeg", "mp4", "mov"];
const ext = (file.name.split(".").pop() || "").toLowerCase();
@@ -1510,16 +1411,6 @@ function handleMaxSize(size = 2) {
desc: `图片大小不能超过${size}MB`,
});
}
-// 图片上传前钩子
-function handleBeforeUploadGoodsPicture(file) {
- const check = baseInfoForm.value.goodsGalleryFiles.length < 5;
- if (!check) {
- Notice.warning({
- title: "图片数量不能大于五张",
- });
- return false;
- }
-}
// sku图片上传前钩子
function handleBeforeUpload(file) {
const check =
@@ -2189,11 +2080,6 @@ function addSpec($index, item) {
skuInfoCopy.value = cloneObj(skuInfo.value);
}
}
-function handleClearSku() {
- skuInfo.value = [];
- skuTableData.value = [];
- renderTableData(skuTableData.value);
-}
/** 移除当前规格值 */
function handleCloseSkuValue(item, index, spec) {
if (spec.spec_values.length <= 1) {
@@ -2363,55 +2249,6 @@ function renderTableData(skus) {
}
}
-/**
- * 迭代属性,形成表格
- * result 渲染的数据
- * array spec数据
- */
-function specIterator(result, spec, skus) {
- let table = result;
- if (spec.length > 0) {
- //清除当前循环的分组
- let cloneTemp = cloneObj(spec);
- cloneTemp.shift();
- spec[0].spec_values.forEach((specItem) => {
- let index = skuIndex;
- if (table[index]) {
- table[index][spec[0].name] = specItem.value;
- } else if (skus && skus[index] && specItem.value !== "") {
- let obj = {
- ...skus[index],
- id: skus[index].id,
- sn: skus[index].sn,
- quantity: skus[index].quantity,
- cost: skus[index].cost,
- price: skus[index].price,
- // [spec[0].name]: skus[index][spec[0].name] ? skus[index][spec[0].name] : specItem.value,
- [spec[0].name]: specItem.value,
- images:
- skus[index].images || baseInfoForm.value.goodsGalleryFiles || [],
- };
- if (specItem.value !== "") {
- obj.id = skus[index].id;
- }
- if (skus[index].weight !== "") {
- obj.weight = skus[index].weight;
- }
- table.push(obj);
- } else if (specItem.value !== "") {
- table.push({
- [spec[0].name]: specItem.value,
- images: baseInfoForm.value.goodsGalleryFiles || [],
- });
- }
-
- table = specIterator(table, cloneTemp, skus, index);
- });
- } else {
- skuIndex++;
- }
- return table;
-}
/**
* 生成所有可能的规格组合
* @param {Array} skuInfo 规格信息
@@ -2469,19 +2306,6 @@ function generateSkuCombinations(skuInfo) {
return generateCombinations(0, []);
}
-// 判断相同数组的值
-function scalarArrayEquals(array1, array2) {
- return (
- array1.length === array2.length &&
- array1.every(function (v, i) {
- return v === array2[i];
- })
- );
-}
-/** 自动完成表单所需方法*/
-function filterMethod(value, option) {
- return option.toUpperCase().indexOf(value.toUpperCase()) !== -1;
-}
/** 数据改变之后 抛出数据 */
function updateSkuTable(row, item, rowIndex) {
let index = rowIndex;
@@ -2535,15 +2359,10 @@ function selectTree(v) {
v[0][attr] = "";
}
}
- let str = JSON.stringify(v[0]);
- let menu = JSON.parse(str);
- form = menu;
- editTitle = menu.title;
}
}
// 店内分类选中
function changeSelect(v) {
- selectCount = v.length;
let ids = "";
v.forEach(function (e) {
ids += e.id + ",";
diff --git a/seller/src/views/lili-components/editor/index.vue b/seller/src/views/lili-components/editor/index.vue
index afd1854b9..728fecae4 100644
--- a/seller/src/views/lili-components/editor/index.vue
+++ b/seller/src/views/lili-components/editor/index.vue
@@ -48,8 +48,6 @@ const pendingContent = ref(null); // 编辑器未就绪时暂存待回填内容
const tinymceId =
"tinymce-" + +new Date() + ((Math.random() * 1000).toFixed(0) + ""); // 生成唯一的编辑器 ID
const fullscreen = ref(false); // 标记编辑器是否处于全屏模式
-const toolbar = ref([]); // 工具栏配置
-const content = ref(""); // 编辑器内容
const bindValue = computed(() => {
return props.modelValue ?? props.value ?? "";
diff --git a/seller/src/views/lili-components/multiple-region.vue b/seller/src/views/lili-components/multiple-region.vue
index f9864f00d..da98b25ad 100644
--- a/seller/src/views/lili-components/multiple-region.vue
+++ b/seller/src/views/lili-components/multiple-region.vue
@@ -37,7 +37,6 @@ const switched = ref(false);
const spinShow = ref(false);
const data = ref([]);
const selectedWay = ref([]);
-const callBackData = ref("");
const treeProps = reactive({
label: "title",
children: "children",
diff --git a/seller/src/views/lili-dialog/index.vue b/seller/src/views/lili-dialog/index.vue
index 1b5d415d7..b82daffd5 100755
--- a/seller/src/views/lili-dialog/index.vue
+++ b/seller/src/views/lili-dialog/index.vue
@@ -122,10 +122,6 @@ function open(type, mutiple) {
linkVisible.value = true;
}
}
-function close() {
- clickClose();
-}
-
// 外部通过 ref 访问的成员(grep seller/src 全量确认):
// - open:所有调用方打开弹窗(goods/link)
// - singleGoods:shop/modelList/forYour.vue、mixModel.vue 直接调用
diff --git a/seller/src/views/lili-dialog/link-dialog.vue b/seller/src/views/lili-dialog/link-dialog.vue
index 7a22c367b..0d4acf5c8 100755
--- a/seller/src/views/lili-dialog/link-dialog.vue
+++ b/seller/src/views/lili-dialog/link-dialog.vue
@@ -23,14 +23,11 @@