lhl 1 年之前
父節點
當前提交
569d03b8ae

+ 9 - 1
src/api/system/adver.js

@@ -230,4 +230,12 @@ export function  SystemDelArt(data = {}) {
 //     method: 'get',
 // 	params: data
 //   });
-// }
+// }
+
+export function getCate(data = {}) {
+	return request({
+	  url: '/systemv1/index/getCateList',
+	  method: 'post',
+	  data : data
+	});
+}

+ 7 - 0
src/api/system/sys.js

@@ -76,6 +76,13 @@ export function  SystemBankDel(data) {
   });
 }
 
+export function upLoad(data) {
+	return request({
+	  url: '/systemv1/upload/index',
+	  method: 'post',
+	  data : data
+	});
+}
 
 
 

+ 7 - 0
src/api/system/user.js

@@ -161,6 +161,13 @@ export function  SystemWorkerSave(data = {}) {
     });
 }
 
+export function setAuthShow(data = {}) {
+	return request({
+	    url: '/systemv1/member/setAuthShow',
+	    method: 'post',
+	    data : data
+	});
+}
 
 
 

+ 39 - 81
src/components/system/article/detail.vue

@@ -3,33 +3,21 @@
 		<i-page-header :title="pageTitle"></i-page-header>
 		<Card :bordered="false" dis-hover class="ivu-mt">
 			<el-form ref="formData" :model="form" label-width="120px">
-				<el-tabs v-model="form">
-					<el-form-item label="文章标题" prop="title" :rules="[{ required: true, message: '请输入文章标题'}]">
-						<el-input placeholder="请输入文章标题" autocomplete="off" v-model="form.title"></el-input>
-					</el-form-item>
-					<el-form-item label="文章内容" prop="content" :rules="[{ required: true, message: '请输入文章内容'}]">
-						<!-- <vue-editor v-model="form.content" /> -->
-						<Toolbar style="border: 1px solid #ccc" :editor="editor" :defaultConfig="toolbarConfig" />
-						<!-- 编辑器 -->
-						<Editor style="height: 400px; overflow-y: hidden;border: 1px solid #ccc;"
-							:defaultConfig="editorConfig" v-model="form.content" @onChange="onChange"
-							@onCreated="onCreated" />
-					</el-form-item>
-
-					<!-- <el-tab-pane label="文章详情" name="tab_base" style="min-height:600px"> -->
-
-					<!-- <vue-editor v-model="form.content" id='editorsay' style="height:500px;"
-							:editorToolbar="customToolbar" useCustomImageHandler
-							@image-added="handleImageAdded"></vue-editor> -->
-					<!-- <vue-editor v-model="content" useCustomImageHandler @image-added="handleImageAdded"/> -->
-
-
-					<!-- </el-tab-pane> -->
-				</el-tabs>
+
+				<el-form-item label="文章标题" prop="title" :rules="[{ required: true, message: '请输入文章标题'}]">
+					<el-input placeholder="请输入文章标题" autocomplete="off" v-model="form.title"></el-input>
+				</el-form-item>
+				<el-form-item label="文章内容" prop="content" :rules="[{ required: true, message: '请输入文章内容'}]">
+					<Toolbar style="border: 1px solid #ccc" :editor="editor" :defaultConfig="toolbarConfig" />
+					<!-- 编辑器 -->
+					<Editor style="height: 400px; overflow-y: hidden;border: 1px solid #ccc;"
+						:defaultConfig="editorConfig" v-model="form.content" @onChange="onChange"
+						@onCreated="onCreated" />
+				</el-form-item>
+
 
 				<el-form-item>
 					<el-button type="primary" @click="tapOk(1)">{{form.id ? '修改提交': '保存发布'}}</el-button>
-					<!-- <el-button type="danger" @click="tapQr(-1)">删除</el-button> -->
 				</el-form-item>
 			</el-form>
 
@@ -38,20 +26,23 @@
 
 </template>
 <script>
+	import {
+		DomEditor
+	} from '@wangeditor/editor'
 	import {
 		Editor,
 		Toolbar
 	} from '@wangeditor/editor-for-vue'
 	import Setting from "@/setting";
 	import axios from 'axios'
-	import {
-		VueEditor
-	} from 'vue2-editor'
 	import IPageHeader from "../../../layouts/system/page-header/index";
 	import {
 		SystemInfoAuditItem,
 		SystemInfoAuditSub
 	} from "../../../api/system/audit";
+	import {
+		upLoad
+	} from '../../../api/system/sys'
 	import {
 		SystemAddArt,
 		updateArticle,
@@ -60,12 +51,14 @@
 		getArtDetail
 	} from "../../../api/system/adver";
 	import UiLoading from "../../../ui/loading/index";
+	import {
+		base64to2
+	} from '../../../utils/comm.js'
 	export default {
 		name: "SystemInfoAuditItem",
 		components: {
 			UiLoading,
 			IPageHeader,
-			VueEditor,
 			Editor,
 			Toolbar
 		},
@@ -76,7 +69,7 @@
 
 				toolbarConfig: {
 					// toolbarKeys: [ /* 显示哪些菜单,如何排序、分组 */ ],
-					// excludeKeys: [ /* 隐藏哪些菜单 */ ],
+					excludeKeys: ['group-video', 'emotion', 'fullScreen'],
 				},
 				editorConfig: {
 					placeholder: "请输入内容...",
@@ -95,27 +88,6 @@
 					title: '',
 					id: ''
 				},
-				customToolbar: [
-
-					[{
-						align: ['', 'center', 'right', 'justify']
-					}],
-					[{
-						header: [false, 1, 2, 3, 4, 5, 6]
-					}],
-					[{
-						list: "ordered"
-					}, {
-						list: "bullet"
-					}],
-					[{
-						indent: "-1"
-					}, {
-						indent: "+1"
-					}],
-					["image"],
-				],
-
 				pageTitle: '文章详情',
 				upHeaders: {},
 				formActiveName: "tab_base",
@@ -135,13 +107,17 @@
 				this.form.id = parseInt(this.$route.query.id);
 			}
 			this.initView();
