drawback-list.vue 5.03 KB
Newer Older
linxin's avatar
linxin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
<template>
  <h-view id="reimburse" class="public-style" style="height: 100%">
    <h-header :proportion="[5,1,1]" class="bar-custom">
      <div slot="left" class="h-header-btn">
        <img src="@/assets/userBind/arrow.png" @click="$routeGo()" >
        <span>业务退款</span>
      </div>
    </h-header>
    <div class="hinput">
      <input v-model="keyWords" type="text" placeholder="请输入退款金额" >
    </div>
    <scroll ref="scroll" :updateData="[reimburseList]" :pullUp="true">
      <section class="reimburse-wrap">
        <list-item
          v-for="(list,index) in reimburseList"
          :key="index"
          @click.native="godetail(list.order_id)"
        >
          <item>
            <img slot="left-icon" src="@/assets/reimburseMyself/reimburse.png" class="left-icon" >
            <div slot="name">退款金额</div>
            <div slot="content" class="money-font">{{ list.orderamount | currency }}</div>
          </item>
          <item>
            <div slot="left-icon" class="left-icon" />
            <div slot="name" class="time-font">还款时间</div>
            <div slot="content" class="time-font">{{ list.order_date }}</div>
          </item>
        </list-item>
      </section>
    </scroll>
  </h-view>
</template>
<script>
export default {
  data () {
    return {
linxin's avatar
linxin committed
38 39 40 41 42 43 44
      reimburseList: [
        {
          order_date: '2019/10/24',
          orderamount: '0',
          order_id: '16',
        },
      ],
linxin's avatar
linxin committed
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
      keyWords: '',
    }
  },
  beforeRouteEnter (to, from, next) {
    next(vm => {
      vm.getList()
    })
  },
  methods: {
    godetail (e) {
      this.$router.push({
        name: 'DrawbackDetail',
        params: {
          order_id: e,
        },
      })
    },
    getList () {
linxin's avatar
linxin committed
63 64 65 66 67 68 69 70 71
      let vm = this
      //   let url = process.env.basePath + 'my_repayment_query'
      //   let param = {
      //     user_phone: window.localStorage.getItem('user_phone'),
      //   }
      //   vm.hlsPopup.showLoading('数据加载中,请稍后!')
      //   vm.hlsHttp.post(url, param).then(function (res) {
      //     vm.hlsPopup.hideLoading()
      //     if (res.result === 'S') {
linxin's avatar
linxin committed
72
      //   vm.reimburseList = res.lists
linxin's avatar
linxin committed
73 74 75 76 77 78 79 80 81 82
      // this.reimburseList = [
      //   {
      //     order_date: '2019/10/24',
      //     orderamount: '0',
      //     order_id: '16',
      //   },
      // ]
      if (vm.reimburseList.length >= 0 && vm.reimburseList.length < 10) {
        vm.$refs.scroll.update(true)
      }
linxin's avatar
linxin committed
83 84 85 86 87 88 89
    //     }
    //   })
    },
  },
}
</script>

linxin's avatar
linxin committed
90
<style lang="less">
linxin's avatar
linxin committed
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
#reimburse {
  .h-header-btn {
    img {
      width: 16px;
      height: 16px;
      margin-left: 4px;
    }
    span {
      font-family: PingFangSC-Semibold;
      margin-left: 16px;
      font-size: 17px;
      letter-spacing: 0.61px;
      line-height: 24px;
    }
  }
  .hinput {
    position: relative;
    z-index: 50;
    width: 100%;
    height: 68px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3px;
    background: #fff;
    input {
      width: 351px;
linxin's avatar
linxin committed
118 119 120
      height: 36px;
      line-height: 36px;
      padding-left:12px;
linxin's avatar
linxin committed
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
      margin: 0 auto;
      opacity: 0.4;
      border: none;
      background: url("../../assets/drawback/uncheck.png") 310px no-repeat;
      background-size: 16px 16px;
      background-color: rgba(239, 239, 239, 0.55);
    }
    input:focus {
      background-color: #fff;
      background: url("../../assets/drawback/check.png") 310px no-repeat;
      background-size: 16px 16px;
      border: 1px solid #1d3fff;
    }
  }
  .content {
    margin-top: 10px;
  }
  .scrollContent {
    padding-bottom: 70px;
  }
  .reimburse-wrap {
    margin: 10px;
  }
  .hls-item .contents .add-name .left-icon {
    width: 30px;
  }
  .add-name {
    .time-font {
      font-family: PingFangSC-Regular;
      font-size: 14px;
      color: rgba(56, 63, 69, 0.6);
    }
  }
  .add-content {
    .money-font {
      font-family: Verdana-Bold;
      font-size: 15px;
      color: #1d3fff;
    }
    .time-font {
      font-family: PingFangSC-Regular;
      font-size: 14px;
      color: rgba(56, 63, 69, 0.6);
    }
  }
linxin's avatar
linxin committed
166 167 168 169 170
  .content {
    position: absolute;
    top: 0;
  }
  .scrollContent {
linxin's avatar
linxin committed
171
    padding-top: 2.05rem;
linxin's avatar
linxin committed
172 173 174 175 176 177 178 179
    padding-bottom: 20px;
  }
  .tab-style {
    width: 100%;
    position: absolute;
  }
}
.platform-ios {
linxin's avatar
linxin committed
180
  #reimburse {
linxin's avatar
linxin committed
181
    .scrollContent {
linxin's avatar
linxin committed
182
      padding-top: 2.45rem;
linxin's avatar
linxin committed
183 184 185 186 187 188
    }
  }
}

@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
  .platform-ios {
linxin's avatar
linxin committed
189
    #reimburse {
linxin's avatar
linxin committed
190
      .scrollContent {
linxin's avatar
linxin committed
191
        padding-top: 3.05rem;
linxin's avatar
linxin committed
192 193 194 195 196 197 198
      }
    }
  }
}
// iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) {
  .platform-ios {
linxin's avatar
linxin committed
199
    #reimburse {
linxin's avatar
linxin committed
200
      .scrollContent {
linxin's avatar
linxin committed
201
        padding-top: 3.05rem;
linxin's avatar
linxin committed
202
      }
linxin's avatar
linxin committed
203 204 205 206 207 208 209 210 211 212 213 214 215
       .hinput {
 input {
      width: 351px;
      // height: 36px;
      padding:8px 20px;
      margin: 0 auto;
      opacity: 0.4;
      border: none;
      background: url("../../assets/drawback/uncheck.png") 310px no-repeat;
      background-size: 16px 16px;
      background-color: rgba(239, 239, 239, 0.55);
    }
       }
linxin's avatar
linxin committed
216 217
    }
  }
linxin's avatar
linxin committed
218 219
}
</style>