refactor(seller): 商家端系统性优化与 Vue3 迁移遗留问题修复

- 清理:删除 4 个未使用依赖、约 2700 行死代码(shop/ossManage 等)、tree-table 死组件、37 处未使用 import
- ESLint 9 flat config 升级(.eslintrc.js -> eslint.config.js),修复迁移遗留的 34 处真实 bug
- axios 重构:拦截器不再吞错、refreshToken 单例共享 Promise、超时收敛、form 序列化抽公共函数、vue-router 4 失效 API 修正
- 安全:4 处 v-html 增加 xss 过滤;logout 改为精确删除 localStorage 键
- API 重复定义收敛(delSpec/insertOrUpdateSpec、getDictData、ws)
- 首屏瘦身:tinymce 懒加载(约省 7.4MB)、core-js 按需 polyfill、vendor chunk 合并、dplayer/@antv/g2 动态 import、3 张大图压缩
- 页面修复:发布商品表单布局(iview 遗留 margin 移除)、beforeVideoUpload 补定义、el-tag type 空值、lili-dialog emits 声明、消息中心布局塌陷修复与样式重构、department-choose 空值、affix-time 不再发多余店铺请求、goods/distributionGoods 去掉品牌筛选
This commit is contained in:
pikachu1995@126.com
2026-10-08 15:22:56 +08:00
parent 8484936e3d
commit 5fcc26a866
93 changed files with 651 additions and 5241 deletions

View File

@@ -140,7 +140,7 @@ export default {
},
data() {
return {
loginBg: require("@/assets/login-bg.png"),
loginBg: require("@/assets/login-bg.jpg"),
loginLogo: require("@/assets/logo-lilishop.png"),
saveLogin: true,
sendCodeLoading: false,
@@ -203,28 +203,32 @@ export default {
this.setStore("accessToken", accessToken);
this.setStore("refreshToken", res.result.refreshToken);
userMsg().then((res) => {
if (res.success) {
this.setStore("saveLogin", this.saveLogin);
if (this.saveLogin) {
Cookies.set("userInfoSeller", JSON.stringify(res.result), {
expires: 7,
userMsg()
.then((res) => {
if (res.success) {
this.setStore("saveLogin", this.saveLogin);
if (this.saveLogin) {
Cookies.set("userInfoSeller", JSON.stringify(res.result), {
expires: 7,
});
} else {
Cookies.set("userInfoSeller", JSON.stringify(res.result));
}
util.initRouter(this);
this.$store.commit("setAvatarPath", res.result.storeLogo);
const redirectRouter = this.$route.query.redirect;
this.$router.push({
path: redirectRouter || "/home",
});
} else {
Cookies.set("userInfoSeller", JSON.stringify(res.result));
this.loading = false;
}
util.initRouter(this);
this.$store.commit("setAvatarPath", res.result.storeLogo);
const redirectRouter = this.$route.query.redirect;
this.$router.push({
path: redirectRouter || "/home",
});
} else {
})
.catch(() => {
this.loading = false;
}
});
});
},
sendCode() {
if (!this.isMobileValid) {