lhl 4 gün önce
ebeveyn
işleme
fef9e3c28e

+ 79 - 0
src/api/system/goods.js

@@ -92,6 +92,85 @@ export function  SystemGoodsCate(data = {}) {
     data : data
     data : data
   });
   });
 }
 }
+
+/**
+ * 获取广告分类
+ * @param data
+ * @constructor
+ */
+export function  getGoodsCate(data = {}) {
+  return request({
+    url: '/systemv1/product/categoryList',
+    method: 'get',
+    params : data
+  });
+}
+
+/**
+ * 添加编辑分类
+ * @param data
+ * @constructor
+ */
+export function addGoodsCate(data) {
+  return request({
+    url: '/systemv1/product/categorySave',
+    method: 'post',
+    data : data
+  });
+}
+
+/**
+ * 删除商品分类
+ * @param data
+ * @constructor
+ */
+export function delGoodsCate(data) {
+  return request({
+    url: '/systemv1/product/categoryDelete',
+    method: 'post',
+    data : data
+  });
+}
+
+/**
+ * 获取商品列表
+ * @param data
+ * @constructor
+ */
+export function getGoodsList(data) {
+  return request({
+    url: '/systemv1/product/productList',
+    method: 'get',
+    params : data
+  });
+}
+
+/**
+ * 添加编辑商品
+ * @param data
+ * @constructor
+ */
+export function saveProduct(data) {
+  return request({
+    url: '/systemv1/product/productSave',
+    method: 'post',
+    data : data
+  });
+}
+
+
+/**
+ * 删除商品
+ * @param data
+ * @constructor
+ */
+export function delProduct(data) {
+  return request({
+    url: '/systemv1/product/productDelete',
+    method: 'get',
+    params : data
+  });
+}
 /**
 /**
  * 添加编辑分类
  * 添加编辑分类
  * @param data
  * @param data

+ 16 - 0
src/api/system/points.js

@@ -0,0 +1,16 @@
+import request from '@/plugins/request/system';
+export function getPointsBill(params) {
+  return request({
+    url: '/systemv1/member/scoreDetail',
+    method: 'get',
+    params: params,
+  })
+}
+
+export function getCzBill(params) {
+  return request({
+    url: '/systemv1/recharge/orderList',
+    method: 'get',
+    params: params,
+  })
+}

+ 9 - 0
src/api/system/signing.js

@@ -92,4 +92,13 @@ export function getDetail(data) {
     method: 'get',
     method: 'get',
     params: data
     params: data
   });
   });
+}
+
+
+export function endComment(data) {
+	return request({
+	  url: '/systemv1/contract/endComment',
+	  method: 'post',
+	  data
+	});
 }
 }

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

@@ -55,6 +55,18 @@ export function  SystemUserMoneyDetailSave(data = {}) {
   });
   });
 }
 }
 
 
+/**
+ * 积分明细补扣
+ * @param data
+ * @constructor
+ */
+export function  SystemUserScoreDetailSave(data = {}) {
+  return request({
+    url: '/systemv1/member/scoreDetailSave',
+    method: 'post',
+    data : data
+  });
+}
 
 
 
 
 
 

+ 250 - 0
src/components/system/chat/index.vue

@@ -0,0 +1,250 @@
+<template>
+    <div style="padding-top: 10px;">
+		<i-page-header :title="pageTitle"></i-page-header>
+        <Card :bordered="false" dis-hover class="ivu-mt">
+            <!-- <Form ref="orderData" :model="orderData">
+                <Row :gutter="24" type="flex">
+					<Col>
+					    <FormItem label="UID:" label-for="uid">
+					        <Input placeholder="用户UID" v-model="orderData.uid"/>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <FormItem label="绑定手机:" label-for="mobile">
+					        <Input placeholder="绑定手机号码" v-model="orderData.mobile"/>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <FormItem label="购买时间:">
+					        <DatePicker v-model="orderData.time" format="yyyy/MM/dd HH:mm:ss" type="datetimerange" placement="bottom-start" placeholder="自定义时间" style="width: 300px;" class="mr20" :options="options"></DatePicker>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <Button label="default" type="primary" icon="ios-search"  class="mr15" style="margin-top: 32px;" @click="orderSearch()">搜索</Button>
+					</Col>
+                </Row>
+            </Form> -->
+            <!-- <Col>
+                <Button class="export" icon="ios-share-outline" @click="exports">导出</Button>
+            </Col> -->
+			
+
+            <Table :columns="columns"  :data="orderList" ref="table" :loading="loading" highlight-row no-data-text="暂无数据" no-filtered-data-text="暂无筛选结果"  class="orderData mt25">
+                <template slot-scope="{ row, index }" slot="order_id">
+                    <span v-text="row.order_id" style="display: block;"></span>
+                </template>
+				<template slot-scope="{ row, index }" slot="uid">
+					<div>{{row.nickname || '微信用户'}}[UID:{{row.uid}}]</div>
+					<div>{{row.mobile || '未绑定手机号'}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="imgs">
+					<img v-if="row.imgs.length>0" v-lazy="row.imgs[0]" :src="row.imgs[0]" v-image-preview style="width: 60px;cursor: pointer"/>
+				</template>
+				
+				<template slot-scope="{ row, index }" slot="is_default">
+					<el-tag type="success" size="mini" v-if="row.is_default == 1">默认模板</el-tag>
+				</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 IPageHeader from "../../../layouts/system/page-header/index";
+    import {SystemShowTemplateList} from "../../../api/system/user";
+
+    export default {
+        name: "chatList",
+        components: {SystemShowTemplateList,IPageHeader},
+        computed: {},
+        data() {
+            return {
+				pageTitle:"聊天记录",
+                options: {
+                    shortcuts: [
+                        {
+                            text: '今天',
+                            value() {
+                                const end = new Date();
+                                const start = new Date();
+                                start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()));
+                                return [start, end];
+                            }
+                        },
+                        {
+                            text: '昨天',
+                            value() {
+                                const end = new Date();
+                                const start = new Date();
+                                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1)));
+                                end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())));
+                                return [start, end];
+                            }
+                        },
+                        {
+                            text: '最近7天',
+                            value() {
+                                const end = new Date();
+                                const start = new Date();
+                                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 6)));
+                                return [start, end];
+                            }
+                        },
+                        {
+                            text: '最近30天',
+                            value() {
+                                const end = new Date();
+                                const start = new Date();
+                                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 29)));
+                                return [start, end];
+                            }
+                        },
+                        {
+                            text: '本月',
+                            value() {
+                                const end = new Date();
+                                const start = new Date();
+                                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), 1)));
+                                return [start, end];
+                            }
+                        },
+                        {
+                            text: '本年',
+                            value() {
+                                const end = new Date();
+                                const start = new Date();
+                                start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
+                                return [start, end];
+                            }
+                        }
+                    ]
+                },
+
+                orderData: {
+					uid             : "",
+                    status          : "all",
+                    time            : [],
+					mobile          : "",
+					show_template_id:"",
+                },
+                columns: [
+					{
+					    title: 'ID',
+					    align: 'center',
+					    key: 'id',
+					    align:'center'
+					},
+                    {
+                        title: '发送人',
+						slot: 'uid',
+                        align:'center'
+                    },
+					{
+					    title: '接收人',
+						slot: 'to_uid',
+					    align:'center'
+					},
+					{
+					    title: '聊天图片',
+					    align: 'center',
+					    slot: 'imgs',
+					    align:'center'
+					},
+					{
+					    title: '内容',
+					    align: 'center',
+					    key: 'content',
+					    align:'left'
+					},
+					{
+					    title: '时间',
+					    align: 'center',
+					    key: 'add_time',
+					    align:'left'
+					},
+                ],
+                loading:false,
+                orderList:[],
+                orderDatalist:{},
+                orderId : 0,
+                page: {
+                    total: 0, // 总条数
+                    page: 1, // 当前页
+                    pageSize: 10 // 每页显示条数
+                },
+            }
+        },
+
+        created() {
+			if(this.$route.query.title){
+				this.pageTitle = this.$route.query.title;
+			}
+			if(this.$route.query.uid){
+				this.orderData.uid = parseInt(this.$route.query.uid);
+			}
+			if(this.$route.query.show_template_id){
+				this.orderData.show_template_id = parseInt(this.$route.query.show_template_id);
+			}
+            this.initView();
+        },
+        methods: {
+            /**
+             * 基本数据
+             */
+            initView: function () {
+                this.getData();
+            },
+			tabsHandleClick:function(tab, event){
+				this.page.page = 1;
+				this.getData();
+			},
+            orderSearch:function(){
+                this.page.page = 1;
+                this.getData();
+            },
+            /**
+             * 分页
+             */
+            tapPage:function(index){
+                this.page.page = index;
+                this.getData();
+            },
+            /**
+             * 获取数据
+             */
+            getData:function () {
+				var that =this;
+                // this.loading = true;
+                var data = {
+                    page :that.page.page,
+                    ...that.orderData
+                };
+                // SystemShowTemplateList(data)
+                //     .then(res=>{
+                //         that.loading = false;
+                //         if(res.code == 200) {
+                //             that.orderList = res.data.list;
+                //             that.page.pageSize = res.data.pageSize;
+                //             that.page.count = res.data.pageCount;
+                //         } else {
+                //             that.$alert(res.msg);
+                //         }
+                //     })
+                //     .catch(err=>{
+                //         that.loading = false;
+                //         that.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+                //     });
+            },
+
+        }
+    }
+</script>
+<style scoped>
+
+</style>

+ 8 - 0
src/components/system/forum/index.vue

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

+ 361 - 0
src/components/system/forum/list.vue

@@ -0,0 +1,361 @@
+<template>
+	<div style="padding-top: 10px;">
+		<i-page-header :title="pageTitle"></i-page-header>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- <Form ref="orderData" :model="orderData">
+                <Row :gutter="24" type="flex">
+					<Col>
+					    <FormItem label="UID:" label-for="uid">
+					        <Input placeholder="用户UID" v-model="orderData.uid"/>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <FormItem label="绑定手机:" label-for="mobile">
+					        <Input placeholder="绑定手机号码" v-model="orderData.mobile"/>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <FormItem label="购买时间:">
+					        <DatePicker v-model="orderData.time" format="yyyy/MM/dd HH:mm:ss" type="datetimerange" placement="bottom-start" placeholder="自定义时间" style="width: 300px;" class="mr20" :options="options"></DatePicker>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <Button label="default" type="primary" icon="ios-search"  class="mr15" style="margin-top: 32px;" @click="orderSearch()">搜索</Button>
+					</Col>
+                </Row>
+            </Form> -->
+			<Col>
+			<Button type="primary" class="export" icon="ios-share-outline" @click="sendOpen">发布贴子</Button>
+			</Col>
+			<Table :columns="columns" :data="orderList" ref="table" :loading="loading" highlight-row no-data-text="暂无数据"
+				no-filtered-data-text="暂无筛选结果" class="orderData mt25">
+				<template slot-scope="{ row, index }" slot="order_id">
+					<span v-text="row.order_id" style="display: block;"></span>
+				</template>
+				<template slot-scope="{ row, index }" slot="uid">
+					<div>{{row.nickname || '微信用户'}}[UID:{{row.uid}}]</div>
+					<div>{{row.mobile || '未绑定手机号'}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="imgs">
+					<div v-if="row.imgs.length>0" style="display: flex;">
+						<img v-for="item in row.imgs" v-lazy="item" :src="item" v-image-preview
+							style="width: 60px;cursor: pointer" />
+					</div>
+				</template>
+
+				<template slot-scope="{ row, index }" slot="handle">
+					<div><el-button plain size="mini" @click="">查看评论</el-button></div>
+					<br />
+					<div><el-button plain size="mini" @click="">删除</el-button></div>
+				</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="sendModel" title="发布贴子" @on-ok="sendOk('sendFormValidate')" @on-cancel="sendCancel" width="800">
+			<Form :model="sendData" :label-width="labelWidth" :rules="ruleValidate" ref="sendFormValidate">
+				<FormItem label="贴子文本" prop="content">
+					<Input v-model="sendData.content" type="textarea" :autosize="{minRows: 5,maxRows: 5}"
+						placeholder="请输入贴子内容"></Input>
+				</FormItem>
+				<FormItem label="图片">
+					<div class="clearfix">
+						<div class="upimg-item fx-r fx-bc fx-ac" style="" v-for="(item,index) in sendData.imgs"
+							:key="index">
+							<img v-lazy="item" :src="item" v-image-preview />
+							<i class="el-icon-error img-remove-btn" @click="removeImgs(index)"></i>
+						</div>
+						<ui-upload style="float: left;" :upUrl="upUrl" fileName="上传图片" :headers="upHeaders"
+							:updata="{isz:0,code:'goods'}" @onUpload="onUpload"
+							v-if="sendData.imgs.length<6"></ui-upload>
+					</div>
+				</FormItem>
+			</Form>
+			<div slot="footer">
+				<Button  size="large"  :loading="modal_loading" @click="sendCancel">取消</Button>
+			            <Button type="primary" size="large"  :loading="modal_loading" @click="sendOk('sendFormValidate')">提交</Button>
+			        </div>
+		</Modal>
+	</div>
+</template>
+<script>
+	import IPageHeader from "../../../layouts/system/page-header/index";
+	import {
+		SystemShowTemplateList
+	} from "../../../api/system/user";
+	import Setting from '@/setting';
+	import UiUpload from "@/ui/upload/index";
+
+	export default {
+		name: "forumList",
+		components: {
+			SystemShowTemplateList,
+			IPageHeader,
+			UiUpload
+		},
+		computed: {},
+		data() {
+			return {
+				modal_loading: false,
+				ruleValidate: {
+					content: [{
+						required: true,
+						message: '请输入贴子内容',
+						trigger: 'blur'
+					}],
+
+				},
+				labelWidth: 120,
+				upHeaders: {},
+				upUrl: '',
+				sendData: {
+					content: '',
+					imgs: []
+				},
+				sendModel: false,
+				pageTitle: "贴子记录",
+				options: {
+					shortcuts: [{
+							text: '今天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date()
+									.getDate()));
+								return [start, end];
+							}
+						},
+						{
+							text: '昨天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 1)));
+								end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate())));
+								return [start, end];
+							}
+						},
+						{
+							text: '最近7天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 6)));
+								return [start, end];
+							}
+						},
+						{
+							text: '最近30天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 29)));
+								return [start, end];
+							}
+						},
+						{
+							text: '本月',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									1)));
+								return [start, end];
+							}
+						},
+						{
+							text: '本年',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
+								return [start, end];
+							}
+						}
+					]
+				},
+
+				orderData: {
+					uid: "",
+					status: "all",
+					time: [],
+					mobile: "",
+					show_template_id: "",
+				},
+				columns: [{
+						title: 'ID',
+						align: 'center',
+						key: 'id',
+						align: 'center'
+					},
+					{
+						title: '发布者',
+						slot: 'uid',
+						align: 'center'
+					},
+					{
+						title: '帖子内容',
+						align: 'center',
+						key: 'content',
+						align: 'left'
+					},
+					{
+						title: '帖子图片',
+						align: 'center',
+						slot: 'imgs',
+						align: 'center'
+					},
+					{
+						title: '时间',
+						align: 'center',
+						key: 'add_time',
+						align: 'left'
+					},
+					{
+						title: '操作',
+						align: 'center',
+						slot: 'handle',
+						align: 'left'
+					},
+				],
+				loading: false,
+				orderList: [],
+				orderDatalist: {},
+				orderId: 0,
+				page: {
+					total: 0, // 总条数
+					page: 1, // 当前页
+					pageSize: 10 // 每页显示条数
+				},
+			}
+		},
+
+		created() {
+			if (this.$route.query.title) {
+				this.pageTitle = this.$route.query.title;
+			}
+			if (this.$route.query.uid) {
+				this.orderData.uid = parseInt(this.$route.query.uid);
+			}
+			if (this.$route.query.show_template_id) {
+				this.orderData.show_template_id = parseInt(this.$route.query.show_template_id);
+			}
+			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;
+			},
+			onUpload: function(res) {
+				if (res.code == -1) {
+					Notice.error({
+						title: "系统提示",
+						content: res.msg
+					});
+				} else {
+					this.sendData.imgs.push(res.data.img);
+				}
+			},
+			removeImgs: function(index) {
+				this.$delete(this.sendData.imgs, index);
+			},
+			sendOpen() {
+				this.sendModel = true
+			},
+			sendCancel() {
+				this.sendModel = false
+				this.sendData = {
+					content: '',
+					imgs: []
+				}
+				console.log('sendCancel');
+			},
+			sendOk(name) {
+				this.$refs[name].validate((valid) => {
+					if (valid) {
+						this.sendCancel()
+						this.$Message.success('发布成功!');
+					} else {
+					}
+				})
+			},
+			tabsHandleClick: function(tab, event) {
+				this.page.page = 1;
+				this.getData();
+			},
+			orderSearch: function() {
+				this.page.page = 1;
+				this.getData();
+			},
+			/**
+			 * 分页
+			 */
+			tapPage: function(index) {
+				this.page.page = index;
+				this.getData();
+			},
+			/**
+			 * 获取数据
+			 */
+			getData: function() {
+				var that = this;
+				// this.loading = true;
+				var data = {
+					page: that.page.page,
+					...that.orderData
+				};
+				// SystemShowTemplateList(data)
+				//     .then(res=>{
+				//         that.loading = false;
+				//         if(res.code == 200) {
+				//             that.orderList = res.data.list;
+				//             that.page.pageSize = res.data.pageSize;
+				//             that.page.count = res.data.pageCount;
+				//         } else {
+				//             that.$alert(res.msg);
+				//         }
+				//     })
+				//     .catch(err=>{
+				//         that.loading = false;
+				//         that.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+				//     });
+			},
+
+		}
+	}
+</script>
+<style scoped>
+	.upimg-item {
+		width: 82px;
+		height: 82px;
+		margin-right: 5px;
+		overflow: hidden;
+		float: left;
+		margin-bottom: 5px;
+		position: relative;
+	}
+
+	.upimg-item img {
+		width: 82px;
+		cursor: pointer;
+	}
+
+	.img-remove-btn {
+		position: absolute;
+		top: 0px;
+		right: 0px;
+		font-size: 24px;
+	}
+</style>

+ 16 - 16
src/components/system/goods/cate.vue

@@ -11,13 +11,13 @@
 	  
 	  
 	  
 	  
       <Form ref="formValidate" :model="formValidate" :label-width="50">
       <Form ref="formValidate" :model="formValidate" :label-width="50">
-        <Row type="flex"  :gutter="24">
+        <!-- <Row type="flex"  :gutter="24">
           <Col v-bind="grid">
           <Col v-bind="grid">
             <FormItem label="搜索:"  label-for="status2">
             <FormItem label="搜索:"  label-for="status2">
               <Input search enter-button placeholder="请输入名称" v-model="formValidate.title" @on-search="userSearchs"/>
               <Input search enter-button placeholder="请输入名称" v-model="formValidate.title" @on-search="userSearchs"/>
             </FormItem>
             </FormItem>
           </Col>
           </Col>
-        </Row>
+        </Row> -->
         <Row type="flex">
         <Row type="flex">
           <Col v-bind="grid">
           <Col v-bind="grid">
             <Button type="primary" @click="tapAdd"  icon="md-add">添加分类</Button>
             <Button type="primary" @click="tapAdd"  icon="md-add">添加分类</Button>
@@ -29,7 +29,7 @@
              no-filtered-userFrom-text="暂无筛选结果"  :loading="loading" highlight-row>
              no-filtered-userFrom-text="暂无筛选结果"  :loading="loading" highlight-row>
 
 
         <template slot-scope="{ row, index }" slot="imgs">
         <template slot-scope="{ row, index }" slot="imgs">
-          <img v-lazy="row.img" :src="row.img" v-image-preview style="width: 60px;cursor: pointer;"/>
+          <img v-lazy="row.pic" :src="row.pic" v-image-preview style="width: 60px;cursor: pointer;"/>
         </template>
         </template>
 
 
 
 
@@ -60,13 +60,13 @@
     <Modal v-model="dialogVisible" :title="title" @on-cancel="editClose">
     <Modal v-model="dialogVisible" :title="title" @on-cancel="editClose">
 
 
       <el-form ref="form" :model="form" label-width="120px">
       <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 label="分类名称" prop="cate_name" :rules="[{ required: true, message: '请输入分类名称'}]">
+          <el-input placeholder="请输入分类名称" autocomplete="off" v-model="form.cate_name"></el-input>
         </el-form-item>
         </el-form-item>
-        <el-form-item label="分类图标" prop="img" :rules="[{ required: true, message: '请上传分类图标'}]">
+        <el-form-item label="分类图标" prop="pic" :rules="[{ required: true, message: '请上传分类图标'}]">
           <ui-upload
           <ui-upload
             :upUrl="upUrl"
             :upUrl="upUrl"
-            :img ="form.img"
+            :img ="form.pic"
             fileName="分类图标"
             fileName="分类图标"
             :headers="upHeaders"
             :headers="upHeaders"
             :updata="{isz:0}"
             :updata="{isz:0}"
@@ -98,7 +98,7 @@
     import UiUpload from "@/ui/upload/index";
     import UiUpload from "@/ui/upload/index";
     import Setting from "@/setting";
     import Setting from "@/setting";
     import util from "@/libs/util";
     import util from "@/libs/util";
