vipequity.html 6.7 KB
<!DOCTYPE html>
<html lang="zh">



<head>
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="css/base.css" />
    <link rel="stylesheet" type="text/css" href="css/style.css" />
    <title>我的权益</title>
    <script src="js/base.js" type="text/javascript"></script>
    <style>
        .title{
            text-align: center;
            padding: 0.2rem;
            color: #333;
        }
        body{
            background-color: #FFFFFF;
            box-shadow: none;
        }
        .btn_lsit{
            display: flex;
            width: 6.64rem;
            margin: 0 auto;
            justify-content: space-between;
        }
        .btn_item{
            width: 2.65rem;
            height: 0.61rem;
            border: 1px solid #DDBB73;
            line-height: 0.61rem;
            text-align:center ;
            font-size: 0.3rem;
            border-radius: 0.1rem;
        }
        .popup,.not_popup{
            width: 5.2rem;
            height: 3.6rem;
            background-color: #FFFFFF;
            border-radius: 0.1rem;
            position: fixed;
            left: 0;
            right: 0;
            margin: 0 auto;
            top: 50%;
            transform: translateY(-1.8rem);
            display: none;
            overflow: hidden;
            border: 1px solid #EEEEEE;
        }
        .not_popup{

        }
        .popup p{
            display: block;
            text-align: center;
            font-size: 0.36rem;
            margin-top: 0.8rem;
        }
        .popup_list{
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            display: flex;
        }
        .confirm,.cancel,.confirm_sub{
            width: 50%;
            font-size: 0.3rem;
            text-align:center ;
            height: 0.88rem;
            line-height: 0.88rem;
        }
        .confirm,.confirm_sub{
            color: #FFFFFF;
            background-color: #EFC36A;
            display: none;
        }
        .cancel{
            color: #333333;
            border: 1px solid #EEEEEE;
        }
        .not_popup_tit{
            font-size: 0.42rem;
            line-height: 100%;
        }
    </style>
</head>

<body>
    <div class="not_popup">
        <p class="not_popup_tit">

        </p>
    </div>
    <div class="popup">
        <p class="popup_tit">

        </p>
        <div class="popup_list">
            <div class="cancel">
                取消
            </div>
            <div class="confirm">
                确定
            </div>
            <div class="confirm_sub">
                确定
            </div>
        </div>
    </div>
    <div class="seheader center">
        <div class="left seback">
            <a href="#" onClick="javascript:history.back(-1);">
                <img src="images/care_03.jpg" />
            </a>
        </div>
        <div class="headertext">我的权益</div>
    </div>
    <div class="title"></div>
<div class="content">

</div>


    <script type="text/javascript" src="js/common.js"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            myRights()

        })
        // //富文本转换
        // function charToHtml(str) {
        //     if (str) {
        //         str = str.replace(/&amp;/g, '&');
        //         str = str.replace(/&lt;/g, '<');
        //         str = str.replace(/&gt;/g, '>');
        //         str = str.replace(/&quot;/g, "'");
        //         str = str.replace(/&#039;/g, ' ');
        //     }
        //     return str;
        // }
        //提示弹层
        $('.content').on('click','.turn',function () {
            $.ajax({
                type:"POST",
                url: baseUrl+"user/index/myRightsCheck",
                dataType:"json",
                data:{
                    DeviceType:"1",
                    token:"1",
                },
                success:function (res) {
                    if (res.data.able == 0){
                        $('.not_popup').show('.not_popup');
                        $('.not_popup_tit').html(`${res.msg}`)
                    } else {
                        $('.popup').show('.popup');
                        $('.confirm').show();
                        $('.popup_tit').html(`${res.msg}`)
                    }
                }
            })
        })
        //提示弹层
        $('.content').on('click','.money_turn',function () {
            $.ajax({
                type:"POST",
                url: baseUrl+"user/index/myRightsCheck",
                dataType:"json",
                data:{
                    DeviceType:"1",
                    token:"1",
                },
                success:function (res) {
                    $('.popup').show('.popup');
                    $('.confirm_sub').show();
                    var data = res.data;
                    $('.popup_tit').html(`${res.msg}`)
                }
            })
        })
        //关闭弹窗
        $('.popup').on('click','.confirm',function () {
            $('.popup').hide()
            $('.confirm').hide();
            $('.confirm_sub').hide();
        })
        $('.popup').on('click','.confirm_sub',function () {
            $('.popup').hide()
            $('.confirm').hide();
            $('.confirm_sub').hide();
        })
        $('.popup').on('click','.cancel',function () {
            $('.popup').hide();
            $('.confirm').hide();
            $('.confirm_sub').hide();
        })


        function myRights() {
            $.ajax({
                type:"POST",
                url: baseUrl+"user/index/myRights",
                dataType:"json",
                data:{
                    DeviceType:"1",
                    token:"1",
                },
                success:function (res) {
                    $('.vipcon').html(``)
                    var data = res.data
                    console.log(data)
                    $('.title').html(`<div>${data.post_title}</div>`)
                    var post_content = data.post_content
                    $('.content').append(post_content);
                    $('.content').append(`<div class="btn_lsit">
                                                <div class="btn_item turn">转让</div>
                                                <div class="btn_item money_turn">等额转消费金</div>
                                            </div>`);
                }
            })
        }
    </script>
</body>
</html>