|
@@ -16,14 +16,14 @@
|
|
|
class="mall-list-item">
|
|
|
<view class="mall-content-box">
|
|
|
<img :src='item.cover' class="mall-image" />
|
|
|
- <view class="content-body-box">
|
|
|
+ <view class="content-body-box" :class="item.yigou ==1?'mall-yigou-box':''">
|
|
|
<view class="content-name">
|
|
|
<view class="name-text">{{item.name}}</view>
|
|
|
</view>
|
|
|
<view class="content-text">{{item.intro}}</view>
|
|
|
<view class="content-row">
|
|
|
<view class="content-yuanjia">原价:{{item.yuanjia}}</view>
|
|
|
- <view class="shop-car-box" @click="addProduct(item)">
|
|
|
+ <view class="shop-car-box" v-if="item.yigou !=1" @click="addProduct(item)">
|
|
|
<icon v-if="productData.selectedIds.includes(item.id)" class="car-change">
|
|
|
</icon>
|
|
|
</view>
|
|
@@ -31,7 +31,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="mall-bottom-row">
|
|
|
- <view v-if="item.type ==1" class="kcb-btn" @click="productBtn">课程包明细<icon>
|
|
|
+ <view v-if="item.type ==1" class="kcb-btn" @click="productBtn(item)">课程包明细<icon>
|
|
|
</icon>
|
|
|
</view>
|
|
|
<view class="hdj-text">活动价:{{item.xianjia}}</view>
|
|
@@ -40,7 +40,34 @@
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
<view v-if="productData.current === 1">
|
|
|
- <view>英语</view>
|
|
|
+ <scroll-view scroll-y="true" :scroll-into-view="scrollIntoId" class="order-scroll-view">
|
|
|
+ <!--数学-->
|
|
|
+ <view :id="'item-' + item.id" v-for="item in productData.list" :key="item.id"
|
|
|
+ class="mall-list-item">
|
|
|
+ <view class="mall-content-box" :class="item.yigou ==1?'mall-yigou-box':''">
|
|
|
+ <img :src='item.cover' class="mall-image" />
|
|
|
+ <view class="content-body-box">
|
|
|
+ <view class="content-name">
|
|
|
+ <view class="name-text">{{item.name}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="content-text">{{item.intro}}</view>
|
|
|
+ <view class="content-row">
|
|
|
+ <view class="content-yuanjia">原价:{{item.yuanjia}}</view>
|
|
|
+ <view class="shop-car-box" v-if="item.yigou !=1" @click="addProduct(item)">
|
|
|
+ <icon v-if="productData.selectedIds.includes(item.id)" class="car-change">
|
|
|
+ </icon>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="mall-bottom-row">
|
|
|
+ <view v-if="item.type ==1" class="kcb-btn" @click="productBtn(item)">课程包明细<icon>
|
|
|
+ </icon>
|
|
|
+ </view>
|
|
|
+ <view class="hdj-text">活动价:{{item.xianjia}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
</view>
|
|
|
<!-- <view v-if="productData.current === 2">
|
|
|
<view>语文</view>
|
|
@@ -75,8 +102,8 @@
|
|
|
</view>
|
|
|
<detail-dialog ref="mallDetailPopup" :selected-list="getSelectedProducts"></detail-dialog>
|
|
|
|
|
|
- <!--
|
|
|
- <product-dialog ref="mallProductPopup" @payBtn="payBtn"></product-dialog> -->
|
|
|
+
|
|
|
+ <product-dialog ref="mallProductPopup" @payBtn="payBtn"></product-dialog>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -145,13 +172,11 @@
|
|
|
payType.value = payType.value == 'weixin' ? 'zhifubao' : 'weixin'
|
|
|
}
|
|
|
|
|
|
- function productBtn() {
|
|
|
- mallProductPopup.value.detailShow();
|
|
|
+ function productBtn(item) {
|
|
|
+ mallProductPopup.value.detailShow(item.id);
|
|
|
}
|
|
|
|
|
|
function detailBtn() {
|
|
|
-
|
|
|
-
|
|
|
// // 获取选中商品的cardId列表
|
|
|
// const selectedProducts = productData.list.filter(
|
|
|
// item => productData.selectedIds.includes(item.id)
|
|
@@ -164,11 +189,14 @@
|
|
|
toast("请选择至少一个商品查看明细");
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
showDetail.value = !showDetail.value;
|
|
|
- if (showDetail.value) {
|
|
|
+ if (showDetail.value) {
|
|
|
+ const selected = productData.list.filter(item =>
|
|
|
+ productData.selectedIds.includes(item.id)
|
|
|
+ );
|
|
|
mxjtClass.value = 'mxjt-zk-icon';
|
|
|
- mallDetailPopup.value.detailShow();
|
|
|
+ mallDetailPopup.value.detailShow(selected);
|
|
|
} else {
|
|
|
mxjtClass.value = 'mxjt-sq-icon';
|
|
|
mallDetailPopup.value.detailCloseBtn();
|