Commit 9447f5db authored by chenfenglei's avatar chenfenglei

工具管理修改

parent 4ec672e0
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="老师"> <el-form-item label="老师">
<el-select v-model="form.teacher_id" placeholder="请选择"> <el-select v-model="form.teacher_id" placeholder="请选择" filterable >
<el-option <el-option
v-for="(data,index) in teacherList" v-for="(data,index) in teacherList"
:key="index" :key="index"
......
...@@ -140,12 +140,12 @@ ...@@ -140,12 +140,12 @@
{{scope.row.type|classTypeFilter}} {{scope.row.type|classTypeFilter}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column
label="班级名称"> label="班级名称">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.teacher_name}}一班 {{scope.row.teacher_name}}一班
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column <el-table-column
prop="max_join_num" prop="max_join_num"
label="最大人数"> label="最大人数">
...@@ -254,12 +254,13 @@ ...@@ -254,12 +254,13 @@
let nowGoods = this.goodsList.find(i=>{return i.id === this.selectedGoods[0]}); let nowGoods = this.goodsList.find(i=>{return i.id === this.selectedGoods[0]});
this.periods = nowGoods.children.find(i=>{return i.id === this.selectedGoods[1]}); this.periods = nowGoods.children.find(i=>{return i.id === this.selectedGoods[1]});
this.teacher_id = ''; this.teacher_id = '';
this.getClassList() this.getClassList()
}) })
} else { } else {
getDefaultPeriodsApi().then(res=>{ getDefaultPeriodsApi().then(res=>{
if(res){ if(res){
this.goods_id = res.goods_id; this.goods_id = res.goods_id;
console.log(res)
this.selectedGoods = [parseInt(res.goods_id),parseInt(res.id)]; this.selectedGoods = [parseInt(res.goods_id),parseInt(res.id)];
getPeriodsApi({goods_id:this.selectedGoods[0]}).then(res=>{ getPeriodsApi({goods_id:this.selectedGoods[0]}).then(res=>{
res.list.forEach(i=>{i.name = i.title}); res.list.forEach(i=>{i.name = i.title});
......
<template> <template>
<div class="head-index"> <div class="head-index">
<img class="logo" :src="iconUrl" @click="toHome"/>{{$store.state.userName}} <img class="logo" :src="iconUrl" @click="toHome" />{{$store.state.userName}}
<div class="fl-r"> <div class="fl-r">
<!-- <el-button round size="mini" class="edit-btn" @click="dialogUpdate=true">修改密码 </el-button> <!-- <el-button round size="mini" class="edit-btn" @click="dialogUpdate=true">修改密码 </el-button> -->
<el-button round size="mini" class="edit-btn" @click="logOut">退出登录 </el-button> -->
<el-dropdown> <el-dropdown>
<el-button round size="mini" class="edit-btn" >工具管理 <i class="el-icon-arrow-down el-icon--right"></i></el-button> <el-button round size="mini" class="edit-btn">工具管理
<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item @click.native="entranceObj.show=true">无需登录入口</el-dropdown-item> --> <!-- <el-dropdown-item @click.native="entranceObj.show=true">无需登录入口</el-dropdown-item> -->
<el-dropdown-item @click.native="qrcodeObj.show=true">生成二维码</el-dropdown-item> <el-dropdown-item @click.native="linkObj.show=true">生成工具</el-dropdown-item>
<el-dropdown-item @click.native="linkObj.show=true">生成短链接</el-dropdown-item>
<el-dropdown-item @click.native="userObj.show=true">清除缓存</el-dropdown-item> <el-dropdown-item @click.native="userObj.show=true">清除缓存</el-dropdown-item>
<el-dropdown-item @click.native="dialogUpdate=true">修改密码</el-dropdown-item> <el-dropdown-item @click.native="dialogUpdate=true">修改密码</el-dropdown-item>
<el-dropdown-item @click.native="logOut">退出登录</el-dropdown-item> <el-dropdown-item @click.native="logOut">退出登录</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
<el-dialog <el-dialog title="修改密码" :visible.sync="dialogUpdate" center width="400px">
title="修改密码"
:visible.sync="dialogUpdate"
center
width="400px">
<el-form ref="ruleForm2" label-width="80px" :model="ruleForm2" :rules="rules2"> <el-form ref="ruleForm2" label-width="80px" :model="ruleForm2" :rules="rules2">
<el-form-item label="原密码" prop="oldPass"> <el-form-item label="原密码" prop="oldPass">
<el-input type="password" v-model="ruleForm2.oldPass"></el-input> <el-input type="password" v-model="ruleForm2.oldPass"></el-input>
...@@ -35,21 +30,17 @@ ...@@ -35,21 +30,17 @@
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogUpdate = false">取 消</el-button> <el-button @click="dialogUpdate = false">取 消</el-button>
<el-button type="primary" @click="changePass">确 定</el-button> <el-button type="primary" @click="changePass">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<clear-cache :userObj="userObj" /> <clear-cache :userObj="userObj" />
<entrance :entranceObj="entranceObj" /> <get-link :linkObj="linkObj" />
<get-link :linkObj="linkObj" />
<getqr-code :qrcodeObj="qrcodeObj" />
</div> </div>
</template> </template>
<script> <script>
import clearCache from "./other/clearCache"; import clearCache from "./other/clearCache";
import entrance from "./other/entrance"; import getLink from "./other/getLink";
import getLink from "./other/getLink";
import getqrCode from "./other/getqrCode";
import { logoutApi, editAdminPasswordApi } from "../../service/api"; import { logoutApi, editAdminPasswordApi } from "../../service/api";
import iconUrl from "../../assets/logos.png"; import iconUrl from "../../assets/logos.png";
import cookie from "../../util/cookie"; import cookie from "../../util/cookie";
...@@ -84,22 +75,14 @@ export default { ...@@ -84,22 +75,14 @@ export default {
} }
}; };
return { return {
userObj:{ userObj: {
title:'清除缓存', title: "清除缓存",
show:false show: false
}, },
entranceObj:{ linkObj: {
title:'无需登录入口', title: "生成工具",
show:false show: false
}, },
linkObj:{
title:'生成短链接',
show:false
},
qrcodeObj:{
title:'生成二维码',
show:false
},
iconUrl: iconUrl, iconUrl: iconUrl,
dialogUpdate: false, dialogUpdate: false,
rules2: { rules2: {
...@@ -114,11 +97,9 @@ export default { ...@@ -114,11 +97,9 @@ export default {
} }
}; };
}, },
components:{ components: {
clearCache, clearCache,
entrance, getLink
getLink,
getqrCode
}, },
methods: { methods: {
a() { a() {
......
<template> <template>
<el-dialog :title="linkObj.title" <el-dialog :title="linkObj.title" :visible.sync="linkObj.show" center width="800px">
:visible.sync="linkObj.show" center
width="800px"> <el-tabs v-model="activeName" type="card" style="line-height:1">
<el-form :model="form" ref="form" label-width="100px"> <el-tab-pane label="生成短链接" name="first">
<el-form-item <el-form :model="linkForm" ref="linkForm" label-width="100px">
label="输入链接" <el-form-item label="输入链接" prop="link" :rules="[ { required: true, message: '内容不能为空'}]">
prop="link" <el-input v-model="linkForm.link" autocomplete="off"></el-input>
:rules="[ </el-form-item>
{ required: true, message: '内容不能为空'} <el-form-item>
]" <el-button type="primary" @click="submitForm('linkForm')">获取</el-button>
> </el-form-item>
<el-input v-model="form.link" autocomplete="off"></el-input> </el-form>
</el-form-item> <div class="link_content" v-if="linkContent.show">
<el-form-item> <div class="content">
<el-button type="primary" @click="submitForm('form')">获取</el-button> <el-input v-model="linkContent.text" readonly="readonly" id="text"></el-input>
</el-form-item> <textarea id="input" style="opacity:0;z-index=-10;position:absolute;top:0;left:0;"></textarea>
</el-form> </div>
<div class="link_content" v-if="content.show"> <el-button type="primary" @click="copyUrl(linkContent.text)">复制链接</el-button>
<div class="content"> </div>
<el-input v-model="content.text" readonly="readonly" id="text"></el-input> </el-tab-pane>
<textarea id="input" style="opacity:0;z-index=-10;position:absolute;top:0;left:0;"></textarea> <el-tab-pane label="生成二维码" name="second">
</div> <el-form :model="qrForm" ref="qrForm" label-width="100px" class="demo-ruleForm">
<el-button type="primary" @click="copyUrl(content.text)">复制链接</el-button> <el-form-item label="输入链接" prop="link" :rules="[{ required: true, message: '内容不能为空'} ]">
</div> <el-input v-model="qrForm.link" autocomplete="off"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitqrForm('qrForm')">获取</el-button>
</el-form-item>
</el-form>
<div class="link_content" v-if="qrContent.show">
<div class="qr_content">
<img :src="qrContent.url" id="cavasimg">
</div>
</div>
</el-tab-pane>
</el-tabs>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import {getLinkApi} from "../../../service/api"; import { getLinkApi } from "../../../service/api";
export default { export default {
name: "getLink", name: "getLink",
props: ["linkObj"], props: ["linkObj"],
data() { data() {
return { return {
form: { activeName: "first",
linkForm: {
link: "" link: ""
}, },
content:{ qrForm: {
show:false, link: ""
text:"" },
linkContent: {
show: false,
text: ""
},
qrContent: {
show: false,
url: ""
} }
}; };
}, },
...@@ -45,44 +66,70 @@ export default { ...@@ -45,44 +66,70 @@ export default {
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
if (valid) { if (valid) {
let json={} let json = {};
json.url=this.form.link; json.url = this.linkForm.link;
getLinkApi(json).then((res)=>{ getLinkApi(json).then(res => {
this.content.show=true; this.linkContent.show = true;
this.content.text=res.url; this.linkContent.text = res.url;
}) });
} else { } else {
console.log("error submit!!"); console.log("error submit!!");
return false; return false;
} }
}); });
}, },
copyUrl(data){ submitqrForm(formName) {
let url =data; this.$refs[formName].validate(valid => {
let oInput = document.createElement('input'); if (valid) {
oInput.value = url; let json1 = {};
document.body.appendChild(oInput); json1.url = this.qrForm.link;
oInput.select(); // 选择对象 this.qrContent.show = true;
document.execCommand("Copy"); // 执行浏览器复制命令 this.qrContent.url = `https://admin_test.changchangenglish.com/api/public/qrcode?str=${
this.$message({ json1.url
message: '已成功复制到剪切板', }`;
type: 'success' } else {
}); console.log("error submit!!");
oInput.remove() return false;
}, }
});
},
copyUrl(data) {
let url = data;
let oInput = document.createElement("input");
oInput.value = url;
document.body.appendChild(oInput);
oInput.select(); // 选择对象
document.execCommand("Copy"); // 执行浏览器复制命令
this.$message({
message: "已成功复制到剪切板",
type: "success"
});
oInput.remove();
}
}, },
watch:{ watch: {
'linkObj.show':function(a){ "linkObj.show": function(a) {
if(!a){ if (!a) {
this.form.link=""; this.linkForm.link = "";
this.content.show=false; this.qrForm.link = "";
this.linkContent.show = false;
this.qrContent.show = false;
} }
} }
} }
}; };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.content{ .content {
height: 100px; height: 100px;
} }
.qr_content {
width: 300px;
height: 300px;
margin: 0 auto 20px;
img {
width: 300px;
height: 300px;
}
}
</style> </style>
\ No newline at end of file
<template>
<el-dialog :title="qrcodeObj.title"
:visible.sync="qrcodeObj.show" center
width="800px">
<el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
<el-form-item
label="输入链接"
prop="link"
:rules="[
{ required: true, message: '内容不能为空'}
]"
>
<el-input v-model="form.link" autocomplete="off"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('form')">获取</el-button>
</el-form-item>
</el-form>
<div class="link_content" v-if="content.show">
<div class="content">
<img :src="content.url" id="cavasimg">
</div>
<a :href="content.url" download="a.png">
<!-- <el-button type="primary" >下载二维码</el-button> -->
</a>
</div>
</el-dialog>
</template>
<script>
import {getqrCodeApi} from "../../../service/api";
export default {
name: "getqrCode",
props: ["qrcodeObj"],
data() {
return {
form: {
link: ""
},
content:{
show:false,
url:''
}
};
},
methods: {
submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
let json={}
json.url=this.form.link;
this.content.show=true;
this.content.url=`https://admin_test.changchangenglish.com/api/public/qrcode?str=${json.url}`
} else {
console.log("error submit!!");
return false;
}
});
},
},
watch:{
'qrcodeObj.show':function(a){
if(!a){
this.form.link="";
this.content.show=false;
}
}
}
};
</script>
<style scoped lang="less">
.content{
width: 300px;
height: 300px;
margin: 0 auto;
img{
width: 300px;
height: 300px;
}
}
</style>
\ No newline at end of file
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
<el-form-item label="描述"> <el-form-item label="描述">
<el-input v-model="searchFrom.desc"></el-input> <el-input v-model="searchFrom.desc"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="商品ID"> <el-form-item label="商品名称">
<el-select v-model="searchFrom.value" placeholder="请选择" clearable> <el-select v-model="searchFrom.value" placeholder="请选择">
<el-option <el-option
v-for="(data,index) in goodsList" v-for="(data,index) in goodsList"
:key="index" :key="index"
:label="data.name" :label="data | filterGoods"
:value="String(data.id)"> :value="String(data.id)">
</el-option> </el-option>
</el-select> </el-select>
...@@ -32,15 +32,15 @@ ...@@ -32,15 +32,15 @@
<el-form-item label="描述"> <el-form-item label="描述">
<el-input v-model="searchFrom2.desc"></el-input> <el-input v-model="searchFrom2.desc"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="期数ID"> <el-form-item label="期数名称">
<el-select v-model="searchFrom2.value" placeholder="请选择" clearable> <el-cascader
<el-option :options="periodsList"
v-for="(data,index) in periodList" :props="{value:'id',label:'name'}"
:key="index" @active-item-change="handleItemChange"
:label="data.title" @change="changePeriods"
:value="String(data.id)"> v-model="selectedGoods"
</el-option> >
</el-select> </el-cascader>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<div class="search-btn-block"> <div class="search-btn-block">
...@@ -48,13 +48,13 @@ ...@@ -48,13 +48,13 @@
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import {getConfigListApi,getGoodsListApi,getPeriodsApi,putConfigApi} from "../../../service/api"; import {getConfigListApi,getGoodsListApi,getPeriodsApi,putConfigApi,getDefaultPeriodsApi} from "../../service/api";
import {GOODSTYPE} from '../../util/wordbook';
export default { export default {
name:"entrance", name:"entrance",
props:[ props:[
...@@ -63,7 +63,8 @@ ...@@ -63,7 +63,8 @@
data(){ data(){
return{ return{
goodsList:[], goodsList:[],
periodList:[], periodsList:[],
goods_id:null,
activeName: 'first', activeName: 'first',
searchFrom:{ searchFrom:{
key:'goods_receive_course ', key:'goods_receive_course ',
...@@ -75,10 +76,16 @@ ...@@ -75,10 +76,16 @@
desc: '', desc: '',
value: '', value: '',
}, },
selectedGoods:[],
} }
}, },
mounted(){ mounted(){
}, },
filters:{
filterGoods(val){
return '[' + GOODSTYPE[val.goods_type] + ']' + '[' +val.current_price / 100 + '元]' + val.name
},
},
methods:{ methods:{
initPage(){ initPage(){
getConfigListApi({key:this.searchFrom.key}).then(res=>{ getConfigListApi({key:this.searchFrom.key}).then(res=>{
...@@ -92,12 +99,15 @@ ...@@ -92,12 +99,15 @@
}); });
getConfigListApi({key:this.searchFrom2.key}).then(res=>{ getConfigListApi({key:this.searchFrom2.key}).then(res=>{
if(res.list && res.list.length>0){ if(res.list && res.list.length>0){
this.searchFrom2.desc = res.list[0].desc; // this.searchFrom2.desc = res.list[0].desc;
this.searchFrom2.value = res.list[0].value; // this.selectedGoods = [parseInt(res.goods_id),parseInt(res.list[0].value)];
// console.log(res.list)
}else{ }else{
this.searchFrom2.desc = ''; this.searchFrom2.desc = '';
this.searchFrom2.value = ''; this.searchFrom2.value = '';
} }
this.searchFrom2.desc = '';
this.searchFrom2.value = '';
}) })
}, },
getPeriodsList(){ getPeriodsList(){
...@@ -106,7 +116,7 @@ ...@@ -106,7 +116,7 @@
page: 1 page: 1
} }
getPeriodsApi(json1).then(res=>{ getPeriodsApi(json1).then(res=>{
this.periodList = res.list; this.periodsList = res.list;
}); });
}, },
getGoodsList(){ getGoodsList(){
...@@ -127,7 +137,6 @@ ...@@ -127,7 +137,6 @@
}).then(() => { }).then(() => {
console.log(data); console.log(data);
let json ={ let json ={
} }
json.value=data.value; json.value=data.value;
json.key=data.key; json.key=data.key;
...@@ -145,8 +154,32 @@ ...@@ -145,8 +154,32 @@
message: "请设置选择项!" message: "请设置选择项!"
}); });
} }
} },
changePeriods(data){
if(data.length>1){
this.searchFrom2.value=String(data[1]);
}
},
handleItemChange(val){
getPeriodsApi({goods_id:val[0]}).then(res=>{
res.list.forEach(i=>{i.name = i.title});
this.periodsList.find(i=>{return i.id === val[0]}).children = res.list
})
},
initPage1(){
let json = {
page: 1,
limit: 100,
goods_type:'1,2'
};
getGoodsListApi(json).then(res=>{
res.list.forEach(i=>{
i.children = [];
});
this.periodsList = res.list;
});
},
}, },
watch:{ watch:{
'entranceObj.show':function(a){ 'entranceObj.show':function(a){
...@@ -154,11 +187,7 @@ ...@@ -154,11 +187,7 @@
this.initPage() this.initPage()
this.getPeriodsList(); this.getPeriodsList();
this.getGoodsList(); this.getGoodsList();
}else{ this.initPage1();
this.searchFrom2.value="";
this.searchFrom2.desc="";
this.searchFrom.value="";
this.searchFrom.desc="";
} }
} }
} }
......
<template> <template>
<div> <div class="not_buy">
<div class="head clear-both">
<el-button plain type="success" style="float: right;margin-bottom:20px;" v-if="!$store.state.readonly" @click="entranceObj.show=true">无需登录入口</el-button>
</div>
<el-table :data="configList" style="width: 100%">
<el-table-column label="用户ID" sortable prop="scope.row.user_id" className="userInfo">
<template slot-scope="scope">
<img class="avatar" :src="scope.row.avatar">
{{scope.row.nickname}}(ID:{{scope.row.user_id}})
</template>
</el-table-column>
<el-table-column prop="class_id" label="班级ID">
</el-table-column>
<el-table-column label="商品ID/期数ID">
<template slot-scope="scope">
{{scope.row.goods_id}}/{{scope.row.periods_id}}
</template>
</el-table-column>
<el-table-column prop="created_at" label="创建时间" sortable>
</el-table-column>
<el-table-column prop="updated_at" label="结束时间" sortable>
</el-table-column>
</el-table>
<page :nowPage="nowPage" :total="total" @pageChange="onPageChange" @sizeChange="onSizeChange" />
<entrance :entranceObj="entranceObj" />
</div> </div>
</template> </template>
<script> <script>
import {getNotBuyApi} from "../../service/api" import entrance from "./entrance";
export default { import { getClassConfigApi } from "../../service/api";
name: "notBuyClass", import page from "../framework/page";
data(){ export default {
return{ name: "notBuyClass",
data() {
return {
nowPage: 1,
total: 0,
limit: 10,
configList: [],
entranceObj: {
title: "无需登录入口",
show: false
} }
};
},
components: {
entrance,
page
},
mounted() {
this.getList();
},
methods: {
onPageChange(val) {
this.nowPage = val;
this.getList();
}, },
mounted(){ onSizeChange(val) {
this.nowPage = 1;
this.limit = val;
this.getList();
}, },
getList() {
methods:{ let json = {
getList(){ limit: this.limit,
let json=""; page: this.nowPage
getNotBuyApi(json).then((res)=>{ };
console.log(res); getClassConfigApi(json).then(res => {
}) console.log(res);
}, this.total = res.total;
this.configList=res.list;
});
}
} }
} };
</script> </script>
<style scoped> <style scoped lang="less">
.not_buy {
.head {
margin-bottom: 10px;
}
width: 100%;
padding: 20px 0;
.page-div {
text-align: center;
padding-top: 20px;
}
}
.avatar {
width:50px;
height: 50px;
border-radius: 50%;
}
</style>
<style>
.userInfo >div{
display: flex;
flex-flow: row nowrap;
justify-content: flex-start;
align-items: center;
}
</style> </style>
...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
import detailDialog from './detail' import detailDialog from './detail'
import refundDetail from './refundDetail' import refundDetail from './refundDetail'
import AddressArray from '../framework/address-picker/addr' import AddressArray from '../framework/address-picker/addr'
import {INVITETYPE,ORDERSTATUS,BUYTYPE,BUYTYPEOPTION,ORDERSTATUSOPTION,INVITETYPEOPTION} from "../../util/wordbook"; import {INVITETYPE,ORDERSTATUS,BUYTYPE,BUYTYPEOPTION,ORDERSTATUSOPTION,INVITETYPEOPTION,GOODSTYPE} from "../../util/wordbook";
import CommonJs from '../../util/common'; import CommonJs from '../../util/common';
export default { export default {
...@@ -670,7 +670,7 @@ ...@@ -670,7 +670,7 @@
return val = val / 100 + '元' return val = val / 100 + '元'
}, },
filterGoods(val){ filterGoods(val){
return val.name + '[' +val.current_price / 100 + '元]' return '[' + GOODSTYPE[val.goods_type] + ']' + '[' +val.current_price / 100 + '元]' + val.name
} }
} }
} }
......
...@@ -23,7 +23,15 @@ ...@@ -23,7 +23,15 @@
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="期数名称" prop="title"> <el-form-item label="期数名称" prop="title">
<el-input v-model="form.title"></el-input> <!-- <el-input v-model="form.title"></el-input> -->
<el-cascader
:options="periodsList"
:props="{value:'id',label:'name'}"
@active-item-change="handleItemChange"
@change="changePeriods"
v-model="selectedGoods"
>
</el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="开始主题" prop="startNum"> <el-form-item label="开始主题" prop="startNum">
<el-select v-model="form.startNum" clearable placeholder="请选择"> <el-select v-model="form.startNum" clearable placeholder="请选择">
...@@ -46,7 +54,7 @@ ...@@ -46,7 +54,7 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="带班老师" prop="teacherList" v-if = "!form.id"> <el-form-item label="带班老师" prop="teacherList" v-if = "!form.id">
<el-select v-model="form.teacherList" placeholder="请选择" @change="onTeacher1Change"> <el-select v-model="form.teacherList" placeholder="请选择" @change="onTeacher1Change" filterable multiple>
<el-option <el-option
v-for="item in teacher1Options" v-for="item in teacher1Options"
:key="item.id" :key="item.id"
...@@ -56,7 +64,7 @@ ...@@ -56,7 +64,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="观摩老师" prop="viewTeacher" v-if = "!form.id"> <el-form-item label="观摩老师" prop="viewTeacher" v-if = "!form.id">
<el-select v-model="form.viewTeacher" placeholder="请选择" @change="onTeacher2Change"> <el-select v-model="form.viewTeacher" placeholder="请选择" @change="onTeacher2Change" filterable multiple>
<el-option <el-option
v-for="item in teacher2Options" v-for="item in teacher2Options"
:key="item.id" :key="item.id"
...@@ -93,7 +101,7 @@ ...@@ -93,7 +101,7 @@
</template> </template>
<script> <script>
import {getGoodsListApi,getAddPeriodsApi,getTeacherListApi,getEditPeriodsApi,getLessonDetailApi} from "../../service/api"; import {getGoodsListApi,getAddPeriodsApi,getTeacherListApi,getEditPeriodsApi,getLessonDetailApi,getPeriodsApi} from "../../service/api";
import {ISORNOT,GOODSTYPE,LESSONTYPE,GOODSSTATUS} from "../../util/wordbook"; import {ISORNOT,GOODSTYPE,LESSONTYPE,GOODSSTATUS} from "../../util/wordbook";
import goodDialog from './dialog' import goodDialog from './dialog'
export default { export default {
...@@ -104,7 +112,14 @@ ...@@ -104,7 +112,14 @@
return{ return{
loading: false, loading: false,
form: { form: {
is_add_teacher_to_class: false is_add_teacher_to_class: false,
goods_id:'',
teacherList:'',
viewTeacher:'',
is_add_teacher_to_class:'',
rest_week_day:'',
title:"",
goods_id:"",
}, },
show: false, show: false,
viewTeacher: '', viewTeacher: '',
...@@ -173,7 +188,9 @@ ...@@ -173,7 +188,9 @@
viewTeacher: [ viewTeacher: [
{ required: true, message: '观摩老师不能为空', trigger: 'change' } { required: true, message: '观摩老师不能为空', trigger: 'change' }
] ]
} },
periodsList:[],
selectedGoods:[],
} }
}, },
components:{ components:{
...@@ -198,7 +215,7 @@ ...@@ -198,7 +215,7 @@
return GOODSSTATUS[value] return GOODSSTATUS[value]
}, },
filterGoods(val){ filterGoods(val){
return '(id:'+val.id+')' + val.name + '[' +val.current_price / 100 + '元]' return '[' + GOODSTYPE[val.goods_type] + ']' + '[' +val.current_price / 100 + '元]' + val.name
} }
}, },
methods:{ methods:{
...@@ -249,7 +266,7 @@ ...@@ -249,7 +266,7 @@
findDifferentArray(array1, array2){ findDifferentArray(array1, array2){
let newArray = [] let newArray = []
array1.forEach((val)=>{ array1.forEach((val)=>{
let index = array2.findIndex((item)=>{ let index = array1.findIndex((item)=>{
return val.id == item return val.id == item
}) })
if (index === -1) { if (index === -1) {
...@@ -281,6 +298,7 @@ ...@@ -281,6 +298,7 @@
}, },
getLessonDetail(id){ getLessonDetail(id){
getLessonDetailApi(id,{}).then((res) => { getLessonDetailApi(id,{}).then((res) => {
console.log(res)
this.itemOptions = res.detail[res.type] this.itemOptions = res.detail[res.type]
}) })
}, },
...@@ -303,12 +321,46 @@ ...@@ -303,12 +321,46 @@
} }
this.show = this.dialogObj.show this.show = this.dialogObj.show
}) })
} },
changePeriods(data){
if(data.length>1){
this.form.title=String(data[1]);
}
},
handleItemChange(val){
getPeriodsApi({goods_id:val[0]}).then(res=>{
res.list.forEach(i=>{i.name = i.title});
this.periodsList.find(i=>{return i.id === val[0]}).children = res.list
})
},
initPage1(){
let json = {
page: 1,
limit: 100,
goods_type:'1,2'
};
getGoodsListApi(json).then(res=>{
res.list.forEach(i=>{
i.children = [];
});
this.periodsList = res.list;
});
},
}, },
mounted(){ mounted(){
// this.initPage() // this.initPage()
this.getTeachers(); this.getTeachers();
this.getGoodsOption(); this.getGoodsOption();
this.initPage1();
},
watch:{
'dialogObj.show':function(a){
if(a){
}
}
} }
} }
</script> </script>
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
prop="id" prop="id"
label="商品ID"> label="商品编号" width="80">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
......
import Vue from 'vue'; import Vue from 'vue';
import {post,fetch,patch,put,del,upload} from './index' import { post, fetch, patch, put, del, upload } from './index'
import md5 from "js-md5"; import md5 from "js-md5";
const _baseUrl=process.env.API_URL; const _baseUrl = process.env.API_URL;
Vue.prototype.$post=post; Vue.prototype.$post = post;
Vue.prototype.$fetch=fetch; Vue.prototype.$fetch = fetch;
Vue.prototype.$patch=patch; Vue.prototype.$patch = patch;
Vue.prototype.$put=put; Vue.prototype.$put = put;
Vue.prototype.$del=del; Vue.prototype.$del = del;
Vue.prototype.$upload = upload; Vue.prototype.$upload = upload;
//登录 //登录
const loginURL = `${_baseUrl}api/admin/login`; const loginURL = `${_baseUrl}api/admin/login`;
export const loginApi = function(json) { export const loginApi = function(json) {
return Vue.prototype.$post(loginURL,{"username":json.username,"passwd":json.password}) return Vue.prototype.$post(loginURL, { "username": json.username, "passwd": json.password })
}; };
//退出登录 //退出登录
const logOutUrl = `${_baseUrl}api/admin/logout`; const logOutUrl = `${_baseUrl}api/admin/logout`;
export const logoutApi = function() { export const logoutApi = function() {
return Vue.prototype.$post(logOutUrl) return Vue.prototype.$post(logOutUrl)
}; };
//查询账号列表 //查询账号列表
const getAdminListUrl = `${_baseUrl}api/admin/user/list`; const getAdminListUrl = `${_baseUrl}api/admin/user/list`;
export const getAdminListApi = function (json) { export const getAdminListApi = function(json) {
return Vue.prototype.$fetch(getAdminListUrl,json) return Vue.prototype.$fetch(getAdminListUrl, json)
}; };
//修改账号信息 //修改账号信息
const editAdminUrl = `${_baseUrl}api/admin/user/info`; const editAdminUrl = `${_baseUrl}api/admin/user/info`;
export const editAdminListApi = function (id,json) { export const editAdminListApi = function(id, json) {
return Vue.prototype.$put(`${editAdminUrl}/${id}`,json) return Vue.prototype.$put(`${editAdminUrl}/${id}`, json)
}; };
//添加账号 //添加账号
const addAdminUrl = `${_baseUrl}api/admin/user/add`; const addAdminUrl = `${_baseUrl}api/admin/user/add`;
export const addAdminListApi = function (json) { export const addAdminListApi = function(json) {
return Vue.prototype.$post(addAdminUrl,json) return Vue.prototype.$post(addAdminUrl, json)
}; };
//删除账号 //删除账号
const delAdminUrl = `${_baseUrl}api/admin/user`; const delAdminUrl = `${_baseUrl}api/admin/user`;
export const delAdminListApi = function (id) { export const delAdminListApi = function(id) {
return Vue.prototype.$del(`${delAdminUrl}/${id}`) return Vue.prototype.$del(`${delAdminUrl}/${id}`)
}; };
//修改密码 //修改密码
const editPasswordUrl = `${_baseUrl}api/admin/user/passwd`; const editPasswordUrl = `${_baseUrl}api/admin/user/passwd`;
export const editPasswordApi = function (id,json) { export const editPasswordApi = function(id, json) {
return Vue.prototype.$patch(`${editPasswordUrl}/${id}`,json) return Vue.prototype.$patch(`${editPasswordUrl}/${id}`, json)
}; };
//获取用户列表 //获取用户列表
const getUserListUrl = `${_baseUrl}api/admin/student/list`; const getUserListUrl = `${_baseUrl}api/admin/student/list`;
export const getUserListApi = function (json) { export const getUserListApi = function(json) {
return Vue.prototype.$fetch(getUserListUrl,json) return Vue.prototype.$fetch(getUserListUrl, json)
}; };
//获取用户详情 //获取用户详情
const getUserDetailUrl = `${_baseUrl}api/admin/student/info`; const getUserDetailUrl = `${_baseUrl}api/admin/student/info`;
export const getUserDetailApi = function (id) { export const getUserDetailApi = function(id) {
return Vue.prototype.$fetch(`${getUserDetailUrl}/${id}`) return Vue.prototype.$fetch(`${getUserDetailUrl}/${id}`)
}; };
//获取教师列表 //获取教师列表
const getTeacherListUrl = `${_baseUrl}api/admin/teacher/list`; const getTeacherListUrl = `${_baseUrl}api/admin/teacher/list`;
export const getTeacherListApi = function (json) { export const getTeacherListApi = function(json) {
return Vue.prototype.$fetch(`${getTeacherListUrl}`,json) return Vue.prototype.$fetch(`${getTeacherListUrl}`, json)
}; };
//获取教师详情 //获取教师详情
const getTeacherDetailUrl = `${_baseUrl}api/admin/teacher/info`; const getTeacherDetailUrl = `${_baseUrl}api/admin/teacher/info`;
export const getTeacherDetailApi = function (id, json) { export const getTeacherDetailApi = function(id, json) {
return Vue.prototype.$fetch(`${getTeacherDetailUrl}/${id}`, json) return Vue.prototype.$fetch(`${getTeacherDetailUrl}/${id}`, json)
}; };
//添加教师 //添加教师
const addTeacherUrl = `${_baseUrl}api/admin/teacher/add`; const addTeacherUrl = `${_baseUrl}api/admin/teacher/add`;
export const addTeacherApi = function (json) { export const addTeacherApi = function(json) {
return Vue.prototype.$post(addTeacherUrl,json) return Vue.prototype.$post(addTeacherUrl, json)
}; };
//更新教师信息 //更新教师信息
const editTeacherUrl = `${_baseUrl}api/admin/teacher/info`; const editTeacherUrl = `${_baseUrl}api/admin/teacher/info`;
export const editTeacherApi = function (id, json) { export const editTeacherApi = function(id, json) {
return Vue.prototype.$put(`${editTeacherUrl}/${id}`,json) return Vue.prototype.$put(`${editTeacherUrl}/${id}`, json)
}; };
//删除教师 //删除教师
const delTeacherUrl = `${_baseUrl}api/admin/teacher`; const delTeacherUrl = `${_baseUrl}api/admin/teacher`;
export const delTeacherApi = function (id) { export const delTeacherApi = function(id) {
return Vue.prototype.$del(`${delTeacherUrl}/${id}`) return Vue.prototype.$del(`${delTeacherUrl}/${id}`)
}; };
//获取课程列表 //获取课程列表
const getLessonUrl = `${_baseUrl}api/admin/course/list`; const getLessonUrl = `${_baseUrl}api/admin/course/list`;
export const getLessonApi = function (json) { export const getLessonApi = function(json) {
return Vue.prototype.$fetch(getLessonUrl,json) return Vue.prototype.$fetch(getLessonUrl, json)
}; };
//获取课程详情 //获取课程详情
const getLessonDetailUrl = `${_baseUrl}api/admin/course/info`; const getLessonDetailUrl = `${_baseUrl}api/admin/course/info`;
export const getLessonDetailApi = function (id, json) { export const getLessonDetailApi = function(id, json) {
return Vue.prototype.$fetch(`${getLessonDetailUrl}/${id}`,json) return Vue.prototype.$fetch(`${getLessonDetailUrl}/${id}`, json)
}; };
//编辑课程详情 //编辑课程详情
const editLessonDetailUrl = `${_baseUrl}api/admin/course/info`; const editLessonDetailUrl = `${_baseUrl}api/admin/course/info`;
export const editLessonApi = function (id,json) { export const editLessonApi = function(id, json) {
return Vue.prototype.$put(`${editLessonDetailUrl}/${id}`,json) return Vue.prototype.$put(`${editLessonDetailUrl}/${id}`, json)
}; };
//删除课程 //删除课程
const deleteLessonUrl = `${_baseUrl}api/admin/course`; const deleteLessonUrl = `${_baseUrl}api/admin/course`;
export const deleteLessonAPI = function (id) { export const deleteLessonAPI = function(id) {
return Vue.prototype.$del(`${deleteLessonUrl}/${id}`) return Vue.prototype.$del(`${deleteLessonUrl}/${id}`)
}; };
//新增课程 //新增课程
const addLessonUrl = `${_baseUrl}api/admin/course/add`; const addLessonUrl = `${_baseUrl}api/admin/course/add`;
export const addLessonApi = function (json) { export const addLessonApi = function(json) {
return Vue.prototype.$post(addLessonUrl,json) return Vue.prototype.$post(addLessonUrl, json)
}; };
//获取商品列表 //获取商品列表
const getGoodsListUrl = `${_baseUrl}api/admin/goods/list`; const getGoodsListUrl = `${_baseUrl}api/admin/goods/list`;
export const getGoodsListApi = function (json) { export const getGoodsListApi = function(json) {
return Vue.prototype.$fetch(getGoodsListUrl,json) return Vue.prototype.$fetch(getGoodsListUrl, json)
}; };
//获取商品详情 //获取商品详情
const getGoodsDetailUrl = `${_baseUrl}api/admin/goods/info`; const getGoodsDetailUrl = `${_baseUrl}api/admin/goods/info`;
export const getGoodsDetailApi = function (id, json) { export const getGoodsDetailApi = function(id, json) {
return Vue.prototype.$fetch(`${getGoodsDetailUrl}/${id}`,json) return Vue.prototype.$fetch(`${getGoodsDetailUrl}/${id}`, json)
}; };
//添加商品 //添加商品
const addGoodsUrl = `${_baseUrl}api/admin/goods/add`; const addGoodsUrl = `${_baseUrl}api/admin/goods/add`;
export const addGoodsApi = function (json) { export const addGoodsApi = function(json) {
return Vue.prototype.$post(addGoodsUrl,json) return Vue.prototype.$post(addGoodsUrl, json)
}; };
//编辑商品 //编辑商品
const editGoodsUrl = `${_baseUrl}api/admin/goods/info`; const editGoodsUrl = `${_baseUrl}api/admin/goods/info`;
export const editGoodsApi = function (id, json) { export const editGoodsApi = function(id, json) {
return Vue.prototype.$put(`${editGoodsUrl}/${id}`,json) return Vue.prototype.$put(`${editGoodsUrl}/${id}`, json)
}; };
//删除商品 //删除商品
const deleteGoodsUrl = `${_baseUrl}api/admin/goods`; const deleteGoodsUrl = `${_baseUrl}api/admin/goods`;
export const deleteGoodsApi = function (id) { export const deleteGoodsApi = function(id) {
return Vue.prototype.$del(`${deleteGoodsUrl}/${id}`) return Vue.prototype.$del(`${deleteGoodsUrl}/${id}`)
}; };
// 商品上架 // 商品上架
const upGoodsUrl = `${_baseUrl}api/admin/goods/putaway/`; const upGoodsUrl = `${_baseUrl}api/admin/goods/putaway/`;
export const upGoodsApi = function (id) { export const upGoodsApi = function(id) {
return Vue.prototype.$patch(`${upGoodsUrl}${id}`) return Vue.prototype.$patch(`${upGoodsUrl}${id}`)
}; };
// 商品下架 // 商品下架
const downGoodsUrl = `${_baseUrl}api/admin/goods/soldout/`; const downGoodsUrl = `${_baseUrl}api/admin/goods/soldout/`;
export const downGoodsApi = function (id) { export const downGoodsApi = function(id) {
return Vue.prototype.$patch(`${downGoodsUrl}${id}`) return Vue.prototype.$patch(`${downGoodsUrl}${id}`)
}; };
//查询元素、菜单分类 //查询元素、菜单分类
const getCategoryUrl = `${_baseUrl}api/admin/category/list/0`; const getCategoryUrl = `${_baseUrl}api/admin/category/list/0`;
export const getCategoryApi = function (pid) { export const getCategoryApi = function(pid) {
return Vue.prototype.$fetch(getCategoryUrl,{'pid':pid}) return Vue.prototype.$fetch(getCategoryUrl, { 'pid': pid })
}; };
// 添加教材菜单 // 添加教材菜单
const addCategoryUrl = `${_baseUrl}api/admin/category/add/0`; const addCategoryUrl = `${_baseUrl}api/admin/category/add/0`;
export const addCategoryApi = function (json) { export const addCategoryApi = function(json) {
return Vue.prototype.$post(addCategoryUrl,json) return Vue.prototype.$post(addCategoryUrl, json)
}; };
//删除分类 //删除分类
const delCategoryUrl = `${_baseUrl}api/admin/category`; const delCategoryUrl = `${_baseUrl}api/admin/category`;
export const delCategoryApi = function (id) { export const delCategoryApi = function(id) {
return Vue.prototype.$del(`${delCategoryUrl}/${id}`) return Vue.prototype.$del(`${delCategoryUrl}/${id}`)
}; };
//分类排序修改 //分类排序修改
const sortCategoryUrl = `${_baseUrl}api/admin/category/sort`; const sortCategoryUrl = `${_baseUrl}api/admin/category/sort`;
export const sortCategoryApi = function (json) { export const sortCategoryApi = function(json) {
return Vue.prototype.$patch(sortCategoryUrl,json) return Vue.prototype.$patch(sortCategoryUrl, json)
}; };
//获取分类下的元素列表 //获取分类下的元素列表
const getCateDetailListUrl = `${_baseUrl}api/admin/element/list/0`; const getCateDetailListUrl = `${_baseUrl}api/admin/element/list/0`;
export const getCateListApi = function (id) { export const getCateListApi = function(id) {
return Vue.prototype.$fetch(getCateDetailListUrl,id) return Vue.prototype.$fetch(getCateDetailListUrl, id)
}; };
// 添加元素 // 添加元素
const addElementUrl = `${_baseUrl}api/admin/element/add/`; const addElementUrl = `${_baseUrl}api/admin/element/add/`;
export const addElementApi = function (json, type) { export const addElementApi = function(json, type) {
return Vue.prototype.$post(`${addElementUrl}${type}`,json) return Vue.prototype.$post(`${addElementUrl}${type}`, json)
}; };
// 查询元素详情 // 查询元素详情
const getElemenetDetailUrl = `${_baseUrl}api/admin/element/`; const getElemenetDetailUrl = `${_baseUrl}api/admin/element/`;
export const getElemenetDetailApi = function (id) { export const getElemenetDetailApi = function(id) {
return Vue.prototype.$fetch(`${getElemenetDetailUrl}${id}`) return Vue.prototype.$fetch(`${getElemenetDetailUrl}${id}`)
}; };
// 编辑元素 // 编辑元素
const editElementUrl = `${_baseUrl}api/admin/element/`; const editElementUrl = `${_baseUrl}api/admin/element/`;
export const editElementApi = function (json, id) { export const editElementApi = function(json, id) {
return Vue.prototype.$put(`${editElementUrl}${id}`, json) return Vue.prototype.$put(`${editElementUrl}${id}`, json)
}; };
// 删除元素 // 删除元素
const delElementUrl = `${_baseUrl}api/admin/element/`; const delElementUrl = `${_baseUrl}api/admin/element/`;
export const delElementApi = function (id) { export const delElementApi = function(id) {
return Vue.prototype.$del(`${delElementUrl}${id}`) return Vue.prototype.$del(`${delElementUrl}${id}`)
}; };
// 获取单品列表 // 获取单品列表
const getSingleListUrl = `${_baseUrl}api/admin/item/stock/list`; const getSingleListUrl = `${_baseUrl}api/admin/item/stock/list`;
export const getSingleListApi = function (json) { export const getSingleListApi = function(json) {
return Vue.prototype.$fetch(`${getSingleListUrl}`,json) return Vue.prototype.$fetch(`${getSingleListUrl}`, json)
}; };
// 获取单品详情 // 获取单品详情
const getSingleDetailUrl = `${_baseUrl}api/admin/item/stock/info/`; const getSingleDetailUrl = `${_baseUrl}api/admin/item/stock/info/`;
export const getSingleDetailApi = function (id) { export const getSingleDetailApi = function(id) {
return Vue.prototype.$fetch(`${getSingleDetailUrl}${id}`) return Vue.prototype.$fetch(`${getSingleDetailUrl}${id}`)
}; };
// 删除单品 // 删除单品
const delSingleUrl = `${_baseUrl}api/admin/item/stock/`; const delSingleUrl = `${_baseUrl}api/admin/item/stock/`;
export const delSingleApi = function (id) { export const delSingleApi = function(id) {
return Vue.prototype.$del(`${delSingleUrl}${id}`) return Vue.prototype.$del(`${delSingleUrl}${id}`)
}; };
// 新增单品 // 新增单品
const addSingleUrl = `${_baseUrl}api/admin/item/stock/add`; const addSingleUrl = `${_baseUrl}api/admin/item/stock/add`;
export const addSingleApi = function (json) { export const addSingleApi = function(json) {
return Vue.prototype.$post(addSingleUrl,json) return Vue.prototype.$post(addSingleUrl, json)
}; };
// 修改单品 // 修改单品
const editSingleUrl = `${_baseUrl}api/admin/item/stock/info/`; const editSingleUrl = `${_baseUrl}api/admin/item/stock/info/`;
export const editSingleApi = function (id,json) { export const editSingleApi = function(id, json) {
return Vue.prototype.$put(`${editSingleUrl}${id}`,json) return Vue.prototype.$put(`${editSingleUrl}${id}`, json)
}; };
// 获取盒子分类 // 获取盒子分类
const getBoxTypeListUrl = `${_baseUrl}api/admin/category/list/1`; const getBoxTypeListUrl = `${_baseUrl}api/admin/category/list/1`;
export const getBoxTypeListApi = function () { export const getBoxTypeListApi = function() {
return Vue.prototype.$fetch(getBoxTypeListUrl) return Vue.prototype.$fetch(getBoxTypeListUrl)
}; };
// 获取盒子列表 // 获取盒子列表
const getBoxListUrl = `${_baseUrl}api/admin/item/box/list/`; const getBoxListUrl = `${_baseUrl}api/admin/item/box/list/`;
export const getBoxListApi = function (id) { export const getBoxListApi = function(id) {
return Vue.prototype.$fetch(`${getBoxListUrl}${id}`) return Vue.prototype.$fetch(`${getBoxListUrl}${id}`)
}; };
// 添加盒子 // 添加盒子
const addBoxUrl = `${_baseUrl}api/admin/item/box/add/`; const addBoxUrl = `${_baseUrl}api/admin/item/box/add/`;
export const addBoxApi = function (id, json) { export const addBoxApi = function(id, json) {
return Vue.prototype.$post(`${addBoxUrl}${id}`,json) return Vue.prototype.$post(`${addBoxUrl}${id}`, json)
}; };
// 删除盒子 // 删除盒子
const delBoxUrl = `${_baseUrl}api/admin/item/box/`; const delBoxUrl = `${_baseUrl}api/admin/item/box/`;
export const delBoxApi = function (id) { export const delBoxApi = function(id) {
return Vue.prototype.$del(`${delBoxUrl}${id}`) return Vue.prototype.$del(`${delBoxUrl}${id}`)
}; };
// 获取盒子详情 // 获取盒子详情
const getBoxDetailUrl = `${_baseUrl}api/admin/item/box/info/`; const getBoxDetailUrl = `${_baseUrl}api/admin/item/box/info/`;
export const getBoxDetailApi = function (id) { export const getBoxDetailApi = function(id) {
return Vue.prototype.$fetch(`${getBoxDetailUrl}${id}`) return Vue.prototype.$fetch(`${getBoxDetailUrl}${id}`)
}; };
// 更新盒子 // 更新盒子
const editBoxUrl = `${_baseUrl}api/admin/item/box/info/`; const editBoxUrl = `${_baseUrl}api/admin/item/box/info/`;
export const editBoxApi = function (id, json) { export const editBoxApi = function(id, json) {
return Vue.prototype.$put(`${editBoxUrl}${id}`,json) return Vue.prototype.$put(`${editBoxUrl}${id}`, json)
}; };
// 获取公众号菜单 // 获取公众号菜单
const getPublicMenuUrl = `${_baseUrl}api/admin/open/menu`; const getPublicMenuUrl = `${_baseUrl}api/admin/open/menu`;
export const getPublicMenuApi = function () { export const getPublicMenuApi = function() {
return Vue.prototype.$fetch(getPublicMenuUrl) return Vue.prototype.$fetch(getPublicMenuUrl)
}; };
// 添加公众号菜单 // 添加公众号菜单
export const savePublicMenuApi = function (json) { export const savePublicMenuApi = function(json) {
return Vue.prototype.$post(getPublicMenuUrl,json) return Vue.prototype.$post(getPublicMenuUrl, json)
}; };
// 获取配置列表 // 获取配置列表
const getConfigListUrl = `${_baseUrl}api/admin/sys/config/list`; const getConfigListUrl = `${_baseUrl}api/admin/sys/config/list`;
export const getConfigListApi = function (json) { export const getConfigListApi = function(json) {
return Vue.prototype.$fetch(getConfigListUrl, json) return Vue.prototype.$fetch(getConfigListUrl, json)
}; };
// 新增系统配置 // 新增系统配置
const saveConfigUrl = `${_baseUrl}api/admin/sys/config`; const saveConfigUrl = `${_baseUrl}api/admin/sys/config`;
export const saveConfigApi = function (json) { export const saveConfigApi = function(json) {
return Vue.prototype.$post(saveConfigUrl, json) return Vue.prototype.$post(saveConfigUrl, json)
}; };
// 更新关键词 // 更新关键词
const updateConfigUrl = `${_baseUrl}api/admin/sys/config`; const updateConfigUrl = `${_baseUrl}api/admin/sys/config`;
export const updateConfigApi = function (config_id,json) { export const updateConfigApi = function(config_id, json) {
return Vue.prototype.$put(`${updateConfigUrl}/${config_id}`, json) return Vue.prototype.$put(`${updateConfigUrl}/${config_id}`, json)
}; };
// 删除配置 // 删除配置
const delConfigUrl = `${_baseUrl}api/admin/sys/config/`; const delConfigUrl = `${_baseUrl}api/admin/sys/config/`;
export const deleteConfigApi = function (config_id) { export const deleteConfigApi = function(config_id) {
return Vue.prototype.$del(`${delConfigUrl}${config_id}`) return Vue.prototype.$del(`${delConfigUrl}${config_id}`)
}; };
// 获取配置详情 // 获取配置详情
const getConfigDetailUrl = `${_baseUrl}api/admin/sys/config/`; const getConfigDetailUrl = `${_baseUrl}api/admin/sys/config/`;
export const getConfigDetailApi = function (id) { export const getConfigDetailApi = function(id) {
return Vue.prototype.$fetch(`${getConfigDetailUrl}${id}`) return Vue.prototype.$fetch(`${getConfigDetailUrl}${id}`)
}; };
// 获取素材列表 // 获取素材列表
const getMediaListUrl = `${_baseUrl}api/admin/open/media/list`; const getMediaListUrl = `${_baseUrl}api/admin/open/media/list`;
export const getMediaListApi = function (json) { export const getMediaListApi = function(json) {
return Vue.prototype.$fetch(getMediaListUrl, json) return Vue.prototype.$fetch(getMediaListUrl, json)
}; };
// 文件上传 // 文件上传
const uploadFileUrl = `${_baseUrl}api/public/upload/zone`; const uploadFileUrl = `${_baseUrl}api/public/upload/zone`;
export const uploadFileApi = function (json) { export const uploadFileApi = function(json) {
return Vue.prototype.$upload(uploadFileUrl,json) return Vue.prototype.$upload(uploadFileUrl, json)
}; };
// 获取菜单列表 // 获取菜单列表
const getMenuListUrl = `${_baseUrl}api/admin/category/list/2`; const getMenuListUrl = `${_baseUrl}api/admin/category/list/2`;
export const getMenuListApi = function () { export const getMenuListApi = function() {
return Vue.prototype.$fetch(`${getMenuListUrl}`) return Vue.prototype.$fetch(`${getMenuListUrl}`)
}; };
// 新增菜单 // 新增菜单
const addMenuListUrl = `${_baseUrl}api/admin/category/add/2`; const addMenuListUrl = `${_baseUrl}api/admin/category/add/2`;
export const saveMenuApi = function (json) { export const saveMenuApi = function(json) {
return Vue.prototype.$post(addMenuListUrl, json) return Vue.prototype.$post(addMenuListUrl, json)
}; };
// 更改菜单 // 更改菜单
const updateMenuUrl = `${_baseUrl}api/admin/category/`; const updateMenuUrl = `${_baseUrl}api/admin/category/`;
export const updateMenuApi = function (id,json) { export const updateMenuApi = function(id, json) {
return Vue.prototype.$put(`${updateMenuUrl}${id}`, json) return Vue.prototype.$put(`${updateMenuUrl}${id}`, json)
}; };
// 删除菜单 // 删除菜单
export const delMenuApi = function (id) { export const delMenuApi = function(id) {
return Vue.prototype.$del(`${updateMenuUrl}${id}`) return Vue.prototype.$del(`${updateMenuUrl}${id}`)
}; };
// 获取权限列表 // 获取权限列表
const getRoleListUrl = `${_baseUrl}api/admin/role/list`; const getRoleListUrl = `${_baseUrl}api/admin/role/list`;
export const getRoleListApi = function (json) { export const getRoleListApi = function(json) {
return Vue.prototype.$fetch(`${getRoleListUrl}`, json) return Vue.prototype.$fetch(`${getRoleListUrl}`, json)
}; };
// 新增角色 // 新增角色
const addRoleUrl = `${_baseUrl}api/admin/role/add`; const addRoleUrl = `${_baseUrl}api/admin/role/add`;
export const saveRoleApi = function (json) { export const saveRoleApi = function(json) {
return Vue.prototype.$post(addRoleUrl, json) return Vue.prototype.$post(addRoleUrl, json)
}; };
// 更新权限 // 更新权限
const updateRoleUrl = `${_baseUrl}api/admin/role/info/`; const updateRoleUrl = `${_baseUrl}api/admin/role/info/`;
export const updateRoleApi = function (id,json) { export const updateRoleApi = function(id, json) {
return Vue.prototype.$put(`${updateRoleUrl}${id}`, json) return Vue.prototype.$put(`${updateRoleUrl}${id}`, json)
}; };
// 获取权限详情 // 获取权限详情
export const getRoleDetailApi = function (id) { export const getRoleDetailApi = function(id) {
return Vue.prototype.$fetch(`${updateRoleUrl}${id}`) return Vue.prototype.$fetch(`${updateRoleUrl}${id}`)
}; };
// 删除权限 // 删除权限
const delRoleUrl = `${_baseUrl}api/admin/role/`; const delRoleUrl = `${_baseUrl}api/admin/role/`;
export const delRoleApi = function (id) { export const delRoleApi = function(id) {
return Vue.prototype.$del(`${delRoleUrl}${id}`) return Vue.prototype.$del(`${delRoleUrl}${id}`)
}; };
// 获取banner列表 // 获取banner列表
const getBannerListUrl = `${_baseUrl}api/admin/banner/list`; const getBannerListUrl = `${_baseUrl}api/admin/banner/list`;
export const getBannerListApi = function (json) { export const getBannerListApi = function(json) {
return Vue.prototype.$fetch(`${getBannerListUrl}`, json) return Vue.prototype.$fetch(`${getBannerListUrl}`, json)
}; };
// 添加banner // 添加banner
const addBannerUrl = `${_baseUrl}api/admin/banner/add`; const addBannerUrl = `${_baseUrl}api/admin/banner/add`;
export const addBannerApi = function (json) { export const addBannerApi = function(json) {
return Vue.prototype.$post(addBannerUrl, json) return Vue.prototype.$post(addBannerUrl, json)
}; };
// 编辑banner // 编辑banner
const editBannerUrl = `${_baseUrl}api/admin/banner/info/`; const editBannerUrl = `${_baseUrl}api/admin/banner/info/`;
export const editBannerApi = function (id,json) { export const editBannerApi = function(id, json) {
return Vue.prototype.$put(`${editBannerUrl}${id}`, json) return Vue.prototype.$put(`${editBannerUrl}${id}`, json)
}; };
// 获取banner详情 // 获取banner详情
export const getBannerDetailApi = function (id) { export const getBannerDetailApi = function(id) {
return Vue.prototype.$fetch(`${editBannerUrl}${id}`) return Vue.prototype.$fetch(`${editBannerUrl}${id}`)
}; };
// 删除banner // 删除banner
const delBannerUrl = `${_baseUrl}api/admin/banner/`; const delBannerUrl = `${_baseUrl}api/admin/banner/`;
export const delBannerApi = function (id) { export const delBannerApi = function(id) {
return Vue.prototype.$del(`${delBannerUrl}${id}`) return Vue.prototype.$del(`${delBannerUrl}${id}`)
}; };
// 移动顺序 // 移动顺序
const moveUrl = `${_baseUrl}api/admin/banner/sort`; const moveUrl = `${_baseUrl}api/admin/banner/sort`;
export const moveApi = function (upId, downId) { export const moveApi = function(upId, downId) {
return Vue.prototype.$patch(`${moveUrl}`, {banner_up_id: upId, banner_down_id: downId}) return Vue.prototype.$patch(`${moveUrl}`, { banner_up_id: upId, banner_down_id: downId })
}; };
// 获取期数列表 // 获取期数列表
const getPeriodsUrl = `${_baseUrl}api/admin/periods/list`; const getPeriodsUrl = `${_baseUrl}api/admin/periods/list`;
export const getPeriodsApi = function (json) { export const getPeriodsApi = function(json) {
return Vue.prototype.$fetch(getPeriodsUrl,json) return Vue.prototype.$fetch(getPeriodsUrl, json)
}; };
// 添加期数 // 添加期数
const getAddPeriodsUrl = `${_baseUrl}api/admin/periods/add/`; const getAddPeriodsUrl = `${_baseUrl}api/admin/periods/add/`;
export const getAddPeriodsApi = function (id,json) { export const getAddPeriodsApi = function(id, json) {
return Vue.prototype.$post(`${getAddPeriodsUrl}${id}`,json) return Vue.prototype.$post(`${getAddPeriodsUrl}${id}`, json)
}; };
// 编辑期数 // 编辑期数
const getEditPeriodsUrl = `${_baseUrl}api/admin/periods/info/`; const getEditPeriodsUrl = `${_baseUrl}api/admin/periods/info/`;
export const getEditPeriodsApi = function (id,json) { export const getEditPeriodsApi = function(id, json) {
return Vue.prototype.$put(`${getEditPeriodsUrl}${id}`,json) return Vue.prototype.$put(`${getEditPeriodsUrl}${id}`, json)
}; };
// 删除期数 // 删除期数
const getDelPeriodUrl = `${_baseUrl}api/admin/periods/`; const getDelPeriodUrl = `${_baseUrl}api/admin/periods/`;
export const delPeriodApi = function (id) { export const delPeriodApi = function(id) {
return Vue.prototype.$del(`${getDelPeriodUrl}${id}`) return Vue.prototype.$del(`${getDelPeriodUrl}${id}`)
}; };
// 获取班级列表 // 获取班级列表
const getClassListUrl = `${_baseUrl}api/admin/periods/class/list/`; const getClassListUrl = `${_baseUrl}api/admin/periods/class/list/`;
export const getClassListApi = function (id,json) { export const getClassListApi = function(id, json) {
return Vue.prototype.$fetch(`${getClassListUrl}${id}`,json) return Vue.prototype.$fetch(`${getClassListUrl}${id}`, json)
}; };
// 获取当前期数下的老师列表 // 获取当前期数下的老师列表
const getPeriodsTeacherUrl = `${_baseUrl}api/admin/periods/teacher/list/`; const getPeriodsTeacherUrl = `${_baseUrl}api/admin/periods/teacher/list/`;
export const getPeriodsTeacherApi = function (id) { export const getPeriodsTeacherApi = function(id) {
return Vue.prototype.$fetch(`${getPeriodsTeacherUrl}${id}`) return Vue.prototype.$fetch(`${getPeriodsTeacherUrl}${id}`)
}; };
// 删除班级 // 删除班级
const delClassUrl = `${_baseUrl}api/admin/periods/class/`; const delClassUrl = `${_baseUrl}api/admin/periods/class/`;
export const delClassApi = function (id) { export const delClassApi = function(id) {
return Vue.prototype.$del(`${delClassUrl}${id}`) return Vue.prototype.$del(`${delClassUrl}${id}`)
}; };
// 添加班级 // 添加班级
const addClassUrl = `${_baseUrl}api/admin/periods/class/add/`; const addClassUrl = `${_baseUrl}api/admin/periods/class/add/`;
export const addClassApi = function (id,json) { export const addClassApi = function(id, json) {
return Vue.prototype.$post(`${addClassUrl}${id}`,json) return Vue.prototype.$post(`${addClassUrl}${id}`, json)
}; };
// 修改班级 // 修改班级
const editClassUrl = `${_baseUrl}api/admin/periods/class/info/`; const editClassUrl = `${_baseUrl}api/admin/periods/class/info/`;
export const editClassApi = function (id,json) { export const editClassApi = function(id, json) {
return Vue.prototype.$put(`${editClassUrl}${id}`,json) return Vue.prototype.$put(`${editClassUrl}${id}`, json)
}; };
// 获取班级详情 // 获取班级详情
const getClassDetailUrl = `${_baseUrl}api/admin/periods/class/info/`; const getClassDetailUrl = `${_baseUrl}api/admin/periods/class/info/`;
export const getClassDetailApi = function (id, json) { export const getClassDetailApi = function(id, json) {
return Vue.prototype.$fetch(`${getClassDetailUrl}${id}`,json) return Vue.prototype.$fetch(`${getClassDetailUrl}${id}`, json)
}; };
// 获取班级用户列表 // 获取班级用户列表
const getClassUserUrl = `${_baseUrl}api/admin/class/user/list/`; const getClassUserUrl = `${_baseUrl}api/admin/class/user/list/`;
export const getClassUserApi = function (id,json) { export const getClassUserApi = function(id, json) {
return Vue.prototype.$fetch(`${getClassUserUrl}${id}`,json) return Vue.prototype.$fetch(`${getClassUserUrl}${id}`, json)
}; };
// 添加班级用户 // 添加班级用户
const addClassUserUrl = `${_baseUrl}api/admin/class/user/add/`; const addClassUserUrl = `${_baseUrl}api/admin/class/user/add/`;
export const addClassUesrApi = function (classId, userId, json) { export const addClassUesrApi = function(classId, userId, json) {
return Vue.prototype.$post(`${addClassUserUrl}${classId}/${userId}`,json) return Vue.prototype.$post(`${addClassUserUrl}${classId}/${userId}`, json)
}; };
// 更改看课权限 // 更改看课权限
const changeUserUrl = `${_baseUrl}api/admin/class/user/`; const changeUserUrl = `${_baseUrl}api/admin/class/user/`;
export const changeUserApi = function (id,json) { export const changeUserApi = function(id, json) {
return Vue.prototype.$put(`${changeUserUrl}${id}`,json) return Vue.prototype.$put(`${changeUserUrl}${id}`, json)
}; };
// 添加是否添加老师权限 // 添加是否添加老师权限
const addUserTeacherUrl = `${_baseUrl}api/admin/class/user/teacher/`; const addUserTeacherUrl = `${_baseUrl}api/admin/class/user/teacher/`;
export const addUserTeacherApi = function (id,json) { export const addUserTeacherApi = function(id, json) {
return Vue.prototype.$put(`${addUserTeacherUrl}${id}`,json) return Vue.prototype.$put(`${addUserTeacherUrl}${id}`, json)
}; };
// 移除班级用户 // 移除班级用户
const delClassUserUrl = `${_baseUrl}api/admin/class/user/`; const delClassUserUrl = `${_baseUrl}api/admin/class/user/`;
export const delClassUserApi = function (id) { export const delClassUserApi = function(id) {
return Vue.prototype.$del(`${delClassUserUrl}${id}`) return Vue.prototype.$del(`${delClassUserUrl}${id}`)
}; };
// 获取订单列表 // 获取订单列表
const getOrderListUrl = `${_baseUrl}api/admin/order/list`; const getOrderListUrl = `${_baseUrl}api/admin/order/list`;
export const getOrderListApi = function (json) { export const getOrderListApi = function(json) {
return Vue.prototype.$fetch(getOrderListUrl,json) return Vue.prototype.$fetch(getOrderListUrl, json)
}; };
// 修改订单备注 // 修改订单备注
const editOrderDescUrl = `${_baseUrl}api/admin/order/desc/`; const editOrderDescUrl = `${_baseUrl}api/admin/order/desc/`;
export const editOrderDescApi = function (orderId, type, json) { export const editOrderDescApi = function(orderId, type, json) {
return Vue.prototype.$put(`${editOrderDescUrl}${orderId}/${type}`, json) return Vue.prototype.$put(`${editOrderDescUrl}${orderId}/${type}`, json)
}; };
// 给用户退款 // 给用户退款
const refundUrl = `${_baseUrl}api/admin/bill/refund/`; const refundUrl = `${_baseUrl}api/admin/bill/refund/`;
export const refundApi = function (id, json) { export const refundApi = function(id, json) {
return Vue.prototype.$post(`${refundUrl}${id}`,json) return Vue.prototype.$post(`${refundUrl}${id}`, json)
} ; };
// 修改订单收货地址 // 修改订单收货地址
const editAddressUrl = `${_baseUrl}api/admin/order/address/`; const editAddressUrl = `${_baseUrl}api/admin/order/address/`;
export const editAddressApi = function (id,json) { export const editAddressApi = function(id, json) {
return Vue.prototype.$put(`${editAddressUrl}${id}`,json) return Vue.prototype.$put(`${editAddressUrl}${id}`, json)
}; };
// 提现审核 // 提现审核
const withdrawUrl = `${_baseUrl}/api/admin/order/withdraw/`; const withdrawUrl = `${_baseUrl}/api/admin/order/withdraw/`;
export const withdrawApi = function (id,json) { export const withdrawApi = function(id, json) {
return Vue.prototype.$post(`${withdrawUrl}${id}`,json) return Vue.prototype.$post(`${withdrawUrl}${id}`, json)
}; };
// 退款列表 // 退款列表
const getRefundListUrl = `${_baseUrl}api/admin/order/refund/list`; const getRefundListUrl = `${_baseUrl}api/admin/order/refund/list`;
export const getRefundListApi = function (json) { export const getRefundListApi = function(json) {
return Vue.prototype.$fetch(`${getRefundListUrl}`,json) return Vue.prototype.$fetch(`${getRefundListUrl}`, json)
}; };
// 提现列表 // 提现列表
const getWithdrawListUrl = `${_baseUrl}api/admin/order/withdraw/list`; const getWithdrawListUrl = `${_baseUrl}api/admin/order/withdraw/list`;
export const getWithdrawListApi = function (json) { export const getWithdrawListApi = function(json) {
return Vue.prototype.$fetch(`${getWithdrawListUrl}`,json) return Vue.prototype.$fetch(`${getWithdrawListUrl}`, json)
}; };
// 新增盒子类型 // 新增盒子类型
const addBoxTypeUrl = `${_baseUrl}api/admin/category/add/1`; const addBoxTypeUrl = `${_baseUrl}api/admin/category/add/1`;
export const addBoxTypeApi = function (json) { export const addBoxTypeApi = function(json) {
return Vue.prototype.$post(addBoxTypeUrl, json) return Vue.prototype.$post(addBoxTypeUrl, json)
}; };
// 用户关联老师 // 用户关联老师
const addRelatedTeacherUrl = `${_baseUrl}api/admin/student/bind/`; const addRelatedTeacherUrl = `${_baseUrl}api/admin/student/bind/`;
export const addRelatedTeacherApi = function (id,json) { export const addRelatedTeacherApi = function(id, json) {
return Vue.prototype.$put(`${addRelatedTeacherUrl}${id}`,json) return Vue.prototype.$put(`${addRelatedTeacherUrl}${id}`, json)
}; };
// 操作日志 // 操作日志
const getAdminLogListUrl = `${_baseUrl}api/admin/user/log`; const getAdminLogListUrl = `${_baseUrl}api/admin/user/log`;
export const getAdminLogLisApi = function (json) { export const getAdminLogLisApi = function(json) {
return Vue.prototype.$fetch(`${getAdminLogListUrl}`,json) return Vue.prototype.$fetch(`${getAdminLogListUrl}`, json)
}; };
// 清除缓存 // 清除缓存
const clearCacheListUrl = `/api/admin/redis/key`; const clearCacheListUrl = `/api/admin/redis/key`;
export const clearCacheListApi = function (json) { export const clearCacheListApi = function(json) {
return Vue.prototype.$del(`${clearCacheListUrl}/${json}`) return Vue.prototype.$del(`${clearCacheListUrl}/${json}`)
}; };
// 绑定其他商品 // 绑定其他商品
const bindOtherUrl = `${_baseUrl}api/admin/goods/bind/`; const bindOtherUrl = `${_baseUrl}api/admin/goods/bind/`;
export const bindOtherApi = function (goodsId, newGoodsId) { export const bindOtherApi = function(goodsId, newGoodsId) {
return Vue.prototype.$patch(`${bindOtherUrl}${goodsId}/${newGoodsId}`) return Vue.prototype.$patch(`${bindOtherUrl}${goodsId}/${newGoodsId}`)
}; };
// 冲突商品 // 冲突商品
const conflictUrl = `${_baseUrl}api/admin/goods/conflict/`; const conflictUrl = `${_baseUrl}api/admin/goods/conflict/`;
export const conflictApi = function (id,json) { export const conflictApi = function(id, json) {
return Vue.prototype.$patch(`${conflictUrl}${id}`,json) return Vue.prototype.$patch(`${conflictUrl}${id}`, json)
}; };
// 班级用户添加备注 // 班级用户添加备注
const addPeriodsClassUserDescUrl = `/api/admin/class/user/desc`; const addPeriodsClassUserDescUrl = `/api/admin/class/user/desc`;
export const addPeriodsClassUserDescApi = function (id,json) { export const addPeriodsClassUserDescApi = function(id, json) {
return Vue.prototype.$post(`${addPeriodsClassUserDescUrl}/${id}`,json) return Vue.prototype.$post(`${addPeriodsClassUserDescUrl}/${id}`, json)
}; };
// 复制商品 // 复制商品
const copyShopUrl = `/api/admin/goods/copy/`; const copyShopUrl = `/api/admin/goods/copy/`;
export const copyShopApi = function (id) { export const copyShopApi = function(id) {
return Vue.prototype.$post(`${copyShopUrl}${id}`) return Vue.prototype.$post(`${copyShopUrl}${id}`)
}; };
// 获取media详情 // 获取media详情
const getMediaUrl = `/api/admin/open/media/info`; const getMediaUrl = `/api/admin/open/media/info`;
export const getMediaApi = function (id) { export const getMediaApi = function(id) {
return Vue.prototype.$fetch(`${getMediaUrl}?media_id=${id}`) return Vue.prototype.$fetch(`${getMediaUrl}?media_id=${id}`)
}; };
// 期数数据统计 // 期数数据统计
const getPeriodsStatisticsUrl = '/api/admin/periods/statistics/'; const getPeriodsStatisticsUrl = '/api/admin/periods/statistics/';
export const getPeriodsStatisticsApi = function (id) { export const getPeriodsStatisticsApi = function(id) {
return Vue.prototype.$fetch(`${getPeriodsStatisticsUrl}${id}`) return Vue.prototype.$fetch(`${getPeriodsStatisticsUrl}${id}`)
}; };
// 班级数据统计 // 班级数据统计
const getClassStatisticsUrl = `/api/admin/periods/class/statistics/`; const getClassStatisticsUrl = `/api/admin/periods/class/statistics/`;
export const getClassStatisticsApi = function (periods_id, class_id,json) { export const getClassStatisticsApi = function(periods_id, class_id, json) {
return Vue.prototype.$fetch(`${getClassStatisticsUrl}${periods_id}/${class_id}`,json) return Vue.prototype.$fetch(`${getClassStatisticsUrl}${periods_id}/${class_id}`, json)
}; };
// 用户看课情况 // 用户看课情况
const userLookUrl = `/api/admin/user/static/list/`; const userLookUrl = `/api/admin/user/static/list/`;
export const userLookApi = function (periods_id,user_id, json) { export const userLookApi = function(periods_id, user_id, json) {
return Vue.prototype.$fetch(`${userLookUrl}${periods_id}/${user_id}`, json) return Vue.prototype.$fetch(`${userLookUrl}${periods_id}/${user_id}`, json)
}; };
//订单统计 //订单统计
const orderCountUrl = `/api/admin/order/statistics`; const orderCountUrl = `/api/admin/order/statistics`;
export const orderCountApi = function (json) { export const orderCountApi = function(json) {
return Vue.prototype.$fetch(orderCountUrl,json) return Vue.prototype.$fetch(orderCountUrl, json)
}; };
// 切换期数与班级 // 切换期数与班级
const changeClassUrl = `/api/admin/change/class`; const changeClassUrl = `/api/admin/change/class`;
export const changeClassApi = function (json) { export const changeClassApi = function(json) {
return Vue.prototype.$put(changeClassUrl,json) return Vue.prototype.$put(changeClassUrl, json)
}; };
// 创建微信推广二维码 // 创建微信推广二维码
const createQrCodeUrl = '/api/admin/create/wechat/qrcode'; const createQrCodeUrl = '/api/admin/create/wechat/qrcode';
export const createQrCodeApi = function (json) { export const createQrCodeApi = function(json) {
return Vue.prototype.$post(createQrCodeUrl,json) return Vue.prototype.$post(createQrCodeUrl, json)
}; };
// 获取公众号二维码 // 获取公众号二维码
const getQrCodeListUrl = '/api/admin/wechat/qrcode/list'; const getQrCodeListUrl = '/api/admin/wechat/qrcode/list';
export const getQrCodeListApi = function (json) { export const getQrCodeListApi = function(json) {
return Vue.prototype.$fetch(getQrCodeListUrl,json) return Vue.prototype.$fetch(getQrCodeListUrl, json)
}; };
// 每日关注取关统计 // 每日关注取关统计
const getWatchListUrl = '/api/admin/open/subscribe/statistics'; const getWatchListUrl = '/api/admin/open/subscribe/statistics';
export const getWatchListApi = function (json) { export const getWatchListApi = function(json) {
return Vue.prototype.$fetch(getWatchListUrl,json) return Vue.prototype.$fetch(getWatchListUrl, json)
}; };
// 获取群发结果 // 获取群发结果
const getMsgListUrl = '/api/admin/open/muti/msg'; const getMsgListUrl = '/api/admin/open/muti/msg';
export const getMsgListApi = function (json) { export const getMsgListApi = function(json) {
return Vue.prototype.$fetch(getMsgListUrl,json) return Vue.prototype.$fetch(getMsgListUrl, json)
}; };
// 群发客服消息 // 群发客服消息
const sendMsgUrl = `/api/admin/open/muti/msg`; const sendMsgUrl = `/api/admin/open/muti/msg`;
export const sendMsgApi = function (json) { export const sendMsgApi = function(json) {
return Vue.prototype.$post(`${sendMsgUrl}`, json) return Vue.prototype.$post(`${sendMsgUrl}`, json)
}; };
// 获取微信授权 // 获取微信授权
const getwechatParamUrl = `${_baseUrl}api/client/jssdk`; const getwechatParamUrl = `${_baseUrl}api/client/jssdk`;
export const getwechatParam = function (json) { export const getwechatParam = function(json) {
return Vue.prototype.$fetch(getwechatParamUrl,json) return Vue.prototype.$fetch(getwechatParamUrl, json)
}; };
// 默认当前体验营期数 // 默认当前体验营期数
const getDefaultPeriodsUrl = '/api/admin/periods/default'; const getDefaultPeriodsUrl = '/api/admin/periods/default';
export const getDefaultPeriodsApi = function () { export const getDefaultPeriodsApi = function() {
return Vue.prototype.$fetch(getDefaultPeriodsUrl) return Vue.prototype.$fetch(getDefaultPeriodsUrl)
}; };
// 修改二维码管理 // 修改二维码管理
const updateQrCodeUrl = '/api/admin/wechat/qrcode'; const updateQrCodeUrl = '/api/admin/wechat/qrcode';
export const updateQrCodeApi = function (id, json) { export const updateQrCodeApi = function(id, json) {
return Vue.prototype.$put(`${updateQrCodeUrl}/${id}`,json) return Vue.prototype.$put(`${updateQrCodeUrl}/${id}`, json)
}; };
// 获取二维码列表详情 // 获取二维码列表详情
const getQrCodeDetailUrl = '/api/admin/wechat/qrcode'; const getQrCodeDetailUrl = '/api/admin/wechat/qrcode';
export const getQrCodeDetailUrlApi = function (id) { export const getQrCodeDetailUrlApi = function(id) {
return Vue.prototype.$fetch(`${getQrCodeDetailUrl}/${id}`) return Vue.prototype.$fetch(`${getQrCodeDetailUrl}/${id}`)
}; };
const getAdsListlUrl = '/api/public/ads/list'; const getAdsListlUrl = '/api/public/ads/list';
export const getAdsListApi = function (json) { export const getAdsListApi = function(json) {
return Vue.prototype.$fetch(getAdsListlUrl, json) return Vue.prototype.$fetch(getAdsListlUrl, json)
}; };
const getAdsInnerListUrl = '/api/admin/ads/list'; const getAdsInnerListUrl = '/api/admin/ads/list';
export const getAdsInnerListApi = function (json) { export const getAdsInnerListApi = function(json) {
return Vue.prototype.$fetch(getAdsInnerListUrl, json) return Vue.prototype.$fetch(getAdsInnerListUrl, json)
}; };
// 外部投放修改备注 // 外部投放修改备注
const updateAdsInnerUrl = '/api/admin/ads'; const updateAdsInnerUrl = '/api/admin/ads';
export const updateAdsInnerApi = function (id, json) { export const updateAdsInnerApi = function(id, json) {
return Vue.prototype.$put(`${updateAdsInnerUrl}/${id}`,json) return Vue.prototype.$put(`${updateAdsInnerUrl}/${id}`, json)
}; };
// 订单使用红包列表 // 订单使用红包列表
const getCouponListUrl = '/api/admin/order/coupon'; const getCouponListUrl = '/api/admin/order/coupon';
export const getCouponListApi = function (json) { export const getCouponListApi = function(json) {
return Vue.prototype.$fetch(getCouponListUrl, json) return Vue.prototype.$fetch(getCouponListUrl, json)
}; };
// 更新二维码备注 // 更新二维码备注
const updateQrcodeDescUrl = '/api/admin/wechat/qrcode/desc'; const updateQrcodeDescUrl = '/api/admin/wechat/qrcode/desc';
export const updateQrcodeDescApi = function (id, json) { export const updateQrcodeDescApi = function(id, json) {
return Vue.prototype.$put(`${updateQrcodeDescUrl}/${id}`,json) return Vue.prototype.$put(`${updateQrcodeDescUrl}/${id}`, json)
}; };
// banner上下架 // banner上下架
const bannerChangeStatusUrl = `/api/admin/banner/status/`; const bannerChangeStatusUrl = `/api/admin/banner/status/`;
export const bannerChangeStatusApi = function (id,json) { export const bannerChangeStatusApi = function(id, json) {
return Vue.prototype.$put(`${bannerChangeStatusUrl}${id}`,json) return Vue.prototype.$put(`${bannerChangeStatusUrl}${id}`, json)
}; };
// 微信用户数据分析 // 微信用户数据分析
const getWechatStatisticListUrl = '/api/admin/wechat/statistics'; const getWechatStatisticListUrl = '/api/admin/wechat/statistics';
export const getWechatStatisticListApi = function (json) { export const getWechatStatisticListApi = function(json) {
return Vue.prototype.$fetch(getWechatStatisticListUrl,json) return Vue.prototype.$fetch(getWechatStatisticListUrl, json)
}; };
// 同步用户手机号 // 同步用户手机号
const getSyncUserUrl = '/api/admin/student/mobile'; const getSyncUserUrl = '/api/admin/student/mobile';
export const getSyncUserApi = function (json) { export const getSyncUserApi = function(json) {
return Vue.prototype.$fetch(getSyncUserUrl,json) return Vue.prototype.$fetch(getSyncUserUrl, json)
}; };
// 获取关注统计详情 // 获取关注统计详情
const getStatisticsDetailUrl = '/api/admin/open/subscribe/statistics/detail'; const getStatisticsDetailUrl = '/api/admin/open/subscribe/statistics/detail';
export const getStatisticsDetailApi = function (json) { export const getStatisticsDetailApi = function(json) {
return Vue.prototype.$fetch(getStatisticsDetailUrl,json) return Vue.prototype.$fetch(getStatisticsDetailUrl, json)
}; };
// 修改商品备注 // 修改商品备注
const editGoodsDescUrl = `/api/admin/goods/info/desc/`; const editGoodsDescUrl = `/api/admin/goods/info/desc/`;
export const editGoodsDescApi = function (goodsId, json) { export const editGoodsDescApi = function(goodsId, json) {
return Vue.prototype.$put(`${editGoodsDescUrl}${goodsId}`, json) return Vue.prototype.$put(`${editGoodsDescUrl}${goodsId}`, json)
}; };
// 管理员密码修改 // 管理员密码修改
const editAdminPasswordUrl = `/api/admin/user/passwd`; const editAdminPasswordUrl = `/api/admin/user/passwd`;
export const editAdminPasswordApi = function (json) { export const editAdminPasswordApi = function(json) {
return Vue.prototype.$patch(editAdminPasswordUrl,json) return Vue.prototype.$patch(editAdminPasswordUrl, json)
}; };
// 导出 // 导出
export const exportExcelApi = function (url, params) { export const exportExcelApi = function(url, params) {
url = `${url}?`; url = `${url}?`;
let json = JSON.parse(JSON.stringify(params)) let json = JSON.parse(JSON.stringify(params))
for(let k in json) for (let k in json) {
{ let reg = /^[0-9]+$/u;
let reg = /^[0-9]+$/u; if (reg.test(json[k])) {
if(reg.test(json[k])){ json[k] = Number(json[k])
json[k]= Number(json[k]) }
} if (json[k] === null) {
if(json[k] === null){ json[k] = ''
json[k] = '' }
} if (typeof json[k] === "string") {
if(typeof json[k] === "string"){ params[k] = params[k].replace(/(^\s*)|(\s*$)/g, "");
params[k]=params[k].replace(/(^\s*)|(\s*$)/g, ""); json[k] = json[k].replace(/(^\s*)|(\s*$)/g, "");
json[k]=json[k].replace(/(^\s*)|(\s*$)/g, ""); }
json[k] = md5(json[k].toString())
} }
json[k] = md5(json[k].toString()) json.sing = "singsingenglish21000";
} params.param_token = md5(JSON.stringify(json));
json.sing = "singsingenglish21000"; let urlEncode = function(param, key, encode) {
params.param_token = md5(JSON.stringify(json)); if (param == null) return '';
let urlEncode = function (param, key, encode) { let paramStr = '';
if(param==null) return ''; let t = typeof(param);
let paramStr = ''; if (t == 'string' || t == 'number' || t == 'boolean') {
let t = typeof (param); paramStr += '&' + key + '=' + ((encode == null || encode) ? encodeURIComponent(param) : param);
if (t == 'string' || t == 'number' || t == 'boolean') { } else {
paramStr += '&' + key + '=' + ((encode==null||encode) ? encodeURIComponent(param) : param); for (let i in param) {
} else { let k = key == null ? i : key + (param instanceof Array ? '[' + i + ']' : '.' + i);
for (let i in param) { paramStr += urlEncode(param[i], k, encode);
let k = key == null ? i : key + (param instanceof Array ? '[' + i + ']' : '.' + i); }
paramStr += urlEncode(param[i], k, encode); }
} return paramStr;
} };
return paramStr; url += urlEncode(params)
}; window.open(url)
url += urlEncode(params)
window.open(url)
}; };
// 来源码列表 // 来源码列表
const getSourceListUrl = '/api/admin/code/rule'; const getSourceListUrl = '/api/admin/code/rule';
export const getSourceListApi = function (json) { export const getSourceListApi = function(json) {
return Vue.prototype.$fetch(getSourceListUrl,json) return Vue.prototype.$fetch(getSourceListUrl, json)
}; };
// 添加来源码 // 添加来源码
const addSourceUrl = '/api/admin/code/rule'; const addSourceUrl = '/api/admin/code/rule';
export const addSourceApi = function (json) { export const addSourceApi = function(json) {
return Vue.prototype.$post(addSourceUrl,json) return Vue.prototype.$post(addSourceUrl, json)
}; };
// 修改来源码 // 修改来源码
const updateSourceUrl = '/api/admin/code/rule'; const updateSourceUrl = '/api/admin/code/rule';
export const updateSourceApi = function (id,json) { export const updateSourceApi = function(id, json) {
return Vue.prototype.$put(`${updateSourceUrl}/${id}`,json) return Vue.prototype.$put(`${updateSourceUrl}/${id}`, json)
}; };
// 删除来源码 // 删除来源码
const delSourceUrl = `/api/admin/code/rule/`; const delSourceUrl = `/api/admin/code/rule/`;
export const delSourceApi = function (id) { export const delSourceApi = function(id) {
return Vue.prototype.$del(`${delSourceUrl}${id}`) return Vue.prototype.$del(`${delSourceUrl}${id}`)
}; };
// 修改商品购买数量 // 修改商品购买数量
const updateGoodsNumberUrl = '/api/admin/goods/buy/nums'; const updateGoodsNumberUrl = '/api/admin/goods/buy/nums';
export const updateGoodsNumbeApi = function (id,json) { export const updateGoodsNumbeApi = function(id, json) {
return Vue.prototype.$put(`${updateGoodsNumberUrl}/${id}`,json) return Vue.prototype.$put(`${updateGoodsNumberUrl}/${id}`, json)
}; };
// 获取班级用户备注列表 // 获取班级用户备注列表
const getUserDescListUrl = '/api/admin/class/user/desc/'; const getUserDescListUrl = '/api/admin/class/user/desc/';
export const getUserDescListApi = function (id,json) { export const getUserDescListApi = function(id, json) {
return Vue.prototype.$fetch(`${getUserDescListUrl}${id}`,json) return Vue.prototype.$fetch(`${getUserDescListUrl}${id}`, json)
}; };
// 更改用户看课权限,添加老师,意向等级 // 更改用户看课权限,添加老师,意向等级
const updateUserPrivilegeUrl = '/api/admin/class/user'; const updateUserPrivilegeUrl = '/api/admin/class/user';
export const updateUserPrivilegeApi = function (id,json) { export const updateUserPrivilegeApi = function(id, json) {
return Vue.prototype.$put(`${updateUserPrivilegeUrl}/${id}`,json) return Vue.prototype.$put(`${updateUserPrivilegeUrl}/${id}`, json)
}; };
// 修改订单推广人信息 // 修改订单推广人信息
const updateOrderTeacherUrl = '/api/admin/order/invite'; const updateOrderTeacherUrl = '/api/admin/order/invite';
export const updateOrderTeacherApi = function (id,teacherId) { export const updateOrderTeacherApi = function(id, teacherId) {
return Vue.prototype.$put(`${updateOrderTeacherUrl}/${id}/${teacherId}`) return Vue.prototype.$put(`${updateOrderTeacherUrl}/${id}/${teacherId}`)
}; };
// 用户提现 api/admin/bill/pay/to/user // 用户提现 api/admin/bill/pay/to/user
const payToUserUrl = '/api/admin/bill/pay/to/user'; const payToUserUrl = '/api/admin/bill/pay/to/user';
export const payToUserApi = function (json) { export const payToUserApi = function(json) {
return Vue.prototype.$post(payToUserUrl,json) return Vue.prototype.$post(payToUserUrl, json)
}; };
// 获取班主任业绩总排行 // 获取班主任业绩总排行
const getTeacherRankListUrl = '/api/admin/teacher/performance'; const getTeacherRankListUrl = '/api/admin/teacher/performance';
export const getTeacherRankListApi = function (json) { export const getTeacherRankListApi = function(json) {
return Vue.prototype.$fetch(`${getTeacherRankListUrl}`,json) return Vue.prototype.$fetch(`${getTeacherRankListUrl}`, json)
}; };
// 班主任业绩排行按天 // 班主任业绩排行按天
const getTeacherDayRankListUrl = '/api/admin/teacher/performance/day'; const getTeacherDayRankListUrl = '/api/admin/teacher/performance/day';
export const getTeacherDayRankListApi = function (json) { export const getTeacherDayRankListApi = function(json) {
return Vue.prototype.$fetch(`${getTeacherDayRankListUrl}`,json) return Vue.prototype.$fetch(`${getTeacherDayRankListUrl}`, json)
}; };
// 老师绑定用户 // 老师绑定用户
const teacherBindUserUrl = '/api/admin/teacher/bind'; const teacherBindUserUrl = '/api/admin/teacher/bind';
export const teacherBindUserApi = function (id,json) { export const teacherBindUserApi = function(id, json) {
return Vue.prototype.$put(`${teacherBindUserUrl}/${id}`, json) return Vue.prototype.$put(`${teacherBindUserUrl}/${id}`, json)
}; };
// 获取老师加用户数,用户老师数 // 获取老师加用户数,用户老师数
const getJoinNumUrl = '/api/admin/class/teacher/group/num/'; const getJoinNumUrl = '/api/admin/class/teacher/group/num/';
export const getJoinNumApi = function (id) { export const getJoinNumApi = function(id) {
return Vue.prototype.$fetch(`${getJoinNumUrl}${id}`) return Vue.prototype.$fetch(`${getJoinNumUrl}${id}`)
};
// 未购买列表
const getNotBuyUrl = '';
export const getNotBuyApi = function (id) {
return Vue.prototype.$fetch(`${getNotBuyUrl}${id}`)
}; };
//获取短网址 //获取短网址
const getLinkUrl = `/api/public/short/url`; const getLinkUrl = `/api/public/short/url`;
export const getLinkApi = function (json) { export const getLinkApi = function(json) {
return Vue.prototype.$fetch(`${getLinkUrl}`,json) return Vue.prototype.$fetch(`${getLinkUrl}`, json)
}; };
//获取二维码 //获取二维码
const getqrCodeUrl = `${_baseUrl}api/public/qrcode`; const getqrCodeUrl = `${_baseUrl}api/public/qrcode`;
export const getqrCodeApi = function (json) { export const getqrCodeApi = function(json) {
return Vue.prototype.$fetch(`${getqrCodeUrl}`,json) return Vue.prototype.$fetch(`${getqrCodeUrl}`, json)
}; };
//设置系统指定配置 //设置系统指定配置
const putConfigUrl = `/api/admin/tools/config`; const putConfigUrl = `/api/admin/tools/config`;
export const putConfigApi = function (json) { export const putConfigApi = function(json) {
return Vue.prototype.$put(`${putConfigUrl}`,json) return Vue.prototype.$put(`${putConfigUrl}`, json)
}; };
\ No newline at end of file //用户领取课程日志
const getClassConfigUrl = `/api/admin/user/receive/course/log`;
export const getClassConfigApi = function(json) {
return Vue.prototype.$fetch(`${getClassConfigUrl}`, json)
}
\ No newline at end of file
export default [ export default [{
{ name: '',
name: '', value: '教研管理',
value: '教研管理', icon: 'icon-material',
icon: 'icon-material', list: [{
list: [ value: '教材列表',
{ routerName: 'resources',
value:'教材列表', path: '/resources',
routerName:'resources', cover: '1-1',
path:'/resources', router: {
cover:'1-1', path: '/resources',
router:{ name: 'resources',
path: '/resources', component: e => require(['@/components/resources'], e),
name:'resources', }
component: e=>require(['@/components/resources'],e), }]
} }, {
} name: '',
] value: '商品课程',
},{ icon: 'icon-shangpin1',
name: '', list: [{
value: '商品课程', value: '课程列表',
icon: 'icon-shangpin1', routerName: 'lesson',
list: [ path: '/lesson',
{ cover: '2-1',
value:'课程列表', router: {
routerName:'lesson', path: '/lesson',
path:'/lesson', name: 'lesson',
cover:'2-1', component: e => require(['@/components/lesson'], e),
router:{ }
path: '/lesson', }, {
name:'lesson', value: '商品列表',
component: e=>require(['@/components/lesson'],e), routerName: 'shop',
} path: '/shop',
},{ cover: '4-1',
value:'商品列表', router: {
routerName:'shop', path: '/shop',
path:'/shop', name: 'shop',
cover:'4-1', component: e => require(['@/components/shop'], e),
router:{ },
path: '/shop', }, ]
name:'shop', }, {
component: e=>require(['@/components/shop'],e), name: '',
}, value: '期数管理',
}, icon: 'icon-kecheng',
] list: [{
},{ value: '期数列表',
name: '', routerName: 'periods',
value: '期数管理', path: '/periods',
icon: 'icon-kecheng', cover: '2-2',
list: [ router: {
{ path: '/periods',
value:'期数列表', name: 'periods',
routerName:'periods', component: e => require(['@/components/periods'], e),
path:'/periods', }
cover:'2-2', },
router:{ {
path: '/periods', value: '班级列表',
name:'periods', routerName: 'class',
component: e=>require(['@/components/periods'],e), path: '/class',
} cover: '2-3',
}, router: {
{ path: '/class',
value:'班级列表', name: 'class',
routerName:'class', component: e => require(['@/components/class'], e),
path:'/class', }
cover:'2-3', },
router:{ {
path: '/class', value: '不上课日期',
name:'class', routerName: 'noLesson',
component: e=>require(['@/components/class'],e), path: '/noLesson',
} cover: '2-4',
}, router: {
{ path: '/noLesson',
value:'不上课日期', name: 'noLesson',
routerName:'noLesson', component: e => require(['@/components/noLesson'], e),
path:'/noLesson', }
cover:'2-4', },
router:{ ]
path: '/noLesson', }, {
name:'noLesson', name: '',
component: e=>require(['@/components/noLesson'],e), value: '人员管理',
} icon: 'icon-laoshi',
}, list: [{
] value: '教师列表',
},{ routerName: 'teacher',
name: '', path: '/teacher',
value: '人员管理', cover: '3-1',
icon: 'icon-laoshi', router: {
list: [ path: '/teacher',
{ name: 'teacher',
value:'教师列表', component: e => require(['@/components/teacher'], e),
routerName:'teacher', }
path:'/teacher', },
cover:'3-1', {
router:{ value: '用户列表',
path: '/teacher', routerName: 'user',
name:'teacher', path: '/user',
component: e=>require(['@/components/teacher'],e), cover: '3-2',
} router: {
}, path: '/user',
{ name: 'user',
value:'用户列表', component: e => require(['@/components/user'], e),
routerName:'user', }
path:'/user', }
cover:'3-2', ]
router:{ }, {
path: '/user', name: '',
name:'user', value: '订单管理',
component: e=>require(['@/components/user'],e), icon: 'icon-dingdan',
} list: [{
} value: '订单列表',
] routerName: 'order',
},{ path: '/order',
name: '', cover: '5-1',
value: '订单管理', router: {
icon: 'icon-dingdan', path: '/order',
list: [ name: 'order',
{ component: e => require(['@/components/order'], e),
value:'订单列表', }
routerName:'order', }, {
path:'/order', value: '退款列表',
cover:'5-1', routerName: 'refund',
router:{ path: '/refund',
path: '/order', cover: '5-2',
name:'order', router: {
component: e=>require(['@/components/order'],e), path: '/refund',
} name: 'refund',
},{ component: e => require(['@/components/refund'], e),
value:'退款列表', }
routerName:'refund', }, {
path:'/refund', value: '提现列表',
cover:'5-2', routerName: 'putForward',
router:{ path: '/putForward',
path: '/refund', cover: '5-3',
name:'refund', router: {
component: e=>require(['@/components/refund'],e), path: '/putForward',
} name: 'putForward',
},{ component: e => require(['@/components/putForward'], e),
value:'提现列表', }
routerName:'putForward', },
path:'/putForward', {
cover:'5-3', value: '发货管理',
router:{ routerName: 'consignment',
path: '/putForward', path: '/consignment',
name:'putForward', cover: '5-4',
component: e=>require(['@/components/putForward'],e), router: {
} path: '/consignment',
}, name: 'consignment',
{ component: e => require(['@/components/consignment'], e),
value:'发货管理', }
routerName:'consignment', }, {
path:'/consignment', value: '订单统计',
cover:'5-4', routerName: 'orderCount',
router:{ path: '/orderCount',
path: '/consignment', cover: '5-5',
name:'consignment', router: {
component: e=>require(['@/components/consignment'],e), path: '/orderCount',
} name: 'orderCount',
},{ component: e => require(['@/components/orderCount'], e),
value:'订单统计', }
routerName:'orderCount', }, {
path:'/orderCount', value: '优惠券列表',
cover:'5-5', routerName: 'coupon',
router:{ path: '/coupon',
path: '/orderCount', cover: '5-6',
name:'orderCount', router: {
component: e=>require(['@/components/orderCount'],e), path: '/coupon',
} name: 'coupon',
},{ component: e => require(['@/components/coupon'], e),
value:'优惠券列表', }
routerName:'coupon', },
path:'/coupon', {
cover:'5-6', value: '未购买列表',
router:{ routerName: 'notBuyClass',
path: '/coupon', path: '/notBuyClass',
name:'coupon', cover: '5-7',
component: e=>require(['@/components/coupon'],e), router: {
} path: '/notBuyClass',
}, name: 'notBuyClass',
{ component: e => require(['@/components/notBuyClass'], e),
value:'未购买列表', }
routerName:'notBuyClass', },
path:'/notBuyClass', {
cover:'5-8', value: '业绩排行',
router:{ routerName: 'achievement',
path: '/notBuyClass', path: '/achievement',
name:'notBuyClass', cover: '5-7',
component: e=>require(['@/components/notBuyClass'],e), router: {
} path: '/achievement',
}, name: 'achievement',
{ component: e => require(['@/components/achievement'], e),
value:'业绩排行', }
routerName:'achievement', },
path:'/achievement', ]
cover:'5-7', }, {
router:{ name: '',
path: '/achievement', value: '实物管理',
name:'achievement', icon: 'icon-shu',
component: e=>require(['@/components/achievement'],e), list: [{
} value: '单品列表',
}, routerName: 'single',
] path: '/single',
},{ cover: '6-1',
name: '', router: {
value: '实物管理', path: '/single',
icon: 'icon-shu', name: 'single',
list: [ component: e => require(['@/components/single'], e),
{ }
value:'单品列表', },
routerName:'single', {
path:'/single', value: '盒子列表',
cover:'6-1', routerName: 'box',
router:{ path: '/box',
path: '/single', cover: '6-2',
name:'single', router: {
component: e=>require(['@/components/single'],e), path: '/box',
} name: 'box',
}, component: e => require(['@/components/box'], e),
{ }
value:'盒子列表', }
routerName:'box', ]
path:'/box', }, {
cover:'6-2', name: '',
router:{ value: '公众号',
path: '/box', icon: 'icon-ai-weixin',
name:'box', list: [{
component: e=>require(['@/components/box'],e), value: '自动回复',
} routerName: 'focusReply',
} path: '/focusReply',
] cover: '7-1',
},{ router: {
name: '', path: '/focusReply',
value: '公众号', name: 'focusReply',
icon: 'icon-ai-weixin', component: e => require(['@/components/weChat/focusReply'], e),
list: [ }
{ },
value:'自动回复', {
routerName:'focusReply', value: '关键词回复',
path:'/focusReply', routerName: 'autoReply',
cover:'7-1', path: '/autoReply',
router:{ cover: '7-2',
path: '/focusReply', router: {
name:'focusReply', path: '/autoReply',
component: e=>require(['@/components/weChat/focusReply'],e), name: 'autoReply',
} component: e => require(['@/components/weChat/autoReply'], e),
}, }
{ },
value:'关键词回复', {
routerName:'autoReply', value: '公众号菜单',
path:'/autoReply', routerName: 'weChat',
cover:'7-2', path: '/weChat',
router:{ cover: '7-3',
path: '/autoReply', router: {
name:'autoReply', path: '/weChat',
component: e=>require(['@/components/weChat/autoReply'],e), name: 'weChat',
} component: e => require(['@/components/weChat'], e),
}, }
{ },
value:'公众号菜单', {
routerName:'weChat', value: '素材管理',
path:'/weChat', routerName: 'weChatResource',
cover:'7-3', path: '/weChatResource',
router:{ cover: '7-4',
path: '/weChat', router: {
name:'weChat', path: '/weChatResource',
component: e=>require(['@/components/weChat'],e), name: 'weChatResource',
} component: e => require(['@/components/weChat/weChatResource'], e),
}, }
{ },
value:'素材管理', {
routerName:'weChatResource', value: '二维码管理',
path:'/weChatResource', routerName: 'qrcode',
cover:'7-4', path: '/qrcode',
router:{ cover: '7-6',
path: '/weChatResource', router: {
name:'weChatResource', path: '/qrcode',
component: e=>require(['@/components/weChat/weChatResource'],e), name: 'qrcode',
} component: e => require(['@/components/qrcode'], e),
}, }
{ },
value:'二维码管理', {
routerName:'qrcode', value: '群发助手',
path:'/qrcode', routerName: 'groupSend',
cover:'7-6', path: '/groupSend',
router:{ cover: '7-7',
path: '/qrcode', router: {
name:'qrcode', path: '/groupSend',
component: e=>require(['@/components/qrcode'],e), name: 'groupSend',
} component: e => require(['@/components/groupSend'], e),
}, }
{ },
value:'群发助手', {
routerName:'groupSend', value: '关注取关统计',
path:'/groupSend', routerName: 'watchCount',
cover:'7-7', path: '/watchCount',
router:{ cover: '7-8',
path: '/groupSend', router: {
name:'groupSend', path: '/watchCount',
component: e=>require(['@/components/groupSend'],e), name: 'watchCount',
} component: e => require(['@/components/watchCount'], e),
}, }
{ },
value:'关注取关统计', {
routerName:'watchCount', value: '微信统计',
path:'/watchCount', routerName: 'weChatStatistics',
cover:'7-8', path: '/weChatStatistics',
router:{ cover: '7-10',
path: '/watchCount', router: {
name:'watchCount', path: '/weChatStatistics',
component: e=>require(['@/components/watchCount'],e), name: 'weChatStatistics',
} component: e => require(['@/components/weChatStatistics'], e),
}, }
{ },
value:'微信统计', ]
routerName:'weChatStatistics', }, {
path:'/weChatStatistics', name: '',
cover:'7-10', value: '系统管理',
router:{ icon: 'icon-xitongquanxian',
path: '/weChatStatistics', list: [{
name:'weChatStatistics', value: 'Banner管理',
component: e=>require(['@/components/weChatStatistics'],e), routerName: 'banner',
} path: '/banner',
}, cover: '7-5',
] router: {
},{ path: '/banner',
name: '', name: 'banner',
value: '系统管理', component: e => require(['@/components/system/banner'], e),
icon: 'icon-xitongquanxian', },
list: [ }, {
{ value: '外部投放管理',
value:'Banner管理', routerName: 'externalLaunch',
routerName:'banner', path: '/externalLaunch',
path:'/banner', cover: '7-9',
cover:'7-5', router: {
router:{ path: '/externalLaunch',
path: '/banner', name: 'externalLaunch',
name:'banner', component: e => require(['@/components/externalLaunch'], e),
component: e=>require(['@/components/system/banner'],e), }
}, },
},{ {
value:'外部投放管理', value: '来源码管理',
routerName:'externalLaunch', routerName: 'sourceManage',
path:'/externalLaunch', path: '/sourceManage',
cover:'7-9', cover: '10-1',
router:{ router: {
path: '/externalLaunch', path: '/sourceManage',
name:'externalLaunch', name: 'sourceManage',
component: e=>require(['@/components/externalLaunch'],e), component: e => require(['@/components/sourceManage'], e),
} }
}, },
{ ]
value:'来源码管理', },
routerName:'sourceManage', {
path:'/sourceManage', name: '',
cover:'10-1', value: '后台管理',
router:{ icon: 'icon-shezhi',
path: '/sourceManage', list: [{
name:'sourceManage', value: '账号管理',
component: e=>require(['@/components/sourceManage'],e), routerName: 'admin',
} path: '/admin',
}, cover: '8-1',
] router: {
}, path: '/admin',
{ name: 'admin',
name: '', component: e => require(['@/components/system/admin'], e),
value: '后台管理', }
icon: 'icon-shezhi', }, {
list: [ value: '角色管理',
{ routerName: 'role',
value:'账号管理', path: '/role',
routerName:'admin', cover: '8-2',
path:'/admin', router: {
cover:'8-1', path: '/role',
router:{ name: 'role',
path: '/admin', component: e => require(['@/components/system/role'], e),
name:'admin', }
component: e=>require(['@/components/system/admin'],e), }, {
} value: '菜单管理',
},{ routerName: 'menu',
value:'角色管理', path: '/menu',
routerName:'role', cover: '8-3',
path:'/role', router: {
cover:'8-2', path: '/menu',
router:{ name: 'menu',
path: '/role', component: e => require(['@/components/system/menu'], e),
name:'role', }
component: e=>require(['@/components/system/role'],e), }, {
} value: '系统配置',
},{ routerName: 'sysConfig',
value:'菜单管理', path: '/sysConfig',
routerName:'menu', cover: '8-4',
path:'/menu', router: {
cover:'8-3', path: '/sysConfig',
router:{ name: 'sysConfig',
path: '/menu', component: e => require(['@/components/system/sysConfig'], e),
name:'menu', }
component: e=>require(['@/components/system/menu'],e),
}
},{
value:'系统配置',
routerName:'sysConfig',
path:'/sysConfig',
cover:'8-4',
router:{
path: '/sysConfig',
name:'sysConfig',
component: e=>require(['@/components/system/sysConfig'],e),
}
}, },
{ {
value:'操作日志', value: '操作日志',
routerName:'adminLog', routerName: 'adminLog',
path:'/adminLog', path: '/adminLog',
cover:'8-5', cover: '8-5',
router:{ router: {
path: '/adminLog', path: '/adminLog',
name:'adminLog', name: 'adminLog',
component: e=>require(['@/components/system/adminLog'],e), component: e => require(['@/components/system/adminLog'], e),
} }
} }
] ]
} }
] ]
// { // {
// name: '', // name: '',
...@@ -433,4 +421,4 @@ export default [ ...@@ -433,4 +421,4 @@ export default [
// path:'/help' // path:'/help'
// } // }
// ] // ]
// } // }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment