xgwangman преди 4 години
родител
ревизия
75634bd9fd

+ 1 - 1
.env

@@ -1,5 +1,5 @@
 VUE_APP_ADMIN_TOKEN_NAME = 'admin_token'
-VUE_APP_API_URL_PREFIX = 'https://admin204.jydev.jianyu360.com/api/admin/'
+VUE_APP_API_URL_PREFIX = '/api/admin/'
 VUE_APP_API_ACTION_NAME = '_action'
 VUE_APP_API_TOKEN_NAME = '_token'
 VUE_APP_INDEX_URL = '/index'

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
qmx_page/css/app.58653148.css


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
qmx_page/css/app.6488de46.css


+ 1 - 1
qmx_page/index.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title>管理后台</title><link href=/css/app.6488de46.css rel=preload as=style><link href=/css/chunk-vendors.784fa8c1.css rel=preload as=style><link href=/js/app.4339f620.js rel=preload as=script><link href=/js/chunk-vendors.7f2b39e7.js rel=preload as=script><link href=/css/chunk-vendors.784fa8c1.css rel=stylesheet><link href=/css/app.6488de46.css rel=stylesheet></head><body><noscript><strong>We're sorry but doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=loading><div class=spinner><div class=rect1></div><div class=rect2></div><div class=rect3></div><div class=rect4></div><div class=rect5></div></div></div><div id=app></div><script src=/js/chunk-vendors.7f2b39e7.js></script><script src=/js/app.4339f620.js></script></body></html>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title>管理后台</title><link href=/css/app.58653148.css rel=preload as=style><link href=/css/chunk-vendors.784fa8c1.css rel=preload as=style><link href=/js/app.047a10cf.js rel=preload as=script><link href=/js/chunk-vendors.7f2b39e7.js rel=preload as=script><link href=/css/chunk-vendors.784fa8c1.css rel=stylesheet><link href=/css/app.58653148.css rel=stylesheet></head><body><noscript><strong>We're sorry but doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=loading><div class=spinner><div class=rect1></div><div class=rect2></div><div class=rect3></div><div class=rect4></div><div class=rect5></div></div></div><div id=app></div><script src=/js/chunk-vendors.7f2b39e7.js></script><script src=/js/app.047a10cf.js></script></body></html>

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
qmx_page/js/app.047a10cf.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
qmx_page/js/app.4339f620.js


+ 1 - 2
src/helper.js

@@ -19,8 +19,7 @@ export const config = function (key) {
 }
 
 export const token = function () {
-    // return localStorage.getItem(config('ADMIN_TOKEN_NAME'))
-    return '1a25aed314cab03c9d304b631b3c3786'
+    return localStorage.getItem(config('ADMIN_TOKEN_NAME'))
 }
 
 export const serverUrl = function (data = {}) {

+ 5 - 0
src/router.js

@@ -40,6 +40,11 @@ const routes = [
         path: '/userMage/userList/userDetail',
         name: 'userDetail',
         component: () => import('./views/userManage/userDetail.vue')
+    },
+    {
+        path: '/boardMsg/inforList/inforDetail',
+        name: 'inforDetail',
+        component: () => import('./views/boardMsg/inforDetail.vue')
     }
 ];
 

+ 149 - 0
src/views/boardMsg/inforDetail.vue

@@ -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>

+ 97 - 0
src/views/boardMsg/inforList.vue

@@ -0,0 +1,97 @@
+<template>
+  <div class="info-list">
+    <h1>公众号模板消息</h1>
+    <table-lists 
+        ref="tableLists" 
+        v-model="list" 
+        :filter="filter" 
+        :sear="sear"
+        :filterType="2" 
+        :filterReset="0" 
+        :filterSear="2" 
+        requestApi="/template/templateList" 
+        style="background:#fff;padding:10px"
+        @loading="load"
+    >
+      <template slot="filterRight">
+          <Input suffix="md-search" type="text" v-model="sear.search" placeholder="搜索模板名称" clearable class="ser-ipt"/>
+      </template>
+      <Table 
+        ellipsis 
+        :loading="loading" 
+        ref="selection" 
+        :columns="columns" 
+        :data="list.lists" 
+        stripe
+      >
+        <template slot-scope="{ row }" slot="op">
+            <router-link 
+                :to="{path:'/boardMsg/inforList/inforDetail', query: {id: row.id}}"
+                target="_blank"
+                style="color: #2d8cf0"
+            >查看详情</router-link>
+        </template>
+      </Table>
+      <template slot="options">
+        <div style="color:#d7d7d7;font-size:14px">共计{{list.total ? list.total : '0'}}条结算记录</div>
+      </template>
+    </table-lists>
+  </div>
+</template>
+<script>
+export default {
+    methods: {
+        load (val) {
+            this.loading = val
+        }
+    },
+    data () {
+        return {
+            loading: false,
+            filter: {
+                
+            },
+            sear: {
+                search: ''
+            },
+            columns: [
+                {
+                    title: '模板名称',
+                    key: 'title',
+                    align: 'center',
+                    render: (h, {row}) => {
+                        return h('span', row.title == '' || row.title == null ? '-' : row.title)
+                    }
+                },
+                {
+                    title: '模板ID',
+                    key: 'templateId',
+                    align: 'center',
+                    render: (h, {row}) => {
+                        return h('span', row.templateId == '' || row.templateId == null ? '-' : row.templateId)
+                    }
+                },
+                {
+                    title: '操作',
+                    slot: 'op',
+                    align: 'center'
+                }
+            ],
+            list: []
+        }
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.info-list {
+    h1 {
+        font-size:24px;
+        color:#3f4047;
+        padding: 10px 0 20px 10px;
+    }
+    .ser-ipt {
+        width: 162px;
+    }
+}
+</style>

Някои файлове не бяха показани, защото твърде много файлове са промени