Merge branch 'v1.0.0' into v1.0.0_saas

# Conflicts:
#	src/pagesLogin/login/index.vue
This commit is contained in:
admin 2024-06-14 15:16:11 +08:00
commit ae35122c7e
2 changed files with 18 additions and 4 deletions

View File

@ -143,6 +143,7 @@ import LoginLayout from "./components/loginLayout.vue";
import { useMemberStore } from "@/store/index"; import { useMemberStore } from "@/store/index";
import valid from "@/utils/validate"; import valid from "@/utils/validate";
import pinia from "@/store"; import pinia from "@/store";
import { onShow } from "@dcloudio/uni-app";
const handleClear = (item: any) => { const handleClear = (item: any) => {
setTimeout(() => { setTimeout(() => {
@ -237,6 +238,11 @@ const submit = () => {
} }
ProfileApi.loginByAccount(model1.userInfo).then((res: any) => { ProfileApi.loginByAccount(model1.userInfo).then((res: any) => {
if (res.code === 200) { if (res.code === 200) {
if(checkGroup.rememberCheck.length === 1) {
uni.setStorageSync('catchLoginInfo', model1.userInfo);
} else {
uni.setStorageSync('catchLoginInfo', {});
}
store.setProfile(res.data); store.setProfile(res.data);
uni.reLaunch({ uni.reLaunch({
url: "/pagesHome/index", // url: "/pagesHome/index", //
@ -295,7 +301,6 @@ const handleSelect = (v: any) => {
state.isShow = false; state.isShow = false;
state.dpObj = v; state.dpObj = v;
model1.userInfo.dpName = v.name; model1.userInfo.dpName = v.name;
console.log(v.dbIp);
store.setChildPath(v.dbIp); store.setChildPath(v.dbIp);
}; };
@ -304,8 +309,7 @@ const state = reactive({
isShow: false, isShow: false,
dpObj: {}, dpObj: {},
}); });
//
// //
// ProfileApi.getDbInfo({}).then((res) => { // ProfileApi.getDbInfo({}).then((res) => {
// if (res.code === 200) { // if (res.code === 200) {
// state.dpList = res.data.map((item: any) => { // state.dpList = res.data.map((item: any) => {
@ -313,6 +317,16 @@ const state = reactive({
// }); // });
// } // }
// }); // });
onShow(() => {
if (uni.getStorageSync('catchLoginInfo')) {
const {userName, password} = uni.getStorageSync('catchLoginInfo')
model1.userInfo.userName = userName
model1.userInfo.password = password
}
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -68,7 +68,7 @@ export const http = <T>(options: UniApp.RequestOptions) => {
// #endif // #endif
}, },
timeout: 1800000, timeout: 1800000,
url: baseUrl + store.profile.childPath + options.url,//仅为示例,非真实的接口地址 url: baseUrl + options.url,//仅为示例,非真实的接口地址
fileType: "image", fileType: "image",
// #ifdef H5 // #ifdef H5
files: (options as any).data.files, files: (options as any).data.files,