149 lines
7.3 KiB
HTML
149 lines
7.3 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="">
|
||
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<meta http-equiv="Cache-control" content="no-cache">
|
||
<meta http-equiv="Pragma" content="no-cache">
|
||
<meta http-equiv="Expires" content="0">
|
||
<meta content="telephone=no,email=no" name=format-detection>
|
||
<meta name="viewport"
|
||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui" />
|
||
<title>金喜迎新年 码上有好运</title>
|
||
<script>
|
||
const isWeixinPlatform = /MicroMessenger/i.test(window.navigator.userAgent) || window.__wxjs_environment === 'miniprogram'
|
||
if (isWeixinPlatform) {
|
||
document.querySelector("html").classList.add("weixinPlatform")
|
||
}
|
||
const isLogin = !!(JSON.parse(localStorage.getItem("userinfos")) && JSON.parse(localStorage.getItem("userinfos")).phone)
|
||
window.getParam = (name) => {
|
||
if ('URLSearchParams' in window) {
|
||
var params = new URLSearchParams(window.location.search)
|
||
return params.get(name) ? params.get(name) : null
|
||
} else {
|
||
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'),
|
||
r = window.location.search.substr(1).match(reg)
|
||
|
||
if (r != null) return unescape(r[2])
|
||
return null
|
||
}
|
||
}
|
||
|
||
const source = getParam("source")
|
||
const fromid = getParam("fromid")
|
||
const org_id = getParam("org_id")
|
||
const code = getParam("code")
|
||
const appid = "wx718c4a40911b7837"
|
||
const host = "https://huodong2.lzlj.com/zhaoma/"
|
||
|
||
if (isWeixinPlatform && !isLogin && !code) {
|
||
let url = encodeURIComponent(host)
|
||
if (fromid) {
|
||
url = encodeURIComponent(host + "?fromid=" + fromid)
|
||
}
|
||
window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + appid + "&redirect_uri=" + url + "&response_type=code&scope=snsapi_userinfo#wechat_redirect"
|
||
}
|
||
</script>
|
||
<!-- <script type="text/javascript">
|
||
(function () {
|
||
window._fmOpt = {
|
||
partner: 'lzlj',
|
||
success: function (data) {
|
||
localStorage.setItem("blackbox", JSON.stringify(data))
|
||
}
|
||
};
|
||
var fm = document.createElement('script');
|
||
fm.type = 'text/javascript'; fm.async = true;
|
||
fm.src = 'https://static.trustdecision.com/tdfp/cn/5bfdf55bf7ebc59ca8c07c8c7bd88e9a/fm.js' + '?t=' + (new Date().getTime() / 3600000).toFixed(0);
|
||
var s = document.getElementsByTagName('script')[0];
|
||
s.parentNode.insertBefore(fm, s);
|
||
})();
|
||
</script> -->
|
||
<style>
|
||
.hackpreload {
|
||
display: none;
|
||
}
|
||
|
||
body {
|
||
width: 100vw;
|
||
height: 100vh;
|
||
overflow: hidden;
|
||
background: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='80px' height='80px' viewBox='0 0 80 80' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3Eloading%3C/title%3E%3Cdefs%3E%3ClinearGradient x1='94.0869141%25' y1='0%25' x2='94.0869141%25' y2='90.559082%25' id='linearGradient-1'%3E%3Cstop stop-color='%23ededed' stop-opacity='0' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23ededed' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3ClinearGradient x1='100%25' y1='8.67370605%25' x2='100%25' y2='90.6286621%25' id='linearGradient-2'%3E%3Cstop stop-color='%23ededed' offset='0%25'%3E%3C/stop%3E%3Cstop stop-color='%23ededed' stop-opacity='0.3' offset='100%25'%3E%3C/stop%3E%3C/linearGradient%3E%3C/defs%3E%3Cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' opacity='0.9'%3E%3Cg%3E%3Cpath d='M40,0 C62.09139,0 80,17.90861 80,40 C80,62.09139 62.09139,80 40,80 L40,73 C58.2253967,73 73,58.2253967 73,40 C73,21.7746033 58.2253967,7 40,7 L40,0 Z' fill='url(%23linearGradient-1)'%3E%3C/path%3E%3Cpath d='M40,0 L40,7 C21.7746033,7 7,21.7746033 7,40 C7,58.2253967 21.7746033,73 40,73 L40,80 C17.90861,80 0,62.09139 0,40 C0,17.90861 17.90861,0 40,0 Z' fill='url(%23linearGradient-2)'%3E%3C/path%3E%3Ccircle id='Oval' fill='%23ededed' cx='40.5' cy='3.5' r='3.5'%3E%3C/circle%3E%3C/g%3E%3CanimateTransform attributeName='transform' begin='0s' dur='1s' type='rotate' values='0 40 40;360 40 40' repeatCount='indefinite'/%3E%3C/g%3E%3C/svg%3E%0A") no-repeat center center;
|
||
background-size: 10% 10%;
|
||
}
|
||
|
||
.preload {
|
||
display: none;
|
||
}
|
||
</style>
|
||
<link rel="stylesheet" href="https://res.wx.qq.com/t/wx_fed/weui-source/res/2.6.16/weui.min.css">
|
||
</head>
|
||
|
||
<body>
|
||
<div id="app"></div>
|
||
<script type="text/javascript" src="https://res2.wx.qq.com/open/js/jweixin-1.6.2.js"></script>
|
||
<script type="text/javascript" src="https://res.wx.qq.com/t/wx_fed/weui.js/res/1.2.19/weui.min.js"></script>
|
||
<script type="module" src="/src/main.js"></script>
|
||
<script>
|
||
window.onload = async function () {
|
||
if (/MicroMessenger/i.test(window.navigator.userAgent)) {
|
||
try {
|
||
const response = await fetch(`https://huodong2.lzlj.com/api/mapai/wechat/jssdk`, {
|
||
method: "POST",
|
||
headers: new Headers({
|
||
'Content-Type': 'application/json',
|
||
Accept: "application/json",
|
||
}),
|
||
body: JSON.stringify({
|
||
url: window.location.href, jsApiList: ["updateAppMessageShareData", "updateTimelineShareData", "scanQRCode"]
|
||
})
|
||
})
|
||
const result = await response.json()
|
||
if (response.status == 200) {
|
||
wx.config({
|
||
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
||
appId: result.appId, // 必填,公众号的唯一标识
|
||
timestamp: result.timestamp, // 必填,生成签名的时间戳
|
||
nonceStr: result.nonceStr, // 必填,生成签名的随机串
|
||
signature: result.signature,// 必填,签名
|
||
jsApiList: ["updateAppMessageShareData", "updateTimelineShareData", "scanQRCode"], // 必填,需要使用的JS接口列表
|
||
openTagList: ["wx-open-launch-weapp"]
|
||
});
|
||
wx.ready(function () {
|
||
const shareData = {
|
||
title: document.title,
|
||
desc: document.title,
|
||
link: "https://huodong2.lzlj.com/zhaoma/",
|
||
imgUrl: "https://huodong2.lzlj.com/zhaoma/share.webp"
|
||
}
|
||
wx.updateAppMessageShareData({
|
||
title: shareData.title, // 分享标题
|
||
desc: shareData.desc, // 分享描述
|
||
link: shareData.link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
||
imgUrl: shareData.imgUrl, // 分享图标
|
||
})
|
||
wx.updateTimelineShareData({
|
||
title: shareData.desc, // 分享标题
|
||
link: shareData.link, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
||
imgUrl: shareData.imgUrl, // 分享图标
|
||
})
|
||
})
|
||
}
|
||
} catch (err) {
|
||
console.log(err)
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
<script>
|
||
var _hmt = _hmt || [];
|
||
(function() {
|
||
var hm = document.createElement("script");
|
||
hm.src = "https://hm.baidu.com/hm.js?f7f64549797cc8d5800e9f7a9b93e7e4";
|
||
var s = document.getElementsByTagName("script")[0];
|
||
s.parentNode.insertBefore(hm, s);
|
||
})();
|
||
</script>
|
||
</body>
|
||
|
||
</html> |