yiming
2024-03-15 097cdcd70b1d95f5fc581ea2bedc4faeba8259f2
fix: 购物车的样式

购物车的样式
8个文件已修改
149 ■■■■■ 已修改文件
pages/bookServices/detail/components/tree/index.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.wxml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.wxss 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/paymentPage/index.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/paymentPage/index.wxml 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/paymentPage/index.wxss 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/testLogin/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookServices/detail/components/tree/index.js
@@ -249,5 +249,8 @@
  },
  onCloudShoppingCart() {
    console.log(this.properties.treeList);
  },
  oncheckbox() {
    console.log(111);
  }
})
pages/cart/index.js
@@ -106,21 +106,17 @@
    });
  },
  goPaymentPage() {
    const selectedItems = this.data.shoppingCartData.filter(item => item.checked);
    // console.log(selectedItems, 789);
    const selectedIds = selectedItems.map(item => item.id);
    console.log('选中的商品 id:', selectedIds);
    if (selectedIds.length) {
      app.MG.store.shoppingCartCreateOrder({ linkIds: selectedIds }).then(res => {
        console.log(res.orderNumber, 456);
        console.log(res, 456);
        const url = '/pages/cart/paymentPage/index?orderNumber=' + res.orderNumber
        wx.navigateTo({
          url
        });
      })
    } else {
pages/cart/index.wxml
@@ -24,8 +24,22 @@
        </view>
        <view slot="description" class="descriptionBox" wx:if="{{item.saleMethod.price != 0}}"> ¥{{item.saleMethod.price}}</view>
        <view wx:else slot="description" class="descriptionBox"> 立即领取</view>
        <view slot="description" class="descriptionBox">
          <view>
            <view class="textBox" wx:if="{{type == 'product'}}">图书服务-电子书</view>
            <view class="textBox" wx:if="{{type == 'item'}}">图书服务-云学习</view>
          </view>
          <view wx:if="{{item.saleMethod.price != 0}}">
            ¥{{item.saleMethod.price}}
          </view>
          <view wx:else class="descriptionBox"> 立即领取</view>
        </view>
        <view slot="left-icon" class="left-icon">
          <view class="contentCheckbox">
            <t-checkbox icon="rectangle" value=" {{item.id}}" data-item="{{item}}" checked="{{item.checked}}" bindchange="HandelItemChange" />
pages/cart/index.wxss
@@ -209,16 +209,17 @@
  font-size: 22rpx;
  color: #FFFFFF;
  font-family: PingFang SC, PingFang SC;
  margin-right: 30rpx;
  /* margin-right: 30rpx; */
  border-radius: 0px 0px 0px 5px;
}
.eBook {
  width: 100%;
  width: 90%;
  height: 100%;
  background: #FF6C00;
  text-align: center;
  line-height: 38rpx;
  border-radius: 9rpx;
}
.cloudLearning {
@@ -237,3 +238,12 @@
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.textBox {
  font-family: PingFang SC, PingFang SC;
  font-weight: 400;
  font-size: 25rpx;
  color: #333333;
  /* margin: 10rpx 0; */
  margin-bottom: 20rpx;
}
pages/cart/paymentPage/index.js
@@ -143,6 +143,7 @@
      }
    }
    app.MG.store.getOrderByOrderNum(query).then(res => {
      console.log(res, 'res');
      this.setData({
        orderGoods: res.orderNumber
      })
@@ -155,10 +156,11 @@
      res.saleMethodLinks.forEach(item => {
        item.paymentIcon = getPublicImage(item.orderSaleMethod.product.icon)
        console.log(item.orderSaleMethod.type);
        this.setData({
          productList: res.saleMethodLinks
          productList: res.saleMethodLinks,
          type: item.orderSaleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product'
        })
      })
pages/cart/paymentPage/index.wxml
@@ -1,6 +1,5 @@
<!-- 头部 -->
<view class="titleBox">
  <view style="width: 100%; height: {{barHeight}}px; "></view>
  <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;">
    <view>
@@ -10,22 +9,7 @@
  </view>
</view>
<view class="paymentPageBox">
  <view class="content">
    <t-dialog visible="{{showCloseBtn}}" close-btn bind:confirm="closeDialog" bind:cancel="closeDialog">
      <view slot="content" class="slotContent">
@@ -36,31 +20,32 @@
      </view>
    </t-dialog>
    <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="aspectFit" />
          <image src="{{item.paymentIcon }}" mode="aspectFill" />
        </view>
 
        <view class="cartListContent">
          <view class="cartListDetails">{{item.orderSaleMethod.product.name}}</view>
          <view class="textBox">图书服务-电子书</view>
          <view class="cartListDetails">
            <view class="labelBox">
              <view class="eBook" wx:if="{{type == 'product'}}">电子书</view>
              <view wx:if="{{type == 'item'}}" class="cloudLearning">云学习</view>
            </view>
            <view class="boosName">
              {{item.orderSaleMethod.product.name}}
            </view>
          </view>
          <view class="textBox" wx:if="{{type == 'product'}}">图书服务-电子书</view>
          <view class="textBox" wx:if="{{type == 'item'}}">图书服务-云学习</view>
          <view class="priceBox">¥{{item.payPrice}}</view>
        </view>
      </view>
    </view>
    <view class="priceBreakdown">
      <view class="priceBreakdownContent">价格明细</view>
      <view class="amountMoney">
@@ -72,12 +57,8 @@
      </view>
    </view>
  </view>
  <!-- <view class="interval"></view> -->
  <view class="paymentBox">
    <view class="residue">待支付:<text class="residueTextBox">¥{{payPrice}}</text></view>
    <view>
pages/cart/paymentPage/index.wxss
@@ -40,8 +40,8 @@
}
image {
  width: 100%;
  height: 100%;
  width: 150rpx;
  height: 210rpx;
}
.cartListContent {
@@ -62,6 +62,10 @@
  font-weight: bold;
  font-size: 29rpx;
  color: #333333;
  display: flex;
  flex-direction: row;
  padding: 0 10rpx;
}
.textBox {
@@ -77,6 +81,10 @@
  font-weight: 500;
  font-size: 31rpx;
  color: #0F1214;
  font-family: DIN, DIN;
}
@@ -169,3 +177,40 @@
  width: 100%;
}
.eBook {
  width: 90%;
  height: 100%;
  background: #FF6C00;
  text-align: center;
  line-height: 38rpx;
  border-radius: 9rpx;
}
.cloudLearning {
  width: 100%;
  height: 100%;
  background: #5F92FD;
  text-align: center;
  line-height: 38rpx;
  border-radius: 9rpx;
}
.labelBox {
  width: 105rpx;
  height: 38rpx;
  font-size: 22rpx;
  color: #FFFFFF;
  font-family: PingFang SC, PingFang SC;
}
.boosName {
  width: 300rpx;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
pages/testLogin/index.js
@@ -7,7 +7,7 @@
   * 页面的初始数据
   */
  data: {
    textName: "18892081234",
    textName: "15111111116",
    textPassword: "xA123456",
    loading: false,
    userInfo: {