Browse Source

添加小程序订阅消息后台管理

master
xuwenbo 4 years ago
parent
commit
6f212bbd42
  1. 4
      src/views/wechat/template/form.vue
  2. 8
      src/views/wechat/template/index.vue

4
src/views/wechat/template/form.vue

@ -1,6 +1,10 @@
<template> <template>
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增' : '编辑'" width="500px"> <el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增' : '编辑'" width="500px">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="状态">
<el-radio v-model="form.type" :label="'template'">模板消息</el-radio>
<el-radio v-model="form.type" :label="'subscribe'">订阅消息</el-radio>
</el-form-item>
<el-form-item label="模板编号"> <el-form-item label="模板编号">
<el-input v-model="form.tempkey" style="width: 370px;" /> <el-input v-model="form.tempkey" style="width: 370px;" />
</el-form-item> </el-form-item>

8
src/views/wechat/template/index.vue

@ -18,6 +18,14 @@
<eForm ref="form" :is-add="isAdd" /> <eForm ref="form" :is-add="isAdd" />
<!--表格渲染--> <!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;"> <el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<el-table-column prop="status" label="消息类型">
<template slot-scope="scope">
<div>
<el-tag v-if="scope.row.type == 'template'" :type="''">模板消息</el-tag>
<el-tag v-else :type=" 'info' ">订阅消息</el-tag>
</div>
</template>
</el-table-column>
<el-table-column prop="id" label="模板id" /> <el-table-column prop="id" label="模板id" />
<el-table-column prop="tempkey" label="模板编号" /> <el-table-column prop="tempkey" label="模板编号" />
<el-table-column prop="name" label="模板名" /> <el-table-column prop="name" label="模板名" />

Loading…
Cancel
Save