细节优化

feat/task1-c-wallet
gongfuxiang 2022-10-07 20:52:19 +08:00
parent 4d21edeb74
commit 86f8f41adb
10 changed files with 524 additions and 31 deletions

View File

@ -302,6 +302,9 @@ class Common extends BaseController
// 默认不加载打印组件
$assign['is_load_hiprint'] = 0;
// 默认不加载echarts图表组件
$assign['is_load_echarts'] = 0;
// 布局样式+管理
$assign['is_load_layout'] = 0;
$assign['is_load_layout_admin'] = 0;

View File

@ -137,6 +137,9 @@ class Index extends Common
$order_complete_money = StatisticalService::OrderCompleteMoneyYesterdayTodayTotal();
$assign['order_complete_money'] = $order_complete_money['data'];
}
// 加载图表组件
$assign['is_load_echarts'] = 1;
}
MyViewAssign($assign);

View File

@ -72,8 +72,11 @@
<script type='text/javascript' src="{{$public_host}}static/common/lib/jshash/md5-min.js?v={{:MyC('home_static_cache_version')}}"></script>
<!-- echarts 图表 -->
<script type='text/javascript' src="{{$public_host}}static/common/lib/echarts/echarts.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$public_host}}static/common/lib/echarts/macarons.js?v={{:MyC('home_static_cache_version')}}"></script>
{{if isset($is_load_echarts) and $is_load_echarts eq 1}}
<script type='text/javascript' src="{{$public_host}}static/common/lib/echarts/echarts.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$public_host}}static/common/lib/echarts/macarons.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$public_host}}static/common/lib/echarts/shine.js?v={{:MyC('home_static_cache_version')}}"></script>
{{/if}}
<!-- ueditor 编辑器 -->
<script type='text/javascript' src="{{$my_public_url}}static/common/lib/ueditor/ueditor.config.js?v={{:MyC('home_static_cache_version')}}"></script>

View File

