1 Star 0 Fork 0

poem/LXLG

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
sweepCodeIn.html 9.62 KB
一键复制 编辑 原始数据 按行查看 历史
poem 提交于 2018-07-10 17:13 . init
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="wap-font-scale" content="no">
<meta name="format-detection" content="telephone=no">
<title>扫码领红包</title>
<link rel="stylesheet" href="css/global.css?v=11111">
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
</head>
<body>
<div class="r_content" id="sweepCodeIn">
<div class="person">
<img src="img/main_004.png" alt="" class="headImg">
<p>绑定成功,恭喜您获得一个新人红包</p>
</div>
<a class="mianBg" href="javascript:;"><img src="img/main_018.png" alt=""></a>
<p class="footTip">开启红包,就有机会获得888元红包哦!</p>
</div>
<div id="sweepSuccess" style="background: rgba(0,0,0,0.7);display:none;">
<a href="javascript:;" class="mainImg">
<img class="headImg" src="img/main_013.png" alt="">
<img src="img/main_040.png" alt="">
<p class="tipColor" id="tipText"><!--温馨提示:实物奖品于20个工作日内寄出--></p>
<div class="posiMoney">
<!--<span>恭喜您获得</span>
<span class="getPrize"><b class="money"></b>数据线</span>-->
</div>
<p class="goonGetPack"><img src="img/main_041.png" alt=""></p>
<a class="showDetail" href="myPack.html">查看详情,点击<span class="tipPackFont">我的红包</span>>></a>
</a>
<a href="javascript:;" class="cancelImg">
<img src="img/main_007.png" alt="">
</a>
</div>
<!--<div class="showModelDiv" style="display: none">
</div>-->
</body>
<script src="js/jquery-3.2.1.min.js"></script>
<script src="js/public.js"></script>
<script>
$(function(){
$(".cancelImg").on('click',function () {
$("#sweepSuccess").hide();
window.location.href = "main.html";
});
$(".goonGetPack").on('click',function(){
window.location.href = "main.html";
})
//
// $(".showModelDiv").on('click','.goCode',function(){
// $(".showModelDiv").hide();
// //window.location.href="myCode.html";
// window.location.href="myCode.html?imgId="+localStorage.getItem("imgId");
// })
// $(".showModelDiv").on('click','#goFocusBind',function(){
// $(".showModelDiv").hide();
// window.location.href="focusTip.html";
// })
// $(".showModelDiv").on('click','.cancelImg',function(){
// $(".showModelDiv").hide();
// })
$(".headImg").attr('src',localStorage.getItem('icon'));
$(".mianBg").on('click',function(){
// 是新用户且未抽奖
getPack();
})
getPack = function (){
$.ajax({
type: "post",
url: baseUrl + "/newUserLosPrize",
data: {token: localStorage.getItem('openid')},
success: function (result) {
$("#sweepSuccess").show();
getFlag = true;
var prize = result.data.prize;
// 1:话费,2:券码,3:实物
var prizeType = result.data.prize_type;
if(prizeType == 1){
var len = prize.indexOf("元话费");
//var num = '<b class="money">'+prize.substr(0,len)+'</b>元话费';
var num = prize.substr(0,len)
var htm = '<span>恭喜您获得</span>\n' +
' <span class="getPrize"><b class="money">'+num+'</b>元话费</span>';
$(".posiMoney").html(htm);
$("#tipText").html("温馨提示:话费将于3个工作日内到账");
}else if(prizeType == 2 || prizeType == 3){
var htm = '<span>恭喜您获得</span>\n' +
'<span class="getPrize"><b class="money"></b>'+prize+'</span>';
$(".posiMoney").html(htm);
$("#tipText").html("温馨提示:实物奖品于20个工作日内寄出");
}else {
var htm = '<span>已经抽取过了</span>\n';
$(".posiMoney").html(htm);
}
if(prizeType == 3){
$(".goonGetPack").find("img").attr("src","img/main_042.png");
localStorage.setItem('log_id', result.data.losPrizeId);
localStorage.setItem('log_id', result.data.id);
prezeTypeFlag = true;
}
}
})
}
})
</script>
<script>
var locationHref = location.href.split('#')[0];
//alert(locationHre +"---"+ location.href);
var configParam = {};
var shareParam = {
"title": "扫码领红包",
"desc": "京东卡和¥888话费等着你",
"link": "http://cqred.cqfuyuan.cn/index/Wxauth/index?channel=2",
"imgUrl": "http://cqred.cqfuyuan.cn/dx_wx/img/shareImg.jpg",
}
$(function(){
$.ajax({
type:"post",
url:"http://cqred.cqfuyuan.cn/index/Wxauth/getSignPackage",
async:true,
data:{"url":locationHref},
success:function(rs){
wx.config({
debug: false,
appId: rs.data.appId,
timestamp: rs.data.timestamp,
nonceStr: rs.data.nonceStr,
signature: rs.data.signature,
jsApiList: [
'checkJsApi',
'onMenuShareTimeline',
'onMenuShareAppMessage',
'onMenuShareQQ',
'onMenuShareWeibo',
'onMenuShareQZone',
'hideMenuItems',
'showMenuItems',
'hideAllNonBaseMenuItem',
'showAllNonBaseMenuItem',
'translateVoice',
'startRecord',
'stopRecord',
'onVoiceRecordEnd',
'playVoice',
'onVoicePlayEnd',
'pauseVoice',
'stopVoice',
'uploadVoice',
'downloadVoice',
'chooseImage',
'previewImage',
'uploadImage',
'downloadImage',
'getNetworkType',
'openLocation',
'getLocation',
'hideOptionMenu',
'showOptionMenu',
'closeWindow'
]
});
wx.ready(function () {
wx.checkJsApi({
jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','onMenuShareWeibo','onMenuShareQZone'], // 需要检测的JS接口列表,所有JS接口列表见附录2,
success: function (res) {
}
});
wx.hideMenuItems({
menuList: [
"menuItem:copyUrl"
] // 要隐藏的菜单项,只能隐藏“传播类”和“保护类”按钮,所有menu项见附录3
});
wx.onMenuShareQZone({
title:shareParam.title,
desc:shareParam.desc, // 分享描述
link:shareParam.link,
imgUrl:shareParam.imgUrl,
success: function () {
},
cancel: function () {
},
});
wx.onMenuShareWeibo({
title:shareParam.title,
desc:shareParam.desc, // 分享描述
link:shareParam.link,
imgUrl:shareParam.imgUrl,
success: function () {
},
cancel: function () {
},
});
wx.onMenuShareQQ({
title:shareParam.title,
desc:shareParam.desc, // 分享描述
link:shareParam.link,
imgUrl:shareParam.imgUrl,
success: function () {
},
cancel: function () {
},
});
wx.onMenuShareTimeline({
title:shareParam.title,
desc:shareParam.desc, // 分享描述
link:shareParam.link,
imgUrl:shareParam.imgUrl,
success: function () {
},
cancel: function () {
},
});
wx.onMenuShareAppMessage({
title:shareParam.title,
desc:shareParam.desc, // 分享描述
link:shareParam.link,
imgUrl:shareParam.imgUrl,
success: function () {
// 用户确认分享后执行的回调函数
},
cancel: function () {
// 用户取消分享后执行的回调函
}
});
});
}
});
})
</script>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/pomexl/LXLG.git
git@gitee.com:pomexl/LXLG.git
pomexl
LXLG
LXLG
master

搜索帮助