|
|
@@ -29,28 +29,20 @@ export class LoginData {
|
|
|
public isAuth: boolean;
|
|
|
|
|
|
/** 服务协议 */
|
|
|
- public ruleStr:string;
|
|
|
+ public rule_data: string[];
|
|
|
|
|
|
/** 隐私协议 */
|
|
|
- public privacyStr:string;
|
|
|
+ public privacy_data: string[];
|
|
|
|
|
|
/**
|
|
|
* 初始化本地配置
|
|
|
* @returns
|
|
|
*/
|
|
|
public async loadLocalRes() {
|
|
|
- let result = await mk.loader.load("data/rule_data",cc.JsonAsset);
|
|
|
- if(result && result.json){
|
|
|
- this.ruleStr = '';
|
|
|
- this.privacyStr = '';
|
|
|
- let arr = result.json.server;
|
|
|
- for(let i=0;i<arr.length;i++){
|
|
|
- this.ruleStr += arr[i] + '\n';
|
|
|
- }
|
|
|
- arr = result.json.privacy;
|
|
|
- for(let i=0;i<arr.length;i++){
|
|
|
- this.privacyStr += arr[i] + '\n';
|
|
|
- }
|
|
|
+ let result = await mk.loader.load("data/rule_data", cc.JsonAsset);
|
|
|
+ if (result && result.json) {
|
|
|
+ this.rule_data = result.json.server;
|
|
|
+ this.privacy_data = result.json.privacy;
|
|
|
this.loadResCompelete = true;
|
|
|
}
|
|
|
}
|