| | |
| | | //有父级 |
| | | request = $.extend(request, haoutil.system.getRequest(window.top)); |
| | | } |
| | | // debugger; |
| | | |
| | | try { |
| | | var jwtstr = request.JWT; |
| | | var strs_ = jwtstr.split('.'); |
| | |
| | | var jwt_payload_ = new buffer.Buffer(strs_[1].toString('base64'), 'base64').toString(); |
| | | var payload_ = JSON.parse(jwt_payload_); |
| | | mars3d.global_variables.userid = payload_.userid; |
| | | mars3d.global_variables.regionCode = payload_.divcode; |
| | | var hash = CryptoJS.HmacSHA256(strs_[0] + '.' + strs_[1], "sxyd"); |
| | | var hashInBase64 = base64UrlEncode(hash); |
| | | |
| | |
| | | } |
| | | |
| | | // mars3d.global_variables.userid = request?.userid || 2; |
| | | regionCode = mars3d.global_variables.regionCode |
| | | |
| | | var configfile = "config/config.json"; //默认地址 |
| | | if (request.config) { |
| | |
| | | |
| | | initLayersByUserid(); |
| | | |
| | | mask_selection(mars3d.global_variables.userid) |
| | | mask_selection(regionCode) |
| | | |
| | | //如果有xyz传参,进行定位 |
| | | if (haoutil.isutil.isNotNull(request.x) && haoutil.isutil.isNotNull(request.y)) { |