Commit 7a677c8b authored by sujie@126.com's avatar sujie@126.com

dd

parent 9fea03fe
......@@ -190,8 +190,9 @@ Page({
goofficialwebteachermgt(e) {
const id = e.currentTarget.dataset.id ? e.currentTarget.dataset.id : 0;
const page = e.currentTarget.dataset.page ? e.currentTarget.dataset.page : 0;
wx.navigateTo({
url: `/business/pages/officialwebteachermgt/index?sid=${this.data.sid}&actIndex=${this.data.actIndex}&teacherId=${id}&page=${this.data.teacherpage}`
url: `/business/pages/officialwebteachermgt/index?sid=${this.data.sid}&actIndex=${this.data.actIndex}&teacherId=${id}&page=${page}`
})
},
gobannereditor() {
......@@ -206,8 +207,10 @@ Page({
},
goofficialwebstudentmgt(e) {
const id = e.currentTarget.dataset.id ? e.currentTarget.dataset.id : 0;
const page = e.currentTarget.dataset.page ? e.currentTarget.dataset.page : 0;
console.log(page,'page')
wx.navigateTo({
url: `/business/pages/officialwebstudentmgt/index?sid=${this.data.sid}&actIndex=${this.data.actIndex}&studentId=${id}&page=${this.data.studentpage}`
url: `/business/pages/officialwebstudentmgt/index?sid=${this.data.sid}&actIndex=${this.data.actIndex}&studentId=${id}&page=${page}`
})
},
goofficialwebactitive(e) {
......
......@@ -181,7 +181,7 @@
<view class="name-text" hover-class="none" hover-stop-propagation="false">{{item.name}}</view>
</view>
<view class="btn-box" hover-class="none" hover-stop-propagation="false">
<view class="btn" hover-class="none" hover-stop-propagation="false" bindtap="goofficialwebteachermgt" data-id="{{item.id?item.id:0}}">修改</view>
<view class="btn" hover-class="none" hover-stop-propagation="false" bindtap="goofficialwebteachermgt" data-id="{{item.id?item.id:0}}" data-index="{{bigindex}}">修改</view>
<view class="btn" hover-class="none" hover-stop-propagation="false" bindtap="delTeacher" data-bigindex="{{bigindex}}" data-id="{{item.id}}" data-index="{{index}}">删除</view>
</view>
</view>
......@@ -220,7 +220,7 @@
<view class="name-text" hover-class="none" hover-stop-propagation="false">{{item.nickname}}</view>
</view>
<view class="btn-box" hover-class="none" hover-stop-propagation="false">
<view class="btn" hover-class="none" hover-stop-propagation="false" data-id="{{item.id?item.id:0}}" bindtap="goofficialwebstudentmgt">修改</view>
<view class="btn" hover-class="none" hover-stop-propagation="false" data-id="{{item.id?item.id:0}}" bindtap="goofficialwebstudentmgt" data-page="{{bigindex}}">修改</view>
<view class="btn" hover-class="none" hover-stop-propagation="false" data-bigindex="{{bigindex}}" data-id="{{item.id}}" data-index="{{index}}" bindtap="delTeacher">删除</view>
</view>
</view>
......
......@@ -65,13 +65,15 @@ Page({
sid,
studentId,
consumerid,
name
name,
page
} = options;
this.setData({
sid,
id:studentId,
consumerid:consumerid||'',
name:name||''
name:name||'',
page
})
if(Number(studentId)){
this.studentDetail()
......@@ -474,13 +476,15 @@ Page({
currPage = pages[pages.length - 1]; //当前页面
prevPage = pages[pages.length - 2]; //上一个页面
}
const {studentpage,studentList,studentTotal,perPage} = prevPage.data;
const {studentpage,studentList,perPage} = prevPage.data;
let studentTotal = prevPage.data.studentTotal;
if(this.data.id>0){
studentList[studentpage-1].filter((ele)=>ele.id==this.data.id)[0].content = data.content
studentList[studentpage-1].filter((ele)=>ele.id==this.data.id)[0].title = data.title
studentList[this.data.page].filter((ele)=>ele.id==this.data.id)[0].cover = data.cover;
studentList[this.data.page].filter((ele) => ele.id == this.data.id)[0].remark = data.remark;
studentList[this.data.page].filter((ele) => ele.id == this.data.id)[0].nickname = data.nickname;
}else{
studentList[studentpage-1].push(data);
studentTotal+-1;
studentList[studentpage].push(data);
studentTotal+=1;
}
prevPage.setData({
studentList:studentList,
......
......@@ -59,11 +59,13 @@ Page({
this.innerAudioContext = wx.createInnerAudioContext(); // 当前页面唯一的一个音频容器
const {
sid,
teacherId
teacherId,
page
} = options;
this.setData({
sid,
id: teacherId||0
id: teacherId||0,
page
})
},
cropperload(e) {
......@@ -433,11 +435,10 @@ Page({
})
const {teteacherpage,teteacherList,teteacherTotal,perPage} = prevPage.data;
if(this.data.id>0){
teteacherList[teteacherpage-1].filter((ele)=>ele.id==this.data.id)[0].content = data.content
teteacherList[teteacherpage-1].filter((ele)=>ele.id==this.data.id)[0].title = data.title
teteacherList[this.data.page].filter((ele)=>ele.id==this.data.id)[0].content = data.content
teteacherList[this.data.page].filter((ele)=>ele.id==this.data.id)[0].title = data.title
}else{
teteacherList[teteacherpage-1].push(data);
teteacherTotal+-1;
}
prevPage.setData({
teteacherList:teteacherList,
......
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