"use strict";(self.webpackChunk_client_app_store=self.webpackChunk_client_app_store||[]).push([[7577],{40597:function(t,e,n){n.r(e),n.d(e,{default:function(){return m}});var r=function(){var t=this._self._c;return t("div",{staticClass:"score"},[t("div",{staticClass:"header"},[this._v(n(11974).nI().t("用户评价"))]),this._v(" "),t("ScoreBox",{attrs:{score:this.score}}),this._v(" "),t("ul",{staticClass:"list"},[this._l(this.commentList,function(e,n){return t("CommentItem",{key:n,attrs:{comment:e,"show-icon":!0}})}),this._v(" "),this.hasMore?t("div",{staticClass:"more"},[this._v("\n      "+n(11974).nI().t("加载中...")+"\n    ")]):this._e()],2)],1)};r._withStripped=!0;var i=n(44817),o=n(2552),s=n(96360);function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(t,e,n,r,i,o,s){try{var c=t[o](s),a=c.value}catch(u){n(u);return}c.done?e(a):Promise.resolve(a).then(r,i)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function s(t){a(o,r,i,s,c,"next",t)}function c(t){a(o,r,i,s,c,"throw",t)}s(void 0)})}}function l(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(t,e)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var h=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(c){o=[6,c],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}},f={components:{ScoreBox:s.Z,CommentItem:o.Z},asyncData:function(t){var e=t.query,n=t.$request;return u(function(){var t;return h(this,function(r){switch(r.label){case 0:return t=e.case_id,[4,n(i.eq,{case_id:t})];case 1:return[2,{settings:r.sent(),case_id:t}]}})})()},data:function(){return{settings:{},case_id:"",commentList:[],clientHeight:0}},computed:{score:function(){return{total:this.settings.total,avg_score:this.settings.avg_score}},hasMore:function(){return this.commentList.length<this.settings.total}},mounted:function(){var t,e=this;(t=this.commentList).push.apply(t,l(this.settings.usercmt_list.usercmt)),this.clientHeight=document.documentElement.clientHeight,this.scrollHeight=document.documentElement.scrollHeight,window.addEventListener("scroll",function(){e.hasMore&&e.scrollHeight-window.scrollY-e.clientHeight&&e.getCaseScore()}),window.addEventListener("resize",function(){e.clientHeight=document.documentElement.clientHeight})},methods:{getCaseScore:function(){return u(function(){var t,e,n;return h(this,function(r){switch(r.label){case 0:if(t=this,this.loading)return[2];return this.loading=!0,[4,this.$request(i.eq,{case_id:this.case_id,offset:this.commentList.length})];case 1:return n=r.sent(),(e=this.commentList).push.apply(e,l(n.usercmt_list.usercmt)),setTimeout(function(){t.clientHeight=document.documentElement.clientHeight,t.loading=!1},100),[2]}})}).apply(this)}}},m=(0,n(6080).Z)(f,r,[],!1,null,"7f4966aa",null).exports},44817:function(t,e,n){n.d(e,{SQ:function(){return s},X_:function(){return a},eq:function(){return c}});var r=n(66519),i="appStore/industryCase",o={name:"wwopen",host:"open.work.weixin.qq.com",prefix:"/wwopen/monoApi"},s=(0,r.LC)(i,o,"getCaseDetail"),c=(0,r.LC)(i,o,"getCaseScore"),a=(0,r.LC)(i,o,"getPermanentRegCode")}}]);