|
@@ -0,0 +1,152 @@
|
|
|
+<template>
|
|
|
+ <div class="info-detail">
|
|
|
+ <h1>公众号模板消息</h1>
|
|
|
+ <div class="info-conts">
|
|
|
+ <div class="top-word">
|
|
|
+ <div class="l-menu">
|
|
|
+ <p><span>模板ID</span><i>{{conts.templateId?conts.templateId:'-'}}</i></p>
|
|
|
+ <p><span>标题</span><i>{{conts.title?conts.title:'-'}}</i></p>
|
|
|
+ <p><span>行业</span><i>{{conts.deputyIndustry?conts.deputyIndustry:'-'}}</i></p>
|
|
|
+ <p><span>详细内容</span><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 r-w-cont">
|
|
|
+ <p><span class="spa">推送逻辑:</span><i>{{item.pushLogic?item.pushLogic:'-'}}</i></p>
|
|
|
+ <p><span class="spa">推送用户:</span><i>{{item.pushUser?item.pushUser:'-'}}</i></p>
|
|
|
+ <p><span class="spa">模板对应firstdata字段:</span>
|
|
|
+ <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.trim="info.descri" :rows="5" 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: [],
|
|
|
+ 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.info.id = ids
|
|
|
+ this.info.descri = item
|
|
|
+ },
|
|
|
+ save (ids, num) {
|
|
|
+ this.$request('/template/updateScene').data({
|
|
|
+ id: num == 0 ? this.info.id : ids,
|
|
|
+ firstdata: this.info.descri,
|
|
|
+ model: num
|
|
|
+ }).success(() => {
|
|
|
+ this.info.show = false
|
|
|
+ this.info.descri = ''
|
|
|
+ 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 {
|
|
|
+ display: flex;
|
|
|
+ line-height: 46px;
|
|
|
+ font-size: 15px;
|
|
|
+ span {
|
|
|
+ min-width: 80px;
|
|
|
+ }
|
|
|
+ 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 {
|
|
|
+ p {
|
|
|
+ display: flex;
|
|
|
+ line-height: 26px;
|
|
|
+ font-size: 15px;
|
|
|
+ .spa {
|
|
|
+ width: 160px;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ i {
|
|
|
+ display: inline-block;
|
|
|
+ line-height: 26px;
|
|
|
+ margin-right: 30px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .r-w-cont {
|
|
|
+ p {
|
|
|
+ i {
|
|
|
+ max-width: 660px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|