@ -22,7 +22,7 @@
*/
function PopoverContentHandle($content)
{
return str_replace(["\n", "'", '"'], ['<br />', '', ''], $content);
return str_replace(["\n", "\r", "'", '"'], ['<br />', '', '', ''], $content);
}
/**

View File

@ -410,6 +410,9 @@ class Common extends BaseController
// 默认不加载打印组件
$assign['is_load_hiprint'] = 0;
// 默认不加载echarts图表组件
$assign['is_load_echarts'] = 0;
// 是否加载附件组件
$admin = AdminService::LoginInfo();
$assign['is_load_upload_editor'] = (!empty($this->user) || !empty($admin)) ? 1 : 0;

View File

@ -54,8 +54,11 @@
{{/if}}
<!-- echarts 图表 -->
<script type='text/javascript' src="{{$public_host}}static/common/lib/echarts/echarts.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$public_host}}static/common/lib/echarts/macarons.js?v={{:MyC('home_static_cache_version')}}"></script>
{{if isset($is_load_echarts) and $is_load_echarts eq 1}}
<script type='text/javascript' src="{{$public_host}}static/common/lib/echarts/echarts.min.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$public_host}}static/common/lib/echarts/macarons.js?v={{:MyC('home_static_cache_version')}}"></script>
<script type='text/javascript' src="{{$public_host}}static/common/lib/echarts/shine.js?v={{:MyC('home_static_cache_version')}}"></script>
{{/if}}
<!-- amazeui插件 -->
<script type='text/javascript' src="{{$public_host}}static/common/lib/amazeui-switch/amazeui.switch.min.js?v={{:MyC('home_static_cache_version')}}"></script>

View File

@ -174,9 +174,9 @@ class AppMiniUserService
} else {
$status = false;
// 如果用户openid为空则绑定到用户下面
if(empty($user['toutiao_openid']))
if(empty($user['weixin_openid']))
{
$status = UserService::UserOpenidBind($user['id'], $ret['data']['openid'], 'toutiao_openid');
$status = UserService::UserOpenidBind($user['id'], $ret['data']['openid'], 'weixin_openid');
}
// 如果用户unionid为空则绑定到用户下面
if(empty($user['weixin_unionid']) && !empty($unionid))
@ -529,7 +529,7 @@ class AppMiniUserService
if($ret['code'] == 0)
{
// 先从数据库获取用户信息
$user = UserService::AppUserInfoHandle(null, 'toutiao_openid', $ret['data']['openid']);
$user = UserService::AppUserInfoHandle(null, 'kuaishou_openid', $ret['data']['openid']);
if(empty($user))
{
$ret = DataReturn('授权登录成功', 0, ['is_user_exist'=>0, 'openid'=>$ret['data']['openid']]);

View File

@ -279,6 +279,18 @@ form.am-form-pure .business-form-block {
left: calc(50% - 600px);
}
}
@media only screen and (min-width:1000px) {
.popup-full-max-lg {
max-width: 1000px;
left: calc(50% - 500px);
}
}
@media only screen and (min-width:800px) {
.popup-full-max-md {
max-width: 800px;
left: calc(50% - 400px);
}
}
/**
* iframe
@ -751,9 +763,6 @@ button.colorpicker-submit img {
.am-table-scrollable-horizontal .am-table .am-dropdown-content {
z-index: 1;
}
.am-table-scrollable-horizontal .am-table tr th {
z-index: 3;
}
.am-table-scrollable-horizontal .am-table tr td.am-grid-fixed-left,
.am-table-scrollable-horizontal .am-table tr td.am-grid-fixed-right {
background: #fff;
@ -763,6 +772,7 @@ button.colorpicker-submit img {
.am-table-scrollable-horizontal .am-table-striped > tbody > tr:nth-child(odd) > td.am-grid-fixed-right {
background-color: #fafafa;
}
.am-table-scrollable-horizontal .am-table tr th,
.am-table-scrollable-horizontal .am-table tr th.am-grid-fixed-left,
.am-table-scrollable-horizontal .am-table tr th.am-grid-fixed-right {
z-index: 5;

View File

@ -964,13 +964,14 @@ function VideoFileUploadShow(class_name, show_video, default_video)
* @version 1.0.0
* @date 2018-09-13
* @desc description
* @param {[string]} url [加载url]
* @param {[string]} title [标题]
* @param {[string]} class_tag [指定class]
* @param {[int]} full [是否满屏0, 1]
* @param {[int]} full_max [满屏最大限制max-width:1200px0, 1]
* @param {[string]} url [加载url]
* @param {[string]} title [标题]
* @param {[string]} class_tag [指定class]
* @param {[int]} full [是否满屏0, 1]
* @param {[int]} full_max [满屏最大限制max-width:1200px0, 1]
* @param {[string]} full_max_size [满屏最大限制指定默认空 最大1200有效值 md 800, lg 1000]
*/
function ModalLoad(url, title, class_tag, full, full_max)
function ModalLoad(url, title, class_tag, full = 0, full_max = 0, full_max_size = '')
{
// class 定义
var ent = 'popup-iframe';
@ -991,6 +992,11 @@ function ModalLoad(url, title, class_tag, full, full_max)
if((full_max || 0) == 1)
{
ent += ' popup-full-max';
// 满屏最大限制指定大小类型
if((full_max_size || null) != null)
{
ent += '-'+full_max_size;
}
}
// 调用弹窗组件
@ -2456,6 +2462,28 @@ function UrlUseCurrentHostHandle(url)
return url;
}
/**
* 下拉选择组件初始化
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2022-10-02
* @desc description
*/
function SelectChosenInit()
{
if($('select.chosen-select').length > 0)
{
$('select.chosen-select').chosen({
inherit_select_classes: true,
enable_split_word_search: true,
search_contains: true,
no_results_text: window['lang_chosen_select_no_results_text'],
disable_search_threshold: 10
});
}
}
/**
* 获取鼠标光标位置
* @author Devil
@ -2533,7 +2561,7 @@ function JsonObjectToJsonString(value)
*/
function PopoverContentHandle(content)
{
return content.replace(new RegExp("\n", 'g'), '<br />').replace(new RegExp("'", 'g'), '').replace(new RegExp('"', 'g'), '');
return content.replace(new RegExp("\n", 'g'), '<br />').replace(new RegExp("\r", 'g'), '').replace(new RegExp("'", 'g'), '').replace(new RegExp('"', 'g'), '');
}
@ -2876,17 +2904,9 @@ $(function()
});
// 多选插件初始化
if($('select.chosen-select').length > 0)
{
$('select.chosen-select').chosen({
inherit_select_classes: true,
enable_split_word_search: true,
search_contains: true,
no_results_text: window['lang_chosen_select_no_results_text'],
disable_search_threshold: 10
});
}
// 下拉选择组件初始化
SelectChosenInit();
// 多选插件 空内容失去焦点验证bug兼容处理
$(document).on('blur', 'ul.chosen-choices .search-field, div.chosen-select .chosen-search', function()
{
@ -3676,9 +3696,10 @@ $(function()
var class_tag = $(this).data('class') || '';
var full = parseInt($(this).data('full')) || 0;
var full_max = parseInt($(this).data('full-max')) || 0;
var full_max_size = $(this).data('full-max-size') || '';
// 调用弹窗方法
ModalLoad(url, title, class_tag, full, full_max);
ModalLoad(url, title, class_tag, full, full_max, full_max_size);
});
// 地图弹窗
@ -3698,10 +3719,11 @@ $(function()
var class_tag = $(this).data('class') || '';
var full = parseInt($(this).data('full')) || 0;
var full_max = parseInt($(this).data('full-max')) || 0;
var full_max_size = $(this).data('full-max-size') || '';
// 调用弹窗方法
var url = UrlFieldReplace('lat', lat, UrlFieldReplace('lng', lng, __map_view_url__));
ModalLoad(url, title, class_tag, full, full_max);
ModalLoad(url, title, class_tag, full, full_max, full_max_size);
});
// 弹窗全屏

