This commit is contained in:
devil_gong 2019-04-09 18:28:48 +08:00
parent 784c9b93fa
commit e6cd42047a
23 changed files with 252 additions and 81 deletions

View File

@ -41,7 +41,7 @@ class Config extends Common
}
/**
* [Index 配置列表]
* 后台配置
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
@ -68,7 +68,22 @@ class Config extends Common
}
/**
* [Save 配置数据保存]
* 商店信息
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Store()
{
// 配置信息
$this->assign('data', ConfigService::ConfigList());
return $this->fetch();
}
/**
* 配置数据保存
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
@ -76,6 +91,14 @@ class Config extends Common
*/
public function Save()
{
// 数据处理
// 商店二维码
if(!isset($_POST['common_customer_store_qrcode']))
{
$_POST['common_customer_store_qrcode'] = '';
}
// 保存
return ConfigService::ConfigSave($_POST);
}
}

View File

@ -70,10 +70,6 @@
<label>{{$data.common_baidu_map_ak.name}}<span class="am-form-group-label-tips">{{$data.common_baidu_map_ak.describe}}</span></label>
<input type="text" name="{{$data.common_baidu_map_ak.only_tag}}" placeholder="{{$data.common_baidu_map_ak.describe}}" data-validation-message="{{$data.common_baidu_map_ak.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_baidu_map_ak.value}}"{{/if}} />
</div>
<div class="am-form-group">
<label>{{$data.common_customer_service_tel.name}}</label>
<input type="text" name="{{$data.common_customer_service_tel.only_tag}}" placeholder="{{$data.common_customer_service_tel.describe}}" data-validation-message="{{$data.common_customer_service_tel.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_customer_service_tel.value}}"{{/if}} />
</div>
<div class="am-form-group am-form-group-refreshing">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>

View File

@ -0,0 +1,45 @@
{{include file="public/header" /}}
<!-- right content start -->
<div class="content-right">
<div class="content">
<!-- form start -->
<form class="am-form form-validation view-save" action="{{:MyUrl('admin/config/save')}}" method="POST" request-type="ajax-url" request-value="{{:MyUrl('admin/config/store')}}">
<div class="am-form-group">
<label>{{$data.common_customer_store_tel.name}}<span class="am-form-group-label-tips">{{$data.common_customer_store_tel.describe}}</span></label>
<input type="text" name="{{$data.common_customer_store_tel.only_tag}}" placeholder="{{$data.common_customer_store_tel.name}}" data-validation-message="{{$data.common_customer_store_tel.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_customer_store_tel.value}}"{{/if}} />
</div>
<div class="am-form-group">
<label>{{$data.common_customer_store_email.name}}<span class="am-form-group-label-tips">{{$data.common_customer_store_email.describe}}</span></label>
<input type="email" name="{{$data.common_customer_store_email.only_tag}}" placeholder="{{$data.common_customer_store_email.name}}" data-validation-message="{{$data.common_customer_store_email.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_customer_store_email.value}}"{{/if}} />
</div>
<div class="am-form-group">
<label>{{$data.common_customer_store_address.name}}<span class="am-form-group-label-tips">{{$data.common_customer_store_address.describe}}</span></label>
<input type="text" name="{{$data.common_customer_store_address.only_tag}}" placeholder="{{$data.common_customer_store_address.name}}" data-validation-message="{{$data.common_customer_store_address.error_tips}}" class="am-radius" {{if !empty($data)}}value="{{$data.common_customer_store_address.value}}"{{/if}} />
</div>
<div class="am-form-group">
<label class="block">{{$data.common_customer_store_qrcode.name}}<span class="am-form-group-label-tips">{{$data.common_customer_store_qrcode.describe}}</span></label>
<ul class="plug-file-upload-view common_customer_store_qrcode-images-view" data-form-name="common_customer_store_qrcode" data-max-number="1" data-dialog-type="images">
{{if !empty($data['common_customer_store_qrcode']['value'])}}
<li>
<input type="text" name="common_customer_store_qrcode" value="{{$data.common_customer_store_qrcode.value}}" />
<img src="{{$Think.__MY_PUBLIC_URL__}}{{$data.common_customer_store_qrcode.value}}" />
<i>×</i>
</li>
{{/if}}
</ul>
<div class="plug-file-upload-submit" data-view-tag="ul.common_customer_store_qrcode-images-view">+选择图片</div>
</div>
<div class="am-form-group am-form-group-refreshing">
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'处理中...'}">保存</button>
</div>
</form>
<!-- form end -->
</div>
</div>
<!-- right content end -->
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->

View File

