12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- let huoConfig = {
- version: '0.8.0',
-
- miniUrl: 'https://mini.beibaoyx.com',
- baseUrl: 'https://miniapi.beibaoyx.com',
-
- 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': 'wx2e6f50f3ecce6ef2'
- },
-
- 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
|