更新了小程序关闭

This commit is contained in:
weipengfei 2023-09-02 13:27:14 +08:00
parent caa6828681
commit 709eb09bdc
3 changed files with 30 additions and 5 deletions

View File

@ -1,8 +1,8 @@
<template>
<view class="oa_home" style="oaColor">
<!-- <image class="header_bg" src="../../static/img/home/head-bg.png"></image> -->
<u-navbar v-if="uniMP" @leftClick="leftClick" :autoBack="true" bgColor="rgba(0,0,0,0)"
leftIconColor=" #fff">
<u-navbar v-if="uniMP" @leftClick="leftClick" bgColor="rgba(0,0,0,0)"
leftIconColor=" #fff" :autoBack="false">
</u-navbar>
<view class="home_header" :class="!ApproveList.length > 0 ? 'home_header_no_data' : ''">
<view style="

View File

@ -2,6 +2,9 @@
<view class="login">
<!-- <image class="bg-iamge" src="../../static/img/login/login_back_img.png"></image> -->
<hx-lottie :options="options" ref="lottie" style="width: 100vw;height: 100vh;transform: scale(1.3);background-color: #0122c7;"/>
<u-navbar v-if="uniMP" @leftClick="leftClick" bgColor="rgba(0,0,0,0)"
leftIconColor=" #fff" :autoBack="false">
</u-navbar>
<!-- #ifdef APP-PLUS||H5 -->
<!-- <view style="height: var(--status-bar-height)"></view> -->
<!-- #endif -->
@ -56,6 +59,7 @@
options: {
data: '',
},
uniMP: false,
tabList: [{
name: '账号登录'
},
@ -79,12 +83,21 @@
this.options.data = bj;
// this.$refs.lottie.call('play');
this.initTerminal();
},
onShow() {
if(uni.getStorageSync('uniMP'))this.uniMP = true;
},
methods: {
changeTabs(e) {
this.current = e.index;
this.formData.scene = e.index + 1;
},
leftClick(e) {
uni.sendHostEvent('closeApp', e, (ret) => {
//
console.log('关闭应用'+JSON.stringify(ret));
});
},
// id
getId() {
// #ifdef APP-PLUS

View File

@ -5,10 +5,14 @@
<view style="position: absolute;bottom: 0;left: 0;overflow: hidden;border-radius: 0;">
<hx-lottie :options="options" ref="lottie" style="width: 100vw;height: 460rpx;transform: scale(1.2);background-color: #0122c7;"/>
</view>
<u-navbar v-if="uniMP" @leftClick="leftClick" bgColor="rgba(0,0,0,0)"
leftIconColor=" #fff" :autoBack="false">
</u-navbar>
<!-- #ifdef APP-PLUS||H5 -->
<view style="height: var(--status-bar-height);"></view>
<!-- <view style="height: 30rpx"></view> -->
<view style="height: 100rpx"></view>
<view v-if="!uniMP" style="height: var(--status-bar-height)"></view>
<view style="height: 30rpx"></view>
<!-- <view style="height: 100rpx"></view> -->
<view v-if="uniMP" style="height: 44px"></view>
<!-- #endif -->
<view class="personage">
<view class="my_msg flex_a_c_j_sb">
@ -96,6 +100,7 @@
options: {
data: '',
},
uniMP: false,
// myOaData: [],
src: 'https://cdn.uviewui.com/uview/album/1.jpg',
modelShow: false
@ -105,6 +110,7 @@
this.options.data = bj;
},
onShow() {
if(uni.getStorageSync('uniMP'))this.uniMP = true;
this.getOaUserInfo();
},
onHide() {
@ -142,6 +148,12 @@
},
methods: {
...mapActions(['getWxLogin']),
leftClick(e) {
uni.sendHostEvent('closeApp', e, (ret) => {
//
console.log('关闭应用'+JSON.stringify(ret));
});
},
login() {
uni.reLaunch({
url: '/pages/oaLogin/oaLogin'