<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
    <head>
        <th:block th:include="include :: header('特邀用户详情')"/>
        <th:block th:include="include :: bootstrap-fileinput-css" />
        <style>
            .detail-container{
                height: 50%;
                padding: 50px;
                display: flex;
                flex-direction: column;
                justify-content: space-around;
                align-content: flex-start;
            }
        </style>
    </head>
    <body>
        <div class="detail-container"></div>
    </body>
    <th:block th:include="include :: footer"/>
    <script type="text/javascript">
        $(function(){
            let uid = getUrlParms('id');
            let data = {
                uid:uid
            }
            $.ajax({
                url:'/smile/user/getUserById',
                type:'post',
                data,
                success:function(response){
                    let { data } = response;
                    let child = `<div>特邀代理姓名：${data.name}</div>` + `<div>特邀代理手机号：${data.phone}</div>` + `<div>代理描述：${data.describe}</div>` + `<div>代理演出：${data.title}</div>` + `<div>票提设置：${data.ticket}%</div>`
                    $('.detail-container').append(child)
                }
            })
        })
        function getUrlParms(name){
            var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if(r!=null)
                return unescape(r[2]);
            return null;
        }
    </script>
</html>