feat: 调整登录逻辑

This commit is contained in:
duanshuwen
2025-09-12 22:20:01 +08:00
parent 07752394eb
commit c03a4200be
12 changed files with 248 additions and 175 deletions

View File

@@ -6,9 +6,14 @@
v-for="(item, index) in itemList"
:key="index"
>
<text class="more-tips-item-title" @click="sendReply(item)">{{
item
}}</text>
<button
class="reset-btn more-tips-item-title"
open-type="getPhoneNumber"
@getphonenumber="onLogin"
@click="sendReply(item)"
>
{{ item }}
</button>
</view>
</view>
</view>
@@ -16,6 +21,8 @@
<script setup>
import { defineProps } from "vue";
import { onLogin, checkToken } from "@/hooks/useGoLogin";
const emits = defineEmits(["replySent"]);
defineProps({
@@ -34,7 +41,9 @@ defineProps({
});
const sendReply = (text) => {
emits("replySent", text); // 向父组件传递数据
checkToken().then(() => {
emits("replySent", text); // 向父组件传递数据
});
};
</script>