Initialize local project and fix ranch growth synchronization
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
package net.pixvi.myr.panel.realname
|
||||
{
|
||||
import flash.events.Event;
|
||||
import net.pixvi.common.utils.Alert;
|
||||
import net.pixvi.myr.net.NetUser;
|
||||
import net.pixvi.psg.ui.PSGPopPanel;
|
||||
|
||||
public class RealNamePanel extends PSGPopPanel
|
||||
{
|
||||
|
||||
public var ui:RealNamePanelUI = new RealNamePanelUI();
|
||||
|
||||
public function RealNamePanel(showTime:Number = -1, hideTime:Number = -1)
|
||||
{
|
||||
addChild(ui);
|
||||
super(showTime,hideTime);
|
||||
buffMode = false;
|
||||
}
|
||||
|
||||
override public function init() : void
|
||||
{
|
||||
ui.btn_close.onClick(closeHandler);
|
||||
ui.btn_yes.onClick(sendRealNameHandler);
|
||||
}
|
||||
|
||||
public function sendRealNameHandler(e:Event = null) : void
|
||||
{
|
||||
if(ui.text_realID.text.length < 17 || ui.text_realName.text.length < 2)
|
||||
{
|
||||
Alert.yes("提示","格式错误!请检查填写的资料是否正确。");
|
||||
return;
|
||||
}
|
||||
NetUser.getIns().setRealName(ui.text_realName.text,ui.text_realID.text,sendRealNameCompleteHandler);
|
||||
}
|
||||
|
||||
public function sendRealNameCompleteHandler(re:Object) : void
|
||||
{
|
||||
if(re.resCode != 0)
|
||||
{
|
||||
Alert.yes("认证失败",re.resMsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.yes("设置完毕","恭喜,已完成实名制认证!",closeHandler);
|
||||
}
|
||||
}
|
||||
|
||||
public function closeHandler(e:Event = null) : void
|
||||
{
|
||||
this.showOut();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package net.pixvi.myr.panel.realname
|
||||
{
|
||||
import flash.display.DisplayObject;
|
||||
import flash.text.TextField;
|
||||
import net.pixvi.common.view.FF;
|
||||
import net.pixvi.pfw.ui.UIComponent;
|
||||
import net.pixvi.psg.ui.controller.PiLightButton;
|
||||
|
||||
public class RealNamePanelUI extends UIComponent
|
||||
{
|
||||
|
||||
public var btn_close:PiLightButton;
|
||||
|
||||
public var btn_yes:PiLightButton;
|
||||
|
||||
public var text_realName:TextField;
|
||||
|
||||
public var text_realID:TextField;
|
||||
|
||||
public function RealNamePanelUI(skin:DisplayObject = null, autoViewSize:Boolean = true, w:Number = 50, h:Number = 50)
|
||||
{
|
||||
skin = FF.getMC("ui.RealNamePanelUI");
|
||||
super(skin,autoViewSize,w,h);
|
||||
}
|
||||
|
||||
override public function onSkinComplete() : void
|
||||
{
|
||||
text_realID.maxChars = 18;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user