|
|
@@ -31,22 +31,20 @@
|
|
|
<!--内容部分 start -->
|
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
|
<div class="page-view">
|
|
|
- <div class="goods-list" v-for="(item, idx) in list.data" :key="idx">
|
|
|
+ <div class="goods-list" v-for="(goodsItem, idx) in list.data" :key="idx">
|
|
|
<div class="goods-list-top">
|
|
|
<div class="img-blo">
|
|
|
- <img :src="item.smallImgList[0]" alt="商品图" mode="aspectFit" />
|
|
|
+ <img :src="goodsItem.smallImgList[0]" alt="商品图" mode="aspectFit" />
|
|
|
</div>
|
|
|
<div class="goods-det">
|
|
|
<div class="goods-det-top">
|
|
|
- <div class="goods-name">{{ item.goodsName }}</div>
|
|
|
- <!-- <div class="goods-sales">已售{{ item.sold }}</div> -->
|
|
|
- <!-- <div class="goods-sales">{{ item.categoryName }}</div> -->
|
|
|
+ <div class="goods-name">{{ goodsItem.goodsName }}</div>
|
|
|
</div>
|
|
|
<div class="operate-wrap">
|
|
|
- <div class="goods-price">¥{{ item.price }}</div>
|
|
|
+ <div class="goods-price">¥{{ goodsItem.price }}</div>
|
|
|
<div
|
|
|
class="operate-icon-wrap"
|
|
|
- @click.stop="operateFn(item, idx)">
|
|
|
+ @click.stop="operateFn(goodsItem, idx)">
|
|
|
<div class="operate-icon">
|
|
|
<i
|
|
|
class="iconfont"
|
|
|
@@ -59,9 +57,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="goods-list-bottom flex-center-between">
|
|
|
- <div>已售: {{ item.sold }}</div>
|
|
|
- <div>库存: {{ item.stock == -1 ? '充足' : item.stock }}</div>
|
|
|
- <div>浏览: {{ item.viewNum }}</div>
|
|
|
+ <div>已售: {{ goodsItem.sold }}</div>
|
|
|
+ <div>库存: {{ goodsItem.stock == -1 ? '充足' : goodsItem.stock }}</div>
|
|
|
+ <div>浏览: {{ goodsItem.viewNum }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -175,7 +173,7 @@ export default {
|
|
|
click: () => this.$util.pageTo("/admin/goodsManage/category")
|
|
|
},
|
|
|
{
|
|
|
- name: "节日涨价",
|
|
|
+ name: "涨价设置",
|
|
|
click: () => this.$util.pageTo("/admin/goodsManage/price-increase")
|
|
|
}
|
|
|
]
|
|
|
@@ -183,48 +181,35 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
btnData() {
|
|
|
+ let self = this;
|
|
|
return [
|
|
|
- // {
|
|
|
- // text: '置顶',
|
|
|
- // icon: 'iconzhiding',
|
|
|
- // click: () => {
|
|
|
- // this.delModal = true
|
|
|
- // }
|
|
|
- // },
|
|
|
{
|
|
|
text: "编辑",
|
|
|
icon: "iconbianji",
|
|
|
click: function() {
|
|
|
- this.$util.pageTo({
|
|
|
+ self.$util.pageTo({
|
|
|
url: "/admin/goodsManage/add",
|
|
|
query: {
|
|
|
- type: this.tabIndex,
|
|
|
- id: this.operateData.id
|
|
|
+ type: self.tabIndex,
|
|
|
+ id: self.operateData.id
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- text: this.operateData.status == 1 ? "下架" : "上架",
|
|
|
- icon: this.operateData.status == 1 ? "iconxiajia" : "iconqiyong",
|
|
|
+ text: self.operateData.status == 1 ? "下架" : "上架",
|
|
|
+ icon: self.operateData.status == 1 ? "iconxiajia" : "iconqiyong",
|
|
|
click: () => {
|
|
|
- this.changeStatusFn();
|
|
|
+ self.changeStatusFn();
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
text: "删除",
|
|
|
icon: "iconshanchu1",
|
|
|
click: () => {
|
|
|
- this.delModal = true;
|
|
|
+ self.delModal = true;
|
|
|
}
|
|
|
}
|
|
|
- // {
|
|
|
- // text: "分享",
|
|
|
- // icon: "iconfenxiang1",
|
|
|
- // click: () => {
|
|
|
- // this.$msg("功能开发中...");
|
|
|
- // }
|
|
|
- // }
|
|
|
];
|
|
|
}
|
|
|
},
|
|
|
@@ -243,11 +228,11 @@ export default {
|
|
|
methods: {
|
|
|
operateLine(index) {
|
|
|
if (index === 0) {
|
|
|
- this.$util.pageTo("/admin/goodsManage/freight");
|
|
|
+ this.$util.pageTo("/admin/goodsManage/category");
|
|
|
} else if (index === 1) {
|
|
|
- this.$msg("请在电脑端进行设置!");
|
|
|
- } else if (index === 2) {
|
|
|
this.$util.pageTo("/admin/goodsManage/price-increase");
|
|
|
+ } else{
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
operateList(index) {
|
|
|
@@ -338,12 +323,6 @@ export default {
|
|
|
that.scrollTop = 0;
|
|
|
}
|
|
|
},
|
|
|
- // operate
|
|
|
- // operateCancle() {
|
|
|
- // this.operateData = {}
|
|
|
- // this.operateIndex = null
|
|
|
- // this.operateShow = false
|
|
|
- // },
|
|
|
changeOperateShowFn() {
|
|
|
this.operateBottomShow = !this.operateBottomShow;
|
|
|
},
|
|
|
@@ -519,4 +498,4 @@ page {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|