fix: BUG修改
This commit is contained in:
parent
a747e0d7c8
commit
5e6d90d244
@ -84,8 +84,8 @@ if (process.env.NODE_ENV == 'development') {
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益(上海建工)
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28888/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地
|
||||
axios.defaults.baseURL ='http://192.168.34.221:9111/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
||||
// axios.defaults.baseURL ='http://192.168.34.221:9111/' //郭圣雄本地
|
||||
axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
||||
// axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程
|
||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:61212/' //彭洁远程
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈
|
||||
|
||||
@ -98,7 +98,7 @@
|
||||
<img
|
||||
slot="prefix"
|
||||
src="../../assets/images/accountNumber.png"
|
||||
style="width: 16px;height: 23px;"
|
||||
style="width: 16px; height: 23px"
|
||||
class="inputIcon"
|
||||
/>
|
||||
</el-input>
|
||||
@ -115,7 +115,7 @@
|
||||
<img
|
||||
slot="prefix"
|
||||
src="../../assets/images/password.png"
|
||||
style="width: 17.15px;height: 26.15px;"
|
||||
style="width: 17.15px; height: 26.15px"
|
||||
class="inputIcon"
|
||||
/>
|
||||
</el-input>
|
||||
@ -237,7 +237,7 @@
|
||||
<img
|
||||
slot="prefix"
|
||||
src="../../assets/images/userNameIcon.png"
|
||||
style="width: 18.86px;height: 20.54px;"
|
||||
style="width: 18.86px; height: 20.54px"
|
||||
class="inputIcon"
|
||||
/>
|
||||
</el-input>
|
||||
@ -254,7 +254,7 @@
|
||||
<img
|
||||
slot="prefix"
|
||||
src="../../assets/images/password.png"
|
||||
style="width: 17.15px;height: 26.15px;"
|
||||
style="width: 17.15px; height: 26.15px"
|
||||
class="inputIcon"
|
||||
/>
|
||||
</el-input>
|
||||
@ -273,7 +273,7 @@
|
||||
<img
|
||||
slot="prefix"
|
||||
src="../../assets/images/enterpriseIcon.png"
|
||||
style="width: 22px;height: 22px;margin-left: 7px;"
|
||||
style="width: 22px; height: 22px; margin-left: 7px"
|
||||
class="inputIcon"
|
||||
/>
|
||||
</el-input>
|
||||
@ -288,7 +288,7 @@
|
||||
<img
|
||||
slot="prefix"
|
||||
src="../../assets/images/emailIcon.png"
|
||||
style="width: 18.86px;height: 13.83px;margin-top: 20px;"
|
||||
style="width: 18.86px; height: 13.83px; margin-top: 20px"
|
||||
class="inputIcon"
|
||||
/>
|
||||
</el-input>
|
||||
@ -407,7 +407,7 @@ import {
|
||||
companyLoginApi,
|
||||
projectLoginApi,
|
||||
newRegisterApi,
|
||||
jumpLargeUserInfoApi
|
||||
jumpLargeUserInfoApi,
|
||||
} from "@/assets/js/api/loginSign";
|
||||
import { selectSystemLogoConfigApi } from "@/assets/js/api/jxjadmin";
|
||||
import getcode from "@/components/getMsgCode";
|
||||
@ -433,7 +433,8 @@ export default {
|
||||
passWord: [
|
||||
{ required: true, message: "请输入新密码", trigger: "blur" },
|
||||
{
|
||||
pattern: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/,
|
||||
pattern:
|
||||
/^(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&*()_+~`\-={}[\]:";'<>?,./])[a-zA-Z\d!@#$%^&*()_+~`\-={}[\]:";'<>?,./]{8,}$/,
|
||||
message:
|
||||
"密码必须包含至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
|
||||
trigger: "blur",
|
||||
@ -495,7 +496,8 @@ export default {
|
||||
pw: [
|
||||
{
|
||||
required: true,
|
||||
message: "密码至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
|
||||
message:
|
||||
"密码至少一个字母、一个数字、一个特殊字符以及长度至少为8位数",
|
||||
trigger: "blur",
|
||||
pattern: /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^0-9a-zA-Z]).{8,30}/,
|
||||
},
|
||||
@ -560,66 +562,65 @@ export default {
|
||||
// }
|
||||
},
|
||||
created() {
|
||||
this.company = COMPANY
|
||||
this.projectType = PROJECT_TYPE
|
||||
this.company = COMPANY;
|
||||
this.projectType = PROJECT_TYPE;
|
||||
setTimeout(() => {
|
||||
//删除401标识
|
||||
sessionStorage.setItem('errorResponse',null);
|
||||
},3000)
|
||||
sessionStorage.setItem("errorResponse", null);
|
||||
}, 3000);
|
||||
if (this.$route.query.headquartersSn) {
|
||||
this.headquartersSnData = this.$route.query.headquartersSn
|
||||
this.headquartersSnData = this.$route.query.headquartersSn;
|
||||
} else {
|
||||
this.headquartersSnData = ""
|
||||
this.headquartersSnData = "";
|
||||
}
|
||||
// else {
|
||||
// this.headquartersSnData = this.$store.state.userInfo?.headquartersSn ? this.$store.state.userInfo.headquartersSn : ''
|
||||
// }
|
||||
//兼容第三方平台接入 ---做免码登录
|
||||
if (window.location.href.indexOf('UID') != -1) {
|
||||
if (window.location.href.indexOf("UID") != -1) {
|
||||
// debugger;
|
||||
this.$store.commit('setUid', true)
|
||||
this.$store.commit("setUid", true);
|
||||
// let str = window.location.href.split("UID=")[1];
|
||||
let uid = window.location.href.split('UID=')[1]
|
||||
let uid = window.location.href.split("UID=")[1];
|
||||
// let uid = str.substring(0, str.length - 7);
|
||||
let data = {
|
||||
uid
|
||||
}
|
||||
uid,
|
||||
};
|
||||
//获取到用户信息
|
||||
getUserByUidApi(data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
//赋值
|
||||
this.parseLoginData(res.result)
|
||||
this.parseLoginData(res.result);
|
||||
} else {
|
||||
this.$message.error(res.message)
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
else if(window.location.href.indexOf("token") != -1){
|
||||
});
|
||||
} else if (window.location.href.indexOf("token") != -1) {
|
||||
const newToken = window.location.href.split("token=")[1];
|
||||
const data = { token: newToken };
|
||||
jumpLargeUserInfoApi(data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
//赋值
|
||||
this.parseLoginData(res.result, true)
|
||||
this.parseLoginData(res.result, true);
|
||||
} else {
|
||||
this.$message.error(res.message)
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
})
|
||||
});
|
||||
} else {
|
||||
this.isShowContent = true;
|
||||
this.$store.commit('setUid', false)
|
||||
this.getDetail(this.headquartersSnData)
|
||||
this.getData()
|
||||
this.$store.commit("setUid", false);
|
||||
this.getDetail(this.headquartersSnData);
|
||||
this.getData();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.$bus.$on('resetSlideVerify',this.onReset)
|
||||
delete this.$http.defaults.headers.common['Authorization']
|
||||
if (window.location.href.indexOf('type=lgzbdp') != -1) {
|
||||
window.localStorage.setItem('isIframe', '1')
|
||||
delete this.$http.defaults.headers.common["Authorization"];
|
||||
if (window.location.href.indexOf("type=lgzbdp") != -1) {
|
||||
window.localStorage.setItem("isIframe", "1");
|
||||
} else {
|
||||
if (window.localStorage.getItem('isIframe')) {
|
||||
window.localStorage.removeItem('isIframe')
|
||||
if (window.localStorage.getItem("isIframe")) {
|
||||
window.localStorage.removeItem("isIframe");
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -698,7 +699,7 @@ export default {
|
||||
// 去注册
|
||||
goRegister() {
|
||||
this.isLogin = false;
|
||||
this.registerType = this.loginType
|
||||
this.registerType = this.loginType;
|
||||
this.registerForm = {
|
||||
account: "",
|
||||
pw: "",
|
||||
@ -794,7 +795,7 @@ export default {
|
||||
this.$store.commit("setProDetail", null);
|
||||
this.$store.commit("setProjectSn", "");
|
||||
this.$store.commit("setGroupTreeList", []);
|
||||
this.$store.commit('setSelectedGroupSn', null);
|
||||
this.$store.commit("setSelectedGroupSn", null);
|
||||
window.localStorage.removeItem("isIframe");
|
||||
window.localStorage.removeItem("soundList");
|
||||
|
||||
@ -1006,7 +1007,7 @@ export default {
|
||||
headquartersSn: this.headquartersSnData,
|
||||
accountType: this.registerType,
|
||||
}).then((res) => {
|
||||
if(this.registerType == 1){
|
||||
if (this.registerType == 1) {
|
||||
this.$message.success("注册成功,等待审核");
|
||||
} else {
|
||||
this.$message.success("注册成功");
|
||||
@ -1031,13 +1032,34 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
parseLoginData(data,isOutside) {
|
||||
|
||||
checkInfoComplete() {
|
||||
this.$confirm(
|
||||
"系统检测到您未完善邮箱,请去后台中心完善,以免忘记密码时无法通过邮箱验证,导致重置密码失败!",
|
||||
"温馨提示",
|
||||
{
|
||||
confirmButtonText: "用户中心",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.$router.push("/userCenter/userConfig");
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: "info",
|
||||
message: "已取消",
|
||||
});
|
||||
});
|
||||
},
|
||||
parseLoginData(data, isOutside) {
|
||||
if (this.projectType == "zjsj") {
|
||||
this.$store.commit("setProjectSn", data.sn);
|
||||
}
|
||||
window._paq.push(["trackEvent", "点击", "登录", "登录账号"]);
|
||||
if(!isOutside){
|
||||
this.$message.success(this.$t('message.login.login_success_msg')) //登录成功!
|
||||
if (!isOutside) {
|
||||
this.$message.success(this.$t("message.login.login_success_msg")); //登录成功!
|
||||
}
|
||||
this.$http.defaults.headers.common["Authorization"] =
|
||||
"Bearer" + " " + data.token;
|
||||
@ -1052,7 +1074,9 @@ export default {
|
||||
var projectModule = [];
|
||||
if (
|
||||
moduleList.length == 0 &&
|
||||
data.accountType != 1 && data.accountType != 10 && data.accountType != 11
|
||||
data.accountType != 1 &&
|
||||
data.accountType != 10 &&
|
||||
data.accountType != 11
|
||||
) {
|
||||
this.$message.warning("当前账号还没分配权限");
|
||||
return false;
|
||||
@ -1154,6 +1178,9 @@ export default {
|
||||
if (!arr2.length) {
|
||||
if (this.loginType == 1) {
|
||||
// this.$router.push("/projectIndex");
|
||||
if (!this.$store.state.userInfo.personMail) {
|
||||
this.checkInfoComplete();
|
||||
}
|
||||
this.$router.push("/workSpace");
|
||||
} else {
|
||||
this.$router.push("/supplierIndex");
|
||||
@ -1169,6 +1196,9 @@ export default {
|
||||
) {
|
||||
if (this.loginType == 1) {
|
||||
// this.$router.push("/projectIndex");
|
||||
if (!this.$store.state.userInfo.personMail) {
|
||||
this.checkInfoComplete();
|
||||
}
|
||||
this.$router.push("/workSpace");
|
||||
} else {
|
||||
this.$router.push("/supplierIndex");
|
||||
|
||||
@ -27,12 +27,14 @@
|
||||
:src="$store.state.FILEURL + this.ruleForm.avatar"
|
||||
class="avatar"
|
||||
/> -->
|
||||
<el-image v-if="this.ruleForm.avatar"
|
||||
<el-image
|
||||
v-if="this.ruleForm.avatar"
|
||||
:src="$store.state.FILEURL + this.ruleForm.avatar"
|
||||
class="avatar">
|
||||
<div slot="error" class="image-slot">
|
||||
class="avatar"
|
||||
>
|
||||
<!-- <div slot="error" class="image-slot">
|
||||
<i class="el-icon-plus" style="font-size: 28px;"></i>
|
||||
</div>
|
||||
</div> -->
|
||||
</el-image>
|
||||
<div class="avatar-uploader-icon" v-else>
|
||||
<i class="el-icon-plus icon-item"></i>
|
||||
@ -155,6 +157,11 @@ export default {
|
||||
};
|
||||
getSystemUserInfoApi(requestData).then((res) => {
|
||||
that.ruleForm = { ...res.result };
|
||||
let originUserInfo = this.$store.state.userInfo;
|
||||
that.$store.commit("setUserInfo", {
|
||||
...originUserInfo,
|
||||
...that.ruleForm
|
||||
});
|
||||
});
|
||||
},
|
||||
beforeAvatarUpload(file) {
|
||||
@ -252,7 +259,7 @@ export default {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
.image-slot{
|
||||
.image-slot {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
|
||||
@ -86,9 +86,6 @@ export default {
|
||||
// this.selectGroupDialog = true;
|
||||
// }
|
||||
this.getGroupTreeData();
|
||||
if (!this.$store.state.userInfo.personMail) {
|
||||
this.checkInfoComplete();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 挂载后来给iframe传递菜单数据
|
||||
@ -102,26 +99,6 @@ export default {
|
||||
iframe.removeEventListener("load", this.onIframeLoad);
|
||||
},
|
||||
methods: {
|
||||
checkInfoComplete() {
|
||||
this.$confirm(
|
||||
"系统检测到您未完善邮箱,请去后台中心完善,以免忘记密码时无法通过邮箱验证,导致重置密码失败!",
|
||||
"温馨提示",
|
||||
{
|
||||
confirmButtonText: "用户中心",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.$router.push("/userCenter/userConfig");
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: "info",
|
||||
message: "已取消",
|
||||
});
|
||||
});
|
||||
},
|
||||
// 查询全部模块
|
||||
getModuleMenuList() {
|
||||
getNewUserAllModulePageApi({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user