|
@@ -50,9 +50,9 @@
|
|
|
|
|
|
|
|
<!-- 商品列表 -->
|
|
<!-- 商品列表 -->
|
|
|
<view class="product-list">
|
|
<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-card" v-for="(item, index) in goodsList" :key="item.id">
|
|
|
- <view class="product-header">
|
|
|
|
|
|
|
+ <view class="product-header" @click="goDetail(item)">
|
|
|
<!-- 多选框 -->
|
|
<!-- 多选框 -->
|
|
|
<up-checkbox
|
|
<up-checkbox
|
|
|
:name="item.id.toString()"
|
|
: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(() => {
|
|
onReachBottom(() => {
|
|
|
getGroomList();
|
|
getGroomList();
|