qingnianyexiao2.0/unpackage/dist/build/web/static/js/packageA-my-timetable.edb11eaa.js
2025-04-01 09:03:51 +08:00

1 line
18 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["packageA-my-timetable"],{"0713":function(t,e,a){"use strict";a.r(e);var n=a("7198"),i=a.n(n);for(var r in n)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=i.a},"20ea":function(t,e,a){var n=a("4e4f");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=a("967d").default;i("1a6e9819",n,!0,{sourceMap:!1,shadowMode:!1})},"4e4f":function(t,e,a){var n=a("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 筛选组件 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.ellipsis-two-lines[data-v-6ea9301b]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;\r\n /* 设置行数 */overflow:hidden;text-overflow:ellipsis;word-break:break-all\r\n /* 防止单词被截断 */}',""]),t.exports=e},"53db":function(t,e,a){"use strict";a.r(e);var n=a("7df0"),i=a("d3f1");for(var r in i)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(r);a("549c");var o=a("828b"),s=Object(o["a"])(i["default"],n["b"],n["c"],!1,null,"a2c7c97e",null,!1,n["a"],void 0);e["default"]=s.exports},"549c":function(t,e,a){"use strict";var n=a("d77c"),i=a.n(n);i.a},"6e1d":function(t,e,a){"use strict";a("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("64aa"),a("c223"),a("f7a5"),a("aa9c"),a("5c47"),a("a1c1"),a("bf0f"),a("2797");var n={name:"ren-calendar",props:{weekstart:{type:Number,default:0},markDays:{type:Array,default:function(){return[]}},headerBar:{type:Boolean,default:!0},open:{type:Boolean,default:!0},collapsible:{type:Boolean,default:!0},disabledAfter:{type:Boolean,default:!1}},data:function(){return{weektext:["日","一","二","三","四","五","六"],y:(new Date).getFullYear(),m:(new Date).getMonth()+1,dates:[],positionTop:0,monthOpen:!0,choose:""}},created:function(){this.dates=this.monthDay(this.y,this.m),!this.open&&this.toggle()},mounted:function(){this.choose=this.getToday().date},computed:{weekDay:function(){return this.weektext.slice(this.weekstart).concat(this.weektext.slice(0,this.weekstart))},height:function(){return this.dates.length/7*80+"rpx"}},methods:{formatNum:function(t){var e=Number(t);return e<10?"0"+e:e},getToday:function(){var t=new Date,e=t.getFullYear(),a=t.getMonth(),n=t.getDate(),i=(new Date).getDay(),r="星期"+["日","一","二","三","四","五","六"][i],o={date:e+"-"+this.formatNum(a+1)+"-"+this.formatNum(n),week:r};return o},monthDay:function(t,e){for(var a=[],n=Number(e),i=new Date(t,n-1,1).getDay(),r=new Date(t,n,0).getDate(),o=new Date(t,n-2,0).getDate(),s=7==this.weekstart?0:this.weekstart,c=function(){return i==s?0:i>s?i-s:7-s+i}(),l=7-(c+r)%7,d=1;d<=c;d++)a.push({date:this.formatNum(o-c+d),day:s+d-1||7,month:n-1>=0?this.formatNum(n-1):12,year:n-1>=0?t:t-1});for(var u=1;u<=r;u++)a.push({date:this.formatNum(u),day:u%7+i-1||7,month:this.formatNum(n),year:t,isCurM:!0});for(var p=1;p<=l;p++)a.push({date:this.formatNum(p),day:(r+c+s+p-1)%7||7,month:n+1<=11?this.formatNum(n+1):0,year:n+1<=11?t:t+1});return a},isWorkDay:function(t,e,a){var n="".concat(t,"/").concat(e,"/").concat(a),i=new Date(n.replace(/-/g,"/")),r=i.getDay();return 0!=r&&6!=r},isFutureDay:function(t,e,a){var n="".concat(t,"/").concat(e,"/").concat(a),i=new Date(n.replace(/-/g,"/")),r=i.getTime(),o=(new Date).getTime();return r>o},isMarkDay:function(t,e,a){for(var n=!1,i=0;i<this.markDays.length;i++){var r="".concat(t,"-").concat(e,"-").concat(a);if(this.markDays[i]==r){n=!0;break}}return n},isToday:function(t,e,a){var n=t+"-"+e+"-"+a,i=this.getToday().date;return n==i},toggle:function(){var t=this;if(this.monthOpen=!this.monthOpen,this.monthOpen)this.positionTop=0;else{var e=-1;this.dates.forEach((function(a,n){t.isToday(a.year,a.month,a.date)&&(e=n)})),this.positionTop=80*-((Math.ceil((e+1)/7)||1)-1)}},selectOne:function(t,e){var a="".concat(t.year,"-").concat(t.month,"-").concat(t.date),n=new Date(a).getTime(),i=(new Date).getTime(),r=new Date(a).getDay(),o="星期"+["日","一","二","三","四","五","六"][r],s={date:a,week:o};if(!t.isCurM)return!1;if(n>i){if(this.disabledAfter)return console.log("未来日期不可选"),!1;this.choose=a,this.$emit("onDayClick",s)}else this.choose=a,this.$emit("onDayClick",s);console.log(s)},changYearMonth:function(t,e){this.dates=this.monthDay(t,e),this.y=t,this.m=e},changeMonth:function(t){"pre"==t?this.m+1==2?(this.m=12,this.y=this.y-1):this.m=this.m-1:this.m+1==13?(this.m=1,this.y=this.y+1):this.m=this.m+1,this.dates=this.monthDay(this.y,this.m)}}};e.default=n},7198:function(t,e,a){"use strict";a("6a54");var n=a("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(a("9b1b"));a("aa9c"),a("795c"),a("c223"),a("8f71"),a("bf0f"),a("fd3c"),a("2797"),a("f7a5");var r=n(a("53db")),o={components:{RenCalendar:r.default},data:function(){return{curDate:"",markDays:["2025-01-05"],morning:[],afternoon:[],night:[]}},onReady:function(){var t=this.$refs.ren.getToday().date;this.curDate=t,console.log("today",t),this.markDays.push(t),this.getTime(),this.getList(this.curDate)},methods:{onDayClick:function(t){this.curDate=t.date,this.getList(this.curDate)},getFormattedDates:function(t){var e=t?new Date(t):new Date,a=new Date(e);a.setHours(0,0,0,0);var n=new Date(e);n.setHours(23,59,59,999);var i=function(t){var e=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),r=String(t.getMinutes()).padStart(2,"0"),o=String(t.getSeconds()).padStart(2,"0");return"".concat(e,"/").concat(a,"/").concat(n," ").concat(i,":").concat(r,":").concat(o)};return{today:"".concat(i(a),"---").concat(i(n))}},openUrl:function(t){uni.navigateTo({url:t})},getTime:function(){var t=this;uni.$u.http.get("/api/school.hour_order/get_month_by_time",{params:{time:this.curDate,status:"-1,0"}}).then((function(e){if(1==e.code){var a=e.data.filter((function(t){return 0!==t.number})),n=a.map((function(t){return t.markDay="".concat(t.year,"-").concat(t.month,"-").concat(t.day),t}));t.markDays=n.map((function(t){return t.markDay})),console.log(t.markDays)}else uni.showToast({title:e.msg,icon:"none",duration:2e3})})).catch((function(t){uni.showToast({title:"请求失败,请稍后再试",icon:"none",duration:2e3})}))},getList:function(t){var e=this,a=this.getFormattedDates(t).today;console.log(a),uni.$u.http.get("/api/school/hour_order/order_list",{params:{time:a,status:"-1,0"}}).then((function(t){if(1==t.code){var a=[],n=[],r=[];t.data.list.forEach((function(t){var e=t.start_time_text,o=t.end_time_text,s=e.split(" ")[1].split(":").slice(0,2).join(":"),c=o.split(" ")[1].split(":").slice(0,2).join(":"),l=(0,i.default)((0,i.default)({},t),{},{startTime:s,endTime:c}),d=new Date(1e3*t.start_time),u=d.getHours();u<12?a.push(l):u>=12&&u<18?n.push(l):r.push(l)})),e.morning=a,e.afternoon=n,e.night=r,console.log("Morning:",a),console.log("Afternoon:",n),console.log("Night:",r)}else uni.showToast({title:t.msg,icon:"none",duration:2e3})})).catch((function(t){uni.showToast({title:"请求失败,请稍后再试",icon:"none",duration:2e3})}))}}};e.default=o},"7df0":function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"calendar-wrapper"},[t.headerBar?a("v-uni-view",{staticClass:"header"},[a("v-uni-view",{staticClass:"pre",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.changeMonth("pre")}}},[t._v("上个月")]),a("v-uni-view",[t._v(t._s(t.y+"年"+t.formatNum(t.m)+"月"))]),a("v-uni-view",{staticClass:"next",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.changeMonth("next")}}},[t._v("下个月")])],1):t._e(),a("v-uni-view",{staticClass:"week"},t._l(t.weekDay,(function(e,n){return a("v-uni-view",{key:n,staticClass:"week-day"},[t._v(t._s(e))])})),1),a("v-uni-view",{staticClass:"content",class:{hide:!t.monthOpen},style:{height:t.height}},[a("v-uni-view",{staticClass:"days",style:{top:t.positionTop+"rpx"}},t._l(t.dates,(function(e,n){return a("v-uni-view",{key:n,staticClass:"item"},[a("v-uni-view",{staticClass:"day",class:{choose:t.choose==e.year+"-"+e.month+"-"+e.date&&e.isCurM,nolm:!e.isCurM,today:t.isToday(e.year,e.month,e.date),isWorkDay:t.isWorkDay(e.year,e.month,e.date)},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.selectOne(e,a)}}},[t._v(t._s(Number(e.date)))]),t.isMarkDay(e.year,e.month,e.date)&&e.isCurM?a("v-uni-view",{staticClass:"markDay"}):t._e()],1)})),1)],1),t.collapsible?a("v-uni-image",{staticClass:"weektoggle",class:{down:t.monthOpen},attrs:{src:"https://i.loli.net/2020/07/16/2MmZsucVTlRjSwK.png",mode:"scaleToFill"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.toggle.apply(void 0,arguments)}}}):t._e()],1)},i=[]},"861f":function(t,e,a){"use strict";var n=a("20ea"),i=a.n(n);i.a},af86:function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticStyle:{height:"100vh",background:"#F1F2F8",padding:"30rpx"}},[a("v-uni-view",{staticStyle:{"background-color":"#ffffff","border-radius":"20rpx",padding:"0rpx 30rpx"}},[a("ren-calendar",{ref:"ren",attrs:{markDays:t.markDays,headerBar:!0},on:{onDayClick:function(e){arguments[0]=e=t.$handleEvent(e),t.onDayClick.apply(void 0,arguments)}}})],1),0!=t.morning.length?a("v-uni-view",{staticStyle:{"background-color":"#ffffff","border-radius":"20rpx",padding:"30rpx","margin-top":"20rpx"}},[a("v-uni-view",{staticStyle:{"font-size":"28rpx",color:"#C2C2C2","text-align":"center",margin:"20rpx"}},[t._v("上午")]),t._l(t.morning,(function(e,n){return a("v-uni-view",{key:n,staticStyle:{display:"flex","align-self":"center","align-items":"center","margin-top":"32rpx"},on:{click:function(a){a.stopPropagation(),arguments[0]=a=t.$handleEvent(a),t.openUrl("/pages/center/applyDetail?id="+e.id)}}},[a("v-uni-view",{staticStyle:{width:"45%"}},[a("v-uni-image",{staticStyle:{width:"280rpx",height:"200rpx","border-radius":"12rpx"},attrs:{src:e.detail.headimage,mode:"aspectFill"}})],1),a("v-uni-view",{staticStyle:{"padding-left":"20rpx",height:"200rpx"}},[a("v-uni-view",{staticClass:"ellipsis-two-lines",staticStyle:{"font-size":"36rpx","font-weight":"600","margin-bottom":"24rpx"}},[t._v(t._s(e.detail.title))]),a("v-uni-view",{staticStyle:{"font-size":"26rpx",color:"#7A7A7A","margin-top":"20rpx"}},[t._v("上课时间:"+t._s(e.startTime)+"-"+t._s(e.endTime))]),a("v-uni-view",{staticClass:"ellipsis-two-lines",staticStyle:{"font-size":"26rpx",color:"#7A7A7A","margin-top":"12rpx"}},[t._v(t._s(e.detail.address_detail)+"号")])],1)],1)}))],2):t._e(),0!=t.afternoon.length?a("v-uni-view",{staticStyle:{"background-color":"#ffffff","border-radius":"20rpx",padding:"30rpx","margin-top":"20rpx"}},[a("v-uni-view",{staticStyle:{"font-size":"28rpx",color:"#C2C2C2","text-align":"center",margin:"20rpx"}},[t._v("下午")]),t._l(t.afternoon,(function(e,n){return a("v-uni-view",{key:n,staticStyle:{display:"flex","align-self":"center","align-items":"center","margin-top":"32rpx"}},[a("v-uni-view",{staticStyle:{width:"45%"}},[a("v-uni-image",{staticStyle:{width:"280rpx",height:"200rpx","border-radius":"12rpx"},attrs:{src:e.detail.headimage,mode:"aspectFill"}})],1),a("v-uni-view",{staticStyle:{"padding-left":"20rpx",height:"200rpx"}},[a("v-uni-view",{staticClass:"ellipsis-two-lines",staticStyle:{"font-size":"36rpx","font-weight":"600","margin-bottom":"24rpx"}},[t._v(t._s(e.detail.title))]),a("v-uni-view",{staticStyle:{"font-size":"26rpx",color:"#7A7A7A","margin-top":"20rpx"}},[t._v("上课时间:"+t._s(e.startTime)+"-"+t._s(e.endTime))]),a("v-uni-view",{staticClass:"ellipsis-two-lines",staticStyle:{"font-size":"26rpx",color:"#7A7A7A","margin-top":"12rpx"}},[t._v(t._s(e.detail.address_detail)+"号")])],1)],1)}))],2):t._e(),0!=t.night.length?a("v-uni-view",{staticStyle:{"background-color":"#ffffff","border-radius":"20rpx",padding:"30rpx","margin-top":"20rpx"}},[a("v-uni-view",{staticStyle:{"font-size":"28rpx",color:"#C2C2C2","text-align":"center",margin:"20rpx"}},[t._v("晚上")]),t._l(t.night,(function(e,n){return a("v-uni-view",{key:n,staticStyle:{display:"flex","align-self":"center","align-items":"center","margin-top":"32rpx"}},[a("v-uni-view",{staticStyle:{width:"45%"}},[a("v-uni-image",{staticStyle:{width:"280rpx",height:"200rpx","border-radius":"12rpx"},attrs:{src:e.detail.headimage,mode:"aspectFill"}})],1),a("v-uni-view",{staticStyle:{"padding-left":"20rpx",height:"200rpx"}},[a("v-uni-view",{staticClass:"ellipsis-two-lines",staticStyle:{"font-size":"36rpx","font-weight":"600","margin-bottom":"24rpx"}},[t._v(t._s(e.detail.title))]),a("v-uni-view",{staticStyle:{"font-size":"26rpx",color:"#7A7A7A","margin-top":"20rpx"}},[t._v("上课时间:"+t._s(e.startTime)+"-"+t._s(e.endTime))]),a("v-uni-view",{staticClass:"ellipsis-two-lines",staticStyle:{"font-size":"26rpx",color:"#7A7A7A","margin-top":"12rpx"}},[t._v(t._s(e.detail.address_detail)+"号")])],1)],1)}))],2):t._e()],1)},i=[]},bb41:function(t,e,a){var n=a("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 筛选组件 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.calendar-wrapper[data-v-a2c7c97e]{color:#bbb7b7;font-size:%?28?%;text-align:center;background-color:#fff;padding-bottom:%?10?%}.calendar-wrapper .header[data-v-a2c7c97e]{display:flex;align-items:center;justify-content:center;height:%?88?%;color:#42464a;font-size:%?32?%;font-weight:700;border-bottom:%?2?% solid #f2f2f2}.calendar-wrapper .header .pre[data-v-a2c7c97e], .calendar-wrapper .header .next[data-v-a2c7c97e]{color:#4d7df9;font-size:%?28?%;font-weight:400;padding:%?8?% %?15?%;border-radius:%?10?%;border:%?2?% solid #dcdfe6}.calendar-wrapper .header .pre[data-v-a2c7c97e]{margin-right:%?30?%}.calendar-wrapper .header .next[data-v-a2c7c97e]{margin-left:%?30?%}.calendar-wrapper .week[data-v-a2c7c97e]{display:flex;align-items:center;height:%?80?%;line-height:%?80?%;border-bottom:%?1?% solid hsla(0,0%,100%,.2)}.calendar-wrapper .week uni-view[data-v-a2c7c97e]{flex:1}.calendar-wrapper .content[data-v-a2c7c97e]{position:relative;overflow:hidden;transition:height .4s ease}.calendar-wrapper .content .days[data-v-a2c7c97e]{transition:top .3s;display:flex;align-items:center;flex-wrap:wrap;position:relative}.calendar-wrapper .content .days .item[data-v-a2c7c97e]{position:relative;display:block;height:%?80?%;line-height:%?80?%;width:calc(100% / 7)}.calendar-wrapper .content .days .item .day[data-v-a2c7c97e]{font-style:normal;display:inline-block;vertical-align:middle;width:%?60?%;height:%?60?%;line-height:%?60?%;overflow:hidden;border-radius:%?60?%}.calendar-wrapper .content .days .item .day.choose[data-v-a2c7c97e]{background-color:#4d7df9;color:#fff}.calendar-wrapper .content .days .item .day.nolm[data-v-a2c7c97e]{color:#fff;opacity:.3}.calendar-wrapper .content .days .item .isWorkDay[data-v-a2c7c97e]{color:#42464a}.calendar-wrapper .content .days .item .notSigned[data-v-a2c7c97e]{font-style:normal;width:%?8?%;height:%?8?%;background:#fa7268;border-radius:%?10?%;position:absolute;left:50%;bottom:0;pointer-events:none}.calendar-wrapper .content .days .item .today[data-v-a2c7c97e]{color:#fff;background-color:#a8c0ff}.calendar-wrapper .content .days .item .workDay[data-v-a2c7c97e]{font-style:normal;width:%?8?%;height:%?8?%;background:#4d7df9;border-radius:%?10?%;position:absolute;left:50%;bottom:0;pointer-events:none}.calendar-wrapper .content .days .item .markDay[data-v-a2c7c97e]{font-style:normal;width:%?8?%;height:%?8?%;background:#fc7a64;border-radius:%?10?%;position:absolute;left:46%;bottom:0;pointer-events:none}.calendar-wrapper .hide[data-v-a2c7c97e]{height:%?80?%!important}.calendar-wrapper .weektoggle[data-v-a2c7c97e]{width:%?85?%;height:%?32?%;position:relative;bottom:%?-42?%}.calendar-wrapper .weektoggle.down[data-v-a2c7c97e]{-webkit-transform:rotate(180deg);transform:rotate(180deg);bottom:0}',""]),t.exports=e},d3f1:function(t,e,a){"use strict";a.r(e);var n=a("6e1d"),i=a.n(n);for(var r in n)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=i.a},d77c:function(t,e,a){var n=a("bb41");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=a("967d").default;i("5279d0c0",n,!0,{sourceMap:!1,shadowMode:!1})},d9f5:function(t,e,a){"use strict";a.r(e);var n=a("af86"),i=a("0713");for(var r in i)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(r);a("861f");var o=a("828b"),s=Object(o["a"])(i["default"],n["b"],n["c"],!1,null,"6ea9301b",null,!1,n["a"],void 0);e["default"]=s.exports}}]);