-    import {SystemGoodsCate,SystemGoodsCateAdd,SystemGoodsCateDel} from "../../../api/system/goods";
+    import {getGoodsCate,addGoodsCate,delGoodsCate,SystemGoodsCate,SystemGoodsCateAdd,SystemGoodsCateDel} from "../../../api/system/goods";
     export default {
     export default {
         name: "goods_cate",
         name: "goods_cate",
         components: { UiUpload, IPageHeader},
         components: { UiUpload, IPageHeader},
@@ -121,7 +121,7 @@
                 columns1: [
                 columns1: [
                     {
                     {
                         title: '标题',
                         title: '标题',
-                        key: 'title',
+                        key: 'cate_name',
                         minWidth: 150
                         minWidth: 150
                     },
                     },
                     {
                     {
@@ -161,8 +161,8 @@
                 },
                 },
                 formValidate:{title:""},
                 formValidate:{title:""},
                 form:{
                 form:{
-                    title     : "",
-                    img       : "",
+                    cate_name     : "",
+                    pic       : "",
                     sort      : 0,
                     sort      : 0,
                     is_show   : 1,
                     is_show   : 1,
                 },
                 },
@@ -192,7 +192,7 @@
                     title : this.formValidate.title,
                     title : this.formValidate.title,
                     page : this.page.page,
                     page : this.page.page,
                 };
                 };
-                SystemGoodsCate(data)
+                getGoodsCate(data)
                     .then(res=>{
                     .then(res=>{
                         this.loading = false;
                         this.loading = false;
                         if(res.code == 200) {
                         if(res.code == 200) {
@@ -225,7 +225,7 @@
             tapAdd:function(sassid){
             tapAdd:function(sassid){
                 this.dialogVisible = true;
                 this.dialogVisible = true;
                 this.$refs['form'].resetFields();
                 this.$refs['form'].resetFields();
-                this.form = this.$utils.resetFields(this.form, {is_show:0,sort:0});
+                this.form = this.$utils.resetFields(this.form, {is_show:1,sort:0});
             },
             },
 
 
             /**
             /**
@@ -247,7 +247,7 @@
                             data[i] = this.form[i];
                             data[i] = this.form[i];
                         }
                         }
                         data['data'] = JSON.stringify(this.dataAr);
                         data['data'] = JSON.stringify(this.dataAr);
-                        SystemGoodsCateAdd(data)
+                        addGoodsCate(data)
                             .then(res => {
                             .then(res => {
                                 loading.close();
                                 loading.close();
                                 if (res.code == 200) {
                                 if (res.code == 200) {
@@ -273,7 +273,7 @@
                 if(res.code == -1) {
                 if(res.code == -1) {
                     Notice.error({ title : "系统提示", content:res.msg});
                     Notice.error({ title : "系统提示", content:res.msg});
                 } else {
                 } else {
-                    this.form.img = res.data.img;
+                    this.form.pic = res.data.img;
                 }
                 }
             },
             },
 			tapEdit:function(row){
 			tapEdit:function(row){
@@ -289,7 +289,7 @@
                     type: 'warning'
                     type: 'warning'
                 }).then(() => {
                 }).then(() => {
                     this.$utils.loading(this, "删除数据中...");
                     this.$utils.loading(this, "删除数据中...");
-                    SystemGoodsCateDel({id: row.id})
+                    delGoodsCate({id: row.id})
                         .then(res => {
                         .then(res => {
                             this.$utils.loadingClose();
                             this.$utils.loadingClose();
                             this.loading = true;
                             this.loading = true;

+ 262 - 0
src/components/system/points/bill.vue

@@ -0,0 +1,262 @@
+<template>
+  <div style="padding-top: 10px;">
+    <i-page-header :title="pageTitle"></i-page-header>
+    <Card :bordered="false" dis-hover class="ivu-mt">
+      <Form ref="orderData" :model="orderData" label-width="200px">
+        <Row :gutter="24" type="flex">
+          <Col>
+          <FormItem label="UID:" label-for="uid">
+            <Input placeholder="用户UID" v-model="orderData.uid" />
+          </FormItem>
+          </Col>
+          <!-- <Col>
+					    <FormItem label="绑定手机:" label-for="mobile">
+					        <Input placeholder="绑定手机号码" v-model="orderData.mobile"/>
+					    </FormItem>
+					</Col> -->
+          <!-- <Col>
+          <FormItem label="状态:" label-for="status">
+            <Select v-model="orderData.type" placeholder="请选择状态">
+              <Option value="all">全部</Option>
+              <Option value="1">收入</Option>
+              <Option value="0">支出</Option>
+            </Select>
+          </FormItem>
+          </Col> -->
+          <Col>
+          <FormItem label="时间:">
+            <DatePicker v-model="orderData.time" format="yyyy/MM/dd HH:mm:ss" type="datetimerange"
+              placement="bottom-start" placeholder="自定义时间" style="width: 300px;" class="mr20" :options="options">
+            </DatePicker>
+          </FormItem>
+          </Col>
+          <Col>
+          <Button label="default" type="primary" icon="ios-search" class="mr15" style="margin-top: 32px;"
+            @click="orderSearch()">搜索</Button>
+          </Col>
+        </Row>
+      </Form>
+      <!-- <Col>
+                <Button class="export" icon="ios-share-outline" @click="exports">导出</Button>
+            </Col> -->
+
+
+      <Table :columns="columns" :data="orderList" ref="table" :loading="loading" highlight-row no-data-text="暂无数据"
+        no-filtered-data-text="暂无筛选结果" class="orderData mt25">
+        <template slot-scope="{ row, index }" slot="order_id">
+          <span v-text="row.order_id" style="display: block;"></span>
+        </template>
+        <template slot-scope="{ row, index }" slot="uid">
+          <div>UID:{{ row.uid }}</div>
+          <div>{{ row.mobile || '未绑定手机号' }}</div>
+        </template>
+        <template slot-scope="{ row, index }" slot="imgs">
+          <img v-if="row.imgs.length > 0" v-lazy="row.imgs[0]" :src="row.imgs[0]" v-image-preview
+            style="width: 60px;cursor: pointer" />
+        </template>
+
+        <template slot-scope="{ row, index }" slot="into">
+          <el-tag type="success" size="mini" v-if="row.type == 1">+ {{ row.into }}</el-tag>
+          <el-tag type="danger" size="mini" v-else>{{ '- ' + row.into }}</el-tag>
+        </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 IPageHeader from "../../../layouts/system/page-header/index";
+import { SystemShowTemplateList } from "../../../api/system/user";
+import { getPointsBill } from "../../../api/system/points";
+
+export default {
+  name: "pointsBill",
+  components: { SystemShowTemplateList, IPageHeader },
+  computed: {},
+  data() {
+    return {
+      pageTitle: "积分流水",
+      options: {
+        shortcuts: [
+          {
+            text: '今天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()));
+              return [start, end];
+            }
+          },
+          {
+            text: '昨天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1)));
+              end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())));
+              return [start, end];
+            }
+          },
+          {
+            text: '最近7天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 6)));
+              return [start, end];
+            }
+          },
+          {
+            text: '最近30天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 29)));
+              return [start, end];
+            }
+          },
+          {
+            text: '本月',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), 1)));
+              return [start, end];
+            }
+          },
+          {
+            text: '本年',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
+              return [start, end];
+            }
+          }
+        ]
+      },
+
+      orderData: {
+        uid: "",
+        type: "all",
+        time: [],
+        mobile: "",
+        show_template_id: "",
+      },
+      columns: [
+        {
+          title: 'ID',
+          align: 'center',
+          key: 'id',
+          align: 'center'
+        },
+        {
+          title: '用户',
+          slot: 'uid',
+          align: 'center'
+        },
+        {
+          title: '金额',
+          slot: 'into',
+          align: 'center'
+        },
+        {
+          title: '详情',
+          key: 'content',
+          align: 'center'
+        },
+        {
+          title: '剩余积分',
+          key: 'money',
+          align: 'center'
+        },
+        {
+          title: '时间',
+          align: 'center',
+          key: 'time',
+          align: 'left'
+        },
+      ],
+      loading: false,
+      orderList: [],
+      orderDatalist: {},
+      orderId: 0,
+      page: {
+        total: 0, // 总条数
+        page: 1, // 当前页
+        pageSize: 10 // 每页显示条数
+      },
+    }
+  },
+
+  created() {
+    if (this.$route.query.title) {
+      this.pageTitle = this.$route.query.title;
+    }
+    // if (this.$route.query.uid) {
+    //   this.orderData.uid = parseInt(this.$route.query.uid);
+    // }
+    // if (this.$route.query.show_template_id) {
+    //   this.orderData.show_template_id = parseInt(this.$route.query.show_template_id);
+    // }
+    this.initView();
+  },
+  methods: {
+    /**
+     * 基本数据
+     */
+    initView: function () {
+      this.getData();
+    },
+    tabsHandleClick: function (tab, event) {
+      this.page.page = 1;
+      this.getData();
+    },
+    orderSearch: function () {
+      this.page.page = 1;
+      this.getData();
+    },
+    /**
+     * 分页
+     */
+    tapPage: function (index) {
+      this.page.page = index;
+      this.getData();
+    },
+    /**
+     * 获取数据
+     */
+    getData: function () {
+      var that = this;
+      // this.loading = true;
+      var data = {
+        page: that.page.page,
+        ...that.orderData
+      };
+      getPointsBill(data)
+        .then(res => {
+          that.loading = false;
+          if (res.code == 200) {
+            that.orderList = res.data.list;
+            that.page.pageSize = res.data.pageSize;
+            that.page.count = res.data.pageCount;
+          } else {
+            that.$alert(res.msg);
+          }
+        })
+        .catch(err => {
+          that.loading = false;
+          that.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+        });
+    },
+
+  }
+}
+</script>
+<style scoped></style>

+ 286 - 0
src/components/system/points/czList.vue

@@ -0,0 +1,286 @@
+<template>
+  <div style="padding-top: 10px;">
+    <i-page-header :title="pageTitle"></i-page-header>
+    <Card :bordered="false" dis-hover class="ivu-mt">
+      <Form ref="orderData" :model="orderData" label-width="200px">
+        <Row :gutter="24" type="flex">
+          <Col>
+          <FormItem label="UID:" label-for="uid">
+            <Input placeholder="用户UID" v-model="orderData.uid" />
+          </FormItem>
+          </Col>
+          <!-- <Col>
+					    <FormItem label="绑定手机:" label-for="mobile">
+					        <Input placeholder="绑定手机号码" v-model="orderData.mobile"/>
+					    </FormItem>
+					</Col> -->
+          <!-- <Col>
+          <FormItem label="状态:" label-for="status">
+            <Select v-model="orderData.type" placeholder="请选择状态">
+              <Option value="all">全部</Option>
+              <Option value="1">收入</Option>
+              <Option value="0">支出</Option>
+            </Select>
+          </FormItem>
+          </Col> -->
+          <Col>
+          <FormItem label="时间:">
+            <DatePicker v-model="orderData.time" format="yyyy/MM/dd HH:mm:ss" type="datetimerange"
+              placement="bottom-start" placeholder="自定义时间" style="width: 300px;" class="mr20" :options="options">
+            </DatePicker>
+          </FormItem>
+          </Col>
+          <Col>
+          <Button label="default" type="primary" icon="ios-search" class="mr15" style="margin-top: 32px;"
+            @click="orderSearch()">搜索</Button>
+          </Col>
+        </Row>
+      </Form>
+      <!-- <Col>
+                <Button class="export" icon="ios-share-outline" @click="exports">导出</Button>
+            </Col> -->
+
+
+      <Table :columns="columns" :data="orderList" ref="table" :loading="loading" highlight-row no-data-text="暂无数据"
+        no-filtered-data-text="暂无筛选结果" class="orderData mt25">
+        <template slot-scope="{ row, index }" slot="order_id">
+          <span v-text="row.order_id" style="display: block;"></span>
+        </template>
+        <template slot-scope="{ row, index }" slot="uid">
+          <div>昵称:{{ row.nickname || '微信用户' }}( UID:{{ row.uid }})</div>
+          <div>{{ row.mobile || '未绑定手机号' }}</div>
+        </template>
+        <template slot-scope="{ row, index }" slot="imgs">
+          <img v-if="row.imgs.length > 0" v-lazy="row.imgs[0]" :src="row.imgs[0]" v-image-preview
+            style="width: 60px;cursor: pointer" />
+        </template>
+        <template slot-scope="{ row, index }" slot="pay_type">
+          <div v-if="row.pay_type == 'wxpay'">微信</div>
+          <div v-if="row.pay_type == 'system'">系统</div>
+          <div v-if="row.pay_type == 'alipay'">支付宝</div>
+        </template>
+        <template slot-scope="{ row, index }" slot="paid">
+          <el-tag type="success" v-if="row.paid == 1">已支付</el-tag>
+          <el-tag type="danger" v-if="row.paid == 0">未支付</el-tag>  
+        </template>
+        <template slot-scope="{ row, index }" slot="into">
+          <div>{{ row.price }}</div>
+        </template>
+        <template slot-scope="{ row, index }" slot="time">
+          <div>{{ showTime(row.add_time) }}</div>
+        </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 IPageHeader from "../../../layouts/system/page-header/index";
+import { SystemShowTemplateList } from "../../../api/system/user";
+import { getPointsBill,getCzBill } from "../../../api/system/points";
+
+export default {
+  name: "SystemPointsCzList",
+  components: { SystemShowTemplateList, IPageHeader },
+  computed: {},
+  data() {
+    return {
+      pageTitle: "充值记录",
+      options: {
+        shortcuts: [
+          {
+            text: '今天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()));
+              return [start, end];
+            }
+          },
+          {
+            text: '昨天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1)));
+              end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())));
+              return [start, end];
+            }
+          },
+          {
+            text: '最近7天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 6)));
+              return [start, end];
+            }
+          },
+          {
+            text: '最近30天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 29)));
+              return [start, end];
+            }
+          },
+          {
+            text: '本月',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), 1)));
+              return [start, end];
+            }
+          },
+          {
+            text: '本年',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
+              return [start, end];
+            }
+          }
+        ]
+      },
+
+      orderData: {
+        uid: "",
+        type: "all",
+        time: [],
+        mobile: "",
+        show_template_id: "",
+      },
+      columns: [
+        {
+          title: 'ID',
+          align: 'center',
+          key: 'id',
+          align: 'center'
+        },
+        {
+          title: '用户',
+          slot: 'uid',
+          align: 'center'
+        },
+        {
+          title: '充值金额',
+          slot: 'into',
+          align: 'center'
+        },
+        {
+          title: '支付方式',
+          slot: 'pay_type',
+          align: 'center'
+        },
+        // paid 
+        {
+          title: '是否支付',
+          slot: 'paid',
+          align: 'center'
+        },
+        {
+          title: '应得积分',
+          key: 'integral',
+          align: 'center'
+        },
+        // {
+        //   title: '总获得积分',
+        //   key: 'total_integral',
+        //   align: 'center'
+        // },
+        {
+          title: '时间',
+          align: 'center',
+          slot: 'time',
+          align: 'left'
+        },
+      ],
+      loading: false,
+      orderList: [],
+      orderDatalist: {},
+      orderId: 0,
+      page: {
+        total: 0, // 总条数
+        page: 1, // 当前页
+        pageSize: 10 // 每页显示条数
+      },
+    }
+  },
+
+  created() {
+    if (this.$route.query.title) {
+      this.pageTitle = this.$route.query.title;
+    }
+    // if (this.$route.query.uid) {
+    //   this.orderData.uid = parseInt(this.$route.query.uid);
+    // }
+    // if (this.$route.query.show_template_id) {
+    //   this.orderData.show_template_id = parseInt(this.$route.query.show_template_id);
+    // }
+    this.initView();
+  },
+  methods: {
+    showTime(time) {
+      let times = new Date(time * 1000);
+      return times.toLocaleString();
+    },
+    /**
+     * 基本数据
+     */
+    initView: function () {
+      this.getData();
+    },
+    tabsHandleClick: function (tab, event) {
+      this.page.page = 1;
+      this.getData();
+    },
+    orderSearch: function () {
+      this.page.page = 1;
+      this.getData();
+    },
+    /**
+     * 分页
+     */
+    tapPage: function (index) {
+      this.page.page = index;
+      this.getData();
+    },
+    /**
+     * 获取数据
+     */
+    getData: function () {
+      var that = this;
+      // this.loading = true;
+      var data = {
+        page: that.page.page,
+        ...that.orderData
+      };
+      getCzBill(data)
+        .then(res => {
+          that.loading = false;
+          if (res.code == 200) {
+            that.orderList = res.data.list;
+            that.page.pageSize = res.data.pageSize;
+            that.page.count = res.data.total;
+          } else {
+            that.$alert(res.msg);
+          }
+        })
+        .catch(err => {
+          that.loading = false;
+          that.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+        });
+    },
+
+  }
+}
+</script>
+<style scoped></style>

+ 598 - 0
src/components/system/points/list.vue

