1 line
7.0 KiB
JavaScript
1 line
7.0 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0af125"],{"0d83":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"filter-container"},[a("el-form",{attrs:{size:"small"}},[a("el-form-item",{staticClass:"mr10",attrs:{label:""}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-s-tools"},on:{click:t.syncApplet}},[t._v("同步小程序订阅消息")]),t._v(" "),a("el-button",{attrs:{type:"success",icon:"el-icon-s-tools"},on:{click:t.syncPublic}},[t._v("同步公众号模板消息")])],1),t._v(" "),a("el-form-item",{staticClass:"mr10",attrs:{label:""}},[a("el-collapse",{attrs:{accordion:""},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("el-collapse-item",{attrs:{name:"1"}},[a("template",{slot:"title"},[a("div",{staticStyle:{"font-size":"14px","font-weight":"bold",color:"#437FFD"}},[t._v("同步消息必读 "),a("i",{staticClass:"header-icon el-icon-info"})])]),t._v(" "),a("div",{staticStyle:{"font-weight":"bold"}},[t._v("小程序订阅消息")]),t._v(" "),a("div",[t._v("登录微信小程序后台,基本设置,服务类目增加《生活服务 > 百货/超市/便利店》 "),a("span",{staticStyle:{color:"#FF9400"}},[t._v("(否则同步小程序订阅消息会报错)")])]),t._v(" "),a("div",[t._v("同步小程序订阅消息 是在小程序后台未添加订阅消息模板的前提下使用的,会新增一个模板消息并把信息同步过来,如果小程序后台已经添加过的,会跳过不会更新本项目数据库。")]),t._v(" "),a("div",{staticStyle:{"font-weight":"bold"}},[t._v("微信模板消息")]),t._v(" "),a("div",[t._v("登录微信公众号后台,选择模板消息,将模板消息的所在行业修改副行业为《其他/其他》 "),a("span",{staticStyle:{color:"#FF9400"}},[t._v("(否则同步模板消息不成功)")])]),t._v(" "),a("div",[t._v("同步公众号模板消息 同步公众号模板会删除公众号后台现有的模板,并重新添加新的模板,然后同步信息到数据库,如果多个项目使用同一个公众号的模板,请谨慎操作。")])],2)],1)],1)],1)],1),t._v(" "),t.headeNum.length>0?a("el-tabs",{on:{"tab-click":function(e){return t.getList(1)}},model:{value:t.tableForm.type,callback:function(e){t.$set(t.tableForm,"type",e)},expression:"tableForm.type"}},t._l(t.headeNum,(function(t,e){return a("el-tab-pane",{key:e,attrs:{name:t.type.toString(),label:t.title}})})),1):t._e()],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticClass:"table",staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"mini","highlight-current-row":""}},[a("el-table-column",{attrs:{label:"ID",prop:"notice_config_id","min-width":"90"}}),t._v(" "),a("el-table-column",{attrs:{prop:"notice_title",label:"通知类型","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"notice_info",label:"通知场景说明","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{label:"公众号模板","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[0==e.row.notice_wechat||1==e.row.notice_wechat?a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"开启","inactive-text":"关闭"},nativeOn:{click:function(a){return t.onchangeIsShow(e.row,"notice_wechat")}},model:{value:e.row.notice_wechat,callback:function(a){t.$set(e.row,"notice_wechat",a)},expression:"scope.row.notice_wechat"}}):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"小程序订阅","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[0==e.row.notice_routine||1==e.row.notice_routine?a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"开启","inactive-text":"关闭"},nativeOn:{click:function(a){return t.onchangeIsShow(e.row,"notice_routine")}},model:{value:e.row.notice_routine,callback:function(a){t.$set(e.row,"notice_routine",a)},expression:"scope.row.notice_routine"}}):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"发送短信","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[0==e.row.notice_sms||1==e.row.notice_sms?a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"开启","inactive-text":"关闭"},nativeOn:{click:function(a){return t.onchangeIsShow(e.row,"notice_sms")}},model:{value:e.row.notice_sms,callback:function(a){t.$set(e.row,"notice_sms",a)},expression:"scope.row.notice_sms"}}):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"90",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onChange(e.row.notice_config_id)}}},[t._v("设置")])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.tableForm.limit,"current-page":t.tableForm.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},n=[],o=a("90e7"),s=a("8593"),c=a("83d6"),l={name:"Notification",data:function(){return{loading:!1,roterPre:c["roterPre"],listLoading:!0,tableData:{data:[],total:0},tableForm:{page:1,limit:20,type:"0"},ruleForm:{status:"0"},headeNum:[{type:0,title:"通知会员"},{type:1,title:"通知商户"}],noticeConfig:{sms_use_type:0},activeName:1}},computed:{},mounted:function(){this.getList("")},methods:{add:function(){var t=this;this.$modalForm(Object(o["a"])()).then((function(){return t.getList()}))},onSet:function(t){var e=this;this.$modalForm(Object(o["C"])(t)).then((function(){return e.getList()}))},onChange:function(t){var e=this;this.$modalForm(Object(o["A"])(t)).then((function(){return e.getList()}))},getList:function(t){var e=this;this.listLoading=!0,this.tableForm.page=t||this.tableForm.page,Object(s["p"])().then((function(t){e.noticeConfig=t.data})),Object(o["B"])(this.tableForm).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))},syncApplet:function(){var t=this;Object(o["Z"])().then((function(e){var a=e.message;t.$message.success(a)})).catch((function(e){var a=e.message;t.$message.error(a)}))},syncPublic:function(){var t=this;Object(o["ab"])().then((function(e){var a=e.message;t.$message.success(a)})).catch((function(e){var a=e.message;t.$message.error(a)}))},onchangeIsShow:function(t,e){var a=this,i={status:t[e],key:e};Object(o["D"])(t.notice_config_id,i).then((function(t){var e=t.message;a.$message.success(e),a.getList("")})).catch((function(t){var e=t.message;a.$message.error(e)}))},pageChange:function(t){this.tableForm.page=t,this.getList("")},handleSizeChange:function(t){this.tableForm.limit=t,this.getList("")}}},r=l,u=a("2877"),m=Object(u["a"])(r,i,n,!1,null,"00e1546c",null);e["default"]=m.exports}}]); |