let huoConfig = { version: '0.8.0', // 根地址 miniUrl: 'https://mini.beibaoyx.com', baseUrl: 'https://miniapi.beibaoyx.com', // 盒子类型 rp红包 gd金币 mpType: 'gd', // 基础参数 baseParams: { 'app_id': 81234700, 'client_id': '', 'format': 'json' }, // 游戏参数 gameParams: { 'game-pkg_name': wx.canIUse ? '' : 'game', 'game-app_ver': '', 'game-h_ver': '', 'game-sdk_ver': '', 'game-mp_id': 'wx8ce3423b6e10999d' }, // 渠道参数 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': '' }, // 配置 setting: { // 加载框配置 showLoading: true, loadingParams: { title: '加载中', mask: true }, // 提示框配置 showToast: false, toastParams: { icon: 'none' } } } wx.getSystemInfo({ success: res => { huoConfig.deviceParams['device-brand'] = encodeURIComponent(res.brand) // 手机品牌 huoConfig.deviceParams['device-model'] = encodeURIComponent(res.model) // 手机型号 huoConfig.deviceParams['device-screen'] = encodeURIComponent(res.screenWidth + 'x' + res.screenHeight) // 屏幕分辨率 huoConfig.deviceParams['device-os'] = encodeURIComponent(res.platform) // 客户端平台 huoConfig.deviceParams['device-os_version'] = encodeURIComponent(res.system) // 操作系统版本 } }) wx.getNetworkType({ success: res => { huoConfig.deviceParams['device-net'] = encodeURIComponent(res.networkType) // 网络类型 } }) wx.getScreenBrightness({ success: res => { huoConfig.deviceParams['device-screen_luminance'] = encodeURIComponent(parseInt(res.value * 100)) // 屏幕亮度 } }) huoConfig.gameParams['game-app_ver'] = huoConfig.version huoConfig.gameParams['game-sdk_ver'] = huoConfig.version module.exports = huoConfig