|
|
@@ -20,6 +20,15 @@ export class AppData {
|
|
|
/** 测试服/正式服的appId */
|
|
|
public appId: string = 'wxcf31f0e54f7fefda';
|
|
|
|
|
|
+ /** 友盟渠道 */
|
|
|
+ public umengChannel:string = '';
|
|
|
+
|
|
|
+ /** 设备型号 */
|
|
|
+ public deviceType:string = '';
|
|
|
+
|
|
|
+ /** 安卓版本号 */
|
|
|
+ public androidVersion:string = '';
|
|
|
+
|
|
|
public mac: string = 'c9:05:e2:1c:b2:23,f6:60:e4:1a:b7:27';
|
|
|
|
|
|
/** 设备信息 */
|
|
|
@@ -33,6 +42,30 @@ export class AppData {
|
|
|
};
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 更新设备信息
|
|
|
+ * @description 自定义功能 JavaToCocos
|
|
|
+ * @param info info(Java返回)
|
|
|
+ */
|
|
|
+ public updateDeviceInfo(info) {
|
|
|
+ let arr = info.split('#')
|
|
|
+ this.machineInfo.android_id = arr[0];
|
|
|
+ this.machineInfo.idfa = arr[1];
|
|
|
+ this.machineInfo.imei = arr[2];
|
|
|
+ this.machineInfo.mac = this.mac = arr[3];
|
|
|
+ this.machineInfo.oaid = arr[4];
|
|
|
+ this.machineInfo.umid = arr[5];
|
|
|
+ this.tfChannel = arr[6];
|
|
|
+ this.appVersion = arr[7];
|
|
|
+
|
|
|
+ /** 友盟渠道 */
|
|
|
+ this.umengChannel = arr[8];
|
|
|
+ /** 设备型号 */
|
|
|
+ this.deviceType = arr[9];
|
|
|
+ /** 安卓版本号 */
|
|
|
+ this.androidVersion = arr[10];
|
|
|
+ }
|
|
|
+
|
|
|
public init() {
|
|
|
|
|
|
}
|