提交 1d47b571 编写于 作者: G gongfuxiang

时区设置

上级 33e20216
...@@ -123,13 +123,13 @@ AUTH_PASSWORD_VALIDATORS = [ ...@@ -123,13 +123,13 @@ AUTH_PASSWORD_VALIDATORS = [
LANGUAGE_CODE = 'zh-Hans' LANGUAGE_CODE = 'zh-Hans'
TIME_ZONE = 'UTC' TIME_ZONE = 'Asia/Shanghai'
USE_I18N = True USE_I18N = True
USE_L10N = True USE_L10N = True
USE_TZ = True USE_TZ = False
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
......
无法预览此类型文件
...@@ -102,49 +102,57 @@ new Vue({ ...@@ -102,49 +102,57 @@ new Vue({
*/ */
handle_release : function(release_id, project_id, handle_type) handle_release : function(release_id, project_id, handle_type)
{ {
this.loading = true; var type_msg = (handle_type == 1) ? '正式发布上线' : '回滚到上一次保留的状态';
this.$http.post(__host__+'release/handle_release', {csrfmiddlewaretoken:'{{ csrf_token }}', release_id:release_id, project_id:project_id, handle_type:handle_type}, {emulateJSON: true}).then((response) => this.$confirm('此操作将'+type_msg+', 是否继续?', '提示',
{ {
console.log(response.data); confirmButtonText: '确定',
if(response.data.code == 0) cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading = true;
this.$http.post(__host__+'release/handle_release', {csrfmiddlewaretoken:'{{ csrf_token }}', release_id:release_id, project_id:project_id, handle_type:handle_type}, {emulateJSON: true}).then((response) =>
{ {
this.$message({ console.log(response.data);
showClose: true, if(response.data.code == 0)
message: response.data.msg,
type: 'success'
});
setTimeout(function()
{
window.location.reload();
}, 1000);
} else {
// git错误提示信息
if(response.data.tips.length > 0)
{ {
this.$notify({ this.$message({
title: notify_error_title, showClose: true,
message: response.data.tips, message: response.data.msg,
duration: 0 type: 'success'
}); });
}
setTimeout(function()
{
window.location.reload();
}, 1000);
} else {
// git错误提示信息
if(response.data.tips.length > 0)
{
this.$notify({
title: notify_error_title,
message: response.data.tips,
duration: 0
});
}
this.$message({
showClose: true,
message: response.data.msg,
type: 'warning'
});
}
this.loading = false;
}, (response) =>
{
this.$message({ this.$message({
showClose: true, showClose: true,
message: response.data.msg, message: error_msg,
type: 'warning' type: 'error'
}); });
} this.loading = false;
this.loading = false;
}, (response) =>
{
this.$message({
showClose: true,
message: error_msg,
type: 'error'
}); });
this.loading = false; }).catch(() => {});
});
}, },
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册