@@ -0,0 +1,598 @@
+<template>
+	<div style="padding-top: 10px;">
+		<i-page-header :title="pageTitle"></i-page-header>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- <Form ref="orderData" :model="orderData">
+                <Row :gutter="24" type="flex">
+					<Col>
+					    <FormItem label="UID:" label-for="uid">
+					        <Input placeholder="用户UID" v-model="orderData.uid"/>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <FormItem label="绑定手机:" label-for="mobile">
+					        <Input placeholder="绑定手机号码" v-model="orderData.mobile"/>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <FormItem label="购买时间:">
+					        <DatePicker v-model="orderData.time" format="yyyy/MM/dd HH:mm:ss" type="datetimerange" placement="bottom-start" placeholder="自定义时间" style="width: 300px;" class="mr20" :options="options"></DatePicker>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <Button label="default" type="primary" icon="ios-search"  class="mr15" style="margin-top: 32px;" @click="orderSearch()">搜索</Button>
+					</Col>
+                </Row>
+            </Form> -->
+			<Col>
+			<Button type="primary" class="export" icon="ios-share-outline" @click="sendOpen">添加商品</Button>
+			</Col>
+			<Table :columns="columns" :data="orderList" ref="table" :loading="loading" highlight-row no-data-text="暂无数据"
+				no-filtered-data-text="暂无筛选结果" class="orderData mt25">
+				<template slot-scope="{ row, index }" slot="order_id">
+					<span v-text="row.order_id" style="display: block;"></span>
+				</template>
+				<template slot-scope="{ row, index }" slot="uid">
+					<div>{{ row.nickname || '微信用户' }}[UID:{{ row.uid }}]</div>
+					<div>{{ row.mobile || '未绑定手机号' }}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="imgs">
+					<div  style="display: flex;">
+						<img v-lazy="row.image" :src="row.image" v-image-preview
+							style="width: 60px;cursor: pointer" />
+					</div>
+				</template>
+
+				<template slot-scope="{ row, index }" slot="handle">
+					<div><el-button plain size="mini" @click="editGood(row)">编辑</el-button></div>
+					<br />
+					<div><el-button plain size="mini" @click="delGood(row.id)">删除</el-button></div>
+				</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="sendModel" title="添加商品" @on-ok="sendOk('sendFormValidate')" @on-cancel="sendCancel" width="900">
+			<Form :model="sendData" :label-width="labelWidth" :rules="ruleValidate" ref="sendFormValidate">
+				<FormItem label="商品名称" prop="store_name">
+					<Input v-model="sendData.store_name" type="text" placeholder="请输入商品名称"></Input>
+				</FormItem>
+				<FormItem label="商品分类" prop="cate_id">
+					<el-select v-model="sendData.cate_id" placeholder="选择分类">
+						<el-option :label="item.cate_name" :value="item.id" v-for="(item, index) in cateData"
+							:key="index"></el-option>
+					</el-select>
+				</FormItem>
+				<FormItem label="兑换积分" prop="price">
+					<Input v-model="sendData.price" type="number" placeholder="请输入兑换积分"></Input>
+				</FormItem>
+				<FormItem label="商品库存" prop="stock">
+					<Input v-model="sendData.stock" type="number" placeholder="请输入商品库存"></Input>
+				</FormItem>
+				<!-- unit_name -->
+				<FormItem label="商品单位" prop="unit_name">
+					<Input v-model="sendData.unit_name" type="text" placeholder="请输入商品单位"></Input>
+				</FormItem>
+				<FormItem label="商品销量" prop="sales">
+					<Input v-model="sendData.sales" type="number" placeholder="请输入商品销量"></Input>
+				</FormItem>
+				<FormItem label="封面图片" prop="image">
+					<div class="clearfix">
+						<div class="upimg-item fx-r fx-bc fx-ac" style="" v-if="sendData.image">
+							<img v-lazy="sendData.image" :src="sendData.image" v-image-preview />
+							<i class="el-icon-error img-remove-btn" @click="removeImg(index)"></i>
+						</div>
+						<ui-upload style="float: left;" :upUrl="upUrl" fileName="上传图片" :headers="upHeaders"
+							:updata="{ isz: 0, code: 'goods' }" @onUpload="onUpload"
+							v-if="sendData.image == ''"></ui-upload>
+					</div>
+				</FormItem>
+				<FormItem label="轮播图片" prop="slider_image">
+					<div class="clearfix">
+						<div class="upimg-item fx-r fx-bc fx-ac" style="" v-for="(item, index) in sendData.slider_image"
+							:key="index">
+							<img v-lazy="item" :src="item" v-image-preview />
+							<i class="el-icon-error img-remove-btn" @click="removeImgs(index)"></i>
+						</div>
+						<ui-upload style="float: left;" :upUrl="upUrl" fileName="上传图片" :headers="upHeaders"
+							:updata="{ isz: 0, code: 'goods' }" @onUpload="onUploads"
+							v-if="sendData.slider_image.length < 6"></ui-upload>
+					</div>
+				</FormItem>
+				<FormItem label="商品详情" prop="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="sendData.content" @onChange="onChange"
+						@onCreated="onCreated" />
+				</FormItem>
+				<FormItem label="是否上架" prop="status">
+					<el-radio-group v-model="sendData.is_show">
+						<el-radio :label="1">上架</el-radio>
+						<el-radio :label="0">下架</el-radio>
+					</el-radio-group>
+				</FormItem>
+			</Form>
+			<div slot="footer">
+				<Button size="large" :loading="modal_loading" @click="sendCancel">取消</Button>
+				<Button type="primary" size="large" :loading="modal_loading"
+					@click="sendOk('sendFormValidate')">提交</Button>
+			</div>
+		</Modal>
+	</div>
+</template>
+<script>
+import { getGoodsCate, getGoodsList, saveProduct,delProduct } from "../../../api/system/goods";
+
+import axios from 'axios'
+import {
+	DomEditor
+} from '@wangeditor/editor'
+import {
+	Editor,
+	Toolbar
+} from '@wangeditor/editor-for-vue'
+import IPageHeader from "../../../layouts/system/page-header/index";
+import {
+	SystemShowTemplateList
+} from "../../../api/system/user";
+import Setting from '@/setting';
+import UiUpload from "@/ui/upload/index";
+import {
+	upLoad
+} from '../../../api/system/sys'
+
+export default {
+	name: "pointsList",
+	components: {
+		SystemShowTemplateList,
+		IPageHeader,
+		UiUpload,
+		Editor,
+		Toolbar
+	},
+	computed: {},
+	data() {
+		return {
+			editor: null,
+			toolbarConfig: {
+				// toolbarKeys: [ /* 显示哪些菜单,如何排序、分组 */ ],
+				excludeKeys: ['group-video', 'emotion', 'fullScreen'],
+			},
+			editorConfig: {
+				placeholder: "请输入内容...",
+				// autoFocus: false,
+
+				// 所有的菜单配置,都要在 MENU_CONF 属性下
+				MENU_CONF: {
+					uploadImage: {
+
+					},
+				},
+			},
+			modal_loading: false,
+			ruleValidate: {
+				cate_id: [{
+					required: true,
+					message: '请选择商品分类'
+				}],
+				store_name: [{
+					required: true,
+					message: '请输入商品名称',
+					trigger: 'blur'
+				}],
+				content: [{
+					required: true,
+					message: '请输入商品详情',
+				}],
+				stock: [{
+					required: true,
+					message: '请输入商品库存',
+				}],
+				image: [{
+					required: true,
+					message: '请上传封面图片'
+				}],
+				slider_image: [{
+					required: true,
+					message: '请上传轮播图片'
+				}],
+				price: [{
+					required: true,
+					message: '请输入兑换积分',
+					trigger: 'blur'
+				}],
+			},
+			labelWidth: 120,
+			upHeaders: {},
+			upUrl: '',
+			sendData: {
+				sales: '',
+				cate_id: '',
+				price: '',
+				stock: '',
+				store_name: '',
+				content: '',
+				image: '',
+				slider_image: [],
+				is_show: 1
+			},
+			sendModel: false,
+			pageTitle: "积分商品",
+			options: {
+				shortcuts: [{
+					text: '今天',
+					value() {
+						const end = new Date();
+						const start = new Date();
+						start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date()
+							.getDate()));
+						return [start, end];
+					}
+				},
+				{
+					text: '昨天',
+					value() {
+						const end = new Date();
+						const start = new Date();
+						start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+							new Date().getDate() - 1)));
+						end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+							new Date().getDate())));
+						return [start, end];
+					}
+				},
+				{
+					text: '最近7天',
+					value() {
+						const end = new Date();
+						const start = new Date();
+						start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+							new Date().getDate() - 6)));
+						return [start, end];
+					}
+				},
+				{
+					text: '最近30天',
+					value() {
+						const end = new Date();
+						const start = new Date();
+						start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+							new Date().getDate() - 29)));
+						return [start, end];
+					}
+				},
+				{
+					text: '本月',
+					value() {
+						const end = new Date();
+						const start = new Date();
+						start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+							1)));
+						return [start, end];
+					}
+				},
+				{
+					text: '本年',
+					value() {
+						const end = new Date();
+						const start = new Date();
+						start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
+						return [start, end];
+					}
+				}
+				]
+			},
+
+			orderData: {
+				uid: "",
+				status: "all",
+				time: [],
+				mobile: "",
+				show_template_id: "",
+				unit_name: "",
+			},
+			columns: [{
+				title: 'ID',
+				align: 'center',
+				key: 'id',
+				align: 'center'
+			},
+			{
+				title: '商品封面',
+				align: 'center',
+				slot: 'imgs',
+				align: 'center'
+			},
+			{
+				title: '商品名',
+				key: 'store_name',
+				align: 'center'
+			},
+			{
+				title: '单位',
+				align: 'center',
+				key: 'unit_name',
+				align: 'left'
+			},
+			{
+				title: '积分',
+				align: 'center',
+				key: 'price',
+				align: 'left'
+			},
+
+			{
+				title: '时间',
+				align: 'center',
+				key: 'create_time',
+				align: 'left'
+			},
+			{
+				title: '操作',
+				align: 'center',
+				slot: 'handle',
+				align: 'left'
+			},
+			],
+			loading: false,
+			orderList: [],
+			orderDatalist: {},
+			orderId: 0,
+			page: {
+				total: 0, // 总条数
+				page: 1, // 当前页
+				pageSize: 10 // 每页显示条数
+			},
+			cateData: [],
+		}
+	},
+
+	created() {
+		if (this.$route.query.title) {
+			this.pageTitle = this.$route.query.title;
+		}
+		if (this.$route.query.uid) {
+			this.orderData.uid = parseInt(this.$route.query.uid);
+		}
+		if (this.$route.query.show_template_id) {
+			this.orderData.show_template_id = parseInt(this.$route.query.show_template_id);
+		}
+		this.initView();
+		this.getGoodsList();
+		this.getGoodsCate();
+	},
+	methods: {
+		getGoodsList() {
+			getGoodsList().then(res => {
+				this.orderList = res.data.list.map(item => {
+					item.slider_image = item.slider_image.split(',');
+					return item;
+				});
+			})
+		},
+		getGoodsCate() {
+			getGoodsCate().then(res => {
+				this.cateData = res.data.list;
+			})
+		},
+		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 () {
+			let that = this
+			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.editorConfig.MENU_CONF['uploadImage'] = {
+				async customUpload(file, insertFn) {
+					const formData = new FormData()
+					formData.append('file', file)
+					formData.append('code', 'good')
+					formData.append('isz', '0')
+					// formData.append('sign', this.generateSign(file.name)) // 自定义签名
+
+					try {
+						// const response = await axios.post(that.upUrl, formData, {
+						// 	headers: {
+						// 		'SYSTEM-ACC-TOKEN': token
+						// 	}
+						// })
+						upLoad(formData).then(res => {
+							insertFn(res.data.img)
+						})
+
+						// if (response.data.success) {
+						// 	 // 插入图片到编辑器
+						// }
+					} catch (error) {
+						console.error('上传失败:', error)
+					}
+				}
+			}
+		},
+		onUpload: function (res) {
+			if (res.code == -1) {
+				Notice.error({
+					title: "系统提示",
+					content: res.msg
+				});
+			} else {
+				this.sendData.image = res.data.img;
+			}
+		},
+		onUploads: function (res) {
+			if (res.code == -1) {
+				Notice.error({
+					title: "系统提示",
+					content: res.msg
+				});
+			} else {
+				this.sendData.slider_image.push(res.data.img);
+			}
+		},
+		removeImgs: function (index) {
+			this.sendData.slider_image.splice(index, 1);
+			// this.$delete(this.sendData.imgs, index);
+		},
+		removeImg: function (index) {
+			// this.$delete(this.sendData.imgs, index);
+			this.sendData.image = ''
+		},
+		sendOpen() {
+			this.sendModel = true
+		},
+		sendCancel() {
+			this.sendModel = false
+			this.sendData = {
+				content: '',
+				slider_image: [],
+				store_name: '',
+			}
+		},
+		sendOk(name) {
+			console.log(this.sendData);
+			this.$refs[name].validate((valid) => {
+				if (valid) {
+					let pdata = JSON.parse(JSON.stringify(this.sendData));
+					pdata.slider_image = pdata.slider_image.join(',');
+
+					saveProduct(pdata).then(res => {
+						if (res.code == 200) {
+							this.sendCancel()
+							this.getGoodsList()
+							this.$Message.success('发布成功!');
+						} else {
+							this.$Message.error(res.msg);
+						}
+
+					}).catch(err => {
+						this.$Message.error(err.msg);
+					})
+				} else { }
+			})
+		},
+		tabsHandleClick: function (tab, event) {
+			this.page.page = 1;
+			this.getData();
+		},
+		orderSearch: function () {
+			this.page.page = 1;
+			this.getData();
+		},
+		/**
+		 * 分页
+		 */
+		tapPage: function (index) {
+			this.page.page = index;
+			this.getData();
+		},
+		delGood(id) {
+			this.$confirm('确定删除吗?', '系统提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				delProduct({
+					id: id
+				}).then(res => {
+					if (res.code == 200) {
+						this.$Message.success('删除成功!');
+						this.getGoodsList()
+					} else {
+						this.$Message.error(res.msg);
+					}
+				}).catch(err => {
+					this.$Message.error(err.msg);
+				})
+			}).catch(() => {
+				this.$Message({
+					type: 'info',
+					message: '已取消删除'
+				});
+			});
+		},
+		editGood(row) {
+			this.sendData = JSON.parse(JSON.stringify(row));
+			this.sendModel = true;
+		},
+		/**
+		 * 获取数据
+		 */
+		getData: function () {
+			var that = this;
+			// this.loading = true;
+			var data = {
+				page: that.page.page,
+				...that.orderData
+			};
+			// SystemShowTemplateList(data)
+			//     .then(res=>{
+			//         that.loading = false;
+			//         if(res.code == 200) {
+			//             that.orderList = res.data.list;
+			//             that.page.pageSize = res.data.pageSize;
+			//             that.page.count = res.data.pageCount;
+			//         } else {
+			//             that.$alert(res.msg);
+			//         }
+			//     })
+			//     .catch(err=>{
+			//         that.loading = false;
+			//         that.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+			//     });
+		},
+
+	}
+}
+</script>
+<style src="@wangeditor/editor/dist/css/style.css"></style>
+<style scoped>
+@import "~vue2-editor/dist/vue2-editor.css";
+
+.upimg-item {
+	width: 82px;
+	height: 82px;
+	margin-right: 5px;
+	overflow: hidden;
+	float: left;
+	margin-bottom: 5px;
+	position: relative;
+}
+
+.upimg-item img {
+	width: 82px;
+	cursor: pointer;
+}
+
+.img-remove-btn {
+	position: absolute;
+	top: 0px;
+	right: 0px;
+	font-size: 24px;
+}
+</style>

+ 373 - 0
src/components/system/points/order.vue

@@ -0,0 +1,373 @@
+<template>
+	<div style="padding-top: 10px;">
+		<i-page-header :title="pageTitle"></i-page-header>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- <Form ref="orderData" :model="orderData">
+                <Row :gutter="24" type="flex">
+					<Col>
+					    <FormItem label="UID:" label-for="uid">
+					        <Input placeholder="用户UID" v-model="orderData.uid"/>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <FormItem label="绑定手机:" label-for="mobile">
+					        <Input placeholder="绑定手机号码" v-model="orderData.mobile"/>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <FormItem label="购买时间:">
+					        <DatePicker v-model="orderData.time" format="yyyy/MM/dd HH:mm:ss" type="datetimerange" placement="bottom-start" placeholder="自定义时间" style="width: 300px;" class="mr20" :options="options"></DatePicker>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <Button label="default" type="primary" icon="ios-search"  class="mr15" style="margin-top: 32px;" @click="orderSearch()">搜索</Button>
+					</Col>
+                </Row>
+            </Form> -->
+			<Col>
+			<!-- <Button type="primary" class="export" icon="ios-share-outline" @click="sendOpen">添加商品</Button> -->
+			</Col>
+			<Table :columns="columns" :data="orderList" ref="table" :loading="loading" highlight-row no-data-text="暂无数据"
+				no-filtered-data-text="暂无筛选结果" class="orderData mt25">
+				<template slot-scope="{ row, index }" slot="order_id">
+					<span v-text="row.order_id" style="display: block;"></span>
+				</template>
+				<template slot-scope="{ row, index }" slot="uid">
+					<div>{{row.nickname || '微信用户'}}[UID:{{row.uid}}]</div>
+					<div>{{row.mobile || '未绑定手机号'}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="imgs">
+					<div v-if="row.imgs.length>0" style="display: flex;">
+						<img v-for="item in row.imgs" v-lazy="item" :src="item" v-image-preview
+							style="width: 60px;cursor: pointer" />
+					</div>
+				</template>
+
+				<template slot-scope="{ row, index }" slot="handle">
+					<div><el-button plain size="mini" @click="">查看评论</el-button></div>
+					<br />
+					<div><el-button plain size="mini" @click="">删除</el-button></div>
+				</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="sendModel" title="发布贴子" @on-ok="sendOk('sendFormValidate')" @on-cancel="sendCancel" width="800">
+			<Form :model="sendData" :label-width="labelWidth" :rules="ruleValidate" ref="sendFormValidate">
+				<FormItem label="贴子文本" prop="content">
+					<Input v-model="sendData.content" type="textarea" :autosize="{minRows: 5,maxRows: 5}"
+						placeholder="请输入贴子内容"></Input>
+				</FormItem>
+				<FormItem label="图片">
+					<div class="clearfix">
+						<div class="upimg-item fx-r fx-bc fx-ac" style="" v-for="(item,index) in sendData.imgs"
+							:key="index">
+							<img v-lazy="item" :src="item" v-image-preview />
+							<i class="el-icon-error img-remove-btn" @click="removeImgs(index)"></i>
+						</div>
+						<ui-upload style="float: left;" :upUrl="upUrl" fileName="上传图片" :headers="upHeaders"
+							:updata="{isz:0,code:'goods'}" @onUpload="onUpload"
+							v-if="sendData.imgs.length<6"></ui-upload>
+					</div>
+				</FormItem>
+			</Form>
+			<div slot="footer">
+				<Button  size="large"  :loading="modal_loading" @click="sendCancel">取消</Button>
+			            <Button type="primary" size="large"  :loading="modal_loading" @click="sendOk('sendFormValidate')">提交</Button>
+			        </div>
+		</Modal>
+	</div>
+</template>
+<script>
+	import IPageHeader from "../../../layouts/system/page-header/index";
+	import {
+		SystemShowTemplateList
+	} from "../../../api/system/user";
+	import Setting from '@/setting';
+	import UiUpload from "@/ui/upload/index";
+
+	export default {
+		name: "pointsList",
+		components: {
+			SystemShowTemplateList,
+			IPageHeader,
+			UiUpload
+		},
+		computed: {},
+		data() {
+			return {
+				modal_loading: false,
+				ruleValidate: {
+					content: [{
+						required: true,
+						message: '请输入贴子内容',
+						trigger: 'blur'
+					}],
+
+				},
+				labelWidth: 120,
+				upHeaders: {},
+				upUrl: '',
+				sendData: {
+					content: '',
+					imgs: []
+				},
+				sendModel: false,
+				pageTitle: "积分订单",
+				options: {
+					shortcuts: [{
+							text: '今天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date()
+									.getDate()));
+								return [start, end];
+							}
+						},
+						{
+							text: '昨天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 1)));
+								end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate())));
+								return [start, end];
+							}
+						},
+						{
+							text: '最近7天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 6)));
+								return [start, end];
+							}
+						},
+						{
+							text: '最近30天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 29)));
+								return [start, end];
+							}
+						},
+						{
+							text: '本月',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									1)));
+								return [start, end];
+							}
+						},
+						{
+							text: '本年',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
+								return [start, end];
+							}
+						}
+					]
+				},
+
+				orderData: {
+					uid: "",
+					status: "all",
+					time: [],
+					mobile: "",
+					show_template_id: "",
+				},
+				columns: [{
+						title: 'ID',
+						align: 'center',
+						key: 'id',
+						align: 'center'
+					},
+					{
+							title: '订单ID',
+							align: 'center',
+							key: 'order_id',
+							align: 'center'
+						},
+					{
+						title: '用户',
+						align: 'center',
+						slot: 'uid',
+						align: 'center'
+					},
+					{
+						title: '商品名',
+						key: 'name',
+						align: 'center'
+					},
+					{
+						title: '支付积分',
+						align: 'center',
+						key: 'points',
+						align: 'left'
+					},
+					{
+						title: '收货信息',
+						align: 'center',
+						slot: 'info',
+						align: 'left'
+					},
+					{
+						title: '时间',
+						align: 'center',
+						key: 'add_time',
+						align: 'left'
+					},
+					{
+						title: '操作',
+						align: 'center',
+						slot: 'handle',
+						align: 'left'
+					},
+				],
+				loading: false,
+				orderList: [],
+				orderDatalist: {},
+				orderId: 0,
+				page: {
+					total: 0, // 总条数
+					page: 1, // 当前页
+					pageSize: 10 // 每页显示条数
+				},
+			}
+		},
+
+		created() {
+			if (this.$route.query.title) {
+				this.pageTitle = this.$route.query.title;
+			}
+			if (this.$route.query.uid) {
+				this.orderData.uid = parseInt(this.$route.query.uid);
+			}
+			if (this.$route.query.show_template_id) {
+				this.orderData.show_template_id = parseInt(this.$route.query.show_template_id);
+			}
+			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;
+			},
+			onUpload: function(res) {
+				if (res.code == -1) {
+					Notice.error({
+						title: "系统提示",
+						content: res.msg
+					});
+				} else {
+					this.sendData.imgs.push(res.data.img);
+				}
+			},
+			removeImgs: function(index) {
+				this.$delete(this.sendData.imgs, index);
+			},
+			sendOpen() {
+				this.sendModel = true
+			},
+			sendCancel() {
+				this.sendModel = false
+				this.sendData = {
+					content: '',
+					imgs: []
+				}
+				console.log('sendCancel');
+			},
+			sendOk(name) {
+				this.$refs[name].validate((valid) => {
+					if (valid) {
+						this.sendCancel()
+						this.$Message.success('发布成功!');
+					} else {
+					}
+				})
+			},
+			tabsHandleClick: function(tab, event) {
+				this.page.page = 1;
+				this.getData();
+			},
+			orderSearch: function() {
+				this.page.page = 1;
+				this.getData();
+			},
+			/**
+			 * 分页
+			 */
+			tapPage: function(index) {
+				this.page.page = index;
+				this.getData();
+			},
+			/**
+			 * 获取数据
+			 */
+			getData: function() {
+				var that = this;
+				// this.loading = true;
+				var data = {
+					page: that.page.page,
+					...that.orderData
+				};
+				// SystemShowTemplateList(data)
+				//     .then(res=>{
+				//         that.loading = false;
+				//         if(res.code == 200) {
+				//             that.orderList = res.data.list;
+				//             that.page.pageSize = res.data.pageSize;
+				//             that.page.count = res.data.pageCount;
+				//         } else {
+				//             that.$alert(res.msg);
+				//         }
+				//     })
+				//     .catch(err=>{
+				//         that.loading = false;
+				//         that.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+				//     });
+			},
+
+		}
+	}
+</script>
+<style scoped>
+	.upimg-item {
+		width: 82px;
+		height: 82px;
+		margin-right: 5px;
+		overflow: hidden;
+		float: left;
+		margin-bottom: 5px;
+		position: relative;
+	}
+
+	.upimg-item img {
+		width: 82px;
+		cursor: pointer;
+	}
+
+	.img-remove-btn {
+		position: absolute;
+		top: 0px;
+		right: 0px;
+		font-size: 24px;
+	}
+</style>

+ 348 - 311
src/components/system/setting/sys/index.vue

@@ -2,175 +2,198 @@
   <div>
   <div>
     <i-page-header class="product_tabs" title="基本设置"></i-page-header>
     <i-page-header class="product_tabs" title="基本设置"></i-page-header>
     <Card :bordered="false" dis-hover class="ivu-mt">
     <Card :bordered="false" dis-hover class="ivu-mt">
-      <el-tabs v-model="activeName"  @tab-click="handleClick">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
         <el-tab-pane label="基本配置" style="background: #fff;" name="sys">
         <el-tab-pane label="基本配置" style="background: #fff;" name="sys">
-          <el-form ref="form" :model="form" label-width="150px" >
+          <el-form ref="form" :model="form" label-width="150px">
             <el-divider content-position="left">基本数据</el-divider>
             <el-divider content-position="left">基本数据</el-divider>
             <Row :gutter="24">
             <Row :gutter="24">
               <Col span="12">
               <Col span="12">
