Files
deepdata/my_ops/markitdown_parser/index_files/hotsearch-2e7b839d0b_g4-m.js
沃巴蒂 ff22ed3a8b feat(deepdata): 引入修改密码、文件预览组件与清洗算子增强,deepflow 改名为 deep-flow
本次同步 09-12 至 09-28 的代码变更,主要内容:

新增功能
- 修改密码:后端新增 ChangePasswordRequest DTO 与UserController/UserService
  对应接口,前端新增 ChangePasswordDialog 并在 Header 接入入口
- 文件预览组件重构:file-preview 目录拆分出 VideoPreview(支持 blobUrl 直传)、
  ImagePreview、AudioPreview,index.tsx 统一调度各类型预览器
- 新增 my_ops 算子模块:markitdown_parser、mineru_pdf_parser、text_quality_evaluator
- 新增 tools/minio-file-server MinIO 文件服务

功能增强
- 数据清洗:cleaning_task_service/scheduler/routes 重构,
  data_juicer_executor 与 wrapper 增强,OperatorTable/LogsTable/TaskDetail 同步调整
- 数据标注:annotation sync.py、project.py 接口与schema 更新
- 数据采集、算子市场、首页与菜单路由相关页面调整
- DataJuicer 算子接入(useOperatorOperations、dj_ops_schema)

结构调整
- deepflow/ 更名为 deep-flow/(419 个文件重命名)
- 新增 helm 部署编排、GitHub Actions 之外的自建镜像构建脚本

未纳入本次提交
- scripts-backup/、runtime/python-executor-backup/、components_backup/(备份目录)
- *.backup*、__pycache__ 产物
- zh_core_web_sm-3.8.0-py3-none-any.whl(46MB 构建产物)
- DataX/(内嵌独立仓库,远程亦未收录其源码)
2026-10-03 22:44:56 +08:00

35 lines
17 KiB
JavaScript

