소스 검색

fix bug: 多引入了 productMins

shizhongqi 11 달 전
부모
커밋
180b97cdfd
3개의 변경된 파일7개의 추가작업 그리고 10개의 파일을 삭제
  1. 3 6
      hdApp/src/admin/goods/add.vue
  2. 3 3
      hdApp/src/admin/goods/detail.vue
  3. 1 1
      hdApp/src/mixins/product.js

+ 3 - 6
hdApp/src/admin/goods/add.vue

@@ -145,14 +145,14 @@ import TuiListCell from "@/components/plugin/list-cell";
 import AppUploader from "@/components/app-uploader";
 const form = require("@/utils/formValidation.js");
 import { getClass } from "@/api/category";
-import { addGoodsData, getGoodsDetail } from "@/api/goods"
+import { addGoodsData } from "@/api/goods"
 import htzImageUpload from '@/components/htz-image-upload/htz-image-upload.vue'
-import productMins from "@/mixins/product";
+//import productMins from "@/mixins/product"; //复制页面代码时,没去掉
 import inputRestore from "@/mixins/inputRestore";
 export default {
   name: "add",
   components: { TuiListCell, AppUploader,htzImageUpload },
-	mixins: [productMins, inputRestore],
+	mixins: [inputRestore], //productMins, 
   data() {
     return {
       headers:{token:''},
@@ -186,7 +186,6 @@ export default {
   onLoad() {
     const token = uni.getStorageSync('token')
     this.headers.token = token
-    this.init()
   },
   computed: {
     // 根据上传的图片数量动态生成封面选项
@@ -197,8 +196,6 @@ export default {
       return this.form.shopImg;
     }
   },
-  watch:{
-  },
   methods: {
     changeKind(){
       this.pageTo({url:'/admin/goods/selectKind?style=2&flower=1'})

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

@@ -148,7 +148,7 @@ import { getClass } from "@/api/category";
 import { getGoodsDetail, addGoodsData, updateGoodsData } from "@/api/goods";
 //图片上传插件来源:https://ext.dcloud.net.cn/plugin?id=2922 已改造,不能再升级 shish 20211228
 import htzImageUpload from '@/components/htz-image-upload/htz-image-upload.vue'
-import productMins from "@/mixins/product";
+//import productMins from "@/mixins/product"; //复制页面代码时,没去掉,引入的话会导致页面崩溃
 import inputRestore from "@/mixins/inputRestore";
 export default {
   name: "add",
@@ -157,7 +157,7 @@ export default {
     AppUploader,
     htzImageUpload
   },
-	mixins: [productMins, inputRestore],
+	mixins: [inputRestore],//productMins, 
   data() {
     return {
 			selectJobType: "addGoodsSelectItem",
@@ -314,7 +314,7 @@ export default {
             return {name:ele.name,cover:ele.smallCover,itemId:ele.ptItemId,id:ele.itemId,ratio:ele.ratio,
             bigCount:bigCount,smallCount:smallCount,bigUnit:ele.bigName,smallUnit:ele.smallName,shortCover:ele.shortCover}
           })
-          this.pushToSave(newItem)
+          //this.pushToSave(newItem)
         }
 
         Object.keys(this.form).forEach((i) => {

+ 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.setStorageSync('selectList_'+this.selectJobType+'_target_'+this.selectJobId, selectData)
+			uni.setStorage('selectList_'+this.selectJobType+'_target_'+this.selectJobId, selectData)
 		},
 		//询问是否删除缓存
 		removeFromSave(){