tral_f.html 16.8 KB
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 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 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 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557
<!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">
    <!--<script src="../../assets/js/fontsize.js"></script>-->
    <!--<link rel="stylesheet" href="../../assets/css/api.css"/>-->
    <link rel="stylesheet" href="../../assets/css/swiper-3.4.2.min.css">
    <link rel="stylesheet" href="../../assets/css/index.css">
    <link rel="stylesheet" href="../../assets/css/doc.css">
    <link rel="stylesheet" href="../../assets/css/pay_form_f.css">
    <link rel="stylesheet" href="../../assets/icon/iconfont.css">
    <style>
        body {
            background-color: #f5f5f5;
            padding-bottom: 15px;
            margin: 0;
            /*width: 350px;*/
        }

        /** {*/
        /*box-sizing: border-box;*/
        /*margin: 0;*/
        /*}*/

        .swiper-wrapper {
            position: relative;
            height: 245px;
            overflow: hidden;
            width: 100%;
        }

        .health_swiper .swiper-slide {
            background-size: cover;
            background-repeat: no-repeat;
            background-position: center;
            overflow: hidden;
        }

        .swiper-pagination {
            text-align: right;
            padding-right: 25px;
        }

        .swiper-slide_content {
            position: absolute;
            height: 100%;
            width: 100%;
            font-size: 13px;
            padding: 75px 0 0 0;
            text-align: center;
            color: #fff;
            top: 0;
            left: 0;
            right: 0;
            z-index: 2;
            box-sizing: border-box;
        }

        .health_bottom {
            position: absolute;
            bottom: 11px;
            width: 100%;
            color: #fff;
            font-size: 12px;
            text-align: center;
            left: 0;
            right: 0;
            margin: 0 auto;
            z-index: 2;
        }

        .health_day {
            font-size: 16px;
        }

        .swiper-pagination-bullet {
            opacity: 0.6;
        }

        .swiper-pagination-bullet-active {
            background: #fff;
            opacity: 1;
        }

        .health_item {
            text-align: center;
            padding: 16px 0;
            font-size: 15px;
            color: #424242;
        }

        .health_content {
            background-color: #fff;
            padding: 15px 0 0 27px;
        }

        .health_content_item {
            display: flex;
            color: #424242;
            font-size: 13px;
            padding: 0 0 15px 0;
        }

        .health_icon_box {
            height: 15px;
            width: 15px;
            border-radius: 50%;
            color: #fff;
            margin-right: 7px;
            /*text-align: center;*/
            /*line-height: 0.3rem;*/
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .colordbb {
            background-color: #dbb25f;
        }

        .color7CA {
            background-color: #7CAE84;
        }

        .health_icon_box .iconfont {
            font-size: 13px;
        }

        .tgl-light + .tgl-btn {
            border-radius: 0.5rem;

        }

        .health_item .tgl-light:checked + .tgl-btn {
            background-color: #7CAE84;
        }

        .agreetit .tgl + .tgl-btn {
            height: 20px;
            font-size: 12px;
            text-align: left;
            color: #fff;
        }

        .health_tral {
            background-color: #fff;
            padding: 11px 30px 11px 18px;
            font-size: 12px;
            color: #424242;
            border-bottom: 1px #f6f6f6 solid;
        }

        .health_tral_top {
            display: flex;
            align-items: center;
            font-size: 15px;
            color: #424242;
            justify-content: space-between;
            padding: 0 0 9px 0;
        }

        .health_tral_top span {
            padding: 0 7px;
            border-left: 4px solid #7ace84;
        }

        .health_tral_item {
            display: flex;
            align-items: center;
            /*font-size: 12px;*/
            padding: 12px 30px 12px 29px;

        }

        .health_tral_item_right {
            flex: 1;
            /*padding-left: 0.57rem;*/
            border-bottom: 1px #f6f6f6 solid;
            padding: 0 30px;
        }

        .health_tral_item .iconfont {
            font-size: 12px;
        }

        .health_days {
            background-color: #fff;
            margin-bottom: 10px;
        }

        .health_tral_title {
            font-size: 14px;
            color: #424242;
        }

        .index_header {
            position: fixed;
            width: 100%;
            top: 0;
            left: 0;
            z-index: 5;
            color: #fff;
            line-height: 44px;
            padding: 0 15px;
            justify-content: space-between;
            box-sizing: border-box;
            background-color: rgba(219,178,95,1);
        }

        .index_on {
            background-color: #fff;
            color: #424242;
            transition: opacity 0.5s;
        }

        .index_header .iconfont {
            color: #fff;
        }

        .health_tral_body {
            overflow: hidden;
            height: 0;
            transition: height 0.5s;
        }

        .health_tral_body_active {
            height: auto;
            transition: height 2s;
        }

        .tanss {
            transform: rotate(0deg);
            transition: 0.2s;
        }

        .tans {
            transition: 0.2s;
            transform: rotate(90deg);
        }

        .border0 {
            border: 0;
        }

        .index_on .iconfont {
            color: #D8B25F;
        }

        .health_tral_top .iconfont {
            color: #979797;
        }

        /*.scene {*/
        /*border-bottom: 1px solid #f6f6f6;*/
        /*}*/

        .doc_footer {
            padding: 0 0 0 20px;
            box-sizing: border-box;
        }

        .doc_right .iconfont {
            color: #D8B25F;
            font-size: 18px;
            padding: 0 15px;
        }

        .doc_footer .doc_right .iconfont {
            color: #D8B25F;
            font-size: 18px;
            padding: 14px 15px;
            border-left: 1px solid #e4e4e4;
        }

        .doc_appointment {
            padding: 14px 28px;
            font-size: 15px;
            color: #fff;
            background-color: #dbb25f;
        }

        .nodata {
            font-size: 16px;
            color: #c0c0c0;
            text-align: center;
            padding: 0.5rem 0;
            width: 100% !important;
        }

        #loadStart {
            position: fixed;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            /*background: #bbb;*/
            z-index: 100000;
            transition: 1s;
            background: #fff url("../../assets/image/loading.gif") center center no-repeat;
            background-size: 12%;
        }
        .tral_fee_box{
            background-color: #fff;
        }
        .swiper-container{
            margin-top: 44px;
        }
    </style>
