|
@@ -3,51 +3,14 @@ style:
|
|
|
navigationBarTitleText: 登录
|
|
|
</route>
|
|
|
<script lang="ts" setup>
|
|
|
-import { weixinMiniAppLogin } from '@/core/libs/requests'
|
|
|
-import { logo } from '@/core/libs/svgs'
|
|
|
-import { useUserStore } from '@/store'
|
|
|
+import { weixinMiniAppLogin } from '../../core/libs/requests'
|
|
|
+import { logo } from '../../core/libs/svgs'
|
|
|
+import { useUserStore } from '../../store'
|
|
|
|
|
|
const userStore = useUserStore()
|
|
|
const { setUserInfo } = userStore
|
|
|
const loginCode = ref('')
|
|
|
const phoneCode = ref('')
|
|
|
-const loginType = ref('weixin')
|
|
|
-const loginTypeOption = ref([
|
|
|
- {
|
|
|
- value: 'weixin',
|
|
|
- text: '微信',
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'univerify',
|
|
|
- text: '一键登录',
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'username',
|
|
|
- text: '账号密码',
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'smsCode',
|
|
|
- text: '手机验证码',
|
|
|
- },
|
|
|
-])
|
|
|
-const toLogin = () => {
|
|
|
- if (loginType.value === 'username') {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/uni_modules/uni-id-pages/pages/login/login-withpwd',
|
|
|
- })
|
|
|
- } else {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/login/login-withoutpwd?type=' + loginType.value,
|
|
|
- animationType: 'none',
|
|
|
- animationDuration: 0,
|
|
|
- })
|
|
|
- }
|
|
|
-}
|
|
|
-const toUserInfoPage = () => {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/uni_modules/uni-id-pages/pages/userinfo/userinfo?showLoginManage=true',
|
|
|
- })
|
|
|
-}
|
|
|
const getPhoneNumber = async ({ detail: { code: phoneCode } }) => {
|
|
|
const { code } = await uni.login()
|
|
|
console.log(code, phoneCode)
|