<hi:Common_AliOHHeader runat="server" />
    <div class="pbox">
        <p class="text-muted">用户名</p>
        <input id="txtUserName" type="text" runat="server" clientidmode="Static" class="form-control" placeholder="请填写您的用户名">
        <p class="text-muted">手机</p>
        <input id="txtPhone" type="text" runat="server" clientidmode="Static" class="form-control" placeholder="请填写您的手机号">
        <p class="text-muted">姓名</p>
        <input id="txtRealName" type="text" runat="server" clientidmode="Static" class="form-control" placeholder="请填写您的姓名">
        <p class="text-muted">QQ</p>
        <input id="txtEmail" type="text" runat="server" clientidmode="Static" class="form-control" placeholder="请填写您的QQ号码">
        <button id="btnSetUserName" type="button" class="btn btn-warning btn-block">保存用户信息</button>
        <p id="firstLoginNote" class="text-center"><a href="/AliOH/default.aspx" class="text-muted">不填写，直接去首页。（后续可在个人中心修改）</a></p>
    </div>

<script type="text/javascript">
    $(document).ready(function () {
        $("#btnSetUserName").bind("click", function () { SetUserName(); }); //设置新昵称

        if ($.trim($('#txtUserName').val()))
            $('#txtUserName').attr('disabled', 'disabled');

        if (getParam('edit'))
            $('#firstLoginNote').hide();
    });
    function SetUserName() {
        $.ajax({
            url: "/API/VshopProcess.ashx",
            type: 'post', dataType: 'json', timeout: 10000,
            data: { action: "SetUserName", userName: $("#txtUserName").val(), RealName: $("#txtRealName").val(), CellPhone: $("#txtPhone").val(), QQ: $("#txtEmail").val() },
            success: function (resultData) {
                if (resultData.Status == "OK") {
                    alert_h("修改用户信息成功", function () { 
                        location.href = "/AliOH/MemberCenter.aspx";
                    });
                
                }
                else {
                    alert_h("修改用户信息失败, 请重试");
                }
            }
        });
    }
</script>
<script>
    //禁用右上角菜单
    document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
        WeixinJSBridge.call('hideOptionMenu');
    });
</script>
<hi:Common_AliOHFooter runat="server" />