api检测标题是否重复,适用7.5 8.0
接口特点: 增加任意字段(无论主表或副表),做好字段维护,无需改动接口,可检测表中任意字段,真正做到接口免维护,更适合小白站长,一劳永逸。
$.ajax({ url: '/api/v1/?act=is_field_exists&classid={classid}&id={id}&field=title&value=科比专为大场面而生', // 示例 API type: 'GET', dataType: 'json', success: function (response) { if (response && 0 === response.code) {
// 返回 true if (response.data.duplicate) {
alert('内容已经存在'); } } }, error: function (xhr, status, error) { } });
QQ交流群:206865209(欢迎开发者加入)
|