feat/task1-c-wallet
gongfuxiang 2018-10-11 01:41:55 +08:00
parent 38b1a1b74c
commit adf8d404b2
19 changed files with 119 additions and 132 deletions

View File

@ -124,6 +124,10 @@
</notempty>
</div>
<!-- nav start -->
<include file="Public/Nav" />
<!-- nav end -->
<!-- footer start -->
<include file="Public/Footer" />
<!-- footer end -->

View File

@ -49,6 +49,10 @@
</notempty>
</div>
<!-- nav start -->
<include file="Public/Nav" />
<!-- nav end -->
<!-- footer start -->
<include file="Public/Footer" />
<!-- footer end -->

View File

@ -113,89 +113,87 @@
</div>
<!-- 主内容 -->
<div class="shopMainbg">
<div class="shopMain" id="shopmain">
<!-- 楼层 -->
<if condition="!empty($goods_floor_list)">
<foreach name="goods_floor_list" item="floor">
<if condition="isset($floor['is_home_recommended']) and $floor['is_home_recommended'] eq 1">
<div id="floor{{$key+1}}">
<div class="am-container">
<div class="items-nav-title">
<h4>{{$floor.name}}</h4>
<h3>{{$floor.vice_name}}</h3>
<div class="today-brands ">
<if condition="!empty($floor['items'])">
<foreach name="floor.items" key="key" item="category">
<if condition="!empty($category['items'])">
<foreach name="category.items" key="keys" item="categorys">
<if condition="$key lt 6 and $keys eq 0 and isset($categorys['is_home_recommended']) and $categorys['is_home_recommended'] eq 1">
<a href="{{:U('Home/Search/Index', ['category_id'=>$categorys['id']])}}">{{$categorys.name}}</a>
</if>
</foreach>
</if>
</foreach>
</if>
</div>
<span class="more">
<a href="{{:U('Home/Search/Index', ['category_id'=>$floor['id']])}}">更多<i class="am-icon-angle-right" style="padding-left:10px ;" ></i></a>
</span>
<div class="home-floor">
<!-- 楼层 -->
<if condition="!empty($goods_floor_list)">
<foreach name="goods_floor_list" item="floor">
<if condition="isset($floor['is_home_recommended']) and $floor['is_home_recommended'] eq 1">
<div id="floor{{$key+1}}">
<div class="am-container">
<div class="items-nav-title">
<h4>{{$floor.name}}</h4>
<h3>{{$floor.vice_name}}</h3>
<div class="today-brands ">
<if condition="!empty($floor['items'])">
<foreach name="floor.items" key="key" item="category">
<if condition="!empty($category['items'])">
<foreach name="category.items" key="keys" item="categorys">
<if condition="$key lt 6 and $keys eq 0 and isset($categorys['is_home_recommended']) and $categorys['is_home_recommended'] eq 1">
<a href="{{:U('Home/Search/Index', ['category_id'=>$categorys['id']])}}">{{$categorys.name}}</a>
</if>
</foreach>
</if>
</foreach>
</if>
</div>
</div>
<div class="am-g am-g-fixed flood" <if condition="!empty($floor['bg_color'])">style="background-color:{{$floor.bg_color}};"<else />style="background-color:#eaeaea;"</if>>
<div class="am-u-sm-5 am-u-md-4 text-one list" >
<div class="word">
<if condition="!empty($floor['items'])">
<foreach name="floor.items" item="category">
<if condition="$key lt 6 and isset($category['is_home_recommended']) and $category['is_home_recommended'] eq 1">
<a href="{{:U('Home/Search/Index', ['category_id'=>$category['id']])}}" class="outer">
<span class="inner">
<b class="text">{{:mb_substr($category['name'], 0, 4, 'utf-8')}}</b>
</span>
</a>
</if>
</foreach>
</if>
</div>
<a href="{{:U('Home/Search/Index', ['category_id'=>$floor['id']])}}">
<div class="outer-con">
<div class="describe">{{$floor.describe}}</div>
</div>
<if condition="!empty($floor['big_images'])">
<img src="{{$floor.big_images}}" />
</if>
</a>
<div class="triangle-topright"></div>
</div>
<if condition="!empty($floor.goods)">
<foreach name="floor.goods" item="goods">
<div class="goods-items <if condition="in_array($key, [0,1])">am-u-sm-7 am-u-md-4 text-two<else />am-u-sm-6 am-u-md-2 text-three</if> <if condition="in_array($key, [0,3])">sug</if> <if condition="in_array($key, [2,5])">big</if> <if condition="$key eq 5">last</if>">
<div class="outer-con">
<div class="goods-title ellipsis">
<a href="{{$goods['goods_url']}}" <notempty name="goods.title_color">style="color:{{$goods.title_color}};"</notempty>>{{$goods.title}}</a>
</div>
<div class="price">¥{{$goods.price}}</div>
</div>
<a href="{{$goods['goods_url']}}">
<img src="{{$goods.home_recommended_images}}" />
</a>
</div>
</foreach>
</if>
<span class="more">
<a href="{{:U('Home/Search/Index', ['category_id'=>$floor['id']])}}">更多<i class="am-icon-angle-right" style="padding-left:10px ;" ></i></a>
</span>
</div>
</div>
</if>
</foreach>
</if>
</div>
</div>
<div class="am-g am-g-fixed flood" <if condition="!empty($floor['bg_color'])">style="background-color:{{$floor.bg_color}};"<else />style="background-color:#eaeaea;"</if>>
<div class="am-u-sm-5 am-u-md-4 text-one list" >
<div class="word">
<if condition="!empty($floor['items'])">
<foreach name="floor.items" item="category">
<if condition="$key lt 6 and isset($category['is_home_recommended']) and $category['is_home_recommended'] eq 1">
<a href="{{:U('Home/Search/Index', ['category_id'=>$category['id']])}}" class="outer">
<span class="inner">
<b class="text">{{:mb_substr($category['name'], 0, 4, 'utf-8')}}</b>
</span>
</a>
</if>
</foreach>
</if>
</div>
<a href="{{:U('Home/Search/Index', ['category_id'=>$floor['id']])}}">
<div class="outer-con">
<div class="describe">{{$floor.describe}}</div>
</div>
<if condition="!empty($floor['big_images'])">
<img src="{{$floor.big_images}}" />
</if>
</a>
<div class="triangle-topright"></div>
</div>
<!-- footer start -->
<include file="Public/Footer" />
<!-- footer end -->
<if condition="!empty($floor.goods)">
<foreach name="floor.goods" item="goods">
<div class="goods-items <if condition="in_array($key, [0,1])">am-u-sm-7 am-u-md-4 text-two<else />am-u-sm-6 am-u-md-2 text-three</if> <if condition="in_array($key, [0,3])">sug</if> <if condition="in_array($key, [2,5])">big</if> <if condition="$key eq 5">last</if>">
<div class="outer-con">
<div class="goods-title ellipsis">
<a href="{{$goods['goods_url']}}" <notempty name="goods.title_color">style="color:{{$goods.title_color}};"</notempty>>{{$goods.title}}</a>
</div>
<div class="price">¥{{$goods.price}}</div>
</div>
<a href="{{$goods['goods_url']}}">
<img src="{{$goods.home_recommended_images}}" />
</a>
</div>
</foreach>
</if>
</div>
</div>
</if>
</foreach>
</if>
</div>
<!-- nav start -->
<include file="Public/Nav" />
<!-- nav end -->
<!-- nav end -->
<!-- footer start -->
<include file="Public/Footer" />
<!-- footer end -->

View File

@ -1,11 +0,0 @@
<!-- delete html start -->
<div class="am-modal am-modal-confirm" tabindex="-1" id="common-confirm-delete">
<div class="am-modal-dialog am-radius">
<div class="am-modal-bd">{{:L('common_delete_tips')}}</div>
<div class="am-modal-footer">
<span class="am-modal-btn" data-am-modal-cancel>{{:L('common_operation_cancel')}}</span>
<span class="am-modal-btn" data-am-modal-confirm>{{:L('common_operation_confirm')}}</span>
</div>
</div>
</div>
<!-- delete html end -->

View File

@ -1,14 +1,14 @@
<div class="navCir">
<li class="active">
<div class="mobile-navigation">
<li <if condition="strtolower(CONTROLLER_NAME.ACTION_NAME) eq 'indexindex'">class="active"</if>>
<a href="{{:__MY_URL__}}"><i class="am-icon-home"></i>首页</a>
</li>
<li>
<li <if condition="strtolower(CONTROLLER_NAME.ACTION_NAME) eq 'categoryindex'">class="active"</if>>
<a href="{{:U('Home/Category/Index')}}"><i class="am-icon-list"></i>分类</a>
</li>
<li>
<li <if condition="strtolower(CONTROLLER_NAME.ACTION_NAME) eq 'cartindex'">class="active"</if>>
<a <if condition="empty($user)">href="javascript:;" class="login-event"<else /> href="{{:U('Home/Cart/Index')}}"</if>><i class="am-icon-shopping-basket"></i>购物车</a>
</li>
<li>
<li <if condition="strtolower(CONTROLLER_NAME.ACTION_NAME) eq 'userindex'">class="active"</if>>
<a <if condition="empty($user)">href="javascript:;" class="login-event"<else /> href="{{:U('Home/User/Index')}}"</if>><i class="am-icon-user"></i>我的</a>
</li>
</div>

