启程易购后端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
qicheng_shop_backend/public/system/js/chunk-2d22496f.3bc8386a.js

1 lines
3.9 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22496f"],{e17d:function(t,e,a){"use strict";a.r(e);var l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("div",{staticClass:"selCard"},[a("el-form",{attrs:{size:"small","label-width":"85px"}},[a("el-form-item",{attrs:{label:"模板类型:"}},[a("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择",size:"small",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.temp_type,callback:function(e){t.$set(t.tableFrom,"temp_type",e)},expression:"tableFrom.temp_type"}},[a("el-option",{attrs:{label:"验证码",value:1}}),t._v(" "),a("el-option",{attrs:{label:"通知",value:2}}),t._v(" "),a("el-option",{attrs:{label:"推广",value:3}})],1)],1)],1)],1),t._v(" "),a("el-card",{directives:[{name:"loading",rawName:"v-loading",value:t.fullscreenLoading,expression:"fullscreenLoading"}],staticClass:"mt14"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.tableData.data,size:"small","highlight-current-row":""}},[a("el-table-column",{attrs:{prop:"id",label:"ID","min-width":"50"}}),t._v(" "),a("el-table-column",{attrs:{prop:"title",label:"模板名称","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{prop:"content",label:"模板内容","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"temp_type",label:"模板类型","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){var l=e.row;return[a("span",[t._v(t._s(t._f("typeFilter")(l.temp_type)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"mark",label:"备注","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{label:"模板状态","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){var l=e.row;return[a("span",[t._v(t._s(1==l.status?"审核通过":2==l.status?"审核未通过":"待审核"))])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{background:"","page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},n=[],s=a("c80c"),i=(a("96cf"),a("3b8d")),r=a("db72"),o=a("b61d"),c=a("83d6"),u=a("2f62"),p={name:"SmsTemplate",filters:{typeFilter:function(t){var e={1:"验证码",2:"通知",3:"营销短信"};return e[t]}},data:function(){return{fullscreenLoading:!1,listLoading:!1,dialogVisible:!1,tableData:{data:[],total:0},tableFrom:{page:1,limit:20,temp_type:""}}},computed:Object(r["a"])({},Object(u["b"])(["isLogin"])),mounted:function(){console.log(this.isLogin),this.getList("")},methods:{onIsLogin:function(){var t=this;this.fullscreenLoading=!0,this.$store.dispatch("user/isLogin").then(function(){var e=Object(i["a"])(Object(s["a"])().mark((function e(a){var l;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:l=a.data,l.status?t.getList(""):(t.$message.warning("请先登录"),t.$router.push(c["roterPre"]+"/sms/config?url="+t.$route.path)),t.fullscreenLoading=!1;case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.message),t.$router.push(c["roterPre"]+"/sms/config?url="+t.$route.path),t.fullscreenLoading=!1}))},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(o["a"])(this.tableFrom).then((function(t){e.tableData.data=t.data.data,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.message),e.$router.push(c["roterPre"]+"/setting/sms/sms_config/index")}))},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")}}},d=p,m=a("2877"),g=Object(m["a"])(d,l,n,!1,null,"167a941b",null);e["default"]=g.exports}}]);