小牛集卡web 客户端
chenwei
2021-06-08 e41faf1640e2e71febf4ba347a301e0c043b6ce9
src/components/agopage/comment/AddBox.vue
@@ -2,27 +2,27 @@
  <div>
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="常规箱子" name="first">
        <div class="show-box" v-for="(item, index) in 6" :key="index">
        <div class="show-box" v-for="(item, index) in allData.ContainerList" :key="index">
          <div class="box">
            <i class="iconfont icon-jizhuangxiang_container"></i>
            <span>20GP</span>
            <span>限重30T</span>
            <span>{{item.CntrName}}</span>
            <span>{{item.CntrSubtitle}}</span>
          </div>
          <div class="switch">
          <!-- <div class="switch">
            <el-switch v-model="value1" active-text="拼车"> </el-switch>
          </div>
          </div> -->
        </div>
      </el-tab-pane>
      <el-tab-pane label="特种箱" name="second">
        <div class="show-box" v-for="(item, index) in 6" :key="index">
        <div class="show-box" v-for="(sitem, sindex) in allData.SpecialContainerList" :key="sindex">
          <div class="box">
            <i class="iconfont icon-jizhuangxiang_container"></i>
            <span>40RH</span>
            <span>限重30T</span>
            <span>{{sitem.CntrName}}</span>
            <span>{{sitem.CntrSubtitle}}</span>
          </div>
          <div class="switch">
          <!-- <div class="switch">
            <el-switch v-model="value1" active-text="拼车"> </el-switch>
          </div>
          </div> -->
        </div>
      </el-tab-pane>
      <div class="btn">
@@ -37,9 +37,21 @@
    return {
      activeName: "second",
      value1: true,
      allData:{}
    };
  },
  created(){
    this.getBoxList();
  },
  methods: {
    //请求箱型列表
    async getBoxList(){
      await this.$axios.get("/api/HomePage/GetOrderForm").then(res=>{
            this.allData = res.data;
      }).catch(err=>{
          console.log(err);
      })
    },
    handleClick(tab, event) {
      console.log(tab, event);
    },