index-legacy.c359c8e9.js 16 KB

1234567891011
  1. ;(function(){function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}var __vite_style__=document.createElement('style');__vite_style__.innerHTML="._wrap_1rz4z_1{padding:0 2px 0 0;display:flex;flex-direction:row;align-items:center;justify-content:space-between}._wrap_1rz4z_1 ._wrapLeft_1rz4z_8{display:flex;flex-direction:row;align-items:center}._wrap_1rz4z_1 ._wrapLeft_1rz4z_8 ._hotIcon_1rz4z_13{width:24px;height:24px;margin-right:6px}._wrap_1rz4z_1 ._wrapLeft_1rz4z_8 ._tagWrap_1rz4z_18{display:flex;flex-direction:row}._wrap_1rz4z_1 ._wrapLeft_1rz4z_8 h5{font-weight:500;color:#333;line-height:28px;font-size:20px}._wrap_1rz4z_1 ._wrapRight_1rz4z_28{display:flex;flex-direction:row;cursor:pointer;font-size:16px;align-items:center}._wrap_1rz4z_1 ._wrapRight_1rz4z_28 span{color:#666}._wrap_1rz4z_1 ._wrapRight_1rz4z_28 ._arrow_1rz4z_38{width:16px;height:16px;margin-left:4px}._wrap_1rz4z_1 ._searchWrap_1rz4z_43{cursor:pointer;display:flex;flex-direction:row;align-items:center;border-radius:2px;border:1px solid #e5e5e5;padding:0 8px}._wrap_1rz4z_1 ._searchWrap_1rz4z_43 span{color:#666!important;line-height:24px;font-size:13px}._wrap_1rz4z_1 ._searchWrap_1rz4z_43 ._search_1rz4z_43{width:14px;height:14px;margin-left:8px}._searchDetail_1rz4z_62 ._searchResult_1rz4z_62{line-height:24px;display:flex;flex-direction:row;align-items:center;margin-bottom:18px}._searchDetail_1rz4z_62 ._searchResult_1rz4z_62 ._resultTitle_1rz4z_69{padding:0 20px 0 14px;display:flex;flex-direction:row;align-items:center;color:#999;font-size:18px}._searchDetail_1rz4z_62 ._searchResult_1rz4z_62 ._resultTitle_1rz4z_69 img{width:14px;height:14px;margin-left:4px}._searchDetail_1rz4z_62 ._searchResult_1rz4z_62 ._tagList_1rz4z_82{width:931px;display:flex;flex-direction:row;align-items:center}._searchDetail_1rz4z_62 ._searchResult_1rz4z_62 ._searchResultRight_1rz4z_88{display:flex;flex-direction:row}._searchDetail_1rz4z_62 ._searchResult_1rz4z_62 ._searchResultRight_1rz4z_88 ._clearBtn_1rz4z_92{margin-left:8px;line-height:24px;height:24px;cursor:pointer;display:flex;flex-direction:row;align-items:center;border-radius:2px;border:1px solid #e5e5e5;padding:0 8px}._searchDetail_1rz4z_62 ._searchResult_1rz4z_62 ._searchResultRight_1rz4z_88 ._clearBtn_1rz4z_92 span{color:#666!important;line-height:24px;font-size:13px}._searchDetail_1rz4z_62 ._searchResult_1rz4z_62 ._searchResultRight_1rz4z_88 ._clearBtn_1rz4z_92 ._clearIcon_1rz4z_109{width:14px;height:14px;margin-left:6px}._searchDetail_1rz4z_62 ._searchChioseWrap_1rz4z_114{background-color:#fff;border-radius:8px;padding:20px 20px 5px}._searchDetail_1rz4z_62 ._searchChioseWrap_1rz4z_114 ._chioseLineWrap_1rz4z_119 ._chioseRow_1rz4z_119{display:flex;flex-direction:row;align-items:center;margin-bottom:30px}._searchDetail_1rz4z_62 ._searchChioseWrap_1rz4z_114 ._chioseLineWrap_1rz4z_119 ._chioseRow_1rz4z_119 p{line-height:48px;width:112px;text-align:center;margin-right:5px}._searchDetail_1rz4z_62 ._searchChioseWrap_1rz4z_114 ._chioseLineWrap_1rz4z_119 ._chioseRow_1rz4z_119 ._chioseTagWrap_1rz4z_131{flex:1;position:relative;padding-left:20px}._searchDetail_1rz4z_62 ._searchChioseWrap_1rz4z_114 ._chioseLineWrap_1rz4z_119 ._chioseRow_1rz4z_119 ._chioseTagWrap_1rz4z_131:before{position:absolute;content:\"\";width:1px;height:100%;background:#ededed;left:0}._searchDetail_1rz4z_62 ._searchChioseWrap_1rz4z_114 ._chioseLineWrap_1rz4z_119 ._chioseRow_1rz4z_119 ._chioseTagWrap_1rz4z_131 /deep/ ._el-tag_1rz4z_144{margin-bottom:14px}._searchDetail_1rz4z_62 ._searchChioseWrap_1rz4z_114 ._chioseLineWrap_1rz4z_119 ._chioseRow_1rz4z_119 ._tags_1rz4z_147{background:#e0f7f3;line-height:24px;display:inline-block;margin-right:40px;color:#2dc7aa;padding:2px 11px;border-radius:6px;font-size:15px}._searchDetail_1rz4z_62 ._searchChioseWrap_1rz4z_114 ._chioseLineWrap_1rz4z_119 ._chioseRow_1rz4z_119 ._tagText_1rz4z_157{margin-right:40px;display:inline-block;line-height:24px;font-size:15px;color:#666;cursor:pointer}._searchDetail_1rz4z_62 ._submitBtn_1rz4z_165{width:194px;height:42px;background:#2dc7aa;border-radius:23px;text-align:center;line-height:42px;margin:18px auto 0;color:#fff;cursor:pointer}.el-tag--Light,.el-tag--light{border:1px solid #2dc7aa;font-size:14px;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:#2dc7aa;line-height:20px;border-radius:6px}.chioseTagWrap .el-tag{margin-bottom:14px;margin-right:12px;cursor:pointer}.chioseTagWrap .el-tag:last-child{margin-right:0!important}.chioseTag{margin-right:14px}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.2eaedc47.js','./hot-legacy.16c30716.js','./arrow-legacy.c72c6a83.js','./index-legacy.01e856d6.js','./vendor-legacy.457cbbd5.js'],function(exports){'use strict';var tagItem,hot,arrow$1,request,defineComponent,reactive,useRouter,onMounted,createVNode,Fragment,createTextVNode,ElTag;return{setters:[function(module){tagItem=module.t;},function(module){hot=module.h;},function(module){arrow$1=module.a;},function(module){request=module.r;},function(module){defineComponent=module.d;reactive=module.r;useRouter=module.f;onMounted=module.o;createVNode=module.c;Fragment=module.F;createTextVNode=module.a;ElTag=module.S;}],execute:function execute(){var wrap="_wrap_1rz4z_1";var wrapLeft="_wrapLeft_1rz4z_8";var hotIcon="_hotIcon_1rz4z_13";var tagWrap="_tagWrap_1rz4z_18";var wrapRight="_wrapRight_1rz4z_28";var arrow="_arrow_1rz4z_38";var searchWrap="_searchWrap_1rz4z_43";var search$1="_search_1rz4z_43";var searchDetail="_searchDetail_1rz4z_62";var searchResult="_searchResult_1rz4z_62";var resultTitle="_resultTitle_1rz4z_69";var tagList="_tagList_1rz4z_82";var searchResultRight="_searchResultRight_1rz4z_88";var clearBtn="_clearBtn_1rz4z_92";var clearIcon$1="_clearIcon_1rz4z_109";var searchChioseWrap="_searchChioseWrap_1rz4z_114";var chioseLineWrap="_chioseLineWrap_1rz4z_119";var chioseRow="_chioseRow_1rz4z_119";var chioseTagWrap="_chioseTagWrap_1rz4z_131";var tags="_tags_1rz4z_147";var tagText="_tagText_1rz4z_157";var submitBtn="_submitBtn_1rz4z_165";var classes={wrap:wrap,wrapLeft:wrapLeft,hotIcon:hotIcon,tagWrap:tagWrap,wrapRight:wrapRight,arrow:arrow,searchWrap:searchWrap,search:search$1,searchDetail:searchDetail,searchResult:searchResult,resultTitle:resultTitle,tagList:tagList,searchResultRight:searchResultRight,clearBtn:clearBtn,clearIcon:clearIcon$1,searchChioseWrap:searchChioseWrap,chioseLineWrap:chioseLineWrap,chioseRow:chioseRow,chioseTagWrap:chioseTagWrap,"el-tag":"_el-tag_1rz4z_144",tags:tags,tagText:tagText,submitBtn:submitBtn};var search="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAmBJREFUSEvtlLFrU1EUxr+Th3lYxVFx0w7ZHN1cOoiDgyAoOAgWknsShdTFamu0j2q1gqC8grxzg4OZSgcFBwfxDxBHVwd1aYMKHaqUh+YdueElpCFtahO61DPdd98753ffd757CLsctMs87C0gicgEgKsARgF4A8rdAPAZwDNmfgpAXb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pKBRCuP2GWuuAmZ10jZk/RlE0W6vVepEPsbcFNhoNq9PprAK4YGBrpVLpfLlcjvpdms2m3Wq1XjPznFl/NT09PV+pVOKtOt0WqJR6DKBmRC1mPl2tVr9vZeL7/mEieg+gZOp1KeX1sYFaa8HMygi+EdEpIcTnUf9Ga32cmT8AOGISkUIIPagZ6jAMw7NxHL8EsI+I/jDzOSnlu6zpS+tKqTNE9IaZ9wP4a1nWRcdx3vZrNwHDMDwRRdEGER0yQ7BYrVafjAPr7fF9/xoRLRv9D9u2ZxzH+dSrbwJqrUNmXjTFB1LKpTyw3l6lVHrX3jLRLgshulPc/R4Y8fRArzDzarvdXvA8L9kJ0PO8QrFYXCGieQALQoj0ghgG7sQ8rybzpslrmLV/AsxKKHd9EmnuyLIE/wCtYsgdbdLd6gAAAABJRU5ErkJggg==";var clearIcon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAPBJREFUSEvtlc0KgzAQhGeFPqAne+nVPJLotZfm1AcUsQQUyjaG2RgtlHqU7HyZzf4ITv7kZB7+wOIZ/0hp3/cXAHcR8W3bPi3EYRjqeZ4bADfn3BiLjQEfAELQKCINC11gHkC4sHfOXSmgCqSgXdfVVVWtsGRMtEotUAssON5sC0aIOaPTmuzDlGAOLOlwvVlMeJomsG9mcrgFXf6HaqSK6h1KjzblNGiYYVRK19upyj0WqNvk0JTGevKwokkNgOJtwUybHOj3RxvjTDezxWmx9aSg/Hras4AXqG0BWzZ8zll6tOWIUxu/lPCWzu87fAG03NsdRlXCvgAAAABJRU5ErkJggg==";var hotSearch=exports('h',defineComponent({name:'hotSearch',components:{tagItem:tagItem},emits:['searchRust','hotTag'],props:{type:{type:String,default:'more'},searchType:{type:String,default:'MUSIC'},gotoPath:{type:String,default:'/searchdetail'},isChiose:{type:Boolean,default:false}},setup:function setup(props,conent){var state=reactive({hotList:[],type:props.type,showDetail:true,tagTree:[],chioseTagList:[],chioseParentList:[],searchTagList:[],searchType:props.searchType});var router=useRouter();var getHotList=/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var res;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return request.get("/api-website/open/music/sheet/hotTag/".concat(state.searchType));case 3:res=_context.sent;state.hotList=res.data;_context.next=10;break;case 7:_context.prev=7;_context.t0=_context["catch"](0);console.log(_context.t0);case 10:case"end":return _context.stop();}}},_callee,null,[[0,7]]);}));return function getHotList(){return _ref.apply(this,arguments);};}();var getTagTree=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var res;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=3;return request.get('/api-website/open/MusicTag/tree',{});case 3:res=_context2.sent;state.tagTree=res.data;// state.hotList = res.data
  2. _context2.next=10;break;case 7:_context2.prev=7;_context2.t0=_context2["catch"](0);console.log(_context2.t0);case 10:case"end":return _context2.stop();}}},_callee2,null,[[0,7]]);}));return function getTagTree(){return _ref2.apply(this,arguments);};}();var chioseTag=function chioseTag(tag){// 选择判断
  3. var chioseParentIndex=state.chioseParentList.indexOf(tag.parentTagId);var chioseIndex=state.chioseTagList.indexOf(tag.id);if(chioseParentIndex!==-1&&chioseIndex!==-1){// 这里就是反复点击这一个
  4. tag.isCheck=false;state.chioseParentList.splice(chioseParentIndex,1);state.chioseTagList.splice(chioseIndex,1);setSearchTagList();return;}if(chioseIndex==-1&&chioseParentIndex==-1){state.chioseParentList.push(tag.parentTagId);state.chioseTagList.push(tag.id);tag.isCheck=true;// 添加进去 并且设置其余的元素不可点击
  5. setSearchTagList();return;}if(chioseIndex!==-1||chioseParentIndex!==-1){// 选的没有且父元素也没有选中
  6. state.tagTree.forEach(function(tree){if(tree.id==tag.parentTagId){tree.children.forEach(function(item){item.isCheck=false;var index=state.chioseTagList.indexOf(item.id);if(index!==-1){state.chioseTagList.splice(index,1);}});}});tag.isCheck=true;state.chioseTagList.push(tag.id);setSearchTagList();return;}};var setSearchTagList=function setSearchTagList(){state.searchTagList=[];state.tagTree.forEach(function(tree){tree.children.forEach(function(item){if(state.chioseTagList.indexOf(item.id)!=-1){state.searchTagList.push(item);}});});// console.log(state.searchTagList, 'searchTagList')
  7. searchSubmit();};var closeChioseTag=function closeChioseTag(tag){chioseTag(tag);};var clearSearch=function clearSearch(){state.chioseTagList=[];state.chioseParentList=[];state.searchTagList=[];state.tagTree.forEach(function(tree){tree.children.forEach(function(item){item.isCheck=false;});});};var searchSubmit=function searchSubmit(){// 请求
  8. conent.emit('searchRust',state.chioseTagList);// state.showDetail = true
  9. };var clickHotTag=function clickHotTag(key){if(props.isChiose){state.hotList.forEach(function(element){element.isCheck=false;});state.hotList.forEach(function(element){if(element.key==key){element.isCheck=true;}});}conent.emit('hotTag',key);};var gotoSearch=function gotoSearch(){router.push({path:props.gotoPath});};onMounted(function(){getHotList();getTagTree();});return function(){return createVNode(Fragment,null,[state.showDetail?createVNode("div",{"class":classes.wrap},[createVNode("div",{"class":classes.wrapLeft},[createVNode("img",{"src":hot,"class":classes.hotIcon,"alt":""},null),createVNode("h5",null,[createTextVNode("\u70ED\u95E8\u641C\u7D22\uFF1A")]),createVNode("div",{"class":classes.tagWrap},[state.hotList.map(function(item){//
  10. return createVNode(tagItem,{"title":item.key,"onSearchTag":function onSearchTag(key){return clickHotTag(key);},"isChiose":true,"item":item},{default:function _default(){return[item.key];}});})])]),state.type=='more'?createVNode("div",{"class":classes.wrapRight,"onClick":gotoSearch},[createVNode("span",null,[createTextVNode("\u66F4\u591A")]),createVNode("img",{"class":classes.arrow,"src":arrow$1,"alt":""},null)]):null,state.type=='search'?createVNode("div",{"class":[classes.wrapRight,classes.searchWrap],"onClick":function onClick(){return state.showDetail=false;}},[createVNode("span",null,[createTextVNode("\u7B5B\u9009")]),createVNode("img",{"class":classes.search,"src":search,"alt":""},null)]):null]):createVNode("div",{"class":classes.searchDetail},[createVNode("div",{"class":classes.searchResult},[createVNode("div",{"class":classes.resultTitle},[createVNode("span",null,[createTextVNode("\u5DF2\u9009\u7C7B\u578B")]),createVNode("img",{"src":arrow$1,"alt":""},null)]),createVNode("div",{"class":classes.tagList},[state.searchTagList.map(function(item){return createVNode(ElTag,{"closable":true,"onClose":function onClose(){return closeChioseTag(item);},"class":"chioseTag"},{default:function _default(){return[item.name];}});})]),createVNode("div",{"class":classes.searchResultRight},[createVNode("div",{"class":classes.clearBtn,"onClick":clearSearch},[createVNode("span",null,[createTextVNode("\u6E05\u7A7A")]),createVNode("img",{"src":clearIcon,"class":classes.clearIcon,"alt":""},null)]),createVNode("div",{"class":classes.clearBtn,"onClick":function onClick(){state.showDetail=true;}},[createVNode("span",null,[createTextVNode("\u6536\u8D77")]),createVNode("img",{"src":arrows,"class":classes.clearIcon,"alt":""},null)])])]),createVNode("div",{"class":classes.searchChioseWrap},[createVNode("div",{"class":classes.chioseLineWrap},[state.tagTree.map(function(tree){return createVNode("div",{"class":classes.chioseRow},[createVNode("p",null,[tree.name,createTextVNode("\uFF1A")]),createVNode("div",{"class":[classes.chioseTagWrap,'chioseTagWrap']},[tree.children.map(function(tag){return(// effect={isChiose(tag)}
  11. tag.isCheck?createVNode("div",{"class":classes.tags,"onClick":function onClick(){chioseTag(tag);}},[' ',tag.name]):createVNode("span",{"onClick":function onClick(){chioseTag(tag);},"class":classes.tagText},[tag.name]));})])]);})])])])]);};}}));}};});})();