pengyh 1 год назад
Родитель
Сommit
cd0c846424

+ 9 - 0
src/api/setting.js

@@ -335,6 +335,15 @@ export function getGoodsList(params) {
   })
 }
 
+// 获取二手商品列表
+export function getUsedGoodsList(data) {
+  return request({
+    url: '/es/goods/list',
+    method: 'post',
+    data
+  })
+}
+
 // 批量删除轮播图
 export function batchDeleteBanner(params) {
   return request({

+ 17 - 5
src/views/mallManagement/configCenter/slideshowConfig/index.vue

@@ -97,6 +97,7 @@ import {
   getBannerDetail,
   deleteBanner,
   getGoodsList,
+	getUsedGoodsList,
   batchDeleteBanner
 } from '@/api/setting'
 import ImageUpload from '@/components/file-upload'
@@ -529,12 +530,23 @@ export default {
 		  let params = {
 		    goodsName: this.search,
 		    pageNum: this.innerCurrentPage,
-		    pageSize: this.innerPageSize
+		    pageSize: this.innerPageSize,
 		  };
-		  getGoodsList(params).then(res => {
-		    this.goodsList = res.data.records;
-		    this.innerListTotal = res.data.total;
-		  })
+			if(this.formData.port == 'ESHOP'){
+				getUsedGoodsList({
+					pageNum: this.innerCurrentPage,
+					pageSize: this.innerPageSize,
+					params:  [{param: "a.goods_name", compare: "like", value: this.search}, {param: "a.status", compare: "=", value: "ON"}]
+				}).then(res => {
+					this.goodsList = res.data.records;
+					this.innerListTotal = res.data.total;
+				})
+			}else{
+				getGoodsList(params).then(res => {
+				  this.goodsList = res.data.records;
+				  this.innerListTotal = res.data.total;
+				})
+			}
 		},
 		// 更改内嵌每页数量
 		innerHandleSizeChange(val) {