提交 a2432a94 编写于 作者: yma16's avatar yma16

fix:css路径处理

上级 92c3237d
......@@ -92,14 +92,11 @@ export default {
axios
.get(that.baseurl + "css/")
.then((res) => {
console.log("get返回", res);
let getdata = res.data;
let csspath = getdata.path;
let csstitle = getdata.title;
console.log(csspath, csstitle);
csspath.map((o) => {
let temp = that.baseurl + o;
that.css_path.push(temp);
that.css_path.push(o);
});
// 标题传递
// eslint-disable-next-line camelcase
......@@ -112,7 +109,7 @@ export default {
that.now_title = csstitle.length > 0 ? 1 + ". " + csstitle[0] : ""; // 标题加序号
})
.catch((error) => {
console.log("get错误!", error);
throw Error(error);
});
},
},
......
import axios from 'axios'
import axios from "axios";
export function loginUser(data) {
console.log('用户登录service!', data)
let baseurl='http://yongma16.xyz/user/login/'
let res=null
axios.post(baseurl, data).then(o => {
res=o
console.log('成功认证', res)
localStorage.setItem("yma16siteUserInfoName",res.name)
localStorage.setItem("yma16siteUserInfoPwd",res.password)
}).catch(r=>{
console.log('登录失败!',r)
console.log("用户登录service!", data);
let baseurl = "/api/user/login/";
let res = null;
axios
.post(baseurl, data)
.then((o) => {
res = o;
console.log("成功认证", res);
localStorage.setItem("yma16siteUserInfoName", res.name);
localStorage.setItem("yma16siteUserInfoPwd", res.password);
})
return res
}
\ No newline at end of file
.catch((r) => {
console.log("登录失败!", r);
});
return res;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册