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

时区设置

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