| | |
| | | } |
| | | const addRes = app.MG.store.addShoppingCart(query) |
| | | this.showSuccessToast() |
| | | console.log(addRes, 'addRes'); |
| | | wx.switchTab({ |
| | | url: '/pages/cart/index', |
| | | |
| | | }) |
| | | |
| | | } else { |
| | | Toast({ |
| | |
| | | theme: 'success', |
| | | direction: 'column', |
| | | }); |
| | | |
| | | }, |
| | | |
| | | async buyBook() { |
| | |
| | | teach: tree |
| | | }) |
| | | }, |
| | | |
| | | }) |
| | |
| | | <view wx:else class="outsideHigherBox"> |
| | | <view class="higherBox" wx:for="{{higherList}}" wx:key="index" wx:for-item="item" wx:for-index="index"> |
| | | <view class="outsideHigherImageBox"> |
| | | <view bind:tap="downloadData" data-item="{{item}}"> |
| | | |
| | | <image class="higherImageBox" src="{{item.icon}}" mode="" /> |
| | | <view class="higherImageBox" bind:tap="downloadData" data-item="{{item}}"> |
| | | <image src="{{item.icon}}" mode="aspectFill" /> |
| | | <view class="downloadIcon" data-item="{{item}}" data-key="showWithInput" bind:tap="mailbox"> |
| | | <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/email-click.png" mode="aspectFit" /> |
| | | <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/email.png" mode="aspectFit" /> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="downloadIcon" data-item="{{item}}" data-key="showWithInput" bind:tap="mailbox"> |
| | | |
| | | <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/email-click.png" mode="" /> |
| | | <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/email.png" mode="" /> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="higherTextBox">{{item.name}}</view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | <view wx:if="{{higherList.length > 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | |
| | | background-color: #fff; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | } |
| | | |
| | | .navbar-title { |
| | |
| | | width: 190rpx; |
| | | height: 255rpx; |
| | | margin: 15rpx; |
| | | position: relative; |
| | | } |
| | | |
| | | .higherImageBox image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .higherTextBox { |
| | |
| | | margin-bottom: 10rpx; |
| | | } |
| | | |
| | | .outsideHigherImageBox { |
| | | position: relative; |
| | | } |
| | | .outsideHigherImageBox {} |
| | | |
| | | .downloadIcon { |
| | | width: 34rpx; |
| | | height: 34rpx; |
| | | width: 30rpx; |
| | | height: 24rpx; |
| | | border-radius: 5rpx 5rpx 5rpx 5rpx; |
| | | background: rgba(0, 0, 0, 0.3); |
| | | position: absolute; |
| | | top: 15rpx; |
| | | right: 15rpx; |
| | | top: 0rpx; |
| | | right: 0rpx; |
| | | padding: 10rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | |
| | | .download { |
| | | /* background-color: #8bc34a; */ |
| | | .downloadIcon image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .downloadshiftin { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | .example-search { |
| | | background-color: #fff; |
| | | /* padding: 16rpx 32rpx; */ |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | "usingComponents": { |
| | | "t-icon": "tdesign-miniprogram/icon/icon" |
| | | }, |
| | | "navigationStyle": "custom", |
| | | "disableScroll": true |
| | | "navigationStyle": "custom" |
| | | } |
| | |
| | | }); |
| | | console.log(e.detail.value, 'e.detail.value'); |
| | | this.bookExhibitionGet() |
| | | } |
| | | }, |
| | | |
| | | }) |
| | |
| | | </view> |
| | | <view class="example-search"> |
| | | <t-search model:value="{{value}}" placeholder="请输入书展名称" bind:submit="onSearchSubmit" /> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | <view class="outsideMenuBox"> |
| | |
| | | selectedCount: 0, |
| | | checkAll: false, |
| | | }) |
| | | |
| | | |
| | | }, |
| | | onDelete(e) { |
| | | const item = e.currentTarget.dataset.item; |
| | |
| | | selectedCount: 0, |
| | | checkAll: false, |
| | | }) |
| | | |
| | | |
| | | }); |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | shoppingCartGet() { |
| | |
| | | searchList: [] |
| | | }; |
| | | app.MG.store.getShoppingCartProductList(query).then(res => { |
| | | |
| | | console.log(res, 'res'); |
| | | this.setData({ |
| | | totalSize: res.totalSize |
| | | }) |
| | |
| | | // }) |
| | | const type = item.saleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product'; |
| | | item.type = type; // 将type设置为item对象的属性,而不是使用setData |
| | | // debugger |
| | | |
| | | console.log(item.linkCmsItems[0].name); |
| | | item.name = item.linkCmsItems[0].name ? item.productMonWithLinkDto.product.name + ':' + item.linkCmsItems[0].name : item.productMonWithLinkDto.product.name |
| | | }); |
| | | |
| | | this.setData({ |
| | | shoppingCartData: res.datas |
| | | }); |
| | | |
| | | console.log(this.data.shoppingCartData, 'shoppingCartData'); |
| | | |
| | | if (this.data.shoppingCartData.length === 0) { |
| | | this.setData({ |
| | |
| | | </view> |
| | | <!-- <button bind:tap="onLogin"> 去登录</button> --> |
| | | <t-swipe-cell wx:for="{{shoppingCartData}}" wx:key="index" wx:for-item="item" wx:for-index="index"> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- <view class="contentBox"> --> |
| | | <!-- <view class="contentCheckbox"> |
| | | <checkbox value="{{item.id}}" checked="{{item.checked}}"></checkbox> |
| | |
| | | <view class="boosName"> |
| | | {{item.productMonWithLinkDto.product.name}} |
| | | </view> --> |
| | | |
| | | <view wx:if="{{item.type == 'product'}}" style="width: 386rpx;"> |
| | | |
| | | <view> |
| | | <text class="eBook">电子书</text> <text class="boosName">{{item.productMonWithLinkDto.product.name}}</text> |
| | | <!-- <view> |
| | | <text class="eBook">电子书</text> <text class="boosName">{{item.name}}</text> |
| | | </view> --> |
| | | <view class="boosName"> |
| | | <text class="eBook">云学习</text> |
| | | <text> {{item.name}}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view wx:if="{{item.type == 'item'}}" style="width: 386rpx;"> |
| | | |
| | | <view> |
| | | <text class="cloudLearning">云学习</text> <text class="boosName">{{item.productMonWithLinkDto.product.name}}</text> |
| | | <!-- <view> |
| | | <text class="cloudLearning">云学习</text> <text class="boosName"> {{item.name}}</text> |
| | | </view> --> |
| | | <view class="boosName"> |
| | | <text class="cloudLearning">云学习</text> |
| | | <text> {{item.name}}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </view> |
| | | <view slot="description" class="descriptionBox"> |
| | | <view> |
| | |
| | | </view> |
| | | <view class="left-image"> |
| | | <image wx:if="{{item.imgUrl}}" src="{{item.imgUrl}}" class="imageStyle" mode="aspectFit" /> |
| | | <image src="/static/images/default-book-img.png" class="imageStyle" mode="aspectFit" /> |
| | | <image wx:else src="/static/images/default-book-img.png" class="imageStyle" mode="aspectFit" /> |
| | | </view> |
| | | </view> |
| | | </t-cell> |
| | | </view> |
| | | <view slot="right" class="btn delete-btn" bind:tap="onDelete" data-item="{{item}}">删除</view> |
| | | </t-swipe-cell> |
| | | <view class="bottom-box"> |
| | | <view wx:if="{{shoppingCartData.length > 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | |
| | | font-weight: bold; |
| | | font-size: 29rpx; |
| | | margin: 0 10rpx; |
| | | /* |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | overflow: hidden; |
| | | |
| | | |
| | | } |
| | | |
| | | /* |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | display: -webkit-box; |
| | | -webkit-box-orient: vertical; |
| | | -webkit-line-clamp: 2; */ |
| | | |
| | | /* display: inline; */ |
| | | |
| | | |
| | | } |
| | | |
| | | /* display: inline; */ |
| | | .textBox { |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 400; |
| | |
| | | { |
| | | "component": true, |
| | | |
| | | "usingComponents": { |
| | | "t-icon": "tdesign-miniprogram/icon/icon", |
| | | "t-button": "tdesign-miniprogram/button/button", |
| | | "t-dialog": "tdesign-miniprogram/dialog/dialog" |
| | | }, |
| | | "navigationStyle": "custom", |
| | | "disableScroll": true |
| | | "navigationStyle": "custom" |
| | | } |
| | |
| | | <view class="shoppingCartList"> |
| | | <view class="cartList" wx:for="{{productList}}" wx:key="index" wx:for-item="item" wx:for-index="index"> |
| | | <view class="imageBox"> |
| | | <image src="{{item.paymentIcon }}" mode="aspectFill" /> |
| | | <image wx:if="{{item.paymentIcon}}" src="{{item.paymentIcon }}" mode="aspectFill" /> |
| | | <image wx:else src="/static/images/default-book-img.png" class="imageStyle" mode="aspectFit" /> |
| | | </view> |
| | | <view class="cartListContent"> |
| | | <view class="cartListDetails"> |
| | |
| | | |
| | | <view wx:if="{{item.type == 'product'}}" style="width: 386rpx;"> |
| | | |
| | | <view> |
| | | <!-- <view> |
| | | <text class="eBook">电子书</text> <text class="boosName">{{item.orderSaleMethod.product.name}}</text> |
| | | </view> --> |
| | | |
| | | <view class="boosName"> |
| | | <text class="eBook">电子书</text> |
| | | <text> {{item.orderSaleMethod.product.name}}</text> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | |
| | | <view wx:if="{{item.type == 'item'}}" style="width: 386rpx;"> |
| | | |
| | | <!-- |
| | | <view> |
| | | <text class="cloudLearning">云学习</text> <text class="boosName">{{item.orderSaleMethod.product.name}}</text> |
| | | </view> --> |
| | | <view class="boosName"> |
| | | <text class="cloudLearning">云学习</text> |
| | | <text> {{item.orderSaleMethod.product.name}}</text> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | font-weight: bold; |
| | | font-size: 29rpx; |
| | | margin: 0 10rpx; |
| | | /* |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | -webkit-line-clamp: 2; */ |
| | | |
| | | /* display: inline; */ |
| | | overflow: hidden; |
| | | |
| | | |
| | | } |