<template>
  <view class="user-center-page">
    <up-card
        :border="false"
        :foot-border-top="false"
        v-for="(item,index) in orderList"
        :key="`${item.orderNo}_${index}`"
        :show-head="false"
    >

      <template #body>
        <view class="card-body">
          <view class="u-flex common-item-center common-justify-between" style="font-size: 14px;margin-top: 5px;">
            <view class="u-line-1" style="flex: 1;margin-right: 20px;color: #333"> {{ item.orderName || '无' }}</view>
            <view style="color: #000">{{ timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
          </view>
          <view class="u-line-1 ">
            {{ item.remark || '无' }}
          </view>


        </view>
      </template>
    </up-card>
  </view>
</template>

<script setup lang="ts">
import { computed,ref } from 'vue'
import { useUserStore } from '@/pinia/user'
import {  onShow } from '@dcloudio/uni-app'
import { getMsg } from '@/api/user'
// 初始化Pinia仓库
const userStore = useUserStore()
import { timeFormat } from '@/uni_modules/uview-plus';
// 计算属性获取用户信息（响应式）
const userInfo = computed(() => userStore.userInfo.user || {})
const orderList = ref([
  {
    orderNo:'123',
    orderName:'阜成门内大街巡检阜成门内大街巡检阜成门内大街巡检阜成门内大街巡检阜成门内大街巡检阜成门内大街巡检',
    remark:'阜成门内大街周期计划即将到期，请及时处理。阜成门内大街周期计划即将到期，请及时处理。阜成门内大街周期计划即将到期，请及时处理。阜成门内大街周期计划即将到期，请及时处理。',
    createTime:'1736160000000'
  },
  {
    orderNo:'1223',
    orderName:'阜成门内大街巡检阜成门内大街巡检阜成门内大街巡检阜成门内大街巡检阜成门内大街巡检阜成门内大街巡检',
    remark:'阜成门内大街周期计划即将到期，请及时处理。阜成门内大街周期计划即将到期，请及时处理。阜成门内大街周期计划即将到期，请及时处理。阜成门内大街周期计划即将到期，请及时处理。',
    createTime:'1736160000000'
  }
])

// 页面显示时检查登录状态
onShow( async () => {
  const  res = await getMsg()
})
</script>



<style lang="scss" scoped>

</style>