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

fix:css路径处理

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