evalute.html 5.2 KB
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <link rel="stylesheet" href="https://at.alicdn.com/t/font_890739_suqgzr3l3l.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/evalute.css">

    <title>评价</title>
    <script type="text/javascript" src="__TMPL__/public/assets/js/jquery.min.js"></script>
    <script type="text/javascript" src="__TMPL__/public/assets/js/base.js"></script>

</head>
<body>
<div class="container">
    <div class="evalutetext">
        <p class="evalutename">您好,给此次为您服务的员工打个分吧</p>
        <div class="evaluterank">
            <!--<p class="iconfont wujiaokong icon-wujiaoxing1"></p>-->
            <!--<p class="iconfont wujiaokong icon-wujiaoxing1"></p>-->
            <!--<p class="iconfont wujiaokong icon-wujiaoxing1"></p>-->
            <!--<p class="iconfont wujiaokong icon-wujiaoxing1"></p>-->
            <!--<p class="iconfont wujiaokong icon-wujiaoxing1"></p>-->
            <p class="evalstar">
                <img src="__TMPL__/public/assets/images/starxing.png" alt="">
            </p>
            <p class="evalstar">
                <img src="__TMPL__/public/assets/images/starxing.png" alt="">
            </p>
            <p class="evalstar">
                <img src="__TMPL__/public/assets/images/starxing.png" alt="">
            </p>
            <p class="evalstar">
                <img src="__TMPL__/public/assets/images/starxing.png" alt="">
            </p>
            <p class="evalstar">
                <img src="__TMPL__/public/assets/images/starxing.png" alt="">
            </p>
        </div>
    </div>
</div>
<div class="starintroduce">
    <p class="starsay">星级说明</p>
    <div class="starlist">
        <div class="iconstar">
            <p class="iconfont icon-wujiaoxing star"></p>
        </div>

        <p class="starname">极差服务</p>

    </div>
    <div class="starlist">
        <div class="iconstar">
            <p class="iconfont icon-wujiaoxing star"></p>
            <p class="iconfont icon-wujiaoxing star"></p>
        </div>

        <p class="starname">较差服务</p>

    </div>
    <div class="starlist">
        <div class="iconstar">
            <p class="iconfont icon-wujiaoxing star"></p>
            <p class="iconfont icon-wujiaoxing star"></p>
            <p class="iconfont icon-wujiaoxing star"></p>
        </div>

        <p class="starname">难以满意的服务</p>

    </div>
    <div class="starlist">
        <div class="iconstar">
            <p class="iconfont icon-wujiaoxing star"></p>
            <p class="iconfont icon-wujiaoxing star"></p>
            <p class="iconfont icon-wujiaoxing star"></p>
            <p class="iconfont icon-wujiaoxing star"></p>
        </div>

        <p class="starname">较好服务</p>

    </div>
    <div class="starlist">
        <div class="iconstar">
            <p class="iconfont icon-wujiaoxing star"></p>
            <p class="iconfont icon-wujiaoxing star"></p>
            <p class="iconfont icon-wujiaoxing star"></p>
            <p class="iconfont icon-wujiaoxing star"></p>
            <p class="iconfont icon-wujiaoxing star"></p>
        </div>

        <p class="starname">令人满意的服务</p>

    </div>
    <p class="evaluteimport">您的评价至关重要,请您留下宝贵意见</p>
    <div class="sub">提交</div>
</div>

<script>
    $(".evalstar").click(function(){
        var src=$(this).children("img").attr("src");
        // console.log($(this).index)
        // console.log($(this).index())
        $('.evaluterank').attr('isTrue',$(this).index());
        if($(this).index()==0){
            if(src=="__TMPL__/public/assets/images/starxing.png"){
                $(this).children("img").attr("src","__TMPL__/public/assets/images/starxingshi.png");
            }else if(src=="__TMPL__/public/assets/images/starxingshi.png"){
                $(this).nextAll().children("img").attr("src","__TMPL__/public/assets/images/starxing.png")
            }

        }else{
            if(src=="__TMPL__/public/assets/images/starxing.png"){
                $(this).children("img").attr("src","__TMPL__/public/assets/images/starxingshi.png");
                $(this).prevAll().children("img").attr("src","__TMPL__/public/assets/images/starxingshi.png")
            }else if(src=="__TMPL__/public/assets/images/starxingshi.png"){
                $(this).children("img").attr("src","__TMPL__/public/assets/images/starxing.png");
                $(this).nextAll().children("img").attr("src","__TMPL__/public/assets/images/starxing.png")
            }
        }

    });

    // 提交
    $('.sub').click(function () {
        var start = $('.evaluterank').attr('isTrue');
        $.ajax({
            type: 'POST',
            url: "{:url('Member/common')}",
            data: {
                'start':start,
            },
            success: function (res) {
                console.log(res);
            },
            error: function (res) {
                console.log(res);
            }
         });
    });
</script>
</body>
</html>