优化
This commit is contained in:
87
index.html
87
index.html
@@ -1,20 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<title></title>
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"><!--app-html--></div>
|
||||
<script type="module" src="/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>
|
||||
<%= htmlWebpackPlugin.options.title %>
|
||||
</title>
|
||||
<!-- Open Graph data -->
|
||||
<!-- <meta property="og:title" content="Title Here" /> -->
|
||||
<!-- <meta property="og:url" content="http://www.example.com/" /> -->
|
||||
<!-- <meta property="og:image" content="http://example.com/image.jpg" /> -->
|
||||
<!-- <meta property="og:description" content="Description Here" /> -->
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS
|
||||
.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') +
|
||||
'" />')
|
||||
</script>
|
||||
<!-- <script src="https://qzs.gdtimg.com/union/res/union_sdk/page/h5_sdk/i.js"></script> -->
|
||||
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>Please enable JavaScript to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- <script type="text/javascript">
|
||||
// H5 SDK 在线文档地址:http://developers.adnet.qq.com/doc/web/js_develop
|
||||
// 全局命名空间申明TencentGDT对象
|
||||
window.TencentGDT = window.TencentGDT || [];
|
||||
|
||||
// 广告初始化
|
||||
window.TencentGDT.push({
|
||||
app_id: '1206941502', // {String} - appid - 必填
|
||||
placement_id: '9019288881405424', // {String} - 广告位id - 必填
|
||||
type: 'interstitial', // {String} - 原生广告类型 - 必填
|
||||
muid_type: '1', // {String} - 移动终端标识类型,1:imei,2:idfa,3:mac号 - 选填
|
||||
muid: '******', // {String} - 加密终端标识,详细加密算法见API说明 - 选填
|
||||
count: 1, // {Number} - 拉取广告的数量,默认是3,最高支持10 - 选填
|
||||
onComplete: function(res) {
|
||||
if (res && res.ret === 0) {
|
||||
// 原生模板广告位调用 window.TencentGDT.NATIVE.renderAd(res[0], 'containerId') 进行模板广告的渲染
|
||||
// res[0] 代表取广告数组第一个数据
|
||||
TencentGDT.NATIVE.renderAd(res.data[0]);
|
||||
} else {
|
||||
// 加载广告API,如广告回调无广告,可使用loadAd再次拉取广告
|
||||
// 注意:拉取广告频率每分钟不要超过20次,否则会被广告接口过滤,影响广告位填充率
|
||||
setTimeout(function() {
|
||||
window.TencentGDT.NATIVE.loadAd(placement_id)
|
||||
}, 3000)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// H5 SDK接入全局只需运行一次
|
||||
(function() {
|
||||
var doc = document,
|
||||
h = doc.getElementsByTagName('head')[0],
|
||||
s = doc.createElement('script');
|
||||
s.async = true;
|
||||
s.src = '//qzs.qq.com/qzone/biz/res/i.js';
|
||||
h && h.insertBefore(s, h.firstChild);
|
||||
})();
|
||||
</script> -->
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user