Преглед на файлове

【Mod】优化SKU选择

liuxiangxin преди 3 месеца
родител
ревизия
f83d9a7911
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      pages/product/index.vue

+ 3 - 3
pages/product/index.vue

@@ -443,10 +443,10 @@ export default {
 		  // 显示图片
 		  this.sku_thumb = this.productInfo.thumb;
 		  // 如果只有一个SKU,默认选择一个
-          if (this.productInfo.product_sku.length == 1) {
+          if ( this.productInfo.product_attr.length == 1) {
 			// 设置对应的属性已经选中
-            if ( this.productInfo.product_attr[0].attr_list.length && this.productInfo.product_attr[0].attr_list.length > 0 ) {
-              this.attrChange(0,0);
+            if ( this.productInfo.product_attr[0].attr_list.length == 1 ) {
+				this.attrChange(0,0);
             }
           }
         } else {