|
@@ -45,7 +45,7 @@
|
|
|
<scroll-view class="rightBox user-right-box" scroll-y="true" :scroll-top="scrollTop" @scroll="scroll">
|
|
<scroll-view class="rightBox user-right-box" scroll-y="true" :scroll-top="scrollTop" @scroll="scroll">
|
|
|
<!-- <view class="user-right-box"> -->
|
|
<!-- <view class="user-right-box"> -->
|
|
|
<GRXX ref="GRXX" v-show="showIndex==1"></GRXX>
|
|
<GRXX ref="GRXX" v-show="showIndex==1"></GRXX>
|
|
|
- <XSGL ref="XSGL" v-show="showIndex==2&&userInfo.role=='老师'&&!isShow_xssyqk"></XSGL>
|
|
|
|
|
|
|
+ <XSGL ref="XSGL" v-show="showIndex==2&&userInfo.role=='老师'&&!isShow_xssyqk" v-on:onClick_XSSYQK="onClick_XSSYQK"></XSGL>
|
|
|
<XSSYQK ref="XSSYQK" v-show="showIndex==2&&userInfo.role=='老师'&&isShow_xssyqk"></XSSYQK>
|
|
<XSSYQK ref="XSSYQK" v-show="showIndex==2&&userInfo.role=='老师'&&isShow_xssyqk"></XSSYQK>
|
|
|
<GRXXJL ref="GRXXJL" v-show="showIndex==2&&userInfo.role=='学生'"></GRXXJL>
|
|
<GRXXJL ref="GRXXJL" v-show="showIndex==2&&userInfo.role=='学生'"></GRXXJL>
|
|
|
<!-- </view> -->
|
|
<!-- </view> -->
|
|
@@ -54,6 +54,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
|
|
+
|
|
|
<script>
|
|
<script>
|
|
|
import GRXX from './selfInfo.vue'
|
|
import GRXX from './selfInfo.vue'
|
|
|
import XSGL from './stuManage.vue'
|
|
import XSGL from './stuManage.vue'
|
|
@@ -125,12 +126,20 @@
|
|
|
initData() {
|
|
initData() {
|
|
|
this.showIndex = 0;
|
|
this.showIndex = 0;
|
|
|
},
|
|
},
|
|
|
|
|
+ onshow()
|
|
|
|
|
+ {
|
|
|
|
|
+ console.log('onshow......')
|
|
|
|
|
+ this.showIndex = false;
|
|
|
|
|
+ },
|
|
|
onClick_Btn1(index) {
|
|
onClick_Btn1(index) {
|
|
|
if (index == this.userMenu_student.length - 1) {
|
|
if (index == this.userMenu_student.length - 1) {
|
|
|
this.$emit("onClick_proManage");
|
|
this.$emit("onClick_proManage");
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ this.isShow_xssyqk = false;
|
|
|
this.checkedIndex_leftMenu = index;
|
|
this.checkedIndex_leftMenu = index;
|
|
|
this.showIndex = index + 1;
|
|
this.showIndex = index + 1;
|
|
|
|
|
+ // console.log('checkedIndex_leftMenu=',index)
|
|
|
|
|
+ // console.log('showIndex=',index+1)
|
|
|
}
|
|
}
|
|
|
if (this.userInfo.role == '老师') {
|
|
if (this.userInfo.role == '老师') {
|
|
|
switch (index) {
|
|
switch (index) {
|
|
@@ -182,8 +191,9 @@
|
|
|
console.log("请求成功", res);
|
|
console.log("请求成功", res);
|
|
|
this.$refs.GRXX.updateInfo(data.User);
|
|
this.$refs.GRXX.updateInfo(data.User);
|
|
|
mydata_userInfo.email = data.User.Email;
|
|
mydata_userInfo.email = data.User.Email;
|
|
|
|
|
+ // console.log('00000000000=',mydata_userInfo.role)
|
|
|
if (mydata_userInfo.role == '老师') {
|
|
if (mydata_userInfo.role == '老师') {
|
|
|
-
|
|
|
|
|
|
|
+ // this.$refs.XSSYQK.updateInfo(data.User);
|
|
|
} else {
|
|
} else {
|
|
|
this.$refs.GRXXJL.updateInfo(data.User);
|
|
this.$refs.GRXXJL.updateInfo(data.User);
|
|
|
}
|
|
}
|
|
@@ -211,8 +221,6 @@
|
|
|
this.scrollTop = 0
|
|
this.scrollTop = 0
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
//范例,直接复制
|
|
//范例,直接复制
|
|
|
testPost() {
|
|
testPost() {
|
|
|
let url = this.$Api + "/user/getuserinfo";
|
|
let url = this.$Api + "/user/getuserinfo";
|
|
@@ -242,6 +250,43 @@
|
|
|
console.log("fail+**+*", res)
|
|
console.log("fail+**+*", res)
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ },
|
|
|
|
|
+ onClick_XSSYQK(UserID){
|
|
|
|
|
+ // console.log("11111=",this.userInfo.role);
|
|
|
|
|
+ // console.log("2222=",this.isShow_xssyqk);
|
|
|
|
|
+ console.log("UserID=",UserID);
|
|
|
|
|
+ this.isShow_xssyqk = true;
|
|
|
|
|
+ this.checkedIndex_leftMenu = 1;
|
|
|
|
|
+ this.showIndex = 2;
|
|
|
|
|
+
|
|
|
|
|
+ let url = this.$Api + "/user/getuserinfo";
|
|
|
|
|
+ uni.request({
|
|
|
|
|
+ header: {
|
|
|
|
|
+ 'Content-Type': 'application/json;charset=UTF-8'
|
|
|
|
|
+ },
|
|
|
|
|
+ url: url,
|
|
|
|
|
+ method: 'POST',
|
|
|
|
|
+ data: {
|
|
|
|
|
+ "UserID": UserID,
|
|
|
|
|
+ },
|
|
|
|
|
+ dataType: 'json',
|
|
|
|
|
+ success: (res) => {
|
|
|
|
|
+ let data = res.data;
|
|
|
|
|
+ //100成功
|
|
|
|
|
+ if (data.Code == 100) {
|
|
|
|
|
+ console.log("请求成功", res);
|
|
|
|
|
+ this.$refs.XSSYQK.updateInfo(data.User);
|
|
|
|
|
+ }
|
|
|
|
|
+ //200失败
|
|
|
|
|
+ else {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ // console.log("success+++**+*", res.data.Code)
|
|
|
|
|
+ },
|
|
|
|
|
+ fail: (res) => {
|
|
|
|
|
+ console.log("fail+**+*", res)
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|