审查视图

reg_firend.html 11.5 KB
dl authored
1 2 3 4 5 6 7 8
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
9 10
    <!--<link rel="stylesheet" href="assets/css/mui.min.css">-->
    <link rel="stylesheet" href="assets/css/weui.min.css">
dl authored
11
    <script src="http://kindapp.w.bronet.cn/A6079080424317/assets/js/fontsize.js"></script>
12
dl authored
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
    <link rel="stylesheet" href="http://kindapp.w.bronet.cn/A6079080424317/assets/css/api.css"/>
    <link rel="stylesheet" href="http://kindapp.w.bronet.cn/A6079080424317/assets/icon/iconfont.css">
    <title>邀友有赚</title>
    <style>
        .friend_top {
            background: url("http://kindapp.w.bronet.cn/A6079080424317/assets/image/friend.png") no-repeat;
            background-size: cover;
            height: 4.55rem;
        }

        .friend_box {
            width: 86%;
            margin: -3.26rem auto 0 auto;
            background-color: #fff;
            overflow: hidden;
        }

        .friend_box_img {
            background: url("http://kindapp.w.bronet.cn/A6079080424317/assets/image/firend1.jpg");
            width: 63%;
            height: 2.28rem;
            line-height: 2.28rem;
            text-align: center;
            margin: 0.53rem auto 0.24rem auto;
            background-size: cover;
            font-size: 15px;
            color: #fff;
        }

        .friend_price {
            font-size: 36px;
        }

        .friend_tips {
            font-size: 12px;
            color: #424242;
            text-align: center;
        }

        .friend_input_box {
            margin: 0.56rem auto;
            width: 63%;
        }

        .friend_input {
            border-bottom: 1px solid #ededed;
            font-size: 12px;
            color: #424242;
            margin-bottom: 0.4rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .friend_input input {
            padding: 0.2rem 0;
            width: 50%;
            flex: 1;
        }

        .friend_input::-webkit-input-placeholder {
            color: #C2C1C3;
            font-size: 12px;
        }

        .friend_code {
            border: 1px solid #858485;
            padding: 0.08rem 0.13rem;
            border-radius: 0.16rem;
            color: #858485;
            font-size: 10px;
            text-align: center;
        }

        .friend_btn {
            width: 63%;
            margin: 0 auto;
            background-color: #dbb25f;
            color: #fff;
            font-size: 15px;
            text-align: center;
            padding: 0.17rem 0;
            border-radius: 0.16rem;
        }
李洪娟 authored
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
        .joinstep{
            display:flex;
            justify-content: space-between;
            align-items: center;
            margin-top:0.6rem;

        }
        .step{
            color:#CCA756;
            font-size: 0.24rem;

        }
        .line{
            width:2.5rem;
            color:#C3C3C3;
            border: 0.01rem solid #ededed;
        }
        .stepnum{
            display:flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 0.6rem;
            padding: 0 0.4rem;
        }
        .num{
            color:#0d0d0d;
            font-size: 0.16rem;
            width:0.35rem;
            height:0.35rem;
            background:rgba(216,178,95,1);
            opacity:0.18;
            border-radius:50%;
            text-align: center;
            line-height: 0.35rem;
        }
        .stepline{
            width:1rem;
            height:0.01rem;
            /*color:#C3C3C3;*/
            border: 0.01rem solid #ededed;
        }
        .text{
            display:flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 0.1rem;
        }
        .steptext{
            width:3rem;
            color:#CCA756;
            font-size: 0.22rem;
            display:inline-block;
            text-align: center;
        }
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

        .mui-toast-container {
            text-align: center;
            width: 3rem;
            height: 1.6rem;
            position: fixed;
            top: 30%;
            transform: translateY(-1rem);
            left: 40%;
            right: 0;
            margin: 0 auto;
            font-size: 0.3rem;
            -webkit-transition:opacity .3s;
            transition:opacity .3s;
            -webkit-transform:translate(-50%,0);
            /*transform:translate(-50%,0);*/;
            z-index: 888;
        }
        .mui-toast-message {
            width: 3rem;
            height: 1.6rem;
            color:#fff;
            border-radius:6px;
            font-size: 0.3rem;
            text-align: center;
            line-height: 1.6rem;
            background-color:#323232;
            opacity:0.7;
            z-index: 888;

        }
李洪娟 authored
182 183 184 185 186
        /*.textline{*/
            /*width:0.05rem;*/
            /*!*height:0.01rem;*!*/
            /*!*border: 0.01rem solid #ededed;*!*/
        /*}*/
dl authored
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
    </style>
</head>
<body>
<div id="app" v-cloak>
    <div class="friend_top"></div>
    <div class="friend_box">
        <div class="friend_box_img">
            <div v-if="type==1"><span></span><span class="friend_price">1000</span><span>元消费金</span></div>
            <div v-else><span></span><span class="friend_price">20</span><span>元首单奖励</span></div>
        </div>
        <div class="friend_tips">健康提升新选择,为健康为投资</div>
        <div class="friend_input_box">
            <div class="friend_input"><input type="text" placeholder="请输入手机号" v-model="tel"></div>
            <div class="friend_input"><input type="text" placeholder="请输入验证码" v-model="code">
                <span v-if="show" @click="getCode" class="friend_code">获取验证码</span>
                <span v-else class="friend_code">{{count}}S</span>
            </div>
        </div>
dl authored
205
        <div class="friend_btn" @click="reg_fir">立即领取</div>
206 207 208 209 210
        <div class="join" v-if="kind">
            <div class="joinstep">
                <p class="line"></p>
                <p class="step">加入步骤</p>
                <p class="line"></p>
李洪娟 authored
211
            </div>
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226
            <div class="stepnum">
                <div>
                    <p class="num">1</p>
                </div>
                <p class="stepline"></p>
                <p class="num">2</p>
                <p class="stepline"></p>
                <p class="num">3</p>
                <p class="stepline"></p>
                <p class="num">4</p>
                <p class="stepline"></p>
                <p class="num">5</p>
            </div>
            <div class="text">
                <p class="steptext">登录APP</p>
李洪娟 authored
227
228
                <p class="steptext">我的</p>
李洪娟 authored
229
230
                <p class="steptext">设置</p>
李洪娟 authored
231
232
                <p class="steptext">服务商入口</p>
李洪娟 authored
233
234 235
                <p class="steptext">资质认证</p>
            </div>
李洪娟 authored
236
        </div>
237
dl authored
238 239 240 241
    </div>
</div>
</body>
</html>
242 243 244 245
<script type="text/javascript" src="assets/js/jquery-2.1.4.js"></script>
<script type="text/javascript" src="assets/js/jquery-weui.js"></script>
<script type="text/javascript" src="assets/js/mui.min.js"></script>
<script type="text/javascript" src="assets/js/cookie.js"></script>
dl authored
246
<script type="text/javascript" src="http://kindapp.w.bronet.cn/A6079080424317/assets/js/api.js"></script>
247
dl authored
248 249 250 251 252 253 254 255
<script type="text/javascript" src="http://kindapp.w.bronet.cn/A6079080424317/assets/js/public.js"></script>
<script type="text/javascript" src="http://kindapp.w.bronet.cn/A6079080424317/assets/js/fastclick.js"></script>
<script>
    new FastClick(document.body);
</script>
<script type="text/javascript" src="http://kindapp.w.bronet.cn/A6079080424317/assets/js/vue.min.js"></script>
<script type="text/javascript" src="http://kindapp.w.bronet.cn/A6079080424317/assets/js/axios.min.js"></script>
<script type="text/javascript" src="http://kindapp.w.bronet.cn/A6079080424317/assets/icon/iconfont.js"></script>
256 257

dl authored
258 259 260 261 262 263 264 265 266
<script>
    var app = new Vue({
        el: '#app',
        data: {
            show: true,
            count: '',
            timer: null,
            type: 1,
            invite_id: '',
dl authored
267 268
            tel: '',
            code: '',
269 270 271
            invite_type: '',
            kind:true
dl authored
272 273 274
        },
        created: function () {
            this.type = getUrlParam('type');
275 276 277 278 279 280 281 282
            this.invite_id = getUrlParam('form');
            this.invite_type = getUrlParam('invite_type');
            if(this.type==1){
                app.kind=false
            }else if(this.type==2){
                app.kind=true
            }
dl authored
283 284 285
        },
        methods: {
            getCode: function () {
286 287 288 289
                var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
                if(! myreg.test(app.tel)){
                    //alert("请输入正确的手机号")
                    mui.toast("请输入正确的手机号");
290 291
                   //openView('download', 'download', '下载页', 'download', false, false, false);
292 293
                    unstock();
                }else{
李洪娟 authored
294
295
                    const TIME_COUNT = 60;
dl authored
296
                    app.show = false;
李洪娟 authored
297 298
                    app.count = TIME_COUNT;
299 300 301 302 303 304 305 306 307
                        var header = {
                            "XX-Device-Type": getDevice(),
                        };
                        var post = {
                            tel: app.tel
                        };
                        getRequest('post', 'home/index/loginBySMS', post, header).then(function (res) {
                            mui.toast(res.data.msg);
                            unstock()
李洪娟 authored
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322
                            if (!app.timer) {
                                app.timer = setInterval(function () {
                                    if (app.count > 0 && app.count <= TIME_COUNT) {
                                        app.count--;
                                    } else {
                                        app.show = true;
                                        clearInterval(this.timer);
                                        app.timer = null;
                                    }
                                }, 1000)
                              }
                            // alert(JSON.stringify(res))
                           // alert(res.data.msg)

323
                        })
李洪娟 authored
324 325 326 327 328




dl authored
329 330
                }
            },
331
dl authored
332 333
            // 好友注册
            reg_fir: function () {
334 335
                var header = {
                    "XX-Device-Type": getDevice(),
李洪娟 authored
336
                    // 'XX-Token': getToken()
337 338 339 340 341 342
                };
                var post = {
                    tel: app.tel,
                    code:app.code,
                    invite_id:app.invite_id,
                    type:app.type
dl authored
343
344 345 346 347 348 349 350 351 352 353 354 355
                };
                getRequest('post', '/home/index/checkSMS', post, header).then(function (res) {
                    // alert(JSON.stringify(res))
                    console.log(res)
                    if(res.data.code==0){
                        // alert(res.data.msg)
                        mui.toast(res.data.msg);
                        unstock();
                    }else{
                        // alert("领取成功")
                        mui.toast("领取成功");
                        unstock();
356 357
                        window.location.href='download.html'
358 359
                    }
                })
dl authored
360
            }
dl authored
361 362
        }
    })
李洪娟 authored
363
</script>