<!--
 * @Author: euzhi
 * @Description: 我的呼叫记录
-->
<template>
<view class="appCotent">
<div class="myRecord">
    <div class="record__item" v-for="(vo,inx) in items" :key="inx">
        <div class="item__top">
            <div class="top__time">
                时间:{{vo.applyDate}}
            </div>
            <div class="top__state" :class="vo.state==='微信'?'':'phone__state'">
                {{vo.confirmType=="1"?'电话':'微信'}}
            </div>
        </div>
        <div class="item__content">
            <div>
                车牌号:{{vo.carNo}}
            </div>
            <div>
                通知类型:{{type}}
            </div>
            <div>
                车主手机号:{{vo.userMobile}}
            </div>
        </div>
        <div class="item__btn" @click="goDetail(vo.id)">
            <div>
                查看详情
            </div>
        </div>
    </div>
</div>
</view>
</template>

<script>
export default {
    data() {
        return {
            items: [],
			type: '请求他人挪车'
        };
    },
    methods: {
        goDetail(id){
               uni.navigateTo({
                url: '/pagesB/pages/move-car/callDetail?id=' + id
            }) 
        },
		getApplyMoveLogList(){
			let opts = { url: '/app/moveLog/apply/list', method: 'get' };
			this.http.httpTokenRequest(opts, {}).then(res => {
				if (res.data.code == 200) {
					this.items = res.data.rows
				}
			})
		},
    },
	created() {
		this.getApplyMoveLogList()
	},
}
</script>

<style lang="scss" scoped>
.myRecord {
    padding: 40rpx 0rpx;

    .record__item {
        background: #FFFFFF;
        box-shadow: 0rpx 0rpx 28rpx 1rpx rgba(232, 232, 232, 0.2);
        border-radius: 20rpx;
        padding: 30rpx 0;
        margin-bottom: 30rpx;

        .item__top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 40rpx;
            border-bottom: 1rpx solid rgba(0, 0, 0, .1);
            padding-bottom: 30rpx;
            margin-bottom: 30rpx;

            .top__state {
                background: #cfffe2;
                width: 70rpx;
                height: 34rpx;
                font-size: 26rpx;
                font-family: PingFang SC;
                font-weight: 500;
                color: #00AD42;
                line-height: 34rpx;
                text-align: center;
                border-radius: 4rpx;
            }

            .phone__state {
                background: #ffebd8;
                color: rgba(248, 141, 40, 1);
            }

            .top__item {
                font-size: 26rpx;
                font-family: PingFang SC;
                font-weight: 500;
                color: #666666;
            }
        }

        .item__content {
            padding: 0 40rpx;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            justify-content: space-between;

            >div {
                width: 50%;
                margin-bottom: 30rpx;

                font-size: 30rpx;
                font-family: PingFang SC;
                font-weight: 500;
                color: #333333;
            }

            >div:nth-of-type(3) {
                width: 100%;
            }
        }

        .item__btn {
            display: flex;
            justify-content: flex-end;
            padding-right: 40rpx;
            font-size: 30rpx;
            font-family: PingFang SC;
            font-weight: 500;
            color: #999999;

            >div {
                width: 180rpx;
                height: 56rpx;
                text-align: center;
                line-height: 56rpx;
                border-radius: 28rpx;
                border: 1rpx solid #DDDDDD;
                font-size: 30rpx;
                font-family: PingFang SC;
                font-weight: 500;
                color: #999999;

            }
        }
    }
}
</style>
