|
@@ -1,41 +1,48 @@
|
|
|
<template>
|
|
|
- <layout-page>
|
|
|
- <view class="defaultBgc" style="height: 100vh;">
|
|
|
- <view class="logo">
|
|
|
- <image src="https://minio.menduner.com/dev/19cce88e87fb8e895fbbe4418a937d610b2c20b8f87c6705569a096aca0a91b0.png"></image>
|
|
|
- </view>
|
|
|
-
|
|
|
- <button v-if="useUserStore.isLogin" class="recomm-button MiSans-Medium" @click="handleTokenLogin">一键登录(有token)</button>
|
|
|
- <button v-else class="recomm-button MiSans-Medium" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">一键登录(无token)</button>
|
|
|
-
|
|
|
- <view class="agreement-box ss-flex ss-row-center">
|
|
|
- <uni-icons size="20" :type="protocol ? 'checkbox-filled' : 'circle'" :color="protocol ? '#00B760' : '#ccc'" @tap="protocol = !protocol"></uni-icons>
|
|
|
- <view class="color-999 ss-flex ss-col-center ss-m-l-8 font-size-13">
|
|
|
- <span class="MiSans-Normal">我已阅读并遵守</span>
|
|
|
- <view class="color-primary MiSans-Medium" @tap.stop="handleToDetail('user')">
|
|
|
- 《用户协议》
|
|
|
+ <view>
|
|
|
+ <Navbar title="扫码登录网页" :textLeft="false" />
|
|
|
+ <layout-page>
|
|
|
+ <view :style="{'padding-top': navbarHeight + 'px'}">
|
|
|
+ <view class="commonBackground"></view>
|
|
|
+ <view class="defaultBgc" :style="{'height': `calc(100vh - ${navbarHeight}px)`}">
|
|
|
+ <view class="logo">
|
|
|
+ <image src="https://minio.menduner.com/dev/19cce88e87fb8e895fbbe4418a937d610b2c20b8f87c6705569a096aca0a91b0.png"></image>
|
|
|
</view>
|
|
|
- <view class="agreement-text MiSans-Normal">和</view>
|
|
|
- <view class="color-primary MiSans-Medium" @tap.stop="handleToDetail('privacy')">
|
|
|
- 《隐私协议》
|
|
|
+
|
|
|
+ <button v-if="useUserStore.isLogin" class="recomm-button MiSans-Medium" @click="handleTokenLogin">一键登录</button>
|
|
|
+ <button v-else class="recomm-button MiSans-Medium" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">一键登录</button>
|
|
|
+
|
|
|
+ <view class="agreement-box ss-flex ss-row-center">
|
|
|
+ <uni-icons size="20" :type="protocol ? 'checkbox-filled' : 'circle'" :color="protocol ? '#00B760' : '#ccc'" @tap="protocol = !protocol"></uni-icons>
|
|
|
+ <view class="color-999 ss-flex ss-col-center ss-m-l-8 font-size-13">
|
|
|
+ <span class="MiSans-Normal">我已阅读并遵守</span>
|
|
|
+ <view class="color-primary MiSans-Medium" @tap.stop="handleToDetail('user')">
|
|
|
+ 《用户协议》
|
|
|
+ </view>
|
|
|
+ <view class="agreement-text MiSans-Normal">和</view>
|
|
|
+ <view class="color-primary MiSans-Medium" @tap.stop="handleToDetail('privacy')">
|
|
|
+ 《隐私协议》
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- </layout-page>
|
|
|
+ </layout-page>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref } from 'vue'
|
|
|
+import { ref, onMounted } from 'vue'
|
|
|
import layoutPage from '@/layout'
|
|
|
import { userStore } from '@/store/user'
|
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
|
import { weixinLoginAuthorize } from '@/api/qrcodeLogin.js'
|
|
|
import { checkPersonBaseInfo } from '@/utils/check'
|
|
|
import { showAuthModal, closeAuthModal } from '@/hooks/useModal'
|
|
|
+import Navbar from '@/components/Navbar'
|
|
|
|
|
|
const useUserStore = userStore()
|
|
|
-const protocol = ref(true)
|
|
|
+const protocol = ref(false)
|
|
|
|
|
|
onLoad((options) => {
|
|
|
if (!useUserStore.isLogin) {
|
|
@@ -48,6 +55,24 @@ onLoad((options) => {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+const navbarHeight = ref(0)
|
|
|
+
|
|
|
+onMounted(async () => {
|
|
|
+ try {
|
|
|
+ const res = await new Promise((resolve, reject) => {
|
|
|
+ uni.getStorage({
|
|
|
+ key: 'navbarHeight',
|
|
|
+ success: (result) => resolve(result),
|
|
|
+ fail: (err) => reject(err)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ navbarHeight.value = res.data
|
|
|
+ console.log(navbarHeight.value, '扫码授权-导航栏高度')
|
|
|
+ } catch (error) {
|
|
|
+ console.error('读取本地缓存出错:', error)
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
// 查看协议详情
|
|
|
const handleToDetail = (type) => {
|
|
|
const url = type === 'user' ? '/pagesB/agreement/user' : '/pagesB/agreement/privacy'
|
|
@@ -129,6 +154,7 @@ const getPhoneNumber = async (e) => {
|
|
|
height: 85px;
|
|
|
border-radius: 6px;
|
|
|
margin: 20vh auto 8vh auto;
|
|
|
+ z-index: 1;
|
|
|
}
|
|
|
}
|
|
|
</style>
|