mirror of
https://github.com/201206030/novel-plus.git
synced 2025-06-24 04:46:37 +00:00
feat(templates): 新增绿色主题模版,并设置为默认模版
和文档站点 docs.xxyopen.com 风格保持一致
This commit is contained in:
32
templates/green/static/javascript/ycUtils.js
Normal file
32
templates/green/static/javascript/ycUtils.js
Normal file
@ -0,0 +1,32 @@
|
||||
var SCYC = {
|
||||
}
|
||||
|
||||
$.extend($.fn.validatebox.defaults.rules, {
|
||||
checkPenName: {
|
||||
validator: function (value, param) {
|
||||
var url = "/author/checkPenName";
|
||||
var data = { penName: value};
|
||||
var bool = false;
|
||||
$.ajax({
|
||||
type: "get",
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
url: url,
|
||||
data: data,
|
||||
cache: false,
|
||||
success: function (result) {
|
||||
if (result.data) {
|
||||
$.fn.validatebox.defaults.rules.checkPenName.message = '笔名已存在,请重新输入';
|
||||
bool = false;
|
||||
} else {
|
||||
$.fn.validatebox.defaults.rules.checkPenName.message = '';
|
||||
bool = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
return bool;
|
||||
message: '';
|
||||
}
|
||||
}
|
||||
|
||||
});
|
Reference in New Issue
Block a user