Commit dd6db7f3 authored by liwei's avatar liwei

liwei

parent 06e3b7e5
<template>
<div id="app">
<router-view/>
<router-view />
</div>
</template>
<script>
import menu from './util/menuList'
import menu from "./util/menuList";
export default {
name: 'App',
data(){
return {
}
name: "App",
data() {
return {};
},
mounted(){
mounted() {
// 权限验证 动态路由
if(window.location.href.indexOf('login') < 0){
if (window.location.href.indexOf("login") < 0) {
let permission = this.$store.state.progressList;
console.log(this.$store.state)
console.log(this.$store.state);
let menuList = [];
this.$router.options.routes[0].children = [];
let routerUserDetail = {
path: '/userDetail/:id',
name:'userDetail',
component: e=>require(['@/components/userDetail'],e),
};
let routerTeacherDetail ={
path: '/teacher/:id',
name:'teacherDetail',
component: e=>require(['@/components/teacherDetail'],e),
};
menu.forEach(i=>{
path: "/userDetail/:id",
name: "userDetail",
component: e => require(["@/components/userDetail"], e)
};
let routerTeacherDetail = {
path: "/teacher/:id",
name: "teacherDetail",
component: e => require(["@/components/teacherDetail"], e)
};
menu.forEach(i => {
let p = false;
let t = [];
i.list.forEach(j=>{
let find = permission.find(x=>{return x.cover === j.cover});
if(find){
i.list.forEach(j => {
let find = permission.find(x => {
return x.cover === j.cover;
});
if (find) {
j.router.meta = {};
j.router.meta.readonly = !!find.readonly;
j.router.meta.delete = !!find.delete;
......@@ -47,13 +47,13 @@ export default {
j.router.meta.classTakeUnlimited = !!find.classTakeUnlimited;
j.router.meta.promoter = !!find.promoter;
t.push(j);
if(find.cover === '3-1'){
if (find.cover === "3-1") {
routerTeacherDetail.meta = {};
routerTeacherDetail.meta.readonly = find.readonly;
routerTeacherDetail.meta.delete = !!find.delete;
this.$router.options.routes[0].children.push(routerTeacherDetail);
}
if(find.cover === '3-2'){
if (find.cover === "3-2") {
routerUserDetail.meta = {};
routerUserDetail.meta.readonly = find.readonly;
routerUserDetail.meta.delete = !!find.delete;
......@@ -63,28 +63,32 @@ export default {
p = true;
}
});
if(p){
if (p) {
i.list = t;
menuList.push(i)
menuList.push(i);
}
});
this.$router.addRoutes([this.$router.options.routes[0]]);//调用add;
this.$store.dispatch('setMenu',menuList)
this.$router.addRoutes([this.$router.options.routes[0]]); //调用add;
this.$store.dispatch("setMenu", menuList);
}
}
}
};
</script>
<style>
#app {
height: 100%;
}
html,body{
height: 100%;
margin: 0;
padding: 0;
}
.el-collapse-item__arrow{margin-left: 0;}
.fl{float: left;}
html,
body {
height: 100%;
margin: 0;
padding: 0;
}
.el-collapse-item__arrow {
margin-left: 0;
}
.fl {
float: left;
}
</style>
<template>
<div class="channel-trans-list">
<div
class="no-data"
v-if="list.length == 0"
style="background:#fff;textAlign: center;color: #909399;padding: 10px 0;"
>暂无数据</div>
<el-form ref="searchFrom" :model="searchFrom" label-width="100px" inline v-if="list.length > 0">
<el-form-item label="进量日期">
<el-date-picker
v-model="searchFrom.payTime"
type="datetimerange"
range-separator="至"
value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="{shortcuts:[today,yesterday,last7Day,last30Day]}"
:default-time="['00:00:00','23:59:59']"
@change="getChannelTransList"
></el-date-picker>
</el-form-item>
<el-form-item label="商品课时数">
<!-- <el-input v-model="searchFrom.watch_num" style="width: 80px"></el-input> -->
<el-select
v-model="searchFrom.watch_num"
filterable
placeholder="请选择"
style="width: 150px"
@change="selectChange"
>
<el-option value label="请选择"></el-option>
<el-option
v-for="(data,index) in watchList"
:key="index"
:label="data.title"
:value="data.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="渠道类型">
<el-input v-model="searchFrom.invite_type" style="width: 110px"></el-input>
</el-form-item>
<el-form-item label="期数名称">
<el-cascader
:options="goodsList"
:props="{value:'id',label:'name'}"
@active-item-change="handleItemChange"
@change="changePeriods"
v-model="selectedGoods"
></el-cascader>
</el-form-item>
<el-form-item label="组ID">
<el-input v-model="searchFrom.squad" style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="老师">
<el-select
v-model="searchFrom.teacher_id"
filterable
placeholder="请选择"
@change="changeTeacher"
clearable
style="width: 100px"
>
<el-option label="暂不分配" value="0"></el-option>
<el-option
v-for="(data,index) in teacherList"
:key="index"
:label="data.name"
:value="data.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<div class="flexRow">
<el-button type="primary" plain @click="getChannelTransList">搜索</el-button>
</div>
</el-form-item>
</el-form>
<el-table
v-if="list.length > 0"
:data="list"
:style="{width: width+'px'}"
:default-sort="{prop: 'cur_date', order: 'descending'}"
>
<el-table-column prop="cur_date" label="支付日期" sortable></el-table-column>
<el-table-column prop="invite_type" label="渠道类型" sortable></el-table-column>
<el-table-column prop="teacher_name" label="老师名称"></el-table-column>
<el-table-column prop="periods_id" label="期数ID"></el-table-column>
<el-table-column prop="squad" label="组ID"></el-table-column>
<el-table-column prop="watch_num" label="商品课时数"></el-table-column>
<el-table-column prop="class_num" label="班级人数"></el-table-column>
<el-table-column prop="come_num" label="到课人数"></el-table-column>
<el-table-column prop="one_buy_num" label="年课购买人数"></el-table-column>
<el-table-column prop="one_buy_money" label="一年课转化金额"></el-table-column>
<el-table-column prop="two_buy_money" label="两年课转化金额"></el-table-column>
</el-table>
<page
v-if="list.length > 0"
:nowPage="nowPage"
:total="total"
:limit="limit"
@pageChange="onPageChange"
@sizeChange="onSizeChange"
/>
</div>
</template>
<script>
import {
getTeacherListApi,
getchannelTransListApi,
getPeriodsApi,
getGoodsListApi
} from "../../service/api";
import page from "../framework/page";
import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook";
export default {
name: "channelTransList",
data() {
return {
width: 0,
nowPage: 1,
total: 0,
limit: 10,
list: [],
goods_id: null,
teacherList: [],
goodsList: [],
total: 0,
today: {
text: "今天",
onClick: () => {
this.searchFrom.payTime = [
this.formatTime(new Date()) + " 00:00:00",
this.formatTime(new Date()) + " 23:59:59"
];
}
},
yesterday: {
text: "昨天",
onClick: () => {
let preDate = this.formatTime(
new Date(new Date().getTime() - 24 * 60 * 60 * 1000)
);
this.searchFrom.payTime = [
preDate + " 00:00:00",
preDate + " 23:59:59"
];
}
},
last30Day: {
text: "过去30天",
onClick: () => {
let preDate = this.formatTime(
new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000)
);
this.searchFrom.payTime = [
preDate + " 00:00:00",
this.formatTime(new Date()) + " 23:59:59"
];
}
},
last7Day: {
text: "过去7天",
onClick: () => {
let preDate = this.formatTime(
new Date(new Date().getTime() - 7 * 24 * 60 * 60 * 1000)
);
this.searchFrom.payTime = [
preDate + " 00:00:00",
this.formatTime(new Date()) + " 23:59:59"
];
}
},
searchFrom: {
payTime: [],
start_at: "",
end_at: "",
invite_type: "",
invite_name: "",
watch_num: "",
periods_id: "",
squad: "",
teacher_id: ""
},
watchList: [
{ id: 0, title: 5 },
{ id: 1, title: 6 },
{ id: 2, title: 10 },
{ id: 3, title: 20 }
]
};
},
components: { page },
methods: {
handleItemChange(val) {
getPeriodsApi({ goods_id: val[0], limit: 100 }).then(res => {
res.list.forEach(i => {
i.name = i.title;
});
this.goodsList.find(i => {
return i.id === val[0];
}).children = res.list;
});
},
changePeriods(data) {
if (data.length > 1) {
this.goods_id = data[0];
let nowGoods = this.goodsList.find(i => {
return i.id === data[0];
});
this.periods = nowGoods.children.find(i => {
return i.id === data[1];
});
this.searchFrom.periods_id = this.periods.id;
this.getChannelTransList();
}
},
changeTeacher(value) {
this.searchFrom.teacher_id = value;
this.getChannelTransList();
},
selectChange(value) {
this.searchFrom.watch_num = this.watchList[value].title;
this.getChannelTransList();
},
formatTime(date) {
let year = date.getFullYear();
let Month = date.getMonth() + 1;
if (Month < 10) {
Month = `0${Month}`;
}
let Day = date.getDate();
if (Day < 10) Day = `0${Day}`;
return `${year}-${Month}-${Day}`;
},
onPageChange(val) {
this.nowPage = val;
this.getChannelTransList();
},
onSizeChange(val) {
this.nowPage = 1;
this.limit = val;
this.getChannelTransList();
},
getTeacherList() {
let json = {
page: 1,
limit: 200
};
getTeacherListApi(json).then(res => {
this.teacherList = res.list;
});
},
getGoodsList() {
let json = {
page: 1,
limit: 100,
goods_type: "1,2"
};
getGoodsListApi(json).then(res => {
res.list.forEach(i => {
i.name =
"[" +
i.id +
"]" +
"[" +
GOODSTYPE[i.goods_type] +
"]" +
"[" +
i.current_price / 100 +
"元]" +
i.name;
i.children = [];
});
this.goodsList = res.list;
});
},
getChannelTransList() {
let json = {
limit: this.limit,
page: this.nowPage
};
// 搜索筛选
if (this.searchFrom.invite_type) {
json.invite_type = this.searchFrom.invite_type;
}
if (this.searchFrom.squad) {
json.squad = this.searchFrom.squad;
}
if (this.searchFrom.watch_num) {
json.watch_num = this.searchFrom.watch_num;
}
if (this.searchFrom.periods_id) {
json.periods_id = this.searchFrom.periods_id;
}
if (this.searchFrom.teacher_id) {
json.teacher_id = this.searchFrom.teacher_id;
}
if (this.searchFrom.payTime.length > 0) {
if (
this.searchFrom.payTime[0] &&
this.searchFrom.payTime[0].length > 0
) {
this.searchFrom.start_at = this.searchFrom.payTime[0];
json.start_at = this.searchFrom.start_at;
}
if (
this.searchFrom.payTime[1] &&
this.searchFrom.payTime[1].length > 0
) {
this.searchFrom.end_at = this.searchFrom.payTime[1];
json.end_at = this.searchFrom.end_at;
}
}
getchannelTransListApi(json).then(res => {
if (res) {
this.total = res.total;
if (res.list && res.list.length > 0) {
this.list = res.list.map(item => {
item.squad = "T" + item.squad;
let name =
item.invite_name && item.invite_name.length > 0
? `(${item.invite_name})`
: "";
item.invite_type = `${item.invite_type}${name}`;
return item;
});
this.width = document.documentElement.clientWidth - 200;
} else {
this.list = [];
}
} else {
this.list = [];
}
});
}
},
mounted() {
this.getChannelTransList();
this.getTeacherList();
// this.getPeriodsList();
this.getGoodsList();
}
};
</script>
<style lang="less" scoped>
.channel-trans-list {
padding: 20px 0;
}
</style>
......@@ -9,23 +9,26 @@
@active-item-change="handleItemChange"
@change="changePeriods"
v-model="selectedGoods"
>
</el-cascader>
></el-cascader>
</el-form-item>
<el-form-item label="老师">
<el-select filterable v-model="teacher_id" placeholder="请选择" @change="getClassList" clearable>
<el-select
filterable
v-model="teacher_id"
placeholder="请选择"
@change="getClassList"
clearable
>
<el-option
v-for="(data,index) in teacherList"
:key="index"
:label="data.teacher_name"
:value="data.teacher_id">
</el-option>
:value="data.teacher_id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="">
<el-button type="primary" @click="getClassList">
搜索
</el-button>
<el-form-item label>
<el-button type="primary" @click="getClassList">搜索</el-button>
</el-form-item>
<el-form-item style="float: right">
<el-button @click="onAdd" type="success" v-if="!$store.state.readonly">+添加班级</el-button>
......@@ -33,42 +36,20 @@
</el-form>
</div>
<div v-if="title && title.title " class="intro">
<el-table border
size="mini"
style="display: block;margin: 20px auto;background: transparent"
:data="[title]">
<el-table-column
label="期数名称"
prop="title">
</el-table-column>
<el-table-column
label="可看课包数"
prop="watch_num">
</el-table-column>
<el-table-column
label="已看课包数"
prop="has_watch_num">
</el-table-column>
<el-table-column
label="开始时间"
prop="start_at">
</el-table-column>
<el-table-column
label="老师数量"
prop="count_teacher_num">
</el-table-column>
<el-table-column
label="预计学员总数"
prop="count_max_join_num">
</el-table-column>
<el-table-column
label="学员总数"
prop="count_join_num">
</el-table-column>
<el-table-column
label="结束时间"
prop="over_at">
</el-table-column>
<el-table
border
size="mini"
style="display: block;margin: 20px auto;background: transparent"
:data="[title]"
>
<el-table-column label="期数名称" prop="title"></el-table-column>
<el-table-column label="可看课包数" prop="watch_num"></el-table-column>
<el-table-column label="已看课包数" prop="has_watch_num"></el-table-column>
<el-table-column label="开始时间" prop="start_at"></el-table-column>
<el-table-column label="老师数量" prop="count_teacher_num"></el-table-column>
<el-table-column label="预计学员总数" prop="count_max_join_num"></el-table-column>
<el-table-column label="学员总数" prop="count_join_num"></el-table-column>
<el-table-column label="结束时间" prop="over_at"></el-table-column>
</el-table>
</div>
<div v-if="!title || !title.title">
......@@ -77,410 +58,445 @@
</el-form>
</div>
<div>
<el-table
@expand-change="changeRow"
:data="classList"
style="width: 100%">
<el-table @expand-change="changeRow" :data="classList" style="width: 100%">
<el-table-column type="expand">
<template slot-scope="scope">
<el-table
:data="[scope.row]"
style="width: 100%">
<el-table-column
label="到课率">
<el-table :data="[scope.row]" style="width: 100%">
<el-table-column label="到课率">
<template slot-scope="scope2">
<span>{{ scope2.row.arrive_course_rate | percent}}</span>
<span>{{ scope2.row.arrive_course_rate | percent}}</span>
</template>
</el-table-column>
<el-table-column
label="看课率">
<el-table-column label="看课率">
<template slot-scope="scope2">
<span>{{ scope2.row.watch_course_rate | percent}}</span>
<span>{{ scope2.row.watch_course_rate | percent}}</span>
</template>
</el-table-column>
<el-table-column
label="完课率">
<el-table-column label="完课率">
<template slot-scope="scope2">
<span>{{ scope2.row.over_course_rate | percent}}</span>
<span>{{ scope2.row.over_course_rate | percent}}</span>
</template>
</el-table-column>
<el-table-column
label="打卡率">
<el-table-column label="打卡率">
<template slot-scope="scope2">
<span>{{ scope2.row.clock_rate | percent}}</span>
<span>{{ scope2.row.clock_rate | percent}}</span>
</template>
</el-table-column>
<el-table-column
label="全勤打卡率">
<el-table-column label="全勤打卡率">
<template slot-scope="scope2">
<span>{{ scope2.row.over_clock_rate | percent}}</span>
<span>{{ scope2.row.over_clock_rate | percent}}</span>
</template>
</el-table-column>
<el-table-column
label="转化率">
<el-table-column label="转化率">
<template slot-scope="scope2">
<span>{{ scope2.row.transform_rate | percent}}</span>
<span>{{ scope2.row.transform_rate | percent}}</span>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column
label="班级名称">
<template slot-scope="scope">
{{scope.row.class_name}}
</template>
</el-table-column>
<el-table-column
prop="qr"
label="班级二维码">
<template slot-scope="scope">
<a :href="scope.row.qr" v-if="scope.row.qr" target="_blank">
<img class="avatar" :src="scope.row.qr" alt="二维码">
</a>
<p v-if="!scope.row.qr">--</p>
</template>
</el-table-column>
<el-table-column
prop="teacher_name"
label="班主任">
<el-table-column label="班级名称">
<template slot-scope="scope">{{scope.row.class_name}}</template>
</el-table-column>
<el-table-column
label="老师状态">
<el-table-column prop="qr" label="班级二维码">
<template slot-scope="scope">
{{scope.row.teacher_status === 0 ? '带班' : '不带班'}}
<a :href="scope.row.qr" v-if="scope.row.qr" target="_blank">
<img class="avatar" :src="scope.row.qr" alt="二维码" />
</a>
<p v-if="!scope.row.qr">--</p>
</template>
</el-table-column>
<el-table-column
label="班级类型">
<template slot-scope="scope">
{{scope.row.type | classTypeFilter}}
</template>
</el-table-column>
<el-table-column
prop="max_join_num"
label="最大人数">
<el-table-column prop="teacher_name" label="班主任"></el-table-column>
<el-table-column label="老师状态">
<template slot-scope="scope">{{scope.row.teacher_status === 0 ? '带班' : '不带班'}}</template>
</el-table-column>
<el-table-column
prop="join_num"
label="现有人数">
<el-table-column label="班级类型">
<template slot-scope="scope">{{scope.row.type | classTypeFilter}}</template>
</el-table-column>
<el-table-column
prop="source"
label="招生来源">
<template slot-scope="scope">
{{scope.row.source | classSourceFilter}}
</template>
<el-table-column prop="max_join_num" label="最大人数"></el-table-column>
<el-table-column prop="join_num" label="现有人数"></el-table-column>
<el-table-column prop="source" label="招生来源">
<template slot-scope="scope">{{scope.row.source | classSourceFilter}}</template>
</el-table-column>
<el-table-column
width="250"
label="操作">
<el-table-column width="250" label="操作">
<template slot-scope="scope">
<el-button @click="showUser(scope.row)" size="mini" type="primary">班级成员</el-button>
<el-button @click="editClass(scope.row)" size="mini" v-if="!$store.state.readonly" type="warning">编辑</el-button>
<el-button @click="delClass(scope.row)" size="mini" v-if="$store.state.deletePermission && !$store.state.readonly" type="danger">删除</el-button>
<el-button
@click="editClass(scope.row)"
size="mini"
v-if="!$store.state.readonly"
type="warning"
>编辑</el-button>
<el-button
@click="delClass(scope.row)"
size="mini"
v-if="$store.state.deletePermission && !$store.state.readonly"
type="danger"
>删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<page :nowPage="nowPage" :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<page
:nowPage="nowPage"
:total="total"
:limit="limit"
@pageChange="onPageChange"
@sizeChange="onSizeChange"
/>
<class-dialog :dialogObj="dialogObj" @reflash="onReflash"></class-dialog>
<user-list :userObj="userObj" @reflash="getClassList"/>
<user-list :userObj="userObj" @reflash="getClassList" />
</div>
</template>
<script>
import {getGoodsListApi,getPeriodsApi,getClassListApi,getPeriodsTeacherApi,delClassApi,getClassStatisticsApi,getDefaultPeriodsApi,postActiveNoticeApi} from "../../service/api";
import classDialog from './dialog'
import {GOODSTYPE,CLASSSOURCE} from '../../util/wordbook';
import UserList from './userList'
import page from '../framework/page'
export default {
data(){
return {
noticeDialog:false,
nowPage: 1,
total: 0,
limit: 10,
periodsId:null,
goods_id:null,
goodsList:[],
teacher_id:'',
classList:[],
title:'',
countObj: '',
teacherList:[],
userObj:{
classId:'',
title:'',
show:false,
goods_id:null
},
dialogObj:{
show:false,
title:'添加班级',
periodsId:'',
type:0,
id:0
},
selectedGoods: [],
secGoods:[],
import {
getGoodsListApi,
getPeriodsApi,
getClassListApi,
getPeriodsTeacherApi,
delClassApi,
getClassStatisticsApi,
getDefaultPeriodsApi,
postActiveNoticeApi
} from "../../service/api";
import classDialog from "./dialog";
import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook";
import UserList from "./userList";
import page from "../framework/page";
export default {
data() {
return {
noticeDialog: false,
nowPage: 1,
total: 0,
limit: 10,
periodsId: null,
goods_id: null,
goodsList: [],
teacher_id: "",
classList: [],
title: "",
countObj: "",
teacherList: [],
userObj: {
classId: "",
title: "",
show: false,
goods_id: null
},
dialogObj: {
show: false,
title: "添加班级",
periodsId: "",
type: 0,
id: 0
},
selectedGoods: [],
secGoods: []
};
},
components: {
UserList,
classDialog,
page
},
filters: {
classTypeFilter(val) {
let _val = parseInt(val);
if (_val === 1) {
return "带班班级";
} else if (_val === 2) {
return "观摩班级";
} else {
return "";
}
},
components:{
UserList,
classDialog,
page
classSourceFilter(val) {
return CLASSSOURCE[val];
},
filters: {
classTypeFilter(val){
let _val = parseInt(val);
if (_val === 1) {
return '带班班级'
} else if (_val === 2) {
return '观摩班级'
} else {
return ''
}
},
classSourceFilter(val){
return CLASSSOURCE[val]
},
percent(val){
return (val * 100).toFixed(2)+'%'
percent(val) {
return (val * 100).toFixed(2) + "%";
}
},
mounted() {
this.initPage();
},
methods: {
changeRow(data, b) {
if (b.indexOf(data) > -1) {
getClassStatisticsApi(data.periods_id, data.id).then(res => {
data.arrive_course_rate = res.arrive_course_rate;
data.watch_course_rate = res.watch_course_rate;
data.over_course_rate = res.over_course_rate;
data.work_rate = res.work_rate;
data.over_work_rate = res.over_work_rate;
data.clock_rate = res.clock_rate;
data.over_clock_rate = res.over_clock_rate;
data.transform_rate = res.transform_rate;
});
}
},
initQuery() {
let _query = this.$route.query;
if (_query && _query.goods_id && _query.periods_id) {
this.goods_id = _query.goods_id;
this.selectedGoods = [
parseInt(_query.goods_id),
parseInt(_query.periods_id)
];
getPeriodsApi({ goods_id: this.selectedGoods[0], limit: 100 }).then(
res => {
res.list.forEach(i => {
i.name = i.title;
});
this.goodsList.find(i => {
return i.id === this.selectedGoods[0];
}).children = res.list;
let nowGoods = this.goodsList.find(i => {
return i.id === this.selectedGoods[0];
});
this.periods = nowGoods.children.find(i => {
return i.id === this.selectedGoods[1];
});
console.log(this.periods);
this.teacher_id = "";
this.getClassList();
}
);
} else {
getDefaultPeriodsApi().then(res => {
console.log(res);
//
if (res) {
this.goods_id = res.goods_id;
this.selectedGoods = [parseInt(res.goods_id), parseInt(res.id)];
getPeriodsApi({ goods_id: this.selectedGoods[0], limit: 100 }).then(
res => {
res.list.forEach(i => {
i.name = i.title;
});
this.goodsList.find(i => {
return i.id === this.selectedGoods[0];
}).children = res.list;
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.teacher_id = "";
console.log(this.periods);
this.getClassList();
}
);
}
});
}
console.log(this.goodsList);
},
mounted(){
this.initPage();
initPage() {
let json = {
page: 1,
limit: 100,
goods_type: "1,2"
};
getGoodsListApi(json).then(res => {
console.log(res);
res.list.forEach(i => {
i.name =
"[" +
i.id +
"]" +
"[" +
GOODSTYPE[i.goods_type] +
"]" +
"[" +
i.current_price / 100 +
"元]" +
i.name;
i.children = [];
});
this.goodsList = res.list;
this.initQuery();
});
},
methods:{
changeRow(data,b){
if(b.indexOf(data)>-1){
getClassStatisticsApi(data.periods_id,data.id).then(res=>{
data.arrive_course_rate = res.arrive_course_rate;
data.watch_course_rate = res.watch_course_rate;
data.over_course_rate = res.over_course_rate;
data.work_rate = res.work_rate;
data.over_work_rate = res.over_work_rate;
data.clock_rate = res.clock_rate;
data.over_clock_rate = res.over_clock_rate;
data.transform_rate = res.transform_rate;
})
}
},
initQuery(){
let _query = this.$route.query;
if (_query && _query.goods_id && _query.periods_id) {
this.goods_id = _query.goods_id;
this.selectedGoods = [parseInt(_query.goods_id),parseInt(_query.periods_id)];
getPeriodsApi({goods_id:this.selectedGoods[0],limit:100}).then(res=>{
res.list.forEach(i=>{i.name = i.title});
this.goodsList.find(i=>{return i.id === this.selectedGoods[0]}).children = res.list
let nowGoods = this.goodsList.find(i=>{return i.id === this.selectedGoods[0]});
this.periods = nowGoods.children.find(i=>{return i.id === this.selectedGoods[1]});
console.log(this.periods)
this.teacher_id = '';
this.getClassList()
})
} else {
getDefaultPeriodsApi().then(res=>{
console.log(res)
//
if(res){
this.goods_id = res.goods_id;
this.selectedGoods = [parseInt(res.goods_id),parseInt(res.id)];
getPeriodsApi({goods_id:this.selectedGoods[0],limit:100}).then(res=>{
res.list.forEach(i=>{i.name = i.title});
this.goodsList.find(i=>{return i.id === this.selectedGoods[0]}).children = res.list
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.teacher_id = '';
console.log(this.periods)
this.getClassList()
});
}
})
}
console.log(this.goodsList)
},
initPage(){
let json = {
page: 1,
limit: 100,
goods_type:'1,2'
};
getGoodsListApi(json).then(res=>{
console.log(res)
res.list.forEach(i=>{
i.name = '['+i.id+']'+'[' + GOODSTYPE[i.goods_type] + ']' + '[' +i.current_price / 100 + '元]' + i.name
i.children = [];
});
this.goodsList = res.list;
this.initQuery();
showUser(data) {
let classType = data.type == 1 ? "(带班班级)" : "(观摩班级)";
console.log(data);
// debugger
this.userObj = {
classId: data.id,
periods_id: data.periods_id,
show: true,
goods_id: this.goods_id,
title: `${data.teacher_name}班级用户列表${classType}`,
teacherId: data.teacher_id,
class_name: data.class_name,
type: data.type,
watch_num: this.title.watch_num
};
console.log(this.userObj);
},
getTeacher() {
if (!this.periods) return;
getPeriodsTeacherApi(this.periods.id).then(res => {
let obj = {}; //班级老师去重
res = res.reduce(function(item, next) {
obj[next.teacher_id]
? ""
: (obj[next.teacher_id] = true && item.push(next));
return item;
}, []);
this.teacherList = res;
});
},
changePeriods(data) {
if (data.length > 1) {
this.goods_id = data[0];
let nowGoods = this.goodsList.find(i => {
return i.id === data[0];
});
},
showUser(data){
let classType = data.type==1?'(带班班级)':'(观摩班级)'
console.log(data)
this.periods = nowGoods.children.find(i => {
return i.id === data[1];
});
console.log(this.goodsList);
console.log(this.periods);
// debugger
this.userObj={
classId:data.id,
periods_id:data.periods_id,
show:true,
goods_id:this.goods_id,
title:`${data.teacher_name}班级用户列表${classType}`,
teacherId: data.teacher_id,
class_name:data.class_name,
type:data.type,
watch_num:this.title.watch_num
}
console.log(this.userObj)
},
getTeacher(){
if (!this.periods) return;
getPeriodsTeacherApi(this.periods.id).then(res=>{
let obj = {}; //班级老师去重
res = res.reduce(function(item, next) {
obj[next.teacher_id] ? '' : obj[next.teacher_id] = true && item.push(next);
return item;
}, []);
this.teacherList = res
})
},
changePeriods(data){
if(data.length>1){
this.goods_id = data[0];
let nowGoods = this.goodsList.find(i=>{return i.id === data[0]});
this.periods = nowGoods.children.find(i=>{return i.id === data[1]});
console.log(this.goodsList)
console.log(this.periods)
// debugger
this.teacher_id = '';
this.getTeacher();
this.getClassList();
}
},
onPageChange(val){
this.nowPage = val;
this.getClassList();
},
onSizeChange(val){
this.limit = val;
this.nowPage = 1;
this.getClassList();
},
onReflash(periods){
this.periods = periods;
this.selectedGoods = [periods.goods_id, periods.id];
this.getClassList();
},
getClassList(){
if (!this.periods) return;
this.teacher_id = "";
this.getTeacher();
let json = {
limit: this.limit,
page: this.nowPage
};
if (this.teacher_id) {
json.teacher_id = this.teacher_id
}
console.log(this.periods)
getClassListApi(this.periods.id,json).then(res=>{
// debugger
res.list.forEach(data=>{
data.arrive_course_rate = 0;
data.watch_course_rate = 0;
data.over_course_rate = 0;
data.work_rate = 0;
data.over_work_rate = 0;
data.clock_rate = 0;
data.over_clock_rate = 0;
data.transform_rate = 0;
});
this.title = res.periods;
this.title.count_join_num = res.count.count_join_num ? res.count.count_join_num : '暂无';
this.title.count_max_join_num = res.count.count_max_join_num ? res.count.count_max_join_num : '暂无';
this.title.count_teacher_num = res.count.count_teacher_num ? res.count.count_teacher_num : '暂无';
this.countObj = res.count ? res.count : '';
this.classList = res.list;
this.total = res.total;
})
},
handleItemChange(val){
getPeriodsApi({goods_id:val[0],limit:100}).then(res=>{
res.list.forEach(i=>{i.name = i.title});
this.goodsList.find(i=>{return i.id === val[0]}).children = res.list
})
},
delClass(data){
this.$confirm('此操作将删除该班级?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delClassApi(data.id).then(res=>{
this.$message({
type: 'success',
message: '删除成功!'
});
this.getClassList()
this.getClassList();
}
},
onPageChange(val) {
this.nowPage = val;
this.getClassList();
},
onSizeChange(val) {
this.limit = val;
this.nowPage = 1;
this.getClassList();
},
onReflash(periods) {
this.periods = periods;
this.selectedGoods = [periods.goods_id, periods.id];
this.getClassList();
},
getClassList() {
if (!this.periods) return;
this.getTeacher();
let json = {
limit: this.limit,
page: this.nowPage
};
if (this.teacher_id) {
json.teacher_id = this.teacher_id;
}
console.log(this.periods);
getClassListApi(this.periods.id, json).then(res => {
// debugger
res.list.forEach(data => {
data.arrive_course_rate = 0;
data.watch_course_rate = 0;
data.over_course_rate = 0;
data.work_rate = 0;
data.over_work_rate = 0;
data.clock_rate = 0;
data.over_clock_rate = 0;
data.transform_rate = 0;
});
this.title = res.periods;
this.title.count_join_num = res.count.count_join_num
? res.count.count_join_num
: "暂无";
this.title.count_max_join_num = res.count.count_max_join_num
? res.count.count_max_join_num
: "暂无";
this.title.count_teacher_num = res.count.count_teacher_num
? res.count.count_teacher_num
: "暂无";
this.countObj = res.count ? res.count : "";
this.classList = res.list;
this.total = res.total;
});
},
handleItemChange(val) {
getPeriodsApi({ goods_id: val[0], limit: 100 }).then(res => {
res.list.forEach(i => {
i.name = i.title;
});
this.goodsList.find(i => {
return i.id === val[0];
}).children = res.list;
});
},
delClass(data) {
this.$confirm("此操作将删除该班级?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
delClassApi(data.id).then(res => {
this.$message({
type: "success",
message: "删除成功!"
});
this.getClassList();
});
},
onAdd(){
this.dialogObj = {
show:true,
title:'添加班级',
type:0,
teacherList: this.teacherList ? this.teacherList: []
};
if (this.periods) {
this.dialogObj.periods = this.periods;
this.dialogObj.periodsId = this.periods.id
}
},
editClass(data){
this.dialogObj = {
show:true,
title:'编辑班级',
type:1,
id:data.id,
teacherList: this.teacherList ? this.teacherList: []
};
if (this.periods) {
this.dialogObj.periods = this.periods;
this.dialogObj.periodsId = this.periods.id
}
});
},
onAdd() {
this.dialogObj = {
show: true,
title: "添加班级",
type: 0,
teacherList: this.teacherList ? this.teacherList : []
};
if (this.periods) {
this.dialogObj.periods = this.periods;
this.dialogObj.periodsId = this.periods.id;
}
},
editClass(data) {
this.dialogObj = {
show: true,
title: "编辑班级",
type: 1,
id: data.id,
teacherList: this.teacherList ? this.teacherList : []
};
if (this.periods) {
this.dialogObj.periods = this.periods;
this.dialogObj.periodsId = this.periods.id;
}
}
}
};
</script>
<style scoped lang="less">
.class{
padding: 20px 0;
}
.intro .el-form-item{
margin-bottom: 0;
}
.avatar{width: 70px;}
.class {
padding: 20px 0;
}
.intro .el-form-item {
margin-bottom: 0;
}
.avatar {
width: 70px;
}
</style>
<style>
.demo-table-expand {
font-size: 0;
}
.demo-table-expand label {
width: 90px;
color: #99a9bf;
}
.demo-table-expand .el-form-item {
margin-right: 0;
margin-bottom: 0;
width: 50%;
}
.demo-table-expand {
font-size: 0;
}
.demo-table-expand label {
width: 90px;
color: #99a9bf;
}
.demo-table-expand .el-form-item {
margin-right: 0;
margin-bottom: 0;
width: 50%;
}
</style>
......@@ -6,80 +6,87 @@
background-color="#333333"
active-text-color="#ffd04b"
:collapse="menuType"
class="el-menu-vertical-demo">
class="el-menu-vertical-demo"
>
<div class="menu-btn" @click="menuType = !menuType">
<i v-if="!menuType" class="iconfont icon-shouqi"></i>
<i v-if="menuType"
class="iconfont icon-zhankai"></i>
<i v-if="menuType" class="iconfont icon-zhankai"></i>
</div>
<el-submenu v-for="(data,index) in menuList" :index="data.value" :key="index">
<template slot="title">
<i :class="'iconfont menu-icon '+data.icon"></i>
<span>{{data.value}}</span>
</template>
<el-menu-item v-for="(item,i) in data.list" :index="item.path" :key="i" class="item">{{item.value}}</el-menu-item>
<el-menu-item
v-for="(item,i) in data.list"
:index="item.path"
:key="i"
class="item"
>{{item.value}}</el-menu-item>
</el-submenu>
</el-menu>
</template>
<script>
export default {
name: "leftMenu",
data(){
return {
menuList:this.$store.state.menuList,
menuType:false
}
export default {
name: "leftMenu",
data() {
return {
menuList: this.$store.state.menuList,
menuType: false
};
},
mounted() {
console.log(this.menuList);
},
methods: {
changeMenuType: function() {
this.$store.state.menuType = !this.$store.state.menuType;
},
methods:{
changeMenuType:function(){
this.$store.state.menuType = !this.$store.state.menuType
},
toPath:function (data) {
this.$router.push({name:data.routerName})
if(this.$store.state.openedTab.indexOf(data) < 0){
this.$store.state.openedTab.push(data);
}
toPath: function(data) {
this.$router.push({ name: data.routerName });
if (this.$store.state.openedTab.indexOf(data) < 0) {
this.$store.state.openedTab.push(data);
}
},
}
}
};
</script>
<style scoped lang="less">
@import "../../util/public";
.el-menu-vertical-demo:not(.el-menu--collapse) {
width: 200px;
@import "../../util/public";
.el-menu-vertical-demo:not(.el-menu--collapse) {
width: 200px;
}
.el-menu {
background: @bg-b;
color: white;
overflow: auto;
height: 100%;
.menu-btn {
height: 35px;
background: @bg-b-s;
line-height: 35px;
/*text-align: center;*/
i {
font-size: 26px;
float: right;
padding: 0 15px;
}
}
.el-menu{
background: @bg-b;
color: white;
overflow: auto;
height: 100%;
.menu-btn{
height: 35px;
background: @bg-b-s;
line-height: 35px;
/*text-align: center;*/
i{
font-size: 26px;
float: right;
padding: 0 15px;
}
.el-submenu {
.menu-icon {
color: white;
font-size: 18px;
position: relative;
right: 5px;
}
.el-submenu{
.menu-icon{
color: white;
font-size: 18px;
position: relative;
right: 5px;
}
.el-menu-item{
background: @main-font-color;
}
.template{
color: black;
}
.el-menu-item {
background: @main-font-color;
}
.template {
color: black;
}
}
}
</style>
<template>
<div class="login">
<div class="wrap-main">
<h1 class="title">唱唱启蒙——后台管理系统</h1>
<el-form :model="login" :rules="loginRules" ref="loginForm">
<el-form-item prop="username">
<el-input v-model="login.username" placeholder="用户名"></el-input>
</el-form-item>
<el-form-item prop="password">
<el-input type="password" v-model="login.password" placeholder="密码"></el-input>
</el-form-item>
<el-form-item>
<el-button class="btn" size="medium" type="primary" @click="submitForm">登陆</el-button>
</el-form-item>
</el-form>
</div>
<div class="login">
<div class="wrap-main">
<h1 class="title">唱唱启蒙——后台管理系统</h1>
<el-form :model="login" :rules="loginRules" ref="loginForm">
<el-form-item prop="username">
<el-input v-model="login.username" placeholder="用户名"></el-input>
</el-form-item>
<el-form-item prop="password">
<el-input type="password" v-model="login.password" placeholder="密码"></el-input>
</el-form-item>
<el-form-item>
<el-button class="btn" size="medium" type="primary" @click="submitForm">登陆</el-button>
</el-form-item>
</el-form>
</div>
</div>
</template>
<script>
import { loginApi } from "../../service/api";
import md5 from 'js-md5';
export default {
data(){
return{
login:{
username:'',
password:''
},
loginRules:{
username:[
{ required: true, message: '请输入您的用户名', trigger: 'blur' }
],
password:[
{ required: true, message: '请输入您的密码', trigger: 'blur' }
]
}
}
},
mounted(){
let that = this;
document.onkeydown=keyDownSearch;
function keyDownSearch(e) {
// 兼容FF和IE和Opera
let theEvent = e || window.event;
let code = theEvent.keyCode || theEvent.which || theEvent.charCode;
if (code === 13 && that.$route.name === 'login') {
that.submitForm();//具体处理函数
return false;
}
return true;
}
import { loginApi } from "../../service/api";
import md5 from "js-md5";
export default {
data() {
return {
login: {
username: "",
password: ""
},
methods:{
// 提交
submitForm(){
this.$refs["loginForm"].validate((valid) => {
if (valid) {
let json = {
username:this.login.username,
password:md5(this.login.password)
};
// debugger
loginApi(json).then(res=>{
if(res.teacher_info){
let data=JSON.stringify(res.teacher_info)
localStorage.setItem("phoneNum",data)
}else{
localStorage.setItem("phoneNum","")
}
this.$store.dispatch('setToken',res.token);
this.$store.dispatch('setUserName',res.desc);
this.$store.dispatch('setPermission',JSON.parse(res.roles.menu_ids));
// debugger
window.location.href = '/';
})
loginRules: {
username: [
{ required: true, message: "请输入您的用户名", trigger: "blur" }
],
password: [
{ required: true, message: "请输入您的密码", trigger: "blur" }
]
}
};
},
mounted() {
let that = this;
document.onkeydown = keyDownSearch;
function keyDownSearch(e) {
// 兼容FF和IE和Opera
let theEvent = e || window.event;
let code = theEvent.keyCode || theEvent.which || theEvent.charCode;
if (code === 13 && that.$route.name === "login") {
that.submitForm(); //具体处理函数
return false;
}
return true;
}
},
methods: {
// 提交
submitForm() {
this.$refs["loginForm"].validate(valid => {
if (valid) {
let json = {
username: this.login.username,
password: md5(this.login.password)
};
// debugger
loginApi(json).then(res => {
debugger;
if (res.teacher_info) {
let data = JSON.stringify(res.teacher_info);
localStorage.setItem("phoneNum", data);
} else {
localStorage.setItem("phoneNum", "");
}
})
this.$store.dispatch("setToken", res.token);
this.$store.dispatch("setUserName", res.desc);
this.$store.dispatch(
"setPermission",
JSON.parse(res.roles.menu_ids)
);
// debugger
window.location.href = "/";
});
}
}
});
}
}
};
</script>
<style scoped lang="less">
@import "../../util/public";
.login{
height: 100%;
background: linear-gradient(to bottom right, #ecec7c, #787af4); /* 标准的语法(必须放在最后) */
@import "../../util/public";
.login {
height: 100%;
background: linear-gradient(
to bottom right,
#ecec7c,
#787af4
); /* 标准的语法(必须放在最后) */
}
.wrap-main {
width: 300px;
height: 180px;
padding: 50px 20px;
border-radius: 5px;
box-shadow: 8px 8px 15px rgba(49, 49, 49, 0.5);
position: fixed;
line-height: 50px;
background-color: rgba(255, 255, 255, 0.3);
top: 50%;
left: 50%;
margin-left: -200px;
margin-top: -200px;
.btn {
display: block;
width: 100%;
}
.wrap-main{
width: 300px;
height: 180px;
padding:50px 20px;
border-radius: 5px;
box-shadow: 8px 8px 15px rgba(49, 49, 49, 0.5);
position: fixed;
line-height: 50px;
background-color: rgba(255,255,255,0.3);
top: 50%;
left: 50%;
margin-left: -200px;
margin-top: -200px;
.btn{
display: block;
width: 100%;
}
.title{
position: absolute;
top: -100px;
width: 100%;
text-align: center;
left: 0;
color: white;
font-size: 26px;
text-shadow: 6px 6px 3px rgba(49, 49, 49, 0.5);
}
.title {
position: absolute;
top: -100px;
width: 100%;
text-align: center;
left: 0;
color: white;
font-size: 26px;
text-shadow: 6px 6px 3px rgba(49, 49, 49, 0.5);
}
}
</style>
......@@ -12,564 +12,564 @@ Vue.prototype.$upload = upload;
//登录
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 })
};
//退出登录
const logOutUrl = `${_baseUrl}api/admin/logout`;
export const logoutApi = function() {
export const logoutApi = function () {
return Vue.prototype.$post(logOutUrl)
};
//查询账号列表
const getAdminListUrl = `${_baseUrl}api/admin/user/list`;
export const getAdminListApi = function(json) {
export const getAdminListApi = function (json) {
return Vue.prototype.$fetch(getAdminListUrl, json)
};
//修改账号信息
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)
};
//添加账号
const addAdminUrl = `${_baseUrl}api/admin/user/add`;
export const addAdminListApi = function(json) {
export const addAdminListApi = function (json) {
return Vue.prototype.$post(addAdminUrl, json)
};
//删除账号
const delAdminUrl = `${_baseUrl}api/admin/user`;
export const delAdminListApi = function(id) {
export const delAdminListApi = function (id) {
return Vue.prototype.$del(`${delAdminUrl}/${id}`)
};
//修改密码
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)
};
//获取用户列表
const getUserListUrl = `${_baseUrl}api/admin/student/list`;
export const getUserListApi = function(json) {
export const getUserListApi = function (json) {
return Vue.prototype.$fetch(getUserListUrl, json)
};
//获取用户详情
const getUserDetailUrl = `${_baseUrl}api/admin/student/info`;
export const getUserDetailApi = function(id) {
export const getUserDetailApi = function (id) {
return Vue.prototype.$fetch(`${getUserDetailUrl}/${id}`)
};
//获取教师列表
const getTeacherListUrl = `${_baseUrl}api/admin/teacher/list`;
export const getTeacherListApi = function(json) {
export const getTeacherListApi = function (json) {
return Vue.prototype.$fetch(`${getTeacherListUrl}`, json)
};
//获取教师详情
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)
};
//添加教师
const addTeacherUrl = `${_baseUrl}api/admin/teacher/add`;
export const addTeacherApi = function(json) {
export const addTeacherApi = function (json) {
return Vue.prototype.$post(addTeacherUrl, json)
};
//更新教师信息
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)
};
//删除教师
const delTeacherUrl = `${_baseUrl}api/admin/teacher`;
export const delTeacherApi = function(id) {
export const delTeacherApi = function (id) {
return Vue.prototype.$del(`${delTeacherUrl}/${id}`)
};
//获取课程列表
const getLessonUrl = `${_baseUrl}api/admin/course/list`;
export const getLessonApi = function(json) {
export const getLessonApi = function (json) {
return Vue.prototype.$fetch(getLessonUrl, json)
};
//获取课程详情
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)
};
//编辑课程详情
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)
};
//删除课程
const deleteLessonUrl = `${_baseUrl}api/admin/course`;
export const deleteLessonAPI = function(id) {
export const deleteLessonAPI = function (id) {
return Vue.prototype.$del(`${deleteLessonUrl}/${id}`)
};
//新增课程
const addLessonUrl = `${_baseUrl}api/admin/course/add`;
export const addLessonApi = function(json) {
export const addLessonApi = function (json) {
return Vue.prototype.$post(addLessonUrl, json)
};
//获取商品列表
const getGoodsListUrl = `${_baseUrl}api/admin/goods/list`;
export const getGoodsListApi = function(json) {
export const getGoodsListApi = function (json) {
return Vue.prototype.$fetch(getGoodsListUrl, json)
};
//获取商品详情
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)
};
//添加商品
const addGoodsUrl = `${_baseUrl}api/admin/goods/add`;
export const addGoodsApi = function(json) {
export const addGoodsApi = function (json) {
return Vue.prototype.$post(addGoodsUrl, json)
};
//编辑商品
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)
};
//删除商品
const deleteGoodsUrl = `${_baseUrl}api/admin/goods`;
export const deleteGoodsApi = function(id) {
export const deleteGoodsApi = function (id) {
return Vue.prototype.$del(`${deleteGoodsUrl}/${id}`)
};
// 商品上架
const upGoodsUrl = `${_baseUrl}api/admin/goods/putaway/`;
export const upGoodsApi = function(id) {
export const upGoodsApi = function (id) {
return Vue.prototype.$patch(`${upGoodsUrl}${id}`)
};
// 商品下架
const downGoodsUrl = `${_baseUrl}api/admin/goods/soldout/`;
export const downGoodsApi = function(id) {
export const downGoodsApi = function (id) {
return Vue.prototype.$patch(`${downGoodsUrl}${id}`)
};
//查询元素、菜单分类
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 })
};
// 添加教材菜单
const addCategoryUrl = `${_baseUrl}api/admin/category/add/0`;
export const addCategoryApi = function(json) {
export const addCategoryApi = function (json) {
return Vue.prototype.$post(addCategoryUrl, json)
};
//删除分类
const delCategoryUrl = `${_baseUrl}api/admin/category`;
export const delCategoryApi = function(id) {
export const delCategoryApi = function (id) {
return Vue.prototype.$del(`${delCategoryUrl}/${id}`)
};
//分类排序修改
const sortCategoryUrl = `${_baseUrl}api/admin/category/sort`;
export const sortCategoryApi = function(json) {
export const sortCategoryApi = function (json) {
return Vue.prototype.$patch(sortCategoryUrl, json)
};
//获取分类下的元素列表
const getCateDetailListUrl = `${_baseUrl}api/admin/element/list/0`;
export const getCateListApi = function(id) {
export const getCateListApi = function (id) {
return Vue.prototype.$fetch(getCateDetailListUrl, id)
};
// 添加元素
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)
};
// 查询元素详情
const getElemenetDetailUrl = `${_baseUrl}api/admin/element/`;
export const getElemenetDetailApi = function(id) {
export const getElemenetDetailApi = function (id) {
return Vue.prototype.$fetch(`${getElemenetDetailUrl}${id}`)
};
// 编辑元素
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)
};
// 删除元素
const delElementUrl = `${_baseUrl}api/admin/element/`;
export const delElementApi = function(id) {
export const delElementApi = function (id) {
return Vue.prototype.$del(`${delElementUrl}${id}`)
};
// 获取单品列表
const getSingleListUrl = `${_baseUrl}api/admin/item/stock/list`;
export const getSingleListApi = function(json) {
export const getSingleListApi = function (json) {
return Vue.prototype.$fetch(`${getSingleListUrl}`, json)
};
// 获取单品详情
const getSingleDetailUrl = `${_baseUrl}api/admin/item/stock/info/`;
export const getSingleDetailApi = function(id) {
export const getSingleDetailApi = function (id) {
return Vue.prototype.$fetch(`${getSingleDetailUrl}${id}`)
};
// 删除单品
const delSingleUrl = `${_baseUrl}api/admin/item/stock/`;
export const delSingleApi = function(id) {
export const delSingleApi = function (id) {
return Vue.prototype.$del(`${delSingleUrl}${id}`)
};
// 新增单品
const addSingleUrl = `${_baseUrl}api/admin/item/stock/add`;
export const addSingleApi = function(json) {
export const addSingleApi = function (json) {
return Vue.prototype.$post(addSingleUrl, json)
};
// 修改单品
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)
};
// 获取盒子分类
const getBoxTypeListUrl = `${_baseUrl}api/admin/category/list/1`;
export const getBoxTypeListApi = function() {
export const getBoxTypeListApi = function () {
return Vue.prototype.$fetch(getBoxTypeListUrl)
};
// 获取盒子列表
const getBoxListUrl = `${_baseUrl}api/admin/item/box/list/`;
export const getBoxListApi = function(id) {
export const getBoxListApi = function (id) {
return Vue.prototype.$fetch(`${getBoxListUrl}${id}`)
};
// 添加盒子
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)
};
// 删除盒子
const delBoxUrl = `${_baseUrl}api/admin/item/box/`;
export const delBoxApi = function(id) {
export const delBoxApi = function (id) {
return Vue.prototype.$del(`${delBoxUrl}${id}`)
};
// 获取盒子详情
const getBoxDetailUrl = `${_baseUrl}api/admin/item/box/info/`;
export const getBoxDetailApi = function(id) {
export const getBoxDetailApi = function (id) {
return Vue.prototype.$fetch(`${getBoxDetailUrl}${id}`)
};
// 更新盒子
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)
};
// 获取公众号菜单
const getPublicMenuUrl = `${_baseUrl}api/admin/open/menu`;
export const getPublicMenuApi = function() {
export const getPublicMenuApi = function () {
return Vue.prototype.$fetch(getPublicMenuUrl)
};
// 添加公众号菜单
export const savePublicMenuApi = function(json) {
export const savePublicMenuApi = function (json) {
return Vue.prototype.$post(getPublicMenuUrl, json)
};
// 获取配置列表
const getConfigListUrl = `${_baseUrl}api/admin/sys/config/list`;
export const getConfigListApi = function(json) {
export const getConfigListApi = function (json) {
return Vue.prototype.$fetch(getConfigListUrl, json)
};
// 新增系统配置
const saveConfigUrl = `${_baseUrl}api/admin/sys/config`;
export const saveConfigApi = function(json) {
export const saveConfigApi = function (json) {
return Vue.prototype.$post(saveConfigUrl, json)
};
// 更新关键词
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)
};
// 删除配置
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}`)
};
// 获取配置详情
const getConfigDetailUrl = `${_baseUrl}api/admin/sys/config/`;
export const getConfigDetailApi = function(id) {
export const getConfigDetailApi = function (id) {
return Vue.prototype.$fetch(`${getConfigDetailUrl}${id}`)
};
// 获取素材列表
const getMediaListUrl = `${_baseUrl}api/admin/open/media/list`;
export const getMediaListApi = function(json) {
export const getMediaListApi = function (json) {
return Vue.prototype.$fetch(getMediaListUrl, json)
};
// 文件上传
const uploadFileUrl = `${_baseUrl}api/public/upload/zone`;
export const uploadFileApi = function(json) {
export const uploadFileApi = function (json) {
return Vue.prototype.$upload(uploadFileUrl, json)
};
// 获取菜单列表
const getMenuListUrl = `${_baseUrl}api/admin/category/list/2`;
export const getMenuListApi = function(json) {
return Vue.prototype.$fetch(`${getMenuListUrl}`,json)
export const getMenuListApi = function (json) {
return Vue.prototype.$fetch(`${getMenuListUrl}`, json)
};
// 新增菜单
const addMenuListUrl = `${_baseUrl}api/admin/category/add/2`;
export const saveMenuApi = function(json) {
export const saveMenuApi = function (json) {
return Vue.prototype.$post(addMenuListUrl, json)
};
// 更改菜单
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)
};
// 删除菜单
export const delMenuApi = function(id) {
export const delMenuApi = function (id) {
return Vue.prototype.$del(`${updateMenuUrl}${id}`)
};
// 获取权限列表
const getRoleListUrl = `${_baseUrl}api/admin/role/list`;
export const getRoleListApi = function(json) {
export const getRoleListApi = function (json) {
return Vue.prototype.$fetch(`${getRoleListUrl}`, json)
};
// 新增角色
const addRoleUrl = `${_baseUrl}api/admin/role/add`;
export const saveRoleApi = function(json) {
export const saveRoleApi = function (json) {
return Vue.prototype.$post(addRoleUrl, json)
};
// 更新权限
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)
};
// 获取权限详情
export const getRoleDetailApi = function(id) {
export const getRoleDetailApi = function (id) {
return Vue.prototype.$fetch(`${updateRoleUrl}${id}`)
};
// 删除权限
const delRoleUrl = `${_baseUrl}api/admin/role/`;
export const delRoleApi = function(id) {
export const delRoleApi = function (id) {
return Vue.prototype.$del(`${delRoleUrl}${id}`)
};
// 获取banner列表
const getBannerListUrl = `${_baseUrl}api/admin/banner/list/`;
export const getBannerListApi = function(type,json) {
return Vue.prototype.$fetch(getBannerListUrl+type, json)
export const getBannerListApi = function (type, json) {
return Vue.prototype.$fetch(getBannerListUrl + type, json)
};
// 添加banner
const addBannerUrl = `${_baseUrl}api/admin/banner/add/`;
export const addBannerApi = function(type,json) {
return Vue.prototype.$post(addBannerUrl+type, json)
export const addBannerApi = function (type, json) {
return Vue.prototype.$post(addBannerUrl + type, json)
};
// 编辑banner
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)
};
// 获取banner详情
export const getBannerDetailApi = function(id) {
export const getBannerDetailApi = function (id) {
return Vue.prototype.$fetch(`${editBannerUrl}${id}`)
};
// 删除banner
const delBannerUrl = `${_baseUrl}api/admin/banner/`;
export const delBannerApi = function(id) {
export const delBannerApi = function (id) {
return Vue.prototype.$del(`${delBannerUrl}${id}`)
};
// 移动顺序
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 })
};
// 获取期数列表
const getPeriodsUrl = `${_baseUrl}api/admin/periods/list`;
export const getPeriodsApi = function(json) {
export const getPeriodsApi = function (json) {
return Vue.prototype.$fetch(getPeriodsUrl, json)
};
// 添加期数
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)
};
// 编辑期数
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)
};
// 删除期数
const getDelPeriodUrl = `${_baseUrl}api/admin/periods/`;
export const delPeriodApi = function(id) {
export const delPeriodApi = function (id) {
return Vue.prototype.$del(`${getDelPeriodUrl}${id}`)
};
// 获取班级列表
const getClassListUrl = `${_baseUrl}api/admin/periods/class/list/`;
export const getClassListApi = function(id,json,type) {
export const getClassListApi = function (id, json, type) {
// let typeParams = type?type:0
return Vue.prototype.$fetch(`${getClassListUrl}${id}`, json)
};
// 获取当前期数下的老师列表
const getPeriodsTeacherUrl = `${_baseUrl}api/admin/periods/teacher/list/`;
export const getPeriodsTeacherApi = function(id) {
export const getPeriodsTeacherApi = function (id) {
return Vue.prototype.$fetch(`${getPeriodsTeacherUrl}${id}`)
};
// 删除班级
const delClassUrl = `${_baseUrl}api/admin/periods/class/`;
export const delClassApi = function(id) {
export const delClassApi = function (id) {
return Vue.prototype.$del(`${delClassUrl}${id}`)
};
// 添加班级
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)
};
// 修改班级
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)
};
// 获取班级详情
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)
};
// 获取班级用户列表
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)
};
// 添加班级用户
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)
};
// 更改看课权限
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)
};
// 添加是否添加老师权限
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)
};
// 移除班级用户
const delClassUserUrl = `${_baseUrl}api/admin/class/user/`;
export const delClassUserApi = function(id) {
export const delClassUserApi = function (id) {
return Vue.prototype.$del(`${delClassUserUrl}${id}`)
};
// 获取订单列表
const getOrderListUrl = `${_baseUrl}api/admin/order/list`;
export const getOrderListApi = function(json) {
export const getOrderListApi = function (json) {
return Vue.prototype.$fetch(getOrderListUrl, json)
};
//手动添加订单
const setOrderUrl = `/api/admin/order`;
export const setOrderApi = function(json) {
return Vue.prototype.$post(setOrderUrl,json)
export const setOrderApi = function (json) {
return Vue.prototype.$post(setOrderUrl, json)
}
// 修改订单备注
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)
};
// 给用户退款
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)
};
// 修改订单收货地址
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)
};
// 提现审核
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)
};
// 退款列表
const getRefundListUrl = `${_baseUrl}api/admin/order/refund/list`;
export const getRefundListApi = function(json) {
export const getRefundListApi = function (json) {
return Vue.prototype.$fetch(`${getRefundListUrl}`, json)
};
// 提现列表
const getWithdrawListUrl = `${_baseUrl}api/admin/order/withdraw/list`;
export const getWithdrawListApi = function(json) {
export const getWithdrawListApi = function (json) {
return Vue.prototype.$fetch(`${getWithdrawListUrl}`, json)
};
// 新增盒子类型
const addBoxTypeUrl = `${_baseUrl}api/admin/category/add/1`;
export const addBoxTypeApi = function(json) {
export const addBoxTypeApi = function (json) {
return Vue.prototype.$post(addBoxTypeUrl, json)
};
// 用户关联老师
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)
};
// 操作日志
const getAdminLogListUrl = `${_baseUrl}api/admin/user/log`;
export const getAdminLogLisApi = function(json) {
export const getAdminLogLisApi = function (json) {
return Vue.prototype.$fetch(`${getAdminLogListUrl}`, json)
};
// 清除缓存
const clearCacheListUrl = `/api/admin/redis/key`;
export const clearCacheListApi = function(json) {
export const clearCacheListApi = function (json) {
return Vue.prototype.$del(`${clearCacheListUrl}/${json}`)
};
// 绑定其他商品
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}`)
};
// 冲突商品
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)
};
// 班级用户添加备注
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)
};
// 复制商品
const copyShopUrl = `/api/admin/goods/copy/`;
export const copyShopApi = function(id) {
export const copyShopApi = function (id) {
return Vue.prototype.$post(`${copyShopUrl}${id}`)
};
// 获取media详情
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}`)
};
// 期数数据统计
const getPeriodsStatisticsUrl = '/api/admin/periods/statistics/';
export const getPeriodsStatisticsApi = function(id) {
export const getPeriodsStatisticsApi = function (id) {
return Vue.prototype.$fetch(`${getPeriodsStatisticsUrl}${id}`)
};
// 班级数据统计
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)
};
// 用户看课情况
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)
};
//订单统计
const orderCountUrl = `/api/admin/order/statistics`;
export const orderCountApi = function(json) {
export const orderCountApi = function (json) {
return Vue.prototype.$fetch(orderCountUrl, json)
};
// 切换期数与班级
const changeClassUrl = `/api/admin/change/class`;
export const changeClassApi = function(json) {
export const changeClassApi = function (json) {
return Vue.prototype.$put(changeClassUrl, json)
};
// 创建微信推广二维码
const createQrCodeUrl = '/api/admin/create/wechat/qrcode';
export const createQrCodeApi = function(json) {
export const createQrCodeApi = function (json) {
return Vue.prototype.$post(createQrCodeUrl, json)
};
// 获取公众号二维码
const getQrCodeListUrl = '/api/admin/wechat/qrcode/list';
export const getQrCodeListApi = function(json) {
export const getQrCodeListApi = function (json) {
return Vue.prototype.$fetch(getQrCodeListUrl, json)
};
// 每日关注取关统计
const getWatchListUrl = '/api/admin/open/subscribe/statistics';
export const getWatchListApi = function(json) {
export const getWatchListApi = function (json) {
return Vue.prototype.$fetch(getWatchListUrl, json)
};
// 获取群发结果
......@@ -584,87 +584,87 @@ export const getWatchListApi = function(json) {
// };
// 获取微信授权
const getwechatParamUrl = `${_baseUrl}api/client/jssdk`;
export const getwechatParam = function(json) {
export const getwechatParam = function (json) {
return Vue.prototype.$fetch(getwechatParamUrl, json)
};
// 默认当前体验营期数
const getDefaultPeriodsUrl = '/api/admin/periods/default';
export const getDefaultPeriodsApi = function() {
export const getDefaultPeriodsApi = function () {
return Vue.prototype.$fetch(getDefaultPeriodsUrl)
};
// 修改二维码管理
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)
};
// 获取二维码列表详情
const getQrCodeDetailUrl = '/api/admin/wechat/qrcode';
export const getQrCodeDetailUrlApi = function(id) {
export const getQrCodeDetailUrlApi = function (id) {
return Vue.prototype.$fetch(`${getQrCodeDetailUrl}/${id}`)
};
const getAdsListlUrl = '/api/public/ads/list';
export const getAdsListApi = function(json) {
export const getAdsListApi = function (json) {
return Vue.prototype.$fetch(getAdsListlUrl, json)
};
const getAdsInnerListUrl = '/api/admin/ads/list';
export const getAdsInnerListApi = function(json) {
export const getAdsInnerListApi = function (json) {
return Vue.prototype.$fetch(getAdsInnerListUrl, json)
};
// 外部投放修改备注
const updateAdsInnerUrl = '/api/admin/ads';
export const updateAdsInnerApi = function(id, json) {
export const updateAdsInnerApi = function (id, json) {
return Vue.prototype.$put(`${updateAdsInnerUrl}/${id}`, json)
};
// 外部投放批量修改备注
const updateAdsInnerPlUrl = '/api/admin/ads/multi/desc';
export const updateAdsInnerPlApi = function(json) {
export const updateAdsInnerPlApi = function (json) {
return Vue.prototype.$put(`${updateAdsInnerPlUrl}`, json)
};
// 订单使用红包列表
const getCouponListUrl = '/api/admin/order/coupon';
export const getCouponListApi = function(json) {
export const getCouponListApi = function (json) {
return Vue.prototype.$fetch(getCouponListUrl, json)
};
// 更新二维码备注
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)
};
// banner上下架
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)
};
// 微信用户数据分析
const getWechatStatisticListUrl = '/api/admin/wechat/statistics';
export const getWechatStatisticListApi = function(json) {
export const getWechatStatisticListApi = function (json) {
return Vue.prototype.$fetch(getWechatStatisticListUrl, json)
};
// 同步用户手机号
const getSyncUserUrl = '/api/admin/student/mobile';
export const getSyncUserApi = function(json) {
export const getSyncUserApi = function (json) {
return Vue.prototype.$fetch(getSyncUserUrl, json)
};
// 获取关注统计详情
const getStatisticsDetailUrl = '/api/admin/open/subscribe/statistics/detail';
export const getStatisticsDetailApi = function(json) {
export const getStatisticsDetailApi = function (json) {
return Vue.prototype.$fetch(getStatisticsDetailUrl, json)
};
// 修改商品备注
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)
};
// 管理员密码修改
const editAdminPasswordUrl = `/api/admin/user/passwd`;
export const editAdminPasswordApi = function(json) {
export const editAdminPasswordApi = function (json) {
return Vue.prototype.$patch(editAdminPasswordUrl, json)
};
// 导出
export const exportExcelApi = function(url, params) {
export const exportExcelApi = function (url, params) {
url = `${url}?`;
let json = JSON.parse(JSON.stringify(params))
for (let k in json) {
......@@ -683,16 +683,16 @@ export const exportExcelApi = function(url, params) {
}
json.sing = "singsingenglish21000";
params.param_token = md5(JSON.stringify(json));
let urlEncode = function(param, key, encode) {
let urlEncode = function (param, key, encode) {
if (param == null) return '';
let paramStr = [];
let t = typeof(param);
let t = typeof (param);
if (t === 'string' || t === 'number' || t === 'boolean') {
paramStr.push( key + '=' + ((encode == null || encode) ? encodeURIComponent(param) : param))
paramStr.push(key + '=' + ((encode == null || encode) ? encodeURIComponent(param) : param))
} else {
for (let i in param) {
let k = key == null ? i : key + (param instanceof Array ? '[' + i + ']' : '.' + i);
paramStr.push(urlEncode(param[i], k, encode)) ;
paramStr.push(urlEncode(param[i], k, encode));
}
}
return paramStr.join('&');
......@@ -703,368 +703,368 @@ export const exportExcelApi = function(url, params) {
};
// 来源码列表
const getSourceListUrl = '/api/admin/code/rule';
export const getSourceListApi = function(json) {
export const getSourceListApi = function (json) {
return Vue.prototype.$fetch(getSourceListUrl, json)
};
// 添加来源码
const addSourceUrl = '/api/admin/code/rule';
export const addSourceApi = function(json) {
export const addSourceApi = function (json) {
return Vue.prototype.$post(addSourceUrl, json)
};
// 修改来源码
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)
};
// 删除来源码
const delSourceUrl = `/api/admin/code/rule/`;
export const delSourceApi = function(id) {
export const delSourceApi = function (id) {
return Vue.prototype.$del(`${delSourceUrl}${id}`)
};
// 修改商品购买数量
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)
};
// 获取班级用户备注列表
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)
};
// 更改用户看课权限,添加老师,意向等级
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)
};
// 修改订单推广人信息
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}`)
};
// 用户提现 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)
};
// 获取班主任业绩总排行
const getTeacherRankListUrl = '/api/admin/teacher/performance';
export const getTeacherRankListApi = function(json) {
export const getTeacherRankListApi = function (json) {
return Vue.prototype.$fetch(`${getTeacherRankListUrl}`, json)
};
// 班主任业绩排行按天
const getTeacherDayRankListUrl = '/api/admin/teacher/performance/day';
export const getTeacherDayRankListApi = function(json) {
export const getTeacherDayRankListApi = function (json) {
return Vue.prototype.$fetch(`${getTeacherDayRankListUrl}`, json)
};
// 老师绑定用户
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)
};
// 获取老师加用户数,用户老师数
const getJoinNumUrl = '/api/admin/class/teacher/group/num/';
export const getJoinNumApi = function(id) {
export const getJoinNumApi = function (id) {
return Vue.prototype.$fetch(`${getJoinNumUrl}${id}`)
};
//获取短网址
const getLinkUrl = `/api/public/short/url`;
export const getLinkApi = function(json) {
export const getLinkApi = function (json) {
return Vue.prototype.$fetch(`${getLinkUrl}`, json)
};
//获取二维码
const getqrCodeUrl = `${_baseUrl}api/public/qrcode`;
export const getqrCodeApi = function(json) {
export const getqrCodeApi = function (json) {
return Vue.prototype.$fetch(`${getqrCodeUrl}`, json)
};
//设置系统指定配置
const putConfigUrl = `/api/admin/tools/config`;
export const putConfigApi = function(json) {
export const putConfigApi = function (json) {
return Vue.prototype.$put(`${putConfigUrl}`, json)
};
//用户领取课程日志
const getClassConfigUrl = `/api/admin/user/receive/course/log`;
export const getClassConfigApi = function(json) {
export const getClassConfigApi = function (json) {
return Vue.prototype.$fetch(`${getClassConfigUrl}`, json)
};
//扫码入课编辑备注
const updateDescUrl = `/api/admin/user/receive/course/log/desc/`;
export const updateDescApi = function(json,id) {
export const updateDescApi = function (json, id) {
return Vue.prototype.$put(`${updateDescUrl}${id}`, json)
};
//短信发送记录
const getsmsRecordUrl = `/api/admin/sms/log/list`;
export const getsmsRecordApi = function(json) {
export const getsmsRecordApi = function (json) {
return Vue.prototype.$fetch(`${getsmsRecordUrl}`, json)
};
//云集订单列表
const getyunjiUrl = `/api/admin/yunji/order`;
export const getyunjiApi = function(json) {
export const getyunjiApi = function (json) {
return Vue.prototype.$fetch(`${getyunjiUrl}`, json)
};
//云集绑定老师
const bindTeacherUrl = `/api/admin/yunji/order/bind/teacher/`;
export const bindTeacherApi = function(json,id) {
export const bindTeacherApi = function (json, id) {
return Vue.prototype.$put(`${bindTeacherUrl}${json}/${id}`)
};
//云集订单备注
const orderDescUrl = `/api/admin/yunji/order/desc/`;
export const orderDescApi = function(json,id) {
return Vue.prototype.$put(`${orderDescUrl}${id}`,json)
export const orderDescApi = function (json, id) {
return Vue.prototype.$put(`${orderDescUrl}${id}`, json)
};
//老师销卖课程列表
const getTeacherClassUrl = `/api/admin/teacher/performance/course/`;
export const getTeacherClassApi = function(json,id) {
return Vue.prototype.$fetch(`${getTeacherClassUrl}${id}`,json)
export const getTeacherClassApi = function (json, id) {
return Vue.prototype.$fetch(`${getTeacherClassUrl}${id}`, json)
};
//老系统用户列表
const getOldListUrl = `/api/admin/student/course/old/sys/`;
export const getOldListApi = function(json) {
return Vue.prototype.$fetch(getOldListUrl,json)
export const getOldListApi = function (json) {
return Vue.prototype.$fetch(getOldListUrl, json)
};
//删除老系统用户
const delOldUseUrl = `/api/admin/student/course/old/sys/`;
export const delOldUseApi = function(id) {
export const delOldUseApi = function (id) {
return Vue.prototype.$del(`${delOldUseUrl}${id}`)
};
// 存储预览课程数据
const saveViewDataUrl = '/api/admin/element/view/';
export const saveViewDataApi = function (id,json) {
return Vue.prototype.$post(`${saveViewDataUrl}${id}`,json)
export const saveViewDataApi = function (id, json) {
return Vue.prototype.$post(`${saveViewDataUrl}${id}`, json)
};
// 获取课程预览内容
const getViewDataUrl = '/api/admin/element/view/';
export const getViewDataApi = function (id) {
return Vue.prototype.$fetch(`${getViewDataUrl}${id}`)
return Vue.prototype.$fetch(`${getViewDataUrl}${id}`)
};
// 获取用户积分列表
const getIntegralListUrl = '/api/admin/student/integral';
export const getIntegralListApi = function (json) {
return Vue.prototype.$fetch(getIntegralListUrl,json)
return Vue.prototype.$fetch(getIntegralListUrl, json)
};
// 积分变更
const changeIntegralUrl = '/api/admin/student/integral';
export const changeIntegralApi = function (json) {
return Vue.prototype.$post(changeIntegralUrl,json)
return Vue.prototype.$post(changeIntegralUrl, json)
};
// 修改添加老师
const changeAddTeacherUrl ='/api/admin/class/user/add/teacher/';
const changeAddTeacherUrl = '/api/admin/class/user/add/teacher/';
export const changeAddTeacherApi = function (id, type) {
return Vue.prototype.$put(`${changeAddTeacherUrl}${id}/${type}`,)
return Vue.prototype.$put(`${changeAddTeacherUrl}${id}/${type}`)
};
// 兑换码列表
const getExchangeListUrl = `/api/admin/exchange/list`;
export const getExchangeListApi = function (json) {
return Vue.prototype.$fetch(getExchangeListUrl,json)
return Vue.prototype.$fetch(getExchangeListUrl, json)
};
// 生成兑换码
const addExchangeUrl = `/api/admin/exchange/add`;
export const addExchangeApi = function (json) {
return Vue.prototype.$post(addExchangeUrl,json)
return Vue.prototype.$post(addExchangeUrl, json)
};
// 兑换码详情
const exchangeDetailUrl = '/api/admin/exchange/detail/';
export const exchangeDetailApi = function (id, json) {
return Vue.prototype.$fetch(`${exchangeDetailUrl}${id}`,json)
return Vue.prototype.$fetch(`${exchangeDetailUrl}${id}`, json)
};
// 修改兑换码
const editExchangeUrl = `/api/admin/exchange/edit/`;
export const editExchangeApi = function (id, json) {
return Vue.prototype.$put(`${editExchangeUrl}${id}`,json)
return Vue.prototype.$put(`${editExchangeUrl}${id}`, json)
};
// 修改用户意向等级
const editUserWeightUrl = `/api/admin/class/user/weight/`;
export const editUserWeightApi = function (id, weight,json) {
return Vue.prototype.$put(editUserWeightUrl + id + '/' + weight,json)
export const editUserWeightApi = function (id, weight, json) {
return Vue.prototype.$put(editUserWeightUrl + id + '/' + weight, json)
};
// 修改用户看课权限
const editUserViewCourseUrl = `/api/admin/class/user/view/course/`;
export const editUserViewCourseApi = function (id, is_view_course) {
return Vue.prototype.$put(editUserViewCourseUrl + id + '/' + is_view_course)
return Vue.prototype.$put(editUserViewCourseUrl + id + '/' + is_view_course)
};
// 班主任任务1 添加好友
const task1Url = `/api/admin/teacher/task1/`;
export const task1Api = function (id) {
return Vue.prototype.$fetch(task1Url + id)
return Vue.prototype.$fetch(task1Url + id)
};
// 班主任任务2 意向等级
const task2Url = `/api/admin/teacher/task2/`;
export const task2Api = function (id) {
return Vue.prototype.$fetch(task2Url + id)
return Vue.prototype.$fetch(task2Url + id)
};
// 班主任任务3 用户召回
const task3Url = `/api/admin/teacher/task3/`;
export const task3Api = function (id) {
return Vue.prototype.$fetch(task3Url + id)
return Vue.prototype.$fetch(task3Url + id)
};
// 班主任任务5 活跃用户跟踪
const task5Url = `/api/admin/teacher/task5/`;
export const task5Api = function (id) {
return Vue.prototype.$fetch(task5Url + id)
return Vue.prototype.$fetch(task5Url + id)
};
// 取出当前老师当前期数全勤的用户
const getOverWatchListUrl = `/api/admin/class/user/over/watch/list/`;
export const getOverWatchListApi = function (periods_id, teacher_id, json) {
return Vue.prototype.$fetch(`${getOverWatchListUrl}${periods_id}/${teacher_id}`,json)
return Vue.prototype.$fetch(`${getOverWatchListUrl}${periods_id}/${teacher_id}`, json)
};
// 需要召回的用户(今日没看且去除前两天都没看的用户)
const getRecallUrl = `/api/admin/class/user/recall/list/`;
export const getRecallListApi = function (periods_id, teacher_id, json) {
return Vue.prototype.$fetch(`${getRecallUrl}${periods_id}/${teacher_id}`,json)
return Vue.prototype.$fetch(`${getRecallUrl}${periods_id}/${teacher_id}`, json)
};
//通过用户是否看课取出用户
const getWatchUserUrl = `/api/admin/class/user/watch/list/`;
export const getWatchUserApi = function (periods_id, teacher_id, json) {
return Vue.prototype.$fetch(`${getWatchUserUrl}${periods_id}/${teacher_id}`,json)
return Vue.prototype.$fetch(`${getWatchUserUrl}${periods_id}/${teacher_id}`, json)
};
// 班主任任务4
const task4Url = '/api/admin/teacher/task4/';
export const task4Api = function (teacher_id) {
return Vue.prototype.$fetch(task4Url + teacher_id)
return Vue.prototype.$fetch(task4Url + teacher_id)
};
// 班主任任务6
const task6Url = '/api/admin/teacher/task6/';
export const task6Api = function (teacher_id,json) {
return Vue.prototype.$fetch(task6Url + teacher_id,json)
export const task6Api = function (teacher_id, json) {
return Vue.prototype.$fetch(task6Url + teacher_id, json)
};
// 班主任任务7
const task7Url = '/api/admin/teacher/task7/';
export const task7Api = function (teacher_id,json) {
return Vue.prototype.$fetch(task7Url + teacher_id,json)
export const task7Api = function (teacher_id, json) {
return Vue.prototype.$fetch(task7Url + teacher_id, json)
};
// 批量添加备注
const allDescUrl = `/api/admin/class/user/desc/multiple`;
export const allDescApi = function (json) {
return Vue.prototype.$post(allDescUrl,json)
return Vue.prototype.$post(allDescUrl, json)
};
// 修改用户回复
const editUserReplyUrl = `/api/admin/class/user/desc/`;
export const editUserReplyApi = function (id, json) {
return Vue.prototype.$put(editUserReplyUrl + id, json)
export const editUserReplyApi = function (id, json) {
return Vue.prototype.$put(editUserReplyUrl + id, json)
};
// 用户积分排行
const integralUrl = '/api/admin/student/integral/hot/blog';
export const integralApi = function (json) {
return Vue.prototype.$fetch(integralUrl,json)
return Vue.prototype.$fetch(integralUrl, json)
};
// 外部订单批量指定老师邀请激活
const yunjiOrderTeacherUrl = '/api/admin/yunji/order/teacher/';
export const yunjiOrderTeacherApi = function (id, json) {
return Vue.prototype.$put(yunjiOrderTeacherUrl+id,json)
return Vue.prototype.$put(yunjiOrderTeacherUrl + id, json)
};
// 获取当前市场招生数据
const getPeriodsClassCurDataUrl = '/api/admin/periods/class/cur/data';
export const getPeriodsClassCurDataApi = function (json) {
return Vue.prototype.$fetch(getPeriodsClassCurDataUrl,json)
return Vue.prototype.$fetch(getPeriodsClassCurDataUrl, json)
};
// 批量更新外部订单备注
const multiUrl = `/api/admin/yunji/order/multi/desc`;
export const multiApi = function (json) {
return Vue.prototype.$put(multiUrl,json)
return Vue.prototype.$put(multiUrl, json)
};
// 获取当前市场招生数据
const getSourceByDateUrl = '/api/admin/user/static/list';
export const getSourceByDateApi = function (periods_id,user_id,json) {
console.log(periods_id,user_id)
return Vue.prototype.$fetch(`${getSourceByDateUrl}/${periods_id}/${user_id}/v2`,json)
export const getSourceByDateApi = function (periods_id, user_id, json) {
console.log(periods_id, user_id)
return Vue.prototype.$fetch(`${getSourceByDateUrl}/${periods_id}/${user_id}/v2`, json)
};
// 批量添加备注
const sendMsgUrl = `/api/admin/multi/msg/user`;
export const sendMsgApi = function (json) {
return Vue.prototype.$post(sendMsgUrl,json)
return Vue.prototype.$post(sendMsgUrl, json)
};
const getMsgListUrl = `/api/admin/muti/msg/list`;
export const getMsgListApi = function (json) {
return Vue.prototype.$fetch(getMsgListUrl,json)
return Vue.prototype.$fetch(getMsgListUrl, json)
};
const getMsgCountUrl = `/api/admin/multi/msg/user`;
export const getMsgCountApi = function (json) {
return Vue.prototype.$fetch(`${getMsgCountUrl}`,json)
return Vue.prototype.$fetch(`${getMsgCountUrl}`, json)
};
const updateFansUrl = `/api/admin/init/fans/info`;
export const updateFansApi = function (json) {
return Vue.prototype.$put(`${updateFansUrl}`,json)
return Vue.prototype.$put(`${updateFansUrl}`, json)
};
// 更新外部订单沟通情况
const updateContactUrl = `/api/admin/other/order/user/status`;
export const updateContactApi = function (json) {
return Vue.prototype.$put(`${updateContactUrl}`,json)
return Vue.prototype.$put(`${updateContactUrl}`, json)
};
// 外部渠道批量指派订单老师
const adsTeacherUrl = `/api/admin/ads/teacher/`;
export const adsTeacherApi = function (id,json) {
return Vue.prototype.$put(`${adsTeacherUrl}${id}`,json)
export const adsTeacherApi = function (id, json) {
return Vue.prototype.$put(`${adsTeacherUrl}${id}`, json)
};
// 更新外部渠道沟通状态
const updateAdsStatusUrl = `/api/admin/ads/user/status`;
export const updateAdsStatusApi = function (json) {
return Vue.prototype.$put(`${updateAdsStatusUrl}`,json)
return Vue.prototype.$put(`${updateAdsStatusUrl}`, json)
};
// 更新外部订单地址
const editOrderAdressUrl = '/api/admin/order/address/other/';
export const editOrderAdressApi = function (id, json) {
return Vue.prototype.$put(editOrderAdressUrl+id,json)
return Vue.prototype.$put(editOrderAdressUrl + id, json)
};
// 看课排行
const getLookRankUrl = `/api/admin/class/user/watch/ranking/`;
export const getLookRankApi = function (classId,json) {
return Vue.prototype.$fetch(`${getLookRankUrl}${classId}`,json)
export const getLookRankApi = function (classId, json) {
return Vue.prototype.$fetch(`${getLookRankUrl}${classId}`, json)
};
//发生期数消息
const postActiveNoticeUrl = `/api/admin/active/notice/`;
export const postActiveNoticeApi = function (classId) {
return Vue.prototype.$post(`${postActiveNoticeUrl}${classId}`)
return Vue.prototype.$post(`${postActiveNoticeUrl}${classId}`)
};
//手动创建外部订单列表
const postOtherOrderUrl = `/api/admin/other/order`;
export const postOtherOrderApi = function (json) {
return Vue.prototype.$post(`${postOtherOrderUrl}`,json)
return Vue.prototype.$post(`${postOtherOrderUrl}`, json)
};
//清除外部订单激活信息
export const postClearOtherOrderApi = function (id) {
return Vue.prototype.$post(`/api/admin/other/order/clear/${id}`)
return Vue.prototype.$post(`/api/admin/other/order/clear/${id}`)
};
//新建话术/模块
export const postQuestionModularApi = function (json) {
return Vue.prototype.$post(`/api/admin/question/`,json)
return Vue.prototype.$post(`/api/admin/question/`, json)
};
//话术/模块列表
export const getQuestionModularListApi = function (type,json) {
return Vue.prototype.$fetch(`/api/admin/question/list/${type}`,json)
export const getQuestionModularListApi = function (type, json) {
return Vue.prototype.$fetch(`/api/admin/question/list/${type}`, json)
};
//话术/模块详情
export const getQuestionModularDetailApi = function (question_id) {
return Vue.prototype.$fetch(`/api/admin/question/${question_id}`)
return Vue.prototype.$fetch(`/api/admin/question/${question_id}`)
};
//更新话术/模块内容
export const updateQuestionModularDetailApi = function (question_id,json) {
return Vue.prototype.$put(`/api/admin/question/${question_id}`,json)
export const updateQuestionModularDetailApi = function (question_id, json) {
return Vue.prototype.$put(`/api/admin/question/${question_id}`, json)
};
//删除话术/模块
export const deleteQuestionModularDetailApi = function (question_id) {
......@@ -1072,27 +1072,27 @@ export const deleteQuestionModularDetailApi = function (question_id) {
};
//话术/模块排序
export const sortQuestionModularDetailApi = function (json) {
return Vue.prototype.$put(`/api/admin/question/sort/`,json)
return Vue.prototype.$put(`/api/admin/question/sort/`, json)
};
//用户收货地址
export const fetchAddressListApi = function (uid) {
return Vue.prototype.$fetch(`/api/admin/student/address/${uid}`)
};
//用户收货地址编辑
export const editAddressListApi = function (uid,json) {
return Vue.prototype.$put(`/api/admin/student/address/${uid}`,json)
export const editAddressListApi = function (uid, json) {
return Vue.prototype.$put(`/api/admin/student/address/${uid}`, json)
};
//模板消息
export const getTemplatetApi = function (uid,json) {
return Vue.prototype.$fetch(`/api/admin/open/template`,json)
export const getTemplatetApi = function (uid, json) {
return Vue.prototype.$fetch(`/api/admin/open/template`, json)
};
//发送模板消息
export const sendTemplatetApi = function (json) {
return Vue.prototype.$post(`/api/admin/open/template/send`,json)
return Vue.prototype.$post(`/api/admin/open/template/send`, json)
};
//用户收货地址编辑
export const addAddressListApi = function (uid,json) {
return Vue.prototype.$post(`/api/admin/student/address/${uid}`,json)
export const addAddressListApi = function (uid, json) {
return Vue.prototype.$post(`/api/admin/student/address/${uid}`, json)
};
//用户当前亲情号
export const getSubAccountInfoApi = function (uid) {
......@@ -1104,11 +1104,11 @@ export const getUserSubAccountListApi = function (uid) {
};
//绑定子账号列表
export const getSubAccountListApi = function (json) {
return Vue.prototype.$fetch(`/api/admin/student/bind/list`,json)
return Vue.prototype.$fetch(`/api/admin/student/bind/list`, json)
};
//自化体验课列表
export const getAutomationListApi = function (json) {
return Vue.prototype.$fetch(`/api/admin/automation/list`,json)
return Vue.prototype.$fetch(`/api/admin/automation/list`, json)
};
//添加期数(云集)
export const addyunjiPeriodApi = function (period_id) {
......@@ -1120,11 +1120,11 @@ export const getOrderTypeApi = function () {
};
//用户看课记录
export const getWatchRecordApi = function (json) {
return Vue.prototype.$fetch(`/api/admin/student/teacher/watch`,json)
return Vue.prototype.$fetch(`/api/admin/student/teacher/watch`, json)
};
//修改优惠券过期时间
export const editCouponDeadlineApi = function (json,coupon_id) {
return Vue.prototype.$put(`/api/admin/order/coupon/deadline/${coupon_id}`,json)
export const editCouponDeadlineApi = function (json, coupon_id) {
return Vue.prototype.$put(`/api/admin/order/coupon/deadline/${coupon_id}`, json)
};
//添加星星活动期数
export const addStarActivityPeriodApi = function (periods_id) {
......@@ -1148,18 +1148,23 @@ export const getYunjiActivityPeriodApi = function () {
};
//待发货列表
export const getDeliverListApi = function (json) {
return Vue.prototype.$fetch(`api/admin/order/deliver/list`,json)
return Vue.prototype.$fetch(`api/admin/order/deliver/list`, json)
};
//主题列表
export const getThemeListApi = function (json) {
return Vue.prototype.$fetch(`api/admin/course/theme/list`,json)
return Vue.prototype.$fetch(`api/admin/course/theme/list`, json)
};
//待发货列表
export const editDeliverAddressApi = function (deliver_id,json) {
return Vue.prototype.$put(`/api/admin/order/deliver/edit/${deliver_id}`,json)
export const editDeliverAddressApi = function (deliver_id, json) {
return Vue.prototype.$put(`/api/admin/order/deliver/edit/${deliver_id}`, json)
};
//待发货列表
export const getDeliverRecordApi = function (json) {
return Vue.prototype.$fetch(`/api/admin/student/deliver/record/list`,json)
return Vue.prototype.$fetch(`/api/admin/student/deliver/record/list`, json)
};
//获取转化渠道列表
const getchannelTransListUrl = `${_baseUrl}api/admin/channel/conversion/list`;
export const getchannelTransListApi = function (json) {
return Vue.prototype.$fetch(getchannelTransListUrl, json)
};
// /api/admin/student/deliver/record/list
\ No newline at end of file
......@@ -37,7 +37,7 @@ export default [{
name: 'shop',
component: e => require(['@/components/shop'], e),
},
}, ]
},]
}, {
name: '',
value: '期数管理',
......@@ -53,49 +53,49 @@ export default [{
component: e => require(['@/components/periods'], e),
}
},
{
value: '班级列表',
routerName: 'class',
{
value: '班级列表',
routerName: 'class',
path: '/class',
cover: '2-3',
router: {
path: '/class',
cover: '2-3',
router: {
path: '/class',
name: 'class',
component: e => require(['@/components/class'], e),
}
},{
value: '市场招生统计',
routerName: 'marketStatistics',
name: 'class',
component: e => require(['@/components/class'], e),
}
}, {
value: '市场招生统计',
routerName: 'marketStatistics',
path: '/marketStatistics',
cover: '2-5',
router: {
path: '/marketStatistics',
cover: '2-5',
router: {
path: '/marketStatistics',
name: 'marketStatistics',
component: e => require(['@/components/marketStatistics'], e),
}
},
{
value: '不上课日期',
routerName: 'noLesson',
name: 'marketStatistics',
component: e => require(['@/components/marketStatistics'], e),
}
},
{
value: '不上课日期',
routerName: 'noLesson',
path: '/noLesson',
cover: '2-4',
router: {
path: '/noLesson',
cover: '2-4',
router: {
path: '/noLesson',
name: 'noLesson',
component: e => require(['@/components/noLesson'], e),
}
},
{
value: '自化课列表',
routerName: 'autoClass',
name: 'noLesson',
component: e => require(['@/components/noLesson'], e),
}
},
{
value: '自化课列表',
routerName: 'autoClass',
path: '/autoClass',
cover: '2-6',
router: {
path: '/autoClass',
cover: '2-6',
router: {
path: '/autoClass',
name: 'autoClass',
component: e => require(['@/components/autoClass'], e),
}
},
name: 'autoClass',
component: e => require(['@/components/autoClass'], e),
}
},
]
}, {
name: '',
......@@ -111,7 +111,7 @@ export default [{
name: 'teacher',
component: e => require(['@/components/teacher'], e),
}
},{
}, {
value: '月课订单列表',
routerName: 'monthOrder',
path: '/monthOrder',
......@@ -122,17 +122,17 @@ export default [{
component: e => require(['@/components/monthOrder'], e),
}
},
{
value: '月课订单统计',
routerName: 'monthOrderCount',
{
value: '月课订单统计',
routerName: 'monthOrderCount',
path: '/monthOrderCount',
cover: '5-12',
router: {
path: '/monthOrderCount',
cover: '5-12',
router: {
path: '/monthOrderCount',
name: 'monthOrderCount',
component: e => require(['@/components/orderCount/monthOrderCount'], e),
}
},{
name: 'monthOrderCount',
component: e => require(['@/components/orderCount/monthOrderCount'], e),
}
}, {
value: '退款列表',
routerName: 'refund',
path: '/refund',
......@@ -142,7 +142,7 @@ export default [{
name: 'refund',
component: e => require(['@/components/refund'], e),
}
},{
}, {
value: '业绩排行',
routerName: 'achievement',
path: '/achievement',
......@@ -152,7 +152,7 @@ export default [{
name: 'achievement',
component: e => require(['@/components/achievement'], e),
}
},{
}, {
value: '话术列表',
routerName: 'talkingSkill',
path: '/talkingSkill',
......@@ -164,7 +164,7 @@ export default [{
}
},]
},
{
{
name: '',
value: '用户管理',
icon: 'icon-laoshi',
......@@ -215,22 +215,23 @@ export default [{
},
]
},
{
{
name: '',
value: '订单管理',
icon: 'icon-dingdan',
list: [{
value: '日课订单列表',
routerName: 'order',
path: '/order',
cover: '5-1',
router: {
list: [
{
value: '日课订单列表',
routerName: 'order',
path: '/order',
name: 'order',
component: e => require(['@/components/order'], e),
}
},
{
cover: '5-1',
router: {
path: '/order',
name: 'order',
component: e => require(['@/components/order'], e),
}
},
{
value: '提现列表',
routerName: 'putForward',
path: '/putForward',
......@@ -251,7 +252,8 @@ export default [{
name: 'consignment',
component: e => require(['@/components/consignment'], e),
}
}, {
},
{
value: '订单统计',
routerName: 'orderCount',
path: '/orderCount',
......@@ -261,7 +263,8 @@ export default [{
name: 'orderCount',
component: e => require(['@/components/orderCount/index'], e),
}
},{
},
{
value: '日课订单统计',
routerName: 'dayOrderCount',
path: '/dayOrderCount',
......@@ -305,7 +308,6 @@ export default [{
component: e => require(['@/components/yunji'], e),
}
},
{
value: '兑换码管理',
routerName: 'exchange',
......@@ -316,10 +318,10 @@ export default [{
name: 'exchange',
component: e => require(['@/components/exchange'], e),
}
},
}
]
},
{
{
name: '',
value: '实物管理',
icon: 'icon-shu',
......@@ -334,28 +336,28 @@ export default [{
component: e => require(['@/components/single'], e),
}
},
{
value: '盒子列表',
routerName: 'box',
{
value: '盒子列表',
routerName: 'box',
path: '/box',
cover: '6-2',
router: {
path: '/box',
cover: '6-2',
router: {
path: '/box',
name: 'box',
component: e => require(['@/components/box'], e),
}
},
{
value: '待发货列表',
routerName: 'logistics',
name: 'box',
component: e => require(['@/components/box'], e),
}
},
{
value: '待发货列表',
routerName: 'logistics',
path: '/logistics',
cover: '6-3',
router: {
path: '/logistics',
cover: '6-3',
router: {
path: '/logistics',
name: 'logistics',
component: e => require(['@/components/logistics'], e),
}
},
name: 'logistics',
component: e => require(['@/components/logistics'], e),
}
},
]
}, {
name: '',
......@@ -372,97 +374,114 @@ export default [{
component: e => require(['@/components/weChat/focusReply'], e),
}
},
{
value: '关键词回复',
routerName: 'autoReply',
{
value: '关键词回复',
routerName: 'autoReply',
path: '/autoReply',
cover: '7-2',
router: {
path: '/autoReply',
cover: '7-2',
router: {
path: '/autoReply',
name: 'autoReply',
component: e => require(['@/components/weChat/autoReply'], e),
}
name: 'autoReply',
component: e => require(['@/components/weChat/autoReply'], e),
}
},
{
value: '公众号菜单',
routerName: 'weChat',
},
{
value: '公众号菜单',
routerName: 'weChat',
path: '/weChat',
cover: '7-3',
router: {
path: '/weChat',
cover: '7-3',
router: {
path: '/weChat',
name: 'weChat',
component: e => require(['@/components/weChat'], e),
}
},
{
value: '素材管理',
routerName: 'weChatResource',
name: 'weChat',
component: e => require(['@/components/weChat'], e),
}
},
{
value: '素材管理',
routerName: 'weChatResource',
path: '/weChatResource',
cover: '7-4',
router: {
path: '/weChatResource',
cover: '7-4',
router: {
path: '/weChatResource',
name: 'weChatResource',
component: e => require(['@/components/weChat/weChatResource'], e),
}
},
{
value: '二维码管理',
routerName: 'qrcode',
name: 'weChatResource',
component: e => require(['@/components/weChat/weChatResource'], e),
}
},
{
value: '二维码管理',
routerName: 'qrcode',
path: '/qrcode',
cover: '7-6',
router: {
path: '/qrcode',
cover: '7-6',
router: {
path: '/qrcode',
name: 'qrcode',
component: e => require(['@/components/qrcode'], e),
}
},
{
value: '群发助手',
routerName: 'groupSend',
name: 'qrcode',
component: e => require(['@/components/qrcode'], e),
}
},
{
value: '群发助手',
routerName: 'groupSend',
path: '/groupSend',
cover: '7-7',
router: {
path: '/groupSend',
cover: '7-7',
router: {
path: '/groupSend',
name: 'groupSend',
component: e => require(['@/components/groupSend'], e),
}
},
{
value: '关注取关统计',
routerName: 'watchCount',
name: 'groupSend',
component: e => require(['@/components/groupSend'], e),
}
},
{
value: '关注取关统计',
routerName: 'watchCount',
path: '/watchCount',
cover: '7-8',
router: {
path: '/watchCount',
cover: '7-8',
router: {
path: '/watchCount',
name: 'watchCount',
component: e => require(['@/components/watchCount'], e),
}
},
{
value: '微信统计',
routerName: 'weChatStatistics',
name: 'watchCount',
component: e => require(['@/components/watchCount'], e),
}
},
{
value: '微信统计',
routerName: 'weChatStatistics',
path: '/weChatStatistics',
cover: '7-10',
router: {
path: '/weChatStatistics',
cover: '7-10',
router: {
path: '/weChatStatistics',
name: 'weChatStatistics',
component: e => require(['@/components/weChatStatistics'], e),
}
},
{
value: '测试',
routerName: 'test',
name: 'weChatStatistics',
component: e => require(['@/components/weChatStatistics'], e),
}
},
{
value: '测试',
routerName: 'test',
path: '/test',
cover: '7-11',
router: {
path: '/test',
cover: '7-11',
router: {
path: '/test',
name: 'test',
component: e => require(['@/components/weChat/test'], e),
}
},
name: 'test',
component: e => require(['@/components/weChat/test'], e),
}
},
]
}, {
},
{
name: '',
value: '教研管理',
icon: 'icon-material',
list: [{
value: '教材列表',
routerName: 'resources',
path: '/resources',
cover: '1-1',
router: {
path: '/resources',
name: 'resources',
component: e => require(['@/components/resources'], e),
}
}]
},
{
name: '',
value: '系统管理',
icon: 'icon-xitongquanxian',
......@@ -487,100 +506,119 @@ export default [{
component: e => require(['@/components/externalLaunch'], e),
}
},
{
value: '来源码管理',
routerName: 'sourceManage',
{
value: '来源码管理',
routerName: 'sourceManage',
path: '/sourceManage',
cover: '10-1',
router: {
path: '/sourceManage',
cover: '10-1',
router: {
path: '/sourceManage',
name: 'sourceManage',
component: e => require(['@/components/sourceManage'], e),
}
},
{
value: '短信发送记录',
routerName: 'smsRecord',
name: 'sourceManage',
component: e => require(['@/components/sourceManage'], e),
}
},
{
value: '短信发送记录',
routerName: 'smsRecord',
path: '/smsRecord',
cover: '10-2',
router: {
path: '/smsRecord',
cover: '10-2',
router: {
path: '/smsRecord',
name: 'smsRecord',
component: e => require(['@/components/smsRecord'], e),
}
},
{
value: '系统配置',
routerName: 'config',
name: 'smsRecord',
component: e => require(['@/components/smsRecord'], e),
}
},
{
value: '系统配置',
routerName: 'config',
path: '/config',
cover: '10-3',
router: {
path: '/config',
cover: '10-3',
name: 'config',
component: e => require(['@/components/config'], e),
}
},
]
},
{
name: '',
value: '数据管理',
icon: 'icon-shezhi',
list: [
{
value: '渠道转化列表',
routerName: 'channelTransList',
path: '/channelTransList',
cover: '9-1',
router: {
path: '/config',
name: 'config',
component: e => require(['@/components/config'], e),
path: '/channelTransList',
name: 'channelTransList',
component: e => require(['@/components/channelTransList'], e),
}
},
}
]
},
{
name: '',
value: '后台管理',
icon: 'icon-shezhi',
list: [{
value: '账号管理',
routerName: 'admin',
{
name: '',
value: '后台管理',
icon: 'icon-shezhi',
list: [{
value: '账号管理',
routerName: 'admin',
path: '/admin',
cover: '8-1',
router: {
path: '/admin',
cover: '8-1',
router: {
path: '/admin',
name: 'admin',
component: e => require(['@/components/system/admin'], e),
}
}, {
value: '角色管理',
routerName: 'role',
name: 'admin',
component: e => require(['@/components/system/admin'], e),
}
}, {
value: '角色管理',
routerName: 'role',
path: '/role',
cover: '8-2',
router: {
path: '/role',
cover: '8-2',
router: {
path: '/role',
name: 'role',
component: e => require(['@/components/system/role'], e),
}
}, {
value: '菜单管理',
routerName: 'menu',
name: 'role',
component: e => require(['@/components/system/role'], e),
}
}, {
value: '菜单管理',
routerName: 'menu',
path: '/menu',
cover: '8-3',
router: {
path: '/menu',
cover: '8-3',
router: {
path: '/menu',
name: 'menu',
component: e => require(['@/components/system/menu'], e),
}
}, {
value: '系统配置',
routerName: 'sysConfig',
name: 'menu',
component: e => require(['@/components/system/menu'], e),
}
}, {
value: '系统配置',
routerName: 'sysConfig',
path: '/sysConfig',
cover: '8-4',
router: {
path: '/sysConfig',
cover: '8-4',
router: {
path: '/sysConfig',
name: 'sysConfig',
component: e => require(['@/components/system/sysConfig'], e),
}
name: 'sysConfig',
component: e => require(['@/components/system/sysConfig'], e),
}
},
{
value: '操作日志',
routerName: 'adminLog',
path: '/adminLog',
cover: '8-5',
router: {
path: '/adminLog',
name: 'adminLog',
component: e => require(['@/components/system/adminLog'], e),
}
}
]
},
{
value: '操作日志',
routerName: 'adminLog',
path: '/adminLog',
cover: '8-5',
router: {
path: '/adminLog',
name: 'adminLog',
component: e => require(['@/components/system/adminLog'], e),
}
}
]
}
]
// {
// name: '',
......
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