Commit ed2cb9bc authored by 李苏's avatar 李苏 💬

取消跳转登录

parent eee58dc3
......@@ -191,7 +191,6 @@
loginT(){
let _this =this;
http.config.baseUrl = _this.sedyrl;
this.$http.post(this.loginurl,{}).then((resp) => {
if(resp.data.success){
console.log("success")
......@@ -279,7 +278,7 @@
encodePWD:md5(this.userName.toLowerCase() + "USER" + this.password + "PASSWORD")
}
let params={
code:this.code,
systemid:this.code,
userid: loginParams.username,
password: loginParams.encodePWD,
newPassword:md5(this.password),
......@@ -292,7 +291,8 @@
this.$tip.toast('请检查网络,或服务器设置');
}
},3000)
this.$http.post("/clouderp/cusmer/login",params).then((resp) => {
// this.$http.post("/clouderp/cusmer/login",params).then((resp) => {
this.$http.post("/login",params).then((resp) => {
if(resp.data.success){
uni.setStorage({
key: 'code',
......@@ -302,7 +302,52 @@
})
this.loading=false;
this.loginurl =resp.data.data.records+"&&tp='1'";
this.loginT()
/* this.loginT() */
uni.setStorage({
key: 'userid',
data: resp.data.data.userid,
success: function () {
console.log(resp.data.data.userid);
}
});
uni.setStorage({
key: 'username',
data: resp.data.data.username,
success: function () {
console.log(resp.data.data.username);
}
});
uni.setStorage({
key: 'ACCESS_TOKEN',
data: resp.data.data.token,
success: function () {
console.log(resp.data.data.token)
}
});
// 本地存储信息
uni.setStorage({
key: 'userName',
data: _this.userName,
success: function () {
console.log("用户名获取成功")
}
});
uni.setStorage({
key: 'password',
data: _this.password,
success: function () {
console.log("用户名获取成功")
}
});
// this.$router.go(0)
//ACCESS_TOKEN
this.$tip.success('登录成功!')
this.$Router.replaceAll({name:'index'})
// #ifdef APP-PLUS
// this.saveClientId()
// #endif
// #ifndef APP-PLUS
this.$tip.success('登录成功!')
}else{
this.loading=false;
this.$tip.alert(resp.data.message||"请求失败");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment