chore(seller): 清理死代码与失效机制,生产构建剥离 console

- 删除零引用组件 main-components/message-tip.vue
- 清理 113 处 no-unused-vars(重点 goodsOperationSec 20+ 项、ossManage 25 项,含死代码链级联删除;renovation 的 ModelForm 为 vue-eslint-parser 误报,保留并核实)
- stores/app.js 移除只写不读的死字段(currNavTitle/menuTheme/themeColor/isFullScreen/messageCount/currentPageName/currentPath)及失效的 cachePage/dontCache 缓存页机制(无 keep-alive 消费方),同步清理 util.js/App.vue/Main.vue/shrinkable-menu/tags-page-opened 的调用点
- 删除 30 处 console.log 调试残留;生产构建 terser 配置 drop_console 兜底
This commit is contained in:
lifenlong
2026-10-14 20:31:25 +08:00
parent 2a2c3f8174
commit 92dd179525
47 changed files with 20 additions and 1233 deletions

View File

@@ -133,16 +133,10 @@ import { Message } from "@/utils/message";
defineOptions({ name: "shopSetting" });
const currentKey = ref(""); //存储当前点击地址的key
const showMap = ref(false); // 是否展示地图
const type = ref("INFO");
const storeName = ref(""); //店铺名称
const regionId = ref([]); // 地区id
// 历史遗留:loading、regionGoods、regionIdS 未在原 data 中声明,仅在方法内赋值,保持原行为
let loading = false;
let regionGoods = null;
let regionIdS = null;
const addressForm = ref({
// 退货地址
salesConsigneeName: "", // 收货人姓名
@@ -155,11 +149,6 @@ const addressForm = ref({
const udeskForm = ref({
merchantEuid: "",
});
const udeskFormValidate = {
merchantEuid: [
{ required: true, message: "请输入店铺坐席ID", trigger: "blur" },
],
};
const afterFormValidate = {
salesConsigneeMobile: [
{ required: true, message: "手机号不能为空", trigger: "blur" },
@@ -261,7 +250,6 @@ const addressGoodsValidate = {
const formRef = ref(null);
const addressGoodsRef = ref(null);
const addressFormRef = ref(null);
const udeskFormRef = ref(null);
const mapRef = ref(null);
// 回调地址
@@ -315,8 +303,6 @@ function init() {
function setAddressGoods() {
console.log(addressGoodsRef.value)
addressGoodsRef.value.validate((valid) => {
if (valid) {
API_Shop.editDeliverAddress(addressGoods.value).then(res => {
@@ -329,9 +315,7 @@ function setAddressGoods() {
}
//获取店铺信息
function getShopInfo() {
loading = true;
API_Shop.getShopInfo().then((res) => {
loading = false;
if (res.success) {
form.value = res.result;
@@ -358,17 +342,11 @@ function getDeliverAddress() {
if (res.success) {
if (res.result != '' && res.result != null) {
addressGoods.value = res.result;
regionGoods = res.result.salesConsignorAddressPath;
regionIdS = res.result.salesConsignorAddressId;
}
}
})
}
//重置
function handleReset() {
formRef.value.resetFields();
}
//提交保存
function handleSubmit() {
formRef.value.validate((valid) => {
@@ -384,20 +362,6 @@ function handleSubmit() {
}
});
}
function merchantSubmit() {
udeskFormRef.value.validate((valid) => {
if (valid) {
submitLoading.value = true;
API_Shop.updatEmerchantId(udeskForm.value).then((res) => {
submitLoading.value = false;
if (res.success) {
Message.success("修改成功");
getShopInfo();
}
});
}
});
}
//tab切换
function handleClickType(v) {