From 2b3715f1610b4176d7abe33e34542389cef61853 Mon Sep 17 00:00:00 2001
From: zhuguifei <zhuguifei@zhuguifeideiMac.local>
Date: 星期六, 12 四月 2025 17:12:22 +0800
Subject: [PATCH] Merge branch 'main' of http://lanpucloud.cn:1111/r/eims-master

---
 eims-ui-mobile/src/pages/equ/components/request.vue |   67 +++++++++++++++++++++++++++++++++
 1 files changed, 67 insertions(+), 0 deletions(-)

diff --git a/eims-ui-mobile/src/pages/equ/components/request.vue b/eims-ui-mobile/src/pages/equ/components/request.vue
new file mode 100644
index 0000000..d8a1e96
--- /dev/null
+++ b/eims-ui-mobile/src/pages/equ/components/request.vue
@@ -0,0 +1,67 @@
+<route lang="json5">
+{
+  layout: 'demo',
+  style: {
+    navigationBarTitleText: '璇锋眰',
+  },
+}
+</route>
+
+<template>
+  <view class="p-6 text-center">
+    <view class="my-2">浣跨敤鐨勬槸 laf 浜戝悗鍙�</view>
+    <view class="text-green-400">鎴戠殑鎺ㄨ崘鐮侊紝鍙互鑾峰緱浣i噾</view>
+
+    <!-- #ifdef H5 -->
+    <view class="my-2">
+      <a class="my-2" :href="recommendUrl" target="_blank">{{ recommendUrl }}</a>
+    </view>
+    <!-- #endif -->
+
+    <!-- #ifndef H5 -->
+    <view class="my-2 text-left text-sm">{{ recommendUrl }}</view>
+    <!-- #endif -->
+
+    <!-- http://localhost:9000/#/pages/index/request -->
+    <wd-button @click="run" class="my-6">鍙戦�佽姹�</wd-button>
+    <view class="h-16">
+      <view v-if="loading">loading...</view>
+      <block v-else>
+        <view class="text-xl">璇锋眰鏁版嵁濡備笅</view>
+        <view class="text-green leading-8">{{ JSON.stringify(data) }}</view>
+      </block>
+    </view>
+    <wd-button type="error" @click="reset" class="my-6" :disabled="!data">閲嶇疆鏁版嵁</wd-button>
+  </view>
+</template>
+
+<script lang="ts" setup>
+import { getFooAPI, postFooAPI, IFooItem } from '@/service/index/foo'
+import { findPetsByStatusQueryOptions } from '@/service/app'
+import { useQuery } from '@tanstack/vue-query'
+
+const recommendUrl = ref('http://laf.run/signup?code=ohaOgIX')
+
+// const initialData = {
+//   name: 'initialData',
+//   id: '1234',
+// }
+const initialData = undefined
+// 閫傚悎灏戦儴鍒嗗叏灞�鎬х殑鎺ュ彛鈥斺�斺�斺�斿涓〉闈㈤兘闇�瑕佺殑璇锋眰鎺ュ彛锛岄澶栫紪鍐欎竴涓� Service 灞�
+const { loading, error, data, run } = useRequest<IFooItem>(() => getFooAPI('鑿查附'), {
+  immediate: true,
+  initialData,
+})
+
+// 浣跨敤 vue-query 鐨� useQuery 鏉ヨ姹傛暟鎹紝鍙仛鍙傝�冿紝鏄惁浣跨敤璇锋牴鎹疄闄呮儏鍐佃�屽畾
+const {
+  data: data2,
+  error: error2,
+  isLoading: isLoading2,
+  refetch,
+} = useQuery(findPetsByStatusQueryOptions({ params: { status: ['available'] } }))
+
+const reset = () => {
+  data.value = initialData
+}
+</script>

--
Gitblit v1.9.3