+
 		},
 		mounted() {
 
 		},
 		methods: {
+
 			onCreated(editor) {
 				this.editor = Object.seal(editor); // 【注意】一定要用 Object.seal() 否则会报错
+				console.log(this.editor.getMenuConfig());
+
 			},
 			onChange(editor) {
 				console.log("onChange", editor.getHtml()); // onChange 时获取编辑器最新内容
@@ -158,27 +134,6 @@
 
 				console.log(editor.getHtml()); // 执行 editor API
 			},
-			handleImageAdded: function(file, Editor, cursorLocation, resetUploader) {
-				var formData = new FormData();
-				formData.append("image", file);
-				const token = this.$utils.util.cookies.get('system_token');
-				axios({
-						url: 'https://api.myjie.cn/systemv1/upload/index',
-						method: "POST",
-						data: formData,
-						headers: {
-							'SYSTEM-ACC-TOKEN': token,
-						}
-					})
-					.then(result => {
-						let url = result.data.url; // Get url from response
-						Editor.insertEmbed(cursorLocation, "image", url);
-						resetUploader();
-					})
-					.catch(err => {
-						console.log(err);
-					});
-			},
 			initView: function() {
 
 				if (this.form.id) {
@@ -205,9 +160,11 @@
 				// 	loading.close();
 				// 	this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
 				// });
-				
-				try{
-					getArtDetail({id:post.id }).then(res => {
+
+				try {
+					getArtDetail({
+						id: post.id
+					}).then(res => {
 						console.log(res.data.list[0]);
 						let data = res.data.list[0]
 						this.form.title = data.title
@@ -216,13 +173,13 @@
 						loading.close();
 					}).catch(err => {
 						loading.close();
-						console.log(err,'sss');
+						console.log(err, 'sss');
 					});
-				}catch(e){
+				} catch (e) {
 					//TODO handle the exception
-					
+
 				}
-				
+
 
 			},
 			/**
@@ -236,7 +193,7 @@
 				// this.dialogVisible = true;
 				// console.log(this.content);
 				let that = this
-				if(this.form.id) {
+				if (this.form.id) {
 					updateArticle({
 						id: that.form.id,
 						title: that.form.title,
@@ -244,7 +201,7 @@
 					}).then(res => {
 						this.$Message.success("修改成功");
 					})
-				}else {
+				} else {
 					SystemAddArt({
 						title: that.form.title,
 						content: that.form.content
@@ -252,7 +209,7 @@
 						this.$Message.success("发布成功");
 					})
 				}
-				
+
 			},
 			tapQr: function(type) {
 				// this.form.id = this.data.id;
@@ -260,6 +217,7 @@
 				// this.form.mono = '';
 				// this.form.type = type;
 				// this.dialogVisible = true;
+				this.$router.push('/')
 			},
 			/**
 			 * !提交 !

+ 6 - 1
src/components/system/article/list.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <i-page-header class="product_tabs" title="广告栏目">
+    <i-page-header class="product_tabs" title="文章板块">
     </i-page-header>
     <Card :bordered="false" dis-hover class="ivu-mt">
 	  <div style="height: 30px;"></div>
@@ -109,6 +109,11 @@
                 adverPage   : [],
                 adverPageOne : {},
                 columns1: [
+					{
+					    title: 'id',
+					    key: 'id',
+					    minWidth: 50
+					},
                     {
                         title: '标题',
                         key: 'title',

+ 1 - 0
src/components/system/audit/typeAudit.vue

@@ -47,6 +47,7 @@
 							<img v-for="(item,index) in scope.row.service_audit_imgs" :key="index" v-lazy="item" :src="item" v-image-preview style="width: 60px;cursor: pointer;"/>
 						</template>
 					</el-table-column>
+					 <el-table-column prop="store_name" label="认证企业" width="200"></el-table-column>
 					<el-table-column prop="status" align="center" label="状态" width="100">
                         <template slot-scope="scope">
                             <div v-if="scope.row.status == 0">待审核</div>

+ 7 - 0
src/components/system/audit/typeAuditItem.vue

@@ -196,6 +196,13 @@
 				    </el-form-item>
 				  </Col>
 				</Row>
+				<Row :gutter="24">
+				  <Col span="12">
+				    <el-form-item label="认证企业">
+				      <el-input type="text"  :autosize="{ minRows: 6, maxRows: 30}" v-model="data.store_name" :readonly="true"></el-input>
+				    </el-form-item>
+				  </Col>
+				</Row>
       		</el-tab-pane>
       	</el-tabs>
 		

+ 591 - 0
src/components/system/eduction/addGrlists.vue

@@ -0,0 +1,591 @@
+<template>
+	<div>
+		<i-page-header :title="pageTitle"></i-page-header>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<el-form ref="formData" :model="form" label-width="120px">
+				<el-form-item label="讲师" prop="user" :rules="[{ required: true, message: '请输入课程标题'}]">
+					<el-select v-model="form.user" placeholder="请选择讲师" style="width: 100%;">
+						<el-option v-for="item in optionss" :key="item.value" :label="item.label" :value="item.value">
+						</el-option>
+					</el-select>
+				</el-form-item>
+				<el-form-item label="类型" prop="type1" :rules="[{ required: true, message: '请输入课程标题'}]">
+					<el-select v-model="form.type1" placeholder="请选择类型" style="width: 100%;">
+						<el-option v-for="item in optionss" :key="item.value" :label="item.label" :value="item.value">
+						</el-option>
+					</el-select>
+				</el-form-item>
+				<!-- type2 -->
+				<el-form-item label="分类" prop="type2" :rules="[{ required: true, message: '请选择分类'}]">
+					<el-cascader v-model="form.type2" :options="options" @change="handleChange"
+						:show-all-levels="false" style="width: 100%;"></el-cascader>
+				</el-form-item>
+				<el-form-item label="标题" prop="title" :rules="[{ required: true, message: '请输入标题'}]">
+					<el-input placeholder="请输入标题" autocomplete="off" v-model="form.title"></el-input>
+				</el-form-item>
+				<el-form-item label="封面图片" prop="indeximg" :rules="[{ required: true, message: '请上传封面图片'}]">
+					<ui-upload :upUrl="upUrl" :img="form.indeximg" fileName="封面图片" :headers="upHeaders"
+						:updata="{isz:0,code:'img'}" @onUpload="onUpload"></ui-upload>
+				</el-form-item>
+				<el-form-item label="组简介" prop="ins" :rules="[{ required: true, message: '请输入组简介'}]">
+					<el-input placeholder="请输入组简介" autocomplete="off" v-model="form.ins"></el-input>
+				</el-form-item>
+				<el-form-item>
+					<el-button type="primary" @click="tapOk(1)">{{form.id ? '修改提交': '保存发布'}}</el-button>
+				</el-form-item>
+			</el-form>
+		</Card>
+	</div>
+
+</template>
+<script>
+	import UiUpload from "@/ui/upload/index";
+	import {
+		DomEditor
+	} from '@wangeditor/editor'
+	import {
+		Editor,
+		Toolbar
+	} from '@wangeditor/editor-for-vue'
+	import Setting from "@/setting";
+	import axios from 'axios'
+	import IPageHeader from "../../../layouts/system/page-header/index";
+	import {
+		SystemInfoAuditItem,
+		SystemInfoAuditSub
+	} from "../../../api/system/audit";
+	import {
+		upLoad
+	} from '../../../api/system/sys'
+	import {
+		SystemAddArt,
+		updateArticle,
+		SystemArtDetail,
+		SystemGetArtList,
+		getArtDetail
+	} from "../../../api/system/adver";
+	import UiLoading from "../../../ui/loading/index";
+	import {
+		base64to2
+	} from '../../../utils/comm.js'
+	export default {
+		name: "SystemInfoAuditItem",
+		components: {
+			UiLoading,
+			IPageHeader,
+			Editor,
+			Toolbar,
+			UiUpload
+		},
+		computed: {},
+		data() {
+			return {
+				editor: null,
+
+				toolbarConfig: {
+					// toolbarKeys: [ /* 显示哪些菜单,如何排序、分组 */ ],
+					excludeKeys: ['group-video', 'emotion', 'fullScreen'],
+				},
+				editorConfig: {
+					placeholder: "请输入内容...",
+					// autoFocus: false,
+
+					// 所有的菜单配置,都要在 MENU_CONF 属性下
+					MENU_CONF: {
+						uploadImage: {
+							base64LimitSize: 1024 * 1024 * 10
+						},
+					},
+				},
+				content: '',
+				form: {
+					id: '',
+					indeximg: '',
+					title: '',
+					user: '',
+					type1: '',
+					type2: '',
+					ins: ''
+				},
+				pageTitle: '课程详情',
+				upHeaders: {},
+				formActiveName: "tab_base",
+				formData: {
+					id: ""
+				},
+				title: "",
+				dialogVisible: false,
+				upUrl: '',
+				optionss: [{
+					value: '选项1',
+					label: '黄金糕'
+				}, {
+					value: '选项2',
+					label: '双皮奶'
+				}, {
+					value: '选项3',
+					label: '蚵仔煎'
+				}, {
+					value: '选项4',
+					label: '龙须面'
+				}, {
+					value: '选项5',
+					label: '北京烤鸭'
+				}],
+				options: [{
+					value: 'zhinan',
+					label: '指南',
+					children: [{
+						value: 'shejiyuanze',
+						label: '设计原则'
+						
+					}, {
+						value: 'daohang',
+						label: '导航',
+						children: [{
+							value: 'cexiangdaohang',
+							label: '侧向导航'
+						}, {
+							value: 'dingbudaohang',
+							label: '顶部导航'
+						}]
+					}]
+				}, {
+					value: 'zujian',
+					label: '组件',
+					children: [{
+						value: 'basic',
+						label: 'Basic',
+						children: [{
+							value: 'layout',
+							label: 'Layout 布局'
+						}, {
+							value: 'color',
+							label: 'Color 色彩'
+						}, {
+							value: 'typography',
+							label: 'Typography 字体'
+						}, {
+							value: 'icon',
+							label: 'Icon 图标'
+						}, {
+							value: 'button',
+							label: 'Button 按钮'
+						}]
+					}, {
+						value: 'form',
+						label: 'Form',
+						children: [{
+							value: 'radio',
+							label: 'Radio 单选框'
+						}, {
+							value: 'checkbox',
+							label: 'Checkbox 多选框'
+						}, {
+							value: 'input',
+							label: 'Input 输入框'
+						}, {
+							value: 'input-number',
+							label: 'InputNumber 计数器'
+						}, {
+							value: 'select',
+							label: 'Select 选择器'
+						}, {
+							value: 'cascader',
+							label: 'Cascader 级联选择器'
+						}, {
+							value: 'switch',
+							label: 'Switch 开关'
+						}, {
+							value: 'slider',
+							label: 'Slider 滑块'
+						}, {
+							value: 'time-picker',
+							label: 'TimePicker 时间选择器'
+						}, {
+							value: 'date-picker',
+							label: 'DatePicker 日期选择器'
+						}, {
+							value: 'datetime-picker',
+							label: 'DateTimePicker 日期时间选择器'
+						}, {
+							value: 'upload',
+							label: 'Upload 上传'
+						}, {
+							value: 'rate',
+							label: 'Rate 评分'
+						}, {
+							value: 'form',
+							label: 'Form 表单'
+						}]
+					}, {
+						value: 'data',
+						label: 'Data',
+						children: [{
+							value: 'table',
+							label: 'Table 表格'
+						}, {
+							value: 'tag',
+							label: 'Tag 标签'
+						}, {
+							value: 'progress',
+							label: 'Progress 进度条'
+						}, {
+							value: 'tree',
+							label: 'Tree 树形控件'
+						}, {
+							value: 'pagination',
+							label: 'Pagination 分页'
+						}, {
+							value: 'badge',
+							label: 'Badge 标记'
+						}]
+					}, {
+						value: 'notice',
+						label: 'Notice',
+						children: [{
+							value: 'alert',
+							label: 'Alert 警告'
+						}, {
+							value: 'loading',
+							label: 'Loading 加载'
+						}, {
+							value: 'message',
+							label: 'Message 消息提示'
+						}, {
+							value: 'message-box',
+							label: 'MessageBox 弹框'
+						}, {
+							value: 'notification',
+							label: 'Notification 通知'
+						}]
+					}, {
+						value: 'navigation',
+						label: 'Navigation',
+						children: [{
+							value: 'menu',
+							label: 'NavMenu 导航菜单'
+						}, {
+							value: 'tabs',
+							label: 'Tabs 标签页'
+						}, {
+							value: 'breadcrumb',
+							label: 'Breadcrumb 面包屑'
+						}, {
+							value: 'dropdown',
+							label: 'Dropdown 下拉菜单'
+						}, {
+							value: 'steps',
+							label: 'Steps 步骤条'
+						}]
+					}, {
+						value: 'others',
+						label: 'Others',
+						children: [{
+							value: 'dialog',
+							label: 'Dialog 对话框'
+						}, {
+							value: 'tooltip',
+							label: 'Tooltip 文字提示'
+						}, {
+							value: 'popover',
+							label: 'Popover 弹出框'
+						}, {
+							value: 'card',
+							label: 'Card 卡片'
+						}, {
+							value: 'carousel',
+							label: 'Carousel 走马灯'
+						}, {
+							value: 'collapse',
+							label: 'Collapse 折叠面板'
+						}]
+					}]
+				}, {
+					value: 'ziyuan',
+					label: '资源',
+					children: [{
+						value: 'axure',
+						label: 'Axure Components'
+					}, {
+						value: 'sketch',
+						label: 'Sketch Templates'
+					}, {
+						value: 'jiaohu',
+						label: '组件交互文档'
+					}]
+				}]
+			}
+		},
+		created() {
+			if (this.$route.query.title) {
+				this.pageTitle = this.$route.query.title;
+			}
+			if (this.$route.query.id) {
+				this.form.id = parseInt(this.$route.query.id);
+			}
+			this.initView();
+
+		},
+		mounted() {
+
+		},
+		methods: {
+			beforeUpload4(file) {
+				console.log(file);
+				if(file.type == 'video/mp4') {
+					return file
+				}else {
+					this.$alert("只支持上传mp4文件", '系统提示');
+					return false
+				}
+			},
+			beforeUpload(file) {
+				console.log(file);
+				if(file.type == 'audio/mpeg') {
+					return file
+				}else {
+					this.$alert("只支持上传mp3文件", '系统提示');
+					return false
+				}
+			},
+			/**
+			 * 上传文件
+			 * @param res
+			 */
+			onUpload: function(res) {
+				if (res.code == -1) {
+					Notice.error({
+						title: "系统提示",
+						content: res.msg
+					});
+				} else {
+					this.form.indeximg = res.data.img;
+					
+				}
+			},
+			handleChange() {
+
+			},
+			onCreated(editor) {
+				this.editor = Object.seal(editor); // 【注意】一定要用 Object.seal() 否则会报错
+				console.log(this.editor.getMenuConfig());
+
+			},
+			onChange(editor) {
+				// console.log("onChange", editor.getHtml()); // onChange 时获取编辑器最新内容
+			},
+			getEditorText() {
+				const editor = this.editor;
+				if (editor == null) return;
+
+				console.log(editor.getText()); // 执行 editor API
+			},
+			printEditorHtml() {
+				const editor = this.editor;
+				if (editor == null) return;
+
+				console.log(editor.getHtml()); // 执行 editor API
+			},
+			initView: function() {
+				var upHeaders = {};
+				this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
+				const token = this.$utils.util.cookies.get('system_token');
+				if (token) {
+					upHeaders['SYSTEM-ACC-TOKEN'] = token;
+				}
+				this.upHeaders = upHeaders;
+				if (this.form.id) {
+					this.getData();
+				}
+			},
+			getData: function() {
+				let that = this
+				var post = {};
+				const token = this.$utils.util.cookies.get('system_token');
+				console.log(token);
+				console.log(axios);
+				this.$utils.loading(this, "loading..");
+				post.id = this.form.id;
+				let loading = this.$loading('获取数据中..');
+				// SystemArtDetail({},1).then(res => {
+				// 	loading.close();
+				// 	if (res.code == 200) {
+				// 		this.data = res.data;
+				// 	} else {
+				// 		this.$alert(res.msg, '系统提示');
+				// 	}
+				// }).catch(err => {
+				// 	loading.close();
+				// 	this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+				// });
+
+				try {
+					getArtDetail({
+						id: post.id
+					}).then(res => {
+						console.log(res.data.list[0]);
+						let data = res.data.list[0]
+						this.form.title = data.title
+						// that.$set(that.form,title,)
+						this.form.content = data.content
+						loading.close();
+					}).catch(err => {
+						loading.close();
+						console.log(err, 'sss');
+					});
+				} catch (e) {
+					//TODO handle the exception
+
+				}
+
+
+			},
+			/**
+			 * 确认审核通过
+			 */
+			tapOk: function(type) {
+				// this.form.id = this.data.id;
+				// this.title = "审核通过";
+				// this.form.mono = '';
+				// this.form.type = type;
+				// this.dialogVisible = true;
+				// console.log(this.content);
+				let that = this
+				if (this.form.id) {
+					updateArticle({
+						id: that.form.id,
+						title: that.form.title,
+						content: that.form.content
+					}).then(res => {
+						this.$Message.success("修改成功");
+					})
+				} else {
+					SystemAddArt({
+						title: that.form.title,
+						content: that.form.content
+					}).then(res => {
+						this.$Message.success("发布成功");
+					})
+				}
+
+			},
+			tapQr: function(type) {
+				// this.form.id = this.data.id;
+				// this.title = "审核拒绝";
+				// this.form.mono = '';
+				// this.form.type = type;
+				// this.dialogVisible = true;
+				this.$router.push('/')
+			},
+			/**
+			 * !提交 !
+			 */
+			auditSub: function() {
+				let loading = this.$loading('提交数据中..');
+				SystemInfoAuditSub({
+					mono: this.form.mono,
+					id: this.form.id,
+					type: this.form.type,
+				}).then(res => {
+					loading.close();
+					if (res.code == 200) {
+						this.$message({
+							message: res.msg,
+							type: 'success'
+						});
+						this.dialogVisible = false;
+						this.initView();
+					} else {
+						this.$alert(res.msg, '系统提示');
+					}
+				}).catch(err => {
+					this.isLoad = false;
+					this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+				});
+			},
+		}
+	}
+</script>
+<style src="@wangeditor/editor/dist/css/style.css"></style>
+<style scoped>
+	@import "~vue2-editor/dist/vue2-editor.css";
+
+	/* Import the Quill styles you want */
+	@import '~quill/dist/quill.core.css';
+	@import '~quill/dist/quill.bubble.css';
+	@import '~quill/dist/quill.snow.css';
+
+	iframe.videoIframe {
+		border: 0px;
+		padding: 0px;
+	}
+
+	.el-dialog__body {
+		padding: 0px;
+	}
+
+	.el-dialog__body iframe body {
+		padding: 0px;
+	}
+
+	.muser-tab-continer {
+		border: 1px solid #EEEEEE
+	}
+
+	a.muser-tab-a {
+		display: inline-block;
+		padding: 0px 28px;
+		height: 42px;
+		line-height: 42px;
+		border-bottom: 3px solid transparent;
+		font-size: 17px;
+		color: #595959;
+	}
+
+	a.muser-tab-a.active {
+		border-bottom: 3px solid #EA312B;
+		color: #EA312B
+	}
+
+	.upimg-item {
+		width: 82px;
+		height: 82px;
+		margin-right: 12px;
+		overflow: hidden;
+		float: left;
+		margin-bottom: 12px;
+		position: relative;
+		border: 1px solid grey;
+	}
+
+	.upimg-item img {
+		width: 82px;
+		cursor: pointer;
+	}
+
+	.img-remove-btn {
+		position: absolute;
+		top: 0px;
+		right: 0px;
+		font-size: 24px;
+	}
+
+	.upvideo-item {
+		width: 300px;
+		margin-right: 5px;
+		overflow: hidden;
+		float: left;
+		margin-bottom: 5px;
+		position: relative;
+		padding-right: 30px;
+	}
+
+	.upvideo-item video {
+		width: 100%;
+	}
+
+	.upvideo-item audio {
+		width: 100%;
+	}
+</style>

