<template>
    <view class="container">
        <view class="auditStatusContainer" v-if="itemObj.status == 1">
            <view class="header">
                <view class="statusIcon">
                    <image src="http://localhost:8080//enter_audit1.png" mode="aspectFill" class="auditStatus" />
                </view>
                <view class="title">
                    审核中
                </view>
            </view>
            <view class="content">
                <view>您的入驻申请正在审核中</view>
                <view>请耐心等待工作人员处理</view>
            </view>
            <view class="info">
                <view>
                    <view class="info_text">申请提交时间</view>
                    <view>{{ itemObj.create_time }}</view>
                </view>
                <view>
                    <view class="info_text">当前审核环节</view>
                    <view class="info_text2">资质验证中</view>
                </view>
            </view>
        </view>
        <view class="auditStatusContainer" v-if="itemObj.status == 2">
            <view class="header">
                <view class="statusIcon">
                    <image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/af_√.png" mode="aspectFill"
                        class="auditStatus" />
                </view>
                <view class="title">
                    入驻成功
                </view>
            </view>
            <view class="content">
                <view>恭喜您！您的店铺已成功入驻我们平台</view>
            </view>
            <view class="info">
                <view>
                    <view class="info_text">店铺名称</view>
                    <view>{{ itemObj.merchant_name }}</view>
                </view>
                <view>
                    <view class="info_text">入住时间</view>
                    <view>{{ itemObj.handle_time || '' }}</view>
                </view>
                <view>
                    <view class="info_text">店铺ID</view>
                    <view>{{ itemObj.merchant_code }}</view>
                </view>
            </view>
            <view>
                <button class="btn" @click="goShopManage">进入店铺管理</button>
            </view>
        </view>
        <view class="auditStatusContainer" v-if="itemObj.status == 3">
            <view class="header">
                <view class="statusIcon">
                    <image src="http://localhost:8080//enter_audit2.png" mode="aspectFill" class="auditStatus" />
                </view>
                <view class="title">
                    审核失败
                </view>
            </view>
            <view class="content">
                <view>很抱歉，您的入驻申请未通过审核</view>
                <view>请修改后重新提交</view>
            </view>
            <view class="info">
                <view>
                    <view class="info_text">申请提交时间</view>
                    <view>{{ itemObj.create_time }}</view>
                </view>
                <view>
                    <view class="info_text">审核完成时间</view>
                    <view>{{ itemObj.handle_time || '' }}</view>
                </view>
            </view>
            <view class="warning" v-if="itemObj.remark">
                <view class="warning_title">审核未通过原因</view>
                <view>
                    {{ itemObj.remark || '' }}
                </view>
            </view>
            <view>
                <button class="btn" @click="resubmit">重新提交</button>
            </view>
        </view>
    </view>
</template>
<script>
import { request, NavgateTo } from '../../../utils/index';
import { apiArr } from '../../../api/v2Home.js'
export default {
    data() {
        return {
            itemObj: {}
        }
    },
    onLoad(options) {
        this.itemObj = JSON.parse(options.itemObj);
    },
    methods: {
        goShopManage() {
            NavgateTo('/packages/storeManagement/index/index');
        },
        resubmit() {
            NavgateTo('/packages/shopEnter/index/index?itemObj=' + JSON.stringify(this.itemObj));
        }
    }
}
</script>
<style>
@import url("./index.css");
</style>