Commit d7f968c3 authored by lvtz's avatar lvtz

fix

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