6.25添加浏览器打开
This commit is contained in:
parent
76365cb774
commit
3fa5f7177f
|
|
@ -3,11 +3,9 @@
|
|||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
import '@vue/runtime-core'
|
||||
|
||||
export {}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
|
|
@ -19,6 +17,7 @@ declare module '@vue/runtime-core' {
|
|||
VanForm: typeof import('vant/es')['Form']
|
||||
VanIcon: typeof import('vant/es')['Icon']
|
||||
VanNavBar: typeof import('vant/es')['NavBar']
|
||||
VanOverlay: typeof import('vant/es')['Overlay']
|
||||
VanPicker: typeof import('vant/es')['Picker']
|
||||
VanPopup: typeof import('vant/es')['Popup']
|
||||
VanSwipe: typeof import('vant/es')['Swipe']
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
|
|
@ -58,6 +58,26 @@
|
|||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
<van-overlay
|
||||
:show="showPop"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
width: 100vw;
|
||||
height: 10vh;
|
||||
display: flex;
|
||||
justify-content: right;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<span style="color: #fff; font-size: 18px">点击此处用浏览器打开</span>
|
||||
<img
|
||||
:src="arrowImg"
|
||||
style="width: 20vw; height: 100%;"
|
||||
alt=""
|
||||
>
|
||||
</div>
|
||||
</van-overlay>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
|
@ -68,7 +88,7 @@
|
|||
import Crypoto from '../../api/AesCbc'
|
||||
import { showFailToast, showSuccessToast } from 'vant'
|
||||
import './scss/index.scss'
|
||||
|
||||
import arrowImg from '../../static/openArrow.png'
|
||||
|
||||
const cry: any = new Crypoto()
|
||||
const username = ref<any>('')
|
||||
|
|
@ -78,6 +98,8 @@
|
|||
const pwdPlaceHolder = ref<string>('密码')
|
||||
const pwdType = ref<any>('password')
|
||||
const pwdStatus = ref<number>(0)
|
||||
const showPop = ref<boolean>(false)
|
||||
|
||||
|
||||
// 输入框显示密码
|
||||
const showPwd = () => {
|
||||
|
|
@ -155,8 +177,29 @@
|
|||
})
|
||||
}
|
||||
|
||||
const isAndroid = () => {
|
||||
showPop.value = true
|
||||
/* showConfirmDialog({
|
||||
title: '使用浏览器打开',
|
||||
message: '检测到当前为微信浏览器,建议使用外部浏览器打开此页面',
|
||||
showCancelButton: false
|
||||
}).then(() => {
|
||||
// console.log(import.meta.env)
|
||||
window.location.href = 'http://112.29.103.165:1616/yntj/#/accountLogin'
|
||||
}).catch(() => {
|
||||
console.log('取消')
|
||||
}) */
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
let ua = window.navigator.userAgent.toLowerCase()
|
||||
console.log(ua)
|
||||
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
|
||||
isAndroid()
|
||||
} else {
|
||||
// isAndroid()
|
||||
console.log('不是微信')
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue