Explorar o código

1.商品规格-管理规格页面的右上角【新增】按钮修改为【新增规格】
2.商品规格属性名称需要进行详细说明,要标明规格:规格值,例如重量:5
3.点击销售中和已下架的商品列表商品不能进入该商品详情
4.收藏列表中的商品不能进入商品详情页

ext.liuqiwen3 hai 3 semanas
pai
achega
e4ad94a800

+ 1 - 1
pages/merchantCenters/productCate/productCate.vue

@@ -5,7 +5,7 @@
 				规格类型
 			</view>
 			<view class="cate-add" @click="addAttr">
-				新增
+				新增规格
 			</view>
 		</view>
 

+ 26 - 2
pages/merchantCenters/productManagement.vue

@@ -50,9 +50,9 @@
 
     <!-- 商品列表 -->
     <view class="product-list">
-      <up-checkbox-group shape="circle" @change="checkboxChange" class="centent" activeColor="#F8C008">
+      <up-checkbox-group shape="circle" v-model="selectValue" @change="checkboxChange" class="centent" activeColor="#F8C008">
         <view class="product-card" v-for="(item, index) in goodsList" :key="item.id">
-          <view class="product-header">
+          <view class="product-header" @click="goDetail(item)">
             <!-- 多选框 -->
             <up-checkbox
                 :name="item.id.toString()"
@@ -410,6 +410,30 @@ async function deleteFn(obj,index){
     }
   });
 }
+// 跳转商品详情页
+const goDetail = async (item) => {
+  if(!footerswitch.value){
+    let id = String(item.id);
+    console.log(id)
+    if(selectValue.value.includes(id)){
+      goodsList.value.forEach(item=>{
+        if(item.id==id){
+          item.checked = false;
+        }
+      })
+      selectValue.value = selectValue.value.filter(n=>n!=id)
+      console.log(selectValue.value)
+    }else{
+      selectValue.value.push(id)
+      console.log(selectValue.value)
+    }
+    isAllSelect.value = goodsList.value.length === selectValue.value.length;
+    return
+  }
+  uni.navigateTo({
+    url: "/pages/goods/goods_details/index?id="+item.id
+  })
+};
 
 onReachBottom(() => {
   getGroomList();

+ 7 - 1
pages/merchantCenters/releaseProduct.vue

@@ -198,7 +198,7 @@
 									</view>
 								</up-upload>
 								<view class="cate-name">
-									{{item.attrName}}
+									{{formatterAttrValue(item.attrValue)}}
 								</view>
 							</view>
 							<view class="cate-ipt-line">
@@ -1351,6 +1351,12 @@
 				break
 		}
 	}
+  const formatterAttrValue = (attrstrValue) => {
+    const data = JSON.parse(attrstrValue);
+
+    const result = `圈号:${data.圈号},重量:${data.重量}g`;
+    return result;
+  }
 </script>
 
 <style scoped lang="scss">

+ 1 - 1
pages/users/user_goods_collection/index.vue

@@ -123,7 +123,7 @@
 
 
 	const goDetail = (item) => {
-		if(footerswitch){
+		if(!footerswitch.value){
 			let id = String(item.id);
 			if(selectValue.value.includes(id)){
 				collectProductList.value.forEach(item=>{