Przeglądaj źródła

升级版本号.. 修改一些bug

yangzm123 10 miesięcy temu
rodzic
commit
27cf73eb62

+ 2 - 2
src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "盛泰SRM",
     "appid" : "__UNI__82C0680",
     "description" : "",
-    "versionName" : "1.0.6",
-    "versionCode" : 106,
+    "versionName" : "1.0.7",
+    "versionCode" : 107,
     "transformPx" : false,
     "app-plus" : {
         "compatible" : {

+ 2 - 2
src/pages/index/components/products-list.vue

@@ -2,13 +2,13 @@
  * @Author: PoJun
  * @Date: 2023-12-19 14:57:48
  * @LastEditors: PoJun
- * @LastEditTime: 2024-04-28 22:15:26
+ * @LastEditTime: 2024-05-08 20:19:44
  * @Message: 产品列表, 只展示5个
 -->
 <template>
     <uv-cell-group :border="false" :customStyle="{ padding: '5px 0' }">
         <uv-cell :border="false" :arrow="false" value="全部产品" :isLink="true" url="/subpkg/home/products">
-            <uv-text slot="title" text="我的优势产品" :customStyle="{ 'font-weight': 'bold' }"></uv-text>
+            <uv-text slot="title" text="我的产品分类" :customStyle="{ 'font-weight': 'bold' }"></uv-text>
         </uv-cell>
 
         <template v-if="productsList">

+ 1 - 19
src/subpkg/flow/detail.vue

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2024-01-03 16:13:54
  * @LastEditors: PoJun
- * @LastEditTime: 2024-04-27 20:28:52
+ * @LastEditTime: 2024-05-08 20:37:11
  * @Message: Nothing
 -->
 <template>
@@ -132,24 +132,6 @@ export default {
                     labelWidth: 80,
                 });
             }
-            // this.list.forEach(item => {
-            //     if (item.code == "title" || item.code == "type") {
-            //         item.sv = item.rv = data[item.code];
-            //     }
-            //     if (item.code == "phone" || item.code == "name") {
-            //         item.sv = item.rv = data?.data[item.code];
-            //     }
-            //     if (item.code == "result") {
-            //         if (data[item.code] != undefined && data[item.code] != null) {
-            //             item.sv = item.rv = data[item.code] == 1 ? "已通过" : "已拒绝";
-            //         }
-            //         if (this.tabType == "done") {
-            //             item.canShow = true;
-            //         } else {
-            //             item.canShow = false;
-            //         }
-            //     }
-            // });
             uni.$uv.sleep(200).then(() => {
                 this.skeletonLoading = false;
             });

+ 39 - 14
src/subpkg/home/supplier-detail.vue

@@ -2,7 +2,7 @@
  * @Author: PoJun
  * @Date: 2023-09-28 10:38:11
  * @LastEditors: PoJun
- * @LastEditTime: 2024-04-27 22:10:30
+ * @LastEditTime: 2024-05-08 19:58:36
  * @Message: 供应商详情页面
 -->
 <template>
@@ -43,18 +43,18 @@
                     :border="false"
                     :cellStyle="{ padding: '15px' }"
                 ></uv-cell>
-				<uv-cell
-				    title="产品"
-				    :value="item.product"
-				    :border="false"
-				    :cellStyle="{ padding: '15px' }"
-				></uv-cell>
-				<uv-cell
-				    title="优势产品"
-				    :value="item.superiorProduct"
-				    :border="false"
-				    :cellStyle="{ padding: '15px' }"
-				></uv-cell>
+                <uv-cell
+                    title="产品分类"
+                    :value="showProductNames(item.product)"
+                    :border="false"
+                    :cellStyle="{ padding: '15px' }"
+                ></uv-cell>
+                <uv-cell
+                    title="优势产品"
+                    :value="item.superiorProduct"
+                    :border="false"
+                    :cellStyle="{ padding: '15px' }"
+                ></uv-cell>
                 <uv-cell title="营业执照" :border="false" :cellStyle="{ padding: '15px' }">
                     <uv-album
                         v-if="item.businessLicense"
@@ -90,7 +90,7 @@
 </template>
 
 <script>
-import { getSupplierInfo, getMySupplierInfo } from "@/config/http.js";
+import { getSupplierInfo, getMySupplierInfo, getProductsTreeNoAuth } from "@/config/http.js";
 
 export default {
     data() {
@@ -108,6 +108,12 @@ export default {
         getImageUrl(id) {
             return process.env.VUE_APP_BASE_API + `/files/${id}/show_image`;
         },
+        async getProductsList() {
+            if (!this.vuex_products.length) {
+                const data = await getProductsTreeNoAuth();
+                this.$uv.vuex("vuex_products", data ? data : []);
+            }
+        },
     },
     computed: {
         getImages() {
@@ -125,10 +131,29 @@ export default {
                 return ids.map(v => this.getImageUrl(v));
             };
         },
+        showProductNames() {
+            return (rv = []) => {
+                if (!rv || !rv.length) return "";
+                let names = [];
+                this.vuex_products.map(item => {
+                    let itemNs = [];
+                    if (item.children && item.children.length) {
+                        item.children.map(v => {
+                            if (rv.includes(v.id)) {
+                                itemNs.push(v.name);
+                            }
+                        });
+                    }
+                    names = names.concat(itemNs);
+                });
+                return names.join(",");
+            };
+        },
     },
     onLoad(e) {
         this.showBtn = e.id ? false : true;
         this.initPage(e.id);
+        this.getProductsList();
     },
     onReady() {
         uni.$on("refreshSupplierDetail", () => {