F.addLog("superman:components/hotsearch",["hotsearchClick","hotsearchShow","hotsearchSet","newsClick","newsShow"]);F.addLog("superman:components",{categoryClick:"1200100001"});F.module("superman:components/hotsearch",function(require,exports,ctx){var pageNum=0;var hotsearchData;var totalPages;var $hotsearchWrapper=$(".s-hotsearch-wrapper");var $hotsearchContentWrapper=$hotsearchWrapper.find("#hotsearch-content-wrapper");var $hideHotsearchBtn=$("#s-user-setting-menu .s-set-hotsearch.set-hide")
;var $showHotsearchBtn=$("#s-user-setting-menu .s-set-hotsearch.set-show");var $hotBoardWrapper=$(".s-hotboard-wrapper");var nodeSample=bds&&bds.comm&&bds.comm.nodeSample||"";var hotTip=nodeSample;var aiSampleval=bds&&bds.comm&&bds.comm.aiSampleval;var hitHotBoardSample=bds&&bds.comm&&bds.comm.hitHotBoardSample;var hitRecommendStyleSample=bds&&bds.comm&&bds.comm.hitRecommendStyleSample;var isNewHotFeed=bds&&bds.comm&&bds.comm.nodeSample&&bds.comm.nodeSample.indexOf("PC_INDEX_NEW_FEED"
)>-1&&bds.comm.hasFeedSwitch&&bds.comm.hasFeedData;var flatHotsearchData=[];var currentOffset=0;var hitFeedUpgrade1=bds&&bds.comm&&bds.comm.nodeSample&&(bds.comm.nodeSample.indexOf("PC_INDEX_FEED_UPGRADE_1")>-1||bds.comm.nodeSample.indexOf("PC_INDEX_FEED_NO_LOGIN_UPGRADE_1")>-1)&&bds.comm.hasFeedSwitch&&bds.comm.hitNewHotFeed;var isNewHotFeedSecondScreen=isNewHotFeed||!!hitFeedUpgrade1;function parseHotsearchData(){if(!hotsearchData||hotsearchData.length<1){return}var hitHotTip=hotTip.indexOf(
"change_item")>-1||hotTip.indexOf("change_all")>-1;var hitNewHotFeed=bds&&bds.comm&&bds.comm.hitNewHotFeed;var hitSample=nodeSample.indexOf("notlogin_hotitem_6")>-1||/(61006|61008)/.test(window.s_session.sid);var perPage=hitNewHotFeed&&!hitFeedUpgrade1?16:hitSample?6:hitHotTip?16:10;totalPages=Math.floor(hotsearchData.length/perPage);tempData=hotsearchData.map(function(item){var newItem=item;newItem.index=parseInt(item.index,10);if(newItem.index===-100){newItem.isAd=true}else if(
newItem.index===0){newItem.isTop=true}return newItem});if(isNewHotFeedSecondScreen){flatHotsearchData=tempData.slice(0);currentOffset=0}var current=0;hotsearchData=[];while(current<totalPages){hotsearchData.push(tempData.slice(current*perPage,current*perPage+perPage));current++}}function changeStatus(nodeA,nodeB){nodeA.css("display","none");nodeB.css("display","inline-block")}function updateHotsearchItem(data,itemIndex,$scope){var $container=$scope||$hotsearchContentWrapper
;var currentIndex=data.index;var $curDom=$container.find('[data-index="'+itemIndex+'"]');var $titleContent=$curDom.find(".title-content");var newDom=$curDom.html();$curDom.empty();$curDom.append(newDom);$curDom=$container.find('[data-index="'+itemIndex+'"]');$titleContent=$curDom.find(".title-content");var $titleIndex=$titleContent.find(".title-content-index");var $lastIndexClass=$titleIndex.attr("class")||"";var $titleMark=$curDom.find(".title-content-mark");var text=data.card_title
;var tag=data.pre_tag;var link=decodeURIComponent(data.linkurl);$titleContent.attr("href",link);$titleContent.removeClass("tag-width");var title=$titleContent.find(".title-content-title");title.text(text);title.find(".title-content-icon").remove();if(tag){var preImg='<img class="title-content-icon" src="'+tag+'" />';title.prepend(preImg)}if(itemIndex===0){var $topWord=$curDom.find(".title-content-top-icon");data.isTop?changeStatus($titleIndex,$topWord):changeStatus($topWord,$titleIndex)}else if(
itemIndex===5||itemIndex===4){var $adWord=$curDom.find(".title-content-noindex");data.isAd?changeStatus($titleIndex,$adWord):changeStatus($adWord,$titleIndex)}$titleIndex.removeClass();var newClass=$lastIndexClass.replace(/c-index-single-hot[^ ]+/,"c-index-single-hot"+currentIndex);$titleIndex.addClass(newClass);$titleIndex.text(currentIndex);var markClass=$titleMark.attr("class")||"c-text";$titleMark.removeClass();var HOT_TAGS=["","c-text-new","c-text-business","c-text-hot","c-text-fei",
"c-text-bao","c-text-rec"];var HOT_TAGS_TEXT=["","新","商","热","沸","爆","荐"];var className=HOT_TAGS[data.hotTags]||"";$titleMark.addClass(markClass.replace(/c-text-[^ ]+/,"")+" "+className);$titleMark.text(HOT_TAGS_TEXT[data.hotTags]);if(className){$titleContent.addClass("tag-width")}}function getVisibleHotsearchCount(){var items=document.querySelectorAll(".hotfeed-hotsearch-item");if(!items.length){return 0}var count=0;for(var i=0;i<items.length;i++){if(items[i].style.display!=="none"){count++}}
return count||items.length}function hotsearchRefreshHandler(isFirstScreen,$scope){var isFeedHidden=!!document.querySelector("#s-user-setting-menu.hiding-feed");if(isNewHotFeedSecondScreen&&!isFirstScreen&&!isFeedHidden){if(!flatHotsearchData||flatHotsearchData.length<1){return}var visibleCount=getVisibleHotsearchCount();if(visibleCount<1){return}currentOffset+=visibleCount;if(currentOffset+16>flatHotsearchData.length){currentOffset=0}for(var i=0;i<16;i++){updateHotsearchItem(
flatHotsearchData[currentOffset+i],i,$scope)}sendHotsearchShowLog();sendBusinessHotsearchShowLog();return}if(!hotsearchData||hotsearchData.length<1){return}pageNum++;if(pageNum>=totalPages){pageNum=0}if(hotsearchData[pageNum]){hotsearchData[pageNum].forEach(function(data,i){updateHotsearchItem(data,i,$scope)})}sendHotsearchShowLog();sendBusinessHotsearchShowLog()}function bindHotSearchClickEvent(){$(".hot-title").click(function(){ctx.fire("hotsearchClick",{clickType:"hotSearchTitle"})
;sendUbcClickLog("title")})}function bindRefreshClickEvent(){$('[id="hotsearch-refresh-btn"]').click(function(){ctx.fire("newsClick",{clickType:"wordsChange"});var inFirstScreen=hitFeedUpgrade1?$(this).closest(".feed-hint-first-screen").length>0:false;var $scope=hitFeedUpgrade1?$(this).closest(".s-hotsearch-wrapper").find('[id="hotsearch-content-wrapper"]'):null;hotsearchRefreshHandler(inFirstScreen,$scope);$(".c-icon").addClass("rotate");setTimeout(function(){$(".c-icon").removeClass("rotate")}
,200);sendUbcClickLog("change");bindHotsearchItemClickEvent()})}function bindMoreBtnClickEvent(){$(".s-hotsearch-button").click(function(){ctx.fire("newsClick",{clickType:"moreBtnClick"})})}function sendHotsearchShowLog(){var wordsStr=[];if(isNewHotFeed){$hotsearchContentWrapper.find(".hotsearch-item").each(function(index,item){if(window.getComputedStyle(item).display!=="none"){var text=$(item).find(".title-content-title").text();wordsStr.push(text)}})}else{$hotsearchContentWrapper.find(
".title-content-title").map(function(index,dom){wordsStr.push(dom.innerText)})}ctx.fire("hotsearchShow",{showType:"hotword",words:$.stringify(wordsStr),pagenum:pageNum})}function bindHotsearchItemClickEvent(){$hotsearchContentWrapper.find(".title-content").off("click").click(function(){var title=$(this).find(".title-content-title").text();var $hotsearchItem=$(this).closest(".hotsearch-item");var index=$hotsearchItem.attr("data-index");var $mark=$hotsearchItem.find(".title-content-mark")
;var isBusiness=$mark.hasClass("c-text-business");ctx.fire("newsClick",{clickType:"wordTopic",newsType:"words",url:$(this).attr("href"),title:title,pagenum:pageNum,newsindex:index});sendUbcClickLog("item",{list:[{order:$(this).find(".title-content-index").text(),title:title}]});isBusiness&&sendBusinessHotsearchClickLog({index:index,title:title})})}function moreBtnShow(){var hitHotTip=hotTip.indexOf("change_button")>-1||hotTip.indexOf("change_all")>-1;if(hitHotTip){ctx.fire("newsShow",{
showType:"moreBtnShow"})}}function judgeHotsearchStatus(){var isLogin=s_session.isLogin;var isHideHotsearch=$.cookie.get("hide_hotsearch");if(!isLogin){if(isHideHotsearch!=="1"){showHotsearch()}else{hideHotsearch()}}}function showHotsearch(){$hotsearchWrapper.removeClass("hide");document.body.classList.remove("hide-hotsearch-init");$hideHotsearchBtn.show();$showHotsearchBtn.hide();$("#head_wrapper").removeClass("s-ps-islite");if(aiSampleval){$("#s_wrap").css("display","")}if(
hitHotBoardSample||hitRecommendStyleSample){$hotBoardWrapper.removeClass("hide")}}function hideHotsearch(){$hotsearchWrapper.addClass("hide");document.body.classList.remove("hide-hotsearch-init");$hideHotsearchBtn.hide();$showHotsearchBtn.show();$("#head_wrapper").addClass("s-ps-islite");if(aiSampleval){$("#s_wrap").hide()}if(hitHotBoardSample||hitRecommendStyleSample){$hotBoardWrapper.addClass("hide")}}function bindShowAndHideHotsearchBtnClickEvent(){function onShowHotsearchBtnClick(){
showHotsearch();$.cookie.remove("hide_hotsearch");ctx.fire("categoryClick",{category:"tjshowhotsearch"});sendUbcClickLog("open_hotsearch",{area:""})}function onHideHotsearchBtnClick(immediate){if(immediate){hideHotsearch()}var expiresDate=new Date;expiresDate.setTime(expiresDate.getTime()+365*24*60*60*1e3);$.cookie.set("hide_hotsearch",1,{path:"/",expires:expiresDate});ctx.fire("categoryClick",{category:"tjhidehotsearch"});sendUbcClickLog("close_hotsearch",{area:""})}$showHotsearchBtn.click(
onShowHotsearchBtnClick);$hideHotsearchBtn.click(function(){onHideHotsearchBtnClick(true)});var newHotFeedSample=bds.comm.nodeSample&&(bds.comm.nodeSample.indexOf("PC_INDEX_NEW_FEED")>-1||bds.comm.nodeSample.indexOf("PC_INDEX_FEED_LIST")>-1||bds.comm.nodeSample.indexOf("PC_INDEX_FEED_UPGRADE_1")>-1||bds.comm.nodeSample.indexOf("PC_INDEX_FEED_UPGRADE_2")>-1||bds.comm.nodeSample.indexOf("PC_INDEX_FEED_UPGRADE_3")>-1||bds.comm.nodeSample.indexOf("PC_INDEX_FEED_NO_LOGIN_UPGRADE_1"
)>-1||bds.comm.nodeSample.indexOf("PC_INDEX_FEED_NO_LOGIN_UPGRADE_2")>-1||bds.comm.nodeSample.indexOf("PC_INDEX_FEED_NO_LOGIN_UPGRADE_3")>-1||bds.comm.nodeSample.indexOf("PC_INDEX_FEED_NO_LOGIN_UPGRADE_4")>-1);if(newHotFeedSample){$(window).on("showHotsearch",onShowHotsearchBtnClick);$(window).on("hideHotsearch",function(){onHideHotsearchBtnClick(false)})}}function getHotsearchData(){try{var hotSearchDataJSon=JSON.parse($("#hotsearch_data").text())
;hotsearchData=hotSearchDataJSon&&hotSearchDataJSon.hotsearch;parseHotsearchData()}catch(err){hotsearchData=[];$("#hotsearch-refresh-btn").hide()}}function sendUbcClickLog(value,ext){F.ubc&&F.ubc.sendClickLog(value,Object.assign({},{is_log:window.s_session.isLogin?"1":"0",area:"realtime"},ext))}function sendBusinessHotsearchClickLog(hotwordData){F.ubc&&F.ubc.sendClickLog("item",{list:[{order:hotwordData.index,title:hotwordData.title}],area:"realtime",tag:"business"})}
function sendBusinessHotsearchShowLog(){var businessHotwords=[];$hotsearchContentWrapper.find(".hotsearch-item").each(function(index,item){var $item=$(item);if(isNewHotFeed&&window.getComputedStyle(item).display==="none"){return}var $mark=$item.find(".title-content-mark");if($mark.hasClass("c-text-business")){var title=$item.find(".title-content-title").text();var hotIndex=$item.find(".title-content-index").text();businessHotwords.push({order:hotIndex,title:title})}})
;businessHotwords.length>0&&F.ubc&&F.ubc.sendShowLog("item",{list:businessHotwords,area:"hotsearch",tag:"business"})}function addLoginClass(){var isLogin=s_session.isLogin;if(!isLogin){return}$hotsearchWrapper.addClass("s-hotsearch-wrapper-login")}function init(){if(document.querySelector(".s-hotsearch-subtab-wrapper")){return}bindHotSearchClickEvent();bindRefreshClickEvent();bindMoreBtnClickEvent();bindHotsearchItemClickEvent();bindShowAndHideHotsearchBtnClickEvent();sendHotsearchShowLog()
;sendBusinessHotsearchShowLog();judgeHotsearchStatus();moreBtnShow();getHotsearchData();addLoginClass();initHotfeedShield()}function initHotfeedShield(){var isHotfeed=document.querySelector(".new-hotfeed-wrapper");if(!isHotfeed){return}var headEl=document.getElementById("head");var hasSkin=headEl&&headEl.classList.contains("s-skin-hasbg");var container=document.querySelector(".hotfeed-container");var scrollEl=document.getElementById("head")||window;var sMancard=container&&container.closest(
"#s_mancard_main")||document.getElementById("s_mancard_main");var lastSkinBg="";function getSkinBg(){var skinContainer=document.getElementById("skin-container");if(!skinContainer){return{image:"",color:""}}return{image:skinContainer.style.backgroundImage||window.getComputedStyle(skinContainer).backgroundImage,color:skinContainer.style.backgroundColor||window.getComputedStyle(skinContainer).backgroundColor}}function applySkinBg(el,bg){var inner=el._skinInner;if(!inner){return}
inner.style.backgroundImage=bg.image;inner.style.backgroundColor=bg.color;inner.style.backgroundRepeat="no-repeat";inner.style.backgroundPosition="center 0";inner.style.backgroundSize="cover"}function clearSkinBg(el){var inner=el&&el._skinInner;if(!inner){return}inner.style.backgroundImage="none";inner.style.backgroundColor="transparent";inner.style.backgroundRepeat="";inner.style.backgroundPosition="";inner.style.backgroundSize=""}function createSkinMask(opts,parent){
var el=document.createElement("div");el.style.display="none";el.style.position="fixed";el.style.top=opts.top;el.style.left="0";el.style.height=opts.height;el.style.zIndex=opts.zIndex;el.style.pointerEvents="auto";el.style.overflow="hidden";el.style.width="100%";el.style.setProperty("width","calc(100% - var(--head-scrollbar-w, 0px))");if(!hasSkin){el.style.background="#fff"}var inner=document.createElement("div");inner.style.position="absolute";inner.style.top="-"+(opts.top||"0")
;inner.style.left="0";inner.style.width="100vw";inner.style.height="100vh";inner.style.minWidth="1250px";el.appendChild(inner);el._skinInner=inner;(parent||document.body).appendChild(el);return el}var shield=createSkinMask({top:"0",height:"124px",zIndex:"3"},document.querySelector("#wrapper #skin-container"));shield.className="hotfeed-shield";var a3SkinMask=null;var a3Head=null;var a3HeadBorder=null;if(sMancard){a3SkinMask=createSkinMask({top:s_session.isLogin?"124px":"112px",
height:s_session.isLogin?"51px":"35px",zIndex:"5"},sMancard);a3SkinMask.className="hotfeed-a3-skin-mask";a3Head=document.createElement("div");a3Head.className="hotfeed-a3-head";a3Head.style.cssText="display:none;position:fixed;height:51px;"+"background:rgba(255,255,255,0.8);"+"border-radius:18px 18px 0 0;"+"z-index:6;pointer-events:auto;"+"backdrop-filter: blur(44px);"+(s_session.isLogin?"top:124px;":"top:112px;");sMancard.appendChild(a3Head);a3HeadBorder=document.createElement("div")
;a3HeadBorder.className="hotfeed-a3-head-border";a3HeadBorder.style.cssText="display:none;position:fixed;top:124px;height:21px;"+"background:transparent;"+"border:1px solid rgba(255,255,255,0.3);border-bottom:none;"+"border-radius:18px 18px 0 0;"+"z-index:85;pointer-events:auto;";sMancard.appendChild(a3HeadBorder)}var hotsearchItems=document.querySelectorAll(".hotfeed-hotsearch-item");var hotsearchWrapper=document.querySelector(".s-hotsearch-wrapper-hotfeed");var BOTTOM_GAP=69-12
;var ITEM_HEIGHT=37;function updateHotsearchVisibility(isStuck){if(!hotsearchWrapper||!hotsearchItems.length){return}if(!isStuck){for(var i=0;i<hotsearchItems.length;i++){hotsearchItems[i].style.display=""}return}var listEl=hotsearchWrapper?hotsearchWrapper.querySelector('[id="hotsearch-content-wrapper"]'):document.getElementById("hotsearch-content-wrapper");if(!listEl){return}var listTop=listEl.getBoundingClientRect().top;var availHeight=window.innerHeight-listTop-BOTTOM_GAP
;var maxVisible=Math.max(0,Math.floor(availHeight/ITEM_HEIGHT));for(var j=0;j<hotsearchItems.length;j++){hotsearchItems[j].style.display=j<maxVisible?"":"none"}}function updateShield(){if(!container){return}var cRect=container.getBoundingClientRect();var isStuck=cRect.top<=124;updateHotsearchVisibility(isStuck);var skinNow=headEl&&headEl.classList.contains("s-skin-hasbg");if(skinNow&&isStuck){var bg=getSkinBg();var bgKey=bg.image+bg.color;if(bgKey!==lastSkinBg){lastSkinBg=bgKey
;shield.style.background="none";applySkinBg(shield,bg);if(a3SkinMask){a3SkinMask.style.background="none";applySkinBg(a3SkinMask,bg)}}}if(!skinNow){lastSkinBg="";shield.style.background="#fff";clearSkinBg(shield);if(a3SkinMask){a3SkinMask.style.background="#fff";clearSkinBg(a3SkinMask)}}shield.style.display=isStuck&&skinNow?"block":"none";if(a3SkinMask){a3SkinMask.style.display=isStuck?"block":"none"}if(a3Head&&a3HeadBorder){var headDisplay=isStuck&&skinNow?"block":"none"
;a3Head.style.display=headDisplay;if(isStuck&&skinNow){var left=cRect.left+"px";var width=cRect.width+"px";a3Head.style.left=left;a3Head.style.width=width;a3HeadBorder.style.left=left;a3HeadBorder.style.width=width}}}scrollEl.addEventListener("scroll",updateShield);window.addEventListener("resize",updateShield);window.addEventListener("scroll",updateShield);document.addEventListener("feedEnterSecondScreen",function(){setTimeout(updateShield,500)});if(headEl&&typeof MutationObserver!=="undefined"
){new MutationObserver(updateShield).observe(headEl,{attributes:true,attributeFilter:["class"]})}if(typeof MutationObserver!=="undefined"){var skinEl=document.getElementById("skin-container");if(skinEl){new MutationObserver(function(){lastSkinBg="";updateShield()}).observe(skinEl,{attributes:true,attributeFilter:["style"]})}}}exports.init=init});F.call("superman:components/hotsearch","init");