PageSourceSearch

https://fe-static-yuketang.yuketang.cn/fe/static/web/1.2.315/js/22018.fed9ddda.js

js yuketang.cn collected 2026-09-28 09:26:15 UTC 13,385 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkrainweb=self.webpackChunkrainweb||[]).push([["22018"],{9512:function(t,e,s){s.r(e),s.d(e,{default:function(){return l}}),s(80287),s(32927),s(35130),s(88353),s(63649),s(44959),s(35286),s(20573),s(16446),s(13054),s(88761),s(60668),s(42463);var i=s(2139),n=s(184);function a(t,e,s,i,n,a,r){try{var o=t[a](r),c=o.value}catch(t){s(t);return}o.done?e(c):Promise.resolve(c).then(i,n)}function r(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{},i=Object.keys(s);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(s).filter(function(t){return Object.getOwnPropertyDescriptor(s,t).enumerable}))),i.forEach(function(e){var i;i=s[e],e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i})}return t}function o(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);s.push.apply(s,i)}return s}
1)(Object(e)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(e,s))}),t}var c={name:"lesson-contribution",data:function(){return{id:-1,visibleMedia:!1,pageSize:20,activeIndex:-1,detail:null,list:[],focusOrder:1,maxOrder:7,hasNext:!0,hasPrev:!0,sendconfirm:!1,btnOrder:1,anno:{avatar:"https://qn-sfe.yuketang.cn/o_1cvff7vi9p781opp1c0r1ot9o1n9.jpg",name:this.$t("lesson.anonymity")},canMove:!1,scale:1,scaleList:[.5,1,1.5,2,3]}},computed:o(r({},(0,i.rn)(["baseInfo","lesson","anonymous","tougaoList","visiblePresenter","sendPostList"])),{hasPost:function(){return!!this.detail&&this.sendPostList.includes(this.detail.id)}}),components:{presenter:n.Z},watch:{activeIndex:function(t,e){t===this.list.length-1?this.hasNext=!1:this.hasNext=!0,0===t?this.hasPrev=!1:this.hasPrev=!0},$route:function(t,e){var s=this.$route.params;this.init(s)}},mixins:[],created:function(){var t=this.$route.params;this.init(t)},mounted:function(){this.initEvent()},updated:function(){},beforeDestroy:function(){},filters:{},methods:o(r({},(0,i.nv)(["setRouterInfo","setSocketMsg","setSendPostList"])),{init:function(t){var e;return(e=function(){var e,s,i;return function(t,e){var s,i,n,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},r=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return r.next=o(0),r.throw=o(1),r.return=o(2),"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function o(o){return function(c){var l=[o,c];if(s)throw TypeError("Generator is already executing.");for(;r&&(r=0,l[0]&&(a=0)),a;)try{if(s=1,i&&(n=2&l[0]?i.return:l[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,l[1])).done)return n;switch(i=0,n&&(l=[2&l[0],n.value]),l[0]){case 0:case 1:n=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,i=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!n||l[1]>n[0]&&l[1]<n[3])){a.label=l[1];break}if(6===l[0]&&a.label<n[1]){a.label=n[1],n=l;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(l);break}n[2]&&a.ops.pop(),a.trys.pop();continue}l=e.call(t,a)}catch(t){l=[6,t],i=0}finally{s=n=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(n){switch(n.label){case 0:return this.$route.query,e=t&&+t.id,[4,this.geTougaoList(e+1)];case 1:if(!((s=n.sent())&&s.length))return[3,3];return this.list=s,i=s.findIndex(function(t){return t.id===e}),this.activeIndex=i,this.setDetail(this.activeIndex),[4,this.geTougaoList(e,1)];case 2:(s=n.sent())&&s.length&&(this.list=s.reverse().concat(this.list),this.activeIndex=s.length+this.activeIndex),n.label=3;case 3:return[2]}})},function(){var t=this,s=arguments;return new Promise(function(i,n){var r=e.apply(t,s);function o(t){a(r,i,n,o,c,"next",t)}function c(t){a(r,i,n,o,c,"throw",t)}o(void 0)})}).call(this)},initEvent:function(){var t=this;this.$el.focus(),this.$el.addEventListener("keydown",function(e){console.log("You pressed:",e.keyCode),e.keyCode&&t.mapKeyCode(e)});var e=this.$el.querySelector(".J_detail");e.addEventListener("mousedown",function(s){s.preventDefault(),t.canMove=!0;var i=getComputedStyle(e);String(i.getPropertyValue("--scaleVal")).trim();var n=String(i.getPropertyValue("--x")).trim(),a=String(i.getPropertyValue("--y")).trim();n=parseInt(n,10),a=parseInt(a,10);var r=t.scale||1;r<1&&(n*=r,a*=r),t.lastPoint={x:s.clientX-n,y:s.clientY-a},console.dir(i)}),e.addEventListener("mouseup",function(e){e.preventDefault(),t.canMove=!1}),e.addEventListener("mouseout",function(e){e.preventDefault(),t.canMove=!1}),e.addEventListener("mousemove",function(e){if(e.preventDefault(),t.canMove){var s=t.lastPoint,i=e.clientX-s.x,n=e.clientY-s.y,a={x:i,y:n};if(Math.abs(i)>10||Math.abs(n)>10){var r=t.scale||1;r<1&&(a.x=a.x/r,a.y=a.y/r),t.translateContent(a)}return!1}})},geTougaoList:function(t){var e=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=this.baseInfo,n=i.userid,a=i.auth,r=i.language,o=i.version,c=API.lesson.tougao_list,l={start:t,direction:s,is_recount:1,count:this.pageSize,lesson_id:this.lesson.lessonid,UserID:n,Auth:a,Language:r,Version:o};return request.post(c,l).then(function(t){if(t&&t.data){var s=t.data,i=s.tougao_list;if(s.response_num<e.pageSize&&(e.hasMore=!1),i&&i.length){var n=i.length;return e.start=i[n-1].id,i}}})},formatData:function(t){return this.anonymous,t.pic||t.video&&t.video.url?this.visibleMedia=!0:this.visibleMedia=!1,t.content?t.pic?t.type=4:t.video&&t.video.url?t.type=5:t.type=1:t.pic?t.type=2:t.type=3,this.resetAction(),t},next:function(){var t=this.list.length-1;this.activeIndex<t&&(this.activeIndex=this.activeIndex+1,this.setDetail(this.activeIndex))},prev:function(){this.activeIndex>0&&(this.activeIndex=this.activeIndex-1,this.setDetail(this.activeIndex))},setDetail:function(t){var e=this.list[t];this.detail=this.formatData(e);var s={op:"postshown",lessonid:this.lesson.lessonid,postid:e.id,msgid:Date.now()};this.setSocketMsg(s)},handleBeforeSend:function(t){if(this.hasPost)return this;this.sendconfirm=!this.sendconfirm},handleSendAll:function(t){if(this.hasPost)return this;var e=this.detail,s={op:"sendpost",lessonid:this.lesson.lessonid,postid:e.id};this.setSocketMsg(s),this.sendconfirm=!1},mapKeyCode:function(t){var e=t.keyCode,s=t.altKey,i=t.ctrlKey,n=t.shiftKey;switch(e){case 33:case 37:case 38:if(this.sendconfirm)return this.btnOrder>1?this.btnOrder=this.btnOrder-1:this.btnOrder=2,this;this.focusOrder>1&&(4==this.detail.type||5==this.detail.type?this.focusOrder=this.focusOrder-1:7==this.focusOrder?this.focusOrder=this.focusOrder-2:this.focusOrder=this.focusOrder-1);break;case 34:case 39:case 40:if(this.sendconfirm)return this.btnOrder<2?this.btnOrder=this.btnOrder+1:this.btnOrder=1,this;this.focusOrder<this.maxOrder&&(4==this.detail.type||5==this.detail.type?this.focusOrder=this.focusOrder+1:5==this.focusOrder?this.focusOrder=this.focusOrder+2:this.focusOrder=this.focusOrder+1);break;case 119:if(s&&i&&n){if(this.sendconfirm){var a=this.$el.querySelector(".J_send_order.active");return a&&a.click(),this}var r=this.$el.querySelector(".J_order.active");r&&r.click()}break;case 117:case 120:s&&i&&n&&this.handleClosed()}},resetAction:function(){var t=this.$el.querySelector(".J_detail");t.style.setProperty("--x",0),t.style.setProperty("--y",0),t.style.setProperty("--scaleVal",1),this.scale=1},handleVisibleMedia:function(t){this.visibleMedia=t,this.resetAction()},handleClosed:function(t){var e={op:"closedmask",type:"post",lessonid:this.lesson.lessonid,msgid:Date.now()};this.setSocketMsg(e),this.$router.back()},handleBack:function(){this.$router.back()},handleRotate:function(t){var e=this.$el.querySelector(".J_pic"),s=t?90:-90;if(!e)return this;var i=parseInt(String(getComputedStyle(e).getPropertyValue("--rotate")).trim(),10);console.info(i),s+=i,e.style.setProperty("--rotate",s+"deg");var n=this.$el.querySelector(".J_detail");n.style.setProperty("--x",0),n.style.setProperty("--y",0)},handleScale:function(t){var e=this.scaleList,s=this.$el.querySelector(".J_detail"),i=this.scale,n=e.findIndex(function(t){return t===i});if("next"===t?n+=1:"prev"===t&&(n-=1),n<0||n>=e.length)return this;i=e[n],s.style.setProperty("--x",0),s.style.setProperty("--y",0),s.style.setProperty("--scaleVal",i),this.scale=i},translateContent:function(t){var e=this.$el.querySelector(".J_detail");this.lastPoint;var s=t.x,i=t.y;e.style.setProperty("--x",s+"px"),e.style.setProperty("--y",i+"px")}})},l=(0,s(81049).Z)(c,function(){var t=this,e=t._self._c;return e("section",{staticClass:"page__wrap",attrs:{tabindex:"4"}},[e("header",{staticClass:"header box-between cfff"},[t.detail?e("section",{staticClass:"user__wrap box-center"},[e("img",{staticClass:"user--avatar",attrs:{src:t.anonymous?t.anno.avatar:t.detail.user_avatar,alt:"头像"}}),t._v(" "),e("div",{staticClass:"pl10"},[e("p",{staticClass:"f28 cfff"},[t._v(t._s(t.anonymous?t.anno.name:t.detail.user_name))]),t._v(" "),e("p",{staticClass:"f14 c9b"},[t._v(t._s(t.detail.create_time))])])]):t._e(),t._v(" "),e("div",{staticClass:"pointer"},[e("i",{staticClass:"iconfont icon-closex f34",on:{click:t.handleClosed}})])]),t._v(" "),e("section",{staticClass:"content__wrap"},[e("section",{staticClass:"content__box J_detail"},[t.detail?[t.detail.content&&!t.visibleMedia?e("section",{staticClass:"cfff f34"},[t._v(t._s(t.detail.content))]):e("section",[t.detail.pic?e("img",{staticClass:"media--pic J_pic",attrs:{src:t.detail.pic,alt:""}}):t._e(),t._v(" "),t.detail.video&&t.detail.video.url?e("video",{directives:[{name:"show",rawName:"v-show",value:!t.detail.pic,expression:"!detail.pic"}],attrs:{controls:"",src:t.detail.video.url,poster:t.detail.video.thumb}}):t._e()])]:t._e()],2),t._v(" "),t.detail?e("nav",{staticClass:"content__nav pointer"},[e("section",{staticClass:"nav__item box-center J_order",class:{active:1===t.focusOrder,disabled:!t.hasNext},on:{click:t.next}},[e("i",{staticClass:"iconfont icon-xiayigex f45 blue"}),t._v(" "),e("p",{staticClass:"icon--tip cfff f20"},[t._v(t._s(t.$t("lesson.navnext")))])]),t._v(" "),e("section",{staticClass:"nav__item box-center J_order",class:{active:2===t.focusOrder,disabled:!t.hasPrev},on:{click:t.prev}},[e("i",{staticClass:"iconfont icon-shangyigex f45 blue"}),t._v(" "),e("p",{staticClass:"icon--tip cfff f20"},[t._v(t._s(t.$t("lesson.navprev")))])]),t._v(" "),e("hr",{staticClass:"line"}),t._v(" "),e("section",{staticClass:"nav__item box-center J_order",class:{active:3===t.focusOrder,disabled:t.scale>=3},on:{click:function(e){return t.handleScale("next")}}},[e("i",{staticClass:"iconfont icon-fangdax f45 blue"}),t._v(" "),e("p",{staticClass:"icon--tip cfff f20"},[t._v(t._s(t.$t("lesson.navzoomin")))])]),t._v(" "),e("section",{staticClass:"nav__item box-center J_order",class:{active:4===t.focusOrder,disabled:t.scale<1},on:{click:function(e){return t.handleScale("prev")}}},[e("i",{staticClass:"iconfont icon-suoxiaox f45 blue"}),t._v(" "),e("p",{staticClass:"icon--tip cfff f20"},[t._v(t._s(t.$t("lesson.navzoomout")))])]),t._v(" "),e("section",{staticClass:"nav__item box-center J_order",class:{active:5===t.focusOrder,disabled:!t.visibleMedia},on:{click:t.handleRotate}},[e("i",{staticClass:"iconfont icon-dux f45 blue"}),t._v(" "),e("p",{staticClass:"icon--tip cfff f20"},[t._v(t._s(t.$t("lesson.navrotate")))])]),t._v(" "),(4===t.detail.type||5===t.detail.type)&&t.visibleMedia?e("section",{staticClass:"nav__item box-center J_order",class:{active:6===t.focusOrder},on:{click:function(e){return t.handleVisibleMedia(!1)}}}
1,[e("i",{staticClass:"iconfont f45 blue",class:{"icon-wenzix":4===t.detail.type,"icon-wenshix":5===t.detail.type}}),t._v(" "),e("p",{staticClass:"icon--tip cfff f20"},[t._v(t._s(t.$t("lesson.navword")))])]):4!==t.detail.type&&5!==t.detail.type||t.visibleMedia?t._e():e("section",{staticClass:"nav__item box-center J_order",class:{active:6===t.focusOrder},on:{click:function(e){return t.handleVisibleMedia(!0)}}},[e("i",{staticClass:"iconfont f45 blue",class:{"icon-tux":4===t.detail.type,"icon-shipinwenzix":5===t.detail.type}}),t._v(" "),e("p",{staticClass:"icon--tip cfff f20"},[t._v(t._s(4===t.detail.type?t.$t("lesson.navpic"):t.$t("lesson.navvideo")))])]),t._v(" "),e("section",{staticClass:"nav__item box-center J_order",class:{active:7===t.focusOrder,disabled:t.hasPost},on:{click:t.handleBeforeSend}},[e("i",{staticClass:"iconfont icon-fasongx f45 blue"}),t._v(" "),e("p",{staticClass:"icon--tip cfff f20"},[t._v(t._s(t.hasPost?t.$t("lesson.navsent"):t.$t("lesson.navsend")))])])]):t._e()]),t._v(" "),e("section",{directives:[{name:"show",rawName:"v-show",value:t.sendconfirm,expression:"sendconfirm"}],staticClass:"sendconfirm__wrap"},[e("h3",{staticClass:"f48 cfff"},[t._v(t._s(t.$t("lesson.confirmsend")))]),t._v(" "),e("div",{staticClass:"btn__wrap"},[e("div",{staticClass:"btn mr20 J_send_order",class:{active:1===t.btnOrder},on:{click:t.handleSendAll}},[e("span",{staticClass:"f28"},[t._v(t._s(t.$t("lesson.confirm")))])]),t._v(" "),e("div",{staticClass:"btn J_send_order",class:{active:2===t.btnOrder},on:{click:t.handleBeforeSend}},[e("span",{staticClass:"f28"},[t._v(t._s(t.$t("lesson.back")))])])])]),t._v(" "),t.visiblePresenter?e("presenter"):t._e()],1)},[],!1,null,"cffdb15e",null).exports}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.