启程易购后端代码
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-61485bac.eb4478fa.js

1 lines
17 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-61485bac"],{"217e":function(t,e,a){"use strict";a("8f1c")},"5d68":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("div",{staticClass:"selCard"},[a("el-form",{ref:"searchForm",attrs:{model:t.tableFrom,inline:"",size:"small","label-width":"85px"}},[a("el-form-item",{attrs:{label:"审核状态:",prop:"status"}},[a("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.status,callback:function(e){t.$set(t.tableFrom,"status",e)},expression:"tableFrom.status"}},t._l(t.statusList,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"分类名称:",prop:"category_id"}},[a("el-select",{staticClass:"selWidth",attrs:{clearable:"",filterable:"",placeholder:"请选择"},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.category_id,callback:function(e){t.$set(t.tableFrom,"category_id",e)},expression:"tableFrom.category_id"}},t._l(t.cateSelect,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"话题名称:",prop:"topic_id"}},[a("el-select",{staticClass:"selWidth",attrs:{clearable:"",filterable:"",placeholder:"请选择"},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.topic_id,callback:function(e){t.$set(t.tableFrom,"topic_id",e)},expression:"tableFrom.topic_id"}},t._l(t.topicSelect,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"是否显示:",prop:"is_show"}},[a("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.is_show,callback:function(e){t.$set(t.tableFrom,"is_show",e)},expression:"tableFrom.is_show"}},[a("el-option",{attrs:{label:"显示",value:"1"}}),t._v(" "),a("el-option",{attrs:{label:"不显示",value:"0"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"作者:",prop:"username"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入文章作者",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.username,callback:function(e){t.$set(t.tableFrom,"username",e)},expression:"tableFrom.username"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"关键字:",prop:"keyword"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入文章标题",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.getList(1)}}},[t._v("搜索")]),t._v(" "),a("el-button",{attrs:{size:"small"},on:{click:function(e){return t.searchReset()}}},[t._v("重置")])],1)],1)],1),t._v(" "),a("el-card",{staticClass:"mt14"},[a("div",{staticClass:"mb5"},[t.headeNum.length>0?a("el-tabs",{on:{"tab-click":function(e){return t.getList(1)}},model:{value:t.tableFrom.is_type,callback:function(e){t.$set(t.tableFrom,"is_type",e)},expression:"tableFrom.is_type"}},t._l(t.headeNum,(function(t,e){return a("el-tab-pane",{key:e,attrs:{name:t.type.toString(),label:t.title+"("+t.count+")"}})})),1):t._e()],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.tableData.data,size:"small"}},[a("el-table-column",{attrs:{label:"ID",prop:"community_id","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{label:"标题",prop:"title","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{label:"作者",prop:"author.nickname","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{label:1==t.tableFrom.is_type?"图文封面":"视频封面图","min-width":"210"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"demo-image__preview"},t._l(e.row.image,(function(t,e){return a("el-image",{key:e,staticClass:"mr5",attrs:{src:t,"preview-src-list":[t]}})})),1)]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"推荐级别","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-rate",{attrs:{disabled:"",colors:t.colors},model:{value:e.row.start,callback:function(a){t.$set(e.row,"start",a)},expression:"scope.row.start"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"pv",label:1==t.tableFrom.is_type?"浏览量":"播放量","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"count_start",label:"点赞数","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"count_reply",label:"评论数","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"发布时间","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"status",label:"是否显示","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"显示","inactive-text":"隐藏"},on:{change:function(a){return t.onchangeIsShow(e.row)}},model:{value:e.row.is_show,callback:function(a){t.$set(e.row,"is_show",a)},expression:"scope.row.is_show"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"状态","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t._f("communityStatus")(e.row.status)))]),t._v(" "),-1==e.row.status?a("span",{staticStyle:{display:"block","font-size":"12px",color:"red"}},[t._v("原因 "+t._s(e.row.refusal))]):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"200",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.onDetail(e.row.community_id)}}},[t._v("详情")]),t._v(" "),0==e.row.status||-2==e.row.status?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onAudit(e.row.community_id)}}},[t._v("审核")]):t._e(),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onEdit(e.row.community_id)}}},[t._v("编辑星级")]),t._v(" "),1==e.row.status?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onOff(e.row.community_id)}}},[t._v("强制下架")]):t._e(),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onReply(e.row.community_id)}}},[t._v("查看评论")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.community_id,e.$index)}}},[t._v("删除")])]}}])})],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),t._v(" "),t.examineVisible?a("el-dialog",{attrs:{title:"审核",visible:t.examineVisible,width:"600px"},on:{"update:visible":function(e){t.examineVisible=e}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.ruleForm,rules:t.rules,size:"small","label-width":"90px"}},[a("el-form-item",{attrs:{label:"审核状态:",prop:"status"}},[a("el-radio-group",{model:{value:t.ruleForm.status,callback:function(e){t.$set(t.ruleForm,"status",e)},expression:"ruleForm.status"}},[a("el-radio",{attrs:{label:1}},[t._v("通过")]),t._v(" "),a("el-radio",{attrs:{label:-1}},[t._v("拒绝")])],1)],1),t._v(" "),-1===t.ruleForm.status?a("el-form-item",{attrs:{label:"原因",prop:"refusal"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入原因"},model:{value:t.ruleForm.refusal,callback:function(e){t.$set(t.ruleForm,"refusal",e)},expression:"ruleForm.refusal"}})],1):t._e(),t._v(" "),a("el-form-item",[a("div",{staticStyle:{"text-align":"right"}},[a("el-button",{on:{click:function(e){t.examineVisible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("提交")])],1)])],1)],1)]):t._e(),t._v(" "),t.dialogVisible?a("el-dialog",{attrs:{title:"详情",visible:t.dialogVisible,width:"650px","custom-class":"dialog-scustom"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[a("div",{staticClass:"box-container"},[a("div",{staticClass:"basic-info"},[a("div",{staticClass:"title"},[t._v("基本信息")]),t._v(" "),a("div",{staticClass:"acea-row"},[a("div",{staticClass:"list sp100"},[a("label",{staticClass:"name"},[t._v(t._s(1==t.formData.is_type?"图文封面:":"视频封面:"))]),t._v(" "),a("div",t._l(t.formData.image,(function(t,e){return a("span",{key:e},[a("el-image",{staticStyle:{width:"60px",height:"60px","margin-right":"10px"},attrs:{src:t||"","preview-src-list":[t||""]}})],1)})),0)]),t._v(" "),2==t.formData.is_type?a("div",{staticClass:"list sp100"},[a("label",{staticClass:"name"},[t._v("短视频:")]),t._v(" "),a("span",{staticClass:"video-img",on:{click:function(e){t.showVideo=!0}}},[a("el-image",{staticStyle:{width:"60px",height:"60px"},attrs:{src:t.formData.image[0]}}),t._v(" "),a("span",[a("i",{staticClass:"el-icon-caret-right"})])],1)]):t._e(),t._v(" "),a("div",{staticClass:"list sp100"},[a("label",{staticClass:"name"},[t._v("文章内容:")]),t._v(" "),a("div",[t._v(t._s(t.formData.content))])])])]),t._v(" "),a("div",{staticClass:"title",staticStyle:{"margin-top":"20px"}},[t._v("内容信息:")]),t._v(" "),a("div",{staticClass:"acea-row"},[a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v(t._s(1==t.formData.type?"浏览量:":"播放量:"))]),t._v(" "),a("div",[t._v(t._s(t.formData.pv))])]),t._v(" "),a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("话题:")]),t._v("\n "+t._s(t.formData.topic&&t.formData.topic.topic_name||"-")+"\n ")]),t._v(" "),a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("作者:")]),t._v("\n "+t._s(t.formData.author&&t.formData.author.nickname||"-")+"\n ")]),t._v(" "),a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("作者ID:")]),t._v("\n "+t._s(t.formData.author&&t.formData.author.uid||"-")+"\n ")]),t._v(" "),a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("发布时间:")]),t._v("\n "+t._s(t.formData.create_time)+"\n ")]),t._v(" "),1==t.formData.status?a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("审核通过时间:")]),t._v("\n "+t._s(t.formData.status_time)+"\n ")]):t._e(),t._v(" "),1==t.formData.status?a("div",{staticClass:"list sp100"},[a("label",{staticClass:"name"},[t._v("关联商品:")]),t._v(" "),t._l(t.formData.relevance,(function(t,e){return a("div",{key:e,staticStyle:{display:"inline-block"}},[a("el-image",{staticStyle:{width:"60px",height:"60px;margin-right: 4px"},attrs:{src:t.spu.image||"","preview-src-list":[t.spu&&t.spu.image]}})],1)}))],2):t._e()])])])]):t._e(),t._v(" "),t.showVideo?a("el-dialog",{attrs:{title:"视频内容",visible:t.showVideo,width:"680px"},on:{"update:visible":function(e){t.showVideo=e}}},[t.showVideo?a("div",{staticClass:"video-container"},[a("video",{staticStyle:{width:"600px","max-height":"500px","border-radius":"10px"},attrs:{src:t.formData.video_link,autoplay:"",controls:"controls"}},[t._v("\n 您的浏览器不支持 video 标签。\n ")])]):t._e()]):t._e()],1)},n=[],s=a("7998"),o={name:"communityTopic",data:function(){return{moren:a("cdfe"),colors:["#99A9BF","#F7BA2A","#FF9900"],isChecked:!1,listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:20,is_type:"1",status:"",keyword:"",username:"",category_id:"",topic_id:""},statusList:[{label:"审核通过",value:1},{label:"待审核",value:0},{label:"审核未通过",value:-1},{label:"下架",value:-2}],headeNum:[{title:"图文内容",count:18,type:1},{title:"短视频内容",count:30,type:2}],cateSelect:[],topicSelect:[],dialogVisible:!1,examineVisible:!1,loading:!1,isExamine:!1,showVideo:!1,community_id:"",formData:{},rules:{status:[{required:!0,message:"请选择审核状态",trigger:"change"}],refusal:[{required:!0,message:"请填写拒绝原因",trigger:"blur"}]},ruleForm:{refusal:"",status:1}}},mounted:function(){this.getList(1),this.getCateSelect(),this.getTopicSelect(),this.getHeaderData()},methods:{searchReset:function(){this.$refs.searchForm.resetFields(),this.getList(1)},getCateSelect:function(){var t=this;Object(s["b"])().then((function(e){t.cateSelect=e.data})).catch((function(e){t.$message.error(e.message)}))},getHeaderData:function(){var t=this;Object(s["p"])().then((function(e){t.headeNum=e.data})).catch((function(e){t.$message.error(e.message)}))},getTopicSelect:function(){var t=this;Object(s["u"])().then((function(e){t.topicSelect=e.data})).catch((function(e){t.$message.error(e.message)}))},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(s["j"])(this.tableFrom).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)}))},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")},onEdit:function(t){var e=this;this.$modalForm(Object(s["x"])(t)).then((function(){return e.getList("")}))},onReply:function(t){this.$router.push({path:"reply",query:{community_id:t}})},onAudit:function(t){this.community_id=t,this.examineVisible=!0},onDetail:function(t){var e=this;this.community_id=t,this.dialogVisible=!0,Object(s["i"])(t).then((function(t){e.formData=t.data})).catch((function(t){var a=t.message;e.$message.error(a)}))},onOff:function(t){var e=this;this.$modalForm(Object(s["k"])(t)).then((function(){return e.getList("")}))},onSubmit:function(){var t=this;Object(s["a"])(this.community_id,this.ruleForm).then((function(e){t.$message.success(e.message),t.examineVisible=!1,t.getList("")})).catch((function(e){t.$message.error(e.message)}))},handleDelete:function(t,e){var a=this;this.$modalSure("确定删除该内容").then((function(){Object(s["h"])(t).then((function(t){var e=t.message;a.$message.success(e),a.getList("")})).catch((function(t){var e=t.message;a.$message.error(e)}))}))},onchangeIsShow:function(t){var e=this;Object(s["o"])(t.community_id,t.is_show).then((function(t){var a=t.message;e.$message.success(a)})).catch((function(t){var a=t.message;e.$message.error(a)}))}}},l=o,r=(a("217e"),a("2877")),c=Object(r["a"])(l,i,n,!1,null,"01b3909e",null);e["default"]=c.exports},7998:function(t,e,a){"use strict";a.d(e,"e",(function(){return n})),a.d(e,"c",(function(){return s})),a.d(e,"g",(function(){return o})),a.d(e,"d",(function(){return l})),a.d(e,"f",(function(){return r})),a.d(e,"t",(function(){return c})),a.d(e,"q",(function(){return u})),a.d(e,"w",(function(){return m})),a.d(e,"r",(function(){return d})),a.d(e,"v",(function(){return f})),a.d(e,"s",(function(){return p})),a.d(e,"j",(function(){return v})),a.d(e,"i",(function(){return b})),a.d(e,"a",(function(){return _})),a.d(e,"x",(function(){return h})),a.d(e,"o",(function(){return g})),a.d(e,"h",(function(){return y})),a.d(e,"k",(function(){return w})),a.d(e,"b",(function(){return k})),a.d(e,"u",(function(){return x})),a.d(e,"m",(function(){return C})),a.d(e,"l",(function(){return F})),a.d(e,"n",(function(){return D})),a.d(e,"p",(function(){return S}));var i=a("0c6d");function n(t){return i["a"].get("community/category/lst",t)}function s(){return i["a"].get("community/category/create/form")}function o(t){return i["a"].get("community/category/update/".concat(t,"/form"))}function l(t){return i["a"].delete("community/category/delete/".concat(t))}function r(t,e){return i["a"].post("community/category/status/".concat(t),{status:e})}function c(t){return i["a"].get("community/topic/lst",t)}function u(){return i["a"].get("community/topic/create/form")}function m(t){return i["a"].get("community/topic/update/".concat(t,"/form"))}function d(t){return i["a"].delete("community/topic/delete/".concat(t))}function f(t,e){return i["a"].post("community/topic/status/".concat(t),{status:e})}function p(t,e){return i["a"].post("community/topic/hot/".concat(t),{status:e})}function v(t){return i["a"].get("community/lst",t)}function b(t){return i["a"].get("community/detail/".concat(t))}function _(t,e){return i["a"].post("community/status/".concat(t),e)}function h(t){return i["a"].get("community/update/".concat(t,"/form"))}function g(t,e){return i["a"].post("community/show/".concat(t),{status:e})}function y(t){return i["a"].delete("community/delete/".concat(t))}function w(t){return i["a"].get("community/status/".concat(t,"/form"))}function k(){return i["a"].get("community/category/option")}function x(){return i["a"].get("community/topic/option")}function C(t){return i["a"].get("community/reply/lst",t)}function F(t){return i["a"].delete("community/reply/delete/".concat(t))}function D(t){return i["a"].get("community/reply/status/".concat(t,"/form"))}function S(){return i["a"].get("community/title")}},"8f1c":function(t,e,a){},cdfe:function(t,e,a){t.exports=a.p+"system/img/f.5aa43cd3.png"}}]);