|
@@ -51,7 +51,7 @@
|
|
|
<!-- 商品列表 -->
|
|
<!-- 商品列表 -->
|
|
|
<view class="product-list">
|
|
<view class="product-list">
|
|
|
<up-checkbox-group shape="circle" @change="checkboxChange" class="centent" activeColor="#F8C008">
|
|
<up-checkbox-group shape="circle" @change="checkboxChange" class="centent" activeColor="#F8C008">
|
|
|
- <view class="product-card" v-for="(item, index) in goodsList" :key="index">
|
|
|
|
|
|
|
+ <view class="product-card" v-for="(item, index) in goodsList" :key="item.id">
|
|
|
<view class="product-header">
|
|
<view class="product-header">
|
|
|
<!-- 多选框 -->
|
|
<!-- 多选框 -->
|
|
|
<up-checkbox
|
|
<up-checkbox
|
|
@@ -62,7 +62,7 @@
|
|
|
activeColor="#F8C008"
|
|
activeColor="#F8C008"
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
- <image class="product-image" :src="item.image" mode="aspectFit" />
|
|
|
|
|
|
|
+ <image class="product-image" :src="item.image" mode="aspectFill" />
|
|
|
<view class="product-info">
|
|
<view class="product-info">
|
|
|
<view class="nameweight">
|
|
<view class="nameweight">
|
|
|
<text class="product-name">{{ item.storeName }}</text>
|
|
<text class="product-name">{{ item.storeName }}</text>
|
|
@@ -213,7 +213,7 @@ const setAllSelectValue = (status) => {
|
|
|
goodsList.value.forEach(item => {
|
|
goodsList.value.forEach(item => {
|
|
|
if (status) {
|
|
if (status) {
|
|
|
item.checked = true;
|
|
item.checked = true;
|
|
|
- selectValues.push(item.id);
|
|
|
|
|
|
|
+ selectValues.push(String(item.id));
|
|
|
isAllSelect.value = true;
|
|
isAllSelect.value = true;
|
|
|
} else {
|
|
} else {
|
|
|
item.checked = false;
|
|
item.checked = false;
|
|
@@ -275,6 +275,7 @@ const batchPutOnShell = async () => {
|
|
|
if (code === 200) {
|
|
if (code === 200) {
|
|
|
uni.showToast({ title: '批量上架成功', icon: 'success' });
|
|
uni.showToast({ title: '批量上架成功', icon: 'success' });
|
|
|
// 从列表中移除上架的商品
|
|
// 从列表中移除上架的商品
|
|
|
|
|
+ console.log(selectValue.value)
|
|
|
goodsList.value = goodsList.value.filter(item => !selectValue.value.includes(item.id.toString()));
|
|
goodsList.value = goodsList.value.filter(item => !selectValue.value.includes(item.id.toString()));
|
|
|
resetSelection();
|
|
resetSelection();
|
|
|
footerswitch.value = true; // 退出管理模式
|
|
footerswitch.value = true; // 退出管理模式
|