fix bug: jwt、mobile userid
| | |
| | | , 3003: ['#00EE00', '#FF9F7F', '#FFD700', '#ff6600', '#ff0066', '#ff6666'] |
| | | } |
| | | |
| | | var default_system_params = { geoserver_url_predix: 'http://58.246.27.194:7011/', nodejs_url_predix: 'http://58.246.27.194:7012/', userid: 2, queryDataType: 'hour', weathercitycode: '101020100', wind360: 0, windSpeed: 10, is_single_taxi_replaying: false,summary_topN_count :50, un_authorization_url: 'http://www.sohu.com'}; |
| | | var default_system_params = { geoserver_url_predix: 'http://223.167.111.168:7001/', nodejs_url_predix: 'http://223.167.111.168:7012/', userid: 2, queryDataType: 'hour', weathercitycode: '101020100', wind360: 0, windSpeed: 10, is_single_taxi_replaying: false,summary_topN_count :50, un_authorization_url: 'http://www.sohu.com'}; |
| | | var default_grid_camerview = {grid5000:{"lat":30.306622,"lng":121.251151,"alt":180451,"heading":2,"pitch":-61},grid3000:{"lat":31.076898,"lng":121.418675,"alt":36483,"heading":2,"pitch":-61},grid1000:{"lat":31.216173,"lng":121.350382,"alt":8883,"heading":2,"pitch":-60}}; |
| | | |
| | | function bindPopupFunction(event) { |
| | |
| | | pid: item.pid, |
| | | name: item.name, |
| | | type: "wms", |
| | | url: mars3d.global_variables.geoserver_url_predix + "/geoserver/konglu_58/wms", |
| | | url: mars3d.global_variables.geoserver_url_predix + "geoserver/konglu_58/wms", |
| | | layers: "konglu_58:" + item.geoname_prefix + mars3d.global_variables.queryDataType, |
| | | crs: "EPSG:4326", |
| | | parameters: { |
| | |
| | | var strs_ = jwtstr.split('.'); |
| | | var jwt_header_ = new buffer.Buffer(strs_[0].toString('base64'), 'base64').toString(); |
| | | var jwt_payload_ = new buffer.Buffer(strs_[1].toString('base64'), 'base64').toString(); |
| | | var payload_ = JSON.parse(jwt_payload_); |
| | | mars3d.global_variables.userid = payload_.userid; |
| | | var hash = CryptoJS.HmacSHA256(strs_[0] + '.' + strs_[1], "sxyd"); |
| | | var hashInBase64 = base64UrlEncode(hash); |
| | | |
| | | var reg = RegExp(strs_[2]); |
| | | if (!reg.exec(hashInBase64)) { |
| | | // verification failed, go back |