-                <el-form-item label="平台名称">
-                  <el-input v-model="form.title"></el-input>
-                </el-form-item>
+              <el-form-item label="平台名称">
+                <el-input v-model="form.title"></el-input>
+              </el-form-item>
+              </Col>
+            </Row>
+            <Row :gutter="24">
+              <Col span="12">
+              <el-form-item label="资源域名">
+                <el-input v-model="form.system_url"></el-input>
+              </el-form-item>
+              </Col>
+            </Row>
+            <Row :gutter="24">
+              <Col span="12">
+              <el-form-item label="平台名称">
+                <el-input v-model="form.title"></el-input>
+              </el-form-item>
               </Col>
               </Col>
             </Row>
             </Row>
-			<Row :gutter="24">
-			  <Col  span="12">
-			    <el-form-item label="资源域名">
-			      <el-input v-model="form.system_url"></el-input>
-			    </el-form-item>
-			  </Col>
-			</Row>
             <el-divider content-position="left">系统信息</el-divider>
             <el-divider content-position="left">系统信息</el-divider>
             <el-form-item label="平台说明">
             <el-form-item label="平台说明">
-              <el-input type="textarea"
-                        placeholder="请输入平台说明信息"
-                        :autosize="{ minRows: 6, maxRows: 30}"
-                        v-model="form.tag"></el-input>
+              <el-input type="textarea" placeholder="请输入平台说明信息" :autosize="{ minRows: 6, maxRows: 30 }"
+                v-model="form.tag"></el-input>
             </el-form-item>
             </el-form-item>
-			
-			<el-form-item label="客服电话">
-			  <el-input placeholder="请输入客服电话" v-model="form.custom_tel" style="width: 200px;"></el-input>
-			</el-form-item>
-			
-			<!-- <el-divider content-position="left">商城设置</el-divider>
+
+            <el-form-item label="客服电话">
+              <el-input placeholder="请输入客服电话" v-model="form.custom_tel" style="width: 200px;"></el-input>
+            </el-form-item>
+            <!-- <el-divider content-position="left">商城设置</el-divider>
 			<Row :gutter="24">
 			<Row :gutter="24">
 			  <Col  span="12">
 			  <Col  span="12">
 			    <el-form-item label="IP商品收益百分比">
 			    <el-form-item label="IP商品收益百分比">
 			      <el-input v-model="form.ip_income_per" style="width: 200px;"><template slot="append">%</template></el-input>
 			      <el-input v-model="form.ip_income_per" style="width: 200px;"><template slot="append">%</template></el-input>
-			    </el-form-item>
-			  </Col>
-			  
-			  <Col  span="12">
-			    <el-form-item label="推广用户收益百分比">
-			      <el-input v-model="form.tree_income_per" style="width: 200px;"><template slot="append">%</template></el-input>
-			    </el-form-item>
-			  </Col>
-			</Row>
-			<Row :gutter="24">
-			  
-			  <Col  span="12">
-			    <el-form-item label="消费转积分百分比">
-			      <el-input v-model="form.money_to_score_per" style="width: 200px;"><template slot="append">%</template></el-input>
-			    </el-form-item>
-			  </Col>
-			  <Col  span="12">
-			    <el-form-item label="二级推广收益百分比">
-			      <el-input v-model="form.tree_income_per_two" style="width: 200px;"><template slot="append">%</template></el-input>
-			    </el-form-item>
-			  </Col>
-			</Row>
-			<el-divider content-position="left">提现配置</el-divider>
-			<Row :gutter="24">
-			  <Col span="12">
-			    <el-form-item label="提现最低限额">
-					<el-input placeholder="单位:元"  type="number" v-model="form.tx_limit_money"><template slot="append">元</template></el-input>
-					<div>提现最低限额,满额提现</div>
-			    </el-form-item>
-			  </Col>
-			  <Col span="12">
-			    <el-form-item label="提现手续费">
-			  		<el-input placeholder="单位:%"  type="number" v-model="form.tx_process_per"><template slot="append">%</template></el-input>
-			  		<div>提现手续费用比例</div>
-			    </el-form-item>
-			  </Col>
-			</Row>
-			<Row :gutter="24">
-			  <Col span="12">
-			    <el-form-item label="提现手续费上限">
-					<el-input placeholder="单位:元"  type="number" v-model="form.tx_process_max"><template slot="append">元</template></el-input>
-					<div>提现手续费上限</div>
-			    </el-form-item>
-			  </Col>
-			</Row> -->
-			
+</el-form-item>
+</Col>
+
+<Col span="12">
+<el-form-item label="推广用户收益百分比">
+  <el-input v-model="form.tree_income_per" style="width: 200px;"><template slot="append">%</template></el-input>
+</el-form-item>
+</Col>
+</Row>
+<Row :gutter="24">
+
+  <Col span="12">
+  <el-form-item label="消费转积分百分比">
+    <el-input v-model="form.money_to_score_per" style="width: 200px;"><template slot="append">%</template></el-input>
+  </el-form-item>
+  </Col>
+  <Col span="12">
+  <el-form-item label="二级推广收益百分比">
+    <el-input v-model="form.tree_income_per_two" style="width: 200px;"><template slot="append">%</template></el-input>
+  </el-form-item>
+  </Col>
+</Row>
+<el-divider content-position="left">提现配置</el-divider>
+<Row :gutter="24">
+  <Col span="12">
+  <el-form-item label="提现最低限额">
+    <el-input placeholder="单位:元" type="number" v-model="form.tx_limit_money"><template
+        slot="append">元</template></el-input>
+    <div>提现最低限额,满额提现</div>
+  </el-form-item>
+  </Col>
+  <Col span="12">
+  <el-form-item label="提现手续费">
+    <el-input placeholder="单位:%" type="number" v-model="form.tx_process_per"><template
+        slot="append">%</template></el-input>
+    <div>提现手续费用比例</div>
+  </el-form-item>
+  </Col>
+</Row>
+<Row :gutter="24">
+  <Col span="12">
+  <el-form-item label="提现手续费上限">
+    <el-input placeholder="单位:元" type="number" v-model="form.tx_process_max"><template
+        slot="append">元</template></el-input>
+    <div>提现手续费上限</div>
+  </el-form-item>
+  </Col>
+</Row> -->
+
             <el-form-item>
             <el-form-item>
               <el-button type="primary" @click="onSubmit">立即修改</el-button>
               <el-button type="primary" @click="onSubmit">立即修改</el-button>
               <el-button>取消</el-button>
               <el-button>取消</el-button>
             </el-form-item>
             </el-form-item>
           </el-form>
           </el-form>
         </el-tab-pane>
         </el-tab-pane>
-		<el-tab-pane label="分享配置" style="background: #fff;" name="share">
-			<el-form ref="shareForm" :model="shareForm" label-width="150px" >
-				<el-divider content-position="left">分享信息</el-divider>
-				<Row :gutter="24">
-					<Col span="12">
-						<el-form-item label="分享标题">
-							<el-input v-model="shareForm.title" placeholder="请输入分享标题"></el-input>
-						</el-form-item>
-					</Col>
-				</Row>
-				
-				<Row :gutter="24">
-					<Col span="12">
-						<el-form-item label="分享图片">
-							
-							<div class="fx-r fx-bc">
-								<div class="fx-r fx-bc fx-ac" v-if="shareForm.img" style="border: 1px dashed #d9d9d9;width: 82px;height: 82px;margin-right:12px;border-radius: 6px;cursor: pointer;overflow: hidden;">
-									<img  v-lazy="shareForm.img" :src="shareForm.img" v-image-preview style="display: block;height: 100%;"/>
-								</div>
-								<ui-upload
-								  :upUrl="upUrl"
-								  :fileName="'上传'"
-								  :headers="upHeaders"
-								  :updata="{isz:0,code:'share'}"
-								  @onUpload="onUpload"
-								>
-								</ui-upload>
-							</div>
-							
-						</el-form-item>
-					</Col>
-				</Row>
-				<Row :gutter="24">
-					<Col span="12">
-						<el-form-item label="分享描述">
-							<el-input type="textarea" placeholder="请输入描述信息" :autosize="{ minRows: 2, maxRows: 2}" v-model="shareForm.content"></el-input>
-						</el-form-item>
-					</Col>
-				</Row>
-				<Row :gutter="24">
-					<Col span="12">
-						<el-form-item label="分享路径">
-							<el-input v-model="shareForm.query" placeholder="请输入分享路径"></el-input>
-						</el-form-item>
-					</Col>
-				</Row>
-			  <el-form-item>
-			    <el-button type="primary" @click="onSubmit">立即修改</el-button>
-			    <el-button>取消</el-button>
-			  </el-form-item>
-			</el-form>
-		</el-tab-pane>
-		<el-tab-pane label="邀请配置" style="background: #fff;" name="invite">
-			<el-form ref="inviteForm" :model="inviteForm" label-width="150px" >
-				<el-divider content-position="left">邀请信息</el-divider>
-				
-				<Row :gutter="24">
-					<Col span="12">
-						<el-form-item label="邀请海报">
-							<div class="fx-r fx-bc">
-								<div class="fx-r fx-bc fx-ac" v-if="inviteForm.img" style="border: 1px dashed #d9d9d9;width: 82px;height: 82px;margin-right:12px;border-radius: 6px;cursor: pointer;overflow: hidden;">
-									<img  v-lazy="inviteForm.img" :src="inviteForm.img" v-image-preview style="display: block;height: 100%;"/>
-								</div>
-								<ui-upload
-								  :upUrl="upUrl"
-								  :fileName="'上传'"
-								  :headers="upHeaders"
-								  :updata="{isz:0,code:'invite'}"
-								  @onUpload="onUpload"
-								>
-								</ui-upload>
-							</div>
-						</el-form-item>
-					</Col>
-				</Row>
-			  <el-form-item>
-			    <el-button type="primary" @click="onSubmit">立即修改</el-button>
-			    <el-button>取消</el-button>
-			  </el-form-item>
-			</el-form>
-		</el-tab-pane>
-<!-- 		<el-tab-pane label="微信配置" style="background: #fff;" name="weixin">
+        <el-tab-pane label="分享配置" style="background: #fff;" name="share">
+          <el-form ref="shareForm" :model="shareForm" label-width="150px">
+            <el-divider content-position="left">分享信息</el-divider>
+            <Row :gutter="24">
+              <Col span="12">
+              <el-form-item label="分享标题">
+                <el-input v-model="shareForm.title" placeholder="请输入分享标题"></el-input>
+              </el-form-item>
+              </Col>
+            </Row>
+
+            <Row :gutter="24">
+              <Col span="12">
+              <el-form-item label="分享图片">
+
+                <div class="fx-r fx-bc">
+                  <div class="fx-r fx-bc fx-ac" v-if="shareForm.img"
+                    style="border: 1px dashed #d9d9d9;width: 82px;height: 82px;margin-right:12px;border-radius: 6px;cursor: pointer;overflow: hidden;">
+                    <img v-lazy="shareForm.img" :src="shareForm.img" v-image-preview
+                      style="display: block;height: 100%;" />
+                  </div>
+                  <ui-upload :upUrl="upUrl" :fileName="'上传'" :headers="upHeaders" :updata="{ isz: 0, code: 'share' }"
+                    @onUpload="onUpload">
+                  </ui-upload>
+                </div>
+
+              </el-form-item>
+              </Col>
+            </Row>
+            <Row :gutter="24">
+              <Col span="12">
+              <el-form-item label="分享描述">
+                <el-input type="textarea" placeholder="请输入描述信息" :autosize="{ minRows: 2, maxRows: 2 }"
+                  v-model="shareForm.content"></el-input>
+              </el-form-item>
+              </Col>
+            </Row>
+            <Row :gutter="24">
+              <Col span="12">
+              <el-form-item label="分享路径">
+                <el-input v-model="shareForm.query" placeholder="请输入分享路径"></el-input>
+              </el-form-item>
+              </Col>
+            </Row>
+            <el-form-item>
+              <el-button type="primary" @click="onSubmit">立即修改</el-button>
+              <el-button>取消</el-button>
+            </el-form-item>
+          </el-form>
+        </el-tab-pane>
+        <el-tab-pane label="邀请配置" style="background: #fff;" name="invite">
+          <el-form ref="inviteForm" :model="inviteForm" label-width="150px">
+            <el-divider content-position="left">邀请信息</el-divider>
+
+            <Row :gutter="24">
+              <Col span="12">
+              <el-form-item label="邀请海报">
+                <div class="fx-r fx-bc">
+                  <div class="fx-r fx-bc fx-ac" v-if="inviteForm.img"
+                    style="border: 1px dashed #d9d9d9;width: 82px;height: 82px;margin-right:12px;border-radius: 6px;cursor: pointer;overflow: hidden;">
+                    <img v-lazy="inviteForm.img" :src="inviteForm.img" v-image-preview
+                      style="display: block;height: 100%;" />
+                  </div>
+                  <ui-upload :upUrl="upUrl" :fileName="'上传'" :headers="upHeaders" :updata="{ isz: 0, code: 'invite' }"
+                    @onUpload="onUpload">
+                  </ui-upload>
+                </div>
+              </el-form-item>
+              </Col>
+            </Row>
+            <el-form-item>
+              <el-button type="primary" @click="onSubmit">立即修改</el-button>
+              <el-button>取消</el-button>
+            </el-form-item>
+          </el-form>
+        </el-tab-pane>
+        <el-tab-pane label="积分设置" style="background: #fff;" name="score">
+          <el-form ref="scoreForm" :model="scoreForm" label-width="150px">
+            <el-divider content-position="left">积分信息</el-divider>
+            <Row :gutter="24">
+              <Col span="12">
+              <el-form-item label="积分比例"> 
+                <el-input v-model="scoreForm.points_transformation" placeholder="请输入积分比例"></el-input>
+              <div>即充值1元获得{{ scoreForm.points_transformation }}积分</div>
+
+              </el-form-item>
+              <el-form-item label="分享赠送积分"> 
+                <el-input v-model="scoreForm.points_share" placeholder="请输入分享赠送积分"></el-input>
+              </el-form-item>
+              </Col>
+            </Row>
+            <el-form-item>
+              <el-button type="primary" @click="onSubmit">立即修改</el-button>
+              <el-button>取消</el-button>
+            </el-form-item>
+          </el-form>
+        </el-tab-pane>
+        <!-- 		<el-tab-pane label="微信配置" style="background: #fff;" name="weixin">
 			<el-form ref="weixinForm" :model="weixinForm" label-width="150px" >
 			<el-form ref="weixinForm" :model="weixinForm" label-width="150px" >
 				<el-divider content-position="left">分享信息</el-divider>
 				<el-divider content-position="left">分享信息</el-divider>
 				<Row :gutter="24">
 				<Row :gutter="24">
@@ -248,177 +271,191 @@
 			</el-form>
 			</el-form>
 			
 			
 		</el-tab-pane> -->
 		</el-tab-pane> -->
-	  </el-tabs>
+      </el-tabs>
     </Card>
     </Card>
   </div>
   </div>
 
 
 </template>
 </template>
 <script>
 <script>
-    import UiUpload from "../../../../ui/upload/index";
-    import Setting from "../../../../setting";
-    import {SystemSave, SystemSys} from "../../../../api/system/sys";
-    import util from "../../../../libs/util";
-    import IPageHeader from "../../../../layouts/system/page-header/index";
-    export default {
-        name: "index",
-        components: {IPageHeader, UiUpload},
-        computed: {},
-        data() {
-            return {
-                upHeaders:{},
-                upUrl  :"",
-				certUrl:"",
-				activeName:"sys",
-				shareForm:{
-					title:"",
-					content:"",
-					img:"",
-					query:""
-				},
-				weixinForm:{
-					appid:"",
-					secret:"",
-					mchid:"",
-					apiv2key:"",
-					apiclient_key:"",
-					apiclient_cert:"",
-					notify_url:""
-				},
-				inviteForm:{
-					img:"",
-				},
-                form  : {
-                    title     : "",
-                    system_url       : "",
-                    tag       : "",
-					custom_tel:"",
-					// ip_income_per:"",
-					// tree_income_per:"",
-					// tree_income_per_two:"",
-					// money_to_score_per: "",
-					// tx_limit_money:"",
-					// tx_process_per:"",
-					// tx_process_max:"",
-                }
-            }
-        },
+import UiUpload from "../../../../ui/upload/index";
+import Setting from "../../../../setting";
+import { SystemSave, SystemSys } from "../../../../api/system/sys";
+import util from "../../../../libs/util";
+import IPageHeader from "../../../../layouts/system/page-header/index";
+export default {
+  name: "index",
+  components: { IPageHeader, UiUpload },
+  computed: {},
+  data() {
+    return {
+      upHeaders: {},
+      upUrl: "",
+      certUrl: "",
+      activeName: "sys",
+      shareForm: {
+        title: "",
+        content: "",
+        img: "",
+        query: ""
+      },
+      weixinForm: {
+        appid: "",
+        secret: "",
+        mchid: "",
+        apiv2key: "",
+        apiclient_key: "",
+        apiclient_cert: "",
+        notify_url: ""
+      },
+      inviteForm: {
+        img: "",
+      },
+      form: {
+        title: "",
+        system_url: "",
+        tag: "",
+        custom_tel: "",
+        // ip_income_per:"",
+        // tree_income_per:"",
+        // tree_income_per_two:"",
+        // money_to_score_per: "",
+        // tx_limit_money:"",
+        // tx_process_per:"",
+        // tx_process_max:"",
+      },
+      scoreForm: {
+        points_transformation: "",
+        points_share: "",
+      },
+    }
+  },
 
 
-        created() {
-            var upHeaders = {};
-            //上传路径
-            this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
-			this.certUrl = Setting.apiBaseURL + "/systemv1/upload/uploadCertFile"
-            //上传header数据
-            const token = util.cookies.get('system_token');
-            if (token) {
-                upHeaders['SYSTEM-ACC-TOKEN'] = token;
-            }
-            this.upHeaders = upHeaders;
-        },
+  created() {
+    var upHeaders = {};
+    //上传路径
+    this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
+    this.certUrl = Setting.apiBaseURL + "/systemv1/upload/uploadCertFile"
+    //上传header数据
+    const token = util.cookies.get('system_token');
+    if (token) {
+      upHeaders['SYSTEM-ACC-TOKEN'] = token;
+    }
+    this.upHeaders = upHeaders;
+  },
 
 
-        mounted(){
-            this.$utils.loading(this,"loading..");
-            SystemSys()
-                .then(res=>{
-                    this.$utils.loadingClose();
-                    if(res.code == 200) {
-                        this.form = res.data;
-						this.weixinForm = res.data.wxconfig;
-						this.shareForm = res.data.shareconfig;
-						this.inviteForm = res.data.inviteconfig;
-                    } else {
-                        this.$alert(res.msg);
-                    }
-                })
-                .catch(err=>{
-                    this.$utils.loadingClose();
-                    this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
-                });
-        },
+  mounted() {
+    this.$utils.loading(this, "loading..");
+    SystemSys()
+      .then(res => {
+        this.$utils.loadingClose();
+        if (res.code == 200) {
+          this.form = res.data;
+          this.weixinForm = res.data.wxconfig;
+          this.shareForm = res.data.shareconfig;
+          this.inviteForm = res.data.inviteconfig;
+          this.scoreForm = {
+            points_transformation: res.data.points_transformation,
+            points_share: res.data.points_share,
+          }
+        } else {
+          this.$alert(res.msg);
+        }
+      })
+      .catch(err => {
+        this.$utils.loadingClose();
+        this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+      });
+  },
 
 
-        methods: {
-			handleClick(tab, event) {},
-            /**
-             * 提交数据
-             */
-            onSubmit:function () {
-				let post = null;
-				if(this.activeName=="sys"){
-					post = this.form;
-					post.saveType = "sys";
-				}
-				if(this.activeName=="weixin"){
-					post = this.weixinForm;
-					post.saveType = "weixin";
-				}
-				if(this.activeName=="share"){
-					post = this.shareForm;
-					post.saveType = "share";
-				}
-				if(this.activeName=="invite"){
-					post = this.inviteForm;
-					post.saveType = "invite";
-				}
-				if(post==null) return;
-				this.$utils.loading(this,"加载中...");
-                SystemSave(post).then(res=>{
-                    this.$utils.loadingClose();
-                    if(res.code == 200) {
-                        this.$message({message: '恭喜你,修改成功',type: 'success'});
-                    } else {
-                        this.$alert(res.msg);
-                    }
-                }).catch(err=>{
-                    this.$utils.loadingClose();
-                    this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
-                });
-            },
-			onUpload:function (res) {
-			    if(res.code == -1) {
-			        Notice.error({ title : "系统提示", content:res.msg});
-			    } else {
-					if(this.activeName=='share') this.shareForm.img = res.data.img;
-					if(this.activeName=='invite') this.inviteForm.img = res.data.img;
-			    }
-			},
-			onPreview:function(res){
-				console.log(res)
-			},
-			//key文件
-			handleUploadSuccessKey(res, file){
-				this.$utils.loadingClose();
-				if(res.code==-1){
-					Notice.error({ title : "系统提示", content:res.msg});
-				}else{
-					this.weixinForm.apiclient_key = res.data.cert;
-				}
-			},
-			//Cert文件
-			handleUploadSuccessCert(res, file){
-				this.$utils.loadingClose();
-				if(res.code==-1){
-					Notice.error({ title : "系统提示", content:res.msg});
-				}else{
-					this.weixinForm.apiclient_cert = res.data.cert;
-				}
-			},
-			
-			
-			beforeUploadUpload(file) {
-			    this.$utils.loading(this,"上传中..");
-			},
-			handleUploadSuccess(res, file) {
-			    this.$utils.loadingClose();
-			    
-			},
-			handleUploadError:function (err, file, fileList) {
-			    this.$utils.loadingClose();
-			  //  this.$message.error(err);
-			    console.log(err);
-			}
+  methods: {
+    handleClick(tab, event) { },
+    /**
+     * 提交数据
+     */
+    onSubmit: function () {
+      let post = null;
+      if (this.activeName == "sys") {
+        post = this.form;
+        post.saveType = "sys";
+      }
+      if (this.activeName == "weixin") {
+        post = this.weixinForm;
+        post.saveType = "weixin";
+      }
+      if (this.activeName == "share") {
+        post = this.shareForm;
+        post.saveType = "share";
+      }
+      if (this.activeName == "invite") {
+        post = this.inviteForm;
+        post.saveType = "invite";
+      }
+      if (this.activeName == "score") {
+        post = this.scoreForm;
+        post.saveType = "score";
+      }
+      if (post == null) return;
+      this.$utils.loading(this, "加载中...");
+      SystemSave(post).then(res => {
+        this.$utils.loadingClose();
+        if (res.code == 200) {
+          this.$message({ message: '恭喜你,修改成功', type: 'success' });
+        } else {
+          this.$alert(res.msg);
         }
         }
+      }).catch(err => {
+        this.$utils.loadingClose();
+        this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+      });
+    },
+    onUpload: function (res) {
+      if (res.code == -1) {
+        Notice.error({ title: "系统提示", content: res.msg });
+      } else {
+        if (this.activeName == 'share') this.shareForm.img = res.data.img;
+        if (this.activeName == 'invite') this.inviteForm.img = res.data.img;
+      }
+    },
+    onPreview: function (res) {
+      console.log(res)
+    },
+    //key文件
+    handleUploadSuccessKey(res, file) {
+      this.$utils.loadingClose();
+      if (res.code == -1) {
+        Notice.error({ title: "系统提示", content: res.msg });
+      } else {
+        this.weixinForm.apiclient_key = res.data.cert;
+      }
+    },
+    //Cert文件
+    handleUploadSuccessCert(res, file) {
+      this.$utils.loadingClose();
+      if (res.code == -1) {
+        Notice.error({ title: "系统提示", content: res.msg });
+      } else {
+        this.weixinForm.apiclient_cert = res.data.cert;
+      }
+    },
+
+
+    beforeUploadUpload(file) {
+      this.$utils.loading(this, "上传中..");
+    },
+    handleUploadSuccess(res, file) {
+      this.$utils.loadingClose();
+
+    },
+    handleUploadError: function (err, file, fileList) {
+      this.$utils.loadingClose();
+      //  this.$message.error(err);
+      console.log(err);
     }
     }
+  }
+}
 </script>
 </script>
 <style scoped>
 <style scoped>
