|
@@ -20,6 +20,7 @@ function throttle(fn, time) {
|
|
|
}
|
|
|
|
|
|
const periodReg = /\d{4}-((0[1-9])|(1[0-2]))$/;
|
|
|
+const quaterReg = /\d{4}年-[一二三四]{1}季度$/;
|
|
|
function createLib() {
|
|
|
const name = $('#name').val();
|
|
|
if (!name) {
|
|
@@ -27,7 +28,7 @@ function createLib() {
|
|
|
return false;
|
|
|
}
|
|
|
const period = $('#period').val();
|
|
|
- if (!period || !periodReg.test(period)) {
|
|
|
+ if (!period || (!periodReg.test(period) && !quaterReg.test(period))) {
|
|
|
$('#period-error').show();
|
|
|
return false;
|
|
|
}
|
|
@@ -323,7 +324,7 @@ function processChecking(key, cb) {
|
|
|
function handleCrawlConfirm() {
|
|
|
const from = $('#period-start').val();
|
|
|
const to = $('#period-end').val();
|
|
|
- if (!periodReg.test(from) || !periodReg.test(to)) {
|
|
|
+ if (!(periodReg.test(from) && periodReg.test(to)) && !(quaterReg.test(from) && quaterReg.test(to))) {
|
|
|
$('#crawl-error').show();
|
|
|
return false;
|
|
|
}
|
|
@@ -387,11 +388,4 @@ $(document).ready(function () {
|
|
|
$('#export-compilation-price').click(() => {
|
|
|
handleExportInfoPriceByCompilation();
|
|
|
})
|
|
|
-});
|
|
|
-
|
|
|
-$.ajax({
|
|
|
- url: 'http://api.zjtcn.com/user/dyn_code',
|
|
|
- type: 'post',
|
|
|
- data: { service_id: '2020090003' },
|
|
|
- contentType: 'application/x-www-form-urlencoded',
|
|
|
-})
|
|
|
+});
|