@{ 
    dynamic currentUserData =ViewBag.CurrentUserData;
    string mobile = currentUserData.Mobile;
    int uid = currentUserData.Id;
}
<div class="main" id="main" v-cloak>
    <div class="breadcrumb-box">
        <el-breadcrumb separator="/">
            <el-breadcrumb-item><i class="el-icon-s-home"></i>手机绑定/认证</el-breadcrumb-item>
        </el-breadcrumb>
    </div>
    <el-form ref="form" label-width="90px" label-position="right" style="max-width:600px;width:80%">
        <el-form-item label="绑定手机">
            <el-input v-model="Mobile" maxlength="15" id="mobile" v-validate="{data:Mobile,dataType:'mobile',nullMsg:'请填写绑定的手机号!',errorMsg:'手机号码填写错误'}"></el-input>
            <span class="help-block validate-tips-box"></span>
        </el-form-item>

        <el-form-item label="手机验证码">
            <ui-input-code placeholder="点击右侧按钮获取手机验证码" v-model="SmsCode" type="mobile" focus-target="#mobile" :account="Mobile" url-api="/E/SmsCode/Send" v-validate="{data:SmsCode,dataType:'numeric',minLength:6,minLengthErrorMsg:'验证码为6位数字！',nullMsg:'请填写验证码'}"></ui-input-code>
            <span class="help-block validate-tips-box"></span>
        </el-form-item>
        <el-form-item label="">
            <el-button size="small"  type="primary" v-on:click="postSubmit">提交保存</el-button>
            <el-button size="small" onclick="location.href='@Url.ActionUrl("Security")'">返回</el-button>
        </el-form-item>
    </el-form>
</div>
<script type="text/javascript">
    var formData = { Mobile: "@mobile", SmsCode: "",Id:@(uid),};
    var vue = new Vue({
        el: "#main",
        data: formData,
        methods: {
            postSubmit: function () {
                var validated = this.validateForm({});//jquery表单验证
                if (validated) {
                    this.submit({ url: "@Url.ActionUrl()", data: formData, showSuccessMsg: false, success: "PostBack()" });
                }
            }
        }
    })

       function PostBack() {
            vue.$alert('手机号绑定并认证成功!', '提示', {
            confirmButtonText: '确定',
            type: 'success',
            callback: function () {
                 location.href = '@Url.ActionUrl("Security")';
            }
        })
    }

</script>