-	.el-upload{width: 100%;}
+.el-upload {
+  width: 100%;
+}
 </style>
 </style>

+ 395 - 327
src/components/system/showTemplate/list.vue

@@ -1,33 +1,35 @@
 <template>
 <template>
-    <div>
-        <i-page-header :title="pageTitle"></i-page-header>
-        <Card :bordered="false" dis-hover class="ivu-mt">
-            <div style="padding: 20px 0;">
+	<div>
+		<i-page-header :title="pageTitle"></i-page-header>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<div style="padding: 20px 0;">
 				<el-select v-model="detial.is_hot" placeholder="是否热门" style="margin:0px 10px 10px 0px;width: 140px;">
 				<el-select v-model="detial.is_hot" placeholder="是否热门" style="margin:0px 10px 10px 0px;width: 140px;">
 					<el-option label="选择是否热门" value=""></el-option>
 					<el-option label="选择是否热门" value=""></el-option>
-				    <el-option label="热门" value="1"></el-option>
+					<el-option label="热门" value="1"></el-option>
 					<el-option label="常规" value="0"></el-option>
 					<el-option label="常规" value="0"></el-option>
 				</el-select>
 				</el-select>
-				<el-select v-model="detial.is_recommend" placeholder="是否推荐" style="margin:0px 10px 10px 0px;width: 140px;">
+				<el-select v-model="detial.is_recommend" placeholder="是否推荐"
+					style="margin:0px 10px 10px 0px;width: 140px;">
 					<el-option label="选择是否推荐" value=""></el-option>
 					<el-option label="选择是否推荐" value=""></el-option>
-				    <el-option label="推荐" value="1"></el-option>
+					<el-option label="推荐" value="1"></el-option>
 					<el-option label="常规" value="0"></el-option>
 					<el-option label="常规" value="0"></el-option>
 				</el-select>
 				</el-select>
-				<Input placeholder="请输入标题"  style="width:140px;" class="mr10" v-model="detial.title"/>
-				<DatePicker style="width: 250px" format="yyyy-MM-dd HH:mm:ss" v-model="detial.time" type="datetimerange" placement="bottom-start" placeholder="更新时间范围" :options="options"></DatePicker>
+				<Input placeholder="请输入标题" style="width:140px;" class="mr10" v-model="detial.title" />
+				<DatePicker style="width: 250px" format="yyyy-MM-dd HH:mm:ss" v-model="detial.time" type="datetimerange"
+					placement="bottom-start" placeholder="更新时间范围" :options="options"></DatePicker>
 				<el-button type="primary" style="margin-left: 6px;" @click="tapSeach">查询</el-button>
 				<el-button type="primary" style="margin-left: 6px;" @click="tapSeach">查询</el-button>
-                <el-button type="danger" style="margin-top: 10px;" @click="tapAdd">添加模板</el-button>
-            </div>
-			
+				<el-button type="danger" style="margin-top: 10px;" @click="tapAdd">添加模板</el-button>
+			</div>
+
 			<div class="muser-tab-continer">
 			<div class="muser-tab-continer">
-			    <a class="muser-tab-a" :class="detial.status==''   ? 'active':''" @click="statusChange('')">全部</a>
-			    <a class="muser-tab-a" :class="detial.status=='1'  ? 'active':''" @click="statusChange('1')">上线</a>
-			    <a class="muser-tab-a" :class="detial.status=='0'  ? 'active':''" @click="statusChange('0')">下架</a>
+				<a class="muser-tab-a" :class="detial.status==''   ? 'active':''" @click="statusChange('')">全部</a>
+				<a class="muser-tab-a" :class="detial.status=='1'  ? 'active':''" @click="statusChange('1')">上线</a>
+				<a class="muser-tab-a" :class="detial.status=='0'  ? 'active':''" @click="statusChange('0')">下架</a>
 			</div>
 			</div>
-            <el-table :data="detial.data" v-loading="detial.loading" :stripe="true" :border="true" >
-                <el-table-column prop="id"    label="ID"  width="80" align="center"></el-table-column>
+			<el-table :data="detial.data" v-loading="detial.loading" :stripe="true" :border="true">
+				<el-table-column prop="id" label="ID" width="80" align="center"></el-table-column>
 				<el-table-column prop="title" label="标题" width="200"></el-table-column>
 				<el-table-column prop="title" label="标题" width="200"></el-table-column>
-				<el-table-column prop="code"  label="CODE" width="100"></el-table-column>
+				<el-table-column prop="code" label="CODE" width="100"></el-table-column>
 				<el-table-column prop="price" label="价格" width="150">
 				<el-table-column prop="price" label="价格" width="150">
 					<template slot-scope="scope">
 					<template slot-scope="scope">
 						<div>销售价:{{scope.row.price}}</div>
 						<div>销售价:{{scope.row.price}}</div>
@@ -36,84 +38,91 @@
 				</el-table-column>
 				</el-table-column>
 				<!-- <el-table-column prop="give_score" label="赠送积分" width="100"></el-table-column> -->
 				<!-- <el-table-column prop="give_score" label="赠送积分" width="100"></el-table-column> -->
 				<!-- <el-table-column prop="describe" label="描述" width="200"></el-table-column> -->
 				<!-- <el-table-column prop="describe" label="描述" width="200"></el-table-column> -->
-				<el-table-column prop="imgs"     label="主图" min-width="160" align="left">
-				     <template slot-scope="scope">
-						 <img v-for="(item,index) in scope.row.imgs" :key="index" v-lazy="item" :src="item" v-image-preview style="width: 60px;cursor: pointer;margin-right: 5px;"/>
-				     </template>
-				 </el-table-column>
-				 <!-- <el-table-column prop="descs" label="详情图" width="160" align="left">
+				<el-table-column prop="imgs" label="主图" min-width="160" align="left">
+					<template slot-scope="scope">
+						<img v-for="(item,index) in scope.row.imgs" :key="index" v-lazy="item" :src="item"
+							v-image-preview style="width: 60px;cursor: pointer;margin-right: 5px;" />
+					</template>
+				</el-table-column>
+				<!-- <el-table-column prop="descs" label="详情图" width="160" align="left">
 				      <template slot-scope="scope">
 				      <template slot-scope="scope">
 				 		 <img v-for="(item,index) in scope.row.descs" :key="index" v-lazy="item" :src="item" v-image-preview style="width: 60px;cursor: pointer;margin-right: 5px;"/>
 				 		 <img v-for="(item,index) in scope.row.descs" :key="index" v-lazy="item" :src="item" v-image-preview style="width: 60px;cursor: pointer;margin-right: 5px;"/>
 				      </template>
 				      </template>
 				</el-table-column> -->
 				</el-table-column> -->
 				<el-table-column prop="total" label="状态" width="100" align="left">
 				<el-table-column prop="total" label="状态" width="100" align="left">
-				     <template slot-scope="scope">
+					<template slot-scope="scope">
 						<div>状态:
 						<div>状态:
-						<el-tag type="danger" size="mini" v-if="scope.row.status == 1">上架</el-tag>
-						<el-tag type="info" size="mini" v-if="scope.row.status == 0">下架</el-tag>
+							<el-tag type="danger" size="mini" v-if="scope.row.status == 1">上架</el-tag>
+							<el-tag type="info" size="mini" v-if="scope.row.status == 0">下架</el-tag>
 						</div>
 						</div>
 						<div>热门:
 						<div>热门:
-						<el-tag type="danger" size="mini" v-if="scope.row.is_hot == 1">热门</el-tag>
-						<el-tag type="info" size="mini" v-if="scope.row.is_hot == 0">常规</el-tag>
+							<el-tag type="danger" size="mini" v-if="scope.row.is_hot == 1">热门</el-tag>
+							<el-tag type="info" size="mini" v-if="scope.row.is_hot == 0">常规</el-tag>
 						</div>
 						</div>
 						<div>推荐:
 						<div>推荐:
-						<el-tag type="danger" size="mini" v-if="scope.row.is_recommend == 1">推荐</el-tag>
-						<el-tag type="info" size="mini" v-if="scope.row.is_recommend == 0">常规</el-tag>
+							<el-tag type="danger" size="mini" v-if="scope.row.is_recommend == 1">推荐</el-tag>
+							<el-tag type="info" size="mini" v-if="scope.row.is_recommend == 0">常规</el-tag>
 						</div>
 						</div>
-						
+
 						<div>初始:
 						<div>初始:
-						<el-tag type="danger" size="mini" v-if="scope.row.is_init == 1">初始</el-tag>
-						<el-tag type="info" size="mini" v-if="scope.row.is_init == 0">常规</el-tag>
+							<el-tag type="danger" size="mini" v-if="scope.row.is_init == 1">初始</el-tag>
+							<el-tag type="info" size="mini" v-if="scope.row.is_init == 0">常规</el-tag>
 						</div>
 						</div>
-				     </template>
+					</template>
 				</el-table-column>
 				</el-table-column>
 				<el-table-column prop="admin_time" label="更新时间" width="150"></el-table-column>
 				<el-table-column prop="admin_time" label="更新时间" width="150"></el-table-column>
-				<el-table-column prop="time"       label="添加时间" width="150"></el-table-column>
-				<el-table-column prop="handle"     label="操作"     width="150" align="center">
-				    <template slot-scope="scope">
+				<el-table-column prop="time" label="添加时间" width="150"></el-table-column>
+				<el-table-column prop="handle" label="操作" width="150" align="center">
+					<template slot-scope="scope">
 						<div><el-button plain size="mini" @click="tapEdit(scope.row)">编辑</el-button></div>
 						<div><el-button plain size="mini" @click="tapEdit(scope.row)">编辑</el-button></div>
-				    </template>
+					</template>
 				</el-table-column>
 				</el-table-column>
-            </el-table>
-            <div class="acea-row row-right page">
-                <Page :total="detial.pageCount" show-elevator show-total @on-change="tapPage" :page-size="detial.pageSize"/>
-            </div>
-        </Card>
-		
-	<Modal v-model="dialogVisible" :title="title" @on-cancel="editClose" width="800">
-		<div>
-			<el-form ref="form" :model="form" label-width="120px">
-				<el-tabs v-model="formActiveName">
-				    <el-tab-pane label="基础信息" name="tab_base">
-						<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="模板CODE" prop="code" :rules="[{ required: true, message: '请输入模板CODE'}]">
-							<el-input placeholder="请输入模板CODE" autocomplete="off" v-model="form.code" :disabled="(form.id && form.id>0)?true:false"></el-input>
-						</el-form-item>
-						<!-- <el-form-item label="模板描述" prop="describe">
+			</el-table>
+			<div class="acea-row row-right page">
+				<Page :total="detial.pageCount" show-elevator show-total @on-change="tapPage"
+					:page-size="detial.pageSize" />
+			</div>
+		</Card>
+
+		<Modal v-model="dialogVisible" :title="title" @on-cancel="editClose" width="800">
+			<div>
+				<el-form ref="form" :model="form" label-width="120px">
+					<el-tabs v-model="formActiveName">
+						<el-tab-pane label="基础信息" name="tab_base">
+							<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="模板CODE" prop="code" :rules="[{ required: true, message: '请输入模板CODE'}]">
+								<el-input placeholder="请输入模板CODE" autocomplete="off" v-model="form.code"
+									:disabled="(form.id && form.id>0)?true:false"></el-input>
+							</el-form-item>
+							<!-- <el-form-item label="模板描述" prop="describe">
 							<el-input placeholder="请输入模板描述" autocomplete="off" v-model="form.describe" type="textarea"></el-input>
 							<el-input placeholder="请输入模板描述" autocomplete="off" v-model="form.describe" type="textarea"></el-input>
 						</el-form-item> -->
 						</el-form-item> -->
-						<el-form-item label="模板售价" prop="price" :rules="[{ required: true, message: '请输入模板售价'}]">
-							<el-input placeholder="请输入模板售价" autocomplete="off" v-model="form.price"></el-input>
-						</el-form-item>
-						<el-form-item label="模板划线价" prop="old_price" :rules="[{ required: true, message: '请输入模板划线价'}]">
-							<el-input placeholder="请输入模板划线价" autocomplete="off" v-model="form.old_price"></el-input>
-						</el-form-item>
-						<!-- <el-form-item label="虚拟销量" prop="unreal_sales">
+							<el-form-item label="模板售价" prop="price" :rules="[{ required: true, message: '请输入模板售价'}]">
+								<el-input placeholder="请输入模板售价" autocomplete="off" v-model="form.price"></el-input>
+							</el-form-item>
+							<el-form-item label="模板划线价" prop="old_price"
+								:rules="[{ required: true, message: '请输入模板划线价'}]">
+								<el-input placeholder="请输入模板划线价" autocomplete="off" v-model="form.old_price"></el-input>
+							</el-form-item>
+							<!-- <el-form-item label="虚拟销量" prop="unreal_sales">
 							<el-input placeholder="请输入虚拟销量" autocomplete="off" v-model="form.unreal_sales"></el-input>
 							<el-input placeholder="请输入虚拟销量" autocomplete="off" v-model="form.unreal_sales"></el-input>
 						</el-form-item> -->
 						</el-form-item> -->
-						
-						<el-form-item label="主图" prop="imgs">
-							<div class="clearfix" style="width: 100%;">
-								<div class="upimg-item fx-r fx-bc fx-ac" style="" v-for="(item,index) in form.imgs" :key="index">
-									<img v-lazy="item" :src="item" v-image-preview/>
-									<i class="el-icon-error img-remove-btn" @click="removeImgs(index)"></i>
+
+							<el-form-item label="主图" prop="imgs">
+								<div class="clearfix" style="width: 100%;">
+									<div class="upimg-item fx-r fx-bc fx-ac" style="" v-for="(item,index) in form.imgs"
+										:key="index">
+										<img v-lazy="item" :src="item" v-image-preview />
+										<i class="el-icon-error img-remove-btn" @click="removeImgs(index)"></i>
+									</div>
+									<ui-upload style="float: left;" :upUrl="upUrl" fileName="上传图片" :headers="upHeaders"
+										:updata="{isz:0,code:'goods'}" @onUpload="onUpload"
+										v-if="form.imgs.length<5"></ui-upload>
 								</div>
 								</div>
-								<ui-upload style="float: left;" :upUrl="upUrl"  fileName="上传图片" :headers="upHeaders" :updata="{isz:0,code:'goods'}" @onUpload="onUpload" v-if="form.imgs.length<5"></ui-upload>
-							</div>
-						</el-form-item>
-						<!-- <el-form-item label="详情图" prop="descs" :rules="[{ required: true, message: '请上传详情图'}]">
+							</el-form-item>
+							<!-- <el-form-item label="详情图" prop="descs" :rules="[{ required: true, message: '请上传详情图'}]">
 							<div class="clearfix" style="width: 100%;">
 							<div class="clearfix" style="width: 100%;">
 								<div class="upimg-item fx-r fx-bc fx-ac" style="" v-for="(item,index) in form.descs" :key="index">
 								<div class="upimg-item fx-r fx-bc fx-ac" style="" v-for="(item,index) in form.descs" :key="index">
 									<img v-lazy="item" :src="item" v-image-preview/>
 									<img v-lazy="item" :src="item" v-image-preview/>
@@ -122,199 +131,210 @@
 								<ui-upload style="float: left;" :upUrl="upUrl"  fileName="上传图片" :headers="upHeaders" :updata="{isz:0,code:'goods'}" @onUpload="onUploadDescs" v-if="form.descs.length<5"></ui-upload>
 								<ui-upload style="float: left;" :upUrl="upUrl"  fileName="上传图片" :headers="upHeaders" :updata="{isz:0,code:'goods'}" @onUpload="onUploadDescs" v-if="form.descs.length<5"></ui-upload>
 							</div>
 							</div>
 						</el-form-item> -->
 						</el-form-item> -->
-						<!-- <el-form-item label="赠送积分" prop="give_score">
+							<!-- <el-form-item label="赠送积分" prop="give_score">
 							<el-input placeholder="请输入赠送积分数" autocomplete="off" v-model="form.give_score" type="number"></el-input>
 							<el-input placeholder="请输入赠送积分数" autocomplete="off" v-model="form.give_score" type="number"></el-input>
 						</el-form-item> -->
 						</el-form-item> -->
-						<el-form-item label="是否热门" style="margin-bottom: 0;">
-							<el-radio-group v-model="form.is_hot">
-								<el-radio :label="1">热门</el-radio>
-								<el-radio :label="0">常规</el-radio>
-							</el-radio-group>
-						</el-form-item>
-						<el-form-item label="是否推荐" style="margin-bottom: 0;">
-							<el-radio-group v-model="form.is_recommend">
-								<el-radio :label="1">推荐</el-radio>
-								<el-radio :label="0">常规</el-radio>
-							</el-radio-group>
-						</el-form-item>
-						<el-form-item label="是否上架" style="margin-bottom: 0;">
-							<el-radio-group v-model="form.status">
-								<el-radio :label="1">上架</el-radio>
-								<el-radio :label="0">下架</el-radio>
-							</el-radio-group>
-						</el-form-item>
-						<el-form-item label="初始模板" style="margin-bottom: 0;">
-							<el-radio-group v-model="form.is_init">
-								<el-radio :label="1">初始</el-radio>
-								<el-radio :label="0">常规</el-radio>
-							</el-radio-group>
-						</el-form-item>
-					</el-tab-pane>
-				</el-tabs>
-			</el-form>
-			
-		</div>
-		<span slot="footer" class="dialog-footer">
-			<el-button @click="dialogVisible = false">取 消</el-button>
-			<el-button type="primary" @click="subAdmin">确 定</el-button>
-        </span>
-    </Modal>
-		
-    </div>
+							<el-form-item label="是否热门" style="margin-bottom: 0;">
+								<el-radio-group v-model="form.is_hot">
+									<el-radio :label="1">热门</el-radio>
+									<el-radio :label="0">常规</el-radio>
+								</el-radio-group>
+							</el-form-item>
+							<el-form-item label="是否推荐" style="margin-bottom: 0;">
+								<el-radio-group v-model="form.is_recommend">
+									<el-radio :label="1">推荐</el-radio>
+									<el-radio :label="0">常规</el-radio>
+								</el-radio-group>
+							</el-form-item>
+							<el-form-item label="是否上架" style="margin-bottom: 0;">
+								<el-radio-group v-model="form.status">
+									<el-radio :label="1">上架</el-radio>
+									<el-radio :label="0">下架</el-radio>
+								</el-radio-group>
+							</el-form-item>
+							<el-form-item label="初始模板" style="margin-bottom: 0;">
+								<el-radio-group v-model="form.is_init">
+									<el-radio :label="1">初始</el-radio>
+									<el-radio :label="0">常规</el-radio>
+								</el-radio-group>
+							</el-form-item>
+						</el-tab-pane>
+					</el-tabs>
+				</el-form>
+
+			</div>
+			<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>
 </template>
 <script>
 <script>
