Browse Source

文章分类模块

xiaoming_global 5 years ago
parent
commit
ab475f0819

+ 26 - 2
src/api/act/submitinfo.js View File

1
 import request from '@/utils/request'
1
 import request from '@/utils/request'
2
 
2
 
3
 export function submitForm (params){
3
 export function submitForm (params){
4
-    console.log("文章列表",params)
4
+    //console.log("文章列表",params)
5
     return request({
5
     return request({
6
         url: '/api/acticle/createacticle',
6
         url: '/api/acticle/createacticle',
7
         method: 'Get',
7
         method: 'Get',
19
 }
19
 }
20
 
20
 
21
 export function GetAllArticles(params){
21
 export function GetAllArticles(params){
22
-     console.log("文章列表")
23
      return request({
22
      return request({
24
          url:'/api/acticle/getAllArticles',
23
          url:'/api/acticle/getAllArticles',
25
          method:'Get',
24
          method:'Get',
26
          params:params
25
          params:params
27
      })
26
      })
27
+}
28
+
29
+export function addCategory(data){
30
+    return request({
31
+        url:'/api/article/addCategory',
32
+        method:'Post',
33
+        data:data
34
+    })
35
+}
36
+
37
+export function GetCategorys(params){
38
+      console.log("params",params)
39
+     return request({
40
+         url:'/api/acticle/getCategorys',
41
+         method:'Get',
42
+         params:params
43
+     })
44
+}
45
+
46
+export function EditArticleCategory(MenuId,data){
47
+    return request({
48
+        url:'/api/acticle/edit?MenuId='+MenuId,
49
+        method:'put',
50
+        data,data
51
+    })
28
 }
52
 }

+ 1 - 0
src/api/member/member.js View File

9
 }
9
 }
10
 
10
 
11
 export function CreateMember(data) {
11
 export function CreateMember(data) {
12
+  console.log("data是神",data)
12
   return request({
13
   return request({
13
     url: '/api/member/create',
14
     url: '/api/member/create',
14
     method: 'post',
15
     method: 'post',

+ 78 - 16
src/scrm_pages/article/acticleCategory.vue View File

2
     <div class="main-contain">
2
     <div class="main-contain">
3
       <div class="position">
3
       <div class="position">
4
         <bread-crumb :crumbs='crumbs'></bread-crumb>
4
         <bread-crumb :crumbs='crumbs'></bread-crumb>
5
-        <el-button  style="float:right;" type="primary" size="small" icon="el-icon-circle-plus-outline">添加分类</el-button>
5
+        <el-button  style="float:right;" type="primary" size="small" icon="el-icon-circle-plus-outline" @click="openCreate()">添加分类</el-button>
6
       </div>
6
       </div>
7
       <div class="app-container">
7
       <div class="app-container">
8
         <div class="filter-container" style="margin-top: 10px;margin-left: 5px">
8
         <div class="filter-container" style="margin-top: 10px;margin-left: 5px">
9
-          <el-checkbox style="width: 30px" v-model="checked" @change="changeAllSelected">全选</el-checkbox>
10
-          <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
9
+          <el-checkbox style="width: 30px">全选</el-checkbox>
10
+          <el-button size="small" icon="el-icon-delete">批量删除</el-button>
11
 
11
 
12
         </div>
12
         </div>
13
 
13
 
14
         <el-row :gutter="12" style="margin-top: 10px">
14
         <el-row :gutter="12" style="margin-top: 10px">
15
           <el-table
15
           <el-table
16
-            :data="cancelStockDate"
17
-            :class="signAndWeighBoxPatients"
18
             border
16
             border
19
             highlight-current-row
17
             highlight-current-row
20
             ref="multipleTable"
18
             ref="multipleTable"
21
-            @selection-change="select"
22
             :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
19
             :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
20
+            :data="articsData"
23
           >
21
           >
24
             <el-table-column
22
             <el-table-column
25
               type="selection"
23
               type="selection"
28
 
26
 
29
             <el-table-column label="分类名称" align="center">
27
             <el-table-column label="分类名称" align="center">
30
               <template slot-scope="scope">
28
               <template slot-scope="scope">
31
-                123
29
+                {{scope.row.Name}}
32
               </template>
30
               </template>
33
             </el-table-column>
31
             </el-table-column>
34
 
32
 
35
             <el-table-column label="所属文章数量" align="center">
33
             <el-table-column label="所属文章数量" align="center">
36
               <template slot-scope="scope">
34
               <template slot-scope="scope">
37
-                456
35
+                {{scope.row.num}}
38
               </template>
36
               </template>
39
             </el-table-column>
37
             </el-table-column>
40
 
38
 
41
             <el-table-column label="分类排序" align="center">
39
             <el-table-column label="分类排序" align="center">
42
               <template slot-scope="scope">
40
               <template slot-scope="scope">
43
-                789
41
+                {{scope.row.Order}}
44
               </template>
42
               </template>
45
             </el-table-column>
43
             </el-table-column>
46
 
44
 
52
                     size="mini"
50
                     size="mini"
53
                     type="primary"
51
                     type="primary"
54
                     icon="el-icon-edit-outline"
52
                     icon="el-icon-edit-outline"
55
-                    @click="handleEdit(scope.$index, scope.row)">
53
+                    @click="openEdit(scope.row,scope.$index)">
56
                   </el-button>
54
                   </el-button>
57
                 </el-tooltip>
55
                 </el-tooltip>
58
                 <el-tooltip class="item" effect="dark" content="删除" placement="top">
56
                 <el-tooltip class="item" effect="dark" content="删除" placement="top">
69
 
67
 
70
           </el-table>
68
           </el-table>
71
 
69
 
72
-          <el-pagination
70
+         <el-pagination
73
             @size-change="handleSizeChange"
71
             @size-change="handleSizeChange"
74
             @current-change="handleCurrentChange"
72
             @current-change="handleCurrentChange"
75
-            :page-sizes="[7]"
76
-            :page-size="7"
73
+            :page-sizes="[10,20,50,100]"
74
+            :page-size="10"
77
             background
75
             background
78
-            style="margin-top:20px;float: right"
76
+            style="margin-top:20px;"
77
+            align="right"
79
             layout="total, sizes, prev, pager, next, jumper"
78
             layout="total, sizes, prev, pager, next, jumper"
80
             :total="total">
79
             :total="total">
81
           </el-pagination>
80
           </el-pagination>
82
-
81
+           <!-- 添加分类 -->
82
+           <create-article-form ref="createArticleForm" :articsData="articsData"></create-article-form>
83
+           <!-- 编辑分类 -->
84
+           <edit-article-form ref="editArticleForm" :artilceIndex="artilceIndex" :form="articData" :articsData="articsData" ></edit-article-form>
85
+         
83
         </el-row>
86
         </el-row>
84
       </div>
87
       </div>
85
     </div>
88
     </div>
87
 
90
 
88
 <script>
91
 <script>
89
   import BreadCrumb from '../components/bread-crumb'
92
   import BreadCrumb from '../components/bread-crumb'
93
+  import CreateArticleForm from "./components/CreateArticleForm";
94
+  import EditArticleForm from "./components/EditArticleForm";
95
+  import { GetCategorys } from '@/api/act/submitinfo'
90
   export default {
96
   export default {
91
     name: 'acticleCategory',
97
     name: 'acticleCategory',
92
     components:{
98
     components:{
93
-      BreadCrumb
99
+      BreadCrumb,
100
+      CreateArticleForm,
101
+      EditArticleForm,
94
     },
102
     },
95
     data(){
103
     data(){
96
       return{
104
       return{
98
           { path: false, name: '文章管理' },
106
           { path: false, name: '文章管理' },
99
           { path: '/articles/acticleCategory', name: '发布文章' }
107
           { path: '/articles/acticleCategory', name: '发布文章' }
100
         ],
108
         ],
109
+        articsData:[],
110
+        articData:{
111
+          Name:'',
112
+          Summary:'',
113
+          Order:'',
114
+          MenuId:0,
115
+        },
116
+        total:0,
117
+        listQuery:{
118
+          page:1,
119
+          limit:10,
120
+          name:'',
121
+          content:'',
122
+          sort:'',
123
+        },
124
+         artilceIndex:-1,
101
       }
125
       }
102
     },
126
     },
127
+
128
+    methods:{
129
+      openCreate(){
130
+        this.$refs.createArticleForm.open();
131
+      },
132
+      GetCategorys(){
133
+        GetCategorys(this.listQuery).then(response=>{
134
+             console.log(response.data.state)
135
+             if(response.data.state === 1){
136
+               this.articsData = response.data.data.category 
137
+               console.log(this.articsData)
138
+               this.total = response.data.data.total
139
+             }
140
+        })
141
+      },
142
+       handleSizeChange(limit) {
143
+            this.listQuery.limit = limit;
144
+            this.GetCategorys();
145
+        },
146
+        handleCurrentChange(page) {
147
+            this.listQuery.page = page;
148
+            this.GetCategorys();
149
+        },
150
+        openEdit(row,index){          
151
+            for(const key in this.articData){
152
+               if(key in row){
153
+                 this.articData[key] = row[key]
154
+               }
155
+            }
156
+            console.log("是什么",this.articData) 
157
+            console.log("heh",this.articsData)  
158
+             this.artilceIndex = index 
159
+             this.$refs.editArticleForm.open();        
160
+        }
161
+    },
162
+     created(){
163
+         this.GetCategorys()
164
+       }
103
   }
165
   }
104
 </script>
166
 </script>
105
 
167
 

+ 33 - 17
src/scrm_pages/article/articleList.vue View File

9
             <el-row :gutter="24">
9
             <el-row :gutter="24">
10
               <el-col :span="8">
10
               <el-col :span="8">
11
                   <el-input style="width: 300px" v-model="listQuery.search"  placeholder="请输入您需要搜索的内容"></el-input>
11
                   <el-input style="width: 300px" v-model="listQuery.search"  placeholder="请输入您需要搜索的内容"></el-input>
12
-                  <el-button type="primary"  icon="el-icon-search">搜索</el-button>
12
+                  <el-button type="primary"  icon="el-icon-search" @click="changeKey">搜索</el-button>
13
               </el-col>
13
               </el-col>
14
             </el-row>
14
             </el-row>
15
           </div>
15
           </div>
18
              <div class="time">
18
              <div class="time">
19
                 <ul class="">
19
                 <ul class="">
20
                   <li :class="0==schedulType?'active':''" @click="selectsign(0)">全部</li>
20
                   <li :class="0==schedulType?'active':''" @click="selectsign(0)">全部</li>
21
-                  <li :class="item.MenuId==schedulType?'active':''"  v-for="item in schedulArr" :key="item.MenuId">{{item.Name}}</li>
21
+                  <li :class="item.MenuId==schedulType?'active':''"  v-for="item in schedulArr" :key="item.MenuId" @click="selectsign(item.MenuId)">{{item.Name}}</li>
22
                 </ul>
22
                 </ul>
23
              </div>
23
              </div>
24
           </div>
24
           </div>
37
           </div>
37
           </div>
38
           <el-table ref="multipleTable" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}" :data="ArticleData" border fit highlight-current-row  style="width: 100%;margin-top: 10px;">
38
           <el-table ref="multipleTable" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}" :data="ArticleData" border fit highlight-current-row  style="width: 100%;margin-top: 10px;">
39
               <el-table-column
39
               <el-table-column
40
+                align="center" 
40
                 type="selection"
41
                 type="selection"
41
                 width="55">
42
                 width="55">
42
               </el-table-column> 
43
               </el-table-column> 
43
              <el-table-column label="文章图片" align="center">
44
              <el-table-column label="文章图片" align="center">
44
                <template slot-scope="scope">
45
                <template slot-scope="scope">
45
-
46
+                  <img :src="memberAvatar(scope.row)" alt="" srcset="" style="width:100px;height:100px;" >
46
                </template>
47
                </template>
47
              </el-table-column>
48
              </el-table-column>
48
             <el-table-column label="文章标题" align="center">
49
             <el-table-column label="文章标题" align="center">
49
               <template slot-scope="scope">
50
               <template slot-scope="scope">
50
-
51
+                  {{scope.row.title}}
51
               </template>
52
               </template>
52
             </el-table-column>
53
             </el-table-column>
53
             <el-table-column label="阅读量" align="center">
54
             <el-table-column label="阅读量" align="center">
54
               <template slot-scope="scope">
55
               <template slot-scope="scope">
55
-
56
+                 {{scope.row.real_read_num}}
56
               </template>
57
               </template>
57
             </el-table-column>
58
             </el-table-column>
58
             <el-table-column label="评论数" align="center">
59
             <el-table-column label="评论数" align="center">
59
               <template slot-scope="scope">
60
               <template slot-scope="scope">
60
-
61
+                  {{scope.row.comment_num}}
61
               </template>
62
               </template>
62
             </el-table-column>
63
             </el-table-column>
63
             <el-table-column label="点赞数" align="center">
64
             <el-table-column label="点赞数" align="center">
64
               <template slot-scope="scope">
65
               <template slot-scope="scope">
65
-
66
+                  {{scope.row.num}}
66
               </template>
67
               </template>
67
             </el-table-column>
68
             </el-table-column>
68
             <el-table-column label="操作" align="center">
69
             <el-table-column label="操作" align="center">
75
                     @click="handleEdit(scope.$index, scope.row)">
76
                     @click="handleEdit(scope.$index, scope.row)">
76
                   </el-button>
77
                   </el-button>
77
                 </el-tooltip>
78
                 </el-tooltip>
79
+                 <el-tooltip class="item" effect="dark" content="删除" placement="top">
80
+                  <el-button size="mini" type="danger" icon="el-icon-delete" @click="openDelete(scope.row, scope.$index)" ></el-button>
81
+                </el-tooltip>
78
               </template>
82
               </template>
79
             </el-table-column>
83
             </el-table-column>
80
           </el-table>
84
           </el-table>
81
           <el-pagination
85
           <el-pagination
82
             @size-change="handleSizeChange"
86
             @size-change="handleSizeChange"
83
             @current-change="handleCurrentChange"
87
             @current-change="handleCurrentChange"
84
-            :page-sizes="[7]"
85
-            :page-size="7"
88
+            :page-sizes="[10,20,50,100]"
89
+            :page-size="10"
86
             background
90
             background
87
             style="margin-top:20px;float: right"
91
             style="margin-top:20px;float: right"
88
             layout="total, sizes, prev, pager, next, jumper"
92
             layout="total, sizes, prev, pager, next, jumper"
109
         time: '',
113
         time: '',
110
         active: true,
114
         active: true,
111
         schedulType: 0,
115
         schedulType: 0,
112
-        schedulArr:0,
116
+        schedulArr:[],
113
         systemType: 0,
117
         systemType: 0,
114
         systemArr: [
118
         systemArr: [
115
           { value: 0, label: "全部" },
119
           { value: 0, label: "全部" },
129
     },
133
     },
130
     methods:{
134
     methods:{
131
          GetAllArticles(){
135
          GetAllArticles(){
132
-              GetAllArticles(this.listQuery).then(response =>{
133
-                     if(response.data.status === 1){
134
-                       this.ArticleData = response.data.data.articles
135
-                        console.log("文章列表",this.ArticleData)
136
+              GetAllArticles(this.listQuery).then(response=>{
137
+                     if(response.data.state === 1){
138
+                        this.ArticleData = response.data.data.articles  
136
                         this.total = response.data.data.total
139
                         this.total = response.data.data.total
140
+                        console.log("文章列表",this.ArticleData)
141
+                        console.log("total",this.total)                                                   
142
+                     }
143
+                     if(typeof(response.data.data.category != 'undefined')){
144
+                       this.schedulArr = response.data.data.category
145
+                        console.log("分类列表",response.data.data.category)
146
+                       
137
                      }
147
                      }
138
               })
148
               })
139
          },
149
          },
140
-         selectsign(id){
141
-            this.listQuery.classid = id;
142
-            this.schedulArr = id;
150
+         selectsign(MenuId){
151
+            this.listQuery.classid = MenuId;
152
+            this.schedulArr = MenuId;
143
             this.GetAllArticles();
153
             this.GetAllArticles();
144
          },
154
          },
145
          selectStatus(id){
155
          selectStatus(id){
154
          handleCurrentChange(page) {
164
          handleCurrentChange(page) {
155
             this.listQuery.page = page;
165
             this.listQuery.page = page;
156
             this.GetAllAritcles();
166
             this.GetAllAritcles();
167
+        },
168
+        changeKey(){
169
+           this.GetAllArticles();
170
+        },
171
+        memberAvatar(row){
172
+             return row.imgs
157
         }
173
         }
158
     },
174
     },
159
     created(){
175
     created(){

+ 101 - 0
src/scrm_pages/article/components/CreateArticleForm.vue View File

1
+<template>
2
+
3
+    <div id="create-article-form-box">
4
+      <el-dialog
5
+        title="添加分类"
6
+        :visible.sync="centerDialogVisible"
7
+        width="1000px"
8
+        center>
9
+        <el-form label-width="90px" class="clearfix" :model="form" ref="acticleform" :rules="rules">
10
+          <el-row :span=20>
11
+            <el-form-item label="分类名称:" required prop="name">
12
+              <el-input v-model="form.name">
13
+
14
+              </el-input>
15
+            </el-form-item>
16
+          </el-row>
17
+          <el-row :span=20>
18
+            <el-form-item label="分类描述:" required prop="content">
19
+              <keep-alive>
20
+                <neditor ref="neditor"
21
+                         id="editor"
22
+                         v-bind:r_content="form.content">
23
+                </neditor>
24
+              </keep-alive>
25
+            </el-form-item>
26
+          </el-row>
27
+          <el-row :span=20>
28
+            <el-form-item label="排序" required prop="sort">
29
+              <el-input v-model="form.sort">
30
+
31
+              </el-input>
32
+            </el-form-item>
33
+          </el-row>
34
+        </el-form>
35
+        <span slot="footer" class="dialog-footer">
36
+               <el-button type="primary" @click="addCategory('acticleform');">添加</el-button>
37
+              <el-button  @click="centerDialogVisible = false">返回列表</el-button>
38
+             </span>
39
+      </el-dialog>
40
+    </div>
41
+
42
+</template>
43
+
44
+<script>
45
+    import Neditor from '@/components/Neditor'
46
+    import { addCategory } from '@/api/act/submitinfo'
47
+    export default {
48
+        name: "CreateArticleForm",
49
+         components:{
50
+           Neditor,
51
+        },
52
+            data(){
53
+                return {
54
+                    centerDialogVisible:false,
55
+                    rules: {
56
+                    name: [{required: true, message: "请填写分类名称",},],
57
+                    content: [{required: true,message:"请填写分类描述"}],
58
+                    sort: [{required: true,message:"请填写排序"}]
59
+                },
60
+                 form:{
61
+                   name:"",
62
+                   content:"",
63
+                   sort:"",
64
+                },
65
+                acticleform:[],
66
+             }
67
+          },   
68
+           methods:{
69
+                 open:function(){
70
+                    this.centerDialogVisible = true;
71
+                  },   
72
+                 resetForm(formName) {
73
+                     if (typeof(this.$refs[formName]) !='undefined') {
74
+                     this.$refs[formName].resetFields();
75
+                   }
76
+                  },
77
+               addCategory(formName){
78
+                  this.form.content = this.$refs.neditor.content
79
+                   this.$refs[formName].validate((valid)=>{
80
+                       if(valid){
81
+                            addCategory(this.form).then(response =>{
82
+                                  console.log(response.data.state)
83
+                                  if(response.data.state==1){
84
+                                    var category = response.data.data.category
85
+                                    this.centerDialogVisible=false
86
+                                    this.resetForm("acticleform");
87
+                                    this.$message.success("添加分类成功");
88
+                                    console.log("coo",category)
89
+                                  }
90
+                            });
91
+                       }   
92
+                   });         
93
+          },  
94
+       }
95
+    }
96
+</script>
97
+
98
+<style scoped>
99
+
100
+</style>
101
+   

+ 109 - 0
src/scrm_pages/article/components/EditArticleForm.vue View File

1
+<template>
2
+    <div id="edit-article-form-box">
3
+        <el-dialog
4
+        title="编辑分类"
5
+        :visible.sync="centerDialogVisible"
6
+        width="1000px"
7
+        center>
8
+        <el-form label-width="90px" class="clearfix" :model="form" ref="acticleform" :rules="rules">
9
+          <el-row :span=20>
10
+            <el-form-item label="分类名称:" required prop="Name">
11
+              <el-input v-model="form.Name"></el-input>
12
+            </el-form-item>
13
+          </el-row>
14
+          <el-row :span=20>
15
+            <el-form-item label="分类描述:" required prop="Summary">
16
+              <keep-alive>
17
+                <neditor ref="neditor"
18
+                         id="editor"
19
+                         v-bind:r_content="form.Summary">
20
+                </neditor>
21
+              </keep-alive>
22
+            </el-form-item>
23
+          </el-row>
24
+          <el-row :span=20>
25
+            <el-form-item label="排序" required prop="Order">
26
+              <el-input v-model="form.Order"></el-input>
27
+            </el-form-item>
28
+          </el-row>
29
+        </el-form>
30
+        <span slot="footer" class="dialog-footer">
31
+               <el-button type="primary" @click="submitForm('acticleform')">保存</el-button>
32
+              <el-button  @click="centerDialogVisible = false">取消</el-button>
33
+             </span>
34
+      </el-dialog>   
35
+    </div>
36
+</template>
37
+<script>
38
+import Neditor from '@/components/Neditor'
39
+ import { EditArticleCategory } from '@/api/act/submitinfo'
40
+export default {
41
+    name: "EditArticleForm",
42
+     components:{
43
+        Neditor,
44
+      },
45
+      props:{
46
+        form:{
47
+           Name:'',
48
+          Summary:'',
49
+          Order:'',
50
+          MenuId:0,
51
+        },
52
+      artilceIndex:{
53
+          type:Number,
54
+          default:-1,
55
+        },
56
+      articsData:{
57
+          type: Array,
58
+          default: function () {
59
+          return [];
60
+        }
61
+      }
62
+    },
63
+     data(){
64
+          return {
65
+          centerDialogVisible:false,
66
+           rules: {
67
+             Name: [{required: true, message: "请填写分类名称",},],
68
+             Summary: [{required: true,message:"请填写分类描述"}],
69
+             Order: [{required: true,message:"请填写排序"}]
70
+              },
71
+             }
72
+          }, 
73
+          methods:{
74
+                open:function(){
75
+                  this.centerDialogVisible = true;
76
+                },
77
+                resetForm(formName) {
78
+                     if (typeof(this.$refs[formName]) !='undefined') {
79
+                     this.$refs[formName].resetFields();
80
+                   }
81
+                },  
82
+              submitForm(forname){ 
83
+                alert("aaa")
84
+                this.$refs[forname].validate((valid)=>{
85
+                   if(valid){
86
+                      EditArticleCategory(this.form.MenuId,this.form).then(response=>{
87
+                            console.log("id是谁",this.form.MenuId)
88
+                            console.log(this.form)
89
+                           var res =  response.data;
90
+                           console.log(res.state)
91
+                           if(res.state ===1 ){
92
+                              var categorys = res.data.categorys; 
93
+                              console.log("categorys是什么",categorys)
94
+                              this.articsData[this.artilceIndex].name = categorys.Name;
95
+                              this.articsData[this.artilceIndex].content = categorys.Summary;
96
+                              this.articsData[this.artilceIndex].sort = categorys.Order;
97
+                              this.centerDialogVisible = false;
98
+                              this.$message.success("编辑文章分类成功");
99
+                           }
100
+                      })
101
+                   }
102
+                })
103
+              },  
104
+          }
105
+}
106
+</script>
107
+<style scoped>
108
+
109
+</style>

+ 5 - 4
src/scrm_pages/article/createArticle.vue View File

94
           <el-row :span="24">
94
           <el-row :span="24">
95
             <el-col :span="24">
95
             <el-col :span="24">
96
                 <el-form-item>
96
                 <el-form-item>
97
-                      <el-button size="small" type="primary" style="width: 100px"  @click="submitForm;centerDialogVisible = true" :disabled="formsubmit">发布</el-button>
97
+                      <el-button size="small" type="primary" style="width: 100px"  @click="submitForm();centerDialogVisible = true">发布</el-button>
98
                       <el-button size="small" style="width: 100px">预览</el-button>
98
                       <el-button size="small" style="width: 100px">预览</el-button>
99
                       <el-button size="small" style="width: 100px">保存草稿</el-button>
99
                       <el-button size="small" style="width: 100px">保存草稿</el-button>
100
                   <el-button size="small" style="width: 100px">取消</el-button>
100
                   <el-button size="small" style="width: 100px">取消</el-button>
433
          console.log("所属分类",this.form.act_type)
433
          console.log("所属分类",this.form.act_type)
434
       },
434
       },
435
       submitForm(){
435
       submitForm(){
436
+        console.log("提交文章")
436
         var params  = new Object()
437
         var params  = new Object()
437
         params.act_name = this.form.act_name
438
         params.act_name = this.form.act_name
438
         params.act_content = this.$refs.neditor.content
439
         params.act_content = this.$refs.neditor.content
451
       },
452
       },
452
       getArticleType(){
453
       getArticleType(){
453
         getArticleType().then(response =>{
454
         getArticleType().then(response =>{
454
-            console.log("好嗨我")
455
+            //console.log("好嗨我")
455
             if(response.data.state === 1){
456
             if(response.data.state === 1){
456
             var category = response.data.data.category
457
             var category = response.data.data.category
457
             this.options = response.data.data.category
458
             this.options = response.data.data.category
458
-             console.log("文章内容:",category)
459
-             console.log("文章",this.options)
459
+            // console.log("文章内容:",category)
460
+            // console.log("文章",this.options)
460
             }
461
             }
461
         })
462
         })
462
       },
463
       },

+ 2 - 2
src/scrm_pages/members/members.vue View File

218
                 console.log("res是谁?",res)
218
                 console.log("res是谁?",res)
219
                 if(res.state == 1) {
219
                 if(res.state == 1) {
220
                     this.membersData = res.data.members;
220
                     this.membersData = res.data.members;
221
+                    console.log("会员管理的数据",this.membersData)
221
                     this.total = res.data.total;
222
                     this.total = res.data.total;
222
                     if(typeof(res.data.cards) != 'undefined') {
223
                     if(typeof(res.data.cards) != 'undefined') {
223
                         this.levelCards = res.data.cards;
224
                         this.levelCards = res.data.cards;
367
                   this.memberData.ill_date = uParseTime(row.ill_date, "{y}-{m}-{d}");
368
                   this.memberData.ill_date = uParseTime(row.ill_date, "{y}-{m}-{d}");
368
               } else if (key in row) {
369
               } else if (key in row) {
369
                   this.memberData[key] = row[key];                  
370
                   this.memberData[key] = row[key];                  
370
-              }
371
+              }            
371
           }
372
           }
372
-          
373
           // this.memberData = row;
373
           // this.memberData = row;
374
           this.memberIndex = index;
374
           this.memberIndex = index;
375
           this.$refs.editMemberForm.open();
375
           this.$refs.editMemberForm.open();