View File

@ -0,0 +1,446 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['exports', 'echarts'], factory);
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
// CommonJS
factory(exports, require('echarts'));
} else {
// Browser globals
factory({}, root.echarts);
}
}(this, function (exports, echarts) {
var log = function (msg) {
if (typeof console !== 'undefined') {
console && console.error && console.error(msg);
}
};
if (!echarts) {
log('ECharts is not Loaded');
return;
}
echarts.registerTheme('shine', {
color: [
"#c12e34",
"#e6b600",
"#0098d9",
"#2b821d",
"#005eaa",
"#339ca8",
"#cda819",
"#32a487"
],
textStyle: {},
title: {
textStyle: {
fontWeight: 'normal',
color: "#516b91"
},
subtextStyle: {
color: "#93b7e3"
}
},
line: {
itemStyle: {
borderWidth: 1
},
lineStyle: {
width: 2
},
symbolSize: 4,
symbol: "emptyCircle",
smooth: false
},
radar: {
itemStyle: {
borderWidth: 1
},
lineStyle: {
width: 2
},
symbolSize: 4,
symbol: "emptyCircle",
smooth: false
},
bar: {
itemStyle: {
barBorderWidth: 0,
barBorderColor: "#f1f1f1"
}
},
pie: {
itemStyle: {
borderWidth: 0,
borderColor: "#f1f1f1"
}
},
scatter: {
itemStyle: {
borderWidth: 0,
borderColor: "#f1f1f1"
}
},
boxplot: {
itemStyle: {
borderWidth: 0,
borderColor: "#f1f1f1"
}
},
parallel: {
itemStyle: {
borderWidth: 0,
borderColor: "#f1f1f1"
}
},
sankey: {
itemStyle: {
borderWidth: 0,
borderColor: "#f1f1f1"
}
},
funnel: {
itemStyle: {
borderWidth: 0,
borderColor: "#f1f1f1"
}
},
gauge: {
itemStyle: {
borderWidth: 0,
borderColor: "#f1f1f1"
}
},
candlestick: {
itemStyle: {
color: "#c12e34",
color0: "#2b821d",
borderColor: "#c12e34",
borderColor0: "#2b821d",
borderWidth: 1
}
},
graph: {
itemStyle: {
borderWidth: 0,
borderColor: "#f1f1f1"
},
lineStyle: {
width: 1,
color: "#aaaaaa"
},
symbolSize: 4,
symbol: "emptyCircle",
smooth: false,
color: [
"#c12e34",
"#e6b600",
"#0098d9",
"#2b821d",
"#005eaa",
"#339ca8",
"#cda819",
"#32a487"
],
label: {
color: "#eeeeee"
}
},
map: {
itemStyle: {
normal: {
areaColor: "#ddd",
borderColor: "#eee",
borderWidth: 0.5
},
emphasis: {
areaColor: "#e6b600",
borderColor: "#ddd",
borderWidth: 1
}
},
label: {
normal: {
textStyle: {
color: "#c12e34"
}
},
emphasis: {
textStyle: {
color: "#c12e34"
}
}
}
},
geo: {
itemStyle: {
normal: {
areaColor: "#ddd",
borderColor: "#eee",
borderWidth: 0.5
},
emphasis: {
areaColor: "#e6b600",
borderColor: "#ddd",
borderWidth: 1
}
},
label: {
normal: {
textStyle: {
color: "#c12e34"
}
},
emphasis: {
textStyle: {
color: "#c12e34"
}
}
}
},
categoryAxis: {
axisLine: {
show: true,
lineStyle: {
color: "#333"
}
},
axisTick: {
show: true,
lineStyle: {
color: "#333"
}
},
axisLabel: {
show: true,
textStyle: {
color: "#333"
}
},
splitLine: {
show: false,
lineStyle: {
color: [
"#f1f1f1"
]
}
},
splitArea: {
show: false,
areaStyle: {
color: [
"rgba(250,250,250,0.3)",
"rgba(200,200,200,0.3)"
]
}
}
},
valueAxis: {
axisLine: {
show: true,
lineStyle: {
color: "#333"
}
},
axisTick: {
show: true,
lineStyle: {
color: "#333"
}
},
axisLabel: {
show: true,
textStyle: {
color: "#333"
}
},
splitLine: {
show: true,
lineStyle: {
color: [
"#f1f1f1"
]
}
},
splitArea: {
show: false,
areaStyle: {
color: [
"rgba(250,250,250,0.3)",
"rgba(200,200,200,0.3)"
]
}
}
},
logAxis: {
axisLine: {
show: true,
lineStyle: {
color: "#333"
}
},
axisTick: {
show: true,
lineStyle: {
color: "#333"
}
},
axisLabel: {
show: true,
textStyle: {
color: "#333"
}
},
splitLine: {
show: true,
lineStyle: {
color: [
"#f1f1f1"
]
}
},
splitArea: {
show: false,
areaStyle: {
color: [
"rgba(250,250,250,0.3)",
"rgba(200,200,200,0.3)"
]
}
}
},
timeAxis: {
axisLine: {
show: true,
lineStyle: {
color: "#333"
}
},
axisTick: {
show: true,
lineStyle: {
color: "#333"
}
},
axisLabel: {
show: true,
textStyle: {
color: "#333"
}
},
splitLine: {
show: true,
lineStyle: {
color: [
"#f1f1f1"
]
}
},
splitArea: {
show: false,
areaStyle: {
color: [
"rgba(250,250,250,0.3)",
"rgba(200,200,200,0.3)"
]
}
}
},
toolbox: {
iconStyle: {
normal: {
borderColor: "#06467c"
},
emphasis: {
borderColor: "#4187c2"
}
}
},
legend: {
textStyle: {
color: "#333333"
}
},
tooltip: {
backgroundColor: 'rgba(50,50,50,0.5)',
axisPointer: {
lineStyle: {
color: "#27727b",
width: 1
},
crossStyle: {
color: "#27727b",
width: 1
}
}
},
timeline: {
lineStyle: {
color: "#005eaa",
width: 1
},
itemStyle: {
normal: {
color: "#005eaa",
borderWidth: 1
},
emphasis: {
color: "#005eaa"
}
},
controlStyle: {
normal: {
color: "#005eaa",
borderColor: "#005eaa",
borderWidth: 0.5
},
emphasis: {
color: "#005eaa",
borderColor: "#005eaa",
borderWidth: 0.5
}
},
checkpointStyle: {
color: "#005eaa",
borderColor: "rgba(49,107,194,0.5)"
},
label: {
normal: {
textStyle: {
color: "#005eaa"
}
},
emphasis: {
textStyle: {
color: "#005eaa"
}
}
}
},
visualMap: {
color: [
"#1790cf",
"#a2d4e6"
]
},
dataZoom: {
backgroundColor: "rgba(47,69,84,0)",
dataBackgroundColor: "rgba(47,69,84,0.3)",
fillerColor: "rgba(167,183,204,0.4)",
handleColor: "#a7b7cc",
handleSize: "100%",
textStyle: {
color: "#333333"
}
},
markPoint: {
label: {
color: "#eeeeee"
},
emphasis: {
label: {
color: "#eeeeee"
}
}
}
});
}));