shish 3 лет назад
Родитель
Сommit
d5d9ffd364
2 измененных файлов с 11 добавлено и 13 удалено
  1. 10 12
      hdApp/src/admin/goods/category.vue
  2. 1 1
      hdApp/src/admin/goods/detail.vue

+ 10 - 12
hdApp/src/admin/goods/category.vue

@@ -8,10 +8,13 @@
 					</view>
 					<view class="list-det" @click="edit(item)">
 						<view class="app-size-28 app-color-0">{{ item.categoryName}}</view>
-						<view><text style="color:green;" v-if="item.status == 1">启用</text><text v-else>停用</text></view>
+						<view style="position:relative;">
+							<text style="color:green;position:absolute;top:12upx;" v-if="item.status == 1">上架</text>
+							<text v-else style="position:absolute;top:12upx;">下架</text>
+						</view>
 						<view class="list-operate">
 							<view class="operate-det">
-								<span @click.stop="changeStatus(item)"><text v-if="item.status == 1">停用</text><text v-else>启用</text></span>
+								<span @click.stop="changeStatus(item)"><text v-if="item.status == 1">下架</text><text v-else>上架</text></span>
 								<span @click.stop="delCategory(item.id)">删除</span>
 								<span @click.stop="edit(item)">编辑</span>
 							</view>
@@ -58,7 +61,7 @@
 					</view>
 
 					<view class="inp-list-line switch-wrap">
-						<view class="line-label">启用</view>
+						<view class="line-label">上架</view>
 						<view class="line-input flex-strat">
 							<switch :checked="modifyForm.status == '0' ? false : true" @change="switchChangeFn" />
 						</view>
@@ -227,13 +230,8 @@ export default {
 			})
 		},
 		changeStatus(item) {
-			this.$msg('开发中')
-			return false
 			let status = item.status == 1 ? 0 : 1
-			categoryStatusB({
-				categoryId: item.id,
-				status: status
-			}).then(res => {
+			categoryStatusB({ categoryId: item.id, status: status }).then(res => {
 				if(res.code == 1){
 					item.status = status
 					this.$msg('修改成功')
@@ -271,7 +269,6 @@ export default {
 			}
 		}
 		.list-det {
-			//width: calc(100% - 200upx);
 			margin-left: 20upx;
 			& > div {
 				margin-top: 14upx;
@@ -281,10 +278,11 @@ export default {
 			}
 			.list-operate {
 				width:480upx;
+				margin-top:10upx;
 				@include disFlex(center, space-between);
 				.operate-det {
-					width:480upx;
-					padding-left:100upx;
+					width:490upx;
+					padding-left:120upx;
 					& > span {
 						border:1px solid #ccc;
 						border-radius:25upx;

+ 1 - 1
hdApp/src/admin/goods/detail.vue

@@ -12,7 +12,7 @@
         </tui-list-cell>
         <tui-list-cell class="line-cell" :hover="true" :arrow="true">
           <view class="tui-title required">种类</view>
-          <view v-if="!$util.isEmpty(form.kindName)" style="color:width:480upx;" @click.stop="changeKind()">{{form.kindName}}</view>
+          <view v-if="!$util.isEmpty(form.kindName)" style="width:480upx;" @click.stop="changeKind()">{{form.kindName}}</view>
           <view v-else style="color:#CCCCCC;width:480upx;" @click.stop="changeKind()">请选择</view>
         </tui-list-cell>
         <tui-list-cell class="line-cell category-wrap" :hover="false">