From a939b60c9819df65c4eb59fb3164e5ad179ae854 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期五, 09 九月 2022 11:21:55 +0800
Subject: [PATCH] uo
---
src/views/home/index.vue | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 9716c23..29c0a89 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -1,5 +1,6 @@
<script lang="ts" setup>
import { onMounted,computed } from 'vue'
+ import { ajaxPost } from '@/utils/axios'
import { useCounterStore } from '@/stores/counter'
import { Button } from 'vant'
import {useRoute} from 'vue-router'
@@ -17,8 +18,15 @@
counter.increment()
}
onMounted(() => {
- console.log('初始化')
- console.log(router.query)
+ console.log('初始化',router)
+ const queryInfo=router.query
+ const {code}=queryInfo
+ if (code){
+ ajaxPost('wechat/code',`code=${code}`).then((re:any)=>{
+ console.log(re)
+ })
+ }
+ console.log(code)
})
</script>
--
Gitblit v1.8.0