+ 459 - 0
src/components/system/eduction/cate.vue

@@ -0,0 +1,459 @@
+<template>
+  <div class="article-manager">
+    <i-page-header title="课程分类"></i-page-header>
+    <Card :bordered="false" dis-hover class="ivu-mt">
+      <Form ref="artFrom" :model="artFrom" :label-width="75">
+        <Row type="flex" :gutter="24">
+          <!-- <Col v-bind="grid">
+            <FormItem label="广告分类:" prop="pid" label-for="pid">
+              <Select v-model="artFrom.pid" @on-change="userSearchs" clearable>
+                <Option v-for="item in treeSelect" :value="item.id" :key="item.id">{{ item.html + item.cate_name }}</Option>
+              </Select>
+            </FormItem>
+          </Col>
+          <Col v-bind="grid">
+            <FormItem label="状态:"  label-for="is_show">
+              <Select v-model="artFrom.is_show" placeholder="请选择" clearable  @on-change="userSearchs">
+                <Option value="1">显示</Option>
+                <Option value="0">隐藏</Option>
+              </Select>
+            </FormItem>
+          </Col>
+          <Col v-bind="grid">
+            <FormItem label="分类名称:"  label-for="status2">
+              <Input search enter-button placeholder="请输入" v-model="artFrom.cate_name" @on-search="userSearchs"/>
+            </FormItem>
+          </Col> -->
+        </Row>
+        <Row type="flex">
+          <Col v-bind="grid">
+            <Button type="primary" class="bnt" icon="md-add" @click="tapAdd">添加新分类</Button>
+          </Col>
+        </Row>
+      </Form>
+      <vxe-table
+        class="mt25"
+        highlight-hover-row
+        :loading="loading"
+        header-row-class-name="false"
+        :tree-config="{children: 'children',expandAll:true}"
+        :data="tableData">
+        <vxe-table-column field="id" title="ID"  tooltip width="80"></vxe-table-column>
+        <vxe-table-column field="cate_name" tree-node title="分类名称"  min-width="250" ></vxe-table-column>
+        <vxe-table-column field="pic" title="显示个数" min-width="100">
+          <template v-slot="{ row }">
+            <div v-if="row.max_count == 0">无限</div>
+            <div v-else>{{ row.max_count }}</div>
+          </template>
+        </vxe-table-column>
+
+        <vxe-table-column field="is_show" title="状态" min-width="120">
+          <template v-slot="{ row }">
+            <div v-if="row.type == 1">图文</div>
+            <div v-if="row.type == 2">文字</div>
+          </template>
+        </vxe-table-column>
+        <vxe-table-column field="sort" title="排序" min-width="100" tooltip="true"></vxe-table-column>
+        <vxe-table-column field="date" title="操作" width="250" fixed="right" align="center">
+          <template v-slot="{ row, index }">
+            <a @click="tapEdit(row.id)">编辑</a>
+            <Divider type="vertical"/>
+            <a @click="del(row,'删除商品分类',index)">删除</a>
+          </template>
+        </vxe-table-column>
+      </vxe-table>
+    </Card>
+
+    <Modal
+      v-model="dialogVisible"
+      :title="title"
+      @on-cancel="editClose">
+
+      <el-form ref="menu" :model="menu" label-width="80px">
+        <el-form-item label="分类名称" prop="cate_name"
+                      :rules="[{ required: true, message: '请输入分类名称'}]">
+          <el-input placeholder="请输入分类名称" autocomplete="off" v-model="menu.cate_name"></el-input>
+        </el-form-item>
+
+
+        <el-form-item label="归属分类"
+        >
+          <el-select v-model="menu.pid"  placeholder="归属分类" style=" width: 100%">
+            <el-option :label="item.html + item.cate_name" :value="item.id" :key="item.id" v-for="item in treeSelect"></el-option>
+          </el-select>
+        </el-form-item>
+
+
+        <el-form-item label="广告类型">
+
+          <el-select v-model="menu.type"  placeholder="广告类型" style=" width: 100%">
+            <el-option :label="item.name" :value="item.id" :key="item.id" v-for="item in adverType"></el-option>
+          </el-select>
+
+        </el-form-item>
+
+
+        <el-form-item label="自定义">
+          <el-table
+            :data="menu.jsonAr"
+            tooltip-effect="dark"
+            header-cell-class-name="table-header"
+          >
+            <el-table-column
+              prop="name"
+              label="属性名"
+              width="100">
+            </el-table-column>
+
+            <el-table-column
+              prop="type"
+              label="类型"
+              width="100">
+              <template slot-scope="scope">
+                <div>{{ getJsonName(scope.row.type) }}</div>
+              </template>
+            </el-table-column>
+
+            <el-table-column
+              prop="code"
+              label="code"
+              width="100">
+            </el-table-column>
+
+            <el-table-column
+              label="操作">
+              <template slot-scope="scope">
+                <a @click="tapJsonEdit(scope.$index)">编辑</a>
+                <Divider type="vertical"/>
+                <a @click="tapJsonDel(scope.$index)">删除</a>
+              </template>
+            </el-table-column>
+
+          </el-table>
+
+          <Button style="margin-top: 10px;" @click="tapAddJson" type="primary" size="small">添加自定义</Button>
+        </el-form-item>
+
+
+        <el-form-item label="广告数">
+          <el-input  placeholder="广告位数" v-model="menu.max_count"></el-input>
+          <div>默认0,0无限广告显示</div>
+        </el-form-item>
+
+
+
+        <el-form-item label="栏目说明">
+          <el-input type="textarea" placeholder="栏目说明" v-model="menu.mono"></el-input>
+        </el-form-item>
+
+
+      </el-form>
+
+      <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogVisible = false">取 消</el-button>
+          <el-button type="primary" @click="subAdmin">确 定</el-button>
+        </span>
+    </Modal>
+
+
+    <Modal
+      v-model="dialogVisible2"
+      title="自定义操作"
+      :modal="false"
+      @on-cancel="editClose2">
+      <el-form ref="json" :model="json" label-width="120px">
+        <el-form-item label="属性名" prop="name"
+                      :rules="[{ required: true, message: '请输入属性名'}]">
+          <el-input placeholder="请输入属性名" autocomplete="off" v-model="json.name"></el-input>
+        </el-form-item>
+
+
+
+        <el-form-item label="code" prop="code"
+                      :rules="[{ required: true, message: '请输入属性CODE'}]">
+          <el-input placeholder="请输入属性CODE" autocomplete="off" v-model="json.code"></el-input>
+        </el-form-item>
+
+        <el-form-item label="属性类型"
+                      style="width: 250px;"
+                      prop="type"
+                      :rules="[{ required: true, message: '请选择属性类型'}]">
+          <el-select  v-model="json.type"  placeholder="属性类型" >
+            <el-option :label="item.name" :value="item.value" :key="item.value" v-for="item in adverJsonType"></el-option>
+          </el-select>
+        </el-form-item>
+
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogVisible2 = false">取 消</el-button>
+          <el-button type="primary" @click="subJson">确 定</el-button>
+        </span>
+    </Modal>
+
+  </div>
+</template>
+
+<script>
+    import { mapState } from 'vuex';
+    import IPageHeader from "../../../layouts/system/page-header/index";
+    import Setting from "../../../setting";
+    import UiUpload from "../../../ui/upload/index";
+    import {SystemAdverPageDel, SystemAdverPageInfo, SystemAdverPage, SystemAdverPageTree,SystemAdverPageUpdate,getCate} from "../../../api/system/adver";
+    export default {
+        name: 'page',
+        components: {
+            UiUpload,
+            IPageHeader
+        },
+        data () {
+            return {
+                title : "添加广告分类",
+                treeSelect: [],
+                FromData: null,
+                dialogVisible:false,
+                dialogVisible2:false,
+                grid: {
+                    xl: 7,
+                    lg: 7,
+                    md: 12,
+                    sm: 24,
+                    xs: 24
+                },
+                adverType:[
+                    {"name":"图片模式",id:1},
+                    {"name":"文字模式",id:2},
+                ],
+                adverJsonType:[
+                    {"name":"文本类型","value":"text"},
+                    {"name":"图片类型","value":"img"},
+                    {"name":"链接类型","value":"url"},
+                    {"name":"产品ID","value":"id"},
+                ],
+                loading: false,
+                artFrom: {
+                    pid: 0,
+                    is_show: '',
+                    page: 1,
+                    cate_name: ''
+                },
+                tableData: [],
+                menu:{
+                    id : 0,
+                    cate_name:"",
+                    type:1,
+                    pid:"0",
+                    max_count:0,
+                    mono:"",
+                    jsonAr:[]
+                },
+                 menuJsonIndex : -1,
+                json:{
+                    name:"",
+                    code:"",
+                    type : ""
+                }
+            }
+        },
+        created(){
+
+        },
+        mounted () {
+            this.goodsCategory();
+            this.getList();
+        },
+        methods: {
+            // 商品分类;
+            goodsCategory () {
+                SystemAdverPageTree().then(res => {
+                    this.treeSelect = ([ {'cate_name':'请选择分类','html':"",'id':0} ]).concat(res.data);
+                }).catch(res => {
+                    this.$Message.error(res.msg);
+                })
+            },
+            // 列表
+            getList () {
+                this.loading = true;
+                this.artFrom.is_show = this.artFrom.is_show || '';
+                this.artFrom.pid = this.artFrom.pid || '';
+                getCate(this.artFrom)
+                    .then(res=>{
+                        let data = res.data;
+                        this.tableData = data;
+                        this.loading = false;
+                    })
+                    .catch(err=>{
+                        this.loading = false;
+                        this.$Message.error(res.msg);
+                    });
+            },
+            /**
+             * 添加新分类
+             */
+            tapAdd:function () {
+                // this.dialogVisible = true;
+                // this.$refs['menu'].resetFields();
+                // this.menu = this.$utils.resetFields(this.menu,{type:1,jsonAr:[]});
+				this.$router.push('/system/eduction/detail')
+            },
+            /**
+             * 添加自定义分类
+             */
+            tapAddJson:function(){
+                this.dialogVisible2 = true;
+                this.$refs['json'].resetFields();
+                this.json = this.$utils.resetFields(this.json);
+            },
+            /**
+             * 删除自定义分类
+             */
+            tapJsonDel:function(index){
+                this.menu.jsonAr.splice(index,1);
+            },
+            /**
+             * 修改自定义分类
+             */
+            tapJsonEdit:function(index){
+                this.menuJsonIndex = index;
+                this.json = this.menu.jsonAr[index];
+                this.dialogVisible2 = true;
+            },
+
+            /**
+             * 关闭
+             */
+            editClose:function(){
+                this.dialogVisible = false;
+            },
+            /**
+             * 关闭弹出层
+             */
+            editClose2:function(){
+                this.dialogVisible2 = false;
+            },
+            /**
+             * 自定义分类
+             */
+            subJson:function(){
+
+                this.$refs['json'].validate((valid) => {
+                    if (valid) {
+
+                         if(this.menuJsonIndex >= 0) {
+                             this.menu.jsonAr[this.menuJsonIndex] = JSON.parse(JSON.stringify(this.json));
+                         } else {
+                             this.menu.jsonAr.push(JSON.parse(JSON.stringify(this.json)));
+                         }
+                        this.dialogVisible2 = false;
+                    }
+                });
+            },
+            /**
+             * 修改数据
+             */
+            subAdmin:function(){
+                this.$refs['menu'].validate((valid) => {
+                    if (valid) {
+                        let loading = this.$loading("提交数据中...");
+                        var data = {};
+                        for(var i in this.menu) {
+                            if(typeof(this.menu[i]) == "object"){
+                                data['json'] = JSON.stringify(this.menu[i]);
+                            } else {
+                                data[i] = this.menu[i];
+                            }
+                        }
+                        SystemAdverPageUpdate(data)
+                            .then(res => {
+                                loading.close();
+                                if (res.code == 200) {
+                                    this.dialogVisible = false;
+                                    this.$Message.success("操作成功");
+                                    this.getList();
+                                    this.goodsCategory();
+                                } else {
+                                    this.$alert(res.msg, '系统提示');
+                                }
+                            })
+                            .catch(err => {
+                                loading.close();
+                                this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+                            });
+                    }
+                });
+            },
+            // 删除
+            del (row, tit, num) {
+                this.$confirm('此操作将永久删除该栏目分类, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    this.$utils.loading(this, "删除数据中...");
+                    SystemAdverPageDel({id: row.id})
+                        .then(res => {
+                            this.$utils.loadingClose();
+                            this.loading = true;
+                            if (res.code == 200) {
+                                this.getList();
+                                this.goodsCategory();
+                            } else {
+                                this.$alert(res.msg);
+                            }
+                        })
+                        .catch(err => {
+                            this.$utils.loadingClose();
+                            this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+                        });
+                });
+            },
+            /**
+             * 修改分类
+             */
+            tapEdit:function(id){
+                this.$utils.loading(this,"获取数据中...");
+                SystemAdverPageInfo({id:id})
+                    .then(res=>{
+                        this.$utils.loadingClose();
+                        if(res.code == 200) {
+                            this.menu = res.data;
+                            this.menu.jsonAr = res.data.json == "" ? [] :  JSON.parse(res.data.json);
+                            this.dialogVisible = true;
+                            this.title = "修改广告分类";
+                        } else {
+                            this.$alert(res.msg);
+                        }
+                    })
+                    .catch(err=>{
+                        this.$utils.loadingClose();
+                        this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+                    });
+            },
+            // 表格搜索
+            userSearchs () {
+                this.artFrom.page = 1;
+                this.getList();
+            },
+
+            getJsonName:function (type) {
+                for (var i in this.adverJsonType){
+                    if(type == this.adverJsonType[i].value) {
+                        return this.adverJsonType[i].name;
+                    }
+                }
+            }
+        }
+    }
+</script>
+<style scoped lang="stylus">
+  .treeSel >>>.ivu-select-dropdown-list
+    padding 0 10px!important
+    box-sizing border-box
+  .tabBox_img
+    width 36px
+    height 36px
+    border-radius:4px
+    cursor pointer
+    img
+      width 100%
+      height 100%
+</style>

