zhengjinyi 5 年之前
父節點
當前提交
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));