Changeset 3392635
- Timestamp:
- 11/10/2025 03:56:52 AM (5 months ago)
- Location:
- infility-global/trunk
- Files:
-
- 4 edited
-
infility_global.php (modified) (3 diffs)
-
widgets/infility-import-data/include/infility-import-site.php (modified) (1 diff)
-
widgets/infility-import-data/infility-import-data.php (modified) (1 diff)
-
widgets/infility-import-data/js/infility_import_data.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
infility-global/trunk/infility_global.php
r3392620 r3392635 4 4 Plugin URI: https://www.infility.cn/ 5 5 Description: Infility公共插件 6 Version: 2.14.1 76 Version: 2.14.18 7 7 Author: Infility 8 8 Author URI: https://www.infility.cn/ … … 129 129 V2.14.16 (20251030) Ben: 导航文章列表bug修复 130 130 V2.14.17 (20251110) Ben: 抓取网页数据公共化 131 V2.14.18 (20251110) Ben: 抓取网页数据公共化 131 132 */ 132 133 … … 134 135 function __construct() 135 136 { 136 define( 'INFILITY_GLOBAL_VERSION', '2.14.1 7' );137 define( 'INFILITY_GLOBAL_VERSION', '2.14.18' ); 137 138 define( 'INFILITY_GLOBAL_PATH', plugin_dir_path( __FILE__ ) ); // fullpath/wp-content/plugins/infility-global/ // 有斜杠 138 139 define( 'INFILITY_GLOBAL_URL', plugins_url( '/', __FILE__ ) ); // https://the_domain/wp-content/plugins/infility-global/ // 斜杠是自己加的 -
infility-global/trunk/widgets/infility-import-data/include/infility-import-site.php
r3392620 r3392635 702 702 $data = json_decode($list_data['data'],true); 703 703 704 if($data['page_type']=='post'){return 100;} 705 706 $sql = "SELECT count(*) as count FROM $table WHERE list_id=$list_id"; 707 $total_num = $wpdb->get_var($sql); 708 709 $sql = "SELECT count(*) as count FROM $table WHERE list_id=$list_id AND status=1"; 710 $finish_num = $wpdb->get_var($sql); 711 return ($finish_num/$total_num)*100; 704 if($data['page_type']=='post'){ 705 $progress = 100; 706 }else{ 707 $sql = "SELECT count(*) as count FROM $table WHERE list_id=$list_id"; 708 $total_num = $wpdb->get_var($sql); 709 710 $sql = "SELECT count(*) as count FROM $table WHERE list_id=$list_id AND status=1"; 711 $finish_num = $wpdb->get_var($sql); 712 713 $progress = ($finish_num/$total_num)*100; 714 } 715 716 $wpdb->update($list_table,['progress'=>$progress],['id'=>$list_id]); 717 return $progress; 712 718 } 713 719 -
infility-global/trunk/widgets/infility-import-data/infility-import-data.php
r3392620 r3392635 157 157 $operation=''; 158 158 if($v['progress']!=100){ 159 $operation .= '<a class="run" data-id="'.$v['id'].'" data-type="'.$v['type'].'" href="javascript:;">继续</a>'; 159 $info_data = json_decode($v['data'],true); 160 $page_type = ''; 161 if(!empty($info_data['page_type'])){ 162 $page_type = 'data-page-type="'.$info_data['page_type'].'"'; 163 } 164 $operation .= '<a class="run" data-id="'.$v['id'].'" data-type="'.$v['type'].'" '.$page_type.' href="javascript:;">继续</a>'; 160 165 } 161 166 -
infility-global/trunk/widgets/infility-import-data/js/infility_import_data.js
r3327853 r3392635 10 10 } 11 11 12 let _this = $(this); 12 13 let parent = $(this).parents('tr'); 13 14 let id = $(this).attr('data-id'); … … 30 31 31 32 if(type==='url'){ 32 let run_data = []; 33 if (data.product === true) { 34 run_data.push({action: 'search_site_category', id: id});//10% 35 run_data.push({action: 'search_site_product', id: id});//20% 36 run_data.push({action: 'get_site_products', id: id});//20% 37 } 38 39 if (data.blog === true) { 40 run_data.push({action: 'search_site_blogs', id: id});//10% 41 run_data.push({action: 'get_site_blogs', id: id});//10% 42 } 43 44 if (data.product === true || data.blog === true) { 45 run_data.push({action: 'add_term', id: id});//10% 46 run_data.push({action: 'add_post', id: id});//10% 47 } 48 33 let page_type = _this.attr('data-page-type'); 34 let run_data = []; 35 if(page_type==='post'){ 36 run_data.push({action:'get_post_detail',id:id});//10% 37 }else if(page_type==='category'){ 38 run_data.push({action:'search_category_page',id:id});//10% 39 run_data.push({action:'search_category_post',id:id});//10% 40 run_data.push({action:'get_post_detail',id:id});//10% 41 } 49 42 runProcess(run_data, button_obj, show_progress); 50 43 }else if(type==='excel'){ … … 181 174 let id = data.id; 182 175 if(type==='url'){ 183 let run_data = []; 184 if(data.product===true){ 185 run_data.push({action:'search_site_category',id:id});//10% 186 run_data.push({action:'search_site_product',id:id});//20% 187 run_data.push({action:'get_site_products',id:id});//20% 188 } 189 190 if(data.blog===true){ 191 run_data.push({action:'search_site_blogs',id:id});//10% 192 run_data.push({action:'get_site_blogs',id:id});//10% 193 } 194 195 if(data.product===true || data.blog===true){ 196 run_data.push({action:'add_term',id:id});//10% 197 run_data.push({action:'add_post',id:id});//10% 198 } 199 200 if(run_data.length<=0){ 201 button_obj.attr('is_run','false'); 202 button_obj.text('完成'); 203 return false; 176 let page_type = form_obj.find("select[name='page_type']").val(); 177 178 let run_data = []; 179 if(page_type==='post'){ 180 run_data.push({action:'get_post_detail',id:id});//10% 181 }else if(page_type==='category'){ 182 run_data.push({action:'search_category_page',id:id});//10% 183 run_data.push({action:'search_category_post',id:id});//10% 184 run_data.push({action:'get_post_detail',id:id});//10% 204 185 } 205 186
Note: See TracChangeset
for help on using the changeset viewer.