-    import {SystemShowTemplateList,SystemShowTemplateAdd} from "../../../api/system/showTemplate";
-	
-    import IPageHeader from "../../../layouts/system/page-header/index";
+	import {
+		SystemShowTemplateList,
+		SystemShowTemplateAdd
+	} from "../../../api/system/showTemplate";
+
+	import IPageHeader from "../../../layouts/system/page-header/index";
 	import UiUpload from "@/ui/upload/index";
 	import UiUpload from "@/ui/upload/index";
 	import Setting from '@/setting';
 	import Setting from '@/setting';
-    export default {
-        name: "system_showTemplate_list",
-        components: {UiUpload,IPageHeader},
-        computed: {},
-        data() {
-            return {
-				pageTitle:'模板列表',
-				upHeaders:{},
-				upUrl:"",
-				cateData:[],
-                detial: {
-					is_hot       : "",
-					is_recommend : "",
-					title        : "",
-					time         : "",
-					status       : "",
-					
-					data         : [],
-                    page        : 1,
-					loading     : true,
-                    pageSize    : 0,
-                    pageCount   : 0,
-                },
-				
+	export default {
+		name: "system_showTemplate_list",
+		components: {
+			UiUpload,
+			IPageHeader
+		},
+		computed: {},
+		data() {
+			return {
+				pageTitle: '模板列表',
+				upHeaders: {},
+				upUrl: "",
+				cateData: [],
+				detial: {
+					is_hot: "",
+					is_recommend: "",
+					title: "",
+					time: "",
+					status: "",
+
+					data: [],
+					page: 1,
+					loading: true,
+					pageSize: 0,
+					pageCount: 0,
+				},
+
 				options: {
 				options: {
-				    shortcuts: [
-				        {
-				            text: '今天',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '昨天',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1)));
-				                end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '最近7天',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 6)));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '最近30天',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 29)));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '本月',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), 1)));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '本年',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
-				                return [start, end];
-				            }
-				        }
-				    ]
+					shortcuts: [{
+							text: '今天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date()
+									.getDate()));
+								return [start, end];
+							}
+						},
+						{
+							text: '昨天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 1)));
+								end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate())));
+								return [start, end];
+							}
+						},
+						{
+							text: '最近7天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 6)));
+								return [start, end];
+							}
+						},
+						{
+							text: '最近30天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 29)));
+								return [start, end];
+							}
+						},
+						{
+							text: '本月',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									1)));
+								return [start, end];
+							}
+						},
+						{
+							text: '本年',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
+								return [start, end];
+							}
+						}
+					]
 				},
 				},
-				dialogVisible:false,
-				title:"",
-				add_parms_name:"",
-				formActiveName:"tab_base",
-				form:{
-					id             : "",
-				    imgs           : [],
+				dialogVisible: false,
+				title: "",
+				add_parms_name: "",
+				formActiveName: "tab_base",
+				form: {
+					id: "",
+					imgs: [],
 					// descs          : [],
 					// descs          : [],
-				    status         : 1,
-					is_hot         : 0,
-					is_recommend   : 0,
-					is_init        : 0,
-					data           : [],
+					status: 1,
+					is_hot: 0,
+					is_recommend: 0,
+					is_init: 0,
+					data: [],
 				},
 				},
-				defaultParms:[],
-            }
-        },
-        created() {
-            this.initView();
-        },
-        methods: {
+				defaultParms: [],
+			}
+		},
+		created() {
+			this.initView();
+		},
+		methods: {
 			/**
 			/**
 			 * 添加
 			 * 添加
 			 */
 			 */
-			tapAdd:function(sassid){
+			tapAdd: function(sassid) {
 				var that = this;
 				var that = this;
-			    this.dialogVisible = true;
-				that.add_parms_name="",
-				that.formActiveName="tab_base",
-			    this.$refs['form'].resetFields();
-			    this.form = this.$utils.resetFields(this.form, {
-				    imgs           : [],
+				this.dialogVisible = true;
+				that.add_parms_name = "",
+					that.formActiveName = "tab_base",
+					this.$refs['form'].resetFields();
+				this.form = this.$utils.resetFields(this.form, {
+					imgs: [],
 					// descs          : [],
 					// descs          : [],
-				    status         : 1,
-					is_hot         : 0,
-					is_recommend   : 0,
-					data           : JSON.parse(JSON.stringify(that.defaultParms)),
+					status: 1,
+					is_hot: 0,
+					is_recommend: 0,
+					data: JSON.parse(JSON.stringify(that.defaultParms)),
 				});
 				});
-				
+
 			},
 			},
-            initView:function(){
+			initView: function() {
 				var upHeaders = {};
 				var upHeaders = {};
 				this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
 				this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
 				const token = this.$utils.util.cookies.get('system_token');
 				const token = this.$utils.util.cookies.get('system_token');
 				if (token) {
 				if (token) {
-				    upHeaders['SYSTEM-ACC-TOKEN'] = token;
+					upHeaders['SYSTEM-ACC-TOKEN'] = token;
 				}
 				}
 				this.upHeaders = upHeaders;
 				this.upHeaders = upHeaders;
-                this.getData();
-            },
-			removeParms:function(index){
-				this.$delete(this.form.data,index);
+				this.getData();
+			},
+			removeParms: function(index) {
+				this.$delete(this.form.data, index);
 			},
 			},
-			addParms:function(){
+			addParms: function() {
 				var name = this.add_parms_name;
 				var name = this.add_parms_name;
-				if(this.add_parms_name){
+				if (this.add_parms_name) {
 					this.form.data.push({
 					this.form.data.push({
-						title:name,
-						content:"",
+						title: name,
+						content: "",
 					})
 					})
-					this.add_parms_name="";
+					this.add_parms_name = "";
 				}
 				}
 			},
 			},
-			statusChange:function(status){
+			statusChange: function(status) {
 				this.detial.status = status;
 				this.detial.status = status;
 				this.detial.page = 1
 				this.detial.page = 1
 				this.getData()
 				this.getData()
@@ -323,113 +343,161 @@
 			 * 上传文件
 			 * 上传文件
 			 * @param res
 			 * @param res
 			 */
 			 */
-			onUpload:function (res) {
-			    if(res.code == -1) {
-			        Notice.error({ title : "系统提示", content:res.msg});
-			    } else {
-			        this.form.imgs.push(res.data.img);
-			    }
+			onUpload: function(res) {
+				if (res.code == -1) {
+					Notice.error({
+						title: "系统提示",
+						content: res.msg
+					});
+				} else {
+					this.form.imgs.push(res.data.img);
+				}
 			},
 			},
-			onUploadDescs:function(res){
-				if(res.code == -1) {
-				    Notice.error({ title : "系统提示", content:res.msg});
+			onUploadDescs: function(res) {
+				if (res.code == -1) {
+					Notice.error({
+						title: "系统提示",
+						content: res.msg
+					});
 				} else {
 				} else {
-				    this.form.descs.push(res.data.img);
+					this.form.descs.push(res.data.img);
 				}
 				}
 			},
 			},
-			tapEdit:function(row){
-				this.formActiveName="tab_base";
+			tapEdit: function(row) {
+				this.formActiveName = "tab_base";
 				this.form = JSON.parse(JSON.stringify(row));
 				this.form = JSON.parse(JSON.stringify(row));
 				this.dialogVisible = true;
 				this.dialogVisible = true;
 				this.title = "编辑模板";
 				this.title = "编辑模板";
 			},
 			},
 			//关闭
 			//关闭
-			editClose:function(){
-			    this.dialogVisible = false;
+			editClose: function() {
+				this.dialogVisible = false;
 			},
 			},
-			removeImgs:function(index){
-				this.$delete(this.form.imgs,index);
+			removeImgs: function(index) {
+				this.$delete(this.form.imgs, index);
 			},
 			},
-			removeDescs:function(index){
-				this.$delete(this.form.descs,index);
+			removeDescs: function(index) {
+				this.$delete(this.form.descs, index);
 			},
 			},
 			/**
 			/**
 			 * 修改数据
 			 * 修改数据
 			 */
 			 */
-			subAdmin:function(e){
-			    this.$refs['form'].validate((valid) => {
-			        if (valid) {
-			            let loading = this.$loading("提交数据中...");
-			            var data = {};
-			            for(var i in this.form) {
-			                data[i] = this.form[i];
-			            }
-			            SystemShowTemplateAdd(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("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
-			                });
-			        }
-			    });
+			subAdmin: function(e) {
+				this.$refs['form'].validate((valid) => {
+					if (valid) {
+						let loading = this.$loading("提交数据中...");
+						var data = {};
+						for (var i in this.form) {
+							data[i] = this.form[i];
+						}
+						SystemShowTemplateAdd(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("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+							});
+					}
+				});
+			},
+
+
+			//搜索栏目
+			tapSeach: function() {
+				this.detial.page = 1;
+				this.getData();
 			},
 			},
-			
-			
-            //搜索栏目
-            tapSeach:function () {
-                this.detial.page = 1;
-                this.getData();
-            },
-            //分页
-            tapPage:function (page) {
-                this.detial.page = page;
-                this.getData();
-            },
-            getData: function () {
-                var data = {};
+			//分页
+			tapPage: function(page) {
+				this.detial.page = page;
+				this.getData();
+			},
+			getData: function() {
+				var data = {};
 				var that = this;
 				var that = this;
-                this.detial.loading = true;
-				data.page        = this.detial.page;
-				data.status      = this.detial.status;
-				data.is_hot      = this.detial.is_hot;
+				this.detial.loading = true;
+				data.page = this.detial.page;
+				data.status = this.detial.status;
+				data.is_hot = this.detial.is_hot;
 				data.is_recommend = this.detial.is_recommend;
 				data.is_recommend = this.detial.is_recommend;
-				data.title       = this.detial.title;
-				data.time        = this.detial.time;
-                SystemShowTemplateList(data).then(res => {
-                    this.detial.loading   = false;
-                    this.detial.data      = res.data.list;
-                    this.detial.pageSize  = res.data.pageSize;
-                    this.detial.pageCount = res.data.pageCount;
-						// if(that.defaultParms.length<=0 && res.data.defaultParms){
-						// 	that.defaultParms = res.data.defaultParms;
-						// }
-                }).catch(err => {
-                    this.detial.loading = false;
-                    this.$alert('网络繁忙,加载失败,请稍等片刻在尝试!', '系统提示');
-                });
-            },
-        }
-    }
+				data.title = this.detial.title;
+				data.time = this.detial.time;
+				SystemShowTemplateList(data).then(res => {
+					this.detial.loading = false;
+					this.detial.data = res.data.list;
+					this.detial.pageSize = res.data.pageSize;
+					this.detial.pageCount = res.data.pageCount;
+					// if(that.defaultParms.length<=0 && res.data.defaultParms){
+					// 	that.defaultParms = res.data.defaultParms;
+					// }
+				}).catch(err => {
+					this.detial.loading = false;
+					this.$alert('网络繁忙,加载失败,请稍等片刻在尝试!', '系统提示');
+				});
+			},
+		}
+	}
 </script>
 </script>
 <style scoped>
 <style scoped>
-iframe.videoIframe{border: 0px;padding: 0px;}
-.el-dialog__body{padding: 0px;}
-.el-dialog__body iframe body{padding: 0px;}
+	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: 5px;
+		overflow: hidden;
+		float: left;
+		margin-bottom: 5px;
+		position: relative;
+	}
+
+	.upimg-item img {
+		width: 82px;
+		cursor: pointer;
+	}
 
 
-	.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: 5px;overflow: hidden;float: left;margin-bottom: 5px;position: relative;}
-	.upimg-item img{width: 82px;cursor: pointer;}
-	.img-remove-btn{position: absolute;top: 0px;right: 0px;font-size: 24px;}
-</style>
+	.img-remove-btn {
+		position: absolute;
+		top: 0px;
+		right: 0px;
+		font-size: 24px;
+	}
+</style>

+ 56 - 1
src/components/system/signing/list.vue

@@ -109,10 +109,14 @@
       </el-table-column> -->
       </el-table-column> -->
 				
 				
 				<el-table-column prop="mark" label="附加条款" width="150"></el-table-column>
 				<el-table-column prop="mark" label="附加条款" width="150"></el-table-column>
+				<el-table-column prop="reason" label="终止原因" width="200"></el-table-column>
 				<el-table-column prop="handle" label="操作" width="150" align="center">
 				<el-table-column prop="handle" label="操作" width="150" align="center">
 					<template slot-scope="scope">
 					<template slot-scope="scope">
 						<div><el-button plain size="mini" @click="tapDk(scope.row)">查看打卡</el-button></div>
 						<div><el-button plain size="mini" @click="tapDk(scope.row)">查看打卡</el-button></div>
+						<br />
 						<div><el-button plain size="mini" @click="tapPj(scope.row)">查看评价</el-button></div>
 						<div><el-button plain size="mini" @click="tapPj(scope.row)">查看评价</el-button></div>
+						<br />
+						<div><el-button plain size="mini" v-if="scope.row.status == 1" @click="tapZz(scope.row)">终止合同</el-button></div>
 					</template>
 					</template>
 				</el-table-column>
 				</el-table-column>
 			</el-table>
 			</el-table>
@@ -130,6 +134,21 @@
 				</div>
 				</div>
 			</div>
 			</div>
 		</Modal>
 		</Modal>
+    <!-- 终止合同 模态框 -->
+		<Modal v-model="zzdialogVisibles" :title="title" @on-cancel="editClose" width="800" >
+			<div style="padding: 20px;">
+				<el-form :model="form" label-width="100px">
+					<el-form-item label="终止原因">
+						<el-input type="textarea" v-model="reason" placeholder="请输入终止合同的原因" rows="4"></el-input>
+					</el-form-item>
+				</el-form>
+				
+			</div>
+			<span slot="footer" class="dialog-footer">
+			    <el-button @click="zzdialogVisibles = false">取 消</el-button>
+			    <el-button type="primary" @click="confirmEndContract">确 定</el-button>
+			  </span>
+		</Modal>
 		<Modal v-model="dialogVisibles" :title="title" @on-cancel="editCloses" width="800">
 		<Modal v-model="dialogVisibles" :title="title" @on-cancel="editCloses" width="800">
 			<div>
 			<div>
 				{{content || '暂无评价'}}
 				{{content || '暂无评价'}}
