|
@@ -19,21 +19,22 @@
|
|
|
var jionData = {
|
|
|
"code": GetQueryString('code')
|
|
|
};
|
|
|
- alert(jionData.code);
|
|
|
- $.ajax({
|
|
|
- url: "https://readertest.lingjiao.cn/activity/wx/ucenter/wxlogin",
|
|
|
- type: 'GEt',
|
|
|
- contentType:'application/json;charset=utf-8',
|
|
|
- data: jionData,
|
|
|
- success: function (userData) {
|
|
|
- alert(JSON.stringify(userData.data))
|
|
|
- localStorage.setItem('userData', JSON.stringify(userData.data));
|
|
|
- },
|
|
|
- error: function (e) {
|
|
|
- alert(JSON.stringify(e))
|
|
|
- alert('已失效,请重新打开')
|
|
|
- }
|
|
|
- });
|
|
|
+ if(jionData.code){
|
|
|
+ $.ajax({
|
|
|
+ url: "https://readertest.lingjiao.cn/activity/wx/ucenter/wxlogin",
|
|
|
+ type: 'GEt',
|
|
|
+ contentType:'application/json;charset=utf-8',
|
|
|
+ data: jionData,
|
|
|
+ success: function (userData) {
|
|
|
+ alert(JSON.stringify(userData.data))
|
|
|
+ localStorage.setItem('userData', JSON.stringify(userData.data));
|
|
|
+ },
|
|
|
+ error: function (e) {
|
|
|
+ //alert(JSON.stringify(e))
|
|
|
+ //alert('已失效,请重新打开')
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
</script>
|
|
|
</body>
|
|
|
</html>
|