<template>
  <view class="px-base">
    <CuNavbar title="任务详情"></CuNavbar>
    <view
      class="mt-30rpx card-shadow bg-white rounded-19rpx px-base text-[#333333] text-27rpx"
    >
      <view class="py-20rpx flex items-center justify-between">
        <view>申请人</view>
        <view class="text-hex-999999">测试人</view>
      </view>
      <uv-line></uv-line>
      <view class="py-20rpx flex items-center justify-between">
        <view>所属门店</view>
        <view class="text-hex-999999">具体门店名称</view>
      </view>
      <uv-line></uv-line>
      <view class="py-20rpx flex items-center justify-between">
        <view>电话号码</view>
        <view class="text-hex-999999">具体门店名称</view>
      </view>
      <uv-line></uv-line>
      <view class="py-20rpx flex items-center justify-between">
        <view>申请时间</view>
        <view class="text-hex-999999">具体门店名称</view>
      </view>
      <uv-line></uv-line>
      <view class="py-20rpx">
        <view>申请范围</view>
        <view class="text-hex-999999 mt-20rpx">具体门店名称</view>
      </view>
      <uv-line></uv-line>
      <view class="py-20rpx">
        <view>清洁结果</view>
        <view class="text-hex-999999 mt-20rpx">
          <view class="bg-gray-50 b-solid w-130rpx h-130rpx"></view>
        </view>
      </view>
    </view>
    <view class="h-100rpx">
      <view
        class="fixed bottom-0 left-0 right-0 h-120rpx bg-white flex items-center px-base space-x-30rpx"
      >
        <view class="flex-1">
          <uv-button color="#999999" shape="circle" plain block>
            拒绝
          </uv-button>
        </view>
        <view class="flex-1">
          <uv-button type="primary" shape="circle" block> 通过 </uv-button>
        </view>
      </view>
    </view>
  </view>
</template>
<script setup>
import CuNavbar from '@/components/cu-navbar/index'
import { onLoad } from '@dcloudio/uni-app'
import { http } from '@/utils/request'
import { ref } from 'vue'

const id = ref(null)
onLoad((opt) => {
  id.value = opt.id

  getDetail()
})

const getDetail = async () => {
  const resdata = await http.get(`/tasks/${id.value}`, {
    params: {
      id: id.value,
    },
  })
  console.log(resdata);
}
</script>
