TeachingSchool.83c5c8b8.js 3.9 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["TeachingSchool"],{"19a3":function(t,a,e){"use strict";var s=e("55b2"),i=e.n(s);i.a},3354:function(t,a,e){},4527:function(t,a,e){},5115:function(t,a,e){"use strict";var s=e("3354"),i=e.n(s);i.a},"55b2":function(t,a,e){},"6c4a":function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"teachingschool"},[e("m-header",{attrs:{backUrl:t.backUrl}},[e("template",{slot:"right"},[e("router-link",{attrs:{to:{path:"/teachingset?type=create"}}},[t._v("添加")])],1)],2),t.schoolList.length>0?e("div",t._l(t.schoolList,function(a,s){return e("van-cell-group",{key:s},[e("van-cell",{attrs:{"title-class":"cell-title","label-class":"cell-label",border:!1}},[e("template",{slot:"title"},[t._v(t._s(a.name))]),e("template",{slot:"label"},[t._v(t._s(a.address))])],2),e("div",{staticClass:"operation-btn"},[e("span",{staticClass:"edit",on:{click:function(e){return t.onOperation("update",a)}}},[e("i"),t._v("编辑")]),e("span",{staticClass:"delete",on:{click:function(e){return t.onSchoolDel(a)}}},[e("i"),t._v("删除")])])],1)}),1):e("m-empty",{attrs:{msg:"暂无教学点"}})],1)},i=[],n=(e("7f7f"),e("6e6e")),o=e("d678"),c=e("9afb"),r=e("ff51"),l={name:"teachingschool",components:{MHeader:n["a"],MEmpty:o["a"]},data:function(){var t=this;return{schoolList:[],backUrl:{callBack:function(){Object(r["a"])().iPhone?window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({api:"back"})):Object(r["a"])().android?DAYA.postMessage(JSON.stringify({api:"back"})):t.$router.push("/business")}}}},created:function(){var t=this.$route.query;t.Authorization&&(localStorage.setItem("Authorization",decodeURI(t.Authorization)),localStorage.setItem("userInfo",decodeURI(t.Authorization))),this.getSchoolList()},mounted:function(){},methods:{getSchoolList:function(){var t=this;Object(c["g"])({isDefault:1}).then(function(a){var e=a.data;200==e.code&&(t.schoolList=e.data)})},onSchoolDel:function(t){var a=this;this.$dialog.confirm({title:"提示",message:"您确认删除吗?"}).then(function(){Object(c["r"])({id:t.id}).then(function(t){var e=t.data;200==e.code?(a.$toast("删除成功"),a.getSchoolList()):a.$toast(e.msg)})})},onOperation:function(t,a){this.$router.push({path:"/teachingset",query:{type:t,id:a.id,name:a.name,address:a.address,longitudeLatitude:a.longitudeLatitude}})}}},u=l,d=(e("c5b1"),e("2877")),h=Object(d["a"])(u,s,i,!1,null,"8144f182",null);a["default"]=h.exports},"6e6e":function(t,a,e){"use strict";var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"mheader"},[e("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":""]},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:t.goBack}},[e("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),e("div",{staticClass:"m-nav-bar__title"},[t._t("default",[t._v(t._s(t.name?t.name:this.$route.meta.descrition))])],2),e("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},i=[],n={name:"mheader",props:{name:String,isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},backUrl:{type:Object,default:function(){return{callBack:null,path:"",params:{}}}}},methods:{goBack:function(){var t=this.backUrl;"function"==typeof t.callBack?t.callBack():t.path?this.$router.push({path:t.path,query:t.params}):history.go(-1)}}},o=n,c=(e("5115"),e("2877")),r=Object(c["a"])(o,s,i,!1,null,"61d0e2e4",null);a["a"]=r.exports},c5b1:function(t,a,e){"use strict";var s=e("4527"),i=e.n(s);i.a},d678:function(t,a,e){"use strict";var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"mempty"},[e("div",{class:[t.icon?t.icon:"icon_nodata","icon"]}),e("div",{staticClass:"msg"},[t._v(t._s(t.msg?t.msg:"暂无内容"))])])},i=[],n={name:"mempty",props:{icon:String,msg:String}},o=n,c=(e("19a3"),e("2877")),r=Object(c["a"])(o,s,i,!1,null,"67669af7",null);a["a"]=r.exports}}]);