Jelajahi Sumber

fix bug -- 2

shizhongqi 11 bulan lalu
induk
melakukan
8ef25dbc61

+ 5 - 2
hdApp/src/admin/goods/add.vue

@@ -349,11 +349,13 @@ export default {
         } else {
           formData.cover = '';
         }
+        if(formData.stockSet === '0'){
+          formData.stock = 9999;
+        }
         
         addGoodsData({ status: this.status, ...formData }).then(res => {
           uni.hideLoading()
-          this.$msg("添加成功")
-          this.removeFromSaveDirect()
+          // this.removeFromSaveDirect()
           
           // 把新增的商品添加到商品列表页的商品数组的第一项
           if (res.code === 1 && res.data) {
@@ -376,6 +378,7 @@ export default {
                 prevPage.$vm.list.data.unshift(newGoodsItem);
                 prevPage.$vm.list.total = (prevPage.$vm.list.total || 0) + 1;
               }
+              this.$msg("添加成功")
             } catch (error) {
               console.log('更新列表页数据失败:', error);
             }

+ 1 - 1
hdApp/src/admin/goods/detail.vue

@@ -495,7 +495,7 @@ export default {
       }
       
       updateGoodsData({ ...form}).then(res => {
-        this.removeFromSaveDirect()
+        //this.removeFromSaveDirect()
         this.$msg("操作成功")
         
         // 更新成功后,把更新的数据传递给前一页的列表页

+ 4 - 4
hdApp/src/config.js

@@ -1,5 +1,5 @@
 export const ProjectName = 'hd'
-export const APIHOST = 'https://api.shop.huaml.com'
-export const FORMALHOST = 'https://shop.huaml.com'
-export const IMGHOST = 'https://img.huaml.com'
-export const CURRENT_ENV = 'dev'
+export const APIHOST = 'https://api.shop.huahb.cn'
+export const FORMALHOST = 'https://shop.huahb.cn'
+export const IMGHOST = 'https://img.huahb.cn'
+export const CURRENT_ENV = 'production'

+ 6 - 6
hdApp/src/ext.json

@@ -1,12 +1,12 @@
 {
   "extEnable": true,
-  "extAppid": "wxe4675bab299a52f7",
+  "extAppid": "wx0d42f5f1dcb3a370",
   "directCommit": false,
   "ext": {
-    "account": 12362,
-    "apiHost": "https://api.shop.huaml.com",
-    "socketApiHost": "api.shop.huaml.com",
-    "imgHost": "https://img.huaml.com",
-    "name":"花美玲"
+    "account": 12358,
+    "apiHost": "https://api.shop.huahb.cn",
+    "socketApiHost": "api.shop.huahb.cn",
+    "imgHost": "https://img.huahb.cn",
+    "name":"花掌柜"
   }
 }

+ 2 - 3
hdApp/src/manifest.json

@@ -153,7 +153,7 @@
     "quickapp" : {},
     /* 小程序特有相关 线上(花掌柜) wx0d42f5f1dcb3a370 开发(花美玲) wxe4675bab299a52f7 */
     "mp-weixin" : {
-        "appid" : "wxe4675bab299a52f7",
+        "appid" : "wx0d42f5f1dcb3a370",
         "setting" : {
             "urlCheck" : false
         },
@@ -165,8 +165,7 @@
         },
         "optimization" : {
             "subPackages" : true
-        },
-        "lazyCodeLoading":"requiredComponents"
+        }
     },
     "mp-alipay" : {
         "usingComponents" : true

+ 1 - 1
hdApp/src/mixins/product.js

@@ -127,7 +127,7 @@ export default {
 		//放到仓库
 		pushToSave(selectData){
 			this.setSelectInfo({ selectJobType: this.selectJobType, info: selectData,selectJobId:this.selectJobId })
-			uni.setStorage('selectList_'+this.selectJobType+'_target_'+this.selectJobId, selectData)
+			uni.setStorageSync('selectList_'+this.selectJobType+'_target_'+this.selectJobId, selectData)
 		},
 		//询问是否删除缓存
 		removeFromSave(){

+ 6 - 6
hdApp/src/static/iconfont/iconfont.css

@@ -1,11 +1,11 @@
 @font-face {
   font-family: 'iconfont';  /* project id 1525256 */
-  src: url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.eot');
-  src: url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.eot?#iefix') format('embedded-opentype'),
-  url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.woff2') format('woff2'),
-  url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.woff') format('woff'),
-  url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.ttf') format('truetype'),
-  url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.svg#iconfont') format('svg');
+  src: url('https://api.shop.huahb.cn/iconfont/font_1525256_6bxwphhntqh.eot');
+  src: url('https://api.shop.huahb.cn/iconfont/font_1525256_6bxwphhntqh.eot?#iefix') format('embedded-opentype'),
+  url('https://api.shop.huahb.cn/iconfont/font_1525256_6bxwphhntqh.woff2') format('woff2'),
+  url('https://api.shop.huahb.cn/iconfont/font_1525256_6bxwphhntqh.woff') format('woff'),
+  url('https://api.shop.huahb.cn/iconfont/font_1525256_6bxwphhntqh.ttf') format('truetype'),
+  url('https://api.shop.huahb.cn/iconfont/font_1525256_6bxwphhntqh.svg#iconfont') format('svg');
 }
 
 .iconfont {