</head>
<body>
<div id="loadStart"></div>
<div id="app" v-cloak>
    <div class="health_swiper">
        <header id="header" class="border0 index_header">
            <div :class="['index_header',color_change?'index_on':'','border0']">
                <span class="iconfont icon-fanhui" onclick="closeWindow()"></span>
                <span>健康旅游</span>
                <span class="iconfont icon-fenxiang-tianchong" @click="share"></span>
            </div>
        </header>
        <div class="swiper-container">
            <div class="swiper-wrapper">
                <div class="swiper-slide" v-for="(item,index) in banner"
                     :style="{backgroundImage:'url(' + item + ')'}"></div>
                <div class="swiper-slide_content">
                    <span>{{other_title}}</span>
                    <div class="health_bottom">
                        <div class="health_day">{{day_num}}天</div>
                        <div>{{departure}}</div>
                    </div>
                </div>
            </div>
            <div class="swiper-pagination"></div>
        </div>
    </div>
    <div class="health_item" id="main">— 行程亮点 —</div>
    <div class="health_content">
        <div class="health_content_item">
            <!--<div class="health_icon_box colordbb">-->
            <!--<span class="iconfont icon-dianzan1"></span>-->
            <!--</div>-->
            <div v-html="bright"></div>
        </div>
    </div>
    <div class="health_item">
        <span>— 行程概览 —</span>
    </div>
    <div class="nodata" v-if="travel_data.length==0">暂无行程安排</div>
    <div v-else class="health_days" v-for="(item,index) in travel_data">
        <div class="health_tral" @click="show(index)">
            <div class="health_tral_top"><span>{{item.title}}</span>
                <div :class="['iconfont','icon-xiangyou',body_show==index?'tans':'tanss']"></div>
            </div>
            <div v-html="item.subtitle"></div>
        </div>
        <div :class="['health_tral_body',body_show==index?'health_tral_body_active':'']">
            <div class="health_tral_item">
                <div class="health_icon_box colordbb"><span class="iconfont icon-hanglixiang"></span></div>
                <div class="health_tral_title">路程</div>
            </div>
            <div class="health_tral_item_right">
                <div v-if="item.route" v-html="item.route"></div>
                <span v-else>暂无安排</span>
            </div>
            <div class="health_tral_item border0">
                <div class="health_icon_box color7CA"><span class="iconfont icon-jingdian"></span></div>
                <div class="health_tral_title">风景</div>
            </div>
            <div class="health_tral_item_right">
                <div v-if="item.scene" class="scene">
                    <div v-html="item.scene"></div>
                </div>
                <span v-else>暂无安排</span>
            </div>
            <div class="health_tral_item">
                <div class="health_icon_box colordbb sancan"><span class="iconfont icon-canting1"></span></div>
                <div class="health_tral_title">三餐</div>
            </div>
            <div class="health_tral_item_right">
                <span>
                     <span v-if="item.food" v-html="item.food"></span>
                    <span v-else>暂无安排</span>
                 </span>
            </div>
            <div class="health_tral_item">
                <div class="health_icon_box color7CA"><span class="iconfont icon-chuangweiyuyue"></span></div>
                <div class="health_tral_title">住宿</div>
            </div>
            <div class="health_tral_item_right">
              <span><span v-if="item.lodging" v-html="item.lodging"></span>
                <span v-else>暂无安排</span></span>
            </div>
        </div>
    </div>
    <div class="health_item">
        <span>— 费用说明 —</span>
    </div>
    <div class="tral_fee_box">
        <div class="health_tral border0" @click="body_show=!body_show">
            <div class="health_tral_top"><span>费用包含</span></div>
        </div>
        <!--<ul class="tral_fee_item">-->
        <!--<li >{{include}}</li>-->
        <!--</ul>-->
        <div v-html="include">

        </div>
    </div>
    <div class="tral_fee_box">
        <div class="health_tral border0" @click="body_show=!body_show">
            <div class="health_tral_top"><span>费用不包含</span></div>
        </div>
        <!---->
        <!--<ul class="tral_fee_item">-->
        <!--<li></li>-->
        <!--</ul>-->
        <div v-html="noinclude">

        </div>
    </div>
    <footer class="doc_footer" id="footer">
        <div class="doc_left"><span class="rmb"></span><span class="doc_price">{{price}}</span>
            <span class="doc_qi"></span>
        </div>
        <div class="doc_right">
            <span class="iconfont icon-kefu"></span>
            <span class="doc_appointment" @click="appointment()">去 预 约</span>
        </div>
    </footer>
