Compare commits
No commits in common. "616cbd7244d4261dc18dbb675f8efe6eafc73256" and "d8364e9fe15d8998e629c04b9c808767311961d1" have entirely different histories.
616cbd7244
...
d8364e9fe1
@ -44,13 +44,10 @@ const completeCase=(id,data)=>{
|
|||||||
const behaviorRecord=(data)=>{
|
const behaviorRecord=(data)=>{
|
||||||
return http.post("/record/user/behavior",data)
|
return http.post("/record/user/behavior",data)
|
||||||
}
|
}
|
||||||
const loginByWx=(data)=>{
|
|
||||||
return http.post("/login/program",data)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
login,
|
login,
|
||||||
loginByWx,
|
|
||||||
getProjectList,
|
getProjectList,
|
||||||
getCaseList,
|
getCaseList,
|
||||||
getCaseDetail,
|
getCaseDetail,
|
||||||
|
|||||||
@ -53,7 +53,6 @@ router.beforeEach(async(to, from, next) => {
|
|||||||
document.title = '互动病例';
|
document.title = '互动病例';
|
||||||
}
|
}
|
||||||
let source=to.query.source
|
let source=to.query.source
|
||||||
let tempToken=to.query.token;
|
|
||||||
// 权限验证逻辑
|
// 权限验证逻辑
|
||||||
if (source == 3) {
|
if (source == 3) {
|
||||||
if(to.path!=='/result'){
|
if(to.path!=='/result'){
|
||||||
@ -85,16 +84,6 @@ router.beforeEach(async(to, from, next) => {
|
|||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
|
|
||||||
}else if(tempToken){
|
|
||||||
const {data,code}=await api.loginByWx({
|
|
||||||
token:tempToken
|
|
||||||
})
|
|
||||||
if(code==200){
|
|
||||||
localStorage.setItem('token_gandan',data.token);
|
|
||||||
localStorage.setItem('userInfo',JSON.stringify(data));
|
|
||||||
localStorage.setItem('source','');
|
|
||||||
next();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
//localStorage.setItem('token_gandan','eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiMTg5NDI3NjIyOTg5NzM5MjEyOCIsInBsYXRmb3JtX2lkIjoiMSIsImV4cCI6MTc0NDQyMzU1NCwibmJmIjoxNzQxODMxNTU0LCJpYXQiOjE3NDE4MzE1NTR9.LuU5xpSpTQq6VY7qZJf854qMoNCMVjRj1vi1_Ii8akM');
|
//localStorage.setItem('token_gandan','eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiMTg5NDI3NjIyOTg5NzM5MjEyOCIsInBsYXRmb3JtX2lkIjoiMSIsImV4cCI6MTc0NDQyMzU1NCwibmJmIjoxNzQxODMxNTU0LCJpYXQiOjE3NDE4MzE1NTR9.LuU5xpSpTQq6VY7qZJf854qMoNCMVjRj1vi1_Ii8akM');
|
||||||
let token='';
|
let token='';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
let host='';
|
let host='';
|
||||||
let path=window.location.href;
|
let path=window.location.href;
|
||||||
if (path.indexOf("//prod-caseplatform.igandan.com") > 1 || path.indexOf("//caseplatform.igandan.com") > 1) {
|
if (path.indexOf("//prod-caseplatform.igandan.com") > 1 ) {
|
||||||
host = "https://prod-caseplatform.igandan.com";
|
host = "https://prod-caseplatform.igandan.com";
|
||||||
} else {
|
} else {
|
||||||
host = "https://dev-caseplatform.igandan.com";
|
host = "https://dev-caseplatform.igandan.com";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user