def ajax_create_sensitive_words(): rank = request.args.get('rank', '') sensitive_words = request.args.get('sensitive_words', '') create_type = request.args.get('create_type', '') create_time = int(time.time()) #添加用户 submitter = request.args.get('submitter', '') mark = get_create_sensitive_words(rank, sensitive_words, create_type, create_time, submitter) return json.dumps(mark)
def ajax_create_sensitive_words_batch(): rank = request.args.get('rank', '') sensitive_words_string = request.args.get('sensitive_words_string', '') sensitive_words = sensitive_words_string.encode('utf-8').split(',') create_type = request.args.get('create_type', '') #添加用户 submitter = request.args.get('submitter', '') create_time = int(time.time()) mark_result = [] for item in sensitive_words: mark = get_create_sensitive_words(rank, item, create_type, create_time, submitter) mark_result.append(mark) return json.dumps(mark_result)