|
@@ -233,48 +233,58 @@ function logIn() {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function accLogIn() {
|
|
|
|
|
|
|
+async function accLogIn() {
|
|
|
if (isAgreement.value == false) return showModal.value = true;
|
|
if (isAgreement.value == false) return showModal.value = true;
|
|
|
loading.value = true;
|
|
loading.value = true;
|
|
|
- $Http.login({ "accountno": accountno.value, "imagecaptcha": imagecaptcha.value, "password": hexMD5(password1.value), "systemclient": "wechatsaletool" }).then(res => {
|
|
|
|
|
- if (res.code == 1) {
|
|
|
|
|
- if (res.remindchangepassword) return uni.showModal({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- content: '当前密码为系统初始化密码,请修改后重新登录',
|
|
|
|
|
- showCancel: false,
|
|
|
|
|
- confirmText: "前去修改",
|
|
|
|
|
- complete: () => {
|
|
|
|
|
- uni.removeStorageSync('accountno');
|
|
|
|
|
- uni.setStorageSync('accountno', accountno.value);
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: '/pages/index/changePassword?token=' + res.account_list[0].token
|
|
|
|
|
- })
|
|
|
|
|
- $Http.claerPassword = function () {
|
|
|
|
|
- phonenumber.value = '';
|
|
|
|
|
- }.bind(this);
|
|
|
|
|
- loading.value = false;
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- if (res.account_list.length == 1) {
|
|
|
|
|
- handleLogin1(res.account_list[0]);
|
|
|
|
|
- } else {
|
|
|
|
|
- account_list = reactive([res.account_list]);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ let isRelease = uni.getAccountInfoSync().miniProgram.envVersion == 'release';
|
|
|
|
|
+ const s = isRelease ? await $Http.OldLogin(`?username=${accountno.value}&password=${encodeURIComponent(password1.value)}`) : {
|
|
|
|
|
+ success: false
|
|
|
|
|
+ };
|
|
|
|
|
+ console.log("单点登录", s)
|
|
|
|
|
+ let res = s.success == true ? await $Http.SSO({
|
|
|
|
|
+ "accountno": s.data.userinfo.username,
|
|
|
|
|
+ "password": s.data.cookie.split("=")[1],
|
|
|
|
|
+ "imagecaptcha": imagecaptcha.value || '',
|
|
|
|
|
+ "systemclient": "wechatsaletool"
|
|
|
|
|
+ }) : await $Http.login({ "accountno": accountno.value, "imagecaptcha": imagecaptcha.value, "password": hexMD5(password1.value), "systemclient": "wechatsaletool" });
|
|
|
|
|
+
|
|
|
|
|
+ if (res.code == 1) {
|
|
|
|
|
+ if (res.remindchangepassword) return uni.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '当前密码为系统初始化密码,请修改后重新登录',
|
|
|
|
|
+ showCancel: false,
|
|
|
|
|
+ confirmText: "前去修改",
|
|
|
|
|
+ complete: () => {
|
|
|
|
|
+ uni.removeStorageSync('accountno');
|
|
|
|
|
+ uni.setStorageSync('accountno', accountno.value);
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: '/pages/index/changePassword?token=' + res.account_list[0].token
|
|
|
|
|
+ })
|
|
|
|
|
+ $Http.claerPassword = function () {
|
|
|
|
|
+ phonenumber.value = '';
|
|
|
|
|
+ }.bind(this);
|
|
|
|
|
+ loading.value = false;
|
|
|
}
|
|
}
|
|
|
|
|
+ })
|
|
|
|
|
+ if (res.account_list.length == 1) {
|
|
|
|
|
+ handleLogin1(res.account_list[0]);
|
|
|
} else {
|
|
} else {
|
|
|
- loading.value = false;
|
|
|
|
|
- imagecaptcha.value = '';
|
|
|
|
|
- changeTimestamp();
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: res.msg,
|
|
|
|
|
- icon: 'none',
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ account_list = reactive([res.account_list]);
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ loading.value = false;
|
|
|
|
|
+ imagecaptcha.value = '';
|
|
|
|
|
+ changeTimestamp();
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: res.msg,
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function onCancel() {
|
|
function onCancel() {
|
|
|
account_list = reactive([]);
|
|
account_list = reactive([]);
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
function onConfirm(e) {
|
|
function onConfirm(e) {
|
|
|
handleLogin(e.value[0]);
|
|
handleLogin(e.value[0]);
|
|
@@ -365,7 +375,7 @@ function checkTheAgreement() {
|
|
|
title: "加载中...",
|
|
title: "加载中...",
|
|
|
});
|
|
});
|
|
|
uni.downloadFile({
|
|
uni.downloadFile({
|
|
|
- url: "https://yossys22170.obs.cn-east-2.myhuaweicloud.com:443/202309261695715892017B6ef5bd76.docx",
|
|
|
|
|
|
|
+ url: 'https://crm.meida.com:16691/yos/rest/tool/attachment/download/YOSSYS/202512021764653461493B1119e706.docx',
|
|
|
success: (res) => {
|
|
success: (res) => {
|
|
|
uni.openDocument({
|
|
uni.openDocument({
|
|
|
filePath: res.tempFilePath,
|
|
filePath: res.tempFilePath,
|