Commit e089fe6c authored by lvtz's avatar lvtz

fix

parent d3d4b18b
...@@ -63,26 +63,37 @@ Page({ ...@@ -63,26 +63,37 @@ Page({
swiperIndex: 0, swiperIndex: 0,
bannerList: ['https://cdn.img.shangjiadao.cn/source/images/dakav4/banner/banner1.png'], bannerList: ['https://cdn.img.shangjiadao.cn/source/images/dakav4/banner/banner1.png'],
newsLsit: '', newsLsit: '',
recomdCourseList: [], recomdCourseList: [],
courseTotal: 0,
coursepage: 1,
coursehasmore: true,
courselistLoading: false,
courseEmpty: false,
schoolActivitesList: [], schoolActivitesList: [],
teacherEmpty: false, teacherEmpty: false,
teacherList: [], teacherList: [],
teacherpage: 1, teacherpage: 1,
teacherhasmore: true, teacherhasmore: true,
teacherlistLoading: false, teacherlistLoading: false,
teacherTotal: 0, teacherTotal: 0,
studentList: [], studentList: [],
studentEmpty:false, studentEmpty:false,
studentpage: 1, studentpage: 1,
studenthasmore: true, studenthasmore: true,
studentlistLoading: false, studentlistLoading: false,
studentTotal: 0, studentTotal: 0,
presenceList: [], presenceList: [],
presenceEmpty:false, presenceEmpty:false,
presencepage: 1, presencepage: 1,
presencehasmore: true, presencehasmore: true,
presencelistLoading: false, presencelistLoading: false,
presenceTotal: 0, presenceTotal: 0,
schoolinstroInfo: '', schoolinstroInfo: '',
gainInfo: '' gainInfo: ''
}, },
...@@ -101,7 +112,7 @@ Page({ ...@@ -101,7 +112,7 @@ Page({
}) })
this.teacherlistGet('init'); this.teacherlistGet('init');
this.studentlistGet('init'); this.studentlistGet('init');
this.presencelistGet('init') this.presencelistGet('init');
}, },
/** /**
...@@ -115,7 +126,7 @@ Page({ ...@@ -115,7 +126,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
this.recomdCourseGet(); this.recomdCourseGet('init');
this.schoolActivitesGet(); this.schoolActivitesGet();
this.schoolInstroInfoGet(); this.schoolInstroInfoGet();
this.websitedetailGet(); this.websitedetailGet();
...@@ -146,16 +157,16 @@ Page({ ...@@ -146,16 +157,16 @@ Page({
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { // onReachBottom: function () {
console.log(this.data.actIndex) // console.log(this.data.actIndex)
switch (this.data.actIndex) { // switch (this.data.actIndex) {
case 4: // case 4:
this.teacherlistGet('up'); // this.teacherlistGet('up');
break; // break;
default: // default:
break; // break;
} // }
}, // },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
...@@ -239,22 +250,30 @@ Page({ ...@@ -239,22 +250,30 @@ Page({
const { const {
dataset dataset
} = e.currentTarget; } = e.currentTarget;
const {
id,
index,
bigindex
} = e.currentTarget.dataset;
const _courseList = this.data.recomdCourseList;
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: '是否删除该课程?', content: '是否删除该课程?',
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
recomdCourseDelate({ recomdCourseDelate({
id: dataset.item.id id: id
}).then((res) => { }).then((res) => {
if (res.code != 200) {
if (res.code == 200) {
let recomdCourseList = that.data.recomdCourseList.filter(ele => ele.id != dataset.item.id); } else {
_courseList[bigindex].splice(index, 1);
that.setData({ that.setData({
recomdCourseList: recomdCourseList, recomdCourseList: _courseList,
courseEmpty: _courseList.length == 0 ? true : false
}) })
} else { console.log(this.data.courseEmpty)
wx.showToast({ wx.showToast({
title: '删除成功', title: '删除成功',
icon: 'success', icon: 'success',
...@@ -272,24 +291,103 @@ Page({ ...@@ -272,24 +291,103 @@ Page({
} }
}) })
}, },
// 商品列表 // 课程列表
recomdCourseGet() { recomdCourseGet(type) {
// console.log(type)
if (!this.data.coursehasmore) {
return;
}
if (this.data.courselistLoading) {
return
}
this.setData({
courselistLoading: true
})
console.log('页码',this.data.coursepage);
recomdCourseGet({ recomdCourseGet({
school_id: this.data.sid, page: 1,
}).then(res => { perPage: 6,
const { school_id: this.data.sid
data, }).then((res) => {
code const { code, data } = res;
} = res; wx.hideLoading();
if (code == 200) { this.setData({
if (data) { courselistLoading: false
})
if (code != 200) { // 失败的处理
} else {
if (data.total != undefined) {
this.data.courseTotal = data.total
}
switch (type) {
case 'init': //页面进来第一次加载
this.setData({
recomdCourseList: [data.list]
}, () => {
console.log(this.data.recomdCourseList)
if (this.data.courseTotal > this.caculateArrLength(this.data.recomdCourseList)) {
let page = this.data.coursepage + 1;
this.data.coursepage = page;
} else { // 没有更多了
this.setData({
coursehasmore: false
})
}
})
break;
case 'down': // 页面下拉刷新
this.setData({
recomdCourseList: [data.list]
}, () => {
if (this.data.courseTotal > this.caculateArrLength(this.data.recomdCourseList)) {
let page = this.data.coursepage + 1;
this.data.coursepage = page;
} else { // 没有更多了
this.setData({
coursehasmore: false
})
}
})
wx.stopPullDownRefresh();
break;
case 'up': // 页面上拉刷新
this.setData({
[`recomdCourseList[${this.data.coursepage - 1}]`]: data.list
}, () => {
if (this.data.courseTotal > this.caculateArrLength(this.data.recomdCourseList)) {
let page = this.data.coursepage + 1;
this.data.coursepage = page;
} else { // 没有更多了
this.setData({
coursehasmore: false
})
}
})
break;
default:
break;
}
if (this.caculateArrLength(this.data.recomdCourseList) == 0) {
this.setData({ this.setData({
recomdCourseList: data.list courseEmpty: true
}) })
} else {} } else {
this.setData({
courseEmpty: false,
})
}
} }
}).catch((e) => {
this.setData({
courselistLoading: false
})
}) })
}, },
loadmoreCourse (){
this.recomdCourseGet('up');
},
// ——————————————————————————————————————————————————————————学校活动 // ——————————————————————————————————————————————————————————学校活动
editOraddSchoolActivity (e){ editOraddSchoolActivity (e){
...@@ -550,7 +648,7 @@ Page({ ...@@ -550,7 +648,7 @@ Page({
}) })
teacherlist({ teacherlist({
page: this.data.teacherpage, page: this.data.teacherpage,
perPage: 2, perPage: this.data.perPage/2,
school_id: this.data.sid school_id: this.data.sid
}).then((res) => { }).then((res) => {
const { code, data } = res; const { code, data } = res;
...@@ -996,14 +1094,11 @@ Page({ ...@@ -996,14 +1094,11 @@ Page({
swiperIndex: e.detail.current swiperIndex: e.detail.current
}) })
}, },
<<<<<<< HEAD
prevImg (e) { prevImg (e) {
let environmentArr = this.data.schoolinstroInfo.environment; let environmentArr = this.data.schoolinstroInfo.environment;
let bigindex = e.currentTarget.dataset.bigindex; let bigindex = e.currentTarget.dataset.bigindex;
let smallindex = e.currentTarget.dataset.index; let smallindex = e.currentTarget.dataset.index;
let imageBox = environmentArr[`${bigindex}`].imageBox; let imageBox = environmentArr[`${bigindex}`].imageBox;
console.log(bigindex,smallindex)
let images = imageBox.map(ele => ele.src); let images = imageBox.map(ele => ele.src);
const current = images[`${smallindex}`]; const current = images[`${smallindex}`];
wxPreviewImage({ wxPreviewImage({
...@@ -1012,11 +1107,9 @@ Page({ ...@@ -1012,11 +1107,9 @@ Page({
}) })
}, },
=======
go2cWebsite(){ go2cWebsite(){
wx.navigateTo({ wx.navigateTo({
url: `/src/pages/officialweb/officialwebindex?sid=${this.data.sid}` url: `/src/pages/officialweb/officialwebindex?sid=${this.data.sid}`
}) })
} }
>>>>>>> 9fea03fe12f5c0e8230635bf46346a9822f149bd
}) })
\ No newline at end of file
...@@ -14,20 +14,11 @@ ...@@ -14,20 +14,11 @@
<view class="icon"> <view class="icon">
<image class="icon2" src="{{localImageRoot}}2b/officialwebmgt/share.png?{{imageVersion}}" ></image> <image class="icon2" src="{{localImageRoot}}2b/officialwebmgt/share.png?{{imageVersion}}" ></image>
</view> </view>
<<<<<<< HEAD
<view class="text">转发给学员</view> <view class="text">转发给学员</view>
</view> </view>
<view class="nav-item"> <view class="nav-item" bindtap="go2cWebsite">
<view class="icon"> <view class="icon">
<image class="icon3" src="{{localImageRoot}}2b/officialwebmgt/preview.png?{{imageVersion}}" ></image> <image class="icon3" src="{{localImageRoot}}2b/officialwebmgt/preview.png?{{imageVersion}}" ></image>
=======
<view class="text" hover-class="none" hover-stop-propagation="false">转发给学员</view>
<button open-type="share" class="share-btn"></button>
</view>
<view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="go2cWebsite">
<view class="icon" hover-class="none" hover-stop-propagation="false">
<image class="icon3" src="{{localImageRoot}}2b/officialwebmgt/preview.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
>>>>>>> 9fea03fe12f5c0e8230635bf46346a9822f149bd
</view> </view>
<view class="text">预览</view> <view class="text">预览</view>
</view> </view>
...@@ -143,10 +134,10 @@ ...@@ -143,10 +134,10 @@
</view> </view>
</view> </view>
<view class="recomdcourse-box" wx:if="{{tabList[3].status}}"> <view class="recomdcourse-box" wx:if="{{tabList[3].status}}">
<view class="goods-box" wx:if="{{recomdCourseList.length>0}}"> <view class="goods-box" wx:if="{{!courseEmpty}}">
<view class="prizecontent"> <view class="prizecontent" wx:for="{{recomdCourseList}}" wx:for-item="bigitem" wx:key="bigindex" wx:for-index="bigindex">
<view class="prizecardbox {{index%2==0 ?'odd':'even'}}" wx:for="{{recomdCourseList}}" wx:key=""> <view class="prizecardbox {{index%2==0 ?'odd':'even'}}" wx:for="{{bigitem}}" wx:key="{{index}}">
<view class="prizecard" > <view class="prizecard">
<image class="prizeimage" src="{{filter.imagify(filter.jsonParse(item.banner)[0], 'image/resize,w_320/format,jpg/quality,q_50')}}"></image> <image class="prizeimage" src="{{filter.imagify(filter.jsonParse(item.banner)[0], 'image/resize,w_320/format,jpg/quality,q_50')}}"></image>
<view class="prizename" >{{item.title}}</view> <view class="prizename" >{{item.title}}</view>
<view class="prizestatic" > <view class="prizestatic" >
...@@ -155,10 +146,12 @@ ...@@ -155,10 +146,12 @@
</view> </view>
<view class="operatebox"> <view class="operatebox">
<view class="operatebtn" bindtap="editOrAddCourse" data-id="{{item.id}}">修改</view> <view class="operatebtn" bindtap="editOrAddCourse" data-id="{{item.id}}">修改</view>
<view class="operatebtn" bindtap="delCourse" data-item="{{item}}">删除</view> <view class="operatebtn" bindtap="delCourse" data-bigindex="{{bigindex}}" data-id="{{item.id}}" data-index="{{index}}">删除</view>
</view> </view>
</view> </view>
</view> </view>
<list-loading loading="{{courselistLoading}}"></list-loading>
<view class="loadmore" bindtap="loadmoreCourse" wx:if="{{coursehasmore}}">加载更多</view>
</view> </view>
<view class="" wx:else> <view class="" wx:else>
<view class="empty-content"> <view class="empty-content">
...@@ -175,37 +168,37 @@ ...@@ -175,37 +168,37 @@
<view class="text-box">还没有开启,开启后才可以编辑哦~</view> <view class="text-box">还没有开启,开启后才可以编辑哦~</view>
</view> </view>
</view> </view>
<view class="content-item teacher-content-item" wx:if="{{actIndex===4}}"> <view class="content-item teacher-content-item" wx:if="{{actIndex===4}}">
<view class="title" > <view class="title">
<view class="text" >名师团队</view> <view class="text">名师团队</view>
<view class="switch-box" > <view class="switch-box">
<w-switch slot="content" value="{{ tabList[4].status }}" size="small" color="#65B8F4" bind:onChange="handleChange" data-index="4" data-name="teacher"/> <w-switch slot="content" value="{{ tabList[4].status }}" size="small" color="#65B8F4" bind:onChange="handleChange" data-index="4" data-name="teacher"/>
</view> </view>
</view> </view>
<view class="teacher-box" wx:if="{{!teacherEmpty&&tabList[4].status}}"> <view class="teacher-box" wx:if="{{!teacherEmpty&&tabList[4].status}}">
<block wx:for="{{teacherList}}" wx:for-item="bigitem" wx:key="bigindex" wx:for-index="bigindex"> <view class="clearfix" wx:for="{{teacherList}}" wx:for-item="bigitem" wx:key="bigindex" wx:for-index="bigindex">
<view class="teacher-item" wx:for="{{bigitem}}" wx:key="{{index}}"> <view class="teacher-item" wx:for="{{bigitem}}" wx:key="{{index}}">
<view class="card-box" > <view class="card-box">
<view class="img-box" > <view class="img-box">
<image class="" src="{{filter.imagify(item.avatar)}}"></image> <image class="" src="{{filter.imagify(item.avatar)}}"></image>
</view> </view>
<view class="name-text" >{{item.name}}</view> <view class="name-text">{{item.name}}</view>
</view> </view>
<view class="btn-box" > <view class="btn-box">
<view class="btn" bindtap="goofficialwebteachermgt" data-id="{{item.id?item.id:0}}">修改</view> <view class="btn" bindtap="goofficialwebteachermgt" data-id="{{item.id?item.id:0}}">修改</view>
<view class="btn" bindtap="delTeacher" data-bigindex="{{bigindex}}" data-id="{{item.id}}" data-index="{{index}}">删除</view> <view class="btn" bindtap="delTeacher" data-bigindex="{{bigindex}}" data-id="{{item.id}}" data-index="{{index}}">删除</view>
</view> </view>
</view> </view>
</block> </view>
<list-loading loading="{{teacherlistLoading}}"></list-loading> <list-loading loading="{{teacherlistLoading}}"></list-loading>
<!-- <view class="loadmore" bindtap="loadmoresTeacher" wx:if="{{teacherhasmore}}">加载更多</view> --> <view class="loadmore" bindtap="loadmoresTeacher" wx:if="{{teacherhasmore}}">加载更多</view>
</view> </view>
<view class="empty-box" wx:if="{{teacherEmpty&&tabList[4].status}}"> <view class="empty-box" wx:if="{{teacherEmpty&&tabList[4].status}}">
<view class="icon" ><image class='empty-content-img' src='{{imageRoot}}2c/rankinglist/empty.png?{{imageVersion}}'></image></view> <view class="icon"><image class='empty-content-img' src='{{imageRoot}}2c/rankinglist/empty.png?{{imageVersion}}'></image></view>
<view class="text" >还没有添加名师,赶紧添加吧~</view> <view class="text">还没有添加名师,赶紧添加吧~</view>
</view> </view>
<view class="add-btn" bindtap="goofficialwebteachermgt" wx:if="{{tabList[4].status}}">添加老师</view> <view class="add-btn" bindtap="goofficialwebteachermgt" wx:if="{{tabList[4].status}}">添加老师</view>
<view class="guide-box" wx:if="{{!tabList[4].status}}"> <view class="guide-box" wx:if="{{!tabList[4].status}}">
<view class="img-box" > <view class="img-box" >
<image class="" src="{{localImageRoot}}2b/officialwebmgt/gog.png?{{imageVersion}}"></image> <image class="" src="{{localImageRoot}}2b/officialwebmgt/gog.png?{{imageVersion}}"></image>
</view> </view>
...@@ -219,28 +212,28 @@ ...@@ -219,28 +212,28 @@
<w-switch slot="content" value="{{ tabList[5].status }}" size="small" color="#65B8F4" bind:onChange="handleChange" data-index="5" data-name="student"/> <w-switch slot="content" value="{{ tabList[5].status }}" size="small" color="#65B8F4" bind:onChange="handleChange" data-index="5" data-name="student"/>
</view> </view>
</view> </view>
<view class="student-wrapper-box" wx:if="{{tabList[5].status}}"> <view class="student-wrapper-box" wx:if="{{tabList[5].status}}">
<view class="title-box"><image class="dot-icon" src="{{localImageRoot}}2b/officialwebmgt/dot.png?{{imageVersion}}"></image>优秀学员<image class="dot-icon" src="{{localImageRoot}}2b/officialwebmgt/dot.png?{{imageVersion}}"></image></view> <view class="title-box"><image class="dot-icon" src="{{localImageRoot}}2b/officialwebmgt/dot.png?{{imageVersion}}"></image>优秀学员<image class="dot-icon" src="{{localImageRoot}}2b/officialwebmgt/dot.png?{{imageVersion}}"></image></view>
<view class="teacher-box" wx:if="{{!studentEmpty}}"> <view class="teacher-box" wx:if="{{!studentEmpty}}">
<view class="clearfix" wx:for="{{studentList}}" wx:for-item="bigitem" wx:key="bigindex" wx:for-index="bigindex"> <view class="clearfix" wx:for="{{studentList}}" wx:for-item="bigitem" wx:key="bigindex" wx:for-index="bigindex">
<view class="teacher-item" wx:for="{{bigitem}}" wx:key="{{index}}"> <view class="teacher-item" wx:for="{{bigitem}}" wx:key="{{index}}">
<view class="card-box" > <view class="card-box" >
<view class="img-box" > <view class="img-box" >
<image class="" src="{{filter.imagify(item.cover)}}"></image> <image class="" src="{{filter.imagify(item.cover)}}"></image>
</view> </view>
<view class="name-text" >{{item.nickname}}</view> <view class="name-text">{{item.nickname}}</view>
</view> </view>
<view class="btn-box" > <view class="btn-box">
<view class="btn" data-id="{{item.id?item.id:0}}" bindtap="goofficialwebstudentmgt">修改</view> <view class="btn" data-id="{{item.id?item.id:0}}" bindtap="goofficialwebstudentmgt">修改</view>
<view class="btn" data-bigindex="{{bigindex}}" data-id="{{item.id}}" data-index="{{index}}" bindtap="delTeacher">删除</view> <view class="btn" data-bigindex="{{bigindex}}" data-id="{{item.id}}" data-index="{{index}}" bindtap="delTeacher">删除</view>
</view> </view>
</view> </view>
</view> </view>
<list-loading loading="{{studentlistLoading}}"></list-loading> <list-loading loading="{{studentlistLoading}}"></list-loading>
<view class="loadmore" bindtap="loadmoresStudent" wx:if="{{studenthasmore}}">加载更多</view> <view class="loadmore" bindtap="loadmoresStudent" wx:if="{{studenthasmore}}">加载更多</view>
</view> </view>
<view class="empty-box" wx:if="{{studentEmpty}}"> <view class="empty-box" wx:if="{{studentEmpty}}">
<view class="text" >还没有添加学员,赶紧添加吧~</view> <view class="text">还没有添加学员,赶紧添加吧~</view>
</view> </view>
<view class="add-btn" bindtap="goofficialwebstudentmgt">添加学员</view> <view class="add-btn" bindtap="goofficialwebstudentmgt">添加学员</view>
</view> </view>
......
...@@ -34,22 +34,8 @@ ...@@ -34,22 +34,8 @@
height: 80rpx; height: 80rpx;
} }
<<<<<<< HEAD
/* 顶部tab */ /* 顶部tab */
.tab-box{ .tab-box{
=======
}
.officialwebmgt-container .nav-box .nav-item .share-btn{
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 1;
opacity: 0;
}
.officialwebmgt-container .tab-box{
>>>>>>> 9fea03fe12f5c0e8230635bf46346a9822f149bd
padding: 36rpx 12rpx 12rpx 23rpx; padding: 36rpx 12rpx 12rpx 23rpx;
box-shadow:0px 8rpx 10rpx 0px rgba(0, 0, 0, 0.05); box-shadow:0px 8rpx 10rpx 0px rgba(0, 0, 0, 0.05);
display: flex; display: flex;
......
...@@ -19,7 +19,6 @@ import { ...@@ -19,7 +19,6 @@ import {
import { import {
recomdCourseDetail, recomdCourseDetail,
recomdCourseUpdate,
recomdCourseAdd, recomdCourseAdd,
circleAllSubject circleAllSubject
} from '../../../service/business/website.js'; } from '../../../service/business/website.js';
...@@ -349,30 +348,16 @@ Page({ ...@@ -349,30 +348,16 @@ Page({
let content = JSON.parse(JSON.stringify(sjdMediaEditor.data.content)); let content = JSON.parse(JSON.stringify(sjdMediaEditor.data.content));
let _content = content.filter((ele) => ele.value.trim() != ''); let _content = content.filter((ele) => ele.value.trim() != '');
_params.introduce = JSON.stringify(_content); _params.introduce = JSON.stringify(_content);
let ajax = null; recomdCourseAdd(Object.assign(_params, this.data.params, {
if (this.data.courseId != 0) { banner: JSON.stringify(this.data.params.banner),
ajax = recomdCourseUpdate(Object.assign(_params, this.data.params, { school_id: this.data.sid,
banner: JSON.stringify(this.data.params.banner), class_id: this.data.cid,
school_id: this.data.sid, title: this.data.params.title,
class_id: this.data.cid, // introduce: introduce,
title: this.data.params.title, remark: this.data.params.remark,
// introduce: introduce, subject_ids: JSON.stringify(this.data.checkedItems),
remark: this.data.params.remark, id: this.data.courseId
subject_ids: JSON.stringify(this.data.checkedItems), })).then((res) => {
id: this.data.courseId
}))
} else {
ajax = recomdCourseAdd(Object.assign(_params, this.data.params, {
banner: JSON.stringify(this.data.params.banner),
school_id: this.data.sid,
class_id: this.data.cid,
title: this.data.params.title,
// introduce: introduce,
remark: this.data.params.remark,
subject_ids: JSON.stringify(this.data.checkedItems)
}))
}
ajax.then((res) => {
const { code, data } = res; const { code, data } = res;
if (code == 200) { if (code == 200) {
wx.showToast({ wx.showToast({
......
...@@ -359,8 +359,7 @@ const apis = { ...@@ -359,8 +359,7 @@ const apis = {
schoolActivitesDetail: `${api}member/website/activity/detail`, //B-活动详情 schoolActivitesDetail: `${api}member/website/activity/detail`, //B-活动详情
recomdCourseGet: `${api}member/website/subject`, //B-推荐课程列表 recomdCourseGet: `${api}member/website/subject`, //B-推荐课程列表
recomdCourseAdd: `${api}member/website/subject`, //B-推荐课程新增 recomdCourseAdd: `${api}member/website/subject`, //B-推荐课程新增修改
recomdCourseUpdate: `${api}member/website/subject`, //B-推荐课程修改
recomdCourseDelete: `${api}member/website/subject/destory`, //B-推荐课程删除 recomdCourseDelete: `${api}member/website/subject/destory`, //B-推荐课程删除
recomdCourseDetail: `${api}member/website/subject/detail`, //B-推荐课程详情 recomdCourseDetail: `${api}member/website/subject/detail`, //B-推荐课程详情
......
...@@ -65,24 +65,23 @@ function recomdCourseGet(data) { ...@@ -65,24 +65,23 @@ function recomdCourseGet(data) {
needToken: true needToken: true
}) })
} }
// 推荐课程修改
function recomdCourseUpdate(data) { // 推荐课程修改新增
return wxRequest({
role: '2b',
url: apis.business.website.recomdCourseUpdate + '/' + data.id,
method: 'PUT',
data,
errorresolve: 1
})
}
// 推荐课程新增
function recomdCourseAdd(data) { function recomdCourseAdd(data) {
let type = '',url = '';
if (data.id == 0) {
type = 'POST';
url = apis.business.website.recomdCourseAdd;
}else{
type = 'PUT';
url = apis.business.website.recomdCourseAdd + '/' + data.id
}
return wxRequest({ return wxRequest({
role: '2b', role: '2b',
url: apis.business.website.recomdCourseAdd, url: url,
method: 'POST', method: type,
data, data,
errorresolve: 1 errorresolve: 1,
}) })
} }
// 推荐课程详情 // 推荐课程详情
...@@ -376,7 +375,6 @@ export { ...@@ -376,7 +375,6 @@ export {
schoolActivitesDelete, schoolActivitesDelete,
schoolActivitesDetail, schoolActivitesDetail,
recomdCourseGet, recomdCourseGet,
recomdCourseUpdate,
recomdCourseAdd, recomdCourseAdd,
recomdCourseDelate, recomdCourseDelate,
recomdCourseDetail, recomdCourseDetail,
......
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