care_w.html 4.4 KB
<!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/index.css">
    <link rel="stylesheet" href="../../assets/css/doc.css">
    <link rel="stylesheet" href="../../assets/icon/iconfont.css">
</head>
<body>
<div id="app" v-cloak>
    <header id="header">
        <div class="index_header">
            <div class="close_left" @click="closeWindow()"><span class="iconfont icon-fanhui"></span></div>
            <span>{{post_title}}</span>
            <span class="iconfont icon-fenxiang-tianchong" @click="share"></span>
        </div>
    </header>
</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/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: {
            headerH: '',
            footerH: '',
            id: '',
            cid: '',
            cityname: '',
            post_title: '',
            url: ''
        },
        created: function () {
            var app = this;
            app.id = localStorage.getItem('id');
            app.cid = localStorage.getItem('cid');
            app.proCareInfoInfo();
            app.cityname = localStorage.getItem('cityName');
        },
        methods: {
            proCareInfoInfo: function () {
                var app = this;
                var post = {
                    id: app.id
                };
                getRequest('post', 'portal/Goods/proCareInfo', post, null).then(function (res) {
                    // alert(JSON.stringify(res))
                    if (res.data.code == 1) {
                        app.post_title = res.data.data.post_title;
                        app.share_desc = res.data.data.other_title;
                        app.url = res.data.data.url;
                        app.img = res.data.data.banner;
                        api.openFrame({
                            name: 'care_f',
                            url: app.url ? app.url : './care_f.html',
                            // bounces: true,
                            rect: {
                                x: 0,
                                y: app.headerH,
                                w: api.frameWidth,
                                h: api.winHeight - app.headerH
                            },
                            pageParam: {
                                id: app.id,
                                cid: res.data.data.cat_id,
                                care_name: app.post_title,
                                cityname: app.cityname
                            }
                        });
                    }
                })
            },
            share: function () {
                var app = this;
                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'
                    },
                    pageParam: {
                        share_url: 'index/care_w.html?id=' + app.id,
                        share_title: app.post_title,
                        share_img: app.img,
                        share_desc: app.share_desc,
                        share_id: app.id
                    }
                });
            }
        }
    })
</script>