442 行
16 KiB
HTML
可执行文件
442 行
16 KiB
HTML
可执行文件
<!DOCTYPE html>
|
|
<html>
|
|
<!--[1.6.46]-->
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<meta name="viewport"
|
|
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
|
|
<link rel="stylesheet" type="text/css" href="__PUBLIC__/vip/css/reset.css"/>
|
|
<link rel="stylesheet" type="text/css" href="__PUBLIC__/vip/css/vipindex.css">
|
|
<title>{$merchant_name}</title>
|
|
<style>
|
|
img {
|
|
pointer-events: none;
|
|
}
|
|
|
|
.top_img_code img {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.share {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100vw;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
height: 100vh;
|
|
display: none;
|
|
}
|
|
|
|
.share_tips {
|
|
width: 78vw;
|
|
height: 44vw;
|
|
margin: 3.5vw 0 0 12vw;
|
|
display: block;
|
|
}
|
|
|
|
.share_know {
|
|
width: 45vw;
|
|
height: 17vw;
|
|
display: block;
|
|
margin: 19.5vw auto;
|
|
}
|
|
|
|
.notice_con {
|
|
width: 100vw;
|
|
box-sizing: border-box;
|
|
overflow: hidden;
|
|
padding: 2vw;
|
|
font-size: 14px;
|
|
position: absolute;
|
|
top: 88vw;
|
|
}
|
|
|
|
.notice-box {
|
|
box-sizing: border-box;
|
|
padding: 1vw;
|
|
/*-webkit-border-radius: 10px;*/
|
|
/*-moz-border-radius: 10px;*/
|
|
border-radius: 10px;
|
|
color: #000;
|
|
display: flex;
|
|
align-items: center;
|
|
font-size: 12px;
|
|
position: relative;
|
|
}
|
|
|
|
.notice_img {
|
|
width: 6vw;
|
|
box-sizing: border-box;
|
|
padding-left: 1vw;
|
|
}
|
|
|
|
.notice {
|
|
width: 83vw;
|
|
box-sizing: border-box;
|
|
overflow: hidden;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 9vw;
|
|
margin-left: 1vw;
|
|
}
|
|
|
|
.notice_content {
|
|
height: 7.1vw;
|
|
line-height: 7.1vw;
|
|
flex-wrap: nowrap;
|
|
color: #000;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<div class="top">
|
|
<img class="top_img_bg" src="__PUBLIC__/vip/images/top_img_bg.png" alt="背景图片">
|
|
<div class="top_img_card_con">
|
|
<img class="top_img_card" src="__PUBLIC__/vip/images/top_img_card.png" alt="会员卡图片">
|
|
<div class="top_img_code" onclick="location.href='/index.php/Vip/Mycard/dynamic'">
|
|
<img src="__PUBLIC__/vip/images/top_img_code.png" alt="二维码ico">
|
|
</div>
|
|
<div class="top_name_con">
|
|
<if condition="$vip['headimgurl']">
|
|
<img class="top_img_avatar" src="{$vip['headimgurl']}"/>
|
|
<else/>
|
|
<img class="top_img_avatar" src="/Public/vip/images/tx.png">
|
|
</if>
|
|
<div class='userInfo'>
|
|
<span>{$vip['name']?$vip['name']:$vip['nickname']}</span>
|
|
<div class='userInfo2'>
|
|
<span>
|
|
<img class="top_name_grade" src="{$vip['gradeimgurl']}">
|
|
</span>
|
|
<span style="margin: 0 10px">{$vip['cardname']}</span>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<if condition="$vip['cardnum1']">
|
|
<div class="top_card_num">NO.{$vip['cardnum1']}</div>
|
|
<div class="top_card_num" style="display: none;">NO.{$vip['cardnum']}</div>
|
|
</if>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="center_radius"></div>
|
|
</div>
|
|
|
|
<div class="center">
|
|
|
|
<div class="center_list" onclick="location.href='/index.php/Vip/Onlinepay/index.html'">
|
|
<img class="center_img" src="__PUBLIC__/vip/images/center_img_balance.png" alt="余额图片">
|
|
<span>余额</span>
|
|
<span>{$vip['balance']}</span>
|
|
</div>
|
|
<notin name="defaultindex5" value="$hidedefaultindex">
|
|
<div class="center_list_big">
|
|
<img class="center_img" src="__PUBLIC__/vip/images/center_img_card.png" alt="卡包图片">
|
|
<if condition="$vip['iswxcode'] eq 1">
|
|
<span>微信卡包</span>
|
|
<else/>
|
|
<span>添加至<br>微信卡包</span>
|
|
</if>
|
|
</div>
|
|
</notin>
|
|
<div class="center_list" onclick="location.href='{:U('Integral/index')}'">
|
|
<img class="center_img" src="__PUBLIC__/vip/images/center_img_integral.png" alt="积分图片">
|
|
<span>积分</span>
|
|
<span>{$vip['integral']}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<if condition="$notices">
|
|
<div class="notice_con">
|
|
<div class="notice-box">
|
|
<img class="notice_img" src="__PUBLIC__/vip/images/index_horn.png" alt="通知">
|
|
<div class="notice" data-len="{:count($notices)}">
|
|
<volist name="notices" id="no">
|
|
<div class="notice_content" onclick="toNoticeDetail('{$no[\'url\']}')">
|
|
<span style="white-space: nowrap;">{$no['content']}</span>
|
|
</div>
|
|
</volist>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</if>
|
|
<div class="bottom"
|
|
<if condition="$notices">style="top: 99vw;"</if>
|
|
>
|
|
<notin name="defaultindex1" value="$hidedefaultindex">
|
|
<div class="bottom_list bottom_click" onclick="location.href='{:U('Cardcenter/index')}'">
|
|
<img class="bottom_img" src="__PUBLIC__/vip/images/bottom_img_vipcenter.png" alt="储值卡中心">
|
|
<span>储值卡中心</span>
|
|
</div>
|
|
</notin>
|
|
<notin name="defaultindex2" value="$hidedefaultindex">
|
|
<div class="bottom_list bottom_click" onclick="location.href='{:U('Membership/index')}'">
|
|
<img class="bottom_img" src="__PUBLIC__/vip/images/bottom_img_vipdetail.png" alt="会员卡详情">
|
|
<span>会员卡详情</span>
|
|
</div>
|
|
</notin>
|
|
<notin name="defaultindex3" value="$hidedefaultindex">
|
|
<div class="bottom_list bottom_click" onclick="location.href='{:U('Signin/index')}'">
|
|
<img class="bottom_img" src="__PUBLIC__/vip/images/bottom_img_signin.png" alt="每日签到">
|
|
<span>每日签到</span>
|
|
</div>
|
|
</notin>
|
|
<empty name="is_score_mall">
|
|
<else/>
|
|
<notin name="is_score_mall['id']" value="$hideplugarr">
|
|
<div class="bottom_list bottom_click" onclick="location.href='{:U('ScoreMall/index')}'"
|
|
>
|
|
<img class="bottom_img" src="__PUBLIC__/vip/images/bottom_img_scoreMall.png" alt="积分商城">
|
|
<span>积分商城</span>
|
|
</div>
|
|
</notin>
|
|
</empty>
|
|
<empty name="is_coupon">
|
|
<else/>
|
|
<notin name="is_coupon['id']" value="$hideplugarr">
|
|
<div class="bottom_list bottom_click" onclick="location.href='{:U('Coupon/index')}'"
|
|
>
|
|
<img class="bottom_img" src="__PUBLIC__/Retail/Mcoupon/coupon.png" alt="优惠券中心">
|
|
<span>优惠券中心</span>
|
|
</div>
|
|
</notin>
|
|
</empty>
|
|
<empty name="is_sub_card">
|
|
<else/>
|
|
<notin name="is_sub_card['id']" value="$hideplugarr">
|
|
<div class="bottom_list bottom_click" onclick="location.href='{:U(\'CardBag/index\')}'">
|
|
<img class="bottom_img" src="__PUBLIC__/vip/images/card/card.png" alt="卡包">
|
|
<span>卡包</span>
|
|
</div>
|
|
</notin>
|
|
</empty>
|
|
<notin name="defaultindex4" value="$hidedefaultindex">
|
|
<div class="bottom_list bottom_click" onclick="share()">
|
|
<img class="bottom_img" src="__PUBLIC__/vip/images/bottom_img_share.png" alt="分享得积分">
|
|
<span>分享得积分</span>
|
|
</div>
|
|
</notin>
|
|
</div>
|
|
<div class="share">
|
|
<img class="share_tips" src="__PUBLIC__/vip/images/vipshare2.png">
|
|
<div class="share_know_div">
|
|
<img class="share_know" style="z-index: 9999" src="__PUBLIC__/vip/images/vipshare3.png">
|
|
</div>
|
|
</div>
|
|
</body>
|
|
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
|
|
<script src="__PUBLIC__/js/tips.js"></script>
|
|
<script src="https://res.wx.qq.com/open/js/jweixin-1.1.0.js" type="text/javascript" charset="utf-8"></script>
|
|
<if condition="$canPerfect EQ 1">
|
|
<script>
|
|
$(document).ready(function () {
|
|
var tipsTime = sessionStorage.tipsTime || 0;
|
|
if (tipsTime == 0) {
|
|
alertSureAndCancel({
|
|
title: '温馨提示',
|
|
detail: "前往<br>储值卡中心=>个人设置<br>完善资料可以获得{$score}积分哦",
|
|
cancelText: '下次再说',
|
|
sureText: '立即前往',
|
|
detailSize: '4.5vw',
|
|
detailSize: '3.7vw',
|
|
btnHeight: '12vw',
|
|
titleWeight: 'bold',
|
|
sure: function () {
|
|
window.location.href = "/index.php/Vip/Set/changepersonal";
|
|
},
|
|
cancel: function () {
|
|
sessionStorage.tipsTime = 1;
|
|
}
|
|
})
|
|
}
|
|
})
|
|
</script>
|
|
</if>
|
|
<if condition="$notices">
|
|
<script>
|
|
function toNoticeDetail(url) {
|
|
location.href = url;
|
|
}
|
|
|
|
var len = parseInt($('.notice').attr('data-len'));
|
|
var height = $('.notice_content').height();
|
|
var index = 0;
|
|
var timerInt1 = null;
|
|
var timerInt2 = null;
|
|
|
|
function noticeMove() {
|
|
var w = 0;
|
|
var width = $('.notice_content').eq(index).children('span').width() + 5;
|
|
|
|
setTimeout(function () {
|
|
timerInt1 = setInterval(function () {
|
|
if (w < width) {
|
|
w++;
|
|
// console.log(index)
|
|
$('.notice_content').eq(index).css('marginLeft', -w + 'px');
|
|
} else {
|
|
clearInterval(timerInt1);
|
|
if (index < len - 1) {
|
|
index++;
|
|
} else {
|
|
index = 0;
|
|
}
|
|
$('.notice_content').eq(index).css('marginLeft', '0px');
|
|
var t = 0;
|
|
timerInt2 = setInterval(function () {
|
|
if (t < height) {
|
|
t++;
|
|
if (index > 0) {
|
|
var y = -((height * (index - 1)) + t);
|
|
} else {
|
|
var y = height - t;
|
|
}
|
|
$('.notice').css('top', y + 'px');
|
|
} else {
|
|
clearInterval(timerInt2);
|
|
noticeMove();
|
|
}
|
|
}, 17)
|
|
}
|
|
}, 20)
|
|
}, 2000)
|
|
}
|
|
|
|
if (len && len > 1) {
|
|
noticeMove();
|
|
}
|
|
</script>
|
|
</if>
|
|
<script type="text/javascript">
|
|
|
|
wx.config({
|
|
debug: false,
|
|
appId: "{$signPackage.appId}",
|
|
timestamp: "{$signPackage.timestamp}",
|
|
nonceStr: "{$signPackage.nonceStr}",
|
|
signature: "{$signPackage.signature}",
|
|
jsApiList: ['checkJsApi', 'scanQRCode', 'addCard', 'onMenuShareTimeline', 'onMenuShareAppMessage']
|
|
});
|
|
|
|
//---------------------
|
|
/*wx.error(function(res) {
|
|
alert("出错了:" + res.errMsg);//这个地方的好处就是wx.config配置错误,会弹出窗口哪里错误,然后根据微信文档查询即可。
|
|
});*/
|
|
|
|
//回调函数
|
|
wx.ready(function () {
|
|
//分享好友
|
|
wx.onMenuShareAppMessage({
|
|
title: "{$shareinfo['title']}", // 分享标题
|
|
desc: "{$shareinfo['describe']}", // 分享描述
|
|
link: "{$http}" + '/index.php/Vip/Register/index/index.html?merchantid=' + "{$vip['merchantid']}" + '&vipid=' + "{$vip['id']}", // 分享链接
|
|
imgUrl: "{$shareinfo['image']}", // 分享图标
|
|
type: '', // 分享类型,music、video或link,不填默认为link
|
|
dataUrl: '', // 如果type是music或video,则要提供数据链接,默认为空
|
|
success: function () {
|
|
|
|
// 用户确认分享后执行的回调函数
|
|
},
|
|
cancel: function () {
|
|
// 用户取消分享后执行的回调函数
|
|
}
|
|
});
|
|
//分享朋友圈
|
|
wx.onMenuShareTimeline({
|
|
title: "{$shareinfo['title']}", // 分享标题
|
|
desc: "{$shareinfo['describe']}", // 分享描述
|
|
link: "{$http}" + '/index.php/Vip/Register/index/index.html?merchantid=' + "{$vip['merchantid']}" + '&vipid=' + "{$vip['id']}", // 分享链接
|
|
imgUrl: "{$shareinfo['image']}", // 分享图标
|
|
success: function () {
|
|
// 用户确认分享后执行的回调函数
|
|
},
|
|
cancel: function () {
|
|
// 用户取消分享后执行的回调函数
|
|
}
|
|
});
|
|
//添加卡券
|
|
var str = "{$mem_signPackage['timestamp']}";
|
|
var strs = "{$mem_signPackage.signature}";
|
|
var code = "{$mem_signPackage.code}";
|
|
var nonce_str = "{$mem_signPackage.nonce_str}";
|
|
|
|
$('.center_list_big').click(function () {
|
|
toWXCard();
|
|
})
|
|
var type = "{$type}";
|
|
if (type == 1) {
|
|
toWXCard();
|
|
}
|
|
|
|
function toWXCard() {
|
|
var text = "{$mem_signPackage['card_id']}";
|
|
if (!text) {
|
|
alertBtn("商家未创建会员卡,请及时联系商家创建会员卡");
|
|
return;
|
|
}
|
|
wx.addCard({
|
|
cardList: [{
|
|
cardId: '{$mem_signPackage['card_id']}', //微信公众号内创建的会员卡的id
|
|
cardExt: '{"timestamp":"' + str + '","signature":"' + strs + '"}'
|
|
}],
|
|
//成功回调
|
|
success: function (res) {
|
|
|
|
window.location.reload();
|
|
}
|
|
})
|
|
}
|
|
});
|
|
$('.bottom_click').contextmenu(function (e) {
|
|
e.preventDefault();
|
|
})
|
|
$('.top_card_num').click(function () {
|
|
$('.top_card_num').show();
|
|
$(this).hide();
|
|
})
|
|
|
|
function share() {
|
|
$('.share').fadeIn();
|
|
}
|
|
|
|
$('.share_know_div').click(function () {
|
|
$('.share').fadeOut();
|
|
})
|
|
$('.bottom_click').on('touchstart', function () {
|
|
$('.bottom_click').css('backgroundColor', "white");
|
|
$(this).css('backgroundColor', "#ececec");
|
|
$('.bottom_click').on('touchend', function () {
|
|
$('.bottom_click').css('backgroundColor', "white");
|
|
})
|
|
})
|
|
|
|
localStorage.viprefrash = 0; //防止之后的页面重复pushstate
|
|
|
|
var discounts = localStorage.discounts || 0; //储值卡买单
|
|
var onlinepay = localStorage.onlinepay || 0; //在线充值
|
|
var exchange = localStorage.exchange || 0; //积分变动
|
|
var signin = localStorage.signin || 0; //签到
|
|
var changepersonl = localStorage.changepersonl || 0; //修改个人信息
|
|
if (discounts == 1 || onlinepay == 1 || exchange == 1 || signin == 1 || changepersonl == 1) {
|
|
localStorage.clear();
|
|
window.location.reload();
|
|
}
|
|
|
|
//拦截返回事件
|
|
var state = {
|
|
title: "会员卡——互支付智慧平台",
|
|
url: location.href
|
|
}
|
|
window.history.pushState(state, state.title, state.url);
|
|
ToUrlSelfFn(state.title, state.url, function () {
|
|
localStorage.clear();
|
|
WeixinJSBridge.call('closeWindow');
|
|
})
|
|
</script>
|
|
|
|
</html> |