修复bug

This commit is contained in:
weipengfei 2023-08-29 14:18:28 +08:00
parent 7f23c975c5
commit fcd2e196bb
5 changed files with 29 additions and 11 deletions

View File

@ -190,7 +190,6 @@ import {
import {
noticeList
} from "@/api/notice.js";
import { mapState } from "@/store/index.js"
// import tabbar from '../components/tabbar'
import {
getIndexListAPI,
@ -199,6 +198,7 @@ import {
getApproveListAPI,
getUserIndexAPI,
} from "@/api/oaApi.js";
import { mapState } from 'vuex';
import bj from "@/static/animation/home.json"
//#ifdef APP-PLUS
var jpushModule = uni.requireNativePlugin("JG-JPush");

View File

@ -37,9 +37,9 @@
<script>
import {
loginAccount,
userInfo,
test
userInfo
} from "@/api/oaUser.js"
import { getConfig } from "@/api/config.js";
import {
Toast
} from "../../libs/uniApi";
@ -102,8 +102,6 @@
if (this.formData.scene == 1 && !this.formData.password) return Toast('密码不能为空');
if (this.formData.scene == 2 && !this.formData.code) return Toast('验证码不能为空');
let that = this;
// let res = await test();
// console.log(res);
uni.showLoading({
title: '正在登录中'
})
@ -117,20 +115,30 @@
data
} = await userInfo();
this.$store.commit('setUserInfo', data);
await this.$store.dispatch('initConfig');
let config = await getConfig();
this.$store.commit('SET_CONFIG', config.data);
uni.hideLoading()
if (data.is_new_user) {
uni.showLoading({
mask: true,
title: '加载中'
})
uni.switchTab({
// #ifdef APP-PLUS
return uni.switchTab({
url: '/pages/oaHome/oaHome',
success: () => {
uni.$emit('initOaTask'); //
uni.hideLoading()
}
})
// #endif
return uni.reLaunch({
url: '/pages/oaHome/oaHome',
success: () => {
uni.$emit('initOaTask'); //
uni.hideLoading()
}
})
} else uni.navigateTo({
url: '/pages/updatePassword/updatePassword'
});

View File

@ -91,10 +91,20 @@
mask: true,
title: '加载中'
})
uni.switchTab({
// #ifdef APP-PLUS
return uni.switchTab({
url: '/pages/oaHome/oaHome',
success: () => {
uni.$emit('initOaTask'); //
uni.hideLoading()
}
})
// #endif
return uni.reLaunch({
url: '/pages/oaHome/oaHome',
success: () => {
uni.hideLoading()
uni.$emit('initOaTask'); //
uni.hideLoading()
}
})
})

View File

@ -17,7 +17,7 @@ const mutations = {
Cache.set('request', state.request);
},
SET_CONFIG(state, data){
state.config = data;
state.config = {...data};
}
};

View File

@ -14,7 +14,7 @@
<view class="card">
<view class="title">详情描述</view>
<u-line style="margin: 14rpx 0;"></u-line>
<u--textarea v-model="formData.text" placeholder="请输入内容" style="font-size: 28rpx;background-color: #eee;" autoHeight></u--textarea>
<u--textarea v-model="formData.text" height="80" placeholder="请输入内容" placeholderStyle="font-size: 28rpx;" style="font-size: 28rpx;background-color: #eee;" autoHeight></u--textarea>
</view>
<mybtn text="确认提交"></mybtn>
</view>