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

dd

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