+ 681 - 0
src/components/system/eduction/detail.vue

@@ -0,0 +1,681 @@
+<template>
+	<div>
+		<i-page-header :title="pageTitle"></i-page-header>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<el-form ref="formData" :model="form" label-width="120px">
+				<el-form-item label="课程标题" prop="course_topic" :rules="[{ required: true, message: '请输入课程标题'}]">
+					<el-input placeholder="请输入课程标题" autocomplete="off" v-model="form.course_topic"></el-input>
+				</el-form-item>
+				<el-form-item label="封面图片" prop="course_cover" :rules="[{ required: true, message: '请上传封面图片'}]">
+					<ui-upload :upUrl="upUrl" :img="form.course_cover" fileName="封面图片" :headers="upHeaders"
+						:updata="{isz:0,code:'img'}" @onUpload="onUpload"></ui-upload>
+				</el-form-item>
+				<el-form-item label="课程简介" prop="course_speaker_intro" :rules="[{ required: true, message: '请输入课程简介'}]">
+					<el-input placeholder="请输入课程简介" autocomplete="off" v-model="form.course_speaker_intro"></el-input>
+				</el-form-item>
+				<el-form-item label="课程分类" prop="course_cate_id" :rules="[{ required: true, message: '请选择课程分类'}]">
+					<el-cascader v-model="form.course_cate_id" :options="options" @change="handleChange"
+						:show-all-levels="false" style="width: 100%;"></el-cascader>
+				</el-form-item>
+				<el-form-item label="课程分组" prop="gr_id" :rules="[{ required: true, message: '请选择课程分组'}]">
+					<el-cascader v-model="form.gr_id" :options="options" @change="handleChange" :show-all-levels="false"
+						style="width: 100%;"></el-cascader>
+				</el-form-item>
+				<el-form-item label="排序" prop="sort" :rules="[{ required: true, message: '请输入课程排序'}]">
+					<el-input placeholder="请输入课程标题" autocomplete="off" v-model="form.sort"></el-input>
+				</el-form-item>
+				<el-form-item label="价格" prop="course_price" :rules="[{ required: true, message: '请输入价格'}]">
+					<el-input placeholder="请输入价格" autocomplete="off" v-model="form.course_price"></el-input>
+				</el-form-item>
+				<el-form-item label="认证价格" prop="course_price_2" :rules="[{ required: true, message: '请输入价格'}]">
+					<el-input placeholder="请输入价格" autocomplete="off" v-model="form.course_price_2"></el-input>
+				</el-form-item>
+				<el-form-item label="二次认证价格" prop="course_price_3" :rules="[{ required: true, message: '请输入价格'}]">
+					<el-input placeholder="请输入价格" autocomplete="off" v-model="form.course_price_3"></el-input>
+				</el-form-item>
+				<el-form-item label="积分最多抵扣" prop="deduct" :rules="[{ required: true, message: '请输入抵扣数量'}]">
+					<el-input placeholder="请输入抵扣数量" autocomplete="off" v-model="form.deduct"></el-input>
+				</el-form-item>
+				<el-form-item label="从业人员专用" prop="course_only_for_employee"
+					:rules="[{ required: true, message: '请选择是否从业人员专用'}]">
+					<el-radio v-model="form.course_only_for_employee" label="0">否</el-radio>
+					<el-radio v-model="form.course_only_for_employee" label="1">是</el-radio>
+				</el-form-item>
+				<el-form-item label="生成线下核销码" prop="make_code" :rules="[{ required: true, message: '请选择是否生成线下核销码'}]">
+					<el-radio v-model="form.make_code" label="0">否</el-radio>
+					<el-radio v-model="form.make_code" label="1">是</el-radio>
+				</el-form-item>
+				<!-- parent_course -->
+				<el-form-item label="前置课程" prop="parent_course">
+					<!-- <div style="display: flex;"> -->
+					<el-input placeholder="请选择前置课程(留空即为无条件)" autocomplete="off" v-model="form.course_price"
+						disabled></el-input>
+					<el-button type="primary" style="margin-top: 10px;">选择前置课程</el-button>
+					<!-- </div> -->
+				</el-form-item>
+				<el-form-item label="积分商城广告" prop="ad_pid">
+					<el-select v-model="form.ad_pid" placeholder="请选择" style="width: 100%;">
+						<el-option v-for="item in optionss" :key="item.value" :label="item.label" :value="item.value">
+						</el-option>
+					</el-select>
+				</el-form-item>
+				<el-form-item label="课程介绍" prop="course_intro" :rules="[{ required: true, message: '请输入课程介绍'}]">
+					<Toolbar style="border: 1px solid #ccc" :editor="editor" :defaultConfig="toolbarConfig" />
+					<!-- 编辑器 -->
+					<Editor style="height: 400px; overflow-y: hidden;border: 1px solid #ccc;"
+						:defaultConfig="editorConfig" v-model="form.course_intro" @onChange="onChange"
+						@onCreated="onCreated" />
+				</el-form-item>
+				<!-- audio_file -->
+				<el-form-item label="课程文件" prop="audio_file" :rules="[{ required: true, message: '请输入课程介绍'}]">
+					<el-upload
+					  class="upload-demo"
+					  drag
+					  :action="upUrl"
+					  :multiple="false"
+					 :headers="upHeaders"
+					 :data="{isz:0,code:'files'}"
+					 :before-upload="beforeUpload"
+					 >
+					  <i class="el-icon-upload"></i>
+					  <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+					  <div class="el-upload__tip" slot="tip">只能上传mp3文件</div>
+					</el-upload>
+				</el-form-item>
+				<el-form-item label="课程视频" prop="audio_file" :rules="[{ required: true, message: '请输入课程视频'}]">
+					<el-upload
+					  class="upload-demo"
+					  drag
+					  :action="upUrl"
+					  multiple
+					  :before-upload="beforeUpload4"
+					 :headers="upHeaders"
+					 :data="{isz:0,code:'files'}"
+					 >
+					  <i class="el-icon-upload"></i>
+					  <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+					  <div class="el-upload__tip" slot="tip">只能上传mp4文件</div>
+					</el-upload>
+				</el-form-item>
+
+				<el-form-item>
+					<el-button type="primary" @click="tapOk(1)">{{form.id ? '修改提交': '保存发布'}}</el-button>
+				</el-form-item>
+			</el-form>
+
+		</Card>
+	</div>
+
+</template>
+<script>
+	import UiUpload from "@/ui/upload/index";
+	import {
+		DomEditor
+	} from '@wangeditor/editor'
+	import {
+		Editor,
+		Toolbar
+	} from '@wangeditor/editor-for-vue'
+	import Setting from "@/setting";
+	import axios from 'axios'
+	import IPageHeader from "../../../layouts/system/page-header/index";
+	import {
+		SystemInfoAuditItem,
+		SystemInfoAuditSub
+	} from "../../../api/system/audit";
+	import {
+		upLoad
+	} from '../../../api/system/sys'
+	import {
+		SystemAddArt,
+		updateArticle,
+		SystemArtDetail,
+		SystemGetArtList,
+		getArtDetail
+	} from "../../../api/system/adver";
+	import UiLoading from "../../../ui/loading/index";
+	import {
+		base64to2
+	} from '../../../utils/comm.js'
+	export default {
+		name: "SystemInfoAuditItem",
+		components: {
+			UiLoading,
+			IPageHeader,
+			Editor,
+			Toolbar,
+			UiUpload
+		},
+		computed: {},
+		data() {
+			return {
+				editor: null,
+
+				toolbarConfig: {
+					// toolbarKeys: [ /* 显示哪些菜单,如何排序、分组 */ ],
+					excludeKeys: ['group-video', 'emotion', 'fullScreen'],
+				},
+				editorConfig: {
+					placeholder: "请输入内容...",
+					// autoFocus: false,
+
+					// 所有的菜单配置,都要在 MENU_CONF 属性下
+					MENU_CONF: {
+						uploadImage: {
+							base64LimitSize: 1024 * 1024 * 10
+						},
+					},
+				},
+				content: '',
+				form: {
+					content: '',
+					title: '',
+					id: '',
+					course_cover: ''
+				},
+				pageTitle: '课程详情',
+				upHeaders: {},
+				formActiveName: "tab_base",
+				formData: {
+					id: ""
+				},
+				title: "",
+				dialogVisible: false,
+				upUrl: '',
+				optionss: [{
+					value: '选项1',
+					label: '黄金糕'
+				}, {
+					value: '选项2',
+					label: '双皮奶'
+				}, {
+					value: '选项3',
+					label: '蚵仔煎'
+				}, {
+					value: '选项4',
+					label: '龙须面'
+				}, {
+					value: '选项5',
+					label: '北京烤鸭'
+				}],
+				options: [{
+					value: 'zhinan',
+					label: '指南',
+					children: [{
+						value: 'shejiyuanze',
+						label: '设计原则',
+						children: [{
+							value: 'yizhi',
+							label: '一致'
+						}, {
+							value: 'fankui',
+							label: '反馈'
+						}, {
+							value: 'xiaolv',
+							label: '效率'
+						}, {
+							value: 'kekong',
+							label: '可控'
+						}]
+					}, {
+						value: 'daohang',
+						label: '导航',
+						children: [{
+							value: 'cexiangdaohang',
+							label: '侧向导航'
+						}, {
+							value: 'dingbudaohang',
+							label: '顶部导航'
+						}]
+					}]
+				}, {
+					value: 'zujian',
+					label: '组件',
+					children: [{
+						value: 'basic',
+						label: 'Basic',
+						children: [{
+							value: 'layout',
+							label: 'Layout 布局'
+						}, {
+							value: 'color',
+							label: 'Color 色彩'
+						}, {
+							value: 'typography',
+							label: 'Typography 字体'
+						}, {
+							value: 'icon',
+							label: 'Icon 图标'
+						}, {
+							value: 'button',
+							label: 'Button 按钮'
+						}]
+					}, {
+						value: 'form',
+						label: 'Form',
+						children: [{
+							value: 'radio',
+							label: 'Radio 单选框'
+						}, {
+							value: 'checkbox',
+							label: 'Checkbox 多选框'
+						}, {
+							value: 'input',
+							label: 'Input 输入框'
+						}, {
+							value: 'input-number',
+							label: 'InputNumber 计数器'
+						}, {
+							value: 'select',
+							label: 'Select 选择器'
+						}, {
+							value: 'cascader',
+							label: 'Cascader 级联选择器'
+						}, {
+							value: 'switch',
+							label: 'Switch 开关'
+						}, {
+							value: 'slider',
+							label: 'Slider 滑块'
+						}, {
+							value: 'time-picker',
+							label: 'TimePicker 时间选择器'
+						}, {
+							value: 'date-picker',
+							label: 'DatePicker 日期选择器'
+						}, {
+							value: 'datetime-picker',
+							label: 'DateTimePicker 日期时间选择器'
+						}, {
+							value: 'upload',
+							label: 'Upload 上传'
+						}, {
+							value: 'rate',
+							label: 'Rate 评分'
+						}, {
+							value: 'form',
+							label: 'Form 表单'
+						}]
+					}, {
+						value: 'data',
+						label: 'Data',
+						children: [{
+							value: 'table',
+							label: 'Table 表格'
+						}, {
+							value: 'tag',
+							label: 'Tag 标签'
+						}, {
+							value: 'progress',
+							label: 'Progress 进度条'
+						}, {
+							value: 'tree',
+							label: 'Tree 树形控件'
+						}, {
+							value: 'pagination',
+							label: 'Pagination 分页'
+						}, {
+							value: 'badge',
+							label: 'Badge 标记'
+						}]
+					}, {
+						value: 'notice',
+						label: 'Notice',
+						children: [{
+							value: 'alert',
+							label: 'Alert 警告'
+						}, {
+							value: 'loading',
+							label: 'Loading 加载'
+						}, {
+							value: 'message',
+							label: 'Message 消息提示'
+						}, {
+							value: 'message-box',
+							label: 'MessageBox 弹框'
+						}, {
+							value: 'notification',
+							label: 'Notification 通知'
+						}]
+					}, {
+						value: 'navigation',
+						label: 'Navigation',
+						children: [{
+							value: 'menu',
+							label: 'NavMenu 导航菜单'
+						}, {
+							value: 'tabs',
+							label: 'Tabs 标签页'
+						}, {
+							value: 'breadcrumb',
+							label: 'Breadcrumb 面包屑'
+						}, {
+							value: 'dropdown',
+							label: 'Dropdown 下拉菜单'
+						}, {
+							value: 'steps',
+							label: 'Steps 步骤条'
+						}]
+					}, {
+						value: 'others',
+						label: 'Others',
+						children: [{
+							value: 'dialog',
+							label: 'Dialog 对话框'
+						}, {
+							value: 'tooltip',
+							label: 'Tooltip 文字提示'
+						}, {
+							value: 'popover',
+							label: 'Popover 弹出框'
+						}, {
+							value: 'card',
+							label: 'Card 卡片'
+						}, {
+							value: 'carousel',
+							label: 'Carousel 走马灯'
+						}, {
+							value: 'collapse',
+							label: 'Collapse 折叠面板'
+						}]
+					}]
+				}, {
+					value: 'ziyuan',
+					label: '资源',
+					children: [{
+						value: 'axure',
+						label: 'Axure Components'
+					}, {
+						value: 'sketch',
+						label: 'Sketch Templates'
+					}, {
+						value: 'jiaohu',
+						label: '组件交互文档'
+					}]
+				}]
+			}
+		},
+		created() {
+			if (this.$route.query.title) {
+				this.pageTitle = this.$route.query.title;
+			}
+			if (this.$route.query.id) {
+				this.form.id = parseInt(this.$route.query.id);
+			}
+			this.initView();
+
+		},
+		mounted() {
+
+		},
+		methods: {
+			beforeUpload4(file) {
+				console.log(file);
+				if(file.type == 'video/mp4') {
+					return file
+				}else {
+					this.$alert("只支持上传mp4文件", '系统提示');
+					return false
+				}
+			},
+			beforeUpload(file) {
+				console.log(file);
+				if(file.type == 'audio/mpeg') {
+					return file
+				}else {
+					this.$alert("只支持上传mp3文件", '系统提示');
+					return false
+				}
+			},
+			/**
+			 * 上传文件
+			 * @param res
+			 */
+			onUpload: function(res) {
+				if (res.code == -1) {
+					Notice.error({
+						title: "系统提示",
+						content: res.msg
+					});
+				} else {
+					this.form.course_cover = res.data.img;
+					console.log(this.form.course_cover, 'this.form.course_cover');
+				}
+			},
+			onUploads(res) {
+				if (res.code == -1) {
+					Notice.error({
+						title: "系统提示",
+						content: res.msg
+					});
+				} else {
+					// this.form.course_cover = res.data.img;
+					// console.log(this.form.course_cover, 'this.form.course_cover');
+					console.log(res);
+				}
+			},
+			handleChange() {
+
+			},
+			onCreated(editor) {
+				this.editor = Object.seal(editor); // 【注意】一定要用 Object.seal() 否则会报错
+				console.log(this.editor.getMenuConfig());
+
+			},
+			onChange(editor) {
+				// console.log("onChange", editor.getHtml()); // onChange 时获取编辑器最新内容
+			},
+			getEditorText() {
+				const editor = this.editor;
+				if (editor == null) return;
+
+				console.log(editor.getText()); // 执行 editor API
+			},
+			printEditorHtml() {
+				const editor = this.editor;
+				if (editor == null) return;
+
+				console.log(editor.getHtml()); // 执行 editor API
+			},
+			initView: function() {
+				var upHeaders = {};
+				this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
+				const token = this.$utils.util.cookies.get('system_token');
+				if (token) {
+					upHeaders['SYSTEM-ACC-TOKEN'] = token;
+				}
+				this.upHeaders = upHeaders;
+				if (this.form.id) {
+					this.getData();
+				}
+			},
+			getData: function() {
+				let that = this
+				var post = {};
+				const token = this.$utils.util.cookies.get('system_token');
+				console.log(token);
+				console.log(axios);
+				this.$utils.loading(this, "loading..");
+				post.id = this.form.id;
+				let loading = this.$loading('获取数据中..');
+				// SystemArtDetail({},1).then(res => {
+				// 	loading.close();
+				// 	if (res.code == 200) {
+				// 		this.data = res.data;
+				// 	} else {
+				// 		this.$alert(res.msg, '系统提示');
+				// 	}
+				// }).catch(err => {
+				// 	loading.close();
+				// 	this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+				// });
+
+				try {
+					getArtDetail({
+						id: post.id
+					}).then(res => {
+						console.log(res.data.list[0]);
+						let data = res.data.list[0]
+						this.form.title = data.title
+						// that.$set(that.form,title,)
+						this.form.content = data.content
+						loading.close();
+					}).catch(err => {
+						loading.close();
+						console.log(err, 'sss');
+					});
+				} catch (e) {
+					//TODO handle the exception
+
+				}
+
+
+			},
+			/**
+			 * 确认审核通过
+			 */
+			tapOk: function(type) {
+				// this.form.id = this.data.id;
+				// this.title = "审核通过";
+				// this.form.mono = '';
+				// this.form.type = type;
+				// this.dialogVisible = true;
+				// console.log(this.content);
+				let that = this
+				if (this.form.id) {
+					updateArticle({
+						id: that.form.id,
+						title: that.form.title,
+						content: that.form.content
+					}).then(res => {
+						this.$Message.success("修改成功");
+					})
+				} else {
+					SystemAddArt({
+						title: that.form.title,
+						content: that.form.content
+					}).then(res => {
+						this.$Message.success("发布成功");
+					})
+				}
+
+			},
+			tapQr: function(type) {
+				// this.form.id = this.data.id;
+				// this.title = "审核拒绝";
+				// this.form.mono = '';
+				// this.form.type = type;
+				// this.dialogVisible = true;
+				this.$router.push('/')
+			},
+			/**
+			 * !提交 !
+			 */
+			auditSub: function() {
+				let loading = this.$loading('提交数据中..');
+				SystemInfoAuditSub({
+					mono: this.form.mono,
+					id: this.form.id,
+					type: this.form.type,
+				}).then(res => {
+					loading.close();
+					if (res.code == 200) {
+						this.$message({
+							message: res.msg,
+							type: 'success'
+						});
+						this.dialogVisible = false;
+						this.initView();
+					} else {
+						this.$alert(res.msg, '系统提示');
+					}
+				}).catch(err => {
+					this.isLoad = false;
+					this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+				});
+			},
+		}
+	}
+</script>
+<style src="@wangeditor/editor/dist/css/style.css"></style>
+<style scoped>
+	@import "~vue2-editor/dist/vue2-editor.css";
+
+	/* Import the Quill styles you want */
+	@import '~quill/dist/quill.core.css';
+	@import '~quill/dist/quill.bubble.css';
+	@import '~quill/dist/quill.snow.css';
+
+	iframe.videoIframe {
+		border: 0px;
+		padding: 0px;
+	}
+
+	.el-dialog__body {
+		padding: 0px;
+	}
+
+	.el-dialog__body iframe body {
+		padding: 0px;
+	}
+
+	.muser-tab-continer {
+		border: 1px solid #EEEEEE
+	}
+
+	a.muser-tab-a {
+		display: inline-block;
+		padding: 0px 28px;
+		height: 42px;
+		line-height: 42px;
+		border-bottom: 3px solid transparent;
+		font-size: 17px;
+		color: #595959;
+	}
+
+	a.muser-tab-a.active {
+		border-bottom: 3px solid #EA312B;
+		color: #EA312B
+	}
+
+	.upimg-item {
+		width: 82px;
+		height: 82px;
+		margin-right: 12px;
+		overflow: hidden;
+		float: left;
+		margin-bottom: 12px;
+		position: relative;
+		border: 1px solid grey;
+	}
+
+	.upimg-item img {
+		width: 82px;
+		cursor: pointer;
+	}
+
+	.img-remove-btn {
+		position: absolute;
+		top: 0px;
+		right: 0px;
+		font-size: 24px;
+	}
+
+	.upvideo-item {
+		width: 300px;
+		margin-right: 5px;
+		overflow: hidden;
+		float: left;
+		margin-bottom: 5px;
+		position: relative;
+		padding-right: 30px;
+	}
+
+	.upvideo-item video {
+		width: 100%;
+	}
+
+	.upvideo-item audio {
+		width: 100%;
+	}
+</style>

