shizhongqi 1 anno fa
parent
commit
feee2b275d
2 ha cambiato i file con 33 aggiunte e 15 eliminazioni
  1. 30 6
      hdApp/src/admin/goods/goodsSort.vue
  2. 3 9
      hdApp/src/admin/goods/list.vue

+ 30 - 6
hdApp/src/admin/goods/goodsSort.vue

@@ -15,6 +15,9 @@
 							zIndex: draggedIndex === index ? 999 : (targetIndex === index && isDragging ? 888 : 1)
 						}">
 						<view class="list-img">
+							<view v-if="item.status == 0" class="sold-out">
+								<view class="sold-out-xj">已下架</view>
+							</view>
 							<image :src="item.cover" mode="aspectFit" ></image>
 						</view>
 						<view class="list-det" style="position:absolute;top:10upx;left:125upx;">
@@ -248,7 +251,7 @@ export default {
 			// console.log('排序数据:', sortData)
 			
 			// 调用API更新排序
-			sort({ items: sortData }).then(res => {
+			sort({ cId: this.option.id, items: sortData }).then(res => {
 				if (res.code === 1) {
 					this.$msg('排序更新成功')
 				} else {
@@ -418,6 +421,25 @@ export default {
 				height:130upx;
 				border-radius: 20upx;
 			}
+
+			.sold-out{
+				z-index:10;
+				width:130upx;
+				height:52upx; /* 130 * (2/5) = 52upx */
+				background-color:black;
+				position:absolute;
+				top:92upx;
+				left:0;
+				opacity: 0.48;
+				color:white;
+				text-align:center;
+				border-radius: 0 0 20upx 20upx;
+				.sold-out-xj{
+					line-height:52upx;
+					font-size:24upx;
+					font-weight: bold;
+				}
+			}
 		}
 		.list-det {
 			margin-left: 20upx;
@@ -556,16 +578,18 @@ export default {
 	
 	/* 添加一个内部指示器 */
 	&::before {
-		content: '';
+		content: '移动到这儿';
 		position: absolute;
 		top: 50%;
 		left: 50%;
 		transform: translate(-50%, -50%);
-		width: 100upx;
-		height: 6upx;
+		padding: 8upx 22upx;
 		background: linear-gradient(90deg, #52C41A, #73D13D);
-		border-radius: 3upx;
-		opacity: 0.8;
+		border-radius: 8upx;
+		color: #fff;
+		font-size: 26upx;
+		font-weight: bold;
+		opacity: 0.9;
 		z-index: 99990;
 	}
 }

+ 3 - 9
hdApp/src/admin/goods/list.vue

@@ -107,15 +107,12 @@ export default {
       searchText:''
     };
   },
-  computed: {
-  },
-  onLoad: function() {
-    this.getCategoryData()
-  },
+
   methods: {
     init(){
-
+      this.getCategoryData()
     },
+
 		moreToDo(item){
 			let that=this;
 			let doList = ['打1个标签', '打2个标签','打5个标签', '打10个标签','设置为散花']
@@ -137,9 +134,6 @@ export default {
 				}
 			})
 		},
-    searchFn(){
-
-    },
     selectFlowerNumFn(){
       this.$refs.selectFlowerNumRef.open('top')
     },