351 行
14 KiB
HTML
可执行文件
351 行
14 KiB
HTML
可执行文件
<!doctype html>
|
|
<html lang="en">
|
|
<!--[1.6.46]-->
|
|
<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">
|
|
<title>{$merchant_name}</title>
|
|
<link rel="stylesheet" href="__PUBLIC__/css/css-comment.css">
|
|
<script src="__PUBLIC__/rem/js/rem.js"></script>
|
|
<link rel="stylesheet" href="__PUBLIC__/vip/css/templateA/vip.css">
|
|
<style type="text/css">
|
|
#app {
|
|
box-sizing: border-box;
|
|
padding-top: .1rem;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="app" style=" width: 94%;">
|
|
<div class="my-vip">
|
|
<div class='vipBg'>
|
|
<img src="__PUBLIC__/vip/images/templateA/vipBg.png" alt="">
|
|
<div class="userInfo">
|
|
<div class="myVip-exhibition">
|
|
<div class="userImg">
|
|
<if condition="$vip['headimgurl']">
|
|
<img src="{$vip['headimgurl']}"/>
|
|
<else/>
|
|
<img src="/Public/vip/images/tx.png">
|
|
</if>
|
|
</div>
|
|
<p class="vipType">{$vip['cardname']}</p>
|
|
<div class="vip-icon">
|
|
<img src="{$vip['gradeimgurl']}" alt="">
|
|
</div>
|
|
</div>
|
|
<div class="vip-rwm" onclick="location.href='/index.php/Vip/Mycard/dynamic'">
|
|
<img src="__PUBLIC__/vip/images/templateA/vip-rwm.png" alt="">
|
|
</div>
|
|
<if condition="$vip['cardnum1']">
|
|
<p class="vipNumber">NO.{$vip['cardnum1']}</p>
|
|
</if>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="IntegralBalance">
|
|
<div class="Balance" onclick="location.href='/index.php/Vip/Onlinepay/index.html'">
|
|
<p class="font-color marginBottom">{$vip['balance']}</p>
|
|
<p class="">余额</p>
|
|
</div>
|
|
<notin name="defaultindex5" value="$hidedefaultindex">
|
|
<div class="wxkb-box center_list_big">
|
|
<if condition="$vip['iswxcode'] eq 1">
|
|
<P class="marginBottom wxkb">微信卡包</P>
|
|
<else/>
|
|
<P class="wxkb">添加至微信卡包</P>
|
|
</if>
|
|
</div>
|
|
</notin>
|
|
<div class="Integral" onclick="location.href='{:U('Integral/index')}'">
|
|
<p class="font-color marginBottom">{$vip['integral']}</p>
|
|
<p class="">积分</p>
|
|
</div>
|
|
</div>
|
|
<if condition="$notices">
|
|
<div class="noticeWrap">
|
|
<div class="notice">
|
|
<p class="noticeImg">
|
|
<img class="img" src="__PUBLIC__/vip/images/templateA/noticeImg.png" alt="公告">
|
|
</p>
|
|
<div class="bulletin">
|
|
<ul class="bulletinUl">
|
|
<volist name="notices" id="vo">
|
|
<li class='notice-li' onclick="toNoticeDetail('{$vo[\'url\']}')">{$vo.content}</li>
|
|
</volist>
|
|
<volist name="notices" id="vo" key="k">
|
|
<if condition="$k eq '1'">
|
|
<li class='notice-li' onclick="toNoticeDetail('{$vo[\'url\']}')">{$vo.content}</li>
|
|
</if>
|
|
</volist>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</if>
|
|
<ul class="vip-function">
|
|
<notin name="defaultindex1" value="$hidedefaultindex">
|
|
<li class="item-li addBottom">
|
|
<a class="item-box" href="{:U('Cardcenter/index')}">
|
|
<img src="__PUBLIC__/vip/images/templateA/vip-icon.png" alt="储值卡中心">
|
|
<span>储值卡中心</span>
|
|
</a>
|
|
</li>
|
|
</notin>
|
|
<notin name="defaultindex2" value="$hidedefaultindex">
|
|
<li class="item-li addBottom">
|
|
<a class="item-box" href="{:U('Membership/index')}">
|
|
<img src="__PUBLIC__/vip/images/templateA/vip-icon2.png" alt="会员卡详情">
|
|
<span>会员卡详情</span>
|
|
</a>
|
|
</li>
|
|
</notin>
|
|
<notin name="defaultindex3" value="$hidedefaultindex">
|
|
<li class="item-li addBottom">
|
|
<a class="item-box" href="{:U('Signin/index')}">
|
|
<img src="__PUBLIC__/vip/images/templateA/vip-icon3.png" alt="每日签到">
|
|
<span>每日签到</span>
|
|
</a>
|
|
</li>
|
|
</notin>
|
|
<empty name="is_score_mall">
|
|
<else/>
|
|
<notin name="is_score_mall['id']" value="$hideplugarr">
|
|
<li class="item-li">
|
|
<a class="item-box" href="{:U('ScoreMall/index')}">
|
|
<img src="__PUBLIC__/vip/images/templateA/vip-icon8.png" alt="积分商城">
|
|
<span>积分商城</span>
|
|
</a>
|
|
</li>
|
|
</notin>
|
|
</empty>
|
|
<empty name="is_coupon">
|
|
<else/>
|
|
<notin name="is_coupon['id']" value="$hideplugarr">
|
|
<li class="item-li">
|
|
<a class="item-box" href="{:U('Coupon/index')}">
|
|
<img src="__PUBLIC__/vip/images/templateA/vip-icon4.png" alt="储值卡中心">
|
|
<span>优惠券中心</span>
|
|
</a>
|
|
</li>
|
|
</notin>
|
|
</empty>
|
|
<empty name="is_sub_card">
|
|
<else/>
|
|
<notin name="is_sub_card['id']" value="$hideplugarr">
|
|
<li class="item-li">
|
|
<a class="item-box" href="{:U('CardBag/index3')}">
|
|
<img src="__PUBLIC__/vip/images/templateA/vip-icon7.png" alt="卡包">
|
|
<span>卡包</span>
|
|
</a>
|
|
</li>
|
|
</notin>
|
|
</empty>
|
|
<notin name="defaultindex4" value="$hidedefaultindex">
|
|
<li class="item-li" onclick="share()">
|
|
<a class="item-box" href="javascript:;">
|
|
<img src="__PUBLIC__/vip/images/templateA/vip-icon5.png" alt="分享得积分">
|
|
<span>分享得积分</span>
|
|
</a>
|
|
</li>
|
|
</notin>
|
|
</ul>
|
|
<!--分享-->
|
|
<div class="share share_know_div" style="display: none;">
|
|
<img src="__PUBLIC__/vip/images/templateA/share.png" alt="">
|
|
</div>
|
|
</div>
|
|
</body>
|
|
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
|
|
<!--<script src="__PUBLIC__/vip/js/window-reload.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>
|
|
<script>
|
|
(function () {
|
|
var scrollIndex = 0;
|
|
var timer = null;
|
|
|
|
function bulletinAuto() {
|
|
clearInterval(timer);
|
|
var ul = $('.bulletinUl');
|
|
var li = $('.bulletinUl').first('li');
|
|
var lis = $('.bulletinUl li');
|
|
var liH = li.height();
|
|
console.log(liH, lis.length);
|
|
var index = 0;
|
|
|
|
function auto() {
|
|
if (scrollIndex >= lis.length - 1) {
|
|
ul.css({
|
|
'top': 0
|
|
})
|
|
scrollIndex = 1;
|
|
ul.animate({
|
|
top: -scrollIndex * liH
|
|
}, 1000);
|
|
} else {
|
|
scrollIndex++;
|
|
ul.animate({
|
|
top: -scrollIndex * liH
|
|
}, 1000);
|
|
}
|
|
}
|
|
|
|
timer = setInterval(auto, 1500);
|
|
}
|
|
|
|
bulletinAuto()
|
|
}())
|
|
|
|
//公告跳转
|
|
function toNoticeDetail(url) {
|
|
location.href = url;
|
|
}
|
|
|
|
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 () {
|
|
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> |