+ 325 - 0
src/components/system/eduction/grlists.vue

@@ -0,0 +1,325 @@
+<template>
+	<div>
+		<i-page-header class="product_tabs" title="分组列表">
+		</i-page-header>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<div style="height: 30px;"></div>
+
+
+			<Form ref="formValidate" :model="formValidate" :label-width="50">
+				<Row type="flex" :gutter="24">
+					<Col v-bind="grid">
+					<FormItem label="搜索:" label-for="status2">
+						<Input search enter-button placeholder="请输入分组标题" v-model="formValidate.title"
+							@on-search="userSearchs" />
+					</FormItem>
+					</Col>
+				</Row>
+				<Row type="flex">
+					<Col v-bind="grid">
+					<Button type="primary" @click="tapAdd" icon="md-add">添加新分组</Button>
+					</Col>
+				</Row>
+			</Form>
+
+			<Table :columns="columns1" :data="tableData" class="mt25" no-userFrom-text="暂无数据"
+				no-filtered-userFrom-text="暂无筛选结果" :loading="loading" highlight-row>
+
+				     <template slot-scope="{ row, index }" slot="indeximg">
+						 <img  v-lazy="scope.row.indeximg" :src="scope.row.indeximg" v-image-preview style="width: 60px;cursor: pointer;"/>
+				     </template>
+
+
+				<template slot-scope="{ row, index }" slot="data">
+					<div v-for="(item,index) in row.jsonAr" :key="index">
+						{{ item.name}}:{{ item[item.code] }}
+					</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					<a @click="tapEdit(row.id)">编辑</a>
+					<Divider type="vertical" />
+					<a @click="tapEdit(row.id)">轮播</a>
+					<template>
+						<Divider type="vertical" />
+						<a @click="tapEdit(row.id)">取消轮播</a>
+					</template>
+					<Divider type="vertical" />
+					<a @click="tapDel(row)">审核</a>
+					<template>
+						<Divider type="vertical" />
+						<a @click="tapEdit(row.id)">取消审核</a>
+					</template>
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="page.count" show-elevator show-total @on-change="tapPage" :page-size="page.pageSize" />
+			</div>
+		</Card>
+	</div>
+</template>
+
+<script>
+	import {
+		SystemGetArtList,
+		SystemDelArt
+	} from "../../../api/system/adver";
+	import IPageHeader from "@/layouts/system/page-header/index";
+	import {
+		mapState,
+		mapActions
+	} from 'vuex';
+	import UiUpload from "@/ui/upload/index";
+	import Setting from "@/setting";
+	import util from "@/libs/util";
+	import {
+		SystemAdverPage,
+		SystemAdverPageTree,
+		SystemAdverUpdate,
+		SystemAdver,
+		SystemAdverInfo,
+		SystemAdverDel
+	} from "../../../api/system/adver";
+	export default {
+		name: "adver_index",
+		components: {
+			UiUpload,
+			IPageHeader
+		},
+		computed: {},
+		data() {
+			return {
+				title: "账号管理",
+				dialogVisible: false,
+				upHeaders: [],
+				upUrl: "",
+				grid: {
+					xl: 7,
+					lg: 7,
+					md: 12,
+					sm: 24,
+					xs: 24
+				},
+				artType: "all",
+				headeAr: [],
+				headrIndex: 0,
+				headrIndex2: 0,
+				adverPage: [],
+				adverPageOne: {},
+				columns1: [{
+						title: 'id',
+						key: 'id',
+						minWidth: 50
+					},
+					{
+							title: '排序',
+							key: 'id',
+							minWidth: 50
+						},
+					{
+						title: '标题',
+						key: 'title',
+						minWidth: 150
+					},
+					{
+						title: '讲师',
+						key: 'user',
+						minWidth: 150
+					},
+					{
+						title: '封面图片',
+						key: 'indeximg',
+						slot: 'indeximg',
+						minWidth: 150
+					},
+					{
+						title: '点击次数',
+						key: 'num',
+						minWidth: 150
+					},
+					{
+						title: '创建时间',
+						key: 'create_time',
+						minWidth: 150
+					},
+					{
+						title: '状态',
+						key: 'status',
+						minWidth: 150
+					},
+					{
+						title: '操作',
+						key: 'action',
+						slot: 'action',
+						fixed: 'right',
+						minWidth: 120
+					}
+				],
+				loading: true,
+				tableData: [],
+				page: {
+					count: 0, //一共多少数量
+					pageSize: 10, //每一页码数量
+					page: 1, //当前页码
+				},
+				formValidate: {
+					title: ""
+				},
+				form: {
+					title: "",
+					text: "",
+					url: "",
+					img: "",
+					sort: 0,
+					is_show: 1,
+					page_id: 0
+				},
+				dataAr: []
+			}
+		},
+		mounted() {
+			this.initView();
+		},
+		methods: {
+			initView: function() {
+				var upHeaders = {};
+				this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
+				const token = this.$utils.util.cookies.get('system_token');
+				if (token) {
+					upHeaders['SYSTEM-ACC-TOKEN'] = token;
+				}
+				this.upHeaders = upHeaders;
+				this.getAdverPage();
+			},
+
+
+			getAdverPage: function() {
+				this.$utils.loading(this, "删除数据中...");
+				var PromiseAll = [SystemAdverPageTree(), SystemAdverPage()];
+				Promise.all(PromiseAll)
+					.then(res => {
+						this.$utils.loadingClose();
+						this.adverPage = res[0].data;
+						this.headeAr = res[1].data;
+						this.getData();
+					})
+					.catch(err => {
+						console.log(err);
+						this.$utils.loadingClose();
+						this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+					});
+			},
+
+			/**
+			 * 获取数据
+			 */
+			getData: function() {
+				// if (this.headeAr[this.headrIndex] == null ||
+				//     this.headeAr[this.headrIndex].children[this.headrIndex2] == null) {
+				//     return ;
+				// }
+				// var data = {
+				//     title : this.formValidate.title,
+				//     page : this.page.page,
+				//     pageSize : this.headeAr[this.headrIndex].children[this.headrIndex2].id
+				// };
+				let data = {
+					page: this.page.page,
+					pageSize: this.page.pageSize,
+					title: this.formValidate.title
+				}
+				SystemGetArtList(data)
+					.then(res => {
+						this.loading = false;
+						if (res.code == 200) {
+							this.tableData = res.data.list;
+							// this.page.pageSize = res.data.pageSize;
+							this.page.count = res.data.count;
+						} else {
+							this.$alert(res.msg);
+						}
+					})
+					.catch(err => {
+						console.log(err);
+						this.loading = false;
+						this.$utils.loadingClose();
+						this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+					});
+			},
+			userSearchs() {
+				this.page.page = 1;
+				this.loading = true;
+				this.getData();
+			},
+
+			tapEl1: function(index) {
+				this.headrIndex = index;
+			},
+			tapEl2: function(index) {
+				this.headrIndex2 = index;
+				this.page.page = 1;
+				this.loading = true;
+				this.getData();
+			},
+
+			tapInput: function(ethis, index, code) {
+				console.log(ethis);
+			},
+			//关闭
+			editClose: function() {
+				this.dialogVisible = false;
+			},
+			/**
+			 * 添加广告栏目
+			 */
+			tapAdd: function(sassid) {
+				// this.dialogVisible = true;
+				// if(this.headeAr.length <= 0) {
+				//     this.$alert('无广告栏目,无法添加');
+				// }
+				// var data = this.headeAr[this.headrIndex].children[this.headrIndex2];
+				// this.dataAr = data.json == '' ? [] : JSON.parse(data.json);
+				// this.adverPageOne = data;
+				// this.$refs['form'].resetFields();
+				// this.form = this.$utils.resetFields(this.form, {page_id:data.id});
+				this.$router.push('/system/eduction/addGrlists')
+			},
+			// 编辑分组
+			tapEdit: function(id) {
+				this.$router.push('/system/eduction/detail?id=' + id)
+			},
+			/**
+			 * 分页
+			 */
+			tapPage: function(index) {
+				this.page.page = index;
+				this.getData();
+			},
+			/**
+			 * 上传文件
+			 * @param res
+			 */
+			onUpload: function(res) {
+				if (res.code == -1) {
+					Notice.error({
+						title: "系统提示",
+						content: res.msg
+					});
+				} else {
+					this.form.img = res.data.img;
+				}
+			},
+		}
+	}
+</script>
+<style scoped>
+	.platform-img {
+		width: 20px;
+		height: 20px;
+		background: #f2f2f2;
+		margin-right: 4px;
+	}
+
+	.platform-img img {
+		width: 100%;
+	}
+</style>

