wpfw_ewei_shopv2/template/web_v3/plugins/index.html
2023-02-14 19:57:32 +08:00

197 lines
7.1 KiB
HTML

{template '_header'}
<style type='text/css'>
.feed-activity-list {
width: 100%;
overflow: hidden;
}
.feed-element {
float: left;
width: 320px;
height: 120px;
margin-left: 15px;
margin-bottom: 20px;
border: 1px solid #efefef;
padding: 20px;
}
.feed-element::after {
display: none
}
.feed-element .title {
font-size: 14px;
height: 24px;
line-height: 20px;
vertical-align: bottom;
color: #333;
font-weight: bold;
margin-left: 10px;
}
.feed-element img.img-circle,
.dropdown-messages-box img.img-circle {
float: left;
width: 60px;
height: 60px;
border-radius: 4px;
}
.media-body {
margin-top: 3px;
height: 65px;
}
.text-muted {
margin-left: 10px;
width: 200px;
display: block;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.authorization{
width: 95%;
height:20px;
color: #999;
line-height: 24px;
border-top: 1px solid #efefef;
}
</style>
<div class="page-header">
<div class="pull-right">
<div class="input-group" style="width:400px;">
<span class="input-group-addon">搜索</span>
<input type="text" class="form-control" id="name" placeholder="输入应用名称进行快速搜索"/>
</div>
</div>
当前位置:<span class="text-primary">我的应用</span>
</div>
<div class="page-content">
<div class='panel panel-default' style='border:none;'>
{if p('grant') || $_W['role'] == 'founder'}
{if !empty($pluginsetting['adv'])}
<a href="{php echo webUrl('plugingrant')}">
<img src="{php echo tomedia($pluginsetting['adv'])}" width="100%" alt="应用授权中心">
</a>
{/if}
{/if}
{loop $category $ck $cv}
{if count($cv['plugins'])<=0}{php continue;}{/if}
<div class="panel-heading" style='background:none;border:none;'>
{$cv['name']}
</div>
<div class="feed-activity-list">
{loop $cv['plugins'] $plugin}
{if com_perm_check_plugin($plugin['identity']) && cv($plugin['identity'])}
<a class="feed-element" href="{php echo webUrl($plugin['identity'])}" data-name="{$plugin['name']}">
<span class="pull-left">
<img src="{php echo tomedia($plugin['thumb'])}" class="img-circle" alt="image"
onerror="this.src='../addons/{EWEI_SHOP_V2_MODULE_NAME}/static/images/yingyong.png'">
</span>
<div class="media-body ">
<span class="title">
<span class="fl">{$plugin['name']}</span>
{if in_array($plugin['identity'],$wxapp_array)}
<img src="{php echo tomedia('../addons/'.EWEI_SHOP_V2_MODULE_NAME.'/static/images/xcx.png')}" alt="" data-placement="top" data-toggle="popover" data-trigger="hover" data-html="true" data-content="已支持小程序" style="font-size: 12px;color: #00c952;margin-left:5px">{/if}
</span>
<small class="text-muted">{$plugin['desc']}</small>
</div>
{if $_W['role'] != 'founder' && $plugin['isgrant']>0}
<div class="authorization">
<Script Language="JavaScript">
/*Begin*/
var timedate = new Date({$plugin['permendtime']} * 1000);
var times = "研究生考试";
var now = new Date();
var date = timedate.getTime() - now.getTime();
var time = Math.floor(date / (1000 * 60 * 60 * 24));
if (time >= 0) {
if (time <= 30) {
document.write("授权剩余:<span style='font-size:12px;padding:2px 5px;display:inline-block;border-radius: 3px;'>" + time + "天</span>");
} else {
document.write("授权剩余:<span style='font-size:12px;padding:2px 5px;display:inline-block;border-radius: 3px;'>" + time + "天</span>");
}
} else {
document.write("授权已过期");
}
;
/*End*/
</Script>
</div>
{elseif $_W['role'] != 'founder' && $plugin['isplugingrant']>0}
<div class="authorization">
<script type="text/javascript">
var timedate = new Date({$plugin['permendtime']} * 1000);
var month = {$plugin['month']};
var isperm = {$plugin['isperm']};
var now = new Date();
var date = timedate.getTime() - now.getTime();
var time = Math.floor(date / (1000 * 60 * 60 * 24 * 30));
if (month == 0) {
if (isperm == 0) {
document.write("授权已过期");
}
} else {
if (time >= 0) {
if (time <= 1) {
document.write("授权剩余:<span style='font-size:12px;padding:2px 5px;display:inline-block;border-radius: 3px;'>" + 1 + "个月</span>");
} else {
document.write("授权剩余:<span style='font-size:12px;padding:2px 5px;display:inline-block;border-radius: 3px;'>" + time + "个月</span>");
}
}
}
;
</script>
</div>
{/if}
</a>
{/if}
{/loop}
</div>
{/loop}
</div>
</div>
<script>
$(function(){
$('#name').bind('input propertychange',function(){
var name = $.trim( $('#name').val() );
if( name==''){
$('.feed-activity-list').prev('.panel-heading').show();
$('.feed-element').show();
}else{
$('.feed-activity-list').prev('.panel-heading').hide();
$('.feed-element').hide();
$('.feed-element').each(function(){
if($(this).data('name').indexOf( name )!=-1){
$(this).show().closest('.feed-activity-list').prev('.panel-heading').show();
}
});
}
})
})
$(document).ready(function () {
$('.feed-activity-list,.plugin_tabs').each(function () {
if ($(this).children().length <= 0) {
$(this).prev().remove();
$(this).remove();
}
});
})
</script>
{template '_footer'}