@@ -149,7 +168,8 @@
 	import {
 	import {
 		getSigningList,
 		getSigningList,
 		getDkList,
 		getDkList,
-		getPjList
+		getPjList,
+		endComment
 	} from '@/api/system/signing.js'
 	} from '@/api/system/signing.js'
 	export default {
 	export default {
 		name: "system_showTemplate_list",
 		name: "system_showTemplate_list",
@@ -160,6 +180,11 @@
 		computed: {},
 		computed: {},
 		data() {
 		data() {
 			return {
 			return {
+				checkItem: {
+					id: 0
+				},
+				zzdialogVisibles: false,
+				reason: '',//终止原因
 				dialogVisibles: false,
 				dialogVisibles: false,
 				pageTitle: '预约列表',
 				pageTitle: '预约列表',
 				upHeaders: {},
 				upHeaders: {},
@@ -400,6 +425,11 @@
 				// this.dk.contract_id = item.id
 				// this.dk.contract_id = item.id
 				this.getDk()
 				this.getDk()
 			},
 			},
+			tapZz(item) {
+				this.checkItem = item
+				this.zzdialogVisibles = true;
+				this.title = "终止合同";
+			},
 			tapPj(item) {
 			tapPj(item) {
 				this.dialogVisibles = true;
 				this.dialogVisibles = true;
 				this.title = "用户评价";
 				this.title = "用户评价";
@@ -411,10 +441,35 @@
 			//关闭
 			//关闭
 			editClose: function() {
 			editClose: function() {
 				this.dialogVisible = false;
 				this.dialogVisible = false;
+				this.zzdialogVisibles = false;
 			},
 			},
 			editCloses: function() {
 			editCloses: function() {
 				this.dialogVisibles = false;
 				this.dialogVisibles = false;
 			},
 			},
+			// 确认终止合同
+			confirmEndContract: function() {
+				if (!this.reason) {
+					this.$alert('请输入终止合同的原因', '系统提示');
+					return;
+				}
+				let loading = this.$loading("提交数据中...");
+				endComment({
+					id: this.checkItem.id,
+					reason: this.reason
+				}).then(res => {
+					loading.close();
+					if (res.code == 200) {
+						this.zzdialogVisibles = false;
+						this.$Message.success("操作成功");
+						this.getData();
+					} else {
+						this.$alert(res.msg, '系统提示');
+					}
+				}).catch(err => {
+					loading.close();
+					this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+				});
+			},
 			removeImgs: function(index) {
 			removeImgs: function(index) {
 				this.$delete(this.form.imgs, index);
 				this.$delete(this.form.imgs, index);
 			},
 			},

+ 448 - 392
src/components/system/user/list.vue

@@ -1,45 +1,36 @@
 <template>
 <template>
-    <div>
-        <i-page-header :title="pageTitle"></i-page-header>
-        <Card :bordered="false" dis-hover class="ivu-mt">
-            <div class="fx-r" style="padding: 20px 0;">
-				<Input placeholder="绑定的手机号"  style="width:120px" class="mr10" v-model="detial.mobile"/>
-				<Input placeholder="用户昵称"      style="width:120px" class="mr10" v-model="detial.nickname"/>
-				<Input placeholder="用户UID"       style="width:120px" class="mr10" v-model="detial.uid"/>
-				<Input placeholder="父级用户UID"    style="width:120px" class="mr10" v-model="detial.parent_uid"/>
-				<DatePicker style="width: 250px" format="yyyy-MM-dd HH:mm:ss" v-model="detial.time" type="datetimerange" placement="bottom-start" placeholder="注册时间范围" :options="options"></DatePicker>
-                <el-button type="primary" style="margin-left: 6px;" @click="tapSeach">查询</el-button>
-				<div class="fx-g1"></div>
-            </div>
-			
-			<div class="muser-tab-continer">
-			    <a class="muser-tab-a" :class="detial.status==''   ? 'active':''" @click="statusChange('')">全部</a>
-			    <a class="muser-tab-a" :class="detial.status=='-1'  ? 'active':''" @click="statusChange('-1')">禁用</a>
-			    <a class="muser-tab-a" :class="detial.status=='1'  ? 'active':''" @click="statusChange('1')">使用</a>
-			</div>
-            <el-table :data="detial.data" v-loading="detial.loading" :stripe="true" :border="true" >
-                <el-table-column
-                        prop="uid"
-                        label="UID"
-						width="80"
-                        align="center">
-                </el-table-column>
-				<el-table-column
-				         prop="avatar"
-				         label="头像"
-						 width="80"
-				         align="left">
-				     <template slot-scope="scope">
-						 <img  v-lazy="scope.row.avatar" :src="scope.row.avatar" v-image-preview style="width: 60px;cursor: pointer;"/>
-				     </template>
-				 </el-table-column>
+  <div>
+    <i-page-header :title="pageTitle"></i-page-header>
+    <Card :bordered="false" dis-hover class="ivu-mt">
+      <div class="fx-r" style="padding: 20px 0;">
+        <Input placeholder="绑定的手机号" style="width:120px" class="mr10" v-model="detial.mobile" />
+        <Input placeholder="用户昵称" style="width:120px" class="mr10" v-model="detial.nickname" />
+        <Input placeholder="用户UID" style="width:120px" class="mr10" v-model="detial.uid" />
+        <Input placeholder="父级用户UID" style="width:120px" class="mr10" v-model="detial.parent_uid" />
+        <DatePicker style="width: 250px" format="yyyy-MM-dd HH:mm:ss" v-model="detial.time" type="datetimerange"
+          placement="bottom-start" placeholder="注册时间范围" :options="options"></DatePicker>
+        <el-button type="primary" style="margin-left: 6px;" @click="tapSeach">查询</el-button>
+        <div class="fx-g1"></div>
+      </div>
+
+      <div class="muser-tab-continer">
+        <a class="muser-tab-a" :class="detial.status == '' ? 'active' : ''" @click="statusChange('')">全部</a>
+        <a class="muser-tab-a" :class="detial.status == '-1' ? 'active' : ''" @click="statusChange('-1')">禁用</a>
+        <a class="muser-tab-a" :class="detial.status == '1' ? 'active' : ''" @click="statusChange('1')">使用</a>
+      </div>
+      <el-table :data="detial.data" v-loading="detial.loading" :stripe="true" :border="true">
+        <el-table-column prop="uid" label="UID" width="80" align="center">
+        </el-table-column>
+        <el-table-column prop="avatar" label="头像" width="80" align="left">
+          <template slot-scope="scope">
+            <img v-lazy="scope.row.avatar" :src="scope.row.avatar" v-image-preview
+              style="width: 60px;cursor: pointer;" />
+          </template>
+        </el-table-column>
 
 
-				<el-table-column
-				        prop="mobile"
-						width="100"
-				        label="绑定手机">
-				</el-table-column>
-				<!-- <el-table-column
+        <el-table-column prop="mobile" width="100" label="绑定手机">
+        </el-table-column>
+        <!-- <el-table-column
 				        prop="parent_uid"
 				        prop="parent_uid"
 				        label="上级用户">
 				        label="上级用户">
 						<template slot-scope="scope">
 						<template slot-scope="scope">
@@ -49,7 +40,7 @@
 							</div>
 							</div>
 						</template>
 						</template>
 				</el-table-column> -->
 				</el-table-column> -->
-				<!-- <el-table-column
+        <!-- <el-table-column
 				        prop="branchCount"
 				        prop="branchCount"
 						align="center"
 						align="center"
 				        label="推广人数">
 				        label="推广人数">
@@ -57,78 +48,55 @@
 							{{scope.row.branchCount}}
 							{{scope.row.branchCount}}
 						</template>
 						</template>
 				</el-table-column> -->
 				</el-table-column> -->
-				<el-table-column
-				        prop="nickname"
-				        label="昵称">
-				</el-table-column>
-				<el-table-column
-				        prop="name"
-				        label="姓名">
-				</el-table-column>
-				<el-table-column
-				        prop="money"
-				        label="余额">
-				</el-table-column>
-				<el-table-column
-				         prop="parent_uid"
-						 width="100"
-				         label="邀请人">
-						 <template slot-scope="scope">
-							 <div @click="tapUserSeach(scope.row.parent_uid)">
-							 	<div style="text-align: center;">{{scope.row.p_nickname}}</div>
-								<div style="text-align: center;">{{scope.row.p_mobile}}</div>
-							 </div>
-						 </template>
-				 </el-table-column>
-				<el-table-column
-				         prop="showTempCount"
-				         label="名片模板">
-						 <template slot-scope="scope">
-							 <i-link :to="'/system/user/showTemplateList?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的模板' ">
-							 	({{scope.row.showTempCount}}) 查看
-							 </i-link>
-						 </template>
-				 </el-table-column>
-				<el-table-column
-				         prop="is_info_audit"
-				         label="资料审核"
-						 width="80"
-				         align="left">
-				     <template slot-scope="scope">
-						<el-tag type="success" size="mini" v-if="scope.row.is_info_audit == 1">已审核</el-tag>
-						<el-tag type="danger" size="mini" v-if="scope.row.is_info_audit == 0">未审核</el-tag>
-				     </template>
-				 </el-table-column>
-				 
-				 <el-table-column prop="work_type_id" align="center" label="职业名称" width="100">
-				     <template slot-scope="scope">
-				         <div v-if="scope.row.work_type_id == 0" style="color: #9B9B9B">普通用户</div>
-				         <div v-if="scope.row.work_type_id>0" style="color: #00ac1c">{{scope.row.work_type_title}}</div>
-				     </template>
-				 </el-table-column>
-				 
-				 
-				<el-table-column
-				         prop="is_type_audit"
-				         label="平台认证"
-						 width="80"
-				         align="left">
-				     <template slot-scope="scope">
-						<el-tag type="success" size="mini" v-if="scope.row.is_type_audit == 1">已认证</el-tag>
-						<el-tag type="danger" size="mini" v-if="scope.row.is_type_audit == 0">未认证</el-tag>
-				     </template>
-				 </el-table-column>
-				<el-table-column
-				         prop="status"
-				         label="是否禁用"
-						 width="80"
-				         align="left">
-				     <template slot-scope="scope">
-						<el-tag type="success" size="mini" v-if="scope.row.status == 1">使用</el-tag>
-						<el-tag type="danger" size="mini" v-if="scope.row.status == -1">禁用</el-tag>
-				     </template>
-				 </el-table-column>
-				<!-- <el-table-column
+        <el-table-column prop="nickname" label="昵称">
+        </el-table-column>
+        <el-table-column prop="name" label="姓名">
+        </el-table-column>
+        <el-table-column prop="score" label="积分">
+        </el-table-column>
+        <el-table-column prop="parent_uid" width="100" label="邀请人">
+          <template slot-scope="scope">
+            <div @click="tapUserSeach(scope.row.parent_uid)">
+              <div style="text-align: center;">{{ scope.row.p_nickname }}</div>
+              <div style="text-align: center;">{{ scope.row.p_mobile }}</div>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="showTempCount" label="名片模板">
+          <template slot-scope="scope">
+            <i-link :to="'/system/user/showTemplateList?uid=' + scope.row.uid + '&title=' + scope.row.nickname + '的模板'">
+              ({{ scope.row.showTempCount }}) 查看
+            </i-link>
+          </template>
+        </el-table-column>
+        <el-table-column prop="is_info_audit" label="资料审核" width="80" align="left">
+          <template slot-scope="scope">
+            <el-tag type="success" size="mini" v-if="scope.row.is_info_audit == 1">已审核</el-tag>
+            <el-tag type="danger" size="mini" v-if="scope.row.is_info_audit == 0">未审核</el-tag>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="work_type_id" align="center" label="职业名称" width="100">
+          <template slot-scope="scope">
+            <div v-if="scope.row.work_type_id == 0" style="color: #9B9B9B">普通用户</div>
+            <div v-if="scope.row.work_type_id > 0" style="color: #00ac1c">{{ scope.row.work_type_title }}</div>
+          </template>
+        </el-table-column>
+
+
+        <el-table-column prop="is_type_audit" label="平台认证" width="80" align="left">
+          <template slot-scope="scope">
+            <el-tag type="success" size="mini" v-if="scope.row.is_type_audit == 1">已认证</el-tag>
+            <el-tag type="danger" size="mini" v-if="scope.row.is_type_audit == 0">未认证</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column prop="status" label="是否禁用" width="80" align="left">
+          <template slot-scope="scope">
+            <el-tag type="success" size="mini" v-if="scope.row.status == 1">使用</el-tag>
+            <el-tag type="danger" size="mini" v-if="scope.row.status == -1">禁用</el-tag>
+          </template>
+        </el-table-column>
+        <!-- <el-table-column
 				          prop="ercode"
 				          prop="ercode"
 				          label="推广码"
 				          label="推广码"
 				 		 width="80"
 				 		 width="80"
@@ -137,306 +105,394 @@
 				 		 <img  v-lazy="scope.row.ercode" :src="scope.row.ercode" v-image-preview style="width: 60px;cursor: pointer;"/>
 				 		 <img  v-lazy="scope.row.ercode" :src="scope.row.ercode" v-image-preview style="width: 60px;cursor: pointer;"/>
 				      </template>
 				      </template>
 				  </el-table-column> -->
 				  </el-table-column> -->
-				<el-table-column
-				        prop="regtime"
-				        label="注册时间"
-						width="150">
-				</el-table-column>
-				<el-table-column  align="center" label="操作"     prop="handle" width="200" fixed="right">
-				    <template slot-scope="scope">
-						<div>
-							<el-button plain size="mini" @click="tapEdit(scope.row)">编辑</el-button>
-							<!-- <Divider type="vertical"/>
+        <el-table-column prop="regtime" label="注册时间" width="150">
+        </el-table-column>
+        <el-table-column align="center" label="操作" prop="handle" width="200" fixed="right">
+          <template slot-scope="scope">
+            <div>
+              <el-button plain size="mini" @click="tapEdit(scope.row)">编辑</el-button>
+              <el-button plain size="mini" @click="tapScoreEdit(scope.row)">积分补扣</el-button>
+
+              <!-- <Divider type="vertical"/>
 							<i-link :to="'/system/order/index?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的订单列表' ">
 							<i-link :to="'/system/order/index?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的订单列表' ">
 								<el-button plain size="mini" >订单</el-button>
 								<el-button plain size="mini" >订单</el-button>
 							</i-link> -->
 							</i-link> -->
-						</div>
-						<div style="margin-top: 10px;">
-							<!-- <i-link :to="'/system/circle/list?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的动态列表' ">
+            </div>
+            <div style="margin-top: 10px;">
+              <!-- <i-link :to="'/system/circle/list?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的动态列表' ">
 								<el-button plain size="mini" >圈子</el-button>
 								<el-button plain size="mini" >圈子</el-button>
 							</i-link>
 							</i-link>
 							<Divider type="vertical"/> -->
 							<Divider type="vertical"/> -->
-							<!-- <i-link :to="'/system/user/moneyDetail?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的余额明细' ">
+              <!-- <i-link :to="'/system/user/moneyDetail?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的余额明细' ">
 								<el-button plain size="mini" >余额</el-button>
 								<el-button plain size="mini" >余额</el-button>
 							</i-link> -->
 							</i-link> -->
-<!-- 							<Divider type="vertical"/>
+              <!-- 							<Divider type="vertical"/>
 							<i-link :to="'/system/user/scoreDetail?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的积分明细' ">
 							<i-link :to="'/system/user/scoreDetail?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的积分明细' ">
 								<el-button plain size="mini" >积分</el-button>
 								<el-button plain size="mini" >积分</el-button>
 							</i-link> -->
 							</i-link> -->
-						</div>
-				    </template>
-				</el-table-column>
-            </el-table>
-            <div class="acea-row row-right page">
-                <Page :total="detial.pageCount" show-elevator show-total @on-change="tapPage" :page-size="detial.pageSize"/>
             </div>
             </div>
-        </Card>
-		
-	<Modal v-model="dialogVisible" :title="title" @on-cancel="editClose">
-		<el-form ref="form" :model="form" label-width="120px">
-			<el-divider content-position="left">用户信息</el-divider>
-			<el-form-item label="用户昵称" >
-			    <el-input placeholder="请输用户昵称!" v-model="form.nickname"></el-input>
-			</el-form-item>
-			<el-form-item label="用户姓名">
-			    <el-input placeholder="请输入用户姓名!" v-model="form.name"></el-input>
-			</el-form-item>
-			<el-form-item label="是否禁用">
-				<el-radio-group v-model="form.status">
-					<el-radio :label="1">使用</el-radio>
-					<el-radio :label="-1">禁用</el-radio>
-				</el-radio-group>
-			</el-form-item>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="acea-row row-right page">
+        <Page :total="detial.pageCount" show-elevator show-total @on-change="tapPage" :page-size="detial.pageSize" />
+      </div>
+    </Card>
 
 
-		</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 v-model="dialogVisible" :title="title" @on-cancel="editClose">
+      <el-form ref="form" :model="form" label-width="120px">
+        <el-divider content-position="left">用户信息</el-divider>
+        <el-form-item label="用户昵称">
+          <el-input placeholder="请输用户昵称!" v-model="form.nickname"></el-input>
+        </el-form-item>
+        <el-form-item label="用户姓名">
+          <el-input placeholder="请输入用户姓名!" v-model="form.name"></el-input>
+        </el-form-item>
+        <el-form-item label="是否禁用">
+          <el-radio-group v-model="form.status">
+            <el-radio :label="1">使用</el-radio>
+            <el-radio :label="-1">禁用</el-radio>
+          </el-radio-group>
+        </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="scoreDialogVisible" title="积分明细补扣" @on-cancel="editClose">
+      <el-form ref="form" :model="scoreform" label-width="120px">
+        <el-form-item label="增减积分 ">
+          <el-radio-group v-model="scoreform.type">
+            <el-radio :label="1">增加</el-radio>
+            <el-radio :label="-1">减少</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="数量">
+          <el-input placeholder="请输入积分数量" v-model="scoreform.into"></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="scoreDialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="subAdminscore">确 定</el-button>
+      </span>
     </Modal>
     </Modal>
-		
-    </div>
+  </div>
 </template>
 </template>
 <script>
 <script>
-    import {SystemUserList,SystemUserSave} from "../../../api/system/user";
-	
-    import IPageHeader from "../../../layouts/system/page-header/index";
-	import UiUpload from "@/ui/upload/index";
-	import Setting from '@/setting';
-    export default {
-        name: "SystemUserList",
-        components: {UiUpload,IPageHeader},
-        computed: {},
-        data() {
-            return {
-				pageTitle:'用户列表',
-				upHeaders:{},
-				upUrl:"",
-				labelsData:[],
-                detial: {
-					data      : [],
-					time      : "",
-					nickname  : "",
-					mobile    : "",
-					status    : "",
-					uid       : "",
-					parent_uid: "",
-					
-                    page      : 1,
-					loading   : true,
-                    pageSize  : 0,
-                    pageCount : 0,
-                },
-				
-				options: {
-				    shortcuts: [
-				        {
-				            text: '今天',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '昨天',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1)));
-				                end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '最近7天',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 6)));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '最近30天',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 29)));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '本月',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), 1)));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '本年',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
-				                return [start, end];
-				            }
-				        }
-				    ]
-				},
-				
-				dialogVisible:false,
-				title:"",
-				form:{
-					status:1,
-					name:"",
-					nickname:""
-				},
+import { SystemUserList, SystemUserSave, SystemUserScoreDetailSave } from "../../../api/system/user";
+
+import IPageHeader from "../../../layouts/system/page-header/index";
+import UiUpload from "@/ui/upload/index";
+import Setting from '@/setting';
+export default {
+  name: "SystemUserList",
+  components: { UiUpload, IPageHeader },
+  computed: {},
+  data() {
+    return {
+      scoreDialogVisible: false,
+      scoreform: {
+        uid: '',
+        type: 1,//1:增加 -1:减少
+        into: '',
+      },
+      pageTitle: '用户列表',
+      upHeaders: {},
+      upUrl: "",
+      labelsData: [],
+      detial: {
+        data: [],
+        time: "",
+        nickname: "",
+        mobile: "",
+        status: "",
+        uid: "",
+        parent_uid: "",
+
+        page: 1,
+        loading: true,
+        pageSize: 0,
+        pageCount: 0,
+      },
+
+      options: {
+        shortcuts: [
+          {
+            text: '今天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()));
+              return [start, end];
+            }
+          },
+          {
+            text: '昨天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1)));
+              end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())));
+              return [start, end];
+            }
+          },
+          {
+            text: '最近7天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 6)));
+              return [start, end];
             }
             }
-        },
+          },
+          {
+            text: '最近30天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 29)));
+              return [start, end];
+            }
+          },
+          {
+            text: '本月',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), 1)));
+              return [start, end];
+            }
+          },
+          {
+            text: '本年',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
+              return [start, end];
+            }
+          }
+        ]
+      },
 
 
-        created() {
-			if(this.$route.query.title){
-				this.pageTitle = this.$route.query.title;
-			}
-			if(this.$route.query.uid){
-				this.detial.uid = parseInt(this.$route.query.uid);
-			}
-			if(this.$route.query.parent_uid){
-				this.detial.parent_uid = parseInt(this.$route.query.parent_uid);
-			}
-            this.initView();
-        },
-        methods: {
-			/**
-			 * 添加
-			 */
-			tapAdd:function(sassid){
-			    this.dialogVisible = true;
-			    this.$refs['form'].resetFields();
-			    this.form = this.$utils.resetFields(this.form, {status:1});
-			},
-            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.getData();
-            },
-			statusChange:function(status){
-				this.detial.status = status;
-				this.detial.page = 1
-				this.getData()
-			},
-			/**
-			 * 上传文件
-			 * @param res
-			 */
-			onUpload:function (res) {
-			    if(res.code == -1) {
-			        Notice.error({ title : "系统提示", content:res.msg});
-			    } else {
-			        this.form.imgs.push(res.data.img);
-			    }
-			},
-			tapEdit:function(row){
-				this.form = JSON.parse(JSON.stringify(row));
-				this.dialogVisible = true;
-				this.title = "编辑";
-			},
-			//关闭
-			editClose:function(){
-			    this.dialogVisible = false;
-			},
-			/**
-			 * 修改数据
-			 */
-			subAdmin:function(e){
-			    this.$refs['form'].validate((valid) => {
-			        if (valid) {
-			            let loading = this.$loading("提交数据中...");
-			            var data = {};
-			            for(var i in this.form) {
-			                data[i] = this.form[i];
-			            }
-			            SystemUserSave(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("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
-			                });
-			        }
-			    });
-			},
-			
-			
-            //搜索栏目
-            tapSeach:function () {
-                this.detial.page = 1;
-                this.getData();
-            },
-			tapUserSeach:function (uid) {
-			    this.detial.page = 1;
-				this.detial.uid = uid;
-			    this.getData();
-			},
-            //分页
-            tapPage:function (page) {
-                this.detial.page = page;
-                this.getData();
-            },
-            getData: function () {
-                var data = {};
-                this.detial.loading = true;
-				data.page      = this.detial.page;
-				data.status    = this.detial.status;
-				data.uid       = this.detial.uid;
-				data.nickname  = this.detial.nickname;
-				data.time      = this.detial.time;
-				data.mobile    = this.detial.mobile;
-				data.parent_uid= this.detial.parent_uid;
-                SystemUserList(data)
-                    .then(res => {
-                        this.detial.loading   = false;
-                        this.detial.data      = res.data.list;
-                        this.detial.pageSize  = res.data.pageSize;
-                        this.detial.pageCount = res.data.pageCount;
-						this.detial.waitCount = res.data.waitCount;
-                    })
-                    .catch(err => {
-                        this.detial.loading = false;
-                        this.$alert('网络繁忙,加载失败,请稍等片刻在尝试!', '系统提示');
-                    });
-            },
+      dialogVisible: false,
+      title: "",
+      form: {
+        status: 1,
+        name: "",
+        nickname: ""
+      },
+    }
+  },
 
 
-        }
+  created() {
+    if (this.$route.query.title) {
+      this.pageTitle = this.$route.query.title;
+    }
+    if (this.$route.query.uid) {
+      this.detial.uid = parseInt(this.$route.query.uid);
+    }
+    if (this.$route.query.parent_uid) {
+      this.detial.parent_uid = parseInt(this.$route.query.parent_uid);
     }
     }
+    this.initView();
+  },
+  methods: {
+    subAdminscore() {
+      if (this.scoreform.into == '') {
+        this.$message.error('请输入积分数量!');
+        return;
+      }
+      SystemUserScoreDetailSave(this.scoreform).then(res => {
+
+        if (res.code == 200) {
+          this.scoreDialogVisible = false;
+          this.$message.success(res.msg);
+          this.getData();
+        } else {
+          this.$message.error(res.msg);
+        }
+      })
+    },
+    tapScoreEdit: function (row) {
+      let rows = JSON.parse(JSON.stringify(row));
+      this.scoreform = {
+        uid: rows.uid,
+        type: 1,//1:增加 -1:减少
+        into: '',
+      }
+      this.scoreDialogVisible = true;
+    },
+    /**
+     * 添加
+     */
+    tapAdd: function (sassid) {
+      this.dialogVisible = true;
+      this.$refs['form'].resetFields();
+      this.form = this.$utils.resetFields(this.form, { status: 1 });
+    },
+    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.getData();
+    },
+    statusChange: function (status) {
+      this.detial.status = status;
+      this.detial.page = 1
+      this.getData()
+    },
+    /**
+     * 上传文件
+     * @param res
+     */
+    onUpload: function (res) {
+      if (res.code == -1) {
+        Notice.error({ title: "系统提示", content: res.msg });
+      } else {
+        this.form.imgs.push(res.data.img);
+      }
+    },
+    tapEdit: function (row) {
+      this.form = JSON.parse(JSON.stringify(row));
+      this.dialogVisible = true;
+      this.title = "编辑";
+    },
+    //关闭
+    editClose: function () {
+      this.dialogVisible = false;
+    },
+    /**
+     * 修改数据
+     */
+    subAdmin: function (e) {
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+          let loading = this.$loading("提交数据中...");
+          var data = {};
+          for (var i in this.form) {
+            data[i] = this.form[i];
+          }
+          SystemUserSave(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("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+            });
+        }
+      });
+    },
+
+
+    //搜索栏目
+    tapSeach: function () {
+      this.detial.page = 1;
+      this.getData();
+    },
+    tapUserSeach: function (uid) {
+      this.detial.page = 1;
+      this.detial.uid = uid;
+      this.getData();
+    },
+    //分页
+    tapPage: function (page) {
+      this.detial.page = page;
+      this.getData();
+    },
+    getData: function () {
+      var data = {};
+      this.detial.loading = true;
+      data.page = this.detial.page;
+      data.status = this.detial.status;
+      data.uid = this.detial.uid;
+      data.nickname = this.detial.nickname;
+      data.time = this.detial.time;
+      data.mobile = this.detial.mobile;
+      data.parent_uid = this.detial.parent_uid;
+      SystemUserList(data)
+        .then(res => {
+          this.detial.loading = false;
+          this.detial.data = res.data.list;
+          this.detial.pageSize = res.data.pageSize;
+          this.detial.pageCount = res.data.pageCount;
+          this.detial.waitCount = res.data.waitCount;
+        })
+        .catch(err => {
+          this.detial.loading = false;
+          this.$alert('网络繁忙,加载失败,请稍等片刻在尝试!', '系统提示');
+        });
+    },
+
+  }
+}
 </script>
 </script>
 <style scoped>
 <style scoped>
-iframe.videoIframe{border: 0px;padding: 0px;}
-.el-dialog__body{padding: 0px;}
-.el-dialog__body iframe body{padding: 0px;}
+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: 5px;
+  overflow: hidden;
+  float: left;
+  margin-bottom: 5px;
+  position: relative;
+}
+
+.upimg-item img {
+  width: 82px;
+  cursor: pointer;
+}
 
 
-	.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: 5px;overflow: hidden;float: left;margin-bottom: 5px;position: relative;}
-	.upimg-item img{width: 82px;cursor: pointer;}
-	.img-remove-btn{position: absolute;top: 0px;right: 0px;font-size: 24px;}
+.img-remove-btn {
+  position: absolute;
+  top: 0px;
+  right: 0px;
+  font-size: 24px;
+}
 </style>
 </style>

