yangan
2024-07-05 261d3268cdc1723b43f326df0b770398b9770074
pages/customer-page/zhijian-bangfang/zhijian-bangfang.vue
@@ -2,7 +2,7 @@
  <view>
    <view class="bangfang-btns">
      <view class="btn" v-for="(item,index) in  bangfangList" :key="index">
        <u-button type="primary" @click="handleBangfangClick">{{item.name}}</u-button>
        <u-button type="primary" @click="handleBangfangClick(item)">{{item.name}}</u-button>
      </view>
    </view>
    <tab-bar :current="1"></tab-bar>
@@ -11,6 +11,7 @@
</template>
<script>
import { BaseUrl } from '@/api/request.js'
export default {
  name: "zhijian-bangfang",
  data() {
@@ -31,19 +32,29 @@
      })
    },
    handleBangfangClick(item) {
      // this.$reqPost('applyWeight',{tmId:this.getWeightHouseObj.tmId,houseId:item.id},'params').then(res => {
      let tmId = '1808295976202133505'
      let houseId = '1678897489526169602'
      this.$reqPost('applyWeight',{tmId:tmId,houseId:houseId},'params').then(res => {
        console.log(res,'选择磅房====')
        if(res.code == 0) {
          uni.navigateTo({
            url: `/pages/driver-page/driver-index/bill-of-lading-details/nocarNoWeighingDevice/nocarNoWeighingDevice?tmId=${tmId}&houseId=${houseId}`
          })
        }else {
          this.$u.toast(res.msg);
      console.log(item,'点击磅房-----')
      uni.request({
        url: `${BaseUrl}/wrzs/jccoalweighhouse/getTmTaskCoalNoCar/${item.id}`,
        method: 'GET',
        header: {
          'content-type': 'application/x-www-form-urlencoded',
          Authorization: 'Bearer' + ' ' + uni.getStorageSync('token'),
        },
        success: (res) => {
          console.log(res,'res.datra----------')
        }
      })
      // this.$reqGet('getTmTaskCoalNoCar',{houseId:item.id}).then(res => {
      //   console.log(res,'选择磅房====')
      //   if(res.code == 0) {
      //     uni.navigateTo({
      //       url: `/pages/driver-page/driver-index/bill-of-lading-details/nocarNoWeighingDevice/nocarNoWeighingDevice?houseId=${houseId}`
      //     })
      //   }else {
      //     this.$u.toast(res.msg);
      //   }
      // })
    }
  }
}