优化微信扫码登录功能实现
This commit is contained in:
@ -75,7 +75,7 @@
|
||||
</div>
|
||||
|
||||
<!-- wx二维码弹窗 -->
|
||||
<wx v-model:visible="visible" v-model:qrcode="qrcode" />
|
||||
<wx v-model:visible="visible" v-if="visible" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@ -83,7 +83,7 @@
|
||||
import { getCurrentInstance, computed, watchEffect, ref } from 'vue'
|
||||
import { handleLoginQQ, handleLoginWechat } from '~/utils/login'
|
||||
import type { UserStatisticsCountRespVO } from '~/api/personal-center/types'
|
||||
import { getUserStatistics, getLoginQrcode } from '~/api/personal-center/index'
|
||||
import { getUserStatistics } from '~/api/personal-center/index'
|
||||
import useUserStore from '~/stores/user'
|
||||
const userStore = useUserStore()
|
||||
const app = useNuxtApp()
|
||||
@ -94,15 +94,9 @@
|
||||
})
|
||||
|
||||
// 打开微信二维码
|
||||
const qrcode = ref<string>()
|
||||
const visible = ref<boolean>(false)
|
||||
const handleLoginWechatV2 = () => {
|
||||
getLoginQrcode().then((res) => {
|
||||
if (res.code === 0) {
|
||||
visible.value = true
|
||||
qrcode.value = res.data
|
||||
}
|
||||
})
|
||||
visible.value = true
|
||||
}
|
||||
|
||||
// 获取用户统计信息
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
<!-- 热门图纸 -->
|
||||
<PopularDrawings></PopularDrawings>
|
||||
<!-- 排行榜 -->
|
||||
<Leaderboard></Leaderboard>
|
||||
<!-- <Leaderboard></Leaderboard> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user