管理端全部功能跑通
This commit is contained in:
39
EdgeAdmin/web/views/@default/httpdns/apps/sdkUpload.js
Normal file
39
EdgeAdmin/web/views/@default/httpdns/apps/sdkUpload.js
Normal file
@@ -0,0 +1,39 @@
|
||||
Tea.context(function () {
|
||||
this.platform = "android";
|
||||
this.version = this.defaultVersion || "1.0.0";
|
||||
this.isUploading = false;
|
||||
|
||||
if (!Array.isArray(this.uploadedFiles)) {
|
||||
this.uploadedFiles = [];
|
||||
}
|
||||
|
||||
this.beforeUpload = function () {
|
||||
this.isUploading = true;
|
||||
};
|
||||
|
||||
this.doneUpload = function () {
|
||||
this.isUploading = false;
|
||||
};
|
||||
|
||||
this.successUpload = function () {
|
||||
teaweb.success("上传成功", function () {
|
||||
window.location = "/httpdns/apps/sdk?appId=" + this.app.id;
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
this.deleteUploadedFile = function (filename) {
|
||||
let that = this;
|
||||
teaweb.confirm("确定要删除文件 " + filename + " 吗?", function () {
|
||||
that.$post("/httpdns/apps/sdk/upload/delete")
|
||||
.params({
|
||||
appId: that.app.id,
|
||||
filename: filename
|
||||
})
|
||||
.success(function () {
|
||||
teaweb.success("删除成功", function () {
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user