</div>
</body>
</html>
<script type="text/javascript" src="../../assets/js/api.js"></script>
<script type="text/javascript" src="../../assets/js/public.js"></script>
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
<script>
    new FastClick(document.body);
</script>
<script type="text/javascript" src='../../assets/js/swiper-3.4.2.min.js'></script>
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            health_swiper: {},
            body_show: -1,
            color_change: false,
            banner: [],
            travel_data: [],
            other_title: '',
            day_num: '',
            bright: '',
            departure: '',
            include: '',
            noinclude: '',
            price: 0,
            cid: ''
        },
        created: function () {
            var app = this;
            app.cid = localStorage.getItem('cid');
            app.health_swiper = new Swiper('.swiper-container', {
                effect: 'fade',
                fade: {
                    crossFade: true,
                },
                autoplay: 3000,
                pagination: '.swiper-pagination',
                paginationClickable: true,
                observer: true,
                observeParents: true,
            });
            app.travel()
        },
        mounted: function () {
            window.addEventListener('scroll', this.handleScroll)
        },
        methods: {
            appointment: function () {
                var app = this;
                openView('doc_package_f', '../index/doc_package_f', '旅游套餐', 'doc_package_f', false, {
                    cid: app.cid,
                    id: app.id
                })
            },
            travel: function () {
                var app = this
                var header = {
                    "XX-Device-Type": getDevice(),
                    'XX-Token': getToken()
                };
                getRequest('post', 'portal/Goods/travel', null, header).then(function (res) {
                    // alert(JSON.stringify(res));
                    if (res.data.code == 1) {
                        app.banner = res.data.data.banner;
                        app.day_num = res.data.data.day_num;
                        app.other_title = res.data.data.other_title;
                        app.bright = res.data.data.bright;
                        app.departure = res.data.data.departure;
                        app.include = res.data.data.include;
                        app.noinclude = res.data.data.noinclude;
                        app.price = res.data.data.price;
                        app.travel_data = res.data.data.day;
                        app.id = res.data.data.id;
                        loadEnd()
                    } else {
                        toastMsg(res.data.msg)
                    }
                })
            },
            share: function () {
                api.openFrame({
                    bgColor: 'rgba(0,0,0,0.05)',
                    name: 'share',
                    url: '../common/share.html',
                    bounces: false,
                    animation: {
                        type: "push",
                        subType: "from_bottom",
                        duration: 300
                    },
                    rect: {
                        x: 0,
                        y: 0,
                        w: 'auto',
                        h: 'auto'
                    }
                });
            },
            handleScroll: function () {
                var app = this
                var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
                var offsetTop = document.querySelector('#main').offsetTop;
                if (scrollTop > offsetTop) {
                    app.color_change = true
                } else {
                    app.color_change = false
                }
            },
            show: function (index) {
                var app = this
                if (app.body_show == index) {
                    app.body_show = -1
                } else {
                    app.body_show = index;
                }
            }
        }
    })
</script>