审查视图

public/themes/simpleboot3/friendship/friend_list.html 11.4 KB
lihan authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244

<!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_834805_0ml90wdq5hzm.css">
    <link rel="stylesheet" href="https://at.alicdn.com/t/font_750594_itt4qc4xfcg.css">
    <link rel="stylesheet" href="__INDEX__/css/base.css">
    <link rel="stylesheet" href="__INDEX__/css/swiper.min.css">
    <script type="text/javascript" src="__INDEX__/js/base.js"></script>
    <title>好友列表</title>
    <style>
        body,html{
            width:100%;
            height:100%;
            background: #fff;
        }
        .fri_list{
            width:7.5rem;
            height:1.2rem;
            padding: 0.2rem 0.32rem;
            display:flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #f5f5f5;
        }
        .friend{
            display:flex;
        }
        .friend_img{
            font-size: 0;
            width:0.8rem;
            height:0.8rem;
            border-radius: 50%;
        }
        .friend_img img{
            width:100%;
        }
        .friend_name{
            height:0.8rem;
            line-height: 0.8rem;
            margin-left: 0.32rem;
            color:#000000;
            font-size: 0.32rem;
        }
        .sendintegral{
            display:flex;
            color:#000000;
            font-size: 0.28rem;
        }
        .inter_img,.friend_inter{
            font-size: 0;
            width:0.3rem;
            height:0.3rem;
        }
        .inter_img{
            margin-right: 0.48rem;
        }
        .inter_img img,.friend_inter img{
            width:100%;
        }
        .head{
            display:flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.36rem 0.32rem;

        }
        .enterword{
            display:flex;
            width:5.26rem;
            height:0.6rem;
            line-height: 0.6rem;
            border-radius: 0.3rem;
            border:1px solid rgba(235,235,235,1);
        }
        .word{
            width:5rem;
            height:0.56rem;
            border:none;
            outline:none;
            margin-left: 0.1rem;
        }
        .icon-sousuo{
            font-size: 0.4rem;
            margin-left: 0.31rem;
        }
        .search_friend{
            width:1.4rem;
            height:0.6rem;
            background:#FE0A01;
            border-radius: 0.3rem;
            font-size: 0.32rem;
            color:#fff;
            text-align: center;
            line-height: 0.6rem;

        }
        /*赠送积分弹出层*/
        .sendwrapper{
            width:100%;
            height:100%;
            background-color: rgba(0,0,0,0.5);
            position:fixed;
            left:0;
            right:0;
            z-index: 5;
        }
        .sendpop{
            width:5.2rem;
            height:4.2rem;
            background: #ffffff;
            border-radius: 10px;
            position: absolute;
            z-index: 6;
            /*left:0.4rem;*/
            /*top: 3rem;*/
            top:40%;
            left:50%;
            transform: translate(-50%,-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            overflow: hidden;
            padding-top: 0.36rem;
        }
        .remaininter{
            color:#1A1A1A;
            font-size: 0.28rem;
            margin: 0 auto;
        }
        .give{
            width:4.8rem;
            color:#1A1A1A;
            font-size: 0.28rem;
            font-weight: bold;
            text-align: left;
            margin-top: 0.35rem;
        }
        .enterinter{
            width:4.81rem;
            height:0.7rem;
            border:1px solid rgba(235,235,235,1);
            border-radius:0.05rem;
            font-size: 0;
            margin-top: 0.19rem;
        }
        .pleaseenter{
            width:4.6rem;
            height:0.6rem;
            border-radius:0.05rem;
            font-size: 0.28rem;
            color:#97A0A8;
            border:none;
            outline:none;
            padding-left: 0.23rem;

        }
        .attention{
            color: #97A0A8;
            font-size: 0.24rem;
            height:0.68rem;
            border-bottom: 1px solid #f5f5f5;
            padding: 0.1rem 0.18rem 0.24rem 0.18rem;
            margin-top: 0.1rem;
        }
        .sure{
            color:#FF0000;
            font-size: 0.32rem;
            padding: 0.31rem 1.91rem;
        }
        /*输入密码弹出层*/
        .passwordwrap{
            width:100%;
            height:100%;
            background-color: rgba(0,0,0,0.5);
            position:fixed;
            left:0;
            right:0;
            z-index: 5;
        }
        .passwordpop{
            width:5.2rem;
            height:2.84rem;
            background: #ffffff;
            border-radius: 10px;
            position: absolute;
            z-index: 6;
            /*left:0.4rem;*/
            /*top: 3rem;*/
            top:40%;
            left:50%;
            transform: translate(-50%,-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            overflow: hidden;
            padding-top: 0.16rem;
        }
        .enterpassword{
            display:flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0;
            margin-top: 0.48rem;
        }
        .enterpassword li{
            width:0.8rem;
            height:0.8rem;
            list-style: none;
            border:1px solid rgba(153,153,153,1);
            text-align: center;
            border-right:0;
        }
        .enterpassword li:last-child{
            border-right:1px solid rgba(153,153,153,1) ;
        }
        .enterpassword li input{
            width:0.77rem;
            height:0.76rem;
            list-style: none;
            text-align: center;
            border:none;

        }
        .pleaseenterword{
            font-size: 0.32rem;
            color:#1A1A1A;
        }
        .icon-quxiao{
            width:5rem;
            color:#999999;
            font-size: 0.3rem;
            text-align: right;
        }
    </style>
</head>
<body>
<!--输入支付密码-->
<div class="passwordwrap" style="display:none">
    <div class="passwordpop">
        <p class="iconfont icon-quxiao"></p>
        <p class="pleaseenterword">输入支付密码</p>
李洪娟 authored
245
        <ul class="enterpassword" id="wrap">
lihan authored
246
            <li>
李洪娟 authored
247
                <input type="number" class="entercode">
lihan authored
248 249
            </li>
            <li>
李洪娟 authored
250
                <input type="number" class="entercode">
lihan authored
251 252
            </li>
            <li>
李洪娟 authored
253
                <input type="number" class="entercode">
lihan authored
254 255
            </li>
            <li>
李洪娟 authored
256
                <input type="number" class="entercode">
lihan authored
257 258
            </li>
            <li>
李洪娟 authored
259
                <input type="number" class="entercode">
lihan authored
260 261
            </li>
            <li>
李洪娟 authored
262
                <input type="number" class="entercode">
lihan authored
263 264 265 266 267 268 269 270 271 272
            </li>
        </ul>
    </div>
</div>
<!--好友弹出层-->
<div class="sendwrapper" style="display:none">
    <div class="sendpop">
        <p class="remaininter">您还剩余200积分</p>
        <P class="give">赠送xxx好友积分</P>
        <div class="enterinter">
lihan authored
273
            <input type="text" class="pleaseenter" placeholder="输入赠送积分值"  >
lihan authored
274 275 276 277 278 279 280 281
        </div>
        <div class="attention">
            积分赠送属个人操作,赠送错误平台概不负责
        </div>
        <div class="sure">确定赠送</div>
    </div>
</div>
<div class="container">
lihan authored
282
    <form action="{:url('friendship/Friend/friendList')}" method="post">
lihan authored
283 284 285
    <div class="head">
        <div class="enterword">
            <p class="iconfont icon-sousuo"></p>
lihan authored
286
            <input type="text" name="keyword" class="word" value="{$keyword}">
lihan authored
287
        </div>
lihan authored
288 289
        <label for="SUBMIT"><p class="search_friend">搜索</p></label>
        <input id="SUBMIT" type="submit" style="display: none">
lihan authored
290
    </div>
lihan authored
291
    </form>
lihan authored
292
    <div class="friendlist">
lihan authored
293
        <volist name="list" id="vo">
lihan authored
294 295 296
        <div class="fri_list">
            <div class="friend">
                <p class="friend_img">
lihan authored
297
                    <img src="{$vo.avatar}" alt="">
lihan authored
298 299
                </p>
                <p class="friend_name">
lihan authored
300
                    {$vo.user_nickname}
lihan authored
301 302 303 304 305 306 307
                </p>
            </div>

            <div class="sendintegral">
                <p class="inter_img">
                    <img src="__INDEX__/img/jifen.png" alt="">
                </p>
lihan authored
308
                <P class="friend_inter" data-id="{$vo.friend_id}">
lihan authored
309 310 311 312
                    <img src="__INDEX__/img/jiahaoyou.png" alt="">
                </P>
            </div>
        </div>
lihan authored
313
        </volist>
lihan authored
314 315 316 317 318 319
    </div>

</div>
</body>
<script type="text/javascript" src="__INDEX__/js/jquery.min.js"></script>
<script>
lihan authored
320 321 322 323

    $(".pleaseenter").click(function(){
        window.event.stopPropagation();
    })
lihan authored
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339
    $(".inter_img").click(function(){
        $(".sendwrapper").css("display","block");
    })
    $(".sendwrapper").click(function(){
        $(this).css("display","none")
    })
    //确定赠送
    $(".sure").click(function(){
        window.event.stopPropagation()
        $(".sendwrapper").css("display","none");
        $(".passwordwrap").css("display","block")
    })
    $(".icon-quxiao").click(function(){
        window.event.stopPropagation()
        $(".passwordwrap").css("display","none")
    })
lihan authored
340 341

    $(".friend_inter").click(function () {
lihan authored
342 343 344 345 346 347 348 349 350 351 352
        if(!window.confirm('是否添加此人为好友')) {
            return false;
        }else {
            $.ajax({
                url: "{:url('friendship/Friend/donateIntegral')}",
                data: {
                    friend_id: $(this).attr('data-id'),
                    total: 0
                },
                type: "POST",
                dataType: "JSON",
lihan authored
353
lihan authored
354
                success: function (data) {
lihan authored
355
                    if(data.status === true)
lihan authored
356 357 358 359
                    alert(data.msg);
                }
            })
        }
lihan authored
360 361
    })
李洪娟 authored
362 363 364 365 366

    //输入的密码自动输入到下一个
    onload = function(){
        var arr=[];
        var str=""
lihan authored
367
        var txts = wrap.getElementsByClassName("entercode");
李洪娟 authored
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402
        console.log(txts)
        for(var i = 0; i<txts.length;i++){
            var t = txts[i];
            t.index = i;
            if(t.index>0){
                t.setAttribute("readonly", true);
            }
            t.onkeyup=function(){

                var regular = /\s+/g;
                if(regular.test(this.value)){
                    $(this).focus();
                }else if($(this).val()==""){
                    $(this).focus();
                }else{
                    console.log($(this).val());
                    arr.push($(this).val());
                    var next = this.index + 1;
                    if(next > txts.length - 1) return;
                    txts[next].removeAttribute("readonly");
                    txts[next].focus();
                }
            }
            if(t.index==5){
                t.onkeyup=function(){
                    arr.push($(this).val())
                    console.log(arr);
                    var str=arr[0]+arr[1]+arr[2]+arr[3]+arr[4]+arr[5];
                    console.log(str)
                }
            }

        }
        txts[0].removeAttribute("readonly");
    }
lihan authored
403 404
</script>
</html>