移动端

45 lines
905 B

<template>
2 months ago
<view class="wd-flex wd-flex-col wd-flex-center" style="height: 100%; gap: 10px">
<icon type="waiting" size="40" />
<button click="btnLogin">允许登陆</button>
</view>
</template>
<script>
2 months ago
import {
getAccessToken,getOpenId
} from '@/utils/auth'
import {qrLogin}from '@/api/login'
export default {
data() {
return {}
},
onShow(res) {
console.log(res)
},
methods: {
btnLogin() {
const scene = decodeURIComponent(query.scene)
const openid = getOpenId()
console.log('登陆信息发送', scene)
console.log('opeid', openid)
qrLogin({
code:scene,
openid:openid
})
}
},
onLoad(query) {
// scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene
const scene = decodeURIComponent(query.scene)
console.log('登陆信息发送', scene)
}
}
</script>
2 months ago
<style lang="scss"></style>