@ -11,12 +11,11 @@
</div>
<div class="am-form-group">
<label class="block">{{$data.home_site_logo.name}}<span class="am-form-group-label-tips">{{$data.home_site_logo.describe}}</span></label>
<ul class="plug-file-upload-view home_site_logo-images-view" data-form-name="home_site_logo" data-max-number="1" data-dialog-type="images">
{{if !empty($data)}}
<ul class="plug-file-upload-view home_site_logo-images-view" data-form-name="home_site_logo" data-max-number="1" data-delete="0" data-dialog-type="images">
{{if !empty($data['home_site_logo']['value'])}}
<li>
<input type="text" name="home_site_logo" value="{{$data.home_site_logo.value}}" />
<img src="{{$Think.__MY_PUBLIC_URL__}}{{$data.home_site_logo.value}}" />
<i>×</i>
</li>
{{/if}}
</ul>
@ -25,12 +24,11 @@
<div class="am-form-group">
<label class="block">{{$data.home_site_logo_wap.name}}<span class="am-form-group-label-tips">{{$data.home_site_logo_wap.describe}}</span></label>
<ul class="plug-file-upload-view home_site_logo_wap-images-view" data-form-name="home_site_logo_wap" data-max-number="1" data-dialog-type="images">
{{if !empty($data)}}
<ul class="plug-file-upload-view home_site_logo_wap-images-view" data-form-name="home_site_logo_wap" data-max-number="1" data-delete="0" data-dialog-type="images">
{{if !empty($data['home_site_logo_wap']['value'])}}
<li>
<input type="text" name="home_site_logo_wap" value="{{$data.home_site_logo_wap.value}}" />
<img src="{{$Think.__MY_PUBLIC_URL__}}{{$data.home_site_logo_wap.value}}" />
<i>×</i>
</li>
{{/if}}
</ul>
@ -39,12 +37,11 @@
<div class="am-form-group">
<label class="block">{{$data.home_site_desktop_icon.name}}<span class="am-form-group-label-tips">{{$data.home_site_desktop_icon.describe}}</span></label>
<ul class="plug-file-upload-view home_site_desktop_icon-images-view" data-form-name="home_site_desktop_icon" data-max-number="1" data-dialog-type="images">
{{if !empty($data)}}
<ul class="plug-file-upload-view home_site_desktop_icon-images-view" data-form-name="home_site_desktop_icon" data-max-number="1" data-delete="0" data-dialog-type="images">
{{if !empty($data['home_site_desktop_icon']['value'])}}
<li>
<input type="text" name="home_site_desktop_icon" value="{{$data.home_site_desktop_icon.value}}" />
<img src="{{$Think.__MY_PUBLIC_URL__}}{{$data.home_site_desktop_icon.value}}" />
<i>×</i>
</li>
{{/if}}
</ul>

View File

@ -198,6 +198,12 @@ class Common extends Controller
*/
public function ViewInit()
{
// 商店信息
$this->assign('common_customer_store_tel', MyC('common_customer_store_tel'));
$this->assign('common_customer_store_email', MyC('common_customer_store_email'));
$this->assign('common_customer_store_address', MyC('common_customer_store_address'));
$this->assign('common_customer_store_qrcode', MyC('common_customer_store_qrcode'));
// 主题
$default_theme = strtolower(MyC('common_default_theme', 'default', true));
$this->assign('default_theme', $default_theme);

View File

@ -1,6 +1,6 @@
{
"name":"默认模板",
"ver":"1.4.0",
"ver":"1.5.0",
"author":"Devil",
"home":"http://shopxo.net/"
}

View File

@ -16,15 +16,57 @@
<!-- 底部导航 -->
<footer data-am-widget="footer" class="am-footer am-footer-default" data-am-footer="{}">
<div class="footer-nav-list">
<div class="am-container">
<!-- 底部导航 -->
{{if !empty($nav_footer)}}
<ul class="footer-nav-list am-u-md-8">
{{foreach $nav_footer as $k=>$v}}
<a href="{{$v.url}}" {{if $v['is_new_window_open'] eq 1}}target="_blank"{{/if}}>{{$v.name}}</a>
{{if $k lt count($nav_footer)-1}}
<span class="am-footer-divider">| </span>
{{if $k lt 4}}
<li class="am-fl">
<p class="footer-nav-title ellipsis">{{$v.name}}</p>
{{if !empty($v['items'])}}
{{foreach $v.items as $vs}}
<p class="ellipsis">
<a href="{{$vs.url}}" {{if $vs['is_new_window_open'] eq 1}}target="_blank"{{/if}}>{{$vs.name}}</a>
</p>
{{/foreach}}
{{/if}}
</li>
{{/if}}
{{/foreach}}
</ul>
{{/if}}
<!-- 商店信息 -->
<ul class="footer-about am-u-md-4">
{{if !empty($common_customer_store_tel)}}
<li class="tel">
<i class="am-icon-volume-control-phone"></i>
<a href="tel:{{$common_customer_store_tel}}">{{$common_customer_store_tel}}</a>
</li>
{{/if}}
{{if !empty($common_customer_store_address)}}
<li class="address">
<i class="am-icon-map-marker"></i>
<span>{{$common_customer_store_address}}</span>
</li>
{{/if}}
{{if !empty($common_customer_store_email)}}
<li class="email">
<i class="am-icon-envelope"></i>
<span>{{$common_customer_store_email}}</span>
</li>
{{/if}}
{{if !empty($common_customer_store_qrcode)}}
<li class="qrcode">
<img src="{{$attachment_host}}{{$common_customer_store_qrcode}}" alt="{{:MyC('home_seo_site_title')}}" />
</li>
{{/if}}
</ul>
</div>
<div class="am-footer-miscs">
<div class="am-container">
<p>
<script>
<!--
@ -36,4 +78,5 @@
<a href="http://www.miitbeian.gov.cn/" target="_blank">{{:MyC('home_site_icp')}}</a>
</p>
</div>
</div>
</footer>

View File

@ -23,6 +23,7 @@ return array(
'1.2.0' => array('value' => '1.2.0', 'name' => 'v1.2.0'),
'1.3.0' => array('value' => '1.3.0', 'name' => 'v1.3.0'),
'1.4.0' => array('value' => '1.4.0', 'name' => 'v1.4.0'),
'1.5.0' => array('value' => '1.5.0', 'name' => 'v1.5.0'),
),
// 性别

View File

@ -12,7 +12,7 @@
"h5"
],
"apply_version":[
"1.4.0"
"1.5.0"
],
"is_home":true
},

