xuxy
2024-07-27 dcc7b2d14fcbac97fb6d2c8975a3cd93dfbcc458
sub_pages/customer/shopping/confirm.vue
@@ -59,12 +59,14 @@
  },
  methods: {
    async loadTransportList() {
      let that = this
      {
            let that = this;
        console.log('address', that.address, that.cacheAddressId)
        if (that.address && that.address.id && that.cacheAddressId !== that.address.id) {
          that.$message.showLoading()
          const {code, data} = await that.$http.request('post', '/api/customer/flower/order/confirm/transports', {
               const {
                  code,
                  data
               } = await that.$http.request('post', '/api/customer/flower/order/confirm/transports', {
            data: {
              addressId: that.address.id,
              weight: that.dto.totalWeight || 0
@@ -76,7 +78,7 @@
            that.transportList = data || []
          }
        }
      }
    },
    async submitOrder() {
      console.log('submitOrder', this.dto)
@@ -96,7 +98,10 @@
          console.log(res)
          if (res.code) {
            tmp.$message.showLoading()
            const {code, data} = await tmp.$http.request('post', '/api/customer/flower/order/commit', {
                     const {
                        code,
                        data
                     } = await tmp.$http.request('post', '/api/customer/flower/order/commit', {
              data: {
                ...tmp.dto,
                wxcode: res.code
@@ -109,7 +114,8 @@
              if (data && data['_testOrderId']) {
                //回调
                tmp.$message.showLoading()
                const res2 = await tmp.$http.request('get', '/api/customer/flower/order/callback/tmp', {
                           const res2 = await tmp.$http.request('get',
                              '/api/customer/flower/order/callback/tmp', {
                  params: {
                    id: res2.data['_testOrderId']
                  }
@@ -165,7 +171,11 @@
          <view class="item-each m-t-12 flex">
            <image class="img img100 m-r-6" :src="item.url||item.cover"></image>
            <view>
              <view class="title"><span class="m-r-5" style="display: inline-block;">{{item.categoryStr||''}}</span><span v-if="item.levelStr" class="m-r-5" style="display: inline-block;">{{ item.levelStr || '' }}</span>{{ item.name || '-' }}</view>
                     <view class="title"><span class="m-r-5"
                           style="display: inline-block;">{{item.categoryStr||''}}</span><span
                           v-if="item.levelStr" class="m-r-5"
                           style="display: inline-block;">{{ item.levelStr || '' }}</span>{{ item.name || '-' }}
                     </view>
              <view class="price">
                {{ item.price || 0 }}*{{ item.num }}扎
              </view>
@@ -185,9 +195,10 @@
      <view class="br-4 transform-container m-t-12 p10">
        <view class="title">
          <view>运输方式:</view>
          <view class="flex transform-list">
            <view v-for="(transform,index) of transportList" :class="[transform.id===dto.transportId?'cur':'']"
                  :key="index" class="transform-item" @click="()=>{
               <view class="flex transform-list flex-wrap-normal">
                  <view v-for="(transform,index) of transportList"
                     :class="[transform.id===dto.transportId?'cur':'']" :key="index" class="transform-item"
                     @click="()=>{
                    dto.transportId = transform.id;
                    current_transport = transform
                  }">
@@ -236,7 +247,7 @@
      <view class="desc flex">
        <view>商品金额:</view>
        <view class="m-l-a m-r-0 text-right">
          {{ (dto.totalAmount || 0) - (dto.packing) || 0 }}
               {{ (dto.totalAmount || 0)  || 0 }}
        </view>
      </view>
      <view class="desc flex">
@@ -253,11 +264,13 @@
      </view>
    </view>
    <view style="min-height:200rpx">
    </view>
    <view class="bottom-price flex">
      <view class="m-t-12 m-l-0 m-r-a">
        合计 <span class="t-red">¥ {{ (dto.totalAmount || 0) + (current_transport.fee || 0) || 0 }} </span>元
            合计 <span class="t-red">¥
               {{ (dto.totalAmount || 0) + (dto.packing || 0) + (current_transport.fee || 0) || 0 }} </span>元
      </view>
      <view class="button-green-1 m-l-a m-r-0" style="min-width: 240rpx" @click="submitOrder">
        提交订单
@@ -364,25 +377,26 @@
        border-radius: 8rpx;
        //min-height: 112rpx;
        border: 2rpx solid rgba(225, 240, 231, 0.38);
        padding: 14rpx;
               padding: 10rpx;
        text-align: center;
        //margin: 0 auto;
        margin-left: 20rpx;
               margin-left: 10rpx;
        margin-top: 10rpx;
        margin-right: auto;
        max-width: 32%;
        min-width: 120rpx;
               width: 130rpx;
        .title {
          font-weight: 400;
          font-size: 28rpx;
                  font-size: 24rpx;
          color: #000000;
          line-height: 40rpx;
                  word-break: break-word;
        }
        .price {
          font-weight: 600;
          font-size: 32rpx;
                  font-size: 30rpx;
          color: #20613D;
          //line-height: 44rpx;
        }