修改登录页面
This commit is contained in:
@@ -83,14 +83,15 @@ import { AGREEWELCOME_KEY } from '@/enums/cacheEnums';
|
|||||||
import { getNavBarPaddingTop} from '@/utils/system.js'
|
import { getNavBarPaddingTop} from '@/utils/system.js'
|
||||||
import { useUserStore } from '@/stores/user';
|
import { useUserStore } from '@/stores/user';
|
||||||
import encryptObj from '@/utils/encrypt.js'
|
import encryptObj from '@/utils/encrypt.js'
|
||||||
import { CLIENT_ID } from '@/enums/cacheEnums';
|
|
||||||
import {showAlert} from '@/utils/message.js'
|
import {showAlert} from '@/utils/message.js'
|
||||||
|
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
// 获取 存储手机的module
|
// 获取 存储手机的module
|
||||||
const safeSave = uni.requireNativePlugin("Tm-TmSafeSaveFileModule");
|
const safeSave = uni.requireNativePlugin("Tm-TmSafeSaveFileModule");
|
||||||
// #endif
|
// #endif
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore();
|
||||||
|
let clientId = `${proxy.$CLIENT_ID || 2}`;
|
||||||
|
let networkEnv = ref(proxy.$NETWORK_ENV);//1-内网 2-外网
|
||||||
onLoad(async(opt) => {
|
onLoad(async(opt) => {
|
||||||
uni.setStorageSync('page_cache',true);
|
uni.setStorageSync('page_cache',true);
|
||||||
})
|
})
|
||||||
@@ -248,13 +249,13 @@ const submitForm = () => {
|
|||||||
// 用户名和密码登录
|
// 用户名和密码登录
|
||||||
form2.value.validate().then(async param => {
|
form2.value.validate().then(async param => {
|
||||||
param.loginType = activeTab.value;
|
param.loginType = activeTab.value;
|
||||||
let clientId = `${CLIENT_ID || "2"}`;
|
|
||||||
param.clientId = clientId;
|
param.clientId = clientId;
|
||||||
let password = encryptObj.Encrypt(param.username + clientId + "," + param.password);
|
let password = encryptObj.Encrypt(param.username + clientId + "," + param.password);
|
||||||
param.password = password;
|
param.password = password;
|
||||||
|
param.runEnv = networkEnv;
|
||||||
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
param.uniqCode = '7f47cfb4-59e2-4cb9-ac46-9da5e23c4de2';//uni.getStorageSync('app_device_id');//先从缓存取之后处理 '7f47cfb4-59e2-4cb9-ac46-9da5e23c4de2'//
|
param.uniqCode = '7f47cfb4-59e2-4cb9-ac46-9da5e23c4de2';//uni.getStorageSync('app_device_id');//先从缓存取之后处理
|
||||||
let res = await login(param);
|
let res = await login(param);
|
||||||
userStore.login(res);
|
userStore.login(res);
|
||||||
uni.switchTab({ url: '/pages/home/home' })
|
uni.switchTab({ url: '/pages/home/home' })
|
||||||
|
|||||||
Reference in New Issue
Block a user