|
@@ -282,33 +282,33 @@ export default {
|
|
|
|
|
|
created() {
|
|
created() {
|
|
let that = this;
|
|
let that = this;
|
|
- that.$nextTick(() => {
|
|
|
|
- that.API.requestData({
|
|
|
|
- isMust: false, // 请求是否携带 token ,默认为 true ,可缺省
|
|
|
|
- method: "POST", // 请求方式,默认为 GET ,可缺省
|
|
|
|
- subUrl: "admin/loginvue", // 请求接口地址,必传项
|
|
|
|
- data: {
|
|
|
|
- username: "admin",
|
|
|
|
- password: "admin",
|
|
|
|
- },
|
|
|
|
- success(res) {
|
|
|
|
- localStorage.setItem("authToken", res.data.authToken);
|
|
|
|
- localStorage.setItem("username", res.data.user.laborName);
|
|
|
|
|
|
+ // that.$nextTick(() => {
|
|
|
|
+ // that.API.requestData({
|
|
|
|
+ // isMust: false, // 请求是否携带 token ,默认为 true ,可缺省
|
|
|
|
+ // method: "POST", // 请求方式,默认为 GET ,可缺省
|
|
|
|
+ // subUrl: "admin/loginvue", // 请求接口地址,必传项
|
|
|
|
+ // data: {
|
|
|
|
+ // username: "admin",
|
|
|
|
+ // password: "admin",
|
|
|
|
+ // },
|
|
|
|
+ // success(res) {
|
|
|
|
+ // localStorage.setItem("authToken", res.data.authToken);
|
|
|
|
+ // localStorage.setItem("username", res.data.user.laborName);
|
|
|
|
|
|
- that.API.requestData({
|
|
|
|
- method: "POST", // 请求方式,默认为 GET ,可缺省
|
|
|
|
- subUrl: "admin/usermenu", // 请求接口地址,必传项
|
|
|
|
- success() {
|
|
|
|
- // that.BASE.showMsg({
|
|
|
|
- // msg: "登陆成功",
|
|
|
|
- // type: "success",
|
|
|
|
- // });
|
|
|
|
- // that.$router.push('/'); // 跳转到首页
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
|
|
+ // that.API.requestData({
|
|
|
|
+ // method: "POST", // 请求方式,默认为 GET ,可缺省
|
|
|
|
+ // subUrl: "admin/usermenu", // 请求接口地址,必传项
|
|
|
|
+ // success() {
|
|
|
|
+ // // that.BASE.showMsg({
|
|
|
|
+ // // msg: "登陆成功",
|
|
|
|
+ // // type: "success",
|
|
|
|
+ // // });
|
|
|
|
+ // // that.$router.push('/'); // 跳转到首页
|
|
|
|
+ // },
|
|
|
|
+ // });
|
|
|
|
+ // },
|
|
|
|
+ // });
|
|
|
|
+ // });
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|