chenyc
2022-09-22 da3f19b5eb58fcd05623611376dbaf82add27f4f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<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
    })
    const add=()=>{
        counter.increment()
    }
    const shao=()=>{
    }
    onMounted(() => {
        console.log('初始化',router)
        const queryInfo=router.query
        const {code}=queryInfo
        console.log(code)
        if (code){
            ajaxGet('wechat/code',{code}).then((re:any)=>{
                console.log(re)
            })
        }
    })
 
</script>
 
<template>
    <div class="HomePage"></div>
</template>