<template>
    <div>
        <el-card class="!border-none mb-4" shadow="never">
            <el-form class="mb-[-16px]" :model="queryParams" inline>
                <el-form-item label="订单号" prop="nickname">
                    <el-input class="w-[280px]" v-model="queryParams.order_no" @keydown.enter="getLists" clearable
                        placeholder="请输入订单号" />
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click="getLists">查询</el-button>
                    <el-button @click="queryParams.order_no='';getLists()">重置</el-button>
                </el-form-item>
            </el-form>
        </el-card>
        <el-card class="!border-none" shadow="never">
           <pre v-if="info">{{ info }}</pre>
           <el-empty v-else></el-empty>
        </el-card>
    </div>
</template>

<script lang="ts" setup name="wechat_pay">
import { apiWechatQuery } from '@/api/wechat_query'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'

const queryParams = reactive({
    order_no: ''
})

const info = ref();
const getLists = ()=>{
    apiWechatQuery(queryParams).then(res=>{
        info.value = res
    }).catch(err=>{
        info.value = err
    })
}

</script>
