This commit is contained in:
parent
144d1d4421
commit
84a3419032
|
|
@ -4,7 +4,7 @@
|
||||||
<!-- 如果是h5时,则显示登录页面 -->
|
<!-- 如果是h5时,则显示登录页面 -->
|
||||||
|
|
||||||
/*#ifdef H5 */
|
/*#ifdef H5 */
|
||||||
<view class="login" >
|
<view class="login">
|
||||||
<uni-forms :modelValue="loginForm" label-position="top" class="login-form">
|
<uni-forms :modelValue="loginForm" label-position="top" class="login-form">
|
||||||
<h1>用户登录</h1>
|
<h1>用户登录</h1>
|
||||||
<uni-forms-item required label="用户名">
|
<uni-forms-item required label="用户名">
|
||||||
|
|
@ -34,7 +34,6 @@
|
||||||
<view class="login-btn" @tap="onHandleLogin">登录</view>
|
<view class="login-btn" @tap="onHandleLogin">登录</view>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
@ -73,7 +72,7 @@ onMounted(async () => {
|
||||||
} else {
|
} else {
|
||||||
ticket.value = ''
|
ticket.value = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('🚀 ~ onMounted ~ origin:', val)
|
console.log('🚀 ~ onMounted ~ origin:', val)
|
||||||
if (val.ticket) {
|
if (val.ticket) {
|
||||||
try {
|
try {
|
||||||
|
|
@ -103,7 +102,26 @@ onMounted(async () => {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
showToast('登录失败')
|
uni.showToast({ title: '登录失败!', icon: 'none' })
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!isDev) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '请从i皖送APP登录!',
|
||||||
|
showCancel: false,
|
||||||
|
confirmText: '退出',
|
||||||
|
success: () => {
|
||||||
|
// 关闭APP
|
||||||
|
if (plus) {
|
||||||
|
plus.runtime.quit()
|
||||||
|
} else {
|
||||||
|
document.addEventListener('plusready', function () {
|
||||||
|
plus.runtime.quit()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue