mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-11-30 10:59:47 +08:00
小程序细节优化
This commit is contained in:
parent
1f4dcb11b1
commit
7a526da9cb
@ -60,6 +60,15 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{$data.common_app_is_header_nav_fixed.name}}<span class="am-form-group-label-tips">{{$data.common_app_is_header_nav_fixed.describe}}</span></label>
|
||||
<select name="{{$data.common_app_is_header_nav_fixed.only_tag}}" class="am-radius chosen-select c-p" data-validation-message="{{$data.common_app_is_header_nav_fixed.error_tips}}" required>
|
||||
{{foreach $common_is_text_list as $v}}
|
||||
<option value="{{$v.id}}" {{if isset($data['common_app_is_header_nav_fixed']['value']) and $data['common_app_is_header_nav_fixed']['value'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
|
||||
{{/foreach}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group am-form-group-refreshing">
|
||||
<input type="hidden" name="nav_type" value="{{$nav_type}}" />
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
|
||||
|
@ -46,12 +46,13 @@ class Index extends Common
|
||||
public function Index()
|
||||
{
|
||||
$result = [
|
||||
'navigation' => AppNavService::AppHomeNav(),
|
||||
'banner_list' => BannerService::Banner(),
|
||||
'data_list' => GoodsService::HomeFloorList(),
|
||||
'common_shop_notice' => MyC('common_shop_notice', null, true),
|
||||
'common_app_is_enable_search' => (int) MyC('common_app_is_enable_search', 1),
|
||||
'common_app_is_enable_answer' => (int) MyC('common_app_is_enable_answer', 1),
|
||||
'navigation' => AppNavService::AppHomeNav(),
|
||||
'banner_list' => BannerService::Banner(),
|
||||
'data_list' => GoodsService::HomeFloorList(),
|
||||
'common_shop_notice' => MyC('common_shop_notice', null, true),
|
||||
'common_app_is_enable_search' => (int) MyC('common_app_is_enable_search', 1),
|
||||
'common_app_is_enable_answer' => (int) MyC('common_app_is_enable_answer', 1),
|
||||
'common_app_is_header_nav_fixed' => (int) MyC('common_app_is_header_nav_fixed', 0),
|
||||
];
|
||||
|
||||
// 返回数据
|
||||
|
@ -1,30 +1,32 @@
|
||||
<!-- 搜索框 start -->
|
||||
<div class="nav-search white am-hide-sm-only">
|
||||
<div class="logo am-show-sm-only">
|
||||
<a href="{{$Think.__MY_URL__}}">
|
||||
<img src="{{$attachment_host}}{{:MyC('home_site_logo_wap')}}" alt="{{:MyC('home_seo_site_title')}}" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="logo-big am-hide-sm-only">
|
||||
<a href="{{$Think.__MY_URL__}}">
|
||||
<img src="{{$attachment_host}}{{:MyC('home_site_logo')}}" alt="{{:MyC('home_seo_site_title')}}" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="am-container">
|
||||
<div class="logo am-show-sm-only">
|
||||
<a href="{{$Think.__MY_URL__}}">
|
||||
<img src="{{$attachment_host}}{{:MyC('home_site_logo_wap')}}" alt="{{:MyC('home_seo_site_title')}}" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="logo-big am-hide-sm-only">
|
||||
<a href="{{$Think.__MY_URL__}}">
|
||||
<img src="{{$attachment_host}}{{:MyC('home_site_logo')}}" alt="{{:MyC('home_seo_site_title')}}" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="search-bar">
|
||||
<form action="{{:MyUrl('index/search/index')}}" method="POST">
|
||||
<div class="search-group">
|
||||
<input id="search-input" name="wd" type="text" placeholder="其实搜索很简单^_^ !" value="{{if !empty($params['wd'])}}{{$params.wd}}{{/if}}" autocomplete="off" />
|
||||
<input id="ai-topsearch" class="submit am-btn" index="1" type="submit" value="搜索" />
|
||||
</div>
|
||||
{{if !empty($home_search_keywords)}}
|
||||
<ul class="search-hot-keywords">
|
||||
{{foreach $home_search_keywords as $v}}
|
||||
<li><a href="{{:MyUrl('index/search/index', ['wd'=>StrToAscii($v)])}}" target="_blank">{{$v}}</a></li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
</form>
|
||||
<div class="search-bar">
|
||||
<form action="{{:MyUrl('index/search/index')}}" method="POST">
|
||||
<div class="search-group">
|
||||
<input id="search-input" name="wd" type="text" placeholder="其实搜索很简单^_^ !" value="{{if !empty($params['wd'])}}{{$params.wd}}{{/if}}" autocomplete="off" />
|
||||
<input id="ai-topsearch" class="submit am-btn" index="1" type="submit" value="搜索" />
|
||||
</div>
|
||||
{{if !empty($home_search_keywords)}}
|
||||
<ul class="search-hot-keywords">
|
||||
{{foreach $home_search_keywords as $v}}
|
||||
<li><a href="{{:MyUrl('index/search/index', ['wd'=>StrToAscii($v)])}}" target="_blank">{{$v}}</a></li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 搜索框 end -->
|
@ -1674,7 +1674,7 @@ class UserService
|
||||
if($user['is_mandatory_bind_mobile'] == 0 || ($user['is_mandatory_bind_mobile'] == 1 && !empty($user['mobile'])))
|
||||
{
|
||||
$user['token'] = md5(md5($user['id'].time()).rand(100, 1000000));
|
||||
cache(config('shopxo.cache_user_info').$user['token'], $user, 3600*24*15);
|
||||
cache(config('shopxo.cache_user_info').$user['token'], $user);
|
||||
} else {
|
||||
$user['token'] = '';
|
||||
}
|
||||
|
@ -26,6 +26,19 @@
|
||||
line-height: 70rpx;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导航固定
|
||||
*/
|
||||
.search-fixed {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
.search-fixed-seat {
|
||||
padding-top: 110rpx;
|
||||
}
|
||||
|
||||
/**
|
||||
* 楼层数据
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
<!-- 搜索 -->
|
||||
<view a:if="{{load_status == 1 && common_app_is_enable_search == 1}}" class="search wh-auto">
|
||||
<view a:if="{{common_app_is_header_nav_fixed == 1}}" class="search-fixed-seat"></view>
|
||||
<view a:if="{{load_status == 1 && common_app_is_enable_search == 1}}" class="search wh-auto {{common_app_is_header_nav_fixed == 1 ? 'search-fixed' : ''}}">
|
||||
<view class="search-content bg-white oh">
|
||||
<icon type="search" size="16" />
|
||||
<input type="text" confirm-type="search" placeholder="其实搜索很简单^_^!" class="wh-auto cr-888" onConfirm="search_input_event" />
|
||||
|
2
public/appmini/old/alipay/pages/index/index.js
Executable file → Normal file
2
public/appmini/old/alipay/pages/index/index.js
Executable file → Normal file
@ -9,6 +9,7 @@ Page({
|
||||
common_shop_notice: null,
|
||||
common_app_is_enable_search: 1,
|
||||
common_app_is_enable_answer: 1,
|
||||
common_app_is_header_nav_fixed: 0,
|
||||
load_status: 0,
|
||||
},
|
||||
|
||||
@ -45,6 +46,7 @@ Page({
|
||||
common_shop_notice: data.common_shop_notice || null,
|
||||
common_app_is_enable_search: data.common_app_is_enable_search,
|
||||
common_app_is_enable_answer: data.common_app_is_enable_answer,
|
||||
common_app_is_header_nav_fixed: data.common_app_is_header_nav_fixed,
|
||||
data_list_loding_status: data.data_list.length == 0 ? 0 : 3,
|
||||
data_bottom_line_status: true,
|
||||
});
|
||||
|
@ -9,6 +9,7 @@ Page({
|
||||
common_shop_notice: null,
|
||||
common_app_is_enable_search: 1,
|
||||
common_app_is_enable_answer: 1,
|
||||
common_app_is_header_nav_fixed: 0,
|
||||
load_status: 0,
|
||||
},
|
||||
|
||||
@ -44,6 +45,7 @@ Page({
|
||||
common_shop_notice: data.common_shop_notice || null,
|
||||
common_app_is_enable_search: data.common_app_is_enable_search,
|
||||
common_app_is_enable_answer: data.common_app_is_enable_answer,
|
||||
common_app_is_header_nav_fixed: data.common_app_is_header_nav_fixed,
|
||||
data_list_loding_status: data.data_list.length == 0 ? 0 : 3,
|
||||
data_bottom_line_status: true,
|
||||
});
|
||||
|
@ -1,5 +1,6 @@
|
||||
<!-- 搜索 -->
|
||||
<view wx:if="{{load_status == 1 && common_app_is_enable_search == 1}}" class="search wh-auto">
|
||||
<view wx:if="{{common_app_is_header_nav_fixed == 1}}" class="search-fixed-seat"></view>
|
||||
<view wx:if="{{load_status == 1 && common_app_is_enable_search == 1}}" class="search wh-auto {{common_app_is_header_nav_fixed == 1 ? 'search-fixed' : ''}}">
|
||||
<view class="search-content bg-white oh">
|
||||
<icon type="search" size="16" />
|
||||
<input type="text" confirm-type="search" placeholder="其实搜索很简单^_^!" class="wh-auto cr-888" bindconfirm="search_input_event" confirm-type="search" />
|
||||
|
@ -26,6 +26,19 @@
|
||||
line-height: 70rpx;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导航固定
|
||||
*/
|
||||
.search-fixed {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
.search-fixed-seat {
|
||||
padding-top: 110rpx;
|
||||
}
|
||||
|
||||
/**
|
||||
* 楼层数据
|
||||
*/
|
||||
|
@ -102,13 +102,12 @@ color: #F5F5F2;font-size: 12px;cursor:pointer;border-radius:0px 0px; position: a
|
||||
|
||||
@media only screen and (min-width: 640px) {
|
||||
.am-container {padding-left:0px;padding-right:0px ;}
|
||||
.nav-search{background: none;}
|
||||
.nav-search{background: #fff; margin: 20px 0 5px 0;}
|
||||
.header { display:block;height: 30px;}
|
||||
.top-nav-left{ float:left;}
|
||||
.top-nav-left .top-nav-items, .top-nav-right .top-nav-items { padding: 0px 8px; height: 30px; line-height: 30px; }
|
||||
.top-nav-right {position: absolute; top: 0; right: 0; }
|
||||
.top-nav-right .top-nav-items {float: left;}
|
||||
|
||||
|
||||
.nav-search .logo-big{ float:left;height:40px;width:135px; margin:0px auto; margin-left:5px; margin-right: 5px;}
|
||||
.nav-search .logo-big img{width:100%;}
|
||||
@ -116,7 +115,6 @@ color: #F5F5F2;font-size: 12px;cursor:pointer;border-radius:0px 0px; position: a
|
||||
.search-bar input {width: 79%;height:30px;}
|
||||
.classified{display:none;}
|
||||
.mobile-navigation{display:none;}
|
||||
.nav-search{ position:relative;top:0px;z-index:0;margin-bottom: 5px;margin-top: 20px;}
|
||||
#ai-topsearch{ font-size:14px;height: 30px;line-height: 18px; font-weight: 500; width: 20%; }
|
||||
|
||||
/*底部*/
|
||||
@ -180,9 +178,9 @@ color: #F5F5F2;font-size: 12px;cursor:pointer;border-radius:0px 0px; position: a
|
||||
@media only screen and (min-width: 1025px) {
|
||||
.am-container { padding-left:0rem;padding-right:0rem;max-width: 1000px;}
|
||||
.mui-mbar-tabs{ display:block;}
|
||||
.nav-search{padding-left:0px; max-width:1000px; margin:0px auto;padding-top: 20px; height: 100px;}
|
||||
.nav-search{padding-top: 20px; height: 100px;}
|
||||
.nav-search .logo-big { display: -webkit-inline-box; float:left;height:60px; width:220px; margin:0px;}
|
||||
.search-bar{margin:auto; width: 50%;padding-left: 10%;}
|
||||
.search-bar{margin:auto; width: 50%;padding-left: 15%;}
|
||||
.shopMain{margin:0px 0px 0px 5px;}
|
||||
.shopCon li{width:20%;padding:10px;}
|
||||
.tip{display:block;}
|
||||
@ -194,7 +192,7 @@ color: #F5F5F2;font-size: 12px;cursor:pointer;border-radius:0px 0px; position: a
|
||||
|
||||
|
||||
@media only screen and (min-width: 1260px) {
|
||||
.am-container, .nav-search, .footer, .nav-table {padding-left:0rem;padding-right:0rem;max-width: 1200px;}
|
||||
.am-container, .footer, .nav-table {padding-left:0rem;padding-right:0rem;max-width: 1200px;}
|
||||
.footer{margin: auto;}
|
||||
|
||||
/*导航*/
|
||||
|
Loading…
Reference in New Issue
Block a user