add upfailed
This commit is contained in:
parent
4c3bc991e2
commit
f862d42b13
@ -1,4 +1,5 @@
|
||||
const NetManage = require('../../manages/NetManage');
|
||||
import { UpFail } from '../../tips/UpFail';
|
||||
import { UpSuccess } from '../../tips/UpSuccess';
|
||||
import { uimanger } from '../UIManger';
|
||||
import { ChooseHeroUpdate } from './ChooseHeroUpdate';
|
||||
@ -147,8 +148,14 @@ export default class Academy_block extends cc.Component {
|
||||
type,
|
||||
this.currentData.info.hero_uniid,
|
||||
(res) => {
|
||||
// wait...
|
||||
uimanger.showUI(UpSuccess.prefabPath, res);
|
||||
if (res.state == 0) {
|
||||
// failed
|
||||
uimanger.showUI(UpFail.prefabPath, res);
|
||||
} else {
|
||||
//success
|
||||
uimanger.showUI(UpSuccess.prefabPath, res);
|
||||
}
|
||||
|
||||
var node = cc
|
||||
.find('Canvas')
|
||||
.getComponentInChildren(UIUpdateHero).node;
|
||||
|
@ -20,9 +20,8 @@ export class UpFail extends UIBase {
|
||||
@property(QualityStar) newStar: QualityStar = null;
|
||||
|
||||
init(data: any) {
|
||||
console.log(JSON.stringify(data));
|
||||
this.beforeNode.getComponent('herochoseone').initdata();
|
||||
|
||||
this.beforeNode.getComponent('herochoseone').initdata(data.old_hero);
|
||||
this.lb_lv.string = data.old_hero.hero_lv;
|
||||
this.lb_hp.string = data.old_hero.hp;
|
||||
this.lb_atk.string = data.old_hero.atk;
|
||||
this.lb_def.string = data.old_hero.def;
|
||||
|
Loading…
x
Reference in New Issue
Block a user