|
@@ -0,0 +1,149 @@
|
|
|
+<template>
|
|
|
+ <div class="info-detail">
|
|
|
+ <h1>公众号模板消息</h1>
|
|
|
+ <div class="info-conts">
|
|
|
+ <div class="top-word">
|
|
|
+ <div class="l-menu">
|
|
|
+ <p>模板ID</p>
|
|
|
+ <p>标题</p>
|
|
|
+ <p>行业</p>
|
|
|
+ <p>详细内容</p>
|
|
|
+ </div>
|
|
|
+ <div class="l-menu">
|
|
|
+ <p>{{conts.templateId?conts.templateId:'-'}}</p>
|
|
|
+ <p>{{conts.title?conts.title:'-'}}</p>
|
|
|
+ <p><i>{{conts.deputyIndustry?conts.deputyIndustry:'-'}}</i></p>
|
|
|
+ <p><i>{{conts.content?conts.content:'-'}}</i></p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="bot-word">
|
|
|
+ <Card v-for="(item, index) in scened" :key="item.id" style="margin-bottom: 20px">
|
|
|
+ <h3>{{index + 1}}. {{item.sceneName}}</h3>
|
|
|
+ <div class="scene-list">
|
|
|
+ <div class="l-scene">
|
|
|
+ <p>推送逻辑:</p>
|
|
|
+ <p>推送用户:</p>
|
|
|
+ <p>模板对应firstdata字段:</p>
|
|
|
+ </div>
|
|
|
+ <div class="l-scene">
|
|
|
+ <p>{{item.pushLogic?item.pushLogic:'-'}}</p>
|
|
|
+ <p>{{item.pushUser?item.pushUser:'-'}}</p>
|
|
|
+ <p style="margin-left: 30px">
|
|
|
+ <i>{{item.firstdata?item.firstdata:'-'}}</i>
|
|
|
+ <Button size="small" @click="edits(item.id, item.firstdata)">修改</Button>
|
|
|
+ <Button size="small" type="primary" @click="save(item.id, 1)" style="margin: 0 20px" :disabled="item.isTest == 1">{{item.isTest == 1 ? '已测试' : '测试'}}</Button>
|
|
|
+ <Button size="small" type="primary" @click="save(item.id, 2)" :disabled="item.state == 1">{{item.state == 1 ? '已生效' : '确认生效'}}</Button>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </Card>
|
|
|
+ </div>
|
|
|
+ <Modal v-model="info.show" title="修改" :width="500" :mask-closable="false">
|
|
|
+ <Input v-model="info.descri" :rows="3" type="textarea"></Input>
|
|
|
+ <div slot="footer">
|
|
|
+ <Button type="primary" size="large" @click="save(0, 0)">提交</Button>
|
|
|
+ </div>
|
|
|
+ </Modal>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ conts: [],
|
|
|
+ scened: [],
|
|
|
+ isCode: false,
|
|
|
+ info: {
|
|
|
+ show: false,
|
|
|
+ id: 0,
|
|
|
+ descri: ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.detailed()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ detailed () {
|
|
|
+ this.$request('/template/templateInfo').data({id: this.$route.query.id}).success(r => {
|
|
|
+ this.conts = r.data.template
|
|
|
+ this.scened = r.data.scene
|
|
|
+ }).post()
|
|
|
+ },
|
|
|
+ edits(ids, item) {
|
|
|
+ this.info.show = true
|
|
|
+ this.isCode = true
|
|
|
+ this.info.id = ids
|
|
|
+ this.info.descri = item
|
|
|
+ },
|
|
|
+ save (ids, num) {
|
|
|
+ this.$request('/template/updateScene').data({
|
|
|
+ id: this.isCode ? this.info.id : ids,
|
|
|
+ firstdata: this.info.descri,
|
|
|
+ model: num
|
|
|
+ }).success(() => {
|
|
|
+ this.info.show = false
|
|
|
+ this.detailed()
|
|
|
+ }).post()
|
|
|
+ }
|
|
|
+ },
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.info-detail {
|
|
|
+ h1 {
|
|
|
+ font-size:24px;
|
|
|
+ color:#3f4047;
|
|
|
+ padding: 10px 0 20px 10px;
|
|
|
+ }
|
|
|
+ .info-conts {
|
|
|
+ min-height: calc(100vh - 210px);
|
|
|
+ background: #fff;
|
|
|
+ padding: 16px;
|
|
|
+ .top-word {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: inherit;
|
|
|
+ width: 600px;
|
|
|
+ margin: 0 auto;
|
|
|
+ margin-bottom: 30px;
|
|
|
+ .l-menu {
|
|
|
+ min-width: 120px;
|
|
|
+ p {
|
|
|
+ line-height: 46px;
|
|
|
+ font-size: 15px;
|
|
|
+ i {
|
|
|
+ display: inline-block;
|
|
|
+ line-height: 24px;
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .bot-word {
|
|
|
+ /deep/ .ivu-card {
|
|
|
+ background: #f5f7f9;
|
|
|
+ .scene-list {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: inherit;
|
|
|
+ margin-top: 10px;
|
|
|
+ .l-scene {
|
|
|
+ min-width: 120px;
|
|
|
+ p {
|
|
|
+ line-height: 26px;
|
|
|
+ font-size: 15px;
|
|
|
+ i {
|
|
|
+ display: inline-block;
|
|
|
+ line-height: 26px;
|
|
|
+ margin-right: 30px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|