Initial commit,修正

This commit is contained in:
2025-07-13 19:37:38 +08:00
parent 38ce288e27
commit 65bbd06981
12384 changed files with 3985464 additions and 8 deletions
+31
View File
@@ -0,0 +1,31 @@
<?php
/* @var $this yii\web\View */
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\helpers\Url;
use yii\widgets\LinkPager;
fm_load()->fm_func('url');
$atturl = Yii::$app->params['attachSrc'].Yii::$app->params['attachDir'];
$this->title = '选择平台';
?>
<div class="wrapper wrapper-content">
<div class="row">
<?php foreach($plats as $plat){?>
<div class="col-sm-4 col-md-3">
<a href="<?php echo Url::toRoute(['index/index','pid'=>$plat['id']]);?>">
<div class="thumbnail">
<img alt="300x200" src="<?php echo fmFunc_url_img($plat['thumb'],$atturl)?>"/>
<div class="caption" style="text-align: center;">
<h3>
<?php echo $plat['title']?>
</h3>
</div>
</div>
</a>
</div>
<?php }?>
</div>
</div>
<?=Html::jsFile('@web/js/welcome.min.js?v=1.0.0')?>
+204
View File
@@ -0,0 +1,204 @@
<?php
/**
* @Author: fm453
* @Date: 2018-11-22 12:36:48
* @Last Modified by: fm453
* @Last Modified time: 2018-11-22 23:55:18
* @Email: fm453@lukegzs.com
*/
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\helpers\Url;
use yii\widgets\LinkPager;
$this->title = '地理位置选择';
?>
<style>
body .wrapper{
height: 100%;
margin: 0;
width: 100%;
padding: 0;
overflow: hidden;
}
.map {
height: 100%;
width: 100%;
float: left;
z-index:99;
}
</style>
<!-- 原始地址://webapi.amap.com/ui/1.0/ui/misc/PositionPicker/examples/positionPicker.html -->
<!-- <base href="//webapi.amap.com/ui/1.0/ui/misc/PositionPicker/examples/" /> -->
<div class="wrapper wrapper-content">
<div class="ibox-content" style="padding:0;width:100%;height:100%;">
<form class="form-search" method="get" action="<?=Url::toRoute('index/map')?>" role="form">
<input type="hidden" name="_csrf-backend" value="<?= Yii::$app->getRequest()->getCsrfToken();?>" />
<div class="form-group btn btn-block" style="position:fixed;top:10px;z-index: 100;background-color: rgba(0,0,0,.5);">
<div class="col-sm-7">
<div class="input-group">
<span class="input-group-btn"> <button type="button" class="btn btn-primary">输入地址:
</button> </span>
<input type="text" class="form-control" id="keyword" name="keyword" value="<?=isset($search['keyword']) ? $search['keyword']:''?>" placeholder="输入地址关键词进行查询" autocomplete="off">
<span class="hidden input-group-btn"> <button type="submit" class="btn btn-info">搜索
</button> </span>
</div>
</div>
<div class="col-sm-4">
<div class="input-group">
<span class="input-group-btn"> <button type="button" class="btn btn-primary">纬度
</button> </span>
<input type="text" class="form-control" id="lat" name="lat" value="" autocomplete="off">
<span class="input-group-btn"> <button type="button" class="btn btn-primary">经度
</button> </span>
<input type="text" class="form-control" id="lng" name="lng" value="" autocomplete="off">
</div>
</div>
</div>
</form>
<div id="container" class="map" tabindex="0" style="z-index: 0;"></div>
<div class="" style="position:fixed;bottom:10px;left:50%;margin-left:-75px;width:150px;z-index: 100;">
<button onclick="callback();" class="btn btn-lg btn-primary" type="button">
<i class="ace-icon fa fa-check bigger-110"></i>
确定选择
</button>
</div>
</div>
</div>
<script>
function callback(){
parent.<?=$callback;?>($("#lat").val(),$("#lng").val(),$("#keyword").val());
}
</script>
<script type="text/javascript" src='//webapi.amap.com/maps?v=1.4.10&key=fea3f28a32780b33d97b2afb9a5236fe&plugin=AMap.ToolBar'></script>
<!-- UI组件库 1.0 -->
<script src="//webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>
<script type="text/javascript">
AMapUI.loadUI(['misc/PositionPicker'], function(PositionPicker) {
var lng = "<?=$lng?>";
var lat = "<?=$lat?>";
if(lng != 0 && lat != 0){
lnglatXY = [lng, lat]; //纬度,经度
}else{
lnglatXY = [109.512444,18.252986]; //三亚市政务中心
}
var map = new AMap.Map('container', {
zoom: 16,
scrollWheel: true,
resizeEnable: true,
center: lnglatXY
});
var positionPicker = new PositionPicker({
mode: 'dragMarker',
map: map
});
positionPicker.on('success', function(positionResult) {
console.log(positionResult);
$("#keyword").val(positionResult.address);
var pos = positionResult.position;
$("#lng").val(pos.lng);
$("#lat").val(pos.lat);
});
positionPicker.on('fail', function(positionResult) {
console.log(positionResult);
$("#lng").val('');
$("#lat").val('');
});
positionPicker.start(map.getBounds().getSouthWest());
// positionPicker.start();
map.panBy(0, 1);
map.addControl(new AMap.ToolBar({
liteStyle: true
}))
AMap.plugin(['AMap.Autocomplete','AMap.PlaceSearch'],function(){
var autoOptions = {
city: "三亚市", //城市,默认全国
input: "keyword"//使用联想输入的input的id
};
autocomplete= new AMap.Autocomplete(autoOptions);
var placeSearch = new AMap.PlaceSearch({
city:'三亚市',
map:map
})
//下拉框选择
AMap.event.addListener(autocomplete, "select", function(e){
placeSearch.search(e.poi.name)
});
//关键字查询
// placeSearch.search('<?=$search['keyword']?>');
});
//设置初始化标注数据
var geocoder = new AMap.Geocoder({
radius: 1000,
extensions: "all"
});
function getAddr(lnglatXY){
geocoder.getAddress(lnglatXY, function(status, result) {
// console.log(result);
if (status === 'complete' && result.info === 'OK') {
$("#keyword").val(result.regeocode.formattedAddress);
}
});
}
getAddr(lnglatXY);
//设置地图中心点
map.setCenter(lnglatXY);
var marker = new AMap.Marker({ //加点
map: map,
position: lnglatXY
});
// map.setFitView(); //自动调整视图范围
//绑定点选maker事件
function showInfoClick(e){
console.log(e);
var lnglatXY = [e.lnglat.getLng(),e.lnglat.getLat()];
getAddr(lnglatXY);
map.setCenter(lnglatXY);
map.clearMap(); // 清除地图覆盖物
var marker = new AMap.Marker({ //加点
map: map,
position: lnglatXY
});
map.setFitView();
$("#lng").val(e.lnglat.getLng());
$("#lat").val(e.lnglat.getLat());
var text = '您在 [ '+e.lnglat.getLng()+','+e.lnglat.getLat()+' ] 的位置单击了地图!'
console.log(text);
}
function showInfoDbClick(e){
console.log(e);
var lnglatXY = [e.lnglat.getLng(),e.lnglat.getLat()];
getAddr(lnglatXY);
map.setCenter(lnglatXY);
map.clearMap(); // 清除地图覆盖物
var marker = new AMap.Marker({ //加点
map: map,
position: lnglatXY
});
map.setFitView();
$("#lng").val(e.lnglat.getLng());
$("#lat").val(e.lnglat.getLat());
var text = '您在 [ '+e.lnglat.getLng()+','+e.lnglat.getLat()+' ] 的位置双击了地图!'
console.log(text);
}
map.on('click', showInfoClick);
map.on('dblclick', showInfoDbClick);
});
</script>
+40
View File
@@ -0,0 +1,40 @@
<?php
# @Author: fm453
# @Date: 2021-12-31T04:43:18+08:00
# @Last modified by: fm453
# @Last modified time: 2022-03-11T09:55:56+08:00
/* @var $this yii\web\View */
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\helpers\Url;
use yii\widgets\LinkPager;
use backend\components\Helper;
$this->title = '汽车托运入口界面';
$smsstat = Helper::getSmsStat();
$attachStat = Helper::getAttachStat();
?>
<div class="wrapper wrapper-content">
<div class="row">
<?php foreach($navs as $nav){?>
<?php $entries = $nav['entries'];?>
<div class="col-sm-5">
<div class="ibox float-e-margins">
<div class="ibox-content">
<?php foreach($entries as $item){?>
<a class="btn btn-<?= trim(Html::encode($item['class']))?>" href="<?= trim(Html::encode($item['url']))?>" data-toggle="tooltip" data-placement="top" data-title="<?= trim(Html::encode($item['title']))?>" trigger="hover|focus"><i class="<?= trim(Html::encode($item['icon'])) ?>" ></i> <?= trim(Html::encode($item['name'])) ?></a>
<?php }?>
</div>
</div>
</div>
<?php }?>
</div>
</div>
<?php
fm_load()->fm_func('userAgent');
if(!fmFunc_UA_isMobile()){
Html::jsFile('@web/js/welcome.min.js?v=1.0.0');
}
?>
+228
View File
@@ -0,0 +1,228 @@
<?php
# @Author: fm453
# @Date: 2021-12-31T04:43:18+08:00
# @Last modified by: fm453
# @Last modified time: 2022-03-11T09:56:02+08:00
/* @var $this yii\web\View */
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\helpers\Url;
use yii\widgets\LinkPager;
use backend\components\Helper;
$this->title = '汽车托运入口界面';
$smsstat = Helper::getSmsStat();
$attachStat = Helper::getAttachStat();
?>
<div class="wrapper wrapper-content">
<div class="row">
<?php if(\Yii::$app->user->can('/site/index')):?> <!--判断是否有‘/site/index’权限,有则显示,无则隐藏-->
<?php endif;?>
<div class="col-sm-3">
<div class="ibox float-e-margins">
<div class="ibox-title">
<span class="label label-info pull-right">统计</span>
<h5>账号</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">运维人员:<?=Helper::getAdminerCount()?>名</h1>
<div class="stat-percent font-bold text-danger">!!!</div>
<small>可登陆后台管理系统的</small>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox float-e-margins">
<div class="ibox-title">
<span class="label label-warning pull-right">统计</span>
<h5>API</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins"><?=Helper::getApierCount()?></h1>
<div class="stat-percent font-bold text-warning">稳定 <i class="fa fa-bolt"></i>
</div>
<small>API接口系统用户</small>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox float-e-margins">
<div class="ibox-title">
<span class="label label-success pull-right">统计</span>
<h5>会员</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins"><?=Helper::getMemberCount()?></h1>
<div class="stat-percent font-bold text-success">上升 <i class="fa fa-bolt"></i>
</div>
<small>可登陆各前端站点的</small>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="ibox float-e-margins">
<div class="ibox-title">
<span class="label label-default pull-right">统计</span>
<h5>粉丝</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins"><?=Helper::getFansCount()?></h1>
<div class="stat-percent font-bold text-default"> <i class="fa fa-bolt"></i>
</div>
<small>仅作保存的基础数据</small>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>短信</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">累计向<?=$smsstat['mobile']?>个手机发送了<?=$smsstat['sms']?>条短信</h1>
<small>发送量统计</small>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>附件</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">累计储存了<?=$attachStat['num']?>个文件</h1>
<small>合计:<?=$attachStat['size']?> Bytes</small>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<span class="label label-primary pull-right">历史</span>
<h5>访客</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins"><?=Helper::getHistoryVisNum()?></h1>
<small>访客</small>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<span class="label label-danger pull-right">最近一个月</span>
<h5>活跃用户</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins"><?=Helper::getMonthHistoryVisNum()?></h1>
<small><?= date('m')?>月</small>
</div>
</div>
</div>
<div class="col-sm-12">
<div id="history"></div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="ibox-content">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>ID</th>
<th>用户名</th>
<th>登录IP</th>
<th>登录时间</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<?php foreach($log as $vo):?>
<tr>
<td><?=$vo['id']?></td>
<td><?=$vo['username']?></td>
<td><?=$vo['ip']?></td>
<td><?= date('Y-m-d H:i:s',$vo['create_time'])?></td>
<td><?=str_replace('-','',$vo['data'])?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<!--分页-->
<div class="f-r">
<?= LinkPager::widget([
'pagination'=>$pages,
'firstPageLabel' => '首页',
'nextPageLabel' => '下一页',
'prevPageLabel' => '上一页',
'lastPageLabel' => '末页',
]) ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?=Html::jsFile('@web/js/plugins/Highcharts/4.1.7/js/highcharts.js')?>
<?=Html::jsFile('@web/js/plugins/Highcharts/4.1.7/js/modules/exporting.js')?>
<script type="text/javascript">
$(function () {
$('#history').highcharts({
title: {
text: '',
x: -20 //center
},
credits: { enabled:false }, //屏蔽右下角
exporting: { enabled:false }, //屏蔽右上角
subtitle: {
text: '',
x: -20
},
xAxis: {
categories: [<?=$HistoryMonthStr?>]
},
yAxis: {
title: {
text: '访客/人'
},
min: 0.5, // 这个用来控制y轴的开始刻度(最小刻度),另外还有一个表示最大刻度的max属性
startOnTick: false, // y轴坐标是否从某一刻度开始(这个设定与标题无关)
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
valueSuffix: '人',
pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y:,.0f} 人</b><br/>',
shared: true
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle',
borderWidth: 0
},
series: [{
name: '访客数',
data: [<?=$HistoryMonthNum?>]
}]
});
});
</script>
<hr>
<?php
fm_load()->fm_func('userAgent');
if(!fmFunc_UA_isMobile()){
Html::jsFile('@web/js/welcome.min.js?v=1.0.0');
}
?>