+ 380 - 0
src/components/system/eduction/list.vue

@@ -0,0 +1,380 @@
+<template>
+  <div>
+    <i-page-header class="product_tabs" title="课程列表">
+    </i-page-header>
+    <Card :bordered="false" dis-hover class="ivu-mt">
+	  <div style="height: 30px;"></div>
+	  
+	  
+      <Form ref="formValidate" :model="formValidate" :label-width="50">
+        <Row type="flex"  :gutter="24">
+          <Col v-bind="grid">
+            <FormItem label="搜索:"  label-for="status2">
+              <Input search enter-button placeholder="请输入文章标题" v-model="formValidate.title" @on-search="userSearchs"/>
+            </FormItem>
+          </Col>
+        </Row>
+        <Row type="flex">
+          <Col v-bind="grid">
+            <Button type="primary" @click="tapAdd"  icon="md-add">添加新课程</Button>
+          </Col>
+        </Row>
+      </Form>
+
+      <Table :columns="columns1" :data="tableData" class="mt25" no-userFrom-text="暂无数据"
+             no-filtered-userFrom-text="暂无筛选结果"  :loading="loading" highlight-row>
+
+        <template slot-scope="{ row, index }" slot="imgs">
+          <img v-lazy="row.img" :src="row.img" v-image-preview style="width: 120px;cursor: pointer;"/>
+        </template>
+
+        <template slot-scope="{ row, index }" slot="data">
+          <div v-for="(item,index) in row.jsonAr" :key="index">
+            {{ item.name}}:{{ item[item.code] }}
+          </div>
+        </template>
+        <template slot-scope="{ row, index }" slot="action">
+         <a @click="tapEdit(row.id)">编辑</a>
+          <Divider type="vertical"/>
+          <a @click="tapDel(row)">审核</a>
+		  <a @click="tapDel(row)">取消审核</a>
+        </template>
+      </Table>
+      <div class="acea-row row-right page">
+        <Page :total="page.count" show-elevator show-total @on-change="tapPage"
+              :page-size="page.pageSize"/>
+      </div>
+    </Card>
+
+
+    <Modal
+      v-model="dialogVisible"
+      :title="title"
+      @on-cancel="editClose">
+
+      <el-form ref="form" :model="form" label-width="120px">
+        <el-form-item label="文章标题" prop="title"
+                      :rules="[{ required: true, message: '请输入文章标题'}]">
+          <el-input placeholder="请输入文章标题" autocomplete="off" v-model="form.title"></el-input>
+        </el-form-item>
+      </el-form>
+
+      <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogVisible = false">取 消</el-button>
+          <el-button type="primary" @click="subAdmin">确 定</el-button>
+        </span>
+    </Modal>
+
+  </div>
+</template>
+
+<script>
+	import {
+		SystemGetArtList,
+		SystemDelArt
+	} from "../../../api/system/adver";
+    import IPageHeader from "@/layouts/system/page-header/index";
+    import { mapState, mapActions } from 'vuex';
+    import UiUpload from "@/ui/upload/index";
+    import Setting from "@/setting";
+    import util from "@/libs/util";
+    import {
+        SystemAdverPage,
+        SystemAdverPageTree,
+        SystemAdverUpdate,
+        SystemAdver,
+        SystemAdverInfo, SystemAdverDel
+    } from "../../../api/system/adver";
+    export default {
+        name: "adver_index",
+        components: { UiUpload, IPageHeader},
+        computed: {
+        },
+        data() {
+            return {
+                title:"账号管理",
+                dialogVisible:false,
+                upHeaders:[],
+                upUrl:"",
+                grid: {
+                    xl: 7,
+                    lg: 7,
+                    md: 12,
+                    sm: 24,
+                    xs: 24
+                },
+                artType     : "all",
+                headeAr     : [],
+                headrIndex  : 0,
+                headrIndex2 : 0,
+                adverPage   : [],
+                adverPageOne : {},
+                columns1: [
+					{
+					    title: 'id',
+					    key: 'id',
+					    minWidth: 50
+					},
+                    {
+                        title: '课题',
+                        key: 'title',
+                        minWidth: 150
+                    },
+					{
+					    title: '讲师',
+					    key: 'title',
+					    minWidth: 150
+					},
+					{
+					    title: '封面图片',
+					    key: 'title',
+					    minWidth: 150
+					},
+					{
+					    title: '价格',
+					    key: 'title',
+					    minWidth: 150
+					},
+					{
+					    title: '次数',
+					    key: 'title',
+					    minWidth: 150
+					},
+                    {
+                        title: '创建时间',
+                        key: 'create_time',
+                        minWidth: 150
+                    },
+                    {
+                        title: '操作',
+                        key: 'action',
+                        slot: 'action',
+                        fixed: 'right',
+                        minWidth: 120
+                    }
+                ],
+                loading: true,
+                tableData: [],
+                page : {
+                    count : 0,//一共多少数量
+                    pageSize : 10,//每一页码数量
+                    page : 1,//当前页码
+                },
+                formValidate:{title:""},
+                form:{
+                    title     : "",
+                    text      : "",
+                    url       : "",
+                    img       : "",
+                    sort      : 0,
+                    is_show   : 1,
+                    page_id   : 0
+                },
+                dataAr    : []
+            }
+        },
+        mounted(){
+            this.initView();
+        },
+        methods: {
+            initView : function(){
+                var upHeaders = {};
+                this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
+                const token = this.$utils.util.cookies.get('system_token');
+                if (token) {
+                    upHeaders['SYSTEM-ACC-TOKEN'] = token;
+                }
+                this.upHeaders = upHeaders;
+                 this.getAdverPage();
+            },
+
+
+            getAdverPage:function(){
+                this.$utils.loading(this, "删除数据中...");
+                var PromiseAll = [SystemAdverPageTree(),SystemAdverPage()];
+                Promise.all(PromiseAll)
+                    .then(res=>{
+                        this.$utils.loadingClose();
+                        this.adverPage = res[0].data;
+                        this.headeAr = res[1].data;
+                        this.getData();
+                    })
+                    .catch(err=>{
+                        console.log(err);
+                        this.$utils.loadingClose();
+                        this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+                    });
+            },
+
+            /**
+             * 获取数据
+             */
+            getData:function () {
+                // if (this.headeAr[this.headrIndex] == null ||
+                //     this.headeAr[this.headrIndex].children[this.headrIndex2] == null) {
+                //     return ;
+                // }
+                // var data = {
+                //     title : this.formValidate.title,
+                //     page : this.page.page,
+                //     pageSize : this.headeAr[this.headrIndex].children[this.headrIndex2].id
+                // };
+				let data = {
+					page: this.page.page,
+					pageSize: this.page.pageSize,
+					title: this.formValidate.title
+				}
+                SystemGetArtList(data)
+                    .then(res=>{
+                        this.loading = false;
+                        if(res.code == 200) {
+                            this.tableData = res.data.list;
+                            // this.page.pageSize = res.data.pageSize;
+                            this.page.count = res.data.count;
+                        } else {
+                            this.$alert(res.msg);
+                        }
+                    })
+                    .catch(err=>{
+                        console.log(err);
+                        this.loading = false;
+                        this.$utils.loadingClose();
+                        this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+                    });
+            },
+            userSearchs () {
+                this.page.page = 1;
+                this.loading = true;
+                this.getData();
+            },
+
+            tapEl1:function(index){
+                this.headrIndex = index;
+            },
+            tapEl2:function(index){
+                this.headrIndex2 = index;
+                this.page.page = 1;
+                this.loading = true;
+                this.getData();
+            },
+
+            tapInput:function(ethis,index,code){
+              console.log(ethis);
+            },
+            //关闭
+            editClose:function(){
+                this.dialogVisible = false;
+            },
+            /**
+             * 添加广告栏目
+             */
+            tapAdd:function(sassid){
+                // this.dialogVisible = true;
+                // if(this.headeAr.length <= 0) {
+                //     this.$alert('无广告栏目,无法添加');
+                // }
+                // var data = this.headeAr[this.headrIndex].children[this.headrIndex2];
+                // this.dataAr = data.json == '' ? [] : JSON.parse(data.json);
+                // this.adverPageOne = data;
+                // this.$refs['form'].resetFields();
+                // this.form = this.$utils.resetFields(this.form, {page_id:data.id});
+				this.$router.push('/system/article/detail')
+            },
+            /**
+             * 修改分页
+             */
+            tapEdit:function(id){
+                this.$router.push('/system/article/detail?id=' + id)
+            },
+            /**
+             * 切换广告
+             */
+            tapChanggePage:function(id){
+              var data = {};
+              for(var i in this.adverPage) {
+                  if(this.adverPage[i].id == id) {
+                      data = this.adverPage[i];
+                  }
+              }
+              var jsonData = data.json == '' ? [] : JSON.parse(data.json);
+              this.dataAr = jsonData;
+            },
+            /**
+             * 分页
+             */
+            tapPage:function(index){
+                this.page.page = index;
+                this.getData();
+            },
+            /**
+             * 修改数据
+             */
+            subAdmin:function(){
+                this.$refs['form'].validate((valid) => {
+                    if (valid) {
+                        let loading = this.$loading("提交数据中...");
+                        var data = {};
+                        for(var i in this.form) {
+                            data[i] = this.form[i];
+                        }
+                        data['data'] = JSON.stringify(this.dataAr);
+                        SystemAdverUpdate(data)
+                            .then(res => {
+                                loading.close();
+                                if (res.code == 200) {
+                                    this.dialogVisible = false;
+                                    this.$Message.success("操作成功");
+                                    this.getData();
+                                } else {
+                                    this.$alert(res.msg, '系统提示');
+                                }
+                            })
+                            .catch(err => {
+                                loading.close();
+                                this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+                            });
+                    }
+                });
+            },
+            /**
+             * 上传文件
+             * @param res
+             */
+            onUpload:function (res) {
+                if(res.code == -1) {
+                    Notice.error({ title : "系统提示", content:res.msg});
+                } else {
+                    this.form.img = res.data.img;
+                }
+            },
+            // 删除
+            tapDel (row) {
+                this.$confirm('此操作将永久删除该文章, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    this.$utils.loading(this, "删除数据中...");
+                    SystemDelArt({id:row.id})
+                        .then(res => {
+                            this.$utils.loadingClose();
+                            this.loading = true;
+                            if (res.code == 200) {
+                                this.getData();
+                            } else {
+                                this.$alert(res.msg);
+                            }
+                        })
+                        .catch(err => {
+                            this.$utils.loadingClose();
+                            this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+                        });
+                });
+            },
+        }
+    }
+</script>
+<style scoped>
+  .platform-img{width: 20px;height: 20px;background: #f2f2f2; margin-right: 4px;}
+  .platform-img img{ width: 100%;}
+</style>

+ 8 - 0
src/components/system/eduction/teachList.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 21 - 8
src/components/system/user/workerList.vue

@@ -78,17 +78,18 @@
 				 		 <img  v-lazy="scope.row.ercode" :src="scope.row.ercode" v-image-preview style="width: 60px;cursor: pointer;"/>
 				      </template>
 				  </el-table-column> -->
-				<el-table-column prop="is_show" label="是否展示" width="80" align="left">
+				<!-- <el-table-column prop="is_show" label="是否展示" width="80" align="left">
 					<template slot-scope="scope">
-						<el-switch v-model="scope.row.is_show == 1" active-color="#13ce66" inactive-color="#ff4949" >
-						</el-switch>
+						<el-tag type="success" size="mini" v-if="scope.row.is_show == 1">展示</el-tag>
+						<el-tag type="danger" size="mini" v-if="scope.row.is_show == 0">隐藏</el-tag>
 					</template>
-				</el-table-column>
-				<el-table-column align="center" label="操作" prop="handle" width="200" fixed="right">
+				</el-table-column> -->
+				<el-table-column align="center" label="操作" prop="handle" width="150" fixed="right">
 					<template slot-scope="scope">
 						<div>
-							<el-button plain size="mini" @click="tapEdit(scope.row)">编辑</el-button>
-
+							<!-- <el-button type="primary" size="mini" v-if="scope.row.is_show == 0 && scope.row.is_info_audit == 1" @click="makeShow(scope.row)">显示</el-button>
+							<el-button type="danger" size="mini" v-if="scope.row.is_show == 1 && scope.row.is_info_audit == 1" @click="makeShow(scope.row)">隐藏</el-button>
+							 --><el-button plain size="mini" @click="tapEdit(scope.row)" >编辑</el-button>
 							<!-- <Divider type="vertical"/>
 							<i-link :to="'/system/order/index?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的订单列表' ">
 								<el-button plain size="mini" >订单</el-button>
@@ -135,7 +136,8 @@
 	import {
 		SystemWorkerList,
 		SystemWorkerSave,
-		SystemUserWorkTypeList
+		SystemUserWorkTypeList,
+		setAuthShow
 	} from "../../../api/system/user";
 
 	import IPageHeader from "../../../layouts/system/page-header/index";
@@ -385,6 +387,17 @@
 						this.$alert('网络繁忙,加载失败,请稍等片刻在尝试!', '系统提示');
 					});
 			},