View File

@ -1 +0,0 @@
<button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#doc-topbar-collapse'}"><span class="am-sr-only">{{:L('nav_switch_text')}}</span> <span class="am-icon-bars"></span></button>

View File

@ -1,25 +0,0 @@
<div class="am-topbar-right">
<empty name="user">
<if condition="MyC('home_user_login_state') eq 1">
<a href="{{:U('Home/User/LoginInfo')}}" class="am-btn am-btn-secondary am-topbar-btn am-btn-sm am-radius"><span class="am-icon-user"></span> {{:L('common_login_text')}}</a>
</if>
<if condition="in_array('sms', MyC('home_user_reg_state'))">
<a href="{{:U('Home/User/RegInfo')}}" class="am-btn am-btn-success am-topbar-btn am-btn-sm am-radius user-nav-reg-submit"><span class="am-icon-pencil"></span> {{:L('common_reg_text')}}</a>
<elseif condition="in_array('email', MyC('home_user_reg_state'))" />
<a href="{{:U('Home/User/EmailRegInfo')}}" class="am-btn am-btn-success am-topbar-btn am-btn-sm am-radius user-nav-reg-submit"><span class="am-icon-pencil"></span> {{:L('common_reg_text')}}</a>
</if>
<else />
<div class="am-dropdown user-header-nav" data-am-dropdown="{boundary: '.am-topbar'}">
<button class="am-btn am-btn-secondary am-topbar-btn am-btn-sm am-dropdown-toggle am-radius" data-am-dropdown-toggle><if condition="empty($user['nickname'])">{{:L('common_user_home_text')}}<else />{{$user.nickname}}</if> <span class="am-icon-caret-down"></span></button>
<ul class="am-dropdown-content am-radius">
<foreach name="user_nav_menu" item="v">
<if condition="$v['is_show'] eq 1">
<li <if condition="(strtolower(CONTROLLER_NAME.ACTION_NAME) eq strtolower($v['control'].$v['action'])) or (isset(L('user_left_menu_hidden_active')[strtolower(CONTROLLER_NAME.ACTION_NAME)]) and strtolower(L('user_left_menu_hidden_active')[strtolower(CONTROLLER_NAME.ACTION_NAME)]) eq strtolower($v['control'].$v['action']))">class="am-active"</if>>
<a href="{{:U('Home/'.$v['control'].'/'.$v['action'])}}"><if condition="!empty($v['icon'])"><i class="{{$v.icon}}"></i></if> {{$v.name}}</a>
</li>
</if>
</foreach>
</ul>
</div>
</empty>
</div>

View File

@ -28,6 +28,10 @@
<!-- content end -->
</div>
<!-- nav start -->
<include file="Public/Nav" />
<!-- nav end -->
<!-- footer start -->
<include file="Public/Footer" />
<!-- footer end -->

View File

