zhengjinyi 5 лет назад
Родитель
Сommit
f8d48da47f
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      components/cm-module/productDetails/recommend.vue

+ 1 - 1
components/cm-module/productDetails/recommend.vue

@@ -58,7 +58,7 @@
 			infoRecommend(id){
 				queryRelevant({productID:id}).then(response =>{
 					// console.log(response)
-					if( response.data.length > 0){
+					if( response.data && response.data.length > 0){
 						this.isEmpty = false
 						for (var i = 0, j = response.data.length; i < j; i += this.pageSize) {
 							this.recommendList.push(response.data.slice(i, i + this.pageSize));