src/App.vue
@@ -4,10 +4,23 @@ </div> </template> <script setup> // import { useWindowSize } from '@/utils/hook.js' // const { width, height } = useWindowSize() <script> import { isWeixin } from '@/utils/UA.js' import { getWxSignature } from '@/utils/wxjssdk.js' export default { data() { return { } }, watch: { '$route.path': function(){ if (isWeixin) { getWxSignature(this.$route) } }, } } </script> <style scoped>