From 61f17044e7c30a2d8ca952c1d6c9783f711b0044 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期五, 09 九月 2022 14:08:20 +0800
Subject: [PATCH] 89

---
 src/views/home/index.vue |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 143460a..4ea1389 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -1,22 +1,32 @@
 <script lang="ts" setup>
     import { onMounted,computed } from 'vue'
+    import { ajaxGet } from '@/utils/axios'
     import { useCounterStore } from '@/stores/counter'
     import { Button  } from 'vant'
     import {useRoute} from 'vue-router'
     const router = useRoute()
     const counter = useCounterStore()
-
+    const data={
+        name:'cheng',
+        age:18
+    }
     // counter.count++
     const count=computed(()=>{
         return counter.count
     })
-    console.log(count, 'count')
     const add=()=>{
         counter.increment()
     }
     onMounted(() => {
-        console.log('初始化')
-        console.log(router.query)
+        console.log('初始化',router)
+        const queryInfo=router.query
+        const {code}=queryInfo
+        // if (code){
+        //     ajaxGet('wechat/code',{code}).then((re:any)=>{
+        //         console.log(re)
+        //     })
+        // }
+        console.log(code)
     })
 
 </script>
@@ -25,5 +35,6 @@
     <Button @click="add" type="primary">
         Tertiary{{count}}
     </Button>
+    <div>{{data.name}}</div>
 </template>
 

--
Gitblit v1.8.0