Plugin Directory

Changeset 3392641


Ignore:
Timestamp:
11/10/2025 04:12:09 AM (5 months ago)
Author:
infility
Message:

V2.14.20 (20251110) Ben: 抓取网页数据公共化

Location:
infility-global/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • infility-global/trunk/infility_global.php

    r3392636 r3392641  
    44Plugin URI: https://www.infility.cn/
    55Description: Infility公共插件
    6 Version: 2.14.19
     6Version: 2.14.20
    77Author: Infility
    88Author URI: https://www.infility.cn/
     
    135135    function __construct()
    136136    {
    137         define( 'INFILITY_GLOBAL_VERSION', '2.14.19' );
     137        define( 'INFILITY_GLOBAL_VERSION', '2.14.20' );
    138138        define( 'INFILITY_GLOBAL_PATH', plugin_dir_path( __FILE__ ) ); // fullpath/wp-content/plugins/infility-global/ // 有斜杠
    139139        define( 'INFILITY_GLOBAL_URL', plugins_url( '/', __FILE__ ) ); // https://the_domain/wp-content/plugins/infility-global/ // 斜杠是自己加的
  • infility-global/trunk/widgets/infility-import-data/css/infility_import_data.css

    r3293612 r3392641  
    88.custom_wrap .custom_form table th,
    99.custom_wrap .custom_form table td{border: 1px solid #ccc;padding:5px;}
     10.custom_wrap .category_div{display: none;}
     11.custom_wrap .category_div.show{display: block;}
  • infility-global/trunk/widgets/infility-import-data/js/infility_import_data.js

    r3392636 r3392641  
    4040                        run_data.push({action:'get_post_detail',id:id});//10%
    4141                    }
    42                     console.log(page_type);
     42
    4343                    runProcess(run_data, button_obj, show_progress);
    4444                }else if(type==='excel'){
     
    126126                global_obj.win_alert('upload error');
    127127            });
     128    }).on('change','#catch_form select[name="page_type"]',function(event){
     129        let page_type = $(this).val();
     130        if(!$("#catch_form .category_div").hasClass('show') && page_type==='category'){
     131            $("#catch_form .category_div").addClass('show');
     132        }else{
     133            $("#catch_form .category_div").removeClass('show');
     134        }
     135    }).on('change','#catch_form select[name="post_type"]',function(event){
     136        let post_type = $("#catch_form select[name='post_type']").val();
     137        if(!post_type){global_obj.win_alert('请先选择post_type');return false;}
     138
     139        let formData = new FormData();
     140        formData.append('post_type',post_type);
     141        formData.append('action','get_site_field');
     142
     143
     144        $.ajax({
     145            url: ajax_object.ajax_url,
     146            type: 'post',
     147            dataType:'json',
     148            data: formData,
     149            contentType: false,
     150            processData: false,
     151            success: function(result){
     152                let msg = result.msg;
     153                if(result.ret===1){
     154                    global_obj.win_alert(msg.res);
     155                    return false;
     156                }
     157
     158                $("#catch_form .field_list").html(msg.html);
     159                global_obj.auto_alert(msg.res,'success');
     160            }
     161        })
    128162    }).on('click','.form_button',function(){
    129163        let button_obj = $(this);
Note: See TracChangeset for help on using the changeset viewer.