| | |
| | | }, |
| | | } |
| | | app.MG.store.getProductDetailNoChildren(query).then((res) => { |
| | | if (!res.datas.cmsDatas[0].datas.length) { |
| | | if (!res.datas.cmsDatas[0].datas.length || res.datas.cmsDatas[0].datas.length == 0) { |
| | | return this.setData({ |
| | | noResources: true, |
| | | loading: false, |
| | | }); |
| | | } |
| | | |
| | | let list = [] |
| | | // 判断云学习有无销售方式和有效期 |
| | | const cloundSaleMethod = |
| | |
| | | bind:updateCloudLearning="updateCloudLearning" |
| | | ></tree> |
| | | </view> |
| | | <!-- <t-loading |
| | | theme="circular" |
| | | size="60rpx" |
| | | class="loading" |
| | | loading="{{loading }}" |
| | | /> --> |
| | | <view wx:if="{{loading}}" style="width: 100%; height: min-content"> |
| | | <t-skeleton |
| | | row-col="{{rowCol}}" |
| | |
| | | animation="gradient" |
| | | loading="{{loading}}" |
| | | ></t-skeleton> |
| | | </view> |
| | | <view wx:if="{{noResources && !loading}}" class="noData"> |
| | | <empty /> |
| | | </view> |
| | | </t-tab-panel> |
| | | <t-tab-panel |
| | |
| | | ></tree> |
| | | </view> |
| | | <view wx:if="{{noResources && !loading}}" class="noData"> |
| | | <!-- <t-empty icon="folder-open" description="暂无数据" /> --> |
| | | <empty /> |
| | | </view> |
| | | </t-tab-panel> |
| | |
| | | if (Number(this.data.payPrice) < Number(this.data.price)) { |
| | | this.handleChange() |
| | | } |
| | | console.log(res, "res") |
| | | res.saleMethodLinks.forEach(item => { |
| | | const type = item.orderSaleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product'; |
| | | item.type = type; // 将type设置为item对象的属性,而不是使用setData |
| | | item.paymentIcon = getPublicImage(item.orderSaleMethod.product.icon) |
| | | item.price = item.orderSaleMethod.price.toFixed(2) |
| | | if (item.orderSaleMethod.product.cmsTypeRefCode == 'jsek_digitalTextbooks') { |
| | | item.typeTxt = '数字教材' |
| | | item.productType = "数字教材" |
| | |
| | | } else { |
| | | item.typeTxt = '电子书' |
| | | item.productType = "图书服务-电子书" |
| | | |
| | | if (item.orderSaleMethod.type == 'createProductItemSaleMethod') { |
| | | item.typeTxt = '云学习' |
| | | item.productType = "图书服务-云学习" |
| | |
| | | <text> {{item.orderSaleMethod.product.name}}</text> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{item.typeTxt == '云学习'}}" class="cmsItemName"> {{item.orderSaleMethod.cmsItemList[0].name}}</view> |
| | | <!-- <view wx:if="{{item.type == 'item'}}" style="width: 386rpx"> |
| | | <view class="boosName"> |
| | | <text class="cloudLearning">云学习</text> |
| | |
| | | </view> --> |
| | | </view> |
| | | <view class="textBox">{{item.productType}}</view> |
| | | <view class="priceBox">¥{{price}}</view> |
| | | <view class="priceBox">¥{{item.price}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | flex-direction: row; |
| | | padding: 0 10rpx; */ |
| | | /* margin-right: 500rpx; */ |
| | | margin-bottom: 50rpx; |
| | | margin-bottom: 30rpx; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: bold; |
| | | font-size: 29rpx; |
| | | color: #333333; |
| | | display: flex; |
| | | /* display: flex; */ |
| | | flex-direction: row; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .boosName { |
| | | margin-bottom: 20rpx; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: bold; |
| | | font-size: 29rpx; |