care_w.html
4.5 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
<!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 () {
apiready = function () {
api.setWinAttr({
slidBackEnabled: false
});
app.id = api.pageParam.id;
app.cid = api.pageParam.cid;
app.proCareInfoInfo();
app.cityname = api.pageParam.cityname;
$api.fixStatusBar($api.dom('header'));
app.headerH = $api.offset($api.dom('header')).h;
}
},
methods: {
proCareInfoInfo: function () {
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 () {
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>