@ -86,6 +86,10 @@ class BuyService
} else {
$data['upd_time'] = time();
$data['stock'] += $temp['stock'];
if($data['stock'] > $goods['inventory'])
{
$data['stock'] = $goods['inventory'];
}
if($m->where($where)->save($data))
{
return DataReturn(L('common_join_success'), 0, self::CartTotal($params));

View File

@ -46,7 +46,7 @@ strong.total-price-content, .selected-tips strong, .nav-total-price { color: #d2
.nav-right { width: 70%; }
.cart-nav, .nav-left, .nav-right { overflow: hidden; }
.nav-right .nav-total-price { display: block;
width: calc(100% - 120px); height: 30px; -o-text-overflow: ellipsis; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
width: calc(100% - 122px); height: 30px; -o-text-overflow: ellipsis; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.cart-nav .separate-submit { float: right; width: 80px; }
.wap-base { padding-left: 20px; }
@ -54,4 +54,6 @@ strong.total-price-content, .selected-tips strong, .nav-total-price { color: #d2
.goods-detail img { width: 40px; height: 40px; }
.goods-base { margin-left: 45px; }
.stock-tag { width: 85px; }
.am-footer { padding-bottom: 55px; }
}

View File

@ -10,4 +10,7 @@
}
@media only screen and (max-width:1025px) {
.am-accordion-gapped { margin: 0 5px; }
}
@media only screen and (max-width:640px) {
.am-footer { padding-bottom: 55px; }
}

View File

@ -107,10 +107,11 @@ color: #F5F5F2;font-size: 14px;cursor:pointer;border-radius:0px 0px ;}
.tip{ display:none}
.navCir{position: fixed;bottom:0px ;width: 100%;z-index: 999;background:#fff ;}
.navCir li{width: 25%;padding:5px ;background:#fff ;border-top:1px solid #f5f5f5 ;float: left;text-align: center;font-size: 14px;}
.navCir li i{display: block;font-size: 18px;}
.navCir li.active a{color:#d2364c ;}
.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;}
.mobile-navigation li a { text-decoration: none; }
.mobile-navigation li i{display: block;font-size: 16px;}
.mobile-navigation li.active a{color:#d2364c ;}
@media only screen and (max-width: 640px) {
@ -135,7 +136,7 @@ color: #F5F5F2;font-size: 14px;cursor:pointer;border-radius:0px 0px ;}
#ai-topsearch {height: 36px;}
.search-bar input {width: 80%;height:36px;}
.classified{display:none;}
.navCir{display:none;}
.mobile-navigation{display:none;}
.nav-search{ position:relative;top:0px;z-index:0;margin-bottom: 5px;margin-top: 5px;}
#ai-topsearch{ font-size:18px;height: 36px;}
/*底部*/
@ -179,7 +180,7 @@ color: #F5F5F2;font-size: 14px;cursor:pointer;border-radius:0px 0px ;}
.nav-cont li a {font-size: 16px;color: #333;line-height: 36px;margin-left: -1px;padding: 0 25px;text-decoration: none;font-weight: 700;display: inline-block;vertical-align: middle;}
.nav-cont li a:hover { color:#d2364c; }
.nav-cont .nav-extra{position: absolute;right:0px ;top:6px;font-size: 16px;line-height:33px;height:33px ;width:120px;text-align:center;background: #e1363f;cursor: pointer;}
.nav-cont .nav-extra{position: absolute;right:0px ;top:6px;font-size: 14px;line-height:33px;height:33px ;width:110px;text-align:center;background: #e1363f;cursor: pointer;}
.nav-cont .nav-extra .nav-user{background:#e0313b; width: 33px;height: 33px;border-radius: 33px;position: absolute;left:-28px;z-index: 2;padding: 1px;overflow: hidden;}
.nav-cont .nav-extra b{display:block;position: absolute;width: 40px;height: 40px;border-radius:45px;z-index: 1;left: -31px;top: -4px;background: #fff;}
.nav-cont .nav-extra .am-icon-angle-right { margin-left: 5px; }
@ -651,7 +652,7 @@ background:url(../Images/ibar_sprites.png) no-repeat;background-position:0px -23
/**
*
*/
.user-menu {position:fixed;z-index:10;bottom:30px;right:20px;}
.user-menu {position:fixed;z-index:10;bottom:70px;right:10px;}
.user-sidebar {width:145px;min-height:100%;float:left;}
.user-sidebar .am-active {z-index:1600;}
.user-sidebar .am-active a, .user-sidebar-list li a:hover {background:#fff1f5; text-decoration: none; color: #d2364c; }

View File

@ -146,7 +146,7 @@ text-align: center;float:none}
.items-nav-title{background: #fff;}
.hmtop{background: #fff;}
.am-container {padding-left:0px;padding-right:0px ;}
.shopMainbg{width:100%;background:#fff;overflow:visible;}
.home-floor{width:100%;background:#fff;overflow:visible;}
/*主题布局*/
.pro-title{ font-size:14px;}

View File

@ -0,0 +1,3 @@
@media only screen and (max-width:640px) {
.am-footer { padding-bottom: 55px; }
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

View File

@ -121,10 +121,11 @@ $(function()
function cart_nav_pop()
{
var scroll = $(document).scrollTop();
var location = scroll+$(window).height();
var location = scroll+$(window).height()-65;
var bottom = ($(window).width() < 640) ? '49px' : '0';
if(location < nav_top)
{
$('.cart-nav').css({"position":"fixed", "bottom":0, "width":$('.cart-content').width()+"px", "z-index":1000});
$('.cart-nav').css({"position":"fixed", "bottom":bottom, "width":$('.cart-content').width()+"px", "z-index":1000});
} else {
$('.cart-nav').css({"position":"relative", "bottom":0, "z-index":0, "width":"100%"});
}