+ 487 - 406
src/router/routes.js

@@ -1,437 +1,518 @@
 const system = [{
 const system = [{
+	path: '/system',
+	name: "system",
+	meta: {
+		title: '后台系统'
+	},
+	component: () => import('@/layouts/system/index.vue'),
+	children: [{
 		path: '/system',
 		path: '/system',
-		name: "system",
-		meta: {
-			title: '后台系统'
-		},
-		component: () => import('@/layouts/system/index.vue'),
-		children: [{
-				path: '/system',
-				name: 'system_index',
-				meta: {
-					title: '首页',
-					auth: false
-				},
-				component: () => import('@/components/system/index/index')
-			},
-			{
-				path: '/system/index',
-				name: 'system_index',
-				meta: {
-					title: '首页',
-					auth: false
-				},
-				component: () => import('@/components/system/index/index')
-			},
-			{
-				path: '/system/user/index',
-				name: 'system_user_index',
-				meta: {
-					title: '个人设置',
-					auth: true
-				},
-				component: () => import('@/components/system/setting/user/index')
-			},
-			{
-				path: '/system/role/index',
-				name: 'system_role_index',
-				meta: {
-					title: '角色管理'
-				},
-				component: () => import('@/components/system/setting/role/index')
-			},
-			{
-				path: '/system/role/permissions',
-				name: 'system_role_permissions',
-				meta: {
-					title: '权限配置'
-				},
-				component: () => import('@/components/system/setting/role/permissions')
-			},
-			{
-				path: '/system/role/seting',
-				name: 'system_role_seting',
-				meta: {
-					title: '角色设置'
-				},
-				component: () => import('@/components/system/setting/role/seting')
-			},
-			{
-				path: '/system/admin/index',
-				name: 'system_admin_index',
-				meta: {
-					title: '账号管理',
-					auth: true
-				},
-				component: () => import('@/components/system/setting/admin/index')
-			},
-			{
-				path: '/system/setting/log/index',
-				name: 'system_setting_log_index',
-				meta: {
-					title: '日志管理',
-					auth: true
-				},
-				component: () => import('@/components/system/setting/log/index')
-			},
-			{
-				path: '/system/setting/log/login',
-				name: 'system_setting_log_login',
-				meta: {
-					title: '用户登录',
-					auth: true
-				},
-				component: () => import('@/components/system/setting/log/login')
-			},
-			{
-				path: '/system/user/list',
-				name: 'system_user_list',
-				meta: {
-					title: '用户列表',
-					auth: true
-				},
-				component: () => import('@/components/system/user/list')
-			},
-			{
-				path: '/system/user/workerList',
-				name: 'system_user_workerList',
-				meta: {
-					title: '从业人员',
-					auth: true
-				},
-				component: () => import('@/components/system/user/workerList')
-			},
-
-			{
-				path: '/system/user/showTemplateList',
-				name: 'system_user_showTemplateList',
-				meta: {
-					title: '用户模板',
-					auth: true
-				},
-				component: () => import('@/components/system/user/showTemplateList')
-			},
-			{
-				path: '/system/audit/infoAudit',
-				name: 'system_audit_infoAudit',
-				meta: {
-					title: '信息审核',
-					auth: true
-				},
-				component: () => import('@/components/system/audit/infoAudit')
-			},
-			{
-				path: '/system/audit/infoAuditItem',
-				name: 'system_audit_infoAuditItem',
-				meta: {
-					title: '信息审核详情',
-					auth: true
-				},
-				component: () => import('@/components/system/audit/infoAuditItem')
-			},
-			{
-				path: '/system/audit/typeAudit',
-				name: 'system_audit_typeAudit',
-				meta: {
-					title: '平台认证',
-					auth: true
-				},
-				component: () => import('@/components/system/audit/typeAudit')
-			},
-			{
-				path: '/system/audit/typeAuditItem',
-				name: 'system_audit_typeAuditItem',
-				meta: {
-					title: '平台认证详情',
-					auth: true
-				},
-				component: () => import('@/components/system/audit/typeAuditItem')
-			},
-			// {
-			//   path: '/system/audit/userAudit',
-			//   name: 'system_audit_userAudit',
-			//   meta: {
-			//     title: '用户审核',
-			//     auth: true
-			//   },
-			//   component: () => import('@/components/system/audit/userAudit')
-			// },
-
-			{
-				path: '/system/showTemplate/list',
-				name: 'system_showTemplate_list',
-				meta: {
-					title: '模板列表',
-					auth: true
-				},
-				component: () => import('@/components/system/showTemplate/list')
-			},
-			{
-				path: '/system/showTemplate/serviceType',
-				name: 'system_showTemplate_serviceType',
-				meta: {
-					title: '服务内容',
-					auth: true
-				},
-				component: () => import('@/components/system/showTemplate/serviceType')
-			},
-			{
-				path: '/system/showTemplate/serviceTimeType',
-				name: 'system_showTemplate_serviceTimeType',
-				meta: {
-					title: '收费时长类型',
-					auth: true
-				},
-				component: () => import('@/components/system/showTemplate/serviceTimeType')
-			},
-			{
-				path: '/system/showTemplate/serviceLabel',
-				name: 'system_showTemplate_serviceLabel',
-				meta: {
-					title: '标签列表',
-					auth: true
-				},
-				component: () => import('@/components/system/showTemplate/serviceLabel')
-			},
-			{
-				path: '/system/showTemplate/code',
-				name: 'system_showTemplate_code',
-				meta: {
-					title: '激活码',
-					auth: true
-				},
-				component: () => import('@/components/system/showTemplate/code')
-			},
-			{
-				path: '/system/user/workType',
-				name: 'system_user_workType',
-				meta: {
-					title: '职业类别',
-					auth: true
-				},
-				component: () => import('@/components/system/user/workType')
-			},
-
+		name: 'system_index',
+		meta: {
+			title: '首页',
+			auth: false
+		},
+		component: () => import('@/components/system/index/index')
+	},
+	{
+		path: '/system/index',
+		name: 'system_index',
+		meta: {
+			title: '首页',
+			auth: false
+		},
+		component: () => import('@/components/system/index/index')
+	},
+	{
+		path: '/system/user/index',
+		name: 'system_user_index',
+		meta: {
+			title: '个人设置',
+			auth: true
+		},
+		component: () => import('@/components/system/setting/user/index')
+	},
+	{
+		path: '/system/role/index',
+		name: 'system_role_index',
+		meta: {
+			title: '角色管理'
+		},
+		component: () => import('@/components/system/setting/role/index')
+	},
+	{
+		path: '/system/role/permissions',
+		name: 'system_role_permissions',
+		meta: {
+			title: '权限配置'
+		},
+		component: () => import('@/components/system/setting/role/permissions')
+	},
+	{
+		path: '/system/role/seting',
+		name: 'system_role_seting',
+		meta: {
+			title: '角色设置'
+		},
+		component: () => import('@/components/system/setting/role/seting')
+	},
+	{
+		path: '/system/admin/index',
+		name: 'system_admin_index',
+		meta: {
+			title: '账号管理',
+			auth: true
+		},
+		component: () => import('@/components/system/setting/admin/index')
+	},
+	{
+		path: '/system/setting/log/index',
+		name: 'system_setting_log_index',
+		meta: {
+			title: '日志管理',
+			auth: true
+		},
+		component: () => import('@/components/system/setting/log/index')
+	},
+	{
+		path: '/system/setting/log/login',
+		name: 'system_setting_log_login',
+		meta: {
+			title: '用户登录',
+			auth: true
+		},
+		component: () => import('@/components/system/setting/log/login')
+	},
+	{
+		path: '/system/user/list',
+		name: 'system_user_list',
+		meta: {
+			title: '用户列表',
+			auth: true
+		},
+		component: () => import('@/components/system/user/list')
+	},
+	{
+		path: '/system/user/workerList',
+		name: 'system_user_workerList',
+		meta: {
+			title: '从业人员',
+			auth: true
+		},
+		component: () => import('@/components/system/user/workerList')
+	},
 
 
-			{
-				path: '/system/user/moneyDetail',
-				name: 'system_user_moneyDetail',
-				meta: {
-					title: '余额明细',
-					auth: true
-				},
-				component: () => import('@/components/system/user/moneyDetail')
-			},
-			{
-				path: '/system/sys/index',
-				name: 'system_sys_index',
-				meta: {
-					title: '网站基本管理',
-					auth: true
-				},
-				component: () => import('@/components/system/setting/sys/index')
-			},
+	{
+		path: '/system/user/showTemplateList',
+		name: 'system_user_showTemplateList',
+		meta: {
+			title: '用户模板',
+			auth: true
+		},
+		component: () => import('@/components/system/user/showTemplateList')
+	},
+	{
+		path: '/system/audit/infoAudit',
+		name: 'system_audit_infoAudit',
+		meta: {
+			title: '信息审核',
+			auth: true
+		},
+		component: () => import('@/components/system/audit/infoAudit')
+	},
+	{
+		path: '/system/audit/infoAuditItem',
+		name: 'system_audit_infoAuditItem',
+		meta: {
+			title: '信息审核详情',
+			auth: true
+		},
+		component: () => import('@/components/system/audit/infoAuditItem')
+	},
+	{
+		path: '/system/audit/typeAudit',
+		name: 'system_audit_typeAudit',
+		meta: {
+			title: '平台认证',
+			auth: true
+		},
+		component: () => import('@/components/system/audit/typeAudit')
+	},
+	{
+		path: '/system/audit/typeAuditItem',
+		name: 'system_audit_typeAuditItem',
+		meta: {
+			title: '平台认证详情',
+			auth: true
+		},
+		component: () => import('@/components/system/audit/typeAuditItem')
+	},
+	// {
+	//   path: '/system/audit/userAudit',
+	//   name: 'system_audit_userAudit',
+	//   meta: {
+	//     title: '用户审核',
+	//     auth: true
+	//   },
+	//   component: () => import('@/components/system/audit/userAudit')
+	// },
 
 
-			{
-				path: '/system/menu/sys',
-				name: 'system_menu_sys',
-				meta: {
-					title: '菜单管理',
-					auth: true
-				},
-				component: () => import('@/components/system/setting/menu/sys')
-			},
+	{
+		path: '/system/showTemplate/list',
+		name: 'system_showTemplate_list',
+		meta: {
+			title: '模板列表',
+			auth: true
+		},
+		component: () => import('@/components/system/showTemplate/list')
+	},
+	{
+		path: '/system/showTemplate/serviceType',
+		name: 'system_showTemplate_serviceType',
+		meta: {
+			title: '服务内容',
+			auth: true
+		},
+		component: () => import('@/components/system/showTemplate/serviceType')
+	},
+	{
+		path: '/system/showTemplate/serviceTimeType',
+		name: 'system_showTemplate_serviceTimeType',
+		meta: {
+			title: '收费时长类型',
+			auth: true
+		},
+		component: () => import('@/components/system/showTemplate/serviceTimeType')
+	},
+	{
+		path: '/system/showTemplate/serviceLabel',
+		name: 'system_showTemplate_serviceLabel',
+		meta: {
+			title: '标签列表',
+			auth: true
+		},
+		component: () => import('@/components/system/showTemplate/serviceLabel')
+	},
+	{
+		path: '/system/showTemplate/code',
+		name: 'system_showTemplate_code',
+		meta: {
+			title: '激活码',
+			auth: true
+		},
+		component: () => import('@/components/system/showTemplate/code')
+	},
+	{
+		path: '/system/user/workType',
+		name: 'system_user_workType',
+		meta: {
+			title: '职业类别',
+			auth: true
+		},
+		component: () => import('@/components/system/user/workType')
+	},
 
 
-			{
-				path: '/system/adver/page',
-				name: 'system_adver_page',
-				meta: {
-					title: '广告类别',
-					auth: true
-				},
-				component: () => import('@/components/system/adver/page.vue')
-			},
-			{
-				path: '/system/adver/index',
-				name: 'system_adver_index',
-				meta: {
-					title: '广告中心',
-					auth: true
-				},
-				component: () => import('@/components/system/adver/index.vue')
 
 
-			},
-			{
-				path: '/system/article/list',
-				name: 'system_article_list',
-				meta: {
-					title: '文章列表',
-					auth: true
-				},
-				component: () => import('@/components/system/article/list.vue')
+	{
+		path: '/system/user/moneyDetail',
+		name: 'system_user_moneyDetail',
+		meta: {
+			title: '余额明细',
+			auth: true
+		},
+		component: () => import('@/components/system/user/moneyDetail')
+	},
+	{
+		path: '/system/sys/index',
+		name: 'system_sys_index',
+		meta: {
+			title: '网站基本管理',
+			auth: true
+		},
+		component: () => import('@/components/system/setting/sys/index')
+	},
 
 
-			},
-			{
-				path: '/system/article/detail',
-				name: 'system_article_detail',
-				meta: {
-					title: '文章详情',
-					auth: true
-				},
-				component: () => import('@/components/system/article/detail.vue')
+	{
+		path: '/system/menu/sys',
+		name: 'system_menu_sys',
+		meta: {
+			title: '菜单管理',
+			auth: true
+		},
+		component: () => import('@/components/system/setting/menu/sys')
+	},
 
 
-			},
-			{
-				path: '/system/eduction/list',
-				name: 'system_eduction_list',
-				meta: {
-					title: '课程列表',
-					auth: true
-				},
-				component: () => import('@/components/system/eduction/list.vue')
+	{
+		path: '/system/adver/page',
+		name: 'system_adver_page',
+		meta: {
+			title: '广告类别',
+			auth: true
+		},
+		component: () => import('@/components/system/adver/page.vue')
+	},
+	{
+		path: '/system/adver/index',
+		name: 'system_adver_index',
+		meta: {
+			title: '广告中心',
+			auth: true
+		},
+		component: () => import('@/components/system/adver/index.vue')
 
 
-			},
-			{
-				path: '/system/eduction/cate',
-				name: 'system_eduction_cate',
-				meta: {
-					title: '课程分类',
-					auth: true
-				},
-				component: () => import('@/components/system/eduction/cate.vue')
+	},
+	{
+		path: '/system/article/list',
+		name: 'system_article_list',
+		meta: {
+			title: '文章列表',
+			auth: true
+		},
+		component: () => import('@/components/system/article/list.vue')
 
 
-			},
-			{
-				path: '/system/eduction/detail',
-				name: 'system_eduction_detail',
-				meta: {
-					title: '课程详情',
-					auth: true
-				},
-				component: () => import('@/components/system/eduction/detail.vue')
+	},
+	{
+		path: '/system/article/detail',
+		name: 'system_article_detail',
+		meta: {
+			title: '文章详情',
+			auth: true
+		},
+		component: () => import('@/components/system/article/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',
-				meta: {
-					title: '图片资源',
-					auth: true
-				},
-				component: () => import('@/components/system/adver/upsource.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/order/showTemplate',
-				name: 'system_order_showTemplate',
-				meta: {
-					title: '模板订单',
-					auth: true
-				},
-				component: () => import('@/components/system/order/showTemplate')
-			},
-			{
-				path: '/system/task/paytrade',
-				name: 'system_task_paytrade',
-				meta: {
-					title: '支付记录',
-					auth: true
-				},
-				component: () => import('@/components/system/task/paytrade')
-			},
-			{
-				path: '/system/signing/list',
-				name: 'system_signing_list',
-				meta: {
-					title: '预约列表',
-					auth: true
-				},
-				component: () => import('@/components/system/signing/list')
-			},
-			{
-				path: '/system/signing/lists',
-				name: 'system_signing_lists',
-				meta: {
-					title: '合同模板列表',
-					auth: true
-				},
-				component: () => import('@/components/system/signing/lists')
-			},
-			{
-				path: '/system/signing/createContract',
-				name: 'system_signing_createContract',
-				meta: {
-					title: '创建合同模板',
-					auth: true
-				},
-				component: () => import('@/components/system/signing/createContract')
-			}
-		]
 	},
 	},
+	{
+		path: '/system/eduction/detail',
+		name: 'system_eduction_detail',
+		meta: {
+			title: '课程详情',
+			auth: true
+		},
+		component: () => import('@/components/system/eduction/detail.vue')
 
 
+	},
 	{
 	{
-		path: '/system/widget/images/index.html',
-		name: `images`,
+		path: '/system/eduction/grlists',
+		name: 'system_eduction_grlists',
 		meta: {
 		meta: {
-			auth: ['admin-user-user-index'],
-			title: '上传图片'
+			title: '分组列表',
+			auth: true
 		},
 		},
-		component: () => import('@/components/system/uploadPictures/widgetImg')
+		component: () => import('@/components/system/eduction/grlists.vue')
 	},
 	},
 	{
 	{
-		path: '/system/login',
-		name: "system_login",
+		path: '/system/eduction/addGrlists',
+		name: 'system_eduction_addGrlists',
 		meta: {
 		meta: {
-			title: '总用户登录'
+			title: '分组详情',
+			auth: true
 		},
 		},
-		component: () => import('@/components/system/login/index')
+		component: () => import('@/components/system/eduction/addGrlists.vue')
 	},
 	},
-	// {
-	//   path: '/index',
-	//   name: "system_index_index",
-	//   meta: {
-	//     title: '首页'
-	//   },
-	//   component: () => import('@/components/system/index/index')
-	// },
+	{
+		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',
+		meta: {
+			title: '图片资源',
+			auth: true
+		},
+		component: () => import('@/components/system/adver/upsource.vue')
 
 
+	},
 
 
 	{
 	{
-		path: '/',
-		name: "system_login2",
+		path: '/system/order/showTemplate',
+		name: 'system_order_showTemplate',
+		meta: {
+			title: '模板订单',
+			auth: true
+		},
+		component: () => import('@/components/system/order/showTemplate')
+	},
+	{
+		path: '/system/task/paytrade',
+		name: 'system_task_paytrade',
+		meta: {
+			title: '支付记录',
+			auth: true
+		},
+		component: () => import('@/components/system/task/paytrade')
+	},
+	{
+		path: '/system/signing/list',
+		name: 'system_signing_list',
+		meta: {
+			title: '预约列表',
+			auth: true
+		},
+		component: () => import('@/components/system/signing/list')
+	},
+	{
+		path: '/system/signing/lists',
+		name: 'system_signing_lists',
+		meta: {
+			title: '合同模板列表',
+			auth: true
+		},
+		component: () => import('@/components/system/signing/lists')
+	},
+	{
+		path: '/system/signing/createContract',
+		name: 'system_signing_createContract',
+		meta: {
+			title: '创建合同模板',
+			auth: true
+		},
+		component: () => import('@/components/system/signing/createContract')
+	},
+	{
+		path: '/system/chat/index',
+		name: 'system_chat_index',
+		meta: {
+			title: '聊天记录',
+			auth: true
+		},
+		component: () => import('@/components/system/chat/index')
+	},
+	{
+		path: '/system/forum/index',
+		name: 'system_forum_index',
+		meta: {
+			title: '发布者',
+			auth: true
+		},
+		component: () => import('@/components/system/forum/index')
+	},
+	{
+		path: '/system/forum/list',
+		name: 'system_forum_list',
+		meta: {
+			title: '贴子管理',
+			auth: true
+		},
+		component: () => import('@/components/system/forum/list')
+	},
+	{
+		path: '/system/points/list',
+		name: 'system_points_list',
+		meta: {
+			title: '积分商品',
+			auth: true
+		},
+		component: () => import('@/components/system/points/list')
+	},
+	{
+		path: '/system/goods/cate',
+		name: 'system_goods_cate',
 		meta: {
 		meta: {
-			title: '总用户登录'
+			title: '商品分类',
+			auth: true
 		},
 		},
-		component: () => import('@/components/system/login/index')
-	}
+		component: () => import('@/components/system/goods/cate')
+	},
+	{
+		path: '/system/goods/list',
+		name: 'system_goods_list',
+		meta: {
+			title: '商品列表',
+			auth: true
+		},
+		component: () => import('@/components/system/goods/list')
+	},
+	{
+		path: '/system/points/czlist',
+		name: 'system_points_czlist',
+		meta: {
+			title: '充值记录',
+			auth: true
+		},
+		component: () => import('@/components/system/points/czList')
+	},
+	{
+		path: '/system/points/order',
+		name: 'system_points_order',
+		meta: {
+			title: '积分订单',
+			auth: true
+		},
+		component: () => import('@/components/system/points/order')
+	},
+	{
+		path: '/system/points/bill',
+		name: 'system_points_bill',
+		meta: {
+			title: '积分流水',
+			auth: true
+		},
+		component: () => import('@/components/system/points/bill')
+	},
+	]
+},
+
+{
+	path: '/system/widget/images/index.html',
+	name: `images`,
+	meta: {
+		auth: ['admin-user-user-index'],
+		title: '上传图片'
+	},
+	component: () => import('@/components/system/uploadPictures/widgetImg')
+},
+{
+	path: '/system/login',
+	name: "system_login",
+	meta: {
+		title: '总用户登录'
+	},
+	component: () => import('@/components/system/login/index')
+},
+// {
+//   path: '/index',
+//   name: "system_index_index",
+//   meta: {
+//     title: '首页'
+//   },
+//   component: () => import('@/components/system/index/index')
+// },
+
+
+{
+	path: '/',
+	name: "system_login2",
+	meta: {
+		title: '总用户登录'
+	},
+	component: () => import('@/components/system/login/index')
+}
 
 
 
 
 ];
 ];