feat: 调整登录逻辑
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user