officialAccount/pages/index/index.vue

46 lines
878 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="login-container">
<button :disabled="loading" @click="login()">
{{ loading ? '加载中...' : '微信登录' }}
</button>
<text v-if="error">错误{{ error.message }}</text>
<view class="" @click="jump">
111111111111111111111111111111111
</view>
<view class="" @click="jumpto">
2222
</view>
</view>
</template>
<script setup>
import { useWeChatAuth } from '@/compontent/useWeChatAuth.js';
const { login, loading, error } = useWeChatAuth();
const jump = () =>{
console.log("???")
uni.navigateTo({
url: "/pages/index/callback"
});
}
</script>
<style scoped>
.login-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
}
button {
padding: 12px 24px;
font-size: 16px;
border-radius: 4px;
}
text {
margin-top: 8px;
color: red;
}
</style>