3 lines
15 KiB
JavaScript
3 lines
15 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5dc392e4"],{"0088":function(t,e,r){var n=r("24fb");e=n(!1),e.push([t.i,'.page[data-v-38ce4224]{background:url(https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/videoAnswerBg@3x.png);background-size:cover;min-height:100vh}.title[data-v-38ce4224]{height:2.938rem;width:375px;-webkit-box-sizing:border-box;box-sizing:border-box;background:#fff}.title .con[data-v-38ce4224]{width:100%;position:relative}.title .con[data-v-38ce4224],.title .con .left[data-v-38ce4224]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.title .con .left[data-v-38ce4224]{position:absolute;left:0;top:0;width:3rem;height:100%;padding-left:1.313rem;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.title .con .left .icon-member-left[data-v-38ce4224],.title .con .right[data-v-38ce4224]{color:#000;font-weight:700}.title .con .right[data-v-38ce4224]{-webkit-box-flex:0;-webkit-flex:0 0 calc(100% - 6rem);-ms-flex:0 0 calc(100% - 6rem);flex:0 0 calc(100% - 6rem);width:calc(100% - 6rem);margin:0 auto;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;font-size:1.125rem;letter-spacing:.056rem;pointer-events:none;text-overflow:ellipsis;white-space:normal;overflow:hidden}.header[data-v-38ce4224]{margin:0 auto;padding-top:1.8rem;font-size:2.2rem;color:#e9e8e8}.answerContainer[data-v-38ce4224]{margin:0 auto;margin-top:2.8rem;width:19.969rem;height:20.625rem;border-radius:5%;background-color:#fff;padding:1.8rem 2.2rem 0;position:relative}.answerContainer[data-v-38ce4224]:before{left:-.5rem}.answerContainer[data-v-38ce4224]:after,.answerContainer[data-v-38ce4224]:before{content:"";display:block;width:1rem;height:1rem;border-radius:50%;position:absolute;top:2rem;background:#cf243b}.answerContainer[data-v-38ce4224]:after{right:-.5rem}.answerContainer .answerTitle[data-v-38ce4224]{color:#333;font-size:.938rem}.answerContainer .answerList[data-v-38ce4224]{padding-top:1.53rem;height:16rem;overflow:scroll}.answerContainer .answerList .answerItem[data-v-38ce4224]{width:100%;height:2.656rem;background-color:#f1f1f1;border-radius:1.328rem;color:#333;font-size:.875rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin-bottom:1.06rem}.answerContainer .answerList .answerItem[data-v-38ce4224]:active{background:#cf243b;color:#fff}.successAlert[data-v-38ce4224]{width:19.563rem;height:17.631rem;background:url(https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/videoAnswerAlert@3x.png);background-size:contain;background-repeat:no-repeat}.successAlert .c1[data-v-38ce4224]{color:#f06161;font-size:1rem;padding-top:1.3rem}.successAlert .c2[data-v-38ce4224]{color:#333;font-size:1rem;margin-top:1.8rem}.successAlert .c3[data-v-38ce4224]{color:#f06161;font-size:2.25rem;margin-top:1.575rem}.successAlert .btn[data-v-38ce4224]{width:10.375rem;height:2.35rem;margin:0 auto;margin-top:4rem}.successAlert .btn img[data-v-38ce4224]{width:100%;height:auto}.errorAlert[data-v-38ce4224]{width:15.938rem;height:15.938rem;background-color:#fff;border-radius:.125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;padding-top:2rem}.errorAlert .sigh[data-v-38ce4224]{width:5.8rem;padding-left:.8rem;height:4.719rem}.errorAlert .sigh img[data-v-38ce4224]{width:100%;height:100%}.errorAlert .c1[data-v-38ce4224]{margin-top:.8rem;font-size:1rem;color:#999}.errorAlert .c2[data-v-38ce4224]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;color:#333;font-size:.875rem}.errorAlert .btn[data-v-38ce4224],.errorAlert .c2[data-v-38ce4224]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin-top:1rem}.errorAlert .btn[data-v-38ce4224]{font-size:.938rem;color:#fff;width:11.188rem;height:1.906rem;background-color:#f35056;border-radius:.188rem;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}',""]),t.exports=e},"1da1":function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("d3b7");function n(t,e,r,n,i,o,a){try{var c=t[o](a),s=c.value}catch(l){return void r(l)}c.done?e(s):Promise.resolve(s).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function c(t){n(a,i,o,c,s,"next",t)}function s(t){n(a,i,o,c,s,"throw",t)}c(void 0)}))}}},34374:function(t,e,r){"use strict";r("bf23")},bf23:function(t,e,r){var n=r("0088");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=r("499e").default;i("0af85d00",n,!0,{sourceMap:!1,shadowMode:!1})},c7eb:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("d9e2"),r("3410"),r("159b"),r("b0c0"),r("131a"),r("fb6a");var n=r("53ca");function i(){
|
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(E){l=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),a=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return A()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var c=k(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=d(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(E){return{type:"throw",arg:E}}}t.wrap=u;var f={};function h(){}function p(){}function m(){}var g={};l(g,a,(function(){return this}));var v=Object.getPrototypeOf,b=v&&v(v(C([])));b&&b!==e&&r.call(b,a)&&(g=b);var w=m.prototype=h.prototype=Object.create(g);function y(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(o,a,c,s){var l=d(t[o],t,a);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==Object(n["a"])(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,c,s)}),(function(t){i("throw",t,c,s)})):e.resolve(f).then((function(t){u.value=t,c(u)}),(function(t){return i("throw",t,c,s)}))}s(l.arg)}var o;this._invoke=function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}}function k(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=d(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function C(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return p.prototype=m,l(w,"constructor",m),l(m,"constructor",p),p.displayName=l(m,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,s,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},y(x.prototype),l(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new x(u(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},y(w),l(w,s,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=C,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;j(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}},d2e7a:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"page"},[r("div",{staticClass:"title"},[r("div",{staticClass:"con",staticStyle:{height:"2.938rem"}},[r("div",{staticClass:"left",on:{click:t.goto}},[r("i",{staticClass:"iconfont icon-member-left back"})]),r("div",{staticClass:"right"},[t._v("答题")])])]),r("div",{staticClass:"header"},[t._v("答题赢"+t._s(t.integral_name))]),null!=t.subject?r("div",{staticClass:"answerContainer"},[r("div",{staticClass:"answerTitle"},[t._v(t._s(t.subject.title))]),r("div",{staticClass:"answerList"},t._l(t.answerfilter,(function(e){return r("div",{key:e.id,staticClass:"answerItem",on:{click:function(r){return t.reward(e.id)}}},[t._v(t._s(e.content))])})),0)]):t._e(),r("van-popup",{staticStyle:{background:"transparent"},attrs:{"close-on-click-overlay":!1},model:{value:t.successShow,callback:function(e){t.successShow=e},expression:"successShow"}},[r("div",{staticClass:"successAlert"},[r("div",{staticClass:"c1"},[t._v("答题成功")]),r("div",{staticClass:"c2"},[t._v("恭喜你获得"+t._s(t.integral_name))]),r("div",{staticClass:"c3"},[t._v(t._s(t.integral))]),r("div",{staticClass:"btn",on:{click:t.goto}},[r("img",{attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/videoAnswerSuccess@3x.png",alt:""}})])])]),r("van-popup",{staticStyle:{background:"transparent"},attrs:{"close-on-click-overlay":!1},model:{value:t.errorShow,callback:function(e){t.errorShow=e},expression:"errorShow"}},[r("div",{staticClass:"errorAlert"},[r("div",{staticClass:"sigh"},[r("img",{attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/videoAnswerTan@3x.png",alt:""}})]),r("div",{staticClass:"c1"},[t._v("答题失败")]),r("div",{staticClass:"c2"},[r("span",[t._v("很遗憾,答错了。请重新")]),r("span",[t._v("观看,再接再厉!")])]),r("div",{staticClass:"btn",on:{click:t.goto}},[t._v("我知道了")])])])],1)},i=[],o=(r("e7e5"),r("d399")),a=r("c7eb"),c=r("1da1"),s=(r("4de4"),r("d3b7"),{data:function(){return{successShow:!1,errorShow:!1,subject:null,integral:0,integral_name:"积分"}},created:function(){return Object(c["a"])(Object(a["a"])().mark((function t(){return Object(a["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})))()},mounted:function(){this.getSubject()},computed:{answerfilter:function(){return this.subject.has_many_answer.filter((function(t){return""!=t.content}))}},methods:{getSubject:function(){var t=this;$http.get("plugin.answer-reward.api.index.get-subject",{vid:this.$route.query.vid},"load").then((function(e){1==e.result&&(1!=e.data.status?Object(o["a"])("本视频你已获得积分奖励"):null!=e.data.subject&&(t.integral_name=e.data.integral_name,t.subject=e.data.subject))}))},reward:function(t){var e=this;$http.get("plugin.answer-reward.api.index.index",{vid:this.$route.query.vid,subject_id:this.subject.id,answer_id:t},"load").then((function(t){1!=t.result?e.errorShow=!0:0==t.data.status?Object(o["a"])(t.msg):1==t.data.status&&(e.integral=t.data.integral,e.successShow=!0)}))},goto:function(){window.history.length<=1?this.$router.push(this.fun.getUrl("home",{})):this.$router.go(-1)}}}),l=s,u=l,d=(r("34374"),r("2877")),f=Object(d["a"])(u,n,i,!1,null,"38ce4224",null);e["default"]=f.exports}}]); |