Commit 4622dd7a authored by 赵茹林's avatar 赵茹林

新增 导出完课用户

新增 数据管理更新时间
新增 设备移交原因
新增 用户转移
更新 期数名称3个
优化 选择用户样式
parent 230fd530
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
</el-form-item> </el-form-item>
<el-form-item style="float: right"> <el-form-item style="float: right">
<div class="search-btn-wrapper"> <div class="search-btn-wrapper">
<el-button @click="onAdd" type="success" v-if="!$store.state.readonly">+添加班级</el-button> <el-button @click="onExport" type="primary" v-if="$store.state.export" plain>导出完课用户</el-button>
<el-button @click="onAdd" type="success" v-if="!$store.state.readonly">添加班级</el-button>
<el-button type="success" @click="sendMsg">发送活动通知</el-button> <el-button type="success" @click="sendMsg">发送活动通知</el-button>
</div> </div>
</el-form-item> </el-form-item>
...@@ -159,7 +160,8 @@ import { ...@@ -159,7 +160,8 @@ import {
getDefaultPeriodsApi, getDefaultPeriodsApi,
postActiveNoticeApi, postActiveNoticeApi,
getConfigListApi, getConfigListApi,
getSourceStudentApi getSourceStudentApi,
exportExcelApi
} from "../../service/api"; } from "../../service/api";
import classDialog from "./dialog"; import classDialog from "./dialog";
import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook"; import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook";
...@@ -506,6 +508,12 @@ export default { ...@@ -506,6 +508,12 @@ export default {
}); });
}); });
}, },
onExport() {
let json = {
periods_id: this.selectedGoods[1]
};
exportExcelApi("/api/admin/periods/finish/user/export", json);
},
onAdd() { onAdd() {
this.dialogObj = { this.dialogObj = {
show: true, show: true,
......
<template> <template>
<div class="channel-trans-list"> <div class="channel-trans-list">
<el-form ref="searchFrom" :model="searchFrom" label-width="100px" inline> <el-form ref="searchFrom" :model="searchFrom" label-width="100px" inline>
<el-form-item label="更新时间">
{{updateTime ? updateTime : '-'}}
</el-form-item>
<el-form-item label="进量日期"> <el-form-item label="进量日期">
<el-date-picker <el-date-picker
v-model="searchFrom.payTime" v-model="searchFrom.payTime"
...@@ -121,7 +124,8 @@ ...@@ -121,7 +124,8 @@
import { import {
getChannelConversionListApi, getChannelConversionListApi,
getGoodsListApi, getGoodsListApi,
getConfigListApi getConfigListApi,
getUpdateTimeApi
} from "../../service/api"; } from "../../service/api";
import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook"; import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook";
import { tipArr2 } from "../../util/tipArr"; import { tipArr2 } from "../../util/tipArr";
...@@ -131,6 +135,7 @@ export default { ...@@ -131,6 +135,7 @@ export default {
name: "channelConversionList", name: "channelConversionList",
data() { data() {
return { return {
updateTime: '',
typeList:[], typeList:[],
width: 0, width: 0,
nowPage: 1, nowPage: 1,
...@@ -186,7 +191,6 @@ export default { ...@@ -186,7 +191,6 @@ export default {
]; ];
} }
}, },
propertyList: [],
spanArr: [], spanArr: [],
contentSpanArr: [], contentSpanArr: [],
searchFrom: { searchFrom: {
...@@ -430,11 +434,19 @@ export default { ...@@ -430,11 +434,19 @@ export default {
this.list = []; this.list = [];
} }
}); });
},
getUpdateTime() {
getUpdateTimeApi().then(res => {
if (res.time) {
this.updateTime = res.time
}
})
} }
}, },
mounted() { mounted() {
this.getChannelTransList(); this.getChannelTransList();
this.getGoodsOption(); this.getGoodsOption();
this.getUpdateTime()
// this.getGoodsList(); // this.getGoodsList();
} }
}; };
......
<template> <template>
<div class="channel-trans-list"> <div class="channel-trans-list">
<el-form ref="searchFrom" :model="searchFrom" label-width="100px" inline> <el-form ref="searchFrom" :model="searchFrom" label-width="100px" inline>
<el-form-item label="更新时间">
{{updateTime ? updateTime : '-'}}
</el-form-item>
<el-form-item label="进量日期"> <el-form-item label="进量日期">
<el-date-picker <el-date-picker
v-model="searchFrom.payTime" v-model="searchFrom.payTime"
...@@ -140,7 +144,8 @@ ...@@ -140,7 +144,8 @@
import { import {
getChannelGoodsConversionListApi, getChannelGoodsConversionListApi,
getGoodsListApi, getGoodsListApi,
getConfigListApi getConfigListApi,
getUpdateTimeApi
} from "../../service/api"; } from "../../service/api";
import page from "../framework/page"; import page from "../framework/page";
import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook"; import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook";
...@@ -149,6 +154,7 @@ export default { ...@@ -149,6 +154,7 @@ export default {
name: "channelGoodsConversionList", name: "channelGoodsConversionList",
data() { data() {
return { return {
updateTime: '',
typeList:[], typeList:[],
width: 0, width: 0,
nowPage: 1, nowPage: 1,
...@@ -480,13 +486,21 @@ export default { ...@@ -480,13 +486,21 @@ export default {
this.list = []; this.list = [];
} }
}); });
},
getUpdateTime() {
getUpdateTimeApi().then(res => {
if (res.time) {
this.updateTime = res.time
}
})
} }
}, },
mounted() { mounted() {
this.getChannelTransList(); this.getChannelTransList();
// this.getPeriodsList(); // this.getPeriodsList();
// this.getGoodsList(); // this.getGoodsList();
this.getGoodsOption() this.getGoodsOption();
this.getUpdateTime()
} }
}; };
</script> </script>
......
<template> <template>
<div class="channel-trans-list"> <div class="channel-trans-list">
<el-form ref="searchFrom" :model="searchFrom" label-width="100px" inline> <el-form ref="searchFrom" :model="searchFrom" label-width="100px" inline>
<el-form-item label="更新时间">
{{updateTime ? updateTime : '-'}}
</el-form-item>
<el-form-item label="进量日期"> <el-form-item label="进量日期">
<el-date-picker <el-date-picker
v-model="searchFrom.payTime" v-model="searchFrom.payTime"
...@@ -156,7 +159,8 @@ import { ...@@ -156,7 +159,8 @@ import {
getGoodsListApi, getGoodsListApi,
exportExcelApi, exportExcelApi,
getPeriodsOtherListApi, getPeriodsOtherListApi,
getConfigListApi getConfigListApi,
getUpdateTimeApi
} from "../../service/api"; } from "../../service/api";
import page from "../framework/page"; import page from "../framework/page";
import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook"; import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook";
...@@ -165,6 +169,7 @@ export default { ...@@ -165,6 +169,7 @@ export default {
name: "channelTransList", name: "channelTransList",
data() { data() {
return { return {
updateTime: '',
typeList:[], typeList:[],
width: 0, width: 0,
nowPage: 1, nowPage: 1,
...@@ -559,6 +564,13 @@ export default { ...@@ -559,6 +564,13 @@ export default {
this.list = []; this.list = [];
} }
}); });
},
getUpdateTime() {
getUpdateTimeApi().then(res => {
if (res.time) {
this.updateTime = res.time
}
})
} }
}, },
mounted() { mounted() {
...@@ -567,6 +579,7 @@ export default { ...@@ -567,6 +579,7 @@ export default {
// this.getPeriodsList(); // this.getPeriodsList();
this.getGoodsList(); this.getGoodsList();
this.getPeriodsOtherList(); this.getPeriodsOtherList();
this.getUpdateTime();
} }
}; };
</script> </script>
......
<template> <template>
<div style="padding-top: 20px;"> <div style="padding-top: 20px;">
<el-form ref="searchFrom" class="searchFrom" :model="searchFrom" label-width="100px" inline> <el-form ref="searchFrom" class="searchFrom" :model="searchFrom" label-width="100px" inline>
<el-form-item label="更新时间">
{{updateTime ? updateTime : '-'}}
</el-form-item>
<el-form-item label="进量日期"> <el-form-item label="进量日期">
<el-date-picker <el-date-picker
v-model="searchFrom.payTime" v-model="searchFrom.payTime"
...@@ -94,11 +97,12 @@ ...@@ -94,11 +97,12 @@
</template> </template>
<script> <script>
import { getMarketEnrollmentConversionListApi,getPeriodsOtherListApi } from "../../service/api"; import { getMarketEnrollmentConversionListApi,getPeriodsOtherListApi,getUpdateTimeApi } from "../../service/api";
export default { export default {
name: "index", name: "index",
data() { data() {
return { return {
updateTime: '',
list: [], list: [],
dateList: [], dateList: [],
propertyList: [ propertyList: [
...@@ -307,11 +311,19 @@ export default { ...@@ -307,11 +311,19 @@ export default {
// colspan: 1 // colspan: 1
// }; // };
// } // }
},
getUpdateTime() {
getUpdateTimeApi().then(res => {
if (res.time) {
this.updateTime = res.time
}
})
} }
}, },
created() { created() {
this.getList(); this.getList();
this.getPeriodsOtherList() this.getPeriodsOtherList();
this.getUpdateTime()
} }
}; };
</script> </script>
......
<template> <template>
<div class="channel-trans-list"> <div class="channel-trans-list">
<el-form ref="searchFrom" :model="searchFrom" label-width="100px" inline> <el-form ref="searchFrom" :model="searchFrom" label-width="100px" inline>
<el-form-item label="更新时间">
{{updateTime ? updateTime : '-'}}
</el-form-item>
<el-form-item label="进量日期"> <el-form-item label="进量日期">
<el-date-picker <el-date-picker
v-model="searchFrom.payTime" v-model="searchFrom.payTime"
...@@ -140,7 +143,7 @@ ...@@ -140,7 +143,7 @@
</div> </div>
</template> </template>
<script> <script>
import { getPeriodsConversionListApi, getGoodsListApi, getPeriodsOtherListApi, getTeacherListApi } from "../../service/api"; import { getPeriodsConversionListApi, getGoodsListApi, getPeriodsOtherListApi, getTeacherListApi, getUpdateTimeApi } from "../../service/api";
import page from "../framework/page"; import page from "../framework/page";
import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook"; import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook";
import { tipArr3 } from "../../util/tipArr"; import { tipArr3 } from "../../util/tipArr";
...@@ -148,6 +151,7 @@ export default { ...@@ -148,6 +151,7 @@ export default {
name: "periodsConversionList", name: "periodsConversionList",
data() { data() {
return { return {
updateTime: '',
width: 0, width: 0,
nowPage: 1, nowPage: 1,
total: 0, total: 0,
...@@ -577,6 +581,13 @@ export default { ...@@ -577,6 +581,13 @@ export default {
this.list = []; this.list = [];
} }
}); });
},
getUpdateTime() {
getUpdateTimeApi().then(res => {
if (res.time) {
this.updateTime = res.time
}
})
} }
}, },
mounted() { mounted() {
...@@ -584,7 +595,8 @@ export default { ...@@ -584,7 +595,8 @@ export default {
// this.getPeriodsList(); // this.getPeriodsList();
this.getGoodsList(); this.getGoodsList();
this.getPeriodsOtherList(); this.getPeriodsOtherList();
this.getTeacherList() this.getTeacherList();
this.getUpdateTime()
} }
}; };
</script> </script>
......
<template> <template>
<div class="channel-trans-list"> <div class="channel-trans-list">
<el-form ref="searchFrom" :model="searchFrom" label-width="100px" inline> <el-form ref="searchFrom" :model="searchFrom" label-width="100px" inline>
<el-form-item label="更新时间">
{{updateTime ? updateTime : '-'}}
</el-form-item>
<el-form-item label="进量日期"> <el-form-item label="进量日期">
<el-date-picker <el-date-picker
v-model="searchFrom.payTime" v-model="searchFrom.payTime"
...@@ -99,7 +102,8 @@ ...@@ -99,7 +102,8 @@
import { import {
getSquadConversionListApi, getSquadConversionListApi,
getGoodsListApi, getGoodsListApi,
getPeriodsOtherListApi getPeriodsOtherListApi,
getUpdateTimeApi
} from "../../service/api"; } from "../../service/api";
import page from "../framework/page"; import page from "../framework/page";
import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook"; import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook";
...@@ -108,6 +112,7 @@ export default { ...@@ -108,6 +112,7 @@ export default {
name: "squadConversionList", name: "squadConversionList",
data() { data() {
return { return {
updateTime: '',
width: 0, width: 0,
nowPage: 1, nowPage: 1,
total: 0, total: 0,
...@@ -162,7 +167,6 @@ export default { ...@@ -162,7 +167,6 @@ export default {
]; ];
} }
}, },
propertyList: [],
spanArr: [], spanArr: [],
contentSpanArr: [], contentSpanArr: [],
searchFrom: { searchFrom: {
...@@ -454,12 +458,20 @@ export default { ...@@ -454,12 +458,20 @@ export default {
this.list = []; this.list = [];
} }
}); });
},
getUpdateTime() {
getUpdateTimeApi().then(res => {
if (res.time) {
this.updateTime = res.time
}
})
} }
}, },
mounted() { mounted() {
this.getChannelTransList(); this.getChannelTransList();
this.getGoodsList(); this.getGoodsList();
this.getPeriodsOtherList() this.getPeriodsOtherList();
this.getUpdateTime()
} }
}; };
</script> </script>
......
<template> <template>
<div class="channel-trans-list"> <div class="channel-trans-list">
<el-form ref="searchFrom" :model="searchFrom" label-width="100px" inline> <el-form ref="searchFrom" :model="searchFrom" label-width="100px" inline>
<el-form-item label="更新时间">
{{updateTime ? updateTime : '-'}}
</el-form-item>
<el-form-item label="进量日期"> <el-form-item label="进量日期">
<el-date-picker <el-date-picker
v-model="searchFrom.payTime" v-model="searchFrom.payTime"
...@@ -103,7 +106,8 @@ ...@@ -103,7 +106,8 @@
import { import {
getTeacherConversionListApi, getTeacherConversionListApi,
getGoodsListApi, getGoodsListApi,
getPeriodsOtherListApi getPeriodsOtherListApi,
getUpdateTimeApi
} from "../../service/api"; } from "../../service/api";
import page from "../framework/page"; import page from "../framework/page";
import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook"; import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook";
...@@ -112,6 +116,7 @@ export default { ...@@ -112,6 +116,7 @@ export default {
name: "teacherConversionList", name: "teacherConversionList",
data() { data() {
return { return {
updateTime: '',
width: 0, width: 0,
nowPage: 1, nowPage: 1,
total: 0, total: 0,
...@@ -181,7 +186,6 @@ export default { ...@@ -181,7 +186,6 @@ export default {
teacher_id: "", teacher_id: "",
periods_title: "" periods_title: ""
}, },
propertyList: [],
watchList: [ watchList: [
{ id: 0, title: 5 }, { id: 0, title: 5 },
{ id: 1, title: 6 }, { id: 1, title: 6 },
...@@ -457,12 +461,20 @@ export default { ...@@ -457,12 +461,20 @@ export default {
this.list = []; this.list = [];
} }
}); });
},
getUpdateTime() {
getUpdateTimeApi().then(res => {
if (res.time) {
this.updateTime = res.time
}
})
} }
}, },
mounted() { mounted() {
this.getChannelTransList(); this.getChannelTransList();
this.getPeriodsOtherList(); this.getPeriodsOtherList();
this.getGoodsList(); this.getGoodsList();
this.getUpdateTime();
} }
}; };
</script> </script>
......
<template> <template>
<div class="channel-trans-list"> <div class="channel-trans-list">
<el-form ref="searchFrom" :model="searchFrom" label-width="100px" inline> <el-form ref="searchFrom" :model="searchFrom" label-width="100px" inline>
<el-form-item label="更新时间">
{{updateTime ? updateTime : '-'}}
</el-form-item>
<el-form-item label="进量日期"> <el-form-item label="进量日期">
<el-date-picker <el-date-picker
v-model="searchFrom.payTime" v-model="searchFrom.payTime"
...@@ -94,7 +97,7 @@ ...@@ -94,7 +97,7 @@
:style="{width: width+'px'}" :style="{width: width+'px'}"
fixed> fixed>
<!--<el-table-column prop="periods_title" label="期数名称"></el-table-column>--> <!--<el-table-column prop="periods_title" label="期数名称"></el-table-column>-->
<el-table-column prop="periods_title" label="期数名称" width="170px"> <el-table-column prop="periods_title" label="期数名称" width="180px">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-html="periodName(scope.row)"></div> <div v-html="periodName(scope.row)"></div>
</template> </template>
...@@ -103,8 +106,7 @@ ...@@ -103,8 +106,7 @@
prop="duration_over_at" prop="duration_over_at"
label="开课看课时间" label="开课看课时间"
style="font-size:12px;" style="font-size:12px;"
width="200" width="180">
>
<template slot-scope="scope"> <template slot-scope="scope">
开课日期:{{scope.row.start_at}} 开课日期:{{scope.row.start_at}}
<br> <br>
...@@ -151,7 +153,8 @@ import { ...@@ -151,7 +153,8 @@ import {
getTeacherPeriodsConversionListApi, getTeacherPeriodsConversionListApi,
getGoodsListApi, getGoodsListApi,
getPeriodsOtherListApi, getPeriodsOtherListApi,
getTeacherListApi getTeacherListApi,
getUpdateTimeApi
} from "../../service/api"; } from "../../service/api";
import page from "../framework/page"; import page from "../framework/page";
import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook"; import { GOODSTYPE, CLASSSOURCE } from "../../util/wordbook";
...@@ -160,6 +163,7 @@ export default { ...@@ -160,6 +163,7 @@ export default {
name: "teacherPeriodsConversionList", name: "teacherPeriodsConversionList",
data() { data() {
return { return {
updateTime: '',
width: 0, width: 0,
nowPage: 1, nowPage: 1,
total: 0, total: 0,
...@@ -594,6 +598,13 @@ export default { ...@@ -594,6 +598,13 @@ export default {
this.list = []; this.list = [];
} }
}); });
},
getUpdateTime() {
getUpdateTimeApi().then(res => {
if (res.time) {
this.updateTime = res.time
}
})
} }
}, },
mounted() { mounted() {
...@@ -601,6 +612,7 @@ export default { ...@@ -601,6 +612,7 @@ export default {
this.getPeriodsOtherList(); this.getPeriodsOtherList();
this.getGoodsList(); this.getGoodsList();
this.getTeacherList(); this.getTeacherList();
this.getUpdateTime();
} }
}; };
</script> </script>
......
<template> <template>
<div class="page-div"> <div class="page-div">
<el-pagination <el-pagination
:small="small"
@size-change="handleSizeChange" @size-change="handleSizeChange"
:page-sizes="[5, 10, 20, 30, 40, 50, 60, 80, 100]" :page-sizes="[5, 10, 20, 30, 40, 50, 60, 80, 100]"
:page-size="limit" :page-size="limit"
:current-page.sync="nowPage" :current-page.sync="nowPage"
layout="total , sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="total"> :total="total">
</el-pagination> </el-pagination>
</div> </div>
...@@ -14,21 +15,25 @@ ...@@ -14,21 +15,25 @@
<script> <script>
export default { export default {
name: "page", name: "page",
data() { data() {
return { return {
nowPage: 1 nowPage: 1
} }
}, },
props:{ props: {
'total' : { 'total': {
required: true required: true
}, },
'limit': { 'limit': {
default: 10 default: 10
},
'small': {
type: Boolean,
default: false
} }
}, },
watch:{ watch: {
nowPage(value){ nowPage(value) {
this.$emit("pageChange", value); this.$emit("pageChange", value);
} }
}, },
...@@ -42,7 +47,7 @@ ...@@ -42,7 +47,7 @@
</script> </script>
<style scoped> <style scoped>
.page-div{ .page-div {
display: block; display: block;
text-align: center; text-align: center;
} }
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
:label="'优惠券商品'" :label="'优惠券商品'"
:value="4"> :value="4">
</el-option> </el-option>
<el-option <el-option
:label="'实物商品'" :label="'实物商品'"
:value="5"> :value="5">
</el-option> </el-option>
...@@ -146,30 +146,30 @@ ...@@ -146,30 +146,30 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="form.goods_type==1||form.goods_type==2"> <el-row v-if="form.goods_type==1||form.goods_type==2">
<el-col :span="12" > <el-col :span="12">
<el-form-item label-width="120" label="课程标题(客户端展示)" required> <el-form-item label-width="120" label="课程标题(客户端展示)" required>
<el-input v-model="form.goods_desc.course_title" style="width:200px;" ></el-input> <el-input v-model="form.goods_desc.course_title" style="width:200px;"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否进入期数" label-width="160" required> <el-form-item label="是否进入期数" label-width="160" required>
<el-switch <el-switch
v-model="form.is_into_periods" v-model="form.is_into_periods"
:active-value="1" :active-value="1"
:inactive-value="0"> :inactive-value="0">
</el-switch> </el-switch>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item v-if="form.goods_type==4" label="领取到期时间(小时)" label-width="160px" > <el-form-item v-if="form.goods_type==4" label="领取到期时间(小时)" label-width="160px">
<el-input-number v-model="form.goods_desc.time_limit" ></el-input-number> <el-input-number v-model="form.goods_desc.time_limit"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item v-if="form.goods_type==1||form.goods_type==2" label="是否赠送优惠券" label-width="160px" > <el-form-item v-if="form.goods_type==1||form.goods_type==2" label="是否赠送优惠券" label-width="160px">
<el-select v-model="form.goods_desc.coupon_goods_id" placeholder="请选择"> <el-select v-model="form.goods_desc.coupon_goods_id" placeholder="请选择">
<el-option v-for="data in coupongoods" <el-option v-for="data in coupongoods"
:key="data.id" :key="data.id"
:label="data | filterGoods" :label="data | filterGoods"
:value="data.id"> :value="data.id">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -219,7 +219,8 @@ ...@@ -219,7 +219,8 @@
v-model="form.is_real" v-model="form.is_real"
:active-value="1" :active-value="1"
:inactive-value="0"> :inactive-value="0">
</el-switch> <span style="font-size: 12px;">打开后提示用户填写具体住址</span> </el-switch>
<span style="font-size: 12px;">打开后提示用户填写具体住址</span>
</el-form-item> </el-form-item>
<el-row v-if="form.goods_type === 1 "> <el-row v-if="form.goods_type === 1 ">
<el-col :span="12"> <el-col :span="12">
...@@ -256,7 +257,7 @@ ...@@ -256,7 +257,7 @@
</el-row> </el-row>
<el-row v-if="form.goods_type === 2"> <el-row v-if="form.goods_type === 2">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="成团人数(人)" > <el-form-item label="成团人数(人)">
<el-input-number v-model="form.desc.group_number" label="成团人数"></el-input-number> <el-input-number v-model="form.desc.group_number" label="成团人数"></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -266,7 +267,7 @@ ...@@ -266,7 +267,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="form.goods_type !== 3 || form.goods_type !== 5" required> <el-row v-if="form.goods_type !== 3 || form.goods_type !== 5" required>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="分享标题" required> <el-form-item label="分享标题" required>
<el-input v-model="form.share_desc.title"></el-input> <el-input v-model="form.share_desc.title"></el-input>
...@@ -302,7 +303,7 @@ ...@@ -302,7 +303,7 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="商品详情" required> <el-form-item label="商品详情" required>
<!-- <el-input type="textarea" :rows="25" v-model="form.desc.detail"></el-input> --> <!-- <el-input type="textarea" :rows="25" v-model="form.desc.detail"></el-input> -->
<editor-detail :lookData="form.desc" /> <editor-detail :lookData="form.desc"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -310,7 +311,7 @@ ...@@ -310,7 +311,7 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="购买须知" required> <el-form-item label="购买须知" required>
<!-- <el-input type="textarea" :rows="25" v-model="form.desc.qa"></el-input> --> <!-- <el-input type="textarea" :rows="25" v-model="form.desc.qa"></el-input> -->
<editor-know :lookData1="form.desc"/> <editor-know :lookData1="form.desc"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -325,150 +326,158 @@ ...@@ -325,150 +326,158 @@
</template> </template>
<script> <script>
import {getLessonApi,addGoodsApi,editGoodsApi,getGoodsDetailApi,uploadFileApi,getGoodsListApi} from "../../service/api"; import {
import {TEACHERTYPE,GOODSTYPE} from "../../util/wordbook"; getLessonApi,
import editorDetail from "./editorDetail" addGoodsApi,
import editorKnow from "./editorKnow" editGoodsApi,
getGoodsDetailApi,
uploadFileApi,
getGoodsListApi
} from "../../service/api";
import {TEACHERTYPE, GOODSTYPE} from "../../util/wordbook";
import editorDetail from "./editorDetail"
import editorKnow from "./editorKnow"
export default { export default {
name: "dialogObj", name: "dialogObj",
props:[ props: [
'dialogObj', 'dialogObj',
], ],
components: { // 引入组件 components: { // 引入组件
editorDetail, editorDetail,
editorKnow editorKnow
}, },
filters: { filters: {
filterGoods(val){ filterGoods(val) {
return '[' + GOODSTYPE[val.goods_type] + ']' + '[' +val.current_price / 100 + '元]' + val.name return '[' + GOODSTYPE[val.goods_type] + ']' + '[' + val.current_price / 100 + '元]' + val.name
} }
}, },
data(){ data() {
return{ return {
tiny:{ tiny: {
height:300 height: 300
}, },
sendObj:{ sendObj: {
content:'nihao' content: 'nihao'
}, },
loading:true, loading: true,
goodsYou:[], goodsYou: [],
goodsList:[], goodsList: [],
form:{ form: {
name:'', name: '',
goods_type:1, goods_type: 1,
goods_desc:{ goods_desc: {
desc:"", desc: "",
imgLesson:[], imgLesson: [],
img:[], img: [],
course_title:'', course_title: '',
time_limit:0 time_limit: 0
}, },
course_id :'', course_id: '',
course_type:0, course_type: 0,
watch_num:'', watch_num: '',
invite_earnings:0, invite_earnings: 0,
original_price:'', original_price: '',
current_price:'', current_price: '',
is_real:0, is_real: 0,
is_auth_user:0, is_auth_user: 0,
is_auth_teacher:0, is_auth_teacher: 0,
share_desc:{ share_desc: {
title:'', title: '',
content:'', content: '',
img:[], img: [],
refImg:[] refImg: []
}, },
desc:{ desc: {
detail:"", detail: "",
qa:"", qa: "",
customer_service:[], customer_service: [],
after_goods_id:'', after_goods_id: '',
before_goods_id:'' before_goods_id: ''
}, },
is_into_periods:'0' is_into_periods: '0'
}, },
lessonList:[], lessonList: [],
goOn_goods_Id:{ goOn_goods_Id: {
after_goods_id:'', after_goods_id: '',
before_goods_id:'' before_goods_id: ''
}, },
coupongoods:[], coupongoods: [],
false:false false: false
} }
}, },
methods:{ methods: {
goodsChange(){ goodsChange() {
if(this.form.goods_type==4||this.form.goods_type==3){ if (this.form.goods_type == 4 || this.form.goods_type == 3) {
let json = { let json = {
limit: '999', limit: '999',
page: '1', page: '1',
goods_type:'1,2', goods_type: '1,2',
status:"1" status: "1"
}; };
getGoodsListApi(json).then(res=>{ getGoodsListApi(json).then(res => {
console.log(json) console.log(json)
// debugger // debugger
this.goodsList = res.list this.goodsList = res.list
}); });
}else if(this.form.goods_type==1||this.form.goods_type==2){ } else if (this.form.goods_type == 1 || this.form.goods_type == 2) {
// debugger // debugger
let json = { let json = {
limit: '999', limit: '999',
page: '1', page: '1',
goods_type:'4', goods_type: '4',
}; };
getGoodsListApi(json).then(res=>{ getGoodsListApi(json).then(res => {
console.log(res) console.log(res)
// debugger // debugger
let item = { let item = {
name:'不赠送', name: '不赠送',
id:'0', id: '0',
goods_type:4, goods_type: 4,
course_type:0, course_type: 0,
current_price:0 current_price: 0
} }
this.coupongoods = res.list this.coupongoods = res.list
this.coupongoods.unshift(item) this.coupongoods.unshift(item)
}); });
} }
}, },
sub(){ sub() {
console.log(this.form) console.log(this.form)
if(!this.form.share_desc.img&&this.form.goods_type==2){ if (!this.form.share_desc.img && this.form.goods_type == 2) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '请上传主图!' message: '请上传主图!'
}); });
return return
} }
let _json = JSON.parse(JSON.stringify(this.form)+''); let _json = JSON.parse(JSON.stringify(this.form) + '');
console.log(this.form) console.log(this.form)
// debugger // debugger
if(_json.goods_type === 3 || _json.goods_type === 4 || _json.goods_type === 5){ if (_json.goods_type === 3 || _json.goods_type === 4 || _json.goods_type === 5) {
_json.course_id=0; _json.course_id = 0;
_json.watch_num = 0; _json.watch_num = 0;
} }
if(_json.goods_type === 5){ if (_json.goods_type === 5) {
_json.is_real=1; _json.is_real = 1;
} }
_json.desc.before_goods_id = this.goOn_goods_Id.before_goods_id; _json.desc.before_goods_id = this.goOn_goods_Id.before_goods_id;
if(this.goodsYou.length < 1){ if (this.goodsYou.length < 1) {
_json.desc.use_goods_ids = '' _json.desc.use_goods_ids = ''
}else{ } else {
_json.desc.use_goods_ids = this.goodsYou.toString() _json.desc.use_goods_ids = this.goodsYou.toString()
} }
_json.desc.after_goods_id = this.goOn_goods_Id.after_goods_id; _json.desc.after_goods_id = this.goOn_goods_Id.after_goods_id;
_json.original_price = (_json.original_price*100).toFixed(0); _json.original_price = (_json.original_price * 100).toFixed(0);
_json.current_price = (_json.current_price*100).toFixed(0); _json.current_price = (_json.current_price * 100).toFixed(0);
_json.invite_earnings = (_json.invite_earnings*100).toFixed(0); _json.invite_earnings = (_json.invite_earnings * 100).toFixed(0);
_json.goods_desc = JSON.stringify(_json.goods_desc); _json.goods_desc = JSON.stringify(_json.goods_desc);
_json.desc = JSON.stringify(_json.desc); _json.desc = JSON.stringify(_json.desc);
_json.share_desc = JSON.stringify(_json.share_desc); _json.share_desc = JSON.stringify(_json.share_desc);
switch(this.dialogObj.type){ switch (this.dialogObj.type) {
case 1: case 1:
editGoodsApi(this.dialogObj.id,_json).then(res=>{ editGoodsApi(this.dialogObj.id, _json).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '修改成功!' message: '修改成功!'
...@@ -478,8 +487,8 @@ ...@@ -478,8 +487,8 @@
}); });
break; break;
case 0: case 0:
console.log(_json) console.log(_json)
addGoodsApi(_json).then(res=>{ addGoodsApi(_json).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '新增成功!' message: '新增成功!'
...@@ -490,296 +499,349 @@ ...@@ -490,296 +499,349 @@
break break
} }
}, },
removeFileMain(a){ removeFileMain(a) {
let x = this.form.goods_desc.img.findIndex(i=>{return i.name === a.name}); let x = this.form.goods_desc.img.findIndex(i => {
this.form.goods_desc.img.splice(x,1); return i.name === a.name
});
this.form.goods_desc.img.splice(x, 1);
}, },
uploadFileLesson(a){ uploadFileLesson(a) {
this.$store.dispatch('setProgress',{type:'new',id:a.file.uid}); this.$store.dispatch('setProgress', {type: 'new', id: a.file.uid});
this.fileUid = a.file.uid; this.fileUid = a.file.uid;
uploadFileApi({file:a.file,type:'local'}).then(res=>{ uploadFileApi({file: a.file, type: 'local'}).then(res => {
this.form.goods_desc.imgLesson=[{name:res.url,url:process.env.IMAGE_URL_HEAD + res.url,title:'',lable:''}]; this.form.goods_desc.imgLesson = [{
name: res.url,
url: process.env.IMAGE_URL_HEAD + res.url,
title: '',
lable: ''
}];
this.$message({ this.$message({
message: '上传成功', message: '上传成功',
type: 'success' type: 'success'
}); });
}) })
}, },
removeFileLesson(){ removeFileLesson() {
this.form.goods_desc.imgLesson=[] this.form.goods_desc.imgLesson = []
}, },
uploadFileMain(a){ uploadFileMain(a) {
console.log(a) console.log(a)
// debugger // debugger
this.$store.dispatch('setProgress',{type:'new',id:a.file.uid}); this.$store.dispatch('setProgress', {type: 'new', id: a.file.uid});
this.fileUid = a.file.uid; this.fileUid = a.file.uid;
uploadFileApi({file:a.file,type:'local'}).then(res=>{ uploadFileApi({file: a.file, type: 'local'}).then(res => {
this.form.goods_desc.img.push({name:res.url,url:process.env.IMAGE_URL_HEAD + res.url,title:'',lable:''}); this.form.goods_desc.img.push({
name: res.url,
url: process.env.IMAGE_URL_HEAD + res.url,
title: '',
lable: ''
});
this.$message({ this.$message({
message: '上传成功', message: '上传成功',
type: 'success' type: 'success'
}); });
}) })
}, },
removeFileShareRef(){ removeFileShareRef() {
this.form.share_desc.refImg=[] this.form.share_desc.refImg = []
}, },
uploadFileMainShareRef(a){ uploadFileMainShareRef(a) {
this.$store.dispatch('setProgress',{type:'new',id:a.file.uid}); this.$store.dispatch('setProgress', {type: 'new', id: a.file.uid});
this.fileUid = a.file.uid; this.fileUid = a.file.uid;
uploadFileApi({file:a.file,type:'local'}).then(res=>{ uploadFileApi({file: a.file, type: 'local'}).then(res => {
this.$message({ this.$message({
message: '上传成功', message: '上传成功',
type: 'success' type: 'success'
}); });
if(this.form.share_desc.refImg){ if (this.form.share_desc.refImg) {
this.form.share_desc.refImg[0] = {name:res.url,url:process.env.IMAGE_URL_HEAD + res.url,title:'',lable:''} this.form.share_desc.refImg[0] = {
}else{ name: res.url,
this.form.share_desc.refImg=[]; url: process.env.IMAGE_URL_HEAD + res.url,
this.form.share_desc.refImg[0] = {name:res.url,url:process.env.IMAGE_URL_HEAD + res.url,title:'',lable:''} title: '',
lable: ''
}
} else {
this.form.share_desc.refImg = [];
this.form.share_desc.refImg[0] = {
name: res.url,
url: process.env.IMAGE_URL_HEAD + res.url,
title: '',
lable: ''
}
} }
}) })
}, },
uploadFileMainShare(a){ uploadFileMainShare(a) {
this.$store.dispatch('setProgress',{type:'new',id:a.file.uid}); this.$store.dispatch('setProgress', {type: 'new', id: a.file.uid});
this.fileUid = a.file.uid; this.fileUid = a.file.uid;
uploadFileApi({file:a.file,type:'local'}).then(res=>{ uploadFileApi({file: a.file, type: 'local'}).then(res => {
this.$message({ this.$message({
message: '上传成功', message: '上传成功',
type: 'success' type: 'success'
}); });
if(this.form.share_desc.img){ if (this.form.share_desc.img) {
this.form.share_desc.img[0] = {name:res.url,url:process.env.IMAGE_URL_HEAD + res.url,title:'',lable:''} this.form.share_desc.img[0] = {
}else{ name: res.url,
this.form.share_desc.img=[]; url: process.env.IMAGE_URL_HEAD + res.url,
this.form.share_desc.img[0] = {name:res.url,url:process.env.IMAGE_URL_HEAD + res.url,title:'',lable:''} title: '',
lable: ''
}
} else {
this.form.share_desc.img = [];
this.form.share_desc.img[0] = {
name: res.url,
url: process.env.IMAGE_URL_HEAD + res.url,
title: '',
lable: ''
}
} }
}) })
}, },
removeFileService(){ removeFileService() {
this.form.desc.customer_service=[]; this.form.desc.customer_service = [];
}, },
uploadFileMainService(a){ uploadFileMainService(a) {
this.$store.dispatch('setProgress',{type:'new',id:a.file.uid}); this.$store.dispatch('setProgress', {type: 'new', id: a.file.uid});
this.fileUid = a.file.uid; this.fileUid = a.file.uid;
uploadFileApi({file:a.file,type:'local'}).then(res=>{ uploadFileApi({file: a.file, type: 'local'}).then(res => {
this.$message({ this.$message({
message: '上传成功', message: '上传成功',
type: 'success' type: 'success'
}); });
if(this.form.desc.customer_service){ if (this.form.desc.customer_service) {
this.form.desc.customer_service[0] = {name:res.url,url:process.env.IMAGE_URL_HEAD + res.url,title:'',lable:''} this.form.desc.customer_service[0] = {
}else{ name: res.url,
this.form.desc.customer_service=[]; url: process.env.IMAGE_URL_HEAD + res.url,
this.form.desc.customer_service[0] = {name:res.url,url:process.env.IMAGE_URL_HEAD + res.url,title:'',lable:''} title: '',
lable: ''
}
} else {
this.form.desc.customer_service = [];
this.form.desc.customer_service[0] = {
name: res.url,
url: process.env.IMAGE_URL_HEAD + res.url,
title: '',
lable: ''
}
} }
}) })
}, },
uploadFileShare(a){ uploadFileShare(a) {
this.$store.dispatch('setProgress',{type:'new',id:a.file.uid}); this.$store.dispatch('setProgress', {type: 'new', id: a.file.uid});
this.fileUid = a.file.uid; this.fileUid = a.file.uid;
uploadFileApi({file:a.file,type:'local'}).then(res=>{ uploadFileApi({file: a.file, type: 'local'}).then(res => {
this.$message({ this.$message({
message: '上传成功', message: '上传成功',
type: 'success' type: 'success'
}); });
if(this.form.share_desc.img){ if (this.form.share_desc.img) {
this.form.share_desc.img[0] = {name:res.url,url:process.env.IMAGE_URL_HEAD + res.url,title:'',lable:''} this.form.share_desc.img[0] = {
}else{ name: res.url,
this.form.share_desc.img=[]; url: process.env.IMAGE_URL_HEAD + res.url,
this.form.share_desc.img[0] = {name:res.url,url:process.env.IMAGE_URL_HEAD + res.url,title:'',lable:''} title: '',
lable: ''
}
} else {
this.form.share_desc.img = [];
this.form.share_desc.img[0] = {
name: res.url,
url: process.env.IMAGE_URL_HEAD + res.url,
title: '',
lable: ''
}
} }
}) })
}, },
initDialog(){ initDialog() {
switch(this.dialogObj.type){ switch (this.dialogObj.type) {
case 0: case 0:
this.loading = false; this.loading = false;
this.goOn_goods_Id.after_goods_id = ''; this.goOn_goods_Id.after_goods_id = '';
this.goodsYou = []; this.goodsYou = [];
this.goOn_goods_Id.before_goods_id = ''; this.goOn_goods_Id.before_goods_id = '';
this.form={ this.form = {
name:'', name: '',
goods_type:1, goods_type: 1,
goods_desc:{ goods_desc: {
desc:"", desc: "",
img:[], img: [],
course_title:"" course_title: ""
}, },
course_id :'', course_id: '',
course_type:0, course_type: 0,
watch_num:'', watch_num: '',
duration_num:0, duration_num: 0,
original_price:'', original_price: '',
current_price:'', current_price: '',
is_real:0, is_real: 0,
is_auth_user:0, is_auth_user: 0,
is_auth_teacher:0, is_auth_teacher: 0,
share_desc:{ share_desc: {
title:'', title: '',
content:'', content: '',
refImg:[], refImg: [],
img:[] img: []
}, },
desc:{ desc: {
detail:"", detail: "",
qa:"", qa: "",
customer_service:[], customer_service: [],
before_goods_id:0, before_goods_id: 0,
after_goods_id:0 after_goods_id: 0
}, },
is_into_periods:'0' is_into_periods: '0'
}, },
this.getLessonList(); this.getLessonList();
console.log(this.form.course_type) console.log(this.form.course_type)
if(this.form.goods_type==1||this.form.goods_type==2){ if (this.form.goods_type == 1 || this.form.goods_type == 2) {
let json={ let json = {
limit:200, limit: 200,
nowPage:1, nowPage: 1,
goods_type:'4' goods_type: '4'
} }
getGoodsListApi(json).then(res=>{ getGoodsListApi(json).then(res => {
// debugger // debugger
let item = { let item = {
name:'不赠送', name: '不赠送',
id:'0', id: '0',
goods_type:4, goods_type: 4,
course_type:0, course_type: 0,
current_price:0 current_price: 0
} }
this.coupongoods = res.list this.coupongoods = res.list
this.coupongoods.unshift(item) this.coupongoods.unshift(item)
}); });
} }
break; break;
case 1: case 2: case 1:
this.goOn_goods_Id.after_goods_id = ''; case 2:
this.goOn_goods_Id.before_goods_id = ''; this.goOn_goods_Id.after_goods_id = '';
this.goodsYou = []; this.goOn_goods_Id.before_goods_id = '';
this.form={ this.goodsYou = [];
name:'', this.form = {
goods_type:1, name: '',
goods_desc:{ goods_type: 1,
desc:"", goods_desc: {
img:[], desc: "",
course_title:'' img: [],
}, course_title: ''
course_id :'', },
course_type:0, course_id: '',
watch_num:'', course_type: 0,
duration_num:0, watch_num: '',
original_price:'', duration_num: 0,
current_price:'', original_price: '',
is_real:0, current_price: '',
is_auth_user:0, is_real: 0,
is_auth_teacher:0, is_auth_user: 0,
share_desc:{ is_auth_teacher: 0,
title:'', share_desc: {
content:'', title: '',
refImg:[], content: '',
img:[] refImg: [],
}, img: []
desc:{ },
detail:"", desc: {
qa:"", detail: "",
customer_service:[], qa: "",
before_goods_id:0, customer_service: [],
after_goods_id:0 before_goods_id: 0,
}, after_goods_id: 0
is_into_periods:'0' },
}; is_into_periods: '0'
getGoodsDetailApi(this.dialogObj.id).then(res=>{
this.loading = false;
let share_desc = JSON.parse(res.share_desc);
if(!share_desc.refImg){
share_desc.refImg = []
}
this.form={
name:res.name,
goods_type:res.goods_type,
goods_desc:JSON.parse(res.goods_desc),
course_id :res.course_id,
course_type:res.course_type,
watch_num:res.watch_num,
duration_num:res.duration_num,
original_price:res.original_price/100,
current_price:res.current_price/100,
is_real:res.is_real,
is_auth_user:res.is_auth_user,
share_desc:JSON.parse(res.share_desc),
desc:JSON.parse(res.desc),
invite_earnings: res.invite_earnings/100,
is_auth_teacher: res.is_auth_teacher,
is_into_periods:res.is_into_periods
}; };
if(this.form.desc.before_goods_id){ getGoodsDetailApi(this.dialogObj.id).then(res => {
this.goOn_goods_Id.before_goods_id = this.form.desc.before_goods_id; this.loading = false;
} let share_desc = JSON.parse(res.share_desc);
if(this.form.desc.after_goods_id){ if (!share_desc.refImg) {
this.goOn_goods_Id.after_goods_id = this.form.desc.after_goods_id; share_desc.refImg = []
}
if(this.form.desc.use_goods_ids){
this.goodsYou = this.form.desc.use_goods_ids.split(',');
this.goodsYou=this.goodsYou.map(function(item) {
return +item;
});
}
console.log(this.form)
if(this.form.course_type!=1&&this.form.course_type!=2){
// debugger
getGoodsListApi({limit:200}).then(res=>{
this.goodsList = res.list
});
}
// debugger
console.log(this.form.course_type)
if(this.form.goods_type==4){
// debugger
this.getLessonList()
let json={
limit:200,
nowPage:1,
goods_type:'1,2'
} }
getGoodsListApi(json).then(res=>{ this.form = {
this.goodsList = res.list name: res.name,
}); goods_type: res.goods_type,
} goods_desc: JSON.parse(res.goods_desc),
if(this.form.goods_type==1||this.form.goods_type==2){ course_id: res.course_id,
let json={ course_type: res.course_type,
limit:200, watch_num: res.watch_num,
nowPage:1, duration_num: res.duration_num,
goods_type:'4' original_price: res.original_price / 100,
current_price: res.current_price / 100,
is_real: res.is_real,
is_auth_user: res.is_auth_user,
share_desc: JSON.parse(res.share_desc),
desc: JSON.parse(res.desc),
invite_earnings: res.invite_earnings / 100,
is_auth_teacher: res.is_auth_teacher,
is_into_periods: res.is_into_periods
};
if (this.form.desc.before_goods_id) {
this.goOn_goods_Id.before_goods_id = this.form.desc.before_goods_id;
}
if (this.form.desc.after_goods_id) {
this.goOn_goods_Id.after_goods_id = this.form.desc.after_goods_id;
}
if (this.form.desc.use_goods_ids) {
this.goodsYou = this.form.desc.use_goods_ids.split(',');
this.goodsYou = this.goodsYou.map(function (item) {
return +item;
});
}
console.log(this.form)
if (this.form.course_type != 1 && this.form.course_type != 2) {
// debugger
getGoodsListApi({limit: 200}).then(res => {
this.goodsList = res.list
});
} }
getGoodsListApi(json).then(res=>{ // debugger
console.log(this.form.course_type)
if (this.form.goods_type == 4) {
// debugger // debugger
let item = { this.getLessonList()
name:'不赠送', let json = {
id:'0', limit: 200,
goods_type:4, nowPage: 1,
course_type:0, goods_type: '1,2'
current_price:0 }
getGoodsListApi(json).then(res => {
this.goodsList = res.list
});
}
if (this.form.goods_type == 1 || this.form.goods_type == 2) {
let json = {
limit: 200,
nowPage: 1,
goods_type: '4'
}
getGoodsListApi(json).then(res => {
// debugger
let item = {
name: '不赠送',
id: '0',
goods_type: 4,
course_type: 0,
current_price: 0
} }
this.coupongoods = res.list this.coupongoods = res.list
this.coupongoods.unshift(item) this.coupongoods.unshift(item)
}); });
} }
// this.getLessonList() // this.getLessonList()
}); });
break; break;
case 3: case 3:
this.title = '编辑'; this.title = '编辑';
this.show = this.dialogObj.show; this.show = this.dialogObj.show;
this.id = this.dialogObj.id; this.id = this.dialogObj.id;
this.type = 2; this.type = 2;
if(this.form.goods_type==1||this.form.goods_type==2){ if (this.form.goods_type == 1 || this.form.goods_type == 2) {
this.getLessonList() this.getLessonList()
let json={ let json = {
limit:200, limit: 200,
nowPage:1, nowPage: 1,
goods_type:'4' goods_type: '4'
} }
getGoodsListApi(json).then(res=>{ getGoodsListApi(json).then(res => {
this.coupongoods = res.list this.coupongoods = res.list
}); });
} }
...@@ -794,19 +856,19 @@ ...@@ -794,19 +856,19 @@
break break
} }
}, },
changeLessonType(){ changeLessonType() {
this.getLessonList() this.getLessonList()
}, },
getLessonList(){ getLessonList() {
getLessonApi({type:this.form.course_type}).then(res=>{ getLessonApi({type: this.form.course_type}).then(res => {
this.lessonList = res.list this.lessonList = res.list
}) })
} }
}, },
watch:{ watch: {
dialogObj:{ dialogObj: {
handler: function () { handler: function () {
if(this.dialogObj.show){ if (this.dialogObj.show) {
console.log(this.dialogObj) console.log(this.dialogObj)
this.loading = true; this.loading = true;
this.initDialog() this.initDialog()
...@@ -814,36 +876,41 @@ ...@@ -814,36 +876,41 @@
}, },
deep: true deep: true
}, },
"dialogObj.show":function(a){ "dialogObj.show": function (a) {
}, },
show(value){ show(value) {
this.$emit("changeShow",value); this.$emit("changeShow", value);
} }
} }
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.el-col{ .el-col {
min-height: 50px; min-height: 50px;
text-align: center; text-align: center;
margin-bottom: 10px; margin-bottom: 10px;
line-height: 40px; line-height: 40px;
.el-select,.el-select{
.el-select, .el-select {
width: 100%; width: 100%;
} }
img{
img {
width: 50px; width: 50px;
border-radius: 100px; border-radius: 100px;
} }
label{
label {
color: #5982e6; color: #5982e6;
} }
} }
.dialog-footer{
.dialog-footer {
display: block; display: block;
text-align: center; text-align: center;
} }
.size { .size {
color: #666; color: #666;
font-size: 14px; font-size: 14px;
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
total:0, total:0,
limit: 10, limit: 10,
roleList:[], roleList:[],
exportMenuList:[ exportMenuList:[ // 导出权限
'2-3','5-10','5-2','5-1','5-3','5-8','5-9','3-1','7-9','6-3', '10-8' '2-3','5-10','5-2','5-1','5-3','5-8','5-9','3-1','7-9','6-3', '10-8'
], ],
dialog:{ dialog:{
......
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog width="500px" :visible.sync="transfer.show"> <el-dialog width="500px" :visible.sync="transfer.show" title="移交">
<el-form ref="transferForm" :rules="transfer.form.rules" :model="transfer.form" label-width="100px"> <el-form ref="transferForm" :rules="transfer.form.rules" :model="transfer.form" label-width="100px">
<el-form-item label="当前设备:" prop="teacher_name"> <el-form-item label="当前设备:" prop="teacher_name">
{{transfer.form.teacher_name}} {{transfer.form.teacher_name}}
...@@ -264,6 +264,16 @@ ...@@ -264,6 +264,16 @@
type="datetime" placeholder="选择时间"></el-date-picker> type="datetime" placeholder="选择时间"></el-date-picker>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="移交原因:" prop="reason">
<el-select v-model="transfer.form.reason" filterable placeholder="请选择" :clearable="false" @change="transferReasonName">
<el-option
v-for="(data,index) in transfer.reasonList"
:key="index"
:label="data.name"
:value="data.id">
</el-option>
</el-select>
</el-form-item>
</el-form> </el-form>
<div slot="footer"> <div slot="footer">
<el-button @click="transferToggle">取消</el-button> <el-button @click="transferToggle">取消</el-button>
...@@ -289,6 +299,8 @@ ...@@ -289,6 +299,8 @@
transfer: { transfer: {
show: false, show: false,
form: { form: {
reason: '',
reason_name: '',
teacher_name: '', teacher_name: '',
teacher_id: '', teacher_id: '',
staff_current_name: '', // 当前顾问名 staff_current_name: '', // 当前顾问名
...@@ -298,9 +310,23 @@ ...@@ -298,9 +310,23 @@
rules: { rules: {
staff_id: [{required: true, message: '请选择', trigger: 'change'}], staff_id: [{required: true, message: '请选择', trigger: 'change'}],
transfer_at: [{required: true, message: '请选择', trigger: 'change'}], transfer_at: [{required: true, message: '请选择', trigger: 'change'}],
reason: [{required: true, message: '请选择', trigger: 'change'}],
}, },
}, },
staff: [0] staff: [0],
reasonList: [{
id: 0,
name: '人员入职',
},{
id: 1,
name: '人员离职',
},{
id: 2,
name: '请假',
},{
id: 3,
name: '其它',
},]
}, },
searchFrom:{ searchFrom:{
name:'', name:'',
...@@ -440,6 +466,9 @@ ...@@ -440,6 +466,9 @@
transferStaffName(data) { transferStaffName(data) {
this.transfer.form.staff_name = this.transfer.staff.find(x => x.id == data).name; this.transfer.form.staff_name = this.transfer.staff.find(x => x.id == data).name;
}, },
transferReasonName(data) {
this.transfer.form.reason_name = this.transfer.reasonList.find(x => x.id == data).name;
},
transferToggle(data) { transferToggle(data) {
this.transfer.show = !this.transfer.show; this.transfer.show = !this.transfer.show;
if (this.transfer.show){ if (this.transfer.show){
...@@ -467,8 +496,9 @@ ...@@ -467,8 +496,9 @@
this.$confirm(`确定将 this.$confirm(`确定将
<span style="color: red;">${this.transfer.form.teacher_name}</span> 移交给 <span style="color: red;">${this.transfer.form.teacher_name}</span> 移交给
<span style="color: red;">${this.transfer.form.staff_name}</span> ?<br>移交开始时间 <span style="color: red;">${this.transfer.form.staff_name}</span> ?<br>
${this.transfer.form.transfer_at}`, '提示', { 移交开始时间 ${this.transfer.form.transfer_at} <br>
移交原因 ${this.transfer.form.reason_name}`, '提示', {
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -478,6 +508,7 @@ ...@@ -478,6 +508,7 @@
teacher_id: this.transfer.form.teacher_id, teacher_id: this.transfer.form.teacher_id,
staff_id: this.transfer.form.staff_id, staff_id: this.transfer.form.staff_id,
transfer_at: this.transfer.form.transfer_at, transfer_at: this.transfer.form.transfer_at,
reason: this.transfer.form.reason,
}; };
postTransferTeacherApi(json).then(res => { postTransferTeacherApi(json).then(res => {
this.$message({type: 'success', message: '移交成功!'}); this.$message({type: 'success', message: '移交成功!'});
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</el-table-column> </el-table-column>
<el-table-column label="优惠活动"> <el-table-column label="优惠活动">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.order_coupon_id === 0"></span> <span v-if="scope.row.order_coupon_id === 0"></span>
<el-button type="text" v-if="scope.row.order_coupon_id !== 0" @click="showCoupon(scope.row)"> <el-button type="text" v-if="scope.row.order_coupon_id !== 0" @click="showCoupon(scope.row)">
优惠券 优惠券
</el-button> </el-button>
...@@ -441,58 +441,34 @@ ...@@ -441,58 +441,34 @@
<user-list :userObj="userObj" @reflash="getTeacherDetail"/> <user-list :userObj="userObj" @reflash="getTeacherDetail"/>
<choose-good-dialog :dialogObj="chooseGoodDialogObj" @changeShow="changeShow"/> <choose-good-dialog :dialogObj="chooseGoodDialogObj" @changeShow="changeShow"/>
<el-dialog append-to-body :visible.sync="addShow"> <el-dialog append-to-body :visible.sync="addShow" top="5vh">
<el-form label-width="90px"> <el-form label-width="90px" inline>
<!--<el-form-item label="用户id">--> <!--<el-form-item label="用户id">-->
<!--<el-input v-model="addId"></el-input>--> <!--<el-input v-model="addId"></el-input>-->
<!--</el-form-item>--> <!--</el-form-item>-->
<el-row> <el-form-item>
<el-col :span="8"> <el-input style="width: 160px;" placeholder="ID" @change="getUser" v-model="searchFrom.userId"></el-input>
<el-form-item label="ID"> </el-form-item>
<el-input v-model="searchFrom.userId"></el-input> <el-form-item>
</el-form-item> <el-input style="width: 160px;" placeholder="昵称" @change="getUser" v-model="searchFrom.nickName"></el-input>
</el-col> </el-form-item>
<el-col :span="8"> <el-form-item>
<el-form-item label="昵称"> <el-input style="width: 160px;" placeholder="电话" @change="getUser" v-model="searchFrom.mobile"></el-input>
<el-input v-model="searchFrom.nickName"></el-input> </el-form-item>
</el-form-item> <el-form-item>
</el-col> <el-button type="primary" plain @click="getUser">搜索</el-button>
<el-col :span="8"> </el-form-item>
<el-form-item label="电话">
<el-input v-model="searchFrom.mobile"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" :offset="16">
<el-form-item>
<el-button style="float: right" type="primary" plain @click="getUser">搜索</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<el-table <el-table border size="small" :data="userList" ref="multipleTable" @selection-change="handleSelectionChange">
:data="userList" <el-table-column type="selection" width="55"></el-table-column>
ref="multipleTable" <el-table-column className="f-c" label="用户">
@selection-change="handleSelectionChange"
style="width: 100%">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column
className="f-c"
label="用户">
<template slot-scope="scope"> <template slot-scope="scope">
<img style="margin-right:5px;width: 50px;height: 50px;border-radius: 50px" :src="scope.row.avatar">{{scope.row.nickname}}(ID:{{scope.row.user_id}}) <img style="margin-right:8px;width: 50px;height: 50px;border-radius: 50px" :src="scope.row.avatar">{{scope.row.nickname}}(ID:{{scope.row.user_id}})
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="mobile" label="手机号"></el-table-column>
prop="mobile"
label="手机号">
</el-table-column>
</el-table> </el-table>
<page :total="userObj.total" :limit="userObj.limit" @pageChange="onPageChange3" @sizeChange="onSizeChange3"/> <page :total="userObj.total" :limit="userObj.limit" :small="true" @pageChange="onPageChange3" @sizeChange="onSizeChange3"/>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="addShow = false">取 消</el-button> <el-button @click="addShow = false">取 消</el-button>
<el-button type="primary" @click="onAdd">确 定</el-button> <el-button type="primary" @click="onAdd">确 定</el-button>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div v-for="data in task3List" class="task3-table" style="width:47%"> <div v-for="data in task3List" class="task3-table" style="width:47%">
<div class="table" > <div class="table" >
<div class="title" style="width:8%"> <div class="title" style="width:8%">
<div class="header bg-h">期数</div> <div class="header bg-h">期数名称</div>
<div> <div>
<!--{{data.title}}--> <!--{{data.title}}-->
<div v-html="periodName(data)"></div> <div v-html="periodName(data)"></div>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<div>往期意向用户:</div> <div>往期意向用户:</div>
<div class="table" > <div class="table" >
<div class="title" style="width:8%"> <div class="title" style="width:8%">
<div class="header bg-h">期数</div> <div class="header bg-h">期数名称</div>
<div> <div>
往期活跃用户数(近三天) 往期活跃用户数(近三天)
</div> </div>
......
...@@ -10,9 +10,10 @@ ...@@ -10,9 +10,10 @@
<div v-for="data in task3List" class="task3-table"> <div v-for="data in task3List" class="task3-table">
<div class="table"> <div class="table">
<div class="title" style="width:8%"> <div class="title" style="width:8%">
<div class="header bg-h">期数</div> <div class="header bg-h">期数名称</div>
<div> <div>
{{data.title}} <!--{{data.title}}-->
<div v-html="periodName(data)"></div>
</div> </div>
</div> </div>
<div class="total"> <div class="total">
...@@ -358,6 +359,29 @@ ...@@ -358,6 +359,29 @@
} }
}, },
methods:{ methods:{
periodName(val) {
let str = '';
if (!val.title) {
str = '-'
} else {
if (val.goods_id) {
str += `【${val.goods_id}】`
}
if (val.title) {
str += `${val.title}<br>`
}
if (val.watch_num) {
str += `${val.watch_num}课时`
}
if (val.start_at) {
str += `(${val.start_at.slice(5).replace('-', '')})`
}
if (val.has_watch_num || val.has_watch_num == 0) {
str += `-d${val.has_watch_num}`
}
}
return str
},
showSourceByDate(row){ showSourceByDate(row){
this.sourceByDateDialogJson = { this.sourceByDateDialogJson = {
"periods_id":row.periods_id, "periods_id":row.periods_id,
......
...@@ -33,60 +33,115 @@ ...@@ -33,60 +33,115 @@
<img class="avatar" :src="scope.row.avatar">{{scope.row.nickname}}<br>(ID:{{scope.row.user_id}}) <img class="avatar" :src="scope.row.avatar">{{scope.row.nickname}}<br>(ID:{{scope.row.user_id}})
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="mobile" label="手机号"></el-table-column> <el-table-column prop="mobile" label="手机号" width="110px"></el-table-column>
<el-table-column prop="created_at" label="注册时间" width="105px" sortable></el-table-column> <el-table-column prop="created_at" label="注册时间" sortable></el-table-column>
<el-table-column prop="last_login_at" label="最后登录" width="105px" sortable></el-table-column> <el-table-column prop="last_login_at" label="最后登录" sortable></el-table-column>
<!--<el-table-column prop="last_login_at" label="最后登录时间" width="120px" sortable></el-table-column>--> <!--<el-table-column prop="last_login_at" label="最后登录时间" width="120px" sortable></el-table-column>-->
<el-table-column prop="baby_name" label="宝宝名称"></el-table-column> <el-table-column prop="baby_name" label="宝宝名称"></el-table-column>
<el-table-column prop="birthday" label="宝宝生日" width="105px"></el-table-column> <el-table-column prop="birthday" label="宝宝生日" width="110px"></el-table-column>
<el-table-column prop="sex" label="宝宝性别" width="80px" :formatter="sexFormatter"></el-table-column> <el-table-column prop="sex" label="宝宝性别" width="80px" :formatter="sexFormatter"></el-table-column>
<el-table-column label="操作" width="100px"> <el-table-column label="操作" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" plain type="primary" @click="goToDetail(scope.row.user_id)">查看详情</el-button> <el-button size="mini" plain type="primary" @click="goToDetail(scope.row.user_id)">查看详情</el-button>
<el-button size="mini" v-if="!$store.state.readonly" plain type="warning" @click="userTransfer(scope.row)">用户转移</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
<detail-dialog :dialogObj="dialogDetailObj" @changeShow="changeShow"/> <detail-dialog :dialogObj="dialogDetailObj" @changeShow="changeShow"/>
<teacher-dialog :dialogObj="dialogObj" @reflash="getUser"></teacher-dialog> <teacher-dialog :dialogObj="dialogObj" @reflash="getUser"></teacher-dialog>
<el-dialog width="90%" top="5vh" :visible.sync="dialogDetail.show"> <el-dialog width="90%" top="5vh" :visible.sync="dialogDetail.show">
<div v-if="dialogDetail.show"> <div v-if="dialogDetail.show">
<user-detail :parentDetail="dialogDetail"></user-detail> <user-detail :parentDetail="dialogDetail"></user-detail>
</div> </div>
</el-dialog> </el-dialog>
<!--用户移交-->
<el-dialog append-to-body :visible.sync="addShow" top="5vh" :title="`把 ${userObj.transfer_user_name} 转移为`">
<el-form label-width="90px" inline>
<el-form-item>
<el-input style="width: 160px;" placeholder="ID" @change="getTransferUser" v-model="userObj.searchFrom.userId"></el-input>
</el-form-item>
<el-form-item>
<el-input style="width: 160px;" placeholder="昵称" @change="getTransferUser" v-model="userObj.searchFrom.nickName"></el-input>
</el-form-item>
<el-form-item>
<el-input style="width: 160px;" placeholder="电话" @change="getTransferUser" v-model="userObj.searchFrom.mobile"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" plain @click="getTransferUser">搜索</el-button>
</el-form-item>
</el-form>
<el-table border size="small" :data="userTransferList" ref="multipleTable" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column className="f-c" label="用户">
<template slot-scope="scope">
<img style="margin-right:8px;width: 50px;height: 50px;border-radius: 50px" :src="scope.row.avatar">{{scope.row.nickname}}(ID:{{scope.row.user_id}})
</template>
</el-table-column>
<el-table-column prop="mobile" label="手机号"></el-table-column>
</el-table>
<page :total="userObj.total" :limit="userObj.limit" :small="true" @pageChange="onPageChange3" @sizeChange="onSizeChange3"/>
<span slot="footer" class="dialog-footer">
<el-button @click="addShow = false">取 消</el-button>
<el-button type="primary" @click="transferSave">确 定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {getUserListApi,getSyncUserApi} from "../../service/api"; import {getUserListApi, getSyncUserApi, postUserTransferApi} from "../../service/api";
import page from '../framework/page' import page from '../framework/page'
import detailDialog from './detail' import detailDialog from './detail'
import teacherDialog from './dialog' import teacherDialog from './dialog'
import userDetail from '../userDetail/index' import userDetail from '../userDetail/index'
export default { export default {
name: "index", name: "index",
data(){ data() {
return { return {
searchFrom:{ addShow: false,
nickName:'', userTransferList: [],
mobile:'', userObj: {
level:'', title: '',
show: false,
total: 0,
limit: 10,
nowPage: 1,
transfer_user_id: '',
transfer_user_name: '',
receive_user_id: '',
receive_user_name: '',
searchFrom: {
nickName: '',
mobile: '',
level: '',
userId: ''
},
},
multipleSelection: [],
searchFrom: {
nickName: '',
mobile: '',
level: '',
userId: '' userId: ''
}, },
dialogDetail:{ dialogDetail: {
show:false, show: false,
id:'' id: ''
}, },
userList:[], userList: [],
total:0, total: 0,
nowPage:1, nowPage: 1,
limit: 10, limit: 10,
showDetail:false, showDetail: false,
showId:'', showId: '',
dialogObj:{ dialogObj: {
show:false, show: false,
title:'绑定老师', title: '绑定老师',
id:0, id: 0,
teacher_id: 0 teacher_id: 0
}, },
dialogDetailObj: { dialogDetailObj: {
...@@ -96,49 +151,142 @@ ...@@ -96,49 +151,142 @@
loading: false loading: false
} }
}, },
components:{ components: {
page, page,
detailDialog, detailDialog,
userDetail, userDetail,
teacherDialog teacherDialog
}, },
mounted(){ mounted() {
this.getUser() this.getUser()
}, },
methods:{ methods: {
tagChange() {
userTransfer(row) {
this.addShow = true;
this.userObj.total = 0;
this.userObj.nowPage = 1;
this.getTransferUser();
this.userObj.transfer_user_id = row.user_id;
this.userObj.transfer_user_name = row.nickname;
this.userObj.receive_user_id = '';
this.userObj.receive_user_name = '';
},
transferSave() {
if (this.multipleSelection.length === 0) {
this.$message({
type: 'error',
message: '请选择用户!'
});
return
} else if (this.multipleSelection.length !== 1) {
this.$message({
type: 'error',
message: '只能选择一个用户!'
});
return
} else if (!this.userObj.transfer_user_id || !this.userObj.transfer_user_name) {
return
}
this.$confirm(`确定将
<span style="color: red;">${this.userObj.transfer_user_name}</span> 转移为
<span style="color: red;">${this.userObj.receive_user_name}</span> ?`, '提示', {
dangerouslyUseHTMLString: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let json = {
transfer_user_id: this.userObj.transfer_user_id,
receive_user_id: this.userObj.receive_user_id,
}
postUserTransferApi(json).then(res => {
this.$message({
type: 'success',
message: '用户转移成功!'
});
this.getUser();
this.addShow = false;
this.userObj.transfer_user_id = '';
this.userObj.transfer_user_name = '';
this.userObj.receive_user_id = '';
this.userObj.receive_user_name = '';
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消转移'
});
});
},
onPageChange3(val) {
this.userObj.nowPage = val
this.getTransferUser()
},
onSizeChange3(val) {
this.userObj.limit = val;
this.userObj.nowPage = 1;
this.getTransferUser()
},
getTransferUser() {
let json = {
page: this.userObj.nowPage,
limit: this.userObj.limit,
};
if (this.userObj.searchFrom.userId) {
json.user_id = this.userObj.searchFrom.userId
}
if (this.userObj.searchFrom.nickName) {
json.nickname = this.userObj.searchFrom.nickName
}
if (this.userObj.searchFrom.mobile) {
json.mobile = this.userObj.searchFrom.mobile
}
getUserListApi(json).then(res => {
this.userTransferList = res.list;
this.userObj.total = res.total;
})
},
handleSelectionChange(val) {
this.multipleSelection = val;
this.userObj.receive_user_name = val[0].nickname;
this.userObj.receive_user_id = val[0].user_id;
}, },
sexFormatter(item){
if(item.sex==0){ sexFormatter(item) {
if (item.sex == 0) {
return '保密' return '保密'
} }
if(item.sex==1){ if (item.sex == 1) {
return '男' return '男'
} }
if(item.sex==2){ if (item.sex == 2) {
return '女' return '女'
} }
}, },
onPageChange(val){ onPageChange(val) {
this.nowPage = val this.nowPage = val
this.getUser() this.getUser()
}, },
onSizeChange(val){ onSizeChange(val) {
this.limit = val; this.limit = val;
this.nowPage = 1; this.nowPage = 1;
this.getUser() this.getUser()
}, },
getUser(){ getUser() {
let json = { let json = {
page: this.nowPage, page: this.nowPage,
limit: this.limit limit: this.limit
} }
if (this.searchFrom.userId) { if (this.searchFrom.userId) {
json.user_id = this.searchFrom.userId json.user_id = this.searchFrom.userId
} }
if (this.searchFrom.nickName) { if (this.searchFrom.nickName) {
json.nickname = this.searchFrom.nickName json.nickname = this.searchFrom.nickName
} }
if (this.searchFrom.mobile) { if (this.searchFrom.mobile) {
json.mobile = this.searchFrom.mobile json.mobile = this.searchFrom.mobile
...@@ -146,43 +294,43 @@ ...@@ -146,43 +294,43 @@
if (this.searchFrom.level) { if (this.searchFrom.level) {
json.level = this.searchFrom.level json.level = this.searchFrom.level
} }
getUserListApi(json).then(res=>{ getUserListApi(json).then(res => {
this.userList = res.list; this.userList = res.list;
this.total = res.total this.total = res.total
}) })
}, },
detail(data){ detail(data) {
this.dialogDetailObj = { this.dialogDetailObj = {
show: true, show: true,
id: data.user_id id: data.user_id
} }
}, },
changeShow(data){ changeShow(data) {
this.dialogDetailObj.show=data this.dialogDetailObj.show = data
}, },
bindTeacher(data){ bindTeacher(data) {
this.dialogObj = { this.dialogObj = {
show:true, show: true,
title:'绑定老师', title: '绑定老师',
id:data.user_id, id: data.user_id,
teacher_id: data.teacher_id teacher_id: data.teacher_id
} }
}, },
goToDetail(id){ goToDetail(id) {
this.dialogDetail.id = id; this.dialogDetail.id = id;
this.dialogDetail.show = true this.dialogDetail.show = true
// this.$router.push('/userDetail/'+ id); // this.$router.push('/userDetail/'+ id);
}, },
syncUser(){ syncUser() {
this.loading = true this.loading = true
getSyncUserApi().then((data)=>{ getSyncUserApi().then((data) => {
this.loading = false this.loading = false
this.$message({ this.$message({
showClose: true, showClose: true,
message: `已更新${data}条用户数据`, message: `已更新${data}条用户数据`,
type: 'success' type: 'success'
}) })
}).catch(()=>{ }).catch(() => {
this.loading = false this.loading = false
}) })
} }
...@@ -192,14 +340,16 @@ ...@@ -192,14 +340,16 @@
<style lang="less"> <style lang="less">
/*@import "../../util/public";*/ /*@import "../../util/public";*/
.user{ .user {
/*height: 100%;*/ /*height: 100%;*/
overflow: auto; overflow: auto;
padding: 20px 0; padding: 20px 0;
.btn-content{
.btn-content {
text-align: center; text-align: center;
} }
} }
.flexRow { .flexRow {
display: flex; display: flex;
flex-flow: row; flex-flow: row;
......
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="teacher_name" label="班级老师"> <el-table-column prop="teacher_name" label="班级老师">
</el-table-column> </el-table-column>
<el-table-column prop="class_source" width="80" label="活动方案"> <el-table-column prop="class_source" label="活动方案" width="180px">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.class_source|classType}} {{scope.row.class_source|classType}}
</template> </template>
...@@ -905,10 +905,14 @@ export default { ...@@ -905,10 +905,14 @@ export default {
.sms { .sms {
padding: 20px 0; padding: 20px 0;
} }
.el-button+.el-button{
margin-left: 0; .el-table {
/* margin-top: 10px; */ .el-button + .el-button {
margin-left: 0;
margin-top: 10px;
}
} }
.avatar { .avatar {
width: 50px; width: 50px;
min-width: 50px; min-width: 50px;
......
import Vue from 'vue'; import Vue from 'vue';
import axios from 'axios' import axios from 'axios'
import { post, fetch, patch, put, del, upload } from './index' import {post, fetch, patch, put, del, upload} from './index'
import md5 from "js-md5"; import md5 from "js-md5";
import CommonJs from '../util/common'; import CommonJs from '../util/common';
const _baseUrl = process.env.API_URL; const _baseUrl = process.env.API_URL;
Vue.prototype.$post = post; Vue.prototype.$post = post;
Vue.prototype.$fetch = fetch; Vue.prototype.$fetch = fetch;
...@@ -14,72 +15,77 @@ Vue.prototype.$upload = upload; ...@@ -14,72 +15,77 @@ Vue.prototype.$upload = upload;
//登录 //登录
const loginURL = `${_baseUrl}api/admin/login`; const loginURL = `${_baseUrl}api/admin/login`;
export const loginApi = function (json) { export const loginApi = function (json) {
return Vue.prototype.$post(loginURL, { "username": json.username, "passwd": json.password }) return Vue.prototype.$post(loginURL, {"username": json.username, "passwd": json.password})
}; };
//退出登录 //退出登录
const logOutUrl = `${_baseUrl}api/admin/logout`; const logOutUrl = `${_baseUrl}api/admin/logout`;
export const logoutApi = function () { export const logoutApi = function () {
return Vue.prototype.$post(logOutUrl) return Vue.prototype.$post(logOutUrl)
}; };
//查询账号列表 //查询账号列表
const getAdminListUrl = `${_baseUrl}api/admin/user/list`; const getAdminListUrl = `${_baseUrl}api/admin/user/list`;
export const getAdminListApi = function (json) { export const getAdminListApi = function (json) {
return Vue.prototype.$fetch(getAdminListUrl, json) return Vue.prototype.$fetch(getAdminListUrl, json)
}; };
//修改账号信息 //修改账号信息
const editAdminUrl = `${_baseUrl}api/admin/user/info`; const editAdminUrl = `${_baseUrl}api/admin/user/info`;
export const editAdminListApi = function (id, json) { export const editAdminListApi = function (id, json) {
return Vue.prototype.$put(`${editAdminUrl}/${id}`, json) return Vue.prototype.$put(`${editAdminUrl}/${id}`, json)
}; };
//添加账号 //添加账号
const addAdminUrl = `${_baseUrl}api/admin/user/add`; const addAdminUrl = `${_baseUrl}api/admin/user/add`;
export const addAdminListApi = function (json) { export const addAdminListApi = function (json) {
return Vue.prototype.$post(addAdminUrl, json) return Vue.prototype.$post(addAdminUrl, json)
}; };
//删除账号 //删除账号
const delAdminUrl = `${_baseUrl}api/admin/user`; const delAdminUrl = `${_baseUrl}api/admin/user`;
export const delAdminListApi = function (id) { export const delAdminListApi = function (id) {
return Vue.prototype.$del(`${delAdminUrl}/${id}`) return Vue.prototype.$del(`${delAdminUrl}/${id}`)
}; };
//修改密码 //修改密码
const editPasswordUrl = `${_baseUrl}api/admin/user/passwd`; const editPasswordUrl = `${_baseUrl}api/admin/user/passwd`;
export const editPasswordApi = function (id, json) { export const editPasswordApi = function (id, json) {
return Vue.prototype.$patch(`${editPasswordUrl}/${id}`, json) return Vue.prototype.$patch(`${editPasswordUrl}/${id}`, json)
}; };
//获取用户列表 //获取用户列表
const getUserListUrl = `${_baseUrl}api/admin/student/list`; const getUserListUrl = `${_baseUrl}api/admin/student/list`;
export const getUserListApi = function (json) { export const getUserListApi = function (json) {
return Vue.prototype.$fetch(getUserListUrl, json) return Vue.prototype.$fetch(getUserListUrl, json)
}; };
//获取用户详情 //获取用户详情
const getUserDetailUrl = `${_baseUrl}api/admin/student/info`; const getUserDetailUrl = `${_baseUrl}api/admin/student/info`;
export const getUserDetailApi = function (id) { export const getUserDetailApi = function (id) {
return Vue.prototype.$fetch(`${getUserDetailUrl}/${id}`) return Vue.prototype.$fetch(`${getUserDetailUrl}/${id}`)
};
// 用户转移
const postUserTransferUrl = `${_baseUrl}api/admin/user/data/transfer`;
export const postUserTransferApi = function (json) {
return Vue.prototype.$post(postUserTransferUrl, json)
}; };
//获取教师列表 //获取教师列表
const getTeacherListUrl = `${_baseUrl}api/admin/teacher/list`; const getTeacherListUrl = `${_baseUrl}api/admin/teacher/list`;
export const getTeacherListApi = function (json) { export const getTeacherListApi = function (json) {
return Vue.prototype.$fetch(`${getTeacherListUrl}`, json) return Vue.prototype.$fetch(`${getTeacherListUrl}`, json)
}; };
//获取教师详情 //获取教师详情
const getTeacherDetailUrl = `${_baseUrl}api/admin/teacher/info`; const getTeacherDetailUrl = `${_baseUrl}api/admin/teacher/info`;
export const getTeacherDetailApi = function (id, json) { export const getTeacherDetailApi = function (id, json) {
return Vue.prototype.$fetch(`${getTeacherDetailUrl}/${id}`, json) return Vue.prototype.$fetch(`${getTeacherDetailUrl}/${id}`, json)
}; };
//添加教师 //添加教师
const addTeacherUrl = `${_baseUrl}api/admin/teacher/add`; const addTeacherUrl = `${_baseUrl}api/admin/teacher/add`;
export const addTeacherApi = function (json) { export const addTeacherApi = function (json) {
return Vue.prototype.$post(addTeacherUrl, json) return Vue.prototype.$post(addTeacherUrl, json)
}; };
//更新教师信息 //更新教师信息
const editTeacherUrl = `${_baseUrl}api/admin/teacher/info`; const editTeacherUrl = `${_baseUrl}api/admin/teacher/info`;
export const editTeacherApi = function (id, json) { export const editTeacherApi = function (id, json) {
return Vue.prototype.$put(`${editTeacherUrl}/${id}`, json) return Vue.prototype.$put(`${editTeacherUrl}/${id}`, json)
}; };
//删除教师 //删除教师
const delTeacherUrl = `${_baseUrl}api/admin/teacher`; const delTeacherUrl = `${_baseUrl}api/admin/teacher`;
export const delTeacherApi = function (id) { export const delTeacherApi = function (id) {
return Vue.prototype.$del(`${delTeacherUrl}/${id}`) return Vue.prototype.$del(`${delTeacherUrl}/${id}`)
}; };
//设备移交 //设备移交
export const postTransferTeacherApi = function (json) { export const postTransferTeacherApi = function (json) {
...@@ -88,494 +94,494 @@ export const postTransferTeacherApi = function (json) { ...@@ -88,494 +94,494 @@ export const postTransferTeacherApi = function (json) {
//获取课程列表 //获取课程列表
const getLessonUrl = `${_baseUrl}api/admin/course/list`; const getLessonUrl = `${_baseUrl}api/admin/course/list`;
export const getLessonApi = function (json) { export const getLessonApi = function (json) {
return Vue.prototype.$fetch(getLessonUrl, json) return Vue.prototype.$fetch(getLessonUrl, json)
}; };
//获取课程详情 //获取课程详情
const getLessonDetailUrl = `${_baseUrl}api/admin/course/info`; const getLessonDetailUrl = `${_baseUrl}api/admin/course/info`;
export const getLessonDetailApi = function (id, json) { export const getLessonDetailApi = function (id, json) {
return Vue.prototype.$fetch(`${getLessonDetailUrl}/${id}`, json) return Vue.prototype.$fetch(`${getLessonDetailUrl}/${id}`, json)
}; };
//编辑课程详情 //编辑课程详情
const editLessonDetailUrl = `${_baseUrl}api/admin/course/info`; const editLessonDetailUrl = `${_baseUrl}api/admin/course/info`;
export const editLessonApi = function (id, json) { export const editLessonApi = function (id, json) {
return Vue.prototype.$put(`${editLessonDetailUrl}/${id}`, json) return Vue.prototype.$put(`${editLessonDetailUrl}/${id}`, json)
}; };
//删除课程 //删除课程
const deleteLessonUrl = `${_baseUrl}api/admin/course`; const deleteLessonUrl = `${_baseUrl}api/admin/course`;
export const deleteLessonAPI = function (id) { export const deleteLessonAPI = function (id) {
return Vue.prototype.$del(`${deleteLessonUrl}/${id}`) return Vue.prototype.$del(`${deleteLessonUrl}/${id}`)
}; };
//新增课程 //新增课程
const addLessonUrl = `${_baseUrl}api/admin/course/add`; const addLessonUrl = `${_baseUrl}api/admin/course/add`;
export const addLessonApi = function (json) { export const addLessonApi = function (json) {
return Vue.prototype.$post(addLessonUrl, json) return Vue.prototype.$post(addLessonUrl, json)
}; };
//获取商品列表 //获取商品列表
const getGoodsListUrl = `${_baseUrl}api/admin/goods/list`; const getGoodsListUrl = `${_baseUrl}api/admin/goods/list`;
export const getGoodsListApi = function (json) { export const getGoodsListApi = function (json) {
return Vue.prototype.$fetch(getGoodsListUrl, json) return Vue.prototype.$fetch(getGoodsListUrl, json)
}; };
//获取商品详情 //获取商品详情
const getGoodsDetailUrl = `${_baseUrl}api/admin/goods/info`; const getGoodsDetailUrl = `${_baseUrl}api/admin/goods/info`;
export const getGoodsDetailApi = function (id, json) { export const getGoodsDetailApi = function (id, json) {
return Vue.prototype.$fetch(`${getGoodsDetailUrl}/${id}`, json) return Vue.prototype.$fetch(`${getGoodsDetailUrl}/${id}`, json)
}; };
//添加商品 //添加商品
const addGoodsUrl = `${_baseUrl}api/admin/goods/add`; const addGoodsUrl = `${_baseUrl}api/admin/goods/add`;
export const addGoodsApi = function (json) { export const addGoodsApi = function (json) {
return Vue.prototype.$post(addGoodsUrl, json) return Vue.prototype.$post(addGoodsUrl, json)
}; };
//编辑商品 //编辑商品
const editGoodsUrl = `${_baseUrl}api/admin/goods/info`; const editGoodsUrl = `${_baseUrl}api/admin/goods/info`;
export const editGoodsApi = function (id, json) { export const editGoodsApi = function (id, json) {
return Vue.prototype.$put(`${editGoodsUrl}/${id}`, json) return Vue.prototype.$put(`${editGoodsUrl}/${id}`, json)
}; };
//删除商品 //删除商品
const deleteGoodsUrl = `${_baseUrl}api/admin/goods`; const deleteGoodsUrl = `${_baseUrl}api/admin/goods`;
export const deleteGoodsApi = function (id) { export const deleteGoodsApi = function (id) {
return Vue.prototype.$del(`${deleteGoodsUrl}/${id}`) return Vue.prototype.$del(`${deleteGoodsUrl}/${id}`)
}; };
// 商品上架 // 商品上架
const upGoodsUrl = `${_baseUrl}api/admin/goods/putaway/`; const upGoodsUrl = `${_baseUrl}api/admin/goods/putaway/`;
export const upGoodsApi = function (id) { export const upGoodsApi = function (id) {
return Vue.prototype.$patch(`${upGoodsUrl}${id}`) return Vue.prototype.$patch(`${upGoodsUrl}${id}`)
}; };
// 商品下架 // 商品下架
const downGoodsUrl = `${_baseUrl}api/admin/goods/soldout/`; const downGoodsUrl = `${_baseUrl}api/admin/goods/soldout/`;
export const downGoodsApi = function (id) { export const downGoodsApi = function (id) {
return Vue.prototype.$patch(`${downGoodsUrl}${id}`) return Vue.prototype.$patch(`${downGoodsUrl}${id}`)
}; };
//查询元素、菜单分类 //查询元素、菜单分类
const getCategoryUrl = `${_baseUrl}api/admin/category/list/0`; const getCategoryUrl = `${_baseUrl}api/admin/category/list/0`;
export const getCategoryApi = function (pid) { export const getCategoryApi = function (pid) {
return Vue.prototype.$fetch(getCategoryUrl, { 'pid': pid }) return Vue.prototype.$fetch(getCategoryUrl, {'pid': pid})
}; };
// 添加教材菜单 // 添加教材菜单
const addCategoryUrl = `${_baseUrl}api/admin/category/add/0`; const addCategoryUrl = `${_baseUrl}api/admin/category/add/0`;
export const addCategoryApi = function (json) { export const addCategoryApi = function (json) {
return Vue.prototype.$post(addCategoryUrl, json) return Vue.prototype.$post(addCategoryUrl, json)
}; };
//删除分类 //删除分类
const delCategoryUrl = `${_baseUrl}api/admin/category`; const delCategoryUrl = `${_baseUrl}api/admin/category`;
export const delCategoryApi = function (id) { export const delCategoryApi = function (id) {
return Vue.prototype.$del(`${delCategoryUrl}/${id}`) return Vue.prototype.$del(`${delCategoryUrl}/${id}`)
}; };
//分类排序修改 //分类排序修改
const sortCategoryUrl = `${_baseUrl}api/admin/category/sort`; const sortCategoryUrl = `${_baseUrl}api/admin/category/sort`;
export const sortCategoryApi = function (json) { export const sortCategoryApi = function (json) {
return Vue.prototype.$patch(sortCategoryUrl, json) return Vue.prototype.$patch(sortCategoryUrl, json)
}; };
//获取分类下的元素列表 //获取分类下的元素列表
const getCateDetailListUrl = `${_baseUrl}api/admin/element/list/0`; const getCateDetailListUrl = `${_baseUrl}api/admin/element/list/0`;
export const getCateListApi = function (id) { export const getCateListApi = function (id) {
return Vue.prototype.$fetch(getCateDetailListUrl, id) return Vue.prototype.$fetch(getCateDetailListUrl, id)
}; };
// 添加元素 // 添加元素
const addElementUrl = `${_baseUrl}api/admin/element/add/`; const addElementUrl = `${_baseUrl}api/admin/element/add/`;
export const addElementApi = function (json, type) { export const addElementApi = function (json, type) {
return Vue.prototype.$post(`${addElementUrl}${type}`, json) return Vue.prototype.$post(`${addElementUrl}${type}`, json)
}; };
// 查询元素详情 // 查询元素详情
const getElemenetDetailUrl = `${_baseUrl}api/admin/element/`; const getElemenetDetailUrl = `${_baseUrl}api/admin/element/`;
export const getElemenetDetailApi = function (id) { export const getElemenetDetailApi = function (id) {
return Vue.prototype.$fetch(`${getElemenetDetailUrl}${id}`) return Vue.prototype.$fetch(`${getElemenetDetailUrl}${id}`)
}; };
// 编辑元素 // 编辑元素
const editElementUrl = `${_baseUrl}api/admin/element/`; const editElementUrl = `${_baseUrl}api/admin/element/`;
export const editElementApi = function (json, id) { export const editElementApi = function (json, id) {
return Vue.prototype.$put(`${editElementUrl}${id}`, json) return Vue.prototype.$put(`${editElementUrl}${id}`, json)
}; };
// 删除元素 // 删除元素
const delElementUrl = `${_baseUrl}api/admin/element/`; const delElementUrl = `${_baseUrl}api/admin/element/`;
export const delElementApi = function (id) { export const delElementApi = function (id) {
return Vue.prototype.$del(`${delElementUrl}${id}`) return Vue.prototype.$del(`${delElementUrl}${id}`)
}; };
// 获取单品列表 // 获取单品列表
const getSingleListUrl = `${_baseUrl}api/admin/item/stock/list`; const getSingleListUrl = `${_baseUrl}api/admin/item/stock/list`;
export const getSingleListApi = function (json) { export const getSingleListApi = function (json) {
return Vue.prototype.$fetch(`${getSingleListUrl}`, json) return Vue.prototype.$fetch(`${getSingleListUrl}`, json)
}; };
// 获取单品详情 // 获取单品详情
const getSingleDetailUrl = `${_baseUrl}api/admin/item/stock/info/`; const getSingleDetailUrl = `${_baseUrl}api/admin/item/stock/info/`;
export const getSingleDetailApi = function (id) { export const getSingleDetailApi = function (id) {
return Vue.prototype.$fetch(`${getSingleDetailUrl}${id}`) return Vue.prototype.$fetch(`${getSingleDetailUrl}${id}`)
}; };
// 删除单品 // 删除单品
const delSingleUrl = `${_baseUrl}api/admin/item/stock/`; const delSingleUrl = `${_baseUrl}api/admin/item/stock/`;
export const delSingleApi = function (id) { export const delSingleApi = function (id) {
return Vue.prototype.$del(`${delSingleUrl}${id}`) return Vue.prototype.$del(`${delSingleUrl}${id}`)
}; };
// 新增单品 // 新增单品
const addSingleUrl = `${_baseUrl}api/admin/item/stock/add`; const addSingleUrl = `${_baseUrl}api/admin/item/stock/add`;
export const addSingleApi = function (json) { export const addSingleApi = function (json) {
return Vue.prototype.$post(addSingleUrl, json) return Vue.prototype.$post(addSingleUrl, json)
}; };
// 修改单品 // 修改单品
const editSingleUrl = `${_baseUrl}api/admin/item/stock/info/`; const editSingleUrl = `${_baseUrl}api/admin/item/stock/info/`;
export const editSingleApi = function (id, json) { export const editSingleApi = function (id, json) {
return Vue.prototype.$put(`${editSingleUrl}${id}`, json) return Vue.prototype.$put(`${editSingleUrl}${id}`, json)
}; };
// 获取盒子分类 // 获取盒子分类
const getBoxTypeListUrl = `${_baseUrl}api/admin/category/list/1`; const getBoxTypeListUrl = `${_baseUrl}api/admin/category/list/1`;
export const getBoxTypeListApi = function () { export const getBoxTypeListApi = function () {
return Vue.prototype.$fetch(getBoxTypeListUrl) return Vue.prototype.$fetch(getBoxTypeListUrl)
}; };
// 获取盒子列表 // 获取盒子列表
const getBoxListUrl = `${_baseUrl}api/admin/item/box/list/`; const getBoxListUrl = `${_baseUrl}api/admin/item/box/list/`;
export const getBoxListApi = function (id) { export const getBoxListApi = function (id) {
return Vue.prototype.$fetch(`${getBoxListUrl}${id}`) return Vue.prototype.$fetch(`${getBoxListUrl}${id}`)
}; };
// 添加盒子 // 添加盒子
const addBoxUrl = `${_baseUrl}api/admin/item/box/add/`; const addBoxUrl = `${_baseUrl}api/admin/item/box/add/`;
export const addBoxApi = function (id, json) { export const addBoxApi = function (id, json) {
return Vue.prototype.$post(`${addBoxUrl}${id}`, json) return Vue.prototype.$post(`${addBoxUrl}${id}`, json)
}; };
// 删除盒子 // 删除盒子
const delBoxUrl = `${_baseUrl}api/admin/item/box/`; const delBoxUrl = `${_baseUrl}api/admin/item/box/`;
export const delBoxApi = function (id) { export const delBoxApi = function (id) {
return Vue.prototype.$del(`${delBoxUrl}${id}`) return Vue.prototype.$del(`${delBoxUrl}${id}`)
}; };
// 获取盒子详情 // 获取盒子详情
const getBoxDetailUrl = `${_baseUrl}api/admin/item/box/info/`; const getBoxDetailUrl = `${_baseUrl}api/admin/item/box/info/`;
export const getBoxDetailApi = function (id) { export const getBoxDetailApi = function (id) {
return Vue.prototype.$fetch(`${getBoxDetailUrl}${id}`) return Vue.prototype.$fetch(`${getBoxDetailUrl}${id}`)
}; };
// 更新盒子 // 更新盒子
const editBoxUrl = `${_baseUrl}api/admin/item/box/info/`; const editBoxUrl = `${_baseUrl}api/admin/item/box/info/`;
export const editBoxApi = function (id, json) { export const editBoxApi = function (id, json) {
return Vue.prototype.$put(`${editBoxUrl}${id}`, json) return Vue.prototype.$put(`${editBoxUrl}${id}`, json)
}; };
// 获取公众号菜单 // 获取公众号菜单
const getPublicMenuUrl = `${_baseUrl}api/admin/open/menu`; const getPublicMenuUrl = `${_baseUrl}api/admin/open/menu`;
export const getPublicMenuApi = function () { export const getPublicMenuApi = function () {
return Vue.prototype.$fetch(getPublicMenuUrl) return Vue.prototype.$fetch(getPublicMenuUrl)
}; };
// 添加公众号菜单 // 添加公众号菜单
export const savePublicMenuApi = function (json) { export const savePublicMenuApi = function (json) {
return Vue.prototype.$post(getPublicMenuUrl, json) return Vue.prototype.$post(getPublicMenuUrl, json)
}; };
// 获取配置列表 // 获取配置列表
const getConfigListUrl = `${_baseUrl}api/admin/sys/config/list`; const getConfigListUrl = `${_baseUrl}api/admin/sys/config/list`;
export const getConfigListApi = function (json) { export const getConfigListApi = function (json) {
return Vue.prototype.$fetch(getConfigListUrl, json) return Vue.prototype.$fetch(getConfigListUrl, json)
}; };
// 新增系统配置 // 新增系统配置
const saveConfigUrl = `${_baseUrl}api/admin/sys/config`; const saveConfigUrl = `${_baseUrl}api/admin/sys/config`;
export const saveConfigApi = function (json) { export const saveConfigApi = function (json) {
return Vue.prototype.$post(saveConfigUrl, json) return Vue.prototype.$post(saveConfigUrl, json)
}; };
// 更新关键词 // 更新关键词
const updateConfigUrl = `${_baseUrl}api/admin/sys/config`; const updateConfigUrl = `${_baseUrl}api/admin/sys/config`;
export const updateConfigApi = function (config_id, json) { export const updateConfigApi = function (config_id, json) {
return Vue.prototype.$put(`${updateConfigUrl}/${config_id}`, json) return Vue.prototype.$put(`${updateConfigUrl}/${config_id}`, json)
}; };
// 删除配置 // 删除配置
const delConfigUrl = `${_baseUrl}api/admin/sys/config/`; const delConfigUrl = `${_baseUrl}api/admin/sys/config/`;
export const deleteConfigApi = function (config_id) { export const deleteConfigApi = function (config_id) {
return Vue.prototype.$del(`${delConfigUrl}${config_id}`) return Vue.prototype.$del(`${delConfigUrl}${config_id}`)
}; };
// 获取配置详情 // 获取配置详情
const getConfigDetailUrl = `${_baseUrl}api/admin/sys/config/`; const getConfigDetailUrl = `${_baseUrl}api/admin/sys/config/`;
export const getConfigDetailApi = function (id) { export const getConfigDetailApi = function (id) {
return Vue.prototype.$fetch(`${getConfigDetailUrl}${id}`) return Vue.prototype.$fetch(`${getConfigDetailUrl}${id}`)
}; };
// 获取素材列表 // 获取素材列表
const getMediaListUrl = `${_baseUrl}api/admin/open/media/list`; const getMediaListUrl = `${_baseUrl}api/admin/open/media/list`;
export const getMediaListApi = function (json) { export const getMediaListApi = function (json) {
return Vue.prototype.$fetch(getMediaListUrl, json) return Vue.prototype.$fetch(getMediaListUrl, json)
}; };
// 文件上传 // 文件上传
const uploadFileUrl = `${_baseUrl}api/public/upload/zone`; const uploadFileUrl = `${_baseUrl}api/public/upload/zone`;
export const uploadFileApi = function (json) { export const uploadFileApi = function (json) {
return Vue.prototype.$upload(uploadFileUrl, json) return Vue.prototype.$upload(uploadFileUrl, json)
}; };
// 获取菜单列表 // 获取菜单列表
const getMenuListUrl = `${_baseUrl}api/admin/category/list/2`; const getMenuListUrl = `${_baseUrl}api/admin/category/list/2`;
export const getMenuListApi = function (json) { export const getMenuListApi = function (json) {
return Vue.prototype.$fetch(`${getMenuListUrl}`, json) return Vue.prototype.$fetch(`${getMenuListUrl}`, json)
}; };
// 新增菜单 // 新增菜单
const addMenuListUrl = `${_baseUrl}api/admin/category/add/2`; const addMenuListUrl = `${_baseUrl}api/admin/category/add/2`;
export const saveMenuApi = function (json) { export const saveMenuApi = function (json) {
return Vue.prototype.$post(addMenuListUrl, json) return Vue.prototype.$post(addMenuListUrl, json)
}; };
// 更改菜单 // 更改菜单
const updateMenuUrl = `${_baseUrl}api/admin/category/`; const updateMenuUrl = `${_baseUrl}api/admin/category/`;
export const updateMenuApi = function (id, json) { export const updateMenuApi = function (id, json) {
return Vue.prototype.$put(`${updateMenuUrl}${id}`, json) return Vue.prototype.$put(`${updateMenuUrl}${id}`, json)
}; };
// 删除菜单 // 删除菜单
export const delMenuApi = function (id) { export const delMenuApi = function (id) {
return Vue.prototype.$del(`${updateMenuUrl}${id}`) return Vue.prototype.$del(`${updateMenuUrl}${id}`)
}; };
// 获取权限列表 // 获取权限列表
const getRoleListUrl = `${_baseUrl}api/admin/role/list`; const getRoleListUrl = `${_baseUrl}api/admin/role/list`;
export const getRoleListApi = function (json) { export const getRoleListApi = function (json) {
return Vue.prototype.$fetch(`${getRoleListUrl}`, json) return Vue.prototype.$fetch(`${getRoleListUrl}`, json)
}; };
// 新增角色 // 新增角色
const addRoleUrl = `${_baseUrl}api/admin/role/add`; const addRoleUrl = `${_baseUrl}api/admin/role/add`;
export const saveRoleApi = function (json) { export const saveRoleApi = function (json) {
return Vue.prototype.$post(addRoleUrl, json) return Vue.prototype.$post(addRoleUrl, json)
}; };
// 更新权限 // 更新权限
const updateRoleUrl = `${_baseUrl}api/admin/role/info/`; const updateRoleUrl = `${_baseUrl}api/admin/role/info/`;
export const updateRoleApi = function (id, json) { export const updateRoleApi = function (id, json) {
return Vue.prototype.$put(`${updateRoleUrl}${id}`, json) return Vue.prototype.$put(`${updateRoleUrl}${id}`, json)
}; };
// 获取权限详情 // 获取权限详情
export const getRoleDetailApi = function (id) { export const getRoleDetailApi = function (id) {
return Vue.prototype.$fetch(`${updateRoleUrl}${id}`) return Vue.prototype.$fetch(`${updateRoleUrl}${id}`)
}; };
// 删除权限 // 删除权限
const delRoleUrl = `${_baseUrl}api/admin/role/`; const delRoleUrl = `${_baseUrl}api/admin/role/`;
export const delRoleApi = function (id) { export const delRoleApi = function (id) {
return Vue.prototype.$del(`${delRoleUrl}${id}`) return Vue.prototype.$del(`${delRoleUrl}${id}`)
}; };
// 获取banner列表 // 获取banner列表
const getBannerListUrl = `${_baseUrl}api/admin/banner/list/`; const getBannerListUrl = `${_baseUrl}api/admin/banner/list/`;
export const getBannerListApi = function (type, json) { export const getBannerListApi = function (type, json) {
return Vue.prototype.$fetch(getBannerListUrl + type, json) return Vue.prototype.$fetch(getBannerListUrl + type, json)
}; };
// 添加banner // 添加banner
const addBannerUrl = `${_baseUrl}api/admin/banner/add/`; const addBannerUrl = `${_baseUrl}api/admin/banner/add/`;
export const addBannerApi = function (type, json) { export const addBannerApi = function (type, json) {
return Vue.prototype.$post(addBannerUrl + type, json) return Vue.prototype.$post(addBannerUrl + type, json)
}; };
// 编辑banner // 编辑banner
const editBannerUrl = `${_baseUrl}api/admin/banner/info/`; const editBannerUrl = `${_baseUrl}api/admin/banner/info/`;
export const editBannerApi = function (id, json) { export const editBannerApi = function (id, json) {
return Vue.prototype.$put(`${editBannerUrl}${id}`, json) return Vue.prototype.$put(`${editBannerUrl}${id}`, json)
}; };
// 获取banner详情 // 获取banner详情
export const getBannerDetailApi = function (id) { export const getBannerDetailApi = function (id) {
return Vue.prototype.$fetch(`${editBannerUrl}${id}`) return Vue.prototype.$fetch(`${editBannerUrl}${id}`)
}; };
// 删除banner // 删除banner
const delBannerUrl = `${_baseUrl}api/admin/banner/`; const delBannerUrl = `${_baseUrl}api/admin/banner/`;
export const delBannerApi = function (id) { export const delBannerApi = function (id) {
return Vue.prototype.$del(`${delBannerUrl}${id}`) return Vue.prototype.$del(`${delBannerUrl}${id}`)
}; };
// 移动顺序 // 移动顺序
const moveUrl = `${_baseUrl}api/admin/banner/sort`; const moveUrl = `${_baseUrl}api/admin/banner/sort`;
export const moveApi = function (upId, downId) { export const moveApi = function (upId, downId) {
return Vue.prototype.$patch(`${moveUrl}`, { banner_up_id: upId, banner_down_id: downId }) return Vue.prototype.$patch(`${moveUrl}`, {banner_up_id: upId, banner_down_id: downId})
}; };
// 获取期数列表 // 获取期数列表
const getPeriodsUrl = `${_baseUrl}api/admin/periods/list`; const getPeriodsUrl = `${_baseUrl}api/admin/periods/list`;
export const getPeriodsApi = function (json) { export const getPeriodsApi = function (json) {
return Vue.prototype.$fetch(getPeriodsUrl, json) return Vue.prototype.$fetch(getPeriodsUrl, json)
}; };
// 添加期数 // 添加期数
const getAddPeriodsUrl = `${_baseUrl}api/admin/periods/add/`; const getAddPeriodsUrl = `${_baseUrl}api/admin/periods/add/`;
export const getAddPeriodsApi = function (id, json) { export const getAddPeriodsApi = function (id, json) {
return Vue.prototype.$post(`${getAddPeriodsUrl}${id}`, json) return Vue.prototype.$post(`${getAddPeriodsUrl}${id}`, json)
}; };
// 编辑期数 // 编辑期数
const getEditPeriodsUrl = `${_baseUrl}api/admin/periods/info/`; const getEditPeriodsUrl = `${_baseUrl}api/admin/periods/info/`;
export const getEditPeriodsApi = function (id, json) { export const getEditPeriodsApi = function (id, json) {
return Vue.prototype.$put(`${getEditPeriodsUrl}${id}`, json) return Vue.prototype.$put(`${getEditPeriodsUrl}${id}`, json)
}; };
// 删除期数 // 删除期数
const getDelPeriodUrl = `${_baseUrl}api/admin/periods/`; const getDelPeriodUrl = `${_baseUrl}api/admin/periods/`;
export const delPeriodApi = function (id) { export const delPeriodApi = function (id) {
return Vue.prototype.$del(`${getDelPeriodUrl}${id}`) return Vue.prototype.$del(`${getDelPeriodUrl}${id}`)
}; };
// 获取班级列表 // 获取班级列表
const getClassListUrl = `${_baseUrl}api/admin/periods/class/list/`; const getClassListUrl = `${_baseUrl}api/admin/periods/class/list/`;
export const getClassListApi = function (id, json, type) { export const getClassListApi = function (id, json, type) {
// let typeParams = type?type:0 // let typeParams = type?type:0
return Vue.prototype.$fetch(`${getClassListUrl}${id}`, json) return Vue.prototype.$fetch(`${getClassListUrl}${id}`, json)
}; };
// 获取当前期数下的老师列表 // 获取当前期数下的老师列表
const getPeriodsTeacherUrl = `${_baseUrl}api/admin/periods/teacher/list/`; const getPeriodsTeacherUrl = `${_baseUrl}api/admin/periods/teacher/list/`;
export const getPeriodsTeacherApi = function (id) { export const getPeriodsTeacherApi = function (id) {
return Vue.prototype.$fetch(`${getPeriodsTeacherUrl}${id}`) return Vue.prototype.$fetch(`${getPeriodsTeacherUrl}${id}`)
}; };
// 删除班级 // 删除班级
const delClassUrl = `${_baseUrl}api/admin/periods/class/`; const delClassUrl = `${_baseUrl}api/admin/periods/class/`;
export const delClassApi = function (id) { export const delClassApi = function (id) {
return Vue.prototype.$del(`${delClassUrl}${id}`) return Vue.prototype.$del(`${delClassUrl}${id}`)
}; };
// 添加班级 // 添加班级
const addClassUrl = `${_baseUrl}api/admin/periods/class/add/`; const addClassUrl = `${_baseUrl}api/admin/periods/class/add/`;
export const addClassApi = function (id, json) { export const addClassApi = function (id, json) {
return Vue.prototype.$post(`${addClassUrl}${id}`, json) return Vue.prototype.$post(`${addClassUrl}${id}`, json)
}; };
// 修改班级 // 修改班级
const editClassUrl = `${_baseUrl}api/admin/periods/class/info/`; const editClassUrl = `${_baseUrl}api/admin/periods/class/info/`;
export const editClassApi = function (id, json) { export const editClassApi = function (id, json) {
return Vue.prototype.$put(`${editClassUrl}${id}`, json) return Vue.prototype.$put(`${editClassUrl}${id}`, json)
}; };
// 获取班级详情 // 获取班级详情
const getClassDetailUrl = `${_baseUrl}api/admin/periods/class/info/`; const getClassDetailUrl = `${_baseUrl}api/admin/periods/class/info/`;
export const getClassDetailApi = function (id, json) { export const getClassDetailApi = function (id, json) {
return Vue.prototype.$fetch(`${getClassDetailUrl}${id}`, json) return Vue.prototype.$fetch(`${getClassDetailUrl}${id}`, json)
}; };
// 获取班级用户列表 // 获取班级用户列表
const getClassUserUrl = `${_baseUrl}api/admin/class/user/list/`; const getClassUserUrl = `${_baseUrl}api/admin/class/user/list/`;
export const getClassUserApi = function (id, json) { export const getClassUserApi = function (id, json) {
return Vue.prototype.$fetch(`${getClassUserUrl}${id}`, json) return Vue.prototype.$fetch(`${getClassUserUrl}${id}`, json)
}; };
// 添加班级用户 // 添加班级用户
const addClassUserUrl = `${_baseUrl}api/admin/class/user/add/`; const addClassUserUrl = `${_baseUrl}api/admin/class/user/add/`;
export const addClassUesrApi = function (classId, userId, json) { export const addClassUesrApi = function (classId, userId, json) {
return Vue.prototype.$post(`${addClassUserUrl}${classId}/${userId}`, json) return Vue.prototype.$post(`${addClassUserUrl}${classId}/${userId}`, json)
}; };
// 更改看课权限 // 更改看课权限
const changeUserUrl = `${_baseUrl}api/admin/class/user/`; const changeUserUrl = `${_baseUrl}api/admin/class/user/`;
export const changeUserApi = function (id, json) { export const changeUserApi = function (id, json) {
return Vue.prototype.$put(`${changeUserUrl}${id}`, json) return Vue.prototype.$put(`${changeUserUrl}${id}`, json)
}; };
// 添加是否添加老师权限 // 添加是否添加老师权限
const addUserTeacherUrl = `${_baseUrl}api/admin/class/user/teacher/`; const addUserTeacherUrl = `${_baseUrl}api/admin/class/user/teacher/`;
export const addUserTeacherApi = function (id, json) { export const addUserTeacherApi = function (id, json) {
return Vue.prototype.$put(`${addUserTeacherUrl}${id}`, json) return Vue.prototype.$put(`${addUserTeacherUrl}${id}`, json)
}; };
// 移除班级用户 // 移除班级用户
const delClassUserUrl = `${_baseUrl}api/admin/class/user/`; const delClassUserUrl = `${_baseUrl}api/admin/class/user/`;
export const delClassUserApi = function (id) { export const delClassUserApi = function (id) {
return Vue.prototype.$del(`${delClassUserUrl}${id}`) return Vue.prototype.$del(`${delClassUserUrl}${id}`)
}; };
// 获取订单列表 // 获取订单列表
const getOrderListUrl = `${_baseUrl}api/admin/order/list`; const getOrderListUrl = `${_baseUrl}api/admin/order/list`;
export const getOrderListApi = function (json) { export const getOrderListApi = function (json) {
return Vue.prototype.$fetch(getOrderListUrl, json) return Vue.prototype.$fetch(getOrderListUrl, json)
}; };
//手动添加订单 //手动添加订单
const setOrderUrl = `/api/admin/order`; const setOrderUrl = `/api/admin/order`;
export const setOrderApi = function (json) { export const setOrderApi = function (json) {
return Vue.prototype.$post(setOrderUrl, json) return Vue.prototype.$post(setOrderUrl, json)
} }
// 修改订单备注 // 修改订单备注
const editOrderDescUrl = `${_baseUrl}api/admin/order/desc/`; const editOrderDescUrl = `${_baseUrl}api/admin/order/desc/`;
export const editOrderDescApi = function (orderId, type, json) { export const editOrderDescApi = function (orderId, type, json) {
return Vue.prototype.$put(`${editOrderDescUrl}${orderId}/${type}`, json) return Vue.prototype.$put(`${editOrderDescUrl}${orderId}/${type}`, json)
}; };
// 给用户退款 // 给用户退款
const refundUrl = `${_baseUrl}api/admin/bill/refund/`; const refundUrl = `${_baseUrl}api/admin/bill/refund/`;
export const refundApi = function (id, json) { export const refundApi = function (id, json) {
return Vue.prototype.$post(`${refundUrl}${id}`, json) return Vue.prototype.$post(`${refundUrl}${id}`, json)
}; };
// 修改订单收货地址 // 修改订单收货地址
const editAddressUrl = `${_baseUrl}api/admin/order/address/`; const editAddressUrl = `${_baseUrl}api/admin/order/address/`;
export const editAddressApi = function (id, json) { export const editAddressApi = function (id, json) {
return Vue.prototype.$put(`${editAddressUrl}${id}`, json) return Vue.prototype.$put(`${editAddressUrl}${id}`, json)
}; };
// 提现审核 // 提现审核
const withdrawUrl = `${_baseUrl}/api/admin/order/withdraw/`; const withdrawUrl = `${_baseUrl}/api/admin/order/withdraw/`;
export const withdrawApi = function (id, json) { export const withdrawApi = function (id, json) {
return Vue.prototype.$post(`${withdrawUrl}${id}`, json) return Vue.prototype.$post(`${withdrawUrl}${id}`, json)
}; };
// 退款列表 // 退款列表
const getRefundListUrl = `${_baseUrl}api/admin/order/refund/list`; const getRefundListUrl = `${_baseUrl}api/admin/order/refund/list`;
export const getRefundListApi = function (json) { export const getRefundListApi = function (json) {
return Vue.prototype.$fetch(`${getRefundListUrl}`, json) return Vue.prototype.$fetch(`${getRefundListUrl}`, json)
}; };
// 提现列表 // 提现列表
const getWithdrawListUrl = `${_baseUrl}api/admin/order/withdraw/list`; const getWithdrawListUrl = `${_baseUrl}api/admin/order/withdraw/list`;
export const getWithdrawListApi = function (json) { export const getWithdrawListApi = function (json) {
return Vue.prototype.$fetch(`${getWithdrawListUrl}`, json) return Vue.prototype.$fetch(`${getWithdrawListUrl}`, json)
}; };
// 新增盒子类型 // 新增盒子类型
const addBoxTypeUrl = `${_baseUrl}api/admin/category/add/1`; const addBoxTypeUrl = `${_baseUrl}api/admin/category/add/1`;
export const addBoxTypeApi = function (json) { export const addBoxTypeApi = function (json) {
return Vue.prototype.$post(addBoxTypeUrl, json) return Vue.prototype.$post(addBoxTypeUrl, json)
}; };
// 用户关联老师 // 用户关联老师
const addRelatedTeacherUrl = `${_baseUrl}api/admin/student/bind/`; const addRelatedTeacherUrl = `${_baseUrl}api/admin/student/bind/`;
export const addRelatedTeacherApi = function (id, json) { export const addRelatedTeacherApi = function (id, json) {
return Vue.prototype.$put(`${addRelatedTeacherUrl}${id}`, json) return Vue.prototype.$put(`${addRelatedTeacherUrl}${id}`, json)
}; };
// 操作日志 // 操作日志
const getAdminLogListUrl = `${_baseUrl}api/admin/user/log`; const getAdminLogListUrl = `${_baseUrl}api/admin/user/log`;
export const getAdminLogLisApi = function (json) { export const getAdminLogLisApi = function (json) {
return Vue.prototype.$fetch(`${getAdminLogListUrl}`, json) return Vue.prototype.$fetch(`${getAdminLogListUrl}`, json)
}; };
// 清除缓存 // 清除缓存
const clearCacheListUrl = `/api/admin/redis/key`; const clearCacheListUrl = `/api/admin/redis/key`;
export const clearCacheListApi = function (json) { export const clearCacheListApi = function (json) {
return Vue.prototype.$del(`${clearCacheListUrl}/${json}`) return Vue.prototype.$del(`${clearCacheListUrl}/${json}`)
}; };
// 绑定其他商品 // 绑定其他商品
const bindOtherUrl = `${_baseUrl}api/admin/goods/bind/`; const bindOtherUrl = `${_baseUrl}api/admin/goods/bind/`;
export const bindOtherApi = function (goodsId, newGoodsId) { export const bindOtherApi = function (goodsId, newGoodsId) {
return Vue.prototype.$patch(`${bindOtherUrl}${goodsId}/${newGoodsId}`) return Vue.prototype.$patch(`${bindOtherUrl}${goodsId}/${newGoodsId}`)
}; };
// 冲突商品 // 冲突商品
const conflictUrl = `${_baseUrl}api/admin/goods/conflict/`; const conflictUrl = `${_baseUrl}api/admin/goods/conflict/`;
export const conflictApi = function (id, json) { export const conflictApi = function (id, json) {
return Vue.prototype.$patch(`${conflictUrl}${id}`, json) return Vue.prototype.$patch(`${conflictUrl}${id}`, json)
}; };
// 班级用户添加备注 // 班级用户添加备注
const addPeriodsClassUserDescUrl = `/api/admin/class/user/desc`; const addPeriodsClassUserDescUrl = `/api/admin/class/user/desc`;
export const addPeriodsClassUserDescApi = function (id, json) { export const addPeriodsClassUserDescApi = function (id, json) {
return Vue.prototype.$post(`${addPeriodsClassUserDescUrl}/${id}`, json) return Vue.prototype.$post(`${addPeriodsClassUserDescUrl}/${id}`, json)
}; };
// 复制商品 // 复制商品
const copyShopUrl = `/api/admin/goods/copy/`; const copyShopUrl = `/api/admin/goods/copy/`;
export const copyShopApi = function (id) { export const copyShopApi = function (id) {
return Vue.prototype.$post(`${copyShopUrl}${id}`) return Vue.prototype.$post(`${copyShopUrl}${id}`)
}; };
// 获取media详情 // 获取media详情
const getMediaUrl = `/api/admin/open/media/info`; const getMediaUrl = `/api/admin/open/media/info`;
export const getMediaApi = function (id) { export const getMediaApi = function (id) {
return Vue.prototype.$fetch(`${getMediaUrl}?media_id=${id}`) return Vue.prototype.$fetch(`${getMediaUrl}?media_id=${id}`)
}; };
// 期数数据统计 // 期数数据统计
const getPeriodsStatisticsUrl = '/api/admin/periods/statistics/'; const getPeriodsStatisticsUrl = '/api/admin/periods/statistics/';
export const getPeriodsStatisticsApi = function (id) { export const getPeriodsStatisticsApi = function (id) {
return Vue.prototype.$fetch(`${getPeriodsStatisticsUrl}${id}`) return Vue.prototype.$fetch(`${getPeriodsStatisticsUrl}${id}`)
}; };
// 班级数据统计 // 班级数据统计
const getClassStatisticsUrl = `/api/admin/periods/class/statistics/`; const getClassStatisticsUrl = `/api/admin/periods/class/statistics/`;
export const getClassStatisticsApi = function (periods_id, class_id, json) { export const getClassStatisticsApi = function (periods_id, class_id, json) {
return Vue.prototype.$fetch(`${getClassStatisticsUrl}${periods_id}/${class_id}`, json) return Vue.prototype.$fetch(`${getClassStatisticsUrl}${periods_id}/${class_id}`, json)
}; };
// 用户看课情况 // 用户看课情况
const userLookUrl = `/api/admin/user/static/list/`; const userLookUrl = `/api/admin/user/static/list/`;
export const userLookApi = function (periods_id, user_id, json) { export const userLookApi = function (periods_id, user_id, json) {
return Vue.prototype.$fetch(`${userLookUrl}${periods_id}/${user_id}`, json) return Vue.prototype.$fetch(`${userLookUrl}${periods_id}/${user_id}`, json)
}; };
//订单统计 //订单统计
const orderCountUrl = `/api/admin/order/statistics`; const orderCountUrl = `/api/admin/order/statistics`;
export const orderCountApi = function (json) { export const orderCountApi = function (json) {
return Vue.prototype.$fetch(orderCountUrl, json) return Vue.prototype.$fetch(orderCountUrl, json)
}; };
// 切换期数与班级 // 切换期数与班级
const changeClassUrl = `/api/admin/change/class`; const changeClassUrl = `/api/admin/change/class`;
export const changeClassApi = function (json) { export const changeClassApi = function (json) {
return Vue.prototype.$put(changeClassUrl, json) return Vue.prototype.$put(changeClassUrl, json)
}; };
// 创建微信推广二维码 // 创建微信推广二维码
const createQrCodeUrl = '/api/admin/create/wechat/qrcode'; const createQrCodeUrl = '/api/admin/create/wechat/qrcode';
export const createQrCodeApi = function (json) { export const createQrCodeApi = function (json) {
return Vue.prototype.$post(createQrCodeUrl, json) return Vue.prototype.$post(createQrCodeUrl, json)
}; };
// 获取公众号二维码 // 获取公众号二维码
const getQrCodeListUrl = '/api/admin/wechat/qrcode/list'; const getQrCodeListUrl = '/api/admin/wechat/qrcode/list';
export const getQrCodeListApi = function (json) { export const getQrCodeListApi = function (json) {
return Vue.prototype.$fetch(getQrCodeListUrl, json) return Vue.prototype.$fetch(getQrCodeListUrl, json)
}; };
// 每日关注取关统计 // 每日关注取关统计
const getWatchListUrl = '/api/admin/open/subscribe/statistics'; const getWatchListUrl = '/api/admin/open/subscribe/statistics';
export const getWatchListApi = function (json) { export const getWatchListApi = function (json) {
return Vue.prototype.$fetch(getWatchListUrl, json) return Vue.prototype.$fetch(getWatchListUrl, json)
}; };
// 获取群发结果 // 获取群发结果
// const getMsgListUrl = '/api/admin/open/muti/msg'; // const getMsgListUrl = '/api/admin/open/muti/msg';
...@@ -590,109 +596,125 @@ export const getWatchListApi = function (json) { ...@@ -590,109 +596,125 @@ export const getWatchListApi = function (json) {
// 获取微信授权 // 获取微信授权
const getwechatParamUrl = `${_baseUrl}api/client/jssdk`; const getwechatParamUrl = `${_baseUrl}api/client/jssdk`;
export const getwechatParam = function (json) { export const getwechatParam = function (json) {
return Vue.prototype.$fetch(getwechatParamUrl, json) return Vue.prototype.$fetch(getwechatParamUrl, json)
}; };
// 默认当前体验营期数 // 默认当前体验营期数
const getDefaultPeriodsUrl = '/api/admin/periods/default'; const getDefaultPeriodsUrl = '/api/admin/periods/default';
export const getDefaultPeriodsApi = function () { export const getDefaultPeriodsApi = function () {
return Vue.prototype.$fetch(getDefaultPeriodsUrl) return Vue.prototype.$fetch(getDefaultPeriodsUrl)
}; };
// 修改二维码管理 // 修改二维码管理
const updateQrCodeUrl = '/api/admin/wechat/qrcode'; const updateQrCodeUrl = '/api/admin/wechat/qrcode';
export const updateQrCodeApi = function (id, json) { export const updateQrCodeApi = function (id, json) {
return Vue.prototype.$put(`${updateQrCodeUrl}/${id}`, json) return Vue.prototype.$put(`${updateQrCodeUrl}/${id}`, json)
}; };
// 获取二维码列表详情 // 获取二维码列表详情
const getQrCodeDetailUrl = '/api/admin/wechat/qrcode'; const getQrCodeDetailUrl = '/api/admin/wechat/qrcode';
export const getQrCodeDetailUrlApi = function (id) { export const getQrCodeDetailUrlApi = function (id) {
return Vue.prototype.$fetch(`${getQrCodeDetailUrl}/${id}`) return Vue.prototype.$fetch(`${getQrCodeDetailUrl}/${id}`)
}; };
const getAdsListlUrl = '/api/public/ads/list'; const getAdsListlUrl = '/api/public/ads/list';
export const getAdsListApi = function (json) { export const getAdsListApi = function (json) {
return Vue.prototype.$fetch(getAdsListlUrl, json) return Vue.prototype.$fetch(getAdsListlUrl, json)
}; };
const getAdsInnerListUrl = '/api/admin/ads/list'; const getAdsInnerListUrl = '/api/admin/ads/list';
export const getAdsInnerListApi = function (json) { export const getAdsInnerListApi = function (json) {
return Vue.prototype.$fetch(getAdsInnerListUrl, json) return Vue.prototype.$fetch(getAdsInnerListUrl, json)
}; };
// 外部投放修改备注 // 外部投放修改备注
const updateAdsInnerUrl = '/api/admin/ads'; const updateAdsInnerUrl = '/api/admin/ads';
export const updateAdsInnerApi = function (id, json) { export const updateAdsInnerApi = function (id, json) {
return Vue.prototype.$put(`${updateAdsInnerUrl}/${id}`, json) return Vue.prototype.$put(`${updateAdsInnerUrl}/${id}`, json)
}; };
// 外部投放批量修改备注 // 外部投放批量修改备注
const updateAdsInnerPlUrl = '/api/admin/ads/multi/desc'; const updateAdsInnerPlUrl = '/api/admin/ads/multi/desc';
export const updateAdsInnerPlApi = function (json) { export const updateAdsInnerPlApi = function (json) {
return Vue.prototype.$put(`${updateAdsInnerPlUrl}`, json) return Vue.prototype.$put(`${updateAdsInnerPlUrl}`, json)
}; };
// 订单使用红包列表 // 订单使用红包列表
const getCouponListUrl = '/api/admin/order/coupon'; const getCouponListUrl = '/api/admin/order/coupon';
export const getCouponListApi = function (json) { export const getCouponListApi = function (json) {
return Vue.prototype.$fetch(getCouponListUrl, json) return Vue.prototype.$fetch(getCouponListUrl, json)
}; };
// 更新二维码备注 // 更新二维码备注
const updateQrcodeDescUrl = '/api/admin/wechat/qrcode/desc'; const updateQrcodeDescUrl = '/api/admin/wechat/qrcode/desc';
export const updateQrcodeDescApi = function (id, json) { export const updateQrcodeDescApi = function (id, json) {
return Vue.prototype.$put(`${updateQrcodeDescUrl}/${id}`, json) return Vue.prototype.$put(`${updateQrcodeDescUrl}/${id}`, json)
}; };
// banner上下架 // banner上下架
const bannerChangeStatusUrl = `/api/admin/banner/status/`; const bannerChangeStatusUrl = `/api/admin/banner/status/`;
export const bannerChangeStatusApi = function (id, json) { export const bannerChangeStatusApi = function (id, json) {
return Vue.prototype.$put(`${bannerChangeStatusUrl}${id}`, json) return Vue.prototype.$put(`${bannerChangeStatusUrl}${id}`, json)
}; };
// 微信用户数据分析 // 微信用户数据分析
const getWechatStatisticListUrl = '/api/admin/wechat/statistics'; const getWechatStatisticListUrl = '/api/admin/wechat/statistics';
export const getWechatStatisticListApi = function (json) { export const getWechatStatisticListApi = function (json) {
return Vue.prototype.$fetch(getWechatStatisticListUrl, json) return Vue.prototype.$fetch(getWechatStatisticListUrl, json)
}; };
// 同步用户手机号 // 同步用户手机号
const getSyncUserUrl = '/api/admin/student/mobile'; const getSyncUserUrl = '/api/admin/student/mobile';
export const getSyncUserApi = function (json) { export const getSyncUserApi = function (json) {
return Vue.prototype.$fetch(getSyncUserUrl, json) return Vue.prototype.$fetch(getSyncUserUrl, json)
}; };
// 获取关注统计详情 // 获取关注统计详情
const getStatisticsDetailUrl = '/api/admin/open/subscribe/statistics/detail'; const getStatisticsDetailUrl = '/api/admin/open/subscribe/statistics/detail';
export const getStatisticsDetailApi = function (json) { export const getStatisticsDetailApi = function (json) {
return Vue.prototype.$fetch(getStatisticsDetailUrl, json) return Vue.prototype.$fetch(getStatisticsDetailUrl, json)
}; };
// 修改商品备注 // 修改商品备注
const editGoodsDescUrl = `/api/admin/goods/info/desc/`; const editGoodsDescUrl = `/api/admin/goods/info/desc/`;
export const editGoodsDescApi = function (goodsId, json) { export const editGoodsDescApi = function (goodsId, json) {
return Vue.prototype.$put(`${editGoodsDescUrl}${goodsId}`, json) return Vue.prototype.$put(`${editGoodsDescUrl}${goodsId}`, json)
}; };
// 管理员密码修改 // 管理员密码修改
const editAdminPasswordUrl = `/api/admin/user/passwd`; const editAdminPasswordUrl = `/api/admin/user/passwd`;
export const editAdminPasswordApi = function (json) { export const editAdminPasswordApi = function (json) {
return Vue.prototype.$patch(editAdminPasswordUrl, json) return Vue.prototype.$patch(editAdminPasswordUrl, json)
}; };
// 导出 // 导出
function exportExcel(form) { function exportExcel(form) {
return axios({ // 用axios发送post请求 return axios({ // 用axios发送post请求
method: 'post', method: 'post',
url: form.url, // 请求地址 url: form.url, // 请求地址
data: form.params, // 参数 data: form.params, // 参数
responseType: 'blob', // 表明返回服务器返回的数据类型 responseType: 'blob', // 表明返回服务器返回的数据类型
headers: { headers: {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}
})
// return Vue.prototype.$post(form.url, form.params)
}
export const exportExcelApi = function (url,params,fname) {
url = `${url}`;
let obj = {
'url' : url,
params:params
} }
exportExcel(obj).then(res => { // 处理返回的文件流 })
// return Vue.prototype.$post(form.url, form.params)
}
export const exportExcelApi = function (url, params, fname) {
url = `${url}`;
let obj = {
'url': url,
params: params
}
exportExcel(obj).then(res => { // 处理返回的文件流
console.log(res) console.log(res)
let blob = new Blob([res.data], {type: 'text/csv'}) let blob = new Blob([res.data], {type: res.data.type}), filename;
console.log(res.headers['content-disposition'].split('filename=')[1]) //console.log(res.headers['content-disposition'].split('filename=')[1])
CommonJs.dateFmt(new Date(),"yyyy-MM-dd") //CommonJs.dateFmt(new Date(), "yyyy-MM-dd")
let filename = fname+CommonJs.dateFmt(new Date(),"yyyy-MM-dd")+'.xls' if (!fname && res.headers['content-disposition'].split('filename=')[1]) {
let str = res.headers['content-disposition'].split('filename=')[1];
if (str[str.length - 1] == '"' || str[str.length - 1] == "'") {
//str = str.substring(-1,(str.length-1));
str = str.replace(/\"|\'/g, "")
}
if (str.indexOf('.xls') > -1) {
filename = str
} else {
filename = str + '.xls'
}
} else {
filename = fname + CommonJs.dateFmt(new Date(), "yyyy-MM-dd") + '.xls'
}
console.log('filename: ' + filename);
var link = document.createElement('a'); var link = document.createElement('a');
link.href = window.URL.createObjectURL(blob); link.href = window.URL.createObjectURL(blob);
link.download = filename; link.download = filename;
...@@ -703,567 +725,567 @@ export const exportExcelApi = function (url,params,fname) { ...@@ -703,567 +725,567 @@ export const exportExcelApi = function (url,params,fname) {
//按期数导出收货信息 //按期数导出收货信息
const exportReceiveInfoUrl = `${_baseUrl}api/admin/order/deliver/periods/export/`; const exportReceiveInfoUrl = `${_baseUrl}api/admin/order/deliver/periods/export/`;
export const exportReceiveInfoApi = function (periods_id) { export const exportReceiveInfoApi = function (periods_id) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj = { let obj = {
'url' :`${exportReceiveInfoUrl}${periods_id}`, 'url': `${exportReceiveInfoUrl}${periods_id}`,
params:{} params: {}
} }
exportExcel(obj).then(res => { // 处理返回的文件流 exportExcel(obj).then(res => { // 处理返回的文件流
console.log(res) console.log(res)
let blob = new Blob([res.data], {type: 'text/csv'}) let blob = new Blob([res.data], {type: 'text/csv'})
console.log(res.headers['content-disposition'].split('filename=')[1]) console.log(res.headers['content-disposition'].split('filename=')[1])
CommonJs.dateFmt(new Date(),"yyyy-MM-dd") //CommonJs.dateFmt(new Date(), "yyyy-MM-dd")
let filename = '收货信息'+CommonJs.dateFmt(new Date(),"yyyy-MM-dd")+'.xls' let filename = '收货信息' + CommonJs.dateFmt(new Date(), "yyyy-MM-dd") + '.xls'
var link = document.createElement('a'); var link = document.createElement('a');
link.href = window.URL.createObjectURL(blob); link.href = window.URL.createObjectURL(blob);
link.download = filename; link.download = filename;
link.click(); link.click();
window.URL.revokeObjectURL(blob); window.URL.revokeObjectURL(blob);
})
resolve();
}) })
resolve();
})
}; };
// 来源码列表 // 来源码列表
const getSourceListUrl = '/api/admin/code/rule'; const getSourceListUrl = '/api/admin/code/rule';
export const getSourceListApi = function (json) { export const getSourceListApi = function (json) {
return Vue.prototype.$fetch(getSourceListUrl, json) return Vue.prototype.$fetch(getSourceListUrl, json)
}; };
// 添加来源码 // 添加来源码
const addSourceUrl = '/api/admin/code/rule'; const addSourceUrl = '/api/admin/code/rule';
export const addSourceApi = function (json) { export const addSourceApi = function (json) {
return Vue.prototype.$post(addSourceUrl, json) return Vue.prototype.$post(addSourceUrl, json)
}; };
// 修改来源码 // 修改来源码
const updateSourceUrl = '/api/admin/code/rule'; const updateSourceUrl = '/api/admin/code/rule';
export const updateSourceApi = function (id, json) { export const updateSourceApi = function (id, json) {
return Vue.prototype.$put(`${updateSourceUrl}/${id}`, json) return Vue.prototype.$put(`${updateSourceUrl}/${id}`, json)
}; };
// 删除来源码 // 删除来源码
const delSourceUrl = `/api/admin/code/rule/`; const delSourceUrl = `/api/admin/code/rule/`;
export const delSourceApi = function (id) { export const delSourceApi = function (id) {
return Vue.prototype.$del(`${delSourceUrl}${id}`) return Vue.prototype.$del(`${delSourceUrl}${id}`)
}; };
// 修改商品购买数量 // 修改商品购买数量
const updateGoodsNumberUrl = '/api/admin/goods/buy/nums'; const updateGoodsNumberUrl = '/api/admin/goods/buy/nums';
export const updateGoodsNumbeApi = function (id, json) { export const updateGoodsNumbeApi = function (id, json) {
return Vue.prototype.$put(`${updateGoodsNumberUrl}/${id}`, json) return Vue.prototype.$put(`${updateGoodsNumberUrl}/${id}`, json)
}; };
// 获取班级用户备注列表 // 获取班级用户备注列表
const getUserDescListUrl = '/api/admin/class/user/desc/'; const getUserDescListUrl = '/api/admin/class/user/desc/';
export const getUserDescListApi = function (id, json) { export const getUserDescListApi = function (id, json) {
return Vue.prototype.$fetch(`${getUserDescListUrl}${id}`, json) return Vue.prototype.$fetch(`${getUserDescListUrl}${id}`, json)
}; };
// 更改用户看课权限,添加老师,意向等级 // 更改用户看课权限,添加老师,意向等级
const updateUserPrivilegeUrl = '/api/admin/class/user'; const updateUserPrivilegeUrl = '/api/admin/class/user';
export const updateUserPrivilegeApi = function (id, json) { export const updateUserPrivilegeApi = function (id, json) {
return Vue.prototype.$put(`${updateUserPrivilegeUrl}/${id}`, json) return Vue.prototype.$put(`${updateUserPrivilegeUrl}/${id}`, json)
}; };
// 修改订单推广人信息 // 修改订单推广人信息
const updateOrderTeacherUrl = '/api/admin/order/invite'; const updateOrderTeacherUrl = '/api/admin/order/invite';
export const updateOrderTeacherApi = function (id, teacherId) { export const updateOrderTeacherApi = function (id, teacherId) {
return Vue.prototype.$put(`${updateOrderTeacherUrl}/${id}/${teacherId}`) return Vue.prototype.$put(`${updateOrderTeacherUrl}/${id}/${teacherId}`)
}; };
// 用户提现 api/admin/bill/pay/to/user // 用户提现 api/admin/bill/pay/to/user
const payToUserUrl = '/api/admin/bill/pay/to/user'; const payToUserUrl = '/api/admin/bill/pay/to/user';
export const payToUserApi = function (json) { export const payToUserApi = function (json) {
return Vue.prototype.$post(payToUserUrl, json) return Vue.prototype.$post(payToUserUrl, json)
}; };
// 获取班主任业绩总排行 // 获取班主任业绩总排行
const getTeacherRankListUrl = '/api/admin/teacher/performance'; const getTeacherRankListUrl = '/api/admin/teacher/performance';
export const getTeacherRankListApi = function (json) { export const getTeacherRankListApi = function (json) {
return Vue.prototype.$fetch(`${getTeacherRankListUrl}`, json) return Vue.prototype.$fetch(`${getTeacherRankListUrl}`, json)
}; };
// 班主任业绩排行按天 // 班主任业绩排行按天
const getTeacherDayRankListUrl = '/api/admin/teacher/performance/day'; const getTeacherDayRankListUrl = '/api/admin/teacher/performance/day';
export const getTeacherDayRankListApi = function (json) { export const getTeacherDayRankListApi = function (json) {
return Vue.prototype.$fetch(`${getTeacherDayRankListUrl}`, json) return Vue.prototype.$fetch(`${getTeacherDayRankListUrl}`, json)
}; };
// 老师绑定用户 // 老师绑定用户
const teacherBindUserUrl = '/api/admin/teacher/bind'; const teacherBindUserUrl = '/api/admin/teacher/bind';
export const teacherBindUserApi = function (id, json) { export const teacherBindUserApi = function (id, json) {
return Vue.prototype.$put(`${teacherBindUserUrl}/${id}`, json) return Vue.prototype.$put(`${teacherBindUserUrl}/${id}`, json)
}; };
// 获取老师加用户数,用户老师数 // 获取老师加用户数,用户老师数
const getJoinNumUrl = '/api/admin/class/teacher/group/num/'; const getJoinNumUrl = '/api/admin/class/teacher/group/num/';
export const getJoinNumApi = function (id) { export const getJoinNumApi = function (id) {
return Vue.prototype.$fetch(`${getJoinNumUrl}${id}`) return Vue.prototype.$fetch(`${getJoinNumUrl}${id}`)
}; };
//获取短网址 //获取短网址
const getLinkUrl = `/api/public/short/url`; const getLinkUrl = `/api/public/short/url`;
export const getLinkApi = function (json) { export const getLinkApi = function (json) {
return Vue.prototype.$fetch(`${getLinkUrl}`, json) return Vue.prototype.$fetch(`${getLinkUrl}`, json)
}; };
//获取二维码 //获取二维码
const getqrCodeUrl = `${_baseUrl}api/public/qrcode`; const getqrCodeUrl = `${_baseUrl}api/public/qrcode`;
export const getqrCodeApi = function (json) { export const getqrCodeApi = function (json) {
return Vue.prototype.$fetch(`${getqrCodeUrl}`, json) return Vue.prototype.$fetch(`${getqrCodeUrl}`, json)
}; };
//设置系统指定配置 //设置系统指定配置
const putConfigUrl = `/api/admin/tools/config`; const putConfigUrl = `/api/admin/tools/config`;
export const putConfigApi = function (json) { export const putConfigApi = function (json) {
return Vue.prototype.$put(`${putConfigUrl}`, json) return Vue.prototype.$put(`${putConfigUrl}`, json)
}; };
//用户领取课程日志 //用户领取课程日志
const getClassConfigUrl = `/api/admin/user/receive/course/log`; const getClassConfigUrl = `/api/admin/user/receive/course/log`;
export const getClassConfigApi = function (json) { export const getClassConfigApi = function (json) {
return Vue.prototype.$fetch(`${getClassConfigUrl}`, json) return Vue.prototype.$fetch(`${getClassConfigUrl}`, json)
}; };
//扫码入课编辑备注 //扫码入课编辑备注
const updateDescUrl = `/api/admin/user/receive/course/log/desc/`; 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) return Vue.prototype.$put(`${updateDescUrl}${id}`, json)
}; };
//短信发送记录 //短信发送记录
const getsmsRecordUrl = `/api/admin/sms/log/list`; const getsmsRecordUrl = `/api/admin/sms/log/list`;
export const getsmsRecordApi = function (json) { export const getsmsRecordApi = function (json) {
return Vue.prototype.$fetch(`${getsmsRecordUrl}`, json) return Vue.prototype.$fetch(`${getsmsRecordUrl}`, json)
}; };
//云集订单列表 //云集订单列表
const getyunjiUrl = `/api/admin/yunji/order`; const getyunjiUrl = `/api/admin/yunji/order`;
export const getyunjiApi = function (json) { export const getyunjiApi = function (json) {
return Vue.prototype.$fetch(`${getyunjiUrl}`, json) return Vue.prototype.$fetch(`${getyunjiUrl}`, json)
}; };
//云集绑定老师 //云集绑定老师
const bindTeacherUrl = `/api/admin/yunji/order/bind/teacher/`; 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}`) return Vue.prototype.$put(`${bindTeacherUrl}${json}/${id}`)
}; };
//云集订单备注 //云集订单备注
const orderDescUrl = `/api/admin/yunji/order/desc/`; const orderDescUrl = `/api/admin/yunji/order/desc/`;
export const orderDescApi = function (json, id) { export const orderDescApi = function (json, id) {
return Vue.prototype.$put(`${orderDescUrl}${id}`, json) return Vue.prototype.$put(`${orderDescUrl}${id}`, json)
}; };
//老师销卖课程列表 //老师销卖课程列表
const getTeacherClassUrl = `/api/admin/teacher/performance/course/`; const getTeacherClassUrl = `/api/admin/teacher/performance/course/`;
export const getTeacherClassApi = function (json, id) { export const getTeacherClassApi = function (json, id) {
return Vue.prototype.$fetch(`${getTeacherClassUrl}${id}`, json) return Vue.prototype.$fetch(`${getTeacherClassUrl}${id}`, json)
}; };
//老系统用户列表 //老系统用户列表
const getOldListUrl = `/api/admin/student/course/old/sys/`; const getOldListUrl = `/api/admin/student/course/old/sys/`;
export const getOldListApi = function (json) { export const getOldListApi = function (json) {
return Vue.prototype.$fetch(getOldListUrl, json) return Vue.prototype.$fetch(getOldListUrl, json)
}; };
//删除老系统用户 //删除老系统用户
const delOldUseUrl = `/api/admin/student/course/old/sys/`; const delOldUseUrl = `/api/admin/student/course/old/sys/`;
export const delOldUseApi = function (id) { export const delOldUseApi = function (id) {
return Vue.prototype.$del(`${delOldUseUrl}${id}`) return Vue.prototype.$del(`${delOldUseUrl}${id}`)
}; };
// 存储预览课程数据 // 存储预览课程数据
const saveViewDataUrl = '/api/admin/element/view/'; const saveViewDataUrl = '/api/admin/element/view/';
export const saveViewDataApi = function (id, json) { export const saveViewDataApi = function (id, json) {
return Vue.prototype.$post(`${saveViewDataUrl}${id}`, json) return Vue.prototype.$post(`${saveViewDataUrl}${id}`, json)
}; };
// 获取课程预览内容 // 获取课程预览内容
const getViewDataUrl = '/api/admin/element/view/'; const getViewDataUrl = '/api/admin/element/view/';
export const getViewDataApi = function (id) { export const getViewDataApi = function (id) {
return Vue.prototype.$fetch(`${getViewDataUrl}${id}`) return Vue.prototype.$fetch(`${getViewDataUrl}${id}`)
}; };
// 获取用户积分列表 // 获取用户积分列表
const getIntegralListUrl = '/api/admin/student/integral'; const getIntegralListUrl = '/api/admin/student/integral';
export const getIntegralListApi = function (json) { export const getIntegralListApi = function (json) {
return Vue.prototype.$fetch(getIntegralListUrl, json) return Vue.prototype.$fetch(getIntegralListUrl, json)
}; };
// 积分变更 // 积分变更
const changeIntegralUrl = '/api/admin/student/integral'; const changeIntegralUrl = '/api/admin/student/integral';
export const changeIntegralApi = function (json) { 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) { 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`; const getExchangeListUrl = `/api/admin/exchange/list`;
export const getExchangeListApi = function (json) { export const getExchangeListApi = function (json) {
return Vue.prototype.$fetch(getExchangeListUrl, json) return Vue.prototype.$fetch(getExchangeListUrl, json)
}; };
// 生成兑换码 // 生成兑换码
const addExchangeUrl = `/api/admin/exchange/add`; const addExchangeUrl = `/api/admin/exchange/add`;
export const addExchangeApi = function (json) { export const addExchangeApi = function (json) {
return Vue.prototype.$post(addExchangeUrl, json) return Vue.prototype.$post(addExchangeUrl, json)
}; };
// 兑换码详情 // 兑换码详情
const exchangeDetailUrl = '/api/admin/exchange/detail/'; const exchangeDetailUrl = '/api/admin/exchange/detail/';
export const exchangeDetailApi = function (id, json) { 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/`; const editExchangeUrl = `/api/admin/exchange/edit/`;
export const editExchangeApi = function (id, json) { 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/`; const editUserWeightUrl = `/api/admin/class/user/weight/`;
export const editUserWeightApi = function (id, weight, json) { export const editUserWeightApi = function (id, weight, json) {
return Vue.prototype.$put(editUserWeightUrl + id + '/' + weight, json) return Vue.prototype.$put(editUserWeightUrl + id + '/' + weight, json)
}; };
// 修改用户看课权限 // 修改用户看课权限
const editUserViewCourseUrl = `/api/admin/class/user/view/course/`; const editUserViewCourseUrl = `/api/admin/class/user/view/course/`;
export const editUserViewCourseApi = function (id, is_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 添加好友 // 班主任任务1 添加好友
const task1Url = `/api/admin/teacher/task1/`; const task1Url = `/api/admin/teacher/task1/`;
export const task1Api = function (id) { export const task1Api = function (id) {
return Vue.prototype.$fetch(task1Url + id) return Vue.prototype.$fetch(task1Url + id)
}; };
// 班主任任务2 意向等级 // 班主任任务2 意向等级
const task2Url = `/api/admin/teacher/task2/`; const task2Url = `/api/admin/teacher/task2/`;
export const task2Api = function (id) { export const task2Api = function (id) {
return Vue.prototype.$fetch(task2Url + id) return Vue.prototype.$fetch(task2Url + id)
}; };
// 班主任任务3 用户召回 // 班主任任务3 用户召回
const task3Url = `/api/admin/teacher/task3/`; const task3Url = `/api/admin/teacher/task3/`;
export const task3Api = function (id) { export const task3Api = function (id) {
return Vue.prototype.$fetch(task3Url + id) return Vue.prototype.$fetch(task3Url + id)
}; };
// 班主任任务5 活跃用户跟踪 // 班主任任务5 活跃用户跟踪
const task5Url = `/api/admin/teacher/task5/`; const task5Url = `/api/admin/teacher/task5/`;
export const task5Api = function (id) { 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/`; const getOverWatchListUrl = `/api/admin/class/user/over/watch/list/`;
export const getOverWatchListApi = function (periods_id, teacher_id, json) { 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/`; const getRecallUrl = `/api/admin/class/user/recall/list/`;
export const getRecallListApi = function (periods_id, teacher_id, json) { 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/`; const getWatchUserUrl = `/api/admin/class/user/watch/list/`;
export const getWatchUserApi = function (periods_id, teacher_id, json) { 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 // 班主任任务4
const task4Url = '/api/admin/teacher/task4/'; const task4Url = '/api/admin/teacher/task4/';
export const task4Api = function (teacher_id) { export const task4Api = function (teacher_id) {
return Vue.prototype.$fetch(task4Url + teacher_id) return Vue.prototype.$fetch(task4Url + teacher_id)
}; };
// 班主任任务6 // 班主任任务6
const task6Url = '/api/admin/teacher/task6/'; const task6Url = '/api/admin/teacher/task6/';
export const task6Api = function (teacher_id, json) { export const task6Api = function (teacher_id, json) {
return Vue.prototype.$fetch(task6Url + teacher_id, json) return Vue.prototype.$fetch(task6Url + teacher_id, json)
}; };
// 班主任任务7 // 班主任任务7
const task7Url = '/api/admin/teacher/task7/'; const task7Url = '/api/admin/teacher/task7/';
export const task7Api = function (teacher_id, json) { export const task7Api = function (teacher_id, json) {
return Vue.prototype.$fetch(task7Url + teacher_id, json) return Vue.prototype.$fetch(task7Url + teacher_id, json)
}; };
// 批量添加备注 // 批量添加备注
const allDescUrl = `/api/admin/class/user/desc/multiple`; const allDescUrl = `/api/admin/class/user/desc/multiple`;
export const allDescApi = function (json) { export const allDescApi = function (json) {
return Vue.prototype.$post(allDescUrl, json) return Vue.prototype.$post(allDescUrl, json)
}; };
// 修改用户回复 // 修改用户回复
const editUserReplyUrl = `/api/admin/class/user/desc/`; const editUserReplyUrl = `/api/admin/class/user/desc/`;
export const editUserReplyApi = function (id, json) { export const editUserReplyApi = function (id, json) {
return Vue.prototype.$put(editUserReplyUrl + id, json) return Vue.prototype.$put(editUserReplyUrl + id, json)
}; };
// 用户积分排行 // 用户积分排行
const integralUrl = '/api/admin/student/integral/hot/blog'; const integralUrl = '/api/admin/student/integral/hot/blog';
export const integralApi = function (json) { export const integralApi = function (json) {
return Vue.prototype.$fetch(integralUrl, json) return Vue.prototype.$fetch(integralUrl, json)
}; };
// 外部订单批量指定老师邀请激活 // 外部订单批量指定老师邀请激活
const yunjiOrderTeacherUrl = '/api/admin/yunji/order/teacher/'; const yunjiOrderTeacherUrl = '/api/admin/yunji/order/teacher/';
export const yunjiOrderTeacherApi = function (id, json) { 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'; const getPeriodsClassCurDataUrl = '/api/admin/periods/class/cur/data';
export const getPeriodsClassCurDataApi = function (json) { 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`; const multiUrl = `/api/admin/yunji/order/multi/desc`;
export const multiApi = function (json) { export const multiApi = function (json) {
return Vue.prototype.$put(multiUrl, json) return Vue.prototype.$put(multiUrl, json)
}; };
// 获取当前市场招生数据 // 获取当前市场招生数据
const getSourceByDateUrl = '/api/admin/user/static/list'; const getSourceByDateUrl = '/api/admin/user/static/list';
export const getSourceByDateApi = function (periods_id, user_id, json) { export const getSourceByDateApi = function (periods_id, user_id, json) {
console.log(periods_id, user_id) console.log(periods_id, user_id)
return Vue.prototype.$fetch(`${getSourceByDateUrl}/${periods_id}/${user_id}/v2`, json) return Vue.prototype.$fetch(`${getSourceByDateUrl}/${periods_id}/${user_id}/v2`, json)
}; };
// 批量添加备注 // 批量添加备注
const sendMsgUrl = `/api/admin/multi/msg/user`; const sendMsgUrl = `/api/admin/multi/msg/user`;
export const sendMsgApi = function (json) { export const sendMsgApi = function (json) {
return Vue.prototype.$post(sendMsgUrl, json) return Vue.prototype.$post(sendMsgUrl, json)
}; };
const getMsgListUrl = `/api/admin/muti/msg/list`; const getMsgListUrl = `/api/admin/muti/msg/list`;
export const getMsgListApi = function (json) { export const getMsgListApi = function (json) {
return Vue.prototype.$fetch(getMsgListUrl, json) return Vue.prototype.$fetch(getMsgListUrl, json)
}; };
const getMsgCountUrl = `/api/admin/multi/msg/user`; const getMsgCountUrl = `/api/admin/multi/msg/user`;
export const getMsgCountApi = function (json) { export const getMsgCountApi = function (json) {
return Vue.prototype.$fetch(`${getMsgCountUrl}`, json) return Vue.prototype.$fetch(`${getMsgCountUrl}`, json)
}; };
const updateFansUrl = `/api/admin/init/fans/info`; const updateFansUrl = `/api/admin/init/fans/info`;
export const updateFansApi = function (json) { 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`; const updateContactUrl = `/api/admin/other/order/user/status`;
export const updateContactApi = function (json) { export const updateContactApi = function (json) {
return Vue.prototype.$put(`${updateContactUrl}`, json) return Vue.prototype.$put(`${updateContactUrl}`, json)
}; };
// 外部渠道批量指派订单老师 // 外部渠道批量指派订单老师
const adsTeacherUrl = `/api/admin/ads/teacher/`; const adsTeacherUrl = `/api/admin/ads/teacher/`;
export const adsTeacherApi = function (id, json) { export const adsTeacherApi = function (id, json) {
return Vue.prototype.$put(`${adsTeacherUrl}${id}`, json) return Vue.prototype.$put(`${adsTeacherUrl}${id}`, json)
}; };
// 更新外部渠道沟通状态 // 更新外部渠道沟通状态
const updateAdsStatusUrl = `/api/admin/ads/user/status`; const updateAdsStatusUrl = `/api/admin/ads/user/status`;
export const updateAdsStatusApi = function (json) { export const updateAdsStatusApi = function (json) {
return Vue.prototype.$put(`${updateAdsStatusUrl}`, json) return Vue.prototype.$put(`${updateAdsStatusUrl}`, json)
}; };
// 更新外部订单地址 // 更新外部订单地址
const editOrderAdressUrl = '/api/admin/order/address/other/'; const editOrderAdressUrl = '/api/admin/order/address/other/';
export const editOrderAdressApi = function (id, json) { 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/`; const getLookRankUrl = `/api/admin/class/user/watch/ranking/`;
export const getLookRankApi = function (classId, json) { export const getLookRankApi = function (classId, json) {
return Vue.prototype.$fetch(`${getLookRankUrl}${classId}`, json) return Vue.prototype.$fetch(`${getLookRankUrl}${classId}`, json)
}; };
//发生期数消息 //发生期数消息
const postActiveNoticeUrl = `/api/admin/active/notice/`; const postActiveNoticeUrl = `/api/admin/active/notice/`;
export const postActiveNoticeApi = function (classId) { export const postActiveNoticeApi = function (classId) {
return Vue.prototype.$post(`${postActiveNoticeUrl}${classId}`) return Vue.prototype.$post(`${postActiveNoticeUrl}${classId}`)
}; };
//手动创建外部订单列表 //手动创建外部订单列表
const postOtherOrderUrl = `/api/admin/other/order`; const postOtherOrderUrl = `/api/admin/other/order`;
export const postOtherOrderApi = function (json) { export const postOtherOrderApi = function (json) {
return Vue.prototype.$post(`${postOtherOrderUrl}`, json) return Vue.prototype.$post(`${postOtherOrderUrl}`, json)
}; };
//清除外部订单激活信息 //清除外部订单激活信息
export const postClearOtherOrderApi = function (id) { 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) { 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) { export const getQuestionModularListApi = function (type, json) {
return Vue.prototype.$fetch(`/api/admin/question/list/${type}`, json) return Vue.prototype.$fetch(`/api/admin/question/list/${type}`, json)
}; };
//话术/模块详情 //话术/模块详情
export const getQuestionModularDetailApi = function (question_id) { 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) { export const updateQuestionModularDetailApi = function (question_id, json) {
return Vue.prototype.$put(`/api/admin/question/${question_id}`, json) return Vue.prototype.$put(`/api/admin/question/${question_id}`, json)
}; };
//删除话术/模块 //删除话术/模块
export const deleteQuestionModularDetailApi = function (question_id) { export const deleteQuestionModularDetailApi = function (question_id) {
return Vue.prototype.$del(`/api/admin/question/${question_id}`) return Vue.prototype.$del(`/api/admin/question/${question_id}`)
}; };
//话术/模块排序 //话术/模块排序
export const sortQuestionModularDetailApi = function (json) { 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) { export const fetchAddressListApi = function (uid) {
return Vue.prototype.$fetch(`/api/admin/student/address/${uid}`) return Vue.prototype.$fetch(`/api/admin/student/address/${uid}`)
}; };
//用户收货地址编辑 //用户收货地址编辑
export const editAddressListApi = function (uid, json) { export const editAddressListApi = function (uid, json) {
return Vue.prototype.$put(`/api/admin/student/address/${uid}`, json) return Vue.prototype.$put(`/api/admin/student/address/${uid}`, json)
}; };
//模板消息 //模板消息
export const getTemplatetApi = function (uid, json) { export const getTemplatetApi = function (uid, json) {
return Vue.prototype.$fetch(`/api/admin/open/template`, json) return Vue.prototype.$fetch(`/api/admin/open/template`, json)
}; };
//发送模板消息 //发送模板消息
export const sendTemplatetApi = function (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) { export const addAddressListApi = function (uid, json) {
return Vue.prototype.$post(`/api/admin/student/address/${uid}`, json) return Vue.prototype.$post(`/api/admin/student/address/${uid}`, json)
}; };
//用户当前亲情号 //用户当前亲情号
export const getSubAccountInfoApi = function (uid) { export const getSubAccountInfoApi = function (uid) {
return Vue.prototype.$fetch(`/api/admin/student/bind/info/${uid}`) return Vue.prototype.$fetch(`/api/admin/student/bind/info/${uid}`)
}; };
//用户绑定记录 //用户绑定记录
export const getUserSubAccountListApi = function (uid) { export const getUserSubAccountListApi = function (uid) {
return Vue.prototype.$fetch(`/api/admin/student/bind/all/${uid}`) return Vue.prototype.$fetch(`/api/admin/student/bind/all/${uid}`)
}; };
//绑定子账号列表 //绑定子账号列表
export const getSubAccountListApi = function (json) { 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) { 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) { export const addyunjiPeriodApi = function (period_id) {
return Vue.prototype.$fetch(`/api/admin/config/common/yunji/add/${period_id}`) return Vue.prototype.$fetch(`/api/admin/config/common/yunji/add/${period_id}`)
}; };
//订单支付类型 //订单支付类型
export const getOrderTypeApi = function () { export const getOrderTypeApi = function () {
return Vue.prototype.$fetch(`/api/admin/order/type`) return Vue.prototype.$fetch(`/api/admin/order/type`)
}; };
//用户看课记录 //用户看课记录
export const getWatchRecordApi = function (json) { 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) { export const editCouponDeadlineApi = function (json, coupon_id) {
return Vue.prototype.$put(`/api/admin/order/coupon/deadline/${coupon_id}`, json) return Vue.prototype.$put(`/api/admin/order/coupon/deadline/${coupon_id}`, json)
}; };
//添加星星活动期数 //添加星星活动期数
export const addStarActivityPeriodApi = function (periods_id) { export const addStarActivityPeriodApi = function (periods_id) {
return Vue.prototype.$post(`/api/admin/star/activity/periods/${periods_id}`) return Vue.prototype.$post(`/api/admin/star/activity/periods/${periods_id}`)
}; };
//删除星星活动期数 //删除星星活动期数
export const delStarActivityPeriodApi = function (periods_id) { export const delStarActivityPeriodApi = function (periods_id) {
return Vue.prototype.$del(`/api/admin/sys/star/periods/${periods_id}`) return Vue.prototype.$del(`/api/admin/sys/star/periods/${periods_id}`)
}; };
//删除星星活动期数 //删除星星活动期数
export const delYunjiActivityPeriodApi = function (periods_id) { export const delYunjiActivityPeriodApi = function (periods_id) {
return Vue.prototype.$del(`/api/admin/sys/yunji/periods/${periods_id}`) return Vue.prototype.$del(`/api/admin/sys/yunji/periods/${periods_id}`)
}; };
//星星活动期数列表 //星星活动期数列表
export const getStarActivityPeriodApi = function () { export const getStarActivityPeriodApi = function () {
return Vue.prototype.$fetch(`/api/admin/sys/star/activity`) return Vue.prototype.$fetch(`/api/admin/sys/star/activity`)
}; };
//云集活动期数列表 //云集活动期数列表
export const getYunjiActivityPeriodApi = function () { export const getYunjiActivityPeriodApi = function () {
return Vue.prototype.$fetch(`api/admin/sys/yunji/periods`) return Vue.prototype.$fetch(`api/admin/sys/yunji/periods`)
}; };
//云集活动期数列表 //云集活动期数列表
export const getStarActivityV2PeriodApi = function () { export const getStarActivityV2PeriodApi = function () {
return Vue.prototype.$fetch(`api/admin/star/bonus/periods`) return Vue.prototype.$fetch(`api/admin/star/bonus/periods`)
}; };
//添加星星活动期数 //添加星星活动期数
export const addStarActivityV2PeriodApi = function (periods_id) { export const addStarActivityV2PeriodApi = function (periods_id) {
return Vue.prototype.$post(`/api/admin/star/bonus/periods/${periods_id}`) return Vue.prototype.$post(`/api/admin/star/bonus/periods/${periods_id}`)
}; };
//删除星星活动期数 //删除星星活动期数
export const delStarActivityV2PeriodApi = function (periods_id) { export const delStarActivityV2PeriodApi = function (periods_id) {
return Vue.prototype.$del(`/api/admin/star/bonus/periods/${periods_id}`) return Vue.prototype.$del(`/api/admin/star/bonus/periods/${periods_id}`)
}; };
//待发货列表 //待发货列表
export const getDeliverListApi = function (json) { 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) { 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) { export const editDeliverAddressApi = function (deliver_id, json) {
return Vue.prototype.$put(`/api/admin/order/deliver/edit/${deliver_id}`, json) return Vue.prototype.$put(`/api/admin/order/deliver/edit/${deliver_id}`, json)
}; };
//待发货列表 //待发货列表
export const getDeliverRecordApi = function (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`; const getchannelTransListUrl = `${_baseUrl}api/admin/channel/conversion`;
export const getchannelTransListApi = function (json) { export const getchannelTransListApi = function (json) {
return Vue.prototype.$fetch(getchannelTransListUrl, json) return Vue.prototype.$fetch(getchannelTransListUrl, json)
}; };
//根据期数属性获取期数信息 //根据期数属性获取期数信息
const getPeriodsOtherListUrl = `${_baseUrl}api/admin/periods/other/list`; const getPeriodsOtherListUrl = `${_baseUrl}api/admin/periods/other/list`;
export const getPeriodsOtherListApi = function (json) { export const getPeriodsOtherListApi = function (json) {
return Vue.prototype.$fetch(getPeriodsOtherListUrl, json) return Vue.prototype.$fetch(getPeriodsOtherListUrl, json)
}; };
//渠道分商品转化 //渠道分商品转化
const getChannelGoodsConversionListUrl = `${_baseUrl}api/admin/channel/goods/conversion/list`; const getChannelGoodsConversionListUrl = `${_baseUrl}api/admin/channel/goods/conversion/list`;
export const getChannelGoodsConversionListApi = function (json) { export const getChannelGoodsConversionListApi = function (json) {
return Vue.prototype.$fetch(getChannelGoodsConversionListUrl, json) return Vue.prototype.$fetch(getChannelGoodsConversionListUrl, json)
}; };
//渠道转化 //渠道转化
const getChannelConversionListUrl = `${_baseUrl}api/admin/channel/conversion/list`; const getChannelConversionListUrl = `${_baseUrl}api/admin/channel/conversion/list`;
export const getChannelConversionListApi = function (json) { export const getChannelConversionListApi = function (json) {
return Vue.prototype.$fetch(getChannelConversionListUrl, json) return Vue.prototype.$fetch(getChannelConversionListUrl, json)
}; };
//期数转化 //期数转化
const getPeriodsConversionListUrl = `${_baseUrl}api/admin/periods/conversion/list`; const getPeriodsConversionListUrl = `${_baseUrl}api/admin/periods/conversion/list`;
export const getPeriodsConversionListApi = function (json) { export const getPeriodsConversionListApi = function (json) {
return Vue.prototype.$fetch(getPeriodsConversionListUrl, json) return Vue.prototype.$fetch(getPeriodsConversionListUrl, json)
}; };
//销售小组 //销售小组
const getSquadConversionListUrl = `${_baseUrl}api/admin/squad/conversion/list`; const getSquadConversionListUrl = `${_baseUrl}api/admin/squad/conversion/list`;
export const getSquadConversionListApi = function (json) { export const getSquadConversionListApi = function (json) {
return Vue.prototype.$fetch(getSquadConversionListUrl, json) return Vue.prototype.$fetch(getSquadConversionListUrl, json)
}; };
//班主任转化 //班主任转化
const getTeacherConversionListUrl = `${_baseUrl}api/admin/teacher/conversion/list`; const getTeacherConversionListUrl = `${_baseUrl}api/admin/teacher/conversion/list`;
export const getTeacherConversionListApi = function (json) { export const getTeacherConversionListApi = function (json) {
return Vue.prototype.$fetch(getTeacherConversionListUrl, json) return Vue.prototype.$fetch(getTeacherConversionListUrl, json)
}; };
//各期数班主任转化 //各期数班主任转化
const getTeacherPeriodsConversionListUrl = `${_baseUrl}api/admin/teacher/periods/conversion/list`; const getTeacherPeriodsConversionListUrl = `${_baseUrl}api/admin/teacher/periods/conversion/list`;
export const getTeacherPeriodsConversionListApi = function (json) { export const getTeacherPeriodsConversionListApi = function (json) {
return Vue.prototype.$fetch(getTeacherPeriodsConversionListUrl, json) return Vue.prototype.$fetch(getTeacherPeriodsConversionListUrl, json)
}; };
const getSourceConversionListUrl = `${_baseUrl}api/admin/class/conversion/source/list`; const getSourceConversionListUrl = `${_baseUrl}api/admin/class/conversion/source/list`;
export const getSourceConversionListApi = function (json) { export const getSourceConversionListApi = function (json) {
return Vue.prototype.$fetch(getSourceConversionListUrl, json) return Vue.prototype.$fetch(getSourceConversionListUrl, json)
}; };
// //
//各期数班主任转化 //各期数班主任转化
const getMarketEnrollmentConversionListUrl = `${_baseUrl}api/admin/periods/source/conversion/list`; const getMarketEnrollmentConversionListUrl = `${_baseUrl}api/admin/periods/source/conversion/list`;
export const getMarketEnrollmentConversionListApi = function (json) { export const getMarketEnrollmentConversionListApi = function (json) {
return Vue.prototype.$fetch(getMarketEnrollmentConversionListUrl, json) return Vue.prototype.$fetch(getMarketEnrollmentConversionListUrl, json)
}; };
export const postMobileCodeApi = function (json) { export const postMobileCodeApi = function (json) {
return Vue.prototype.$post(`${_baseUrl}api/admin/user/mobile/code`, json) return Vue.prototype.$post(`${_baseUrl}api/admin/user/mobile/code`, json)
}; };
export const postRegisterApi = function (json) { export const postRegisterApi = function (json) {
return Vue.prototype.$post(`${_baseUrl}api/admin/user/register`, json) return Vue.prototype.$post(`${_baseUrl}api/admin/user/register`, json)
}; };
export const getSourceStudentApi = function () { export const getSourceStudentApi = function () {
return Vue.prototype.$fetch(`${_baseUrl}api/admin/source/student/list`) return Vue.prototype.$fetch(`${_baseUrl}api/admin/source/student/list`)
}; };
export const postSourceStudentApi = function (json) { export const postSourceStudentApi = function (json) {
return Vue.prototype.$post(`${_baseUrl}api/admin/source/student/add`, json) return Vue.prototype.$post(`${_baseUrl}api/admin/source/student/add`, json)
}; };
export const delSourceStudentApi = function (type) { export const delSourceStudentApi = function (type) {
return Vue.prototype.$del(`${_baseUrl}api/admin/source/student/delete/${type}`) return Vue.prototype.$del(`${_baseUrl}api/admin/source/student/delete/${type}`)
}; };
export const putSourceStudentApi = function (type,json) { export const putSourceStudentApi = function (type, json) {
return Vue.prototype.$put(`${_baseUrl}api/admin/source/student/edit/${type}`,json) return Vue.prototype.$put(`${_baseUrl}api/admin/source/student/edit/${type}`, json)
}; };
// /api/admin/source/student/list // /api/admin/source/student/list
// 获取标签 // 获取标签
......
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