123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- <template>
- <view class="container">
- <view class="list" v-for="(item,index) in list" :key='index'>
- <view class="list-top">
- 救援者姓名:{{item.to_name}}
- </view>
- <view class="list-phone">
- 手机号:{{item.to_phone}}
- </view>
- <view class="list-time">
- 救援时间:{{item.add_time}}
- </view>
- <view class="list-type" v-if="item.status == 1">
- 已接受
- </view>
- <view class="list-type" v-if="item.status == 0">
- 未接受
- </view>
- <view class="list-type" v-if="item.status == 2">
- 已拒绝
- </view>
- <view class="list-box">
- <view class="box-item" @click="tocall(item.to_phone)">
- <image src="../../static/icon/call.png" mode="" class="call"></image>
- 拨打电话
- </view>
-
-
- </view>
- </view>
- <empty v-if="list.length === 0"></empty>
- <uni-load-more :status="loadingType"></uni-load-more>
- </view>
- </template>
- <script>
- import { getseek } from '@/api/index.js';
- import empty from '@/components/empty';
- import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
- export default {
- components: {
- empty,
- uniLoadMore
- },
- data() {
- return{
- page:1,
- limit:10,
- list:[],
- loadingType: 'more',
- }
- },
- onLoad() {
- this.loadData();
- },
- // 下拉加载
- onReachBottom() {
- this.loadData();
- },
- methods:{
- tocall(num){
- console.log(num);
- uni.makePhoneCall({
- phoneNumber: num //仅为示例
- });
- },
- async loadData() {
- let obj = this;
- if (obj.loadingType === 'noMore') {
- //防止重复加载
- return;
- }
- // 修改当前对象状态为加载中
- obj.loadingType = 'loading';
- getseek({
- page: obj.page,
- limit: obj.limit
- }).then(({ data }) => {
- obj.list = obj.list.concat(data);
- obj.page++;
- if (obj.limit == data.length) {
- obj.loadingType = 'more';
- } else {
- obj.loadingType = 'noMore';
- }
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .container{
- line-height: 1;
- .list{
- width: 710rpx;
- background: #FFFFFF;
- box-shadow: 0px 5rpx 5rpx 0px rgba(35, 24, 21, 0.06);
- border-radius: 10rpx;
- margin: 20rpx auto 0;
- padding: 30rpx;
- .list-top{
- font-size: 28rpx;
- font-weight: 500;
- color: #333333;
- line-height: 36px;
- }
- .list-phone{
- font-size: 24rpx;
- font-weight: 500;
- color: #666666;
- margin-top: 20rpx;
- }
- .list-time{
- font-size: 24rpx;
- font-weight: 500;
- color: #666666;
- margin-top: 20rpx;
- }
- .list-type{
- font-size: 28rpx;
- font-weight: 500;
- color: #C9101B;
- margin-top: 20rpx;
- }
- .list-box{
- display: flex;
- justify-content: center;
- padding: 0 40rpx;
- margin-top: 20rpx;
- .box-item{
- width: 210rpx;
- height: 65rpx;
- background: #C9101B;
- border-radius: 30rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 28rpx;
- font-weight: 500;
- color: #FFFFFF;
- .call{
- width: 28rpx;
- height: 40rpx;
- margin-right: 10rpx;
- }
-
- }
- .box-item1{
- width: 210rpx;
- height: 65rpx;
- background: #FF4F4F;
- border-radius: 30rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 28rpx;
- font-weight: 500;
- color: #FFFFFF;
- .veo{
- width: 40rpx;
- height: 40rpx;
- margin-right: 10rpx;
- }
- }
- }
-
- }
- }
- </style>
|