|
@@ -1,6 +1,5 @@
|
|
|
import Util from "../../../before/util/Util";
|
|
import Util from "../../../before/util/Util";
|
|
|
import JsbSystem from "../../../mk/system/JsbSystem";
|
|
import JsbSystem from "../../../mk/system/JsbSystem";
|
|
|
-import LoadingBar from "../../component/LoadingBar";
|
|
|
|
|
import { UpdateState } from "../../data/AppData";
|
|
import { UpdateState } from "../../data/AppData";
|
|
|
import HotUpdatePanel from "../hotUpdate/HotUpdatePanel";
|
|
import HotUpdatePanel from "../hotUpdate/HotUpdatePanel";
|
|
|
|
|
|
|
@@ -9,8 +8,8 @@ const { ccclass, property } = cc._decorator;
|
|
|
@ccclass
|
|
@ccclass
|
|
|
export default class Login extends cc.Component {
|
|
export default class Login extends cc.Component {
|
|
|
|
|
|
|
|
- @property(LoadingBar)
|
|
|
|
|
- private bar: LoadingBar = null;
|
|
|
|
|
|
|
+ @property(cc.Sprite)
|
|
|
|
|
+ private bar: cc.Sprite = null;
|
|
|
@property({ displayName: '加载文字', type: cc.Label })
|
|
@property({ displayName: '加载文字', type: cc.Label })
|
|
|
private lbl_progress: cc.Label = null;
|
|
private lbl_progress: cc.Label = null;
|
|
|
@property({ displayName: '服务协议', type: cc.Label })
|
|
@property({ displayName: '服务协议', type: cc.Label })
|
|
@@ -63,7 +62,7 @@ export default class Login extends cc.Component {
|
|
|
|
|
|
|
|
if (gData.appData.updateState == UpdateState.IsUpdate) {
|
|
if (gData.appData.updateState == UpdateState.IsUpdate) {
|
|
|
this.lbl_progress.string = '正在更新中,请耐心等待';
|
|
this.lbl_progress.string = '正在更新中,请耐心等待';
|
|
|
- this.bar.setProgress(gData.appData.updatePercent);
|
|
|
|
|
|
|
+ this.setProgress(gData.appData.updatePercent);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -104,7 +103,7 @@ export default class Login extends cc.Component {
|
|
|
|
|
|
|
|
/** 设置进度 */
|
|
/** 设置进度 */
|
|
|
private setProgress(current) {
|
|
private setProgress(current) {
|
|
|
- this.bar.setProgress(current);
|
|
|
|
|
|
|
+ this.bar.fillRange = current/100;
|
|
|
this.lbl_progress.string = "加载中 " + current + "%";
|
|
this.lbl_progress.string = "加载中 " + current + "%";
|
|
|
}
|
|
}
|
|
|
|
|
|