1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/class/detail"],{"20ba":function(t,e,n){"use strict";(function(t){n("6cdc");o(n("66fd"));var e=o(n("254e"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},"254e":function(t,e,n){"use strict";n.r(e);var o=n("a3f0"),i=n("f258");for(var s in i)"default"!==s&&function(t){n.d(e,t,(function(){return i[t]}))}(s);n("b2d2");var a,r=n("f0c5"),c=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,"485325e0",null,!1,o["a"],a);e["default"]=c.exports},a3f0:function(t,e,n){"use strict";var o,i=function(){var t=this,e=t.$createElement,n=(t._self._c,0===t.currentIndex&&t.detail.prop&&t.detail.prop.length>0&&"1"===t.needTool?t.__map(t.detail.prop,(function(e,n){var o=t.__get_orig(e),i=t.goods.props.includes(e.id);return{$orig:o,g0:i}})):null),o=t.goods.choose.length>0?t.goods.choose.join(","):null,i=t.carts.includes(t.attend_id);t.$mp.data=Object.assign({},{$root:{l0:n,g1:o,g2:i}})},s=[];n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return o}))},b2d2:function(t,e,n){"use strict";var o=n("b944"),i=n.n(o);i.a},b944:function(t,e,n){},f258:function(t,e,n){"use strict";n.r(e);var o=n("fee4"),i=n.n(o);for(var s in o)"default"!==s&&function(t){n.d(e,t,(function(){return o[t]}))}(s);e["default"]=i.a},fee4:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("cabd"),i=a(n("da92")),s=n("2f62");function a(t){return t&&t.__esModule?t:{default:t}}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l=function(){n.e("components/swiper-tab").then(function(){return resolve(n("d0ba"))}.bind(null,n)).catch(n.oe)},u=function(){n.e("components/shop-cart").then(function(){return resolve(n("fcb5"))}.bind(null,n)).catch(n.oe)},f={components:{swiperTab:l,shopCart:u},data:function(){return{topHeader:this.globalCustomBarHeight,swiper:{indicatorDots:!0,autoplay:!0,interval:2e3,duration:500},defaultTeacher:"/static/imgs/class/logo0.png",attend_id:0,cate_type:0,currentIndex:0,money:0,comments:[],detail:{},needTool:"1",radios:[{value:"1",name:"需要道具",checked:!0},{value:"2",name:"不需要道具",checked:!1}],goods:{props:[],choose:[],sum_money:0},tabList:[{title:"课程详细",list:["课程介绍","课程评价","课程视频","课程大纲"],enable:"报课",disable:"报课",options:[{title:"周期",content:":正在加载,请稍后",des:":正在加载,请稍后"},{title:"适用年级",content:":正在加载,请稍后",des:""},{title:"课时",content:":正在加载,请稍后",des:""},{title:"单课时价",content:":正在加载,请稍后",des:""},{title:"补贴",content:":正在加载,请稍后",des:""},{title:"培养目标",content:":正在加载,请稍后",des:""}]},{title:"餐饮详细",list:["餐饮介绍","餐饮评价","餐饮视频","每日菜谱"],enable:"报餐",disable:"报餐",options:[{title:"周期",content:":正在加载,请稍后",des:":正在加载,请稍后"},{title:"适用年级",content:":正在加载,请稍后",des:""},{title:"用餐次数",content:":正在加载,请稍后",des:""},{title:"单次价格",content:":正在加载,请稍后",des:""},{title:"补贴",content:":正在加载,请稍后",des:""},{title:"用餐介绍",content:":正在加载,请稍后",des:""}]},{title:"活动详细",list:["活动介绍","活动评价","活动视频","活动大纲"],enable:"报名",disable:"报名",options:[{title:"周期",content:":正在加载,请稍后",des:":正在加载,请稍后"},{title:"适用年级",content:":正在加载,请稍后",des:""},{title:"活动次数",content:":正在加载,请稍后",des:""},{title:"单次价格",content:":正在加载,请稍后",des:""},{title:"补贴",content:":正在加载,请稍后",des:""},{title:"活动目标",content:":正在加载,请稍后",des:""}]}]}},computed:c({},(0,s.mapGetters)(["carts"])),onLoad:function(e){this.attend_id=Number(decodeURIComponent(e.attend_id)),0===this.attend_id&&t.navigateBack(),this.get_detail(),this.get_comments()},methods:{get_detail:function(){var t=this;(0,o._detail)({class_attend_id:this.attend_id}).then((function(e){t.detail=e.data,t.money=e.data.sum_money;var n=e.data.prop;n&&n.length>0?t.setDefaultGoods(n):t.goods.sum_money=t.money}))},addCart:function(){var e=this;if(this.carts.includes(this.attend_id))return t.showToast({title:"课程已存在,请勿重复添加!",icon:"none"}),setTimeout((function(){e.globalNavigateTo("classCart")}),1e3),!1;if(!this.detail.enable)return t.showToast({title:"课程已停止!",icon:"none"}),!1;var n=this.goods.props.join(",");(0,o._joinShop)({class_attend_id:this.attend_id,prop:n}).then((function(t){e.globalNavigateTo("classCart")}))},setDefaultGoods:function(t){this.goods.props[0]=t[0].id,this.goods.sum_money=i.default.plus(this.money,t[0].money),this.goods.choose[0]=t[0].name},get_comments:function(){var t=this;(0,o._comments)({class_attend_id:this.attend_id}).then((function(e){t.comemnts=e.data}))},changeTab:function(t){this.currentIndex=t},radioChange:function(t){var e=t.detail.value;this.needTool=e,"1"===e?this.setDefaultGoods(this.detail.prop):(this.goods.sum_money=this.money,this.goods.props=[],this.goods.choose=[])},checkboxChange:function(t){var e=this,n=t.detail.value,o=[],s=[],a=0;n.forEach((function(t){var n=e.detail.prop.find((function(e){return e.id===Number(t)}));o.push(n.name),s.push(Number(t)),a=i.default.plus(a,Number(n.money))}));var r=i.default.plus(this.money,a);this.goods={props:s,choose:o,sum_money:r}}}};e.default=f}).call(this,n("543d")["default"])}},[["20ba","common/runtime","common/vendor"]]]);
|