|
@ -60,10 +60,37 @@ window.addEventListener('exited', function(event) {
|
60
|
60
|
document.getElementById('unlogin').style.display = 'block';
|
61
|
61
|
});
|
62
|
62
|
|
|
63
|
function userInformation() {
|
|
64
|
var userId = plus.storage.getItem('userid');
|
|
65
|
mui.ajax(baseUrl + "/ajax/professor/editBaseInfo/" + userId, {
|
|
66
|
dataType: 'json', //数据格式类型
|
|
67
|
type: 'GET', //http请求类型
|
|
68
|
timeout: 10000, //超时设置
|
|
69
|
//async: false,
|
|
70
|
success: function(data) {
|
|
71
|
var $info = data.data || {};
|
|
72
|
oFlag = $info.authentication;
|
|
73
|
oFlag1 = $info.authType
|
|
74
|
console.log(oFlag)
|
|
75
|
if(data.success && data.data) {
|
|
76
|
if(!$info.authType) {
|
|
77
|
document.getElementById("needs").style.display = "none";
|
|
78
|
}
|
|
79
|
}
|
|
80
|
|
|
81
|
},
|
|
82
|
error: function() {
|
|
83
|
plus.nativeUI.toast("服务器链接超时", toastStyle);
|
|
84
|
return;
|
|
85
|
}
|
|
86
|
});
|
|
87
|
}
|
63
|
88
|
//显示登录,登陆或者注册
|
64
|
89
|
mui.plusReady(function() {
|
65
|
90
|
var regBtn = document.getElementById("regBtn");
|
66
|
91
|
var logBtn = document.getElementById("logBtn");
|
|
92
|
userInformation()
|
|
93
|
|
67
|
94
|
// 注册
|
68
|
95
|
regBtn.addEventListener('tap', function() {
|
69
|
96
|
mui.openWindow({
|
|
@ -202,6 +229,8 @@ function initData() {
|
202
|
229
|
//加载第一页数据
|
203
|
230
|
function getOnePage() {
|
204
|
231
|
mui.plusReady(function() {
|
|
232
|
document.getElementById("needs").style.display = "block";
|
|
233
|
userInformation()
|
205
|
234
|
var userid = plus.storage.getItem('userid');
|
206
|
235
|
var pageIndex = 1;
|
207
|
236
|
mui.ajax(baseUrl + '/ajax/consult/pq', {
|
|
@ -373,11 +402,11 @@ window.addEventListener('backlist', function(event) {
|
373
|
402
|
mui('.status').each(function(index, item) {
|
374
|
403
|
if(this.getAttribute('consultId') == consultId) {
|
375
|
404
|
console.log(status)
|
376
|
|
if(status == 'myNeedAssessStatus=0') {
|
|
405
|
if(status == 'myNeedAssessStatus=0') {
|
377
|
406
|
this.classList.remove('status-1');
|
378
|
407
|
this.classList.add('status-2');
|
379
|
408
|
this.innerHTML = '待评价';
|
380
|
|
}else if(status == 'myNeedAssessStatus=1') {
|
|
409
|
} else if(status == 'myNeedAssessStatus=1') {
|
381
|
410
|
this.classList.remove('status-1');
|
382
|
411
|
this.classList.add('status-3');
|
383
|
412
|
this.innerHTML = '已完成';
|