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