jack 7 年之前
父节点
当前提交
c35d1355e0
共有 1 个文件被更改,包括 11 次插入73 次删除
  1. 11 73
      app/js/index.js

+ 11 - 73
app/js/index.js

@ -149,80 +149,18 @@ document.getElementById("demandP").addEventListener("tap", function() {
149 149

150 150
})
151 151
document.getElementById("improfessor").addEventListener("tap", function() {
152
	var userid = plus.storage.getItem('userid');
153
	if(userid == null) {
154
		mui.openWindow({
155
			url: '../html/login.html',
156
			id: 'login.html'
157
		})
158
		return;
159
	}
160
	mui.ajax(baseUrl + "/ajax/professor/auth", {
161
		dataType: 'json', //数据格式类型
162
		type: 'GET', //http请求类型
163
		timeout: 10000, //超时设置
164
		data: {
165
			"id": userid
166
		},
167
		success: function(data) {
168
			if(data.success) {
169
				var $data = data.data;
170
				if($data.authType == 1) {
171
					mui.openWindow({
172
						url: '../html/needSearch.html',
173
						id: '../html/needSearch.html',
174
						show: {
175
							autoShow: false,
176
							aniShow: "slide-in-right",
177
						}
178
					});
179
				} else {
180
					if($data.authStatusExpert == 2) {
181
						plus.nativeUI.toast("我们正在对您的信息进行认证,请稍等片刻", {
182
							'verticalAlign': 'center'
183
						});
184
					} else if($data.authStatusExpert == 1) {
185
						plus.nativeUI.toast("我们将尽快对您的信息进行认证", {
186
							'verticalAlign': 'center'
187
						});
188
					} else if($data.authStatusExpert <= 0) {
189
						if($data.authStatus == 3) {
190
							mui.openWindow({
191
								url: '../html/expert-authentication.html',
192
								id: 'expert-authentication.html',
193
								show: {
194
									autoShow: false,
195
									aniShow: "slide-in-right",
196
								}
197
							});
198
						} else if($data.authStatus == 2) {
199
							plus.nativeUI.toast("我们正在对您的信息进行认证,请稍等片刻", {
200
								'verticalAlign': 'center'
201
							});
202
						} else if($data.authStatus == 1) {
203
							plus.nativeUI.toast("我们将尽快对您的信息进行认证", {
204
								'verticalAlign': 'center'
205
							});
206
						} else {
207
							mui.openWindow({
208
								url: '../html/realname-authentication2.html',
209
								id: 'realname-authentication2.html',
210
								show: {
211
									autoShow: false,
212
									aniShow: "slide-in-right",
213
								}
214
							});
215
						}
216
					}
152
	mui.openWindow({
153
				url: '../html/searchListNew2.html?content=1',
154
				id: '../html/searchListNew2.html',
155
				show: {
156
					autoShow: false,
157
					aniShow: "fade-in",
158
				},
159
				extras: {
160
					key: "",
161
					qiFlag: 1
217 162
				}
218

219
			}
220
		},
221
		error: function() {
222
			plus.nativeUI.toast("服务器链接超时", toastStyle);
223
			return;
224
		}
225
	});
163
			});
226 164
})
227 165

228 166
proShow()