wpfw_ewei_shopv2/template/mobile/default/_footer.html
2023-02-14 19:57:32 +08:00

143 lines
4.0 KiB
HTML

{php $task_mode =m('common')->getSysset('task')['task_mode']}
{if $task_mode==0}
<script language='javascript'>
$(function(){
$.getJSON("{php echo mobileUrl('util/task')}");
{if p('task')}
{if p('task')->get_unread()}
{if p('task')->TasknewEntrance()}
var navs = $('.fui-navbar').find('a');
$.each(navs,function (i, v) {
var href = $(v).attr('href');
if (href.indexOf('&r=member')>0 && href.indexOf('&r=member.')<1){
var hasClass = $(v).hasClass('active');
if (!hasClass){
$(v).append('<span class="task-red-mark" style="background-color: #ff5555;position: absolute;width: 6.9px;height: 6.9px;border-radius: 50%;display: block;right: 1rem;top: 0.3rem"></span>');
}
}
});
{/if}
{if p('task')->TaskTopNotice()}
var tophtml = '<div class="task-hint"><a href="{php echo mobileUrl('task.reward');}">您有一个新的任务奖励没有领取,点此去领取~~</a><span>忽略</span></div>';
//加载顶部栏
$('body').append(tophtml);
$('.task-hint span').click(function () {
$('.task-hint').css('display', 'none');
$.ajax({
url:'{php echo mobileUrl('task.set_read')}',
});
})
{/if}
{/if}
{/if}
})
</script>
{/if}
<script language="javascript">
require(['init']);
setTimeout(function () {
if($(".danmu").length>0){
$(".danmu").remove();
}
}, 500);
</script>
{if is_weixin()}
<script language='javascript'>
var width = window.screen.width * window.devicePixelRatio;
var height = window.screen.height * window.devicePixelRatio;
var h = document.body.offsetHeight * window.devicePixelRatio;
function isIPhoneX() {
var u = navigator.userAgent;
var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
if (isIOS) {
if (screen.height === 812 && screen.width === 375) {
//是iphoneX
return true;
} else {
//不是iphoneX
return false;
}
}
}
if (isIPhoneX()) {
if(window.history.length != 1) {
$(".fui-navbar,.cart-list,.fui-footer,.fui-content.navbar").removeClass('iphonex');
} else{
$(".fui-navbar,.cart-list,.fui-footer,.fui-content.navbar").addClass('iphonex');
}
}
/*if(height==2436 && width==1125){
$(".fui-navbar,.cart-list,.fui-footer,.fui-content.navbar").addClass('iphonex')
}
if(h == 1923){
$(".fui-navbar,.cart-list,.fui-footer,.fui-content.navbar").removeClass('iphonex');
}*/
</script>
{/if}
{if is_h5app()}
{php $this->shopShare()}
<script language='javascript'>
require(['biz/h5app'], function (modal) {
modal.init({
share: {php echo json_encode($_W['shopshare'])},
backurl: "{$_GPC['backurl']}",
statusbar: "{php echo intval($_W['shopset']['wap']['statusbar'])}",
payinfo: {php echo json_encode($payinfo)}
});
{if $initWX}
modal.initWX();
{/if}
});
</script>
{template 'headmenu'}
{/if}
{php $this->wapQrcode()}
{template '_share'}
{php $merchid = !empty($goods['merchid'])?$goods['merchid']:$_GPC['merchid']}
{if !$hideLayer}
{php $this->diyLayer(true, $diypage, $merchid?$merchid:false,$goods,$order)}
{/if}
{if !$hideGoTop}
{php $this->diyGotop(true, $diypage)}
{/if}
{if p('live')}
{php $this->backliving()}
{/if}
<span style="display:none">{$_W['shopset']['shop']['diycode']}</span>
{if is_weixin()}
<script>
wx.ready(function () {
$(document).on('click','.wxpreview',function () {
if ($(this).parent().attr('href') == '' || $(this).parent().attr('href') == undefined)
{
wx.previewImage({
current:$(this).attr('src') , // 当前显示图片的http链接
urls: [$(this).attr('src')]// 需要预览的图片http链接列表
})
return ;
}
})
});
</script>
{/if}
</body>
</html>