module.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var a=t[o]={i:o,l:!1,exports:{}};return e[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(o,a,function(t){return e[t]}.bind(null,a));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";var o={isDouyinMiniProgram:function(){return"undefined"!=typeof tt&&"function"==typeof tt.getSystemInfo},detectMiniProgramEnvironment:function(){return this.isDouyinMiniProgram()?"tt":"wx"}};e.exports=o},function(e,t,n){"use strict";var o=r(n(2)),a=r(n(0));function r(e){return e&&e.__esModule?e:{default:e}}var i=i||GameGlobal,c="tt"===a.default.detectMiniProgramEnvironment()?tt:wx;i.qcIAASdk={init:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.channel&&(i.channel=e.channel),new Promise((function(e,t){o.default.getDNSInfo().then((function(t){e(t)}),(function(e){t(e)}))}))},timer:null,startTimer:function(){this.timer||(o.default.activeRoleInfo(),this.timer=setInterval((function(){o.default.activeRoleInfo()}),6e4))},login:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this;return new Promise((function(n,a){var r=c.getStorageSync("userInfo");r.token?(console.log("token已存在"),c.checkSession({success:function(){console.log("检测session_key未过期"),o.default.tokenCheck().then((function(o){o.data?(t.startTimer(),n({code:200,data:r,msg:"success",success:!0})):(console.log("token已过期"),t.tologin(e).then((function(e){return n(e)})).catch((function(e){return a(e)})))}))},fail:function(){console.log("检测session_key已过期"),t.tologin(e).then((function(e){return n(e)})).catch((function(e){return a(e)}))}})):t.tologin(e).then((function(e){return n(e)})).catch((function(e){return a(e)}))}))},tologin:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.log("重新登录=====>"),new Promise((function(n,a){o.default.IAALogin(t).then((function(t){200===t.code&&e.startTimer(),n(t)}),(function(e){a({msg:e.msg||"fail"})}))}))},getShareInfo:function(){return c.showShareMenu(),o.default.getShareInfo().then((function(e){var t=e.data,n=t.path,o=t.shareImg,r=t.title,i=t.query;return console.log("设置分享信息====>",n),"wx"===a.default.detectMiniProgramEnvironment()?wx.onShareAppMessage((function(){return{title:r,path:n,imageUrl:o}})):tt.onShareAppMessage((function(){return{title:r,query:i,imageUrl:o}})),e}))},trackRoleInfo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(t,n){o.default.trackRoleInfo(e).then((function(e){e.data?t(e):n(e)}),(function(e){n({msg:e.msg||"fail"})}))}))},finishWatchAd:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(t,n){setTimeout((function(){o.default.finishWatchAd(e).then((function(e){e.data?t(e):n(e)}),(function(e){n({msg:e.msg||"fail"})}))}),2e3)}))},logout:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(t,n){o.default.logout(e).then((function(e){e.data?(c.removeStorageSync("userInfo"),t(e)):n(e)}),(function(e){n({msg:e.msg||"fail"})}))}))}},e.exports=i.qcSdk},function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return d(o({method:"POST",url:"/api/user/active/call",conf:{showLoading:!1}},e))},trackRoleInfo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d(o({method:"POST",url:"/api/event/log/track/call",conf:{showLoading:!1}},e))},finishWatchAd:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d(o({method:"POST",url:"/api/event/finish/watch/ad/call",conf:{showLoading:!1}},e))},getShareInfo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d(o({url:"/api/user/share/game",conf:{showLoading:!1}},e))},logout:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d(o({url:"/api/user/logout",conf:{showLoading:!0},method:"PATCH"},e))}};e.exports=l},function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t",e);var t=this.setting(e.conf);return e.conf&&delete e.conf,t.showLoading&&s.showLoading(t.loadingParams),e.ts=Date.now(),e=this.params(e),a.default.debug&&console.log((new Date).getTime(),e.url,e.data),e.ts&&delete e.ts,new Promise((function(n,r){s.request(o({},e,{success:function(o){a.default.debug&&console.log((new Date).getTime(),e.url,o),t.showLoading&&s.hideLoading(),200!==o.statusCode||!o.data||void 0!==o.data.code&&200!==o.data.code?(t.showToast&&(o.data&&o.data.msg&&(t.toastParams.title=o.data.msg),s.showToast(t.toastParams)),r(o)):n(o)},fail:function(n){a.default.debug&&console.log((new Date).getTime(),e.url,n),t.showLoading&&s.hideLoading(),t.showToast&&(n.errMsg&&(t.toastParams.title=n.errMsg),s.showToast(t.toastParams)),r(n)}}))}))},params:function(e){e.method=(e.method||"GET").toUpperCase();var t=s.getStorageSync("userInfo");console.log(" userInfo.token===>",t.token);var n="signature="+this.sign(e)+"&appKey="+(a.default.baseParams.appKey||u.appKey)+"×tamp="+e.ts+"&deviceSystem="+a.default.deviceParams["device-os"]+"&appServer=0",r={token:t?t.token:"",channel:JSON.stringify(u.channel||a.default.channelId||{})};if("POST"===e.method&&(e.header={"Content-Type":"application/json"}),e.private||(e.header=o({},e.header,r)),!/^http/.test(e.url)){var i=a.default.baseUrl+e.url;i.includes("?")?e.url=i+"&"+n:e.url=i+"?"+n}return delete e.private,delete e.signUrl,e},setting:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o({},a.default.setting,e)},sign:function(e){var t="appSecret="+(a.default.baseParams.appSecret||u.appSecret)+"&appKey="+(a.default.baseParams.appKey||u.appKey)+"&appServer=0×tamp="+e.ts,n=(0,r.default)(t).toLocaleUpperCase();return n}};e.exports=d},function(e,t,n){"use strict";var o,a=n(0);var r="tt"===((o=a)&&o.__esModule?o:{default:o}).default.detectMiniProgramEnvironment()?tt:wx,i={debug:!1,baseParams:{app_id:"",client_id:"",gameId:"",appKey:"",appSecret:""},gameParams:{"game-pkg_name":"","game-app_ver":"","game-h_ver":"","game-sdk_ver":"","game-mp_id":""},agentParams:{"agent-ch":"","agent-sub_ch":""},deviceParams:{"device-device_id":"","device-mac":"","device-ip":"","device-brand":"","device-model":"","device-os":"","device-os_version":"","device-screen":"","device-net":"","device-imsi":"","device-longitude":"","device-latitude":"","device-userua":"","device-disk_space":"","device-open_time":"","device-is_charge":"","device-screen_luminance":"","device-has_sim":"","device-is_break":""},extParams:{brand:"",model:"",pixelRatio:"",screenWidth:"",screenHeight:"",windowWidth:"",windowHeight:"",statusBarHeight:"",language:"",version:"",system:"",platform:"",fontSizeSetting:"",SDKVersion:"",benchmarkLevel:"",albumAuthorized:"",cameraAuthorized:"",locationAuthorized:"",microphoneAuthorized:"",notificationAuthorized:"",notificationAlertAuthorized:"",notificationBadgeAuthorized:"",notificationSoundAuthorized:"",bluetoothEnabled:"",locationEnabled:"",wifiEnabled:"",safeArea:""},setting:{showLoading:!0,loadingParams:{title:"加载中"},showToast:!1,toastParams:{icon:"none"}},launchOptions:{},baseUrl:"http://192.168.8.21:11001",channelId:""};try{i.gameParams["game-pkg_name"]=r.canIUse?"":"game",r.getSystemInfo({success:function(e){i.deviceParams["device-brand"]=encodeURIComponent(e.brand),i.deviceParams["device-model"]=encodeURIComponent(e.model),i.deviceParams["device-screen"]=encodeURIComponent(e.screenWidth+"x"+e.screenHeight),console.log("res.platform====>",e.platform),i.deviceParams["device-os"]=e.platform,i.deviceParams["device-os_version"]=encodeURIComponent(e.system),i.extParams.brand=e.brand,i.extParams.model=e.model,i.extParams.pixelRatio=e.pixelRatio,i.extParams.windowWidth=e.windowWidth,i.extParams.windowHeight=e.windowHeight,i.extParams.statusBarHeight=e.statusBarHeight,i.extParams.language=e.language,i.extParams.version=e.version,i.extParams.system=e.system,i.extParams.platform=e.platform,i.extParams.fontSizeSetting=e.fontSizeSetting,i.extParams.SDKVersion=e.SDKVersion,i.extParams.benchmarkLevel=e.benchmarkLevel,i.extParams["albumAuthorized\t"]=e.albumAuthorized,i.extParams.cameraAuthorized=e.cameraAuthorized,i.extParams.locationAuthorized=e.locationAuthorized,i.extParams.microphoneAuthorized=e.microphoneAuthorized,i.extParams.notificationAuthorized=e.notificationAuthorized,i.extParams.notificationAlertAuthorized=e.notificationAlertAuthorized,i.extParams.notificationBadgeAuthorized=e.notificationBadgeAuthorized,i.extParams.notificationSoundAuthorized=e.notificationSoundAuthorized,i.extParams.bluetoothEnabled=e.bluetoothEnabled,i.extParams.locationEnabled=e.locationEnabled,i.extParams.wifiEnabled=e.wifiEnabled,i.extParams.safeArea=e.safeArea}}),i.extParams.userua=window.navigator.userAgent,r.getNetworkType({success:function(e){i.deviceParams["device-net"]=encodeURIComponent(e.networkType),i.extParams.net=e.networkType}}),r.getScreenBrightness({success:function(e){i.deviceParams["device-screen_luminance"]=encodeURIComponent(parseInt(100*e.value)),i.extParams.screen_luminance=parseInt(100*e.value)}})}catch(e){console.error("-----\x3e",e)}e.exports=i},function(e,t,n){"use strict";var o;"function"==typeof Symbol&&Symbol.iterator;!function(a){function r(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function i(e,t,n,o,a,i){return r(function(e,t){return e<>>32-t}(r(r(t,e),r(o,i)),a),n)}function c(e,t,n,o,a,r,c){return i(t&n|~t&o,e,t,a,r,c)}function u(e,t,n,o,a,r,c){return i(t&o|n&~o,e,t,a,r,c)}function s(e,t,n,o,a,r,c){return i(t^n^o,e,t,a,r,c)}function d(e,t,n,o,a,r,c){return i(n^(t|~o),e,t,a,r,c)}function l(e,t){e[t>>5]|=128<>>9<<4)]=t;var n,o,a,i,l,f=1732584193,m=-271733879,g=-1732584194,h=271733878;for(n=0;n>5]>>>t%32&255);return n}function m(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+"0123456789abcdef".charAt(15&t);return o}function h(e){return unescape(encodeURIComponent(e))}function v(e){return function(e){return f(l(m(e),8*e.length))}(h(e))}function p(e,t){return function(e,t){var n,o,a=m(e),r=[],i=[];for(r[15]=i[15]=void 0,a.length>16&&(a=l(a,8*e.length)),n=0;n<16;n+=1)r[n]=909522486^a[n],i[n]=1549556828^a[n];return o=l(r.concat(m(t)),512+8*t.length),f(l(i.concat(o),640))}(h(e),h(t))}function P(e,t,n){return t?n?p(t,e):function(e,t){return g(p(e,t))}(t,e):n?v(e):function(e){return g(v(e))}(e)}void 0===(o=function(){return P}.call(t,n,t,e))||(e.exports=o)}()}]);