+			//
+			makeShow(item) {
+				console.log(item);
+				setAuthShow({
+					uid: item.uid,
+					is_show: item.is_show
+				}).then(res => {
+					this.$Message.success("操作成功");
+					this.tapSeach()
+				})
+			}
 
 		}
 	}

+ 57 - 0
src/router/routes.js

@@ -272,6 +272,63 @@ const system = [{
 				component: () => import('@/components/system/article/detail.vue')
 			
 			},
+			{
+				path: '/system/eduction/list',
+				name: 'system_eduction_list',
+				meta: {
+					title: '课程列表',
+					auth: true
+				},
+				component: () => import('@/components/system/eduction/list.vue')
+			
+			},
+			{
+				path: '/system/eduction/cate',
+				name: 'system_eduction_cate',
+				meta: {
+					title: '课程分类',
+					auth: true
+				},
+				component: () => import('@/components/system/eduction/cate.vue')
+			
+			},
+			{
+				path: '/system/eduction/detail',
+				name: 'system_eduction_detail',
+				meta: {
+					title: '课程详情',
+					auth: true
+				},
+				component: () => import('@/components/system/eduction/detail.vue')
+			
+			},
+			{
+				path: '/system/eduction/grlists',
+				name: 'system_eduction_grlists',
+				meta: {
+					title: '分组列表',
+					auth: true
+				},
+				component: () => import('@/components/system/eduction/grlists.vue')
+			},
+			{
+				path: '/system/eduction/addGrlists',
+				name: 'system_eduction_addGrlists',
+				meta: {
+					title: '分组详情',
+					auth: true
+				},
+				component: () => import('@/components/system/eduction/addGrlists.vue')
+			},
+			{
+				path: '/system/eduction/teachList',
+				name: 'system_eduction_teachList',
+				meta: {
+					title: '讲师列表',
+					auth: true
+				},
+				component: () => import('@/components/system/eduction/teachList.vue')
+			},
 			{
 				path: '/system/adver/upsource',
 				name: 'system_adver_upsource',

+ 27 - 1
src/utils/comm.js

@@ -521,6 +521,31 @@ function Subtr(arg1,arg2){
     n=(r1>=r2)?r1:r2;
     return ((arg1*m-arg2*m)/m).toFixed(n);
 }
+var map = { "0": 52, "1": 53, "2": 54, "3": 55, "4": 56, "5": 57, "6": 58, "7": 59, "8": 60, "9": 61, "A": 0, "B": 1, "C": 2, "D": 3, "E": 4, "F": 5, "G": 6, "H": 7, "I": 8, "J": 9, "K": 10, "L": 11, "M": 12, "N": 13, "O": 14, "P": 15, "Q": 16, "R": 17, "S": 18, "T": 19, "U": 20, "V": 21, "W": 22, "X": 23, "Y": 24, "Z": 25, "a": 26, "b": 27, "c": 28, "d": 29, "e": 30, "f": 31, "g": 32, "h": 33, "i": 34, "j": 35, "k": 36, "l": 37, "m": 38, "n": 39, "o": 40, "p": 41, "q": 42, "r": 43, "s": 44, "t": 45, "u": 46, "v": 47, "w": 48, "x": 49, "y": 50, "z": 51, "+": 62, "/": 63 }
+function base64to2(base64) {
+  let len = base64.length * .75 // 转换为int8array所需长度
+  base64 = base64.replace(/=*$/, '') // 去掉=号(占位的)
+
+  const int8 = new Int8Array(len) //设置int8array视图
+  let arr1, arr2, arr3, arr4, p = 0
+
+  for (let i = 0; i < base64.length; i += 4) {
+    arr1 = map[base64[i]] // 每次循环 都将base644个字节转换为3个int8array直接
+    arr2 = map[base64[i + 1]]
+    arr3 = map[base64[i + 2]]
+    arr4 = map[base64[i + 3]]
+    // 假设数据arr 数据 00101011 00101111 00110011 00110001
+    int8[p++] = arr1 << 2 | arr2 >> 4
+    // 上面的操作 arr1向左边移动2位 变为10101100
+    // arr2 向右移动4位:00000010
+    // | 为'与'操作: 10101110
+    int8[p++] = arr2 << 4 | arr3 >> 2
+    int8[p++] = arr3 << 6 | arr4
+
+  }
+  console.log(int8);
+  return int8
+}
 
 
 export default {
@@ -547,5 +572,6 @@ export default {
     accDiv       : accDiv,
     accMul       : accMul,
     accAdd       : accAdd,
-    Subtr        : Subtr
+    Subtr        : Subtr,
+	base64to2: base64to2
 }