Bläddra i källkod

```
feat(env): 更新生产与测试环境的后端服务地址

将 `.env.prod` 和 `.env.test` 中的 `VITE_SERVICE_BASE_URL` 配置更新为新的服务器地址。
同时注释掉旧的配置项,便于后续维护和回滚。

fix(gitignore): 添加 dist.rar 到忽略列表

避免打包文件被意外提交到版本控制系统中。

refactor(types): 移除未使用的图标和 naive-ui 组件类型声明

清理 `components.d.ts` 文件中不再使用的组件类型定义,包括部分图标和 NaiveUI 组件,减少冗余代码。

feat(login): 区分开发与生产环境的验证码图片路径

在密码登录模块中,根据运行环境动态设置验证码图片请求地址,确保生产环境中使用正确的后端接口。

fix(goods): 允许商品价格设置为0并优化渠道价格禁用逻辑

调整价格输入框最小值为0,并在导入渠道价格时正确标记已选渠道为禁用状态,提升用户体验与数据准确性。
```

zhangtao 2 dagar sedan
förälder
incheckning
02fc9f94c1

+ 2 - 2
.env.prod

@@ -1,6 +1,6 @@
 # backend service base url, prod environment
-VITE_SERVICE_BASE_URL=https://mock.apifox.cn/m1/3109515-0-default
-
+# VITE_SERVICE_BASE_URL=https://mock.apifox.cn/m1/3109515-0-default
+VITE_SERVICE_BASE_URL=https://shop.platform.zswlgz.com/plt #服务器
 # other backend service base url, prod environment
 VITE_OTHER_SERVICE_BASE_URL= `{
   "demo": "http://localhost:9529"

+ 1 - 1
.env.test

@@ -3,7 +3,7 @@
 VITE_SERVICE_BASE_URL=http://192.168.1.206:8114 #付
 # VITE_SERVICE_BASE_URL=http://192.168.0.157:8114 #王
 # VITE_SERVICE_BASE_URL=https://mock.apifox.cn/m1/3109515-0-default
-# VITE_SERVICE_BASE_URL=https://plat.qlapp.cn #服务器
+# VITE_SERVICE_BASE_URL=https://shop.platform.zswlgz.com #服务器
 
 
 # other backend service base url, test environment

+ 1 - 0
.gitignore

@@ -13,6 +13,7 @@ dist
 dist-ssr
 coverage
 *.local
+dist.rar
 
 /cypress/videos/
 /cypress/screenshots/

+ 0 - 5
src/typings/components.d.ts

@@ -38,7 +38,6 @@ declare module 'vue' {
     IconIcRoundDelete: typeof import('~icons/ic/round-delete')['default']
     IconIcRoundPlus: typeof import('~icons/ic/round-plus')['default']
     IconLocalActivity: typeof import('~icons/local/activity')['default']
-    IconLocalBanner: typeof import('~icons/local/banner')['default']
     IconLocalCast: typeof import('~icons/local/cast')['default']
     IconLocalLogo: typeof import('~icons/local/logo')['default']
     'IconMaterialSymbolsLight:rotate90DegreesCcwOutlineRounded': typeof import('~icons/material-symbols-light/rotate90-degrees-ccw-outline-rounded')['default']
@@ -76,7 +75,6 @@ declare module 'vue' {
     NDrawer: typeof import('naive-ui')['NDrawer']
     NDrawerContent: typeof import('naive-ui')['NDrawerContent']
     NDropdown: typeof import('naive-ui')['NDropdown']
-    NDynamicInput: typeof import('naive-ui')['NDynamicInput']
     NEmpty: typeof import('naive-ui')['NEmpty']
     NFlex: typeof import('naive-ui')['NFlex']
     NForm: typeof import('naive-ui')['NForm']
@@ -87,8 +85,6 @@ declare module 'vue' {
     NInput: typeof import('naive-ui')['NInput']
     NInputGroup: typeof import('naive-ui')['NInputGroup']
     NInputNumber: typeof import('naive-ui')['NInputNumber']
-    NList: typeof import('naive-ui')['NList']
-    NListItem: typeof import('naive-ui')['NListItem']
     NLoadingBarProvider: typeof import('naive-ui')['NLoadingBarProvider']
     NMenu: typeof import('naive-ui')['NMenu']
     NMessageProvider: typeof import('naive-ui')['NMessageProvider']
@@ -114,7 +110,6 @@ declare module 'vue' {
     NTabs: typeof import('naive-ui')['NTabs']
     NTag: typeof import('naive-ui')['NTag']
     NText: typeof import('naive-ui')['NText']
-    NThing: typeof import('naive-ui')['NThing']
     NTooltip: typeof import('naive-ui')['NTooltip']
     NTree: typeof import('naive-ui')['NTree']
     NTreeSelect: typeof import('naive-ui')['NTreeSelect']

+ 4 - 1
src/views/_builtin/login/modules/pwd-login.vue

@@ -41,7 +41,10 @@ async function handleSubmit() {
 }
 async function getDataCode() {
   const uuid = getUUID();
-  imgPath.value = `${import.meta.env.VITE_SERVICE_BASE_URL}/captcha.jpg?uuid=${uuid}`;
+  // imgPath.value = `${import.meta.env.VITE_SERVICE_BASE_URL}/captcha.jpg?uuid=${uuid}`;
+  imgPath.value = import.meta.env.DEV
+    ? `${import.meta.env.VITE_SERVICE_BASE_URL}/captcha.jpg?uuid=${uuid}`
+    : `https://shop.backend.zswlgz.com/captcha.jpg?uuid=${uuid}`;
   sessionUUID.value = uuid;
 }
 getDataCode();

+ 9 - 1
src/views/goods/store-goods/index.vue

@@ -163,7 +163,7 @@ const PriceColumns: NaiveUI.TableColumn<Price>[] = [
           onUpdate:value={value => {
             row.channelProdPrice = Number(value);
           }}
-          min={1}
+          min={0}
         />
       );
     }
@@ -258,8 +258,16 @@ function openImportModal() {
 }
 function handleModalPrice(row: Api.goods.ShopSku) {
   selectData.value = row;
+
   if (row.channelProdList) {
     PriceData.value = row.channelProdList?.map(it => {
+      options.value.map(its => {
+        if (its.id == it.channelId) {
+          its.disabled = true;
+        }
+        return its;
+      });
+
       return {
         channelId: Number(it.channelId),
         channelProdPrice: Number(it.channelProdPrice),