Commit d7f968c3 authored by lvtz's avatar lvtz

fix

parent da60e5d0
......@@ -300,6 +300,8 @@ Page({
formIdCreate({
formId
})
// this.getMemberMeInfo(this.data.sid)//班级操作后查看是否还有老师身份
let pages = getCurrentPages();
let currPage = null; //当前页面
let prevPage = null; //上一个页面
......@@ -327,6 +329,28 @@ Page({
})
})
},
// 班级操作后查看是否还有老师身份
getMemberMeInfo(sid){
let that = this;
const user = LocalStorage.getItem('user');
wx.request({
url: apis.business.common.memberMe,
data: {
school_id: sid,
show_assign_class_status: 1
},
header: {
'Authorization': user && user.token,
},
success(res) {
if (res.data.code == 200) {
LocalStorage.setItem('memberMeHasClass',res.data.data.assign_class_status);
}else{
}
}
})
},
// 跟录音相关的操作
addVoice (e) {
const {show, src} = e.detail;
......@@ -696,4 +720,12 @@ Page({
current: current
})
},
formIdCreate(e) {
const {
formId
} = e.detail;
formIdCreate({
formId
})
},
})
\ No newline at end of file
......@@ -40,40 +40,37 @@ Page({
sid: sid || 0
},()=>{
this.getschoolList();
// this.getMemberMeInfo();
})
},
// getMemberMeInfo(){
// let that = this;
// const user = LocalStorage.getItem('user');
// wx.request({
// url: apis.business.common.memberMe,
// data: {
// school_id: that.data.sid,
// show_assign_class_status: 1
// },
// header: {
// 'Authorization': user && user.token,
// },
// success(res) {
// if (res.data.code == 200) {
// LocalStorage.setItem('memberMeHasClass',res.data.data.assign_class_status);
// that.setData({
// memberChange: res.data.data.assign_class_status
// })
// }else{
// }
// }
// })
// },
onShow: function () {
this.getMemberMeInfo();
app.watch(this.watchBack,this)
this.getCommonwaitJob()
this.getCommonwaitJob();
},
getMemberMeInfo(){
let that = this;
const user = LocalStorage.getItem('user');
wx.request({
url: apis.business.common.memberMe,
data: {
school_id: that.data.sid,
show_assign_class_status: 1
},
header: {
'Authorization': user && user.token,
},
success(res) {
if (res.data.code == 200) {
LocalStorage.setItem('memberMeHasClass',res.data.data.assign_class_status);
that.setData({
memberChange: res.data.data.assign_class_status
})
}else{
}
}
})
},
/**
* 生命周期函数--监听页面隐藏
*/
......
......@@ -4,24 +4,24 @@
<view class="exchangebusiness-container clearfix">
<view class="content-item" wx:for="{{schoolList}}" wx:key="{{index}}" >
<view bindtap='godeskcenter' data-item="{{item}}">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton"></button>
</form>
<view class="title">
<view class="title-text">{{item.title}}</view>
<view class="title-flag1 " wx:if="{{item.school_teacher.type==2}}">管理员身份</view>
<view class="title-flag2 " wx:if="{{item.school_teacher.type==1}}">老师身份</view>
</view>
<view class="time" wx:if="{{item.school_teacher.last_login_time}}">上次登录时间:{{item.school_teacher.last_login_time}}</view>
<view class="deadline-time" wx:if="{{!item.expire_time}}">终身包</view>
<view class="deadline-time" wx:if="{{item.expire_time && filter.dateTimeCompare(nowDate,item.expire_time)}}">
<image class="icon" src="{{imageRoot}}2b/common/exprie-time.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
{{item.trial_status == 2 ? '账号' :'试用'}}已到期
</view>
<view class="deadline-time" wx:if="{{item.expire_time && !filter.dateTimeCompare(nowDate,item.expire_time)}}">
<image class="icon" src="{{imageRoot}}2b/common/ex-clock.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
账号到期时间:{{ filter.matchTime(item.expire_time ,'year')}}
</view>
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton"></button>
</form>
<view class="title">
<view class="title-text">{{item.title}}</view>
<view class="title-flag1 " wx:if="{{item.school_teacher.type==2}}">管理员身份</view>
<view class="title-flag2 " wx:if="{{item.school_teacher.type==1}}">老师身份</view>
</view>
<view class="time" wx:if="{{item.school_teacher.last_login_time}}">上次登录时间:{{item.school_teacher.last_login_time}}</view>
<view class="deadline-time" wx:if="{{!item.expire_time}}">终身包</view>
<view class="deadline-time" wx:if="{{item.expire_time && filter.dateTimeCompare(nowDate,item.expire_time)}}">
<image class="icon" src="{{imageRoot}}2b/common/exprie-time.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
{{item.trial_status == 2 ? '账号' :'试用'}}已到期
</view>
<view class="deadline-time" wx:if="{{item.expire_time && !filter.dateTimeCompare(nowDate,item.expire_time)}}">
<image class="icon" src="{{imageRoot}}2b/common/ex-clock.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />
账号到期时间:{{ filter.matchTime(item.expire_time ,'year')}}
</view>
</view>
</view>
<view class="add-school" bindtap="goShopedit"><image class="" src="{{imageRoot}}2b/organizationalmgt/icon_add.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload="" />创建新校区</view>
......
......@@ -539,6 +539,7 @@ Page({
wx.hideLoading();
if (res.code == 200) { // 成功的操作
if (this.data.sid == 0) { // 新增的操作
LocalStorage.setItem('dakarole', 1);
wx.reLaunch({
url: `/business/pages/classmgt/index?sid=${res.data.id}&newcreate=1`,
})
......
......@@ -44,6 +44,7 @@ Page({
LocalStorage.removeItem('user');
LocalStorage.removeItem('dakarole');
LocalStorage.removeItem('teacher');
LocalStorage.removeItem('memberMeHasClass');
wx.reLaunch({
url: '/business/pages/loginregistermgt/login'
})
......
......@@ -4,6 +4,8 @@ import {
import {
LocalStorage,
} from '../../utilities/index.js';
import apis from '../../constants/api.js';
var app = getApp();
Component({
properties: {
......@@ -47,7 +49,6 @@ Component({
dakarole: dakarole,
memberMeHasClass: memberMeHasClass
},()=>{
console.log(111111111,'this.data.dakarole',this.data.dakarole,this.data.memberMeHasClass)
})
},
hide: function () {
......@@ -72,6 +73,10 @@ Component({
if (dataset.type == this.data.current) {
return
}
if(this.data.dakarole==1){
this.getMemberMeInfo(this.data.sid)
}
let url = '';
switch (dataset.type) {
case 'dc': // 跳转数据中心
......@@ -106,6 +111,28 @@ Component({
// this.setData({
// currentTab: dataset.type
// })
}
},
getMemberMeInfo(sid){
let that = this;
const user = LocalStorage.getItem('user');
wx.request({
url: apis.business.common.memberMe,
data: {
school_id: sid,
show_assign_class_status: 1
},
header: {
'Authorization': user && user.token,
},
success(res) {
if (res.data.code == 200) {
LocalStorage.setItem('memberMeHasClass',res.data.data.assign_class_status);
}else{
}
}
})
},
}
})
\ No newline at end of file
export default {
imageRoot: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/',
host: 'https://qxapi.qingxiao.online/daka',
host2: 'https://wx.m.shangjiadao.cn',
// host: 'https://qxapi.qingxiao.online/daka',
// host2: 'https://wx.m.shangjiadao.cn',
storageVersion: '4.0',
imageVersion: '20191104',
// host: 'https://clock.wp53.cn',
// host2: 'https://test.wp53.cn',
host: 'https://clock.wp53.cn',
host2: 'https://test.wp53.cn',
appId: 'wxc1246ea029394785',
miniProgram: {
clock: 'wxdeee20e52a1fd7ee'
......
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