1 line
6.3 KiB
JavaScript
Raw Normal View History

2025-04-01 09:03:51 +08:00
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"643f":function(t,e,n){"use strict";var o=n("87b1"),i=n.n(o);i.a},"7d07":function(t,e,n){"use strict";n.r(e);var o=n("ad6b"),i=n("c353");for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("643f");var u=n("828b"),c=Object(u["a"])(i["default"],o["b"],o["c"],!1,null,"0343ac32",null,!1,o["a"],void 0);e["default"]=c.exports},"87b1":function(t,e,n){},ad4b:function(t,e,n){"use strict";(function(t){var o=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=o(n("af34")),a={components:{MySwiper:function(){n.e("components/fuyu-MixSwiper/fuyu-MixSwiper").then(function(){return resolve(n("e9f8"))}.bind(null,n)).catch(n.oe)}},data:function(){return{topImg:{},swiperList:[],teacherList:[],wqList:[],hotList:[],unread_number:"",count:5,current:0,autoplay:!0,scrollTop:0,dotsShow:!0,videoList:[],currentItemType:"",videoAutoplay:!1,show:!0,backgroundImage:"https://testy.hschool.com.cn/uploads/20250219/4554df3bea7bd9cdbd75462ceedb8ea7.png",groupImage:"https://testy.hschool.com.cn/uploads/20250219/5b09b1878ab6d7774540f0d1a8c6675a.png"}},onLoad:function(){t.hideTabBar()},mounted:function(){this.videoContext=t.createVideoContext("myVideo")},onShow:function(){this.getinit(),this.getHotList(),this.getTeacherList(),this.getWqList()},beforeDestroy:function(){this.autoplay=!1},methods:{capsuleHeight:function(){var e;return null!==(e=t)&&void 0!==e&&e.getMenuButtonBoundingClientRect()?"".concat(2*t.getMenuButtonBoundingClientRect().height+2*t.getMenuButtonBoundingClientRect().top+26,"rpx"):"180rpx"},click:function(e){t.navigateTo({url:e})},handleChange:function(e){var n=e.detail.current,o=[].concat((0,i.default)(this.swiperList),(0,i.default)(this.videoList))[n];if(this.currentItemType=o.showtype,"video"===this.currentItemType){this.videoList.forEach((function(e,o){if(o!==n){var i=t.createVideoContext("myVideo".concat(o));i.pause()}})),this.videoAutoplay=!0,this.autoplay=!1,this.dotsShow=!1;var a=t.createVideoContext("myVideo".concat(n));a.play()}else this.videoList.forEach((function(e,n){var o=t.createVideoContext("myVideo".concat(n));o.pause()})),this.videoAutoplay=!1,this.autoplay=!0,this.dotsShow=!0},getinit:function(){var e=this;t.$u.http.get("/api/index/init",{}).then((function(n){1==n.code?(e.topImg=n.data.home_data.top_image,e.swiperList=n.data.home_data.top_images.list):t.showToast({title:n.msg,icon:"none",duration:2e3})})).catch((function(e){t.showToast({title:"请求失败,请稍后再试",icon:"none",duration:2e3})}))},toApply:function(){var e=t.getStorageSync("token");e?t.navigateTo({url:"/pages/index/Apply"}):t.showToast({title:"请登录",icon:"none",duration:2e3,complete:function(){setTimeout((function(){t.switchTab({url:"/pages/my/index"})}),2e3)}})},toAbout:function(){t.navigateTo({url:"/packageA/index/About"})},toGroup:function(e){t.navigateTo({url:e})},toCenter:function(){t.reLaunch({url:"/pages/center/index"})},toWq:function(){t.navigateTo({url:"/pages/index/previousList"})},getWqList:function(){var e=this;t.$u.http.get("/api/school/classes/classes_list",{params:{page:1,limit:6,order:"normal",is_expire:1}}).then((function(n){1==n.code?e.wqList=n.data.list:t.showToast({title:n.msg,icon:"none",duration:2e3})})).catch((function(e){t.showToast({title:"请求失败,请稍后再试",icon:"none",duration:2e3})}))},getTeacherList:function(){var e=this;t.$u.http.get("/api/school/teacher/teacher_list",{params:{page:1,limit:10,recommend:1}}).then((function(n){1==n.code?e.teacherList=n.data.list:t.showToast({title:n.msg,icon:"none",duration:2e3})})).catch((function(e){t.showToast({title:"请求失败,请稍后再试",icon:"none",duration:2e3})}))},toTeacher:function(e){t.navigateTo({url:"/pages/center/teacherDetail?id=".concat(e)})},getPeople:function(e){return t.$u.http.get("/api/school/classes/people",{params:{id:e,have_real:1}}).then((function(e){if(1==e.code)return e.data.unpaid_user_data;throw t.showToast({title:e.msg,icon:"none",duration:2e3}),new Error(e.msg)})).catch((function(