1、前端部分优化

Former-commit-id: 2061fb72fbfc1daf6bcc3c96e52a1d345f0162ff
master
wangbing 5 years ago
parent 17f95e6636
commit 4092bd193b

@ -229,6 +229,12 @@
data: this.mData data: this.mData
}).then(callback); }).then(callback);
break; break;
case "exports":
return downRequest({
url: '/ajax/' + this.mModule + "/" + this.mTarget + "/" + this.mMethod,
data: JSON.stringify(this.mData)
}).then(callback)
break;
case "template": case "template":
return downRequest({ return downRequest({
url: '/ajax/' + this.mModule + "/" + this.mTarget + "/" + this.mMethod, url: '/ajax/' + this.mModule + "/" + this.mTarget + "/" + this.mMethod,
@ -268,31 +274,19 @@
}; };
this.template = function (callback) { this.template = function (callback) {
this.mMethod = "template"; this.mMethod = "template";
return downRequest({ this.post(callback);
url: '/ajax/' + this.mModule + "/" + this.mTarget + "/" + this.mMethod,
data: JSON.stringify(this.mData)
}).then(callback)
}; };
this.imports = function (callback) { this.imports = function (callback) {
this.mMethod = "imports"; this.mMethod = "imports";
return importRequest({ this.post(callback);
url: '/ajax/' + this.mModule + "/" + this.mTarget + "/" + this.mMethod,
data: this.mData
}).then(callback)
}; };
this.exports = function (callback) { this.exports = function (callback) {
this.mMethod = "exports"; this.mMethod = "exports";
return downRequest({ this.post(callback);
url: '/ajax/' + this.mModule + "/" + this.mTarget + "/" + this.mMethod,
data: JSON.stringify(this.mData)
}).then(callback)
}; };
this.upload = function (callback) { this.upload = function (callback) {
this.mMethod = "upload"; this.mMethod = "upload";
return uploadRequest({ this.post(callback);
url: '/ajax/' + this.mModule + "/" + this.mTarget + "/" + this.mMethod,
data: this.mData
}).then(callback)
}; };
} }

@ -79,7 +79,7 @@
<el-dropdown-menu slot="dropdown" @command="onCommand"> <el-dropdown-menu slot="dropdown" @command="onCommand">
<el-dropdown-item>个人信息</el-dropdown-item> <el-dropdown-item>个人信息</el-dropdown-item>
<el-dropdown-item>修改密码</el-dropdown-item> <el-dropdown-item>修改密码</el-dropdown-item>
<el-dropdown-item :command='logout'>退出登录</el-dropdown-item> <el-dropdown-item :command="'logout'">退出登录</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</li> </li>

Loading…
Cancel
Save

Powered by TurnKey Linux.