View File

@ -12,7 +12,7 @@
"h5"
],
"apply_version":[
"1.4.0"
"1.5.0"
],
"is_home":false
},

View File

@ -16,7 +16,7 @@
"baidu"
],
"apply_version":[
"1.4.0"
"1.5.0"
],
"is_home":false
},

View File

@ -16,7 +16,7 @@
"baidu"
],
"apply_version":[
"1.4.0"
"1.5.0"
],
"is_home":false
},

View File

@ -12,7 +12,7 @@
"h5"
],
"apply_version":[
"1.4.0"
"1.5.0"
],
"is_home":false
},

View File

@ -16,7 +16,7 @@
"baidu"
],
"apply_version":[
"1.4.0"
"1.5.0"
],
"is_home":false
},

View File

@ -54,7 +54,7 @@ class ConfigService
}
// 附件
$data_fields = ['home_site_logo', 'home_site_logo_wap', 'home_site_desktop_icon'];
$data_fields = ['home_site_logo', 'home_site_logo_wap', 'home_site_desktop_icon', 'common_customer_store_qrcode'];
// 当前参数中不存在则移除
foreach($data_fields as $key=>$field)

View File

@ -36,7 +36,6 @@ class NavigationService
// 读取缓存数据
$header = cache(config('shopxo.cache_common_home_nav_header_key'));
$footer = cache(config('shopxo.cache_common_home_nav_footer_key'));
$header = [];
// 导航模型
$field = array('id', 'pid', 'name', 'url', 'value', 'data_type', 'is_new_window_open');
@ -67,7 +66,7 @@ class NavigationService
// 底部导航
if(empty($footer))
{
$footer = self::NavDataDealWith(Db::name('Navigation')->field($field)->where(array('nav_type'=>'footer', 'is_show'=>1))->order('sort')->select());
$footer = self::NavDataDealWith(Db::name('Navigation')->field($field)->where(array('nav_type'=>'footer', 'is_show'=>1, 'pid'=>0))->order('sort')->select());
if(!empty($footer))
{
foreach($footer as &$v)

View File

@ -19,7 +19,7 @@ return [
// 应用地址
'app_host' => '',
// 应用调试模式
'app_debug' => false,
'app_debug' => true,
// 应用Trace
'app_trace' => false,
// 是否支持多模块

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
<template name="copyright">
<view class="copyright">
<view class="text">Powered by ShopXO v1.4.0</view>
<view class="text">Powered by ShopXO v1.5.0</view>
</view>
</template>

View File

@ -1,5 +1,5 @@
<template name="copyright">
<view class="copyright">
<view class="text">Powered by ShopXO v1.4.0</view>
<view class="text">Powered by ShopXO v1.5.0</view>
</view>
</template>

View File

@ -13,7 +13,7 @@
if(version_compare(PHP_VERSION,'5.6.0','<')) die('PHP版本最低 5.6.0');
// 系统版本
define('APPLICATION_VERSION', 'v1.4.0');
define('APPLICATION_VERSION', 'v1.5.0');
// 定义系统目录分隔符
define('DS', '/');

View File

@ -105,13 +105,6 @@ color: #F5F5F2;font-size: 14px;cursor:pointer;border-radius:0px 0px; position: a
.header-top { background-color: #fafafa; border-bottom: solid 1px #f0f0f0; }
.header{ display:none; max-width:1000px; margin:0px auto; font-size:12px;position: relative; }
.am-footer { border-top: 2px solid #d2364c; }
.footer-bd{ display:none}
.footer{ text-align: center;border-top: 2px solid #F8F8F8 margin-top:20px; padding-top: 5px;margin-bottom:60px ;}
.footer-hd{ display: block;}
.tip{ display:none}
.mobile-navigation{position: fixed;bottom:0px ;width: 100%;z-index: 999;background:#fff ;}
.mobile-navigation li{width: 25%;padding:2px ;background:#fff ;border-top:1px solid #f5f5f5 ;float: left;text-align: center;font-size: 12px; position: relative; }
.mobile-navigation li a { text-decoration: none; }
@ -141,13 +134,7 @@ color: #F5F5F2;font-size: 14px;cursor:pointer;border-radius:0px 0px; position: a
#ai-topsearch{ font-size:14px;height: 36px;line-height: 22px; font-weight: 500; width: 20%; }
/*底部*/
.am-footer {text-align:center; display:block;position: relative;margin: 0px auto; padding: 7px 0px 9px; margin-top:20px;}
.am-footer .footer-bd p, .footer .footer-hd p {margin-bottom: 8px;line-height: 27px;border-bottom: 1px solid #DDD; text-align:left;}
.am-footer .footer-hd a { margin: 0px 4px;white-space: nowrap;color: #6C6C6C;}
.am-footer .footer-hd b { margin: 0px 3px;font-weight: 400;color: #DDD;}
.am-footer .footer-bd p{ border-bottom:none;}
.footer-bd{ display:block;}
.bloglist{ margin-top:0px;}
.shopMain {margin:0px 5px;}
/*选项卡样式*/
.am-nav-tabs > li span{font-size:16px;}
}
@ -437,17 +424,81 @@ background:url(../images/ibar_sprites.png) no-repeat;background-position:0px -23
/**
* 底部
*/
.am-footer, .am-footer-miscs {
font-size: 12px !important;
.am-footer-default {
border-top: 2px solid #d2364c;
background: #f3f3f3;
}
.am-footer-default a {
color: #333;
font-size: 12px;
}
.am-footer-default .am-footer-divider {
.am-footer-default .am-container {
}
.footer-nav-list {
overflow: hidden;
}
.footer-nav-list li {
width: 25%;
text-align: left;
padding: 0 5px;
}
.am-footer-default .am-footer-miscs a {
color: #8e8e8e;
.footer-nav-list li .footer-nav-title {
font-weight: 500;
font-size: 14px;
color: #333;
}
.footer-nav-list li p {
line-height: 26px;
}
.footer-nav-list li p a {
color: #333;
}
.footer-nav-list li p a:hover {
color: #d2364c;
text-decoration: underline;
}
.am-footer-miscs {
padding: 10px 0 5px 0;
margin-top: 10px;
}
.footer-about li {
text-align: left;
}
.footer-about li span, .footer-about li a {
font-size: 14px;
}
.footer-about li.tel a {
color: #ff6700;
}
.footer-about li.qrcode {
margin-top: 5px;
}
.footer-about li.qrcode img {
max-width: 130px;
}
.footer-about li i {
color: #888;
width: 20px;
text-align: center;
}
.am-footer-miscs .am-container {
border-top: 1px solid #ebebeb;
padding-top: 10px;
}
@media only screen and (max-width:1025px) {
.am-footer-default .am-container {
padding: 0 5px;
}
}
@media only screen and (max-width:640px) {
.footer-nav-list li {
}
.footer-about {
border-top: 1px solid #ebebeb;
padding-top: 10px;
margin-top: 10px;
}
}
/**
@ -459,13 +510,14 @@ background:url(../images/ibar_sprites.png) no-repeat;background-position:0px -23
}
.friendship-list h2 {
border-bottom: 1px solid #e3e0e0;
line-height: 26px;
line-height: 30px;
color: #333;
font-weight: 500;
font-size: 14px;
}
.friendship-list ul {
overflow: hidden;
padding: 5px 0;
}
.friendship-list ul li {
float: left;

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB