classDetail.js 5.3 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesClass/classDetail"],{"038e":function(t,e,n){"use strict";var i=n("3b9d"),s=n.n(i);s.a},3759:function(t,e,n){},"3b9d":function(t,e,n){},"52f7":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("2f62");function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a=n("157c"),c=n("f344"),r={computed:u({},(0,i.mapGetters)(["mainColor","customStyle"])),data:function(){return{classId:"",classInfo:{name:"",classStartDate:"",classStartHours:"",classEndDate:"",classEndHours:"",residue:"",address:"",classExtrasList:[],studentSignList:[],showList:[]},classShowList:[],uploadTypeShow:!1,uploadTypeList:[{text:"图片"},{text:"视频"}],imgEdit:!1,cardStyle:{fontWeight:"bold"},gridCustomStyle:{padding:"0 2px"}}},onLoad:function(t){this.classId=t.id,this.initialize(),this.getClassShow()},onReady:function(){},onPullDownRefresh:function(){this.initialize(),this.getClassShow()},methods:{initialize:function(){var e=this;a.request(c.getClassDetail,{id:this.classId},"POST").then((function(n){e.classInfo=n.data,t.stopPullDownRefresh()})).catch((function(t){e.$refs.uTips.show({title:t.message,type:"warning"})}))},getClassShow:function(){var t=this;a.request(c.getClassDetailShowList,{id:this.classId,page:0,size:1e3},"POST").then((function(e){t.classShowList=e.data.row})).catch((function(e){t.$refs.uTips.show({title:e.message,type:"warning"})}))},getStudentsNumber:function(){return this.classInfo.studentSignList.length},selectUploadType:function(e){var n=this;0==e?t.chooseImage({count:1,success:function(t){n.uploadFile(t.tempFilePaths[0])},fail:function(t){}}):e&&t.chooseVideo({count:1,success:function(t){n.uploadFile(t.tempFilePath)},fail:function(t){}})},uploadFile:function(e){var n=this;t.uploadFile({url:c.uploadFile,filePath:e,name:"file",header:{Authorization:t.getStorageSync("token")},success:function(t){n.uploadSuccess(JSON.parse(t.data).data.id)}})},uploadSuccess:function(t){var e=this;a.request(c.insertClassShow,{fileId:[t],id:this.classId},"POST").then((function(t){e.getClassShow(),e.$refs.uTips.show({title:"班级近况发布成功",type:"success"})})).catch((function(t){e.$refs.uTips.show({title:t.message,type:"warning"})}))},deleteClassShow:function(t){var e=this;a.request(c.deleteClassShow,{id:t.id},"POST").then((function(t){e.getClassShow(),e.$refs.uTips.show({title:"删除成功",type:"success"})})).catch((function(t){e.$refs.uTips.show({title:t.message,type:"warning"})}))},goToStudentInfo:function(e){t.navigateTo({url:"/pagesMain/studentInfo?type=1&id="+e.id+"&classId="+this.classId})},goToSignForm:function(){t.removeStorageSync("signUserList"),t.navigateTo({url:"/pagesClass/signForm?id="+this.classId+"&status="+this.classInfo.signStatus})}}};e.default=r}).call(this,n("543d")["default"])},a5ae:function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return i}));var i={uCard:function(){return n.e("uview-ui/components/u-card/u-card").then(n.bind(null,"af68"))},uIcon:function(){return n.e("uview-ui/components/u-icon/u-icon").then(n.bind(null,"c4c2"))},uGrid:function(){return n.e("uview-ui/components/u-grid/u-grid").then(n.bind(null,"53f4"))},uGridItem:function(){return n.e("uview-ui/components/u-grid-item/u-grid-item").then(n.bind(null,"1395"))},uImage:function(){return n.e("uview-ui/components/u-image/u-image").then(n.bind(null,"dc25"))},uButton:function(){return n.e("uview-ui/components/u-button/u-button").then(n.bind(null,"0198"))},uActionSheet:function(){return n.e("uview-ui/components/u-action-sheet/u-action-sheet").then(n.bind(null,"734a"))},uTopTips:function(){return n.e("uview-ui/components/u-top-tips/u-top-tips").then(n.bind(null,"14ca"))}},s=function(){var t=this,e=t.$createElement,n=(t._self._c,t.getStudentsNumber());t._isMounted||(t.e0=function(e){t.imgEdit=!t.imgEdit},t.e1=function(e){t.uploadTypeShow=!0}),t.$mp.data=Object.assign({},{$root:{m0:n}})},u=[]},b8fe:function(t,e,n){"use strict";n.r(e);var i=n("52f7"),s=n.n(i);for(var u in i)"default"!==u&&function(t){n.d(e,t,(function(){return i[t]}))}(u);e["default"]=s.a},c27c:function(t,e,n){"use strict";var i=n("3759"),s=n.n(i);s.a},d831:function(t,e,n){"use strict";(function(t){n("e744");i(n("66fd"));var e=i(n("e115"));function i(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},e115:function(t,e,n){"use strict";n.r(e);var i=n("a5ae"),s=n("b8fe");for(var u in s)"default"!==u&&function(t){n.d(e,t,(function(){return s[t]}))}(u);n("c27c"),n("038e");var o,a=n("f0c5"),c=Object(a["a"])(s["default"],i["b"],i["c"],!1,null,"5cff56bf",null,!1,i["a"],o);e["default"]=c.exports}},[["d831","common/runtime","common/vendor"]]]);