pengyh 1 год назад
Родитель
Сommit
4cb55b0326
1 измененных файлов с 19 добавлено и 12 удалено
  1. 19 12
      src/views/mallManagement/configCenter/slideshowConfig/index.vue

+ 19 - 12
src/views/mallManagement/configCenter/slideshowConfig/index.vue

@@ -447,18 +447,25 @@ export default {
                 Object.assign(this.formData, res.data, {
                   imgSrc: res.data.imgSrc ? [{ url: res.data.imgSrc }] : []
                 })
-                getGoodsList({
-                  pageNum: 1,
-                  pageSize: -1,
-				  goodsId: res.data.goodsId,
-                }).then(res => {
-                  // this.goodsList = res.data.records.map(item => ({
-                  //   value: item.goodsId,
-                  //   label: item.goodsName
-                  // }))
-				  this.formData.goodsId = res.data.records[0].goodsId
-				  this.formData.goodsName = res.data.records[0].goodsName
-                })
+				if(res.data.port == 'ESHOP'){
+					getUsedGoodsList({
+						pageNum: 1,
+						pageSize: -1,
+						params:  [{param: "a.id", compare: "=", value: res.data.goodsId}]
+					}).then(ress => {
+						this.formData.goodsId = ress.data.records[0].goodsId
+						this.formData.goodsName = ress.data.records[0].goodsName
+					})
+				}else{
+					getGoodsList({
+						pageNum: 1,
+						pageSize: -1,
+						goodsId: res.data.goodsId,
+					}).then(ress => {
+					  this.formData.goodsId = ress.data.records[0].goodsId
+					  this.formData.goodsName = ress.data.records[0].goodsName
+					})
+				}
               })
             }
           })