mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-11-30 02:49:03 +08:00
buy
This commit is contained in:
parent
b859b63114
commit
dd26728a07
@ -236,16 +236,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form action="{{:U('Home/Buy/Index')}}" method="post" class="nav-buy">
|
||||
<form class="am-form form-validation nav-buy" action="{{:U('Home/Buy/Add')}}" method="post" class="nav-buy" request-type="ajax-fun" request-value="BuySubmitBack">
|
||||
<input type="hidden" name="goods_id" value="<if condition="isset($params['goods_id'])">{{$params.goods_id}}<else />0</if>" />
|
||||
<input type="hidden" name="buy_type" value="<if condition="isset($params['buy_type'])">{{$params.buy_type}}<else />goods</if>" />
|
||||
<input type="hidden" name="stock" value="<if condition="isset($params['stock'])">{{$params.stock}}<else />1</if>" />
|
||||
<input type="hidden" name="attr" value="<if condition="isset($params['attr'])">{{$params.attr}}</if>" />
|
||||
<input type="hidden" name="ids" value="<if condition="isset($params['ids'])">{{$params.ids}}</if>" />
|
||||
<input type="hidden" name="address_id" value="0" />
|
||||
<input type="hidden" name="express_id" value="0" />
|
||||
<input type="hidden" name="payment_id" value="0" />
|
||||
<div class="go-btn-wrap">
|
||||
<button type="submit" class="btn-go" title="点击此按钮,提交订单">提交订单</button>
|
||||
<button type="submit" class="btn-go btn-loading-example" title="点击此按钮,提交订单" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">提交订单</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -133,7 +133,7 @@
|
||||
<dd>
|
||||
<div class="am-input-group am-input-group-sm number-tag">
|
||||
<button class="am-input-group-label" id="min" type="button">-</button>
|
||||
<input type="text" class="am-form-field" value="1" id="text_box" />
|
||||
<input type="number" class="am-form-field" value="1" id="text_box" min="1" max="{{$goods.inventory}}" />
|
||||
<button class="am-input-group-label" id="add" type="button">+</button>
|
||||
</div>
|
||||
<span class="tb-hidden stock-tips">库存<span class="stock">{{$goods.inventory}}</span>{{$goods.inventory_unit}}</span>
|
||||
|
@ -44,7 +44,7 @@
|
||||
#common-prompt.am-alert-success { background-color: #f0f9eb; border-color: #e1f3d8; color: #67c23a; box-shadow: 0 2px 4px #efffe5, 0 0 6px rgba(0, 0, 0, 0); }
|
||||
#common-prompt p { text-align: left; font-size: 12px; }
|
||||
#common-prompt .am-close { line-height: 20px; }
|
||||
#common-prompt.prompt-center { top: 0; margin-top: 25%; }
|
||||
#common-prompt.prompt-center { top: calc(50% - 15px); }
|
||||
#common-prompt.prompt-top { top: 0; }
|
||||
#common-prompt.prompt-bottom { bottom: 0; }
|
||||
|
||||
|
@ -61,8 +61,7 @@ ul.address-list, .business-item ul { overflow: hidden; }
|
||||
.mobile-address ul.address-list li .address-left { width: 100%; }
|
||||
.mobile-address ul.address-list li .address-right { display: none; }
|
||||
|
||||
@media only screen and (min-width:640px)
|
||||
{
|
||||
@media only screen and (min-width:640px) {
|
||||
/*地址操作*/
|
||||
.address { padding: 0 1px 0 5px; }
|
||||
.address .control { margin-bottom: 10px; }
|
||||
@ -112,8 +111,7 @@ ul.address-list, .business-item ul { overflow: hidden; }
|
||||
.address-right .am-icon-angle-right { display: none; }
|
||||
}
|
||||
|
||||
@media only screen and (min-width:1025px)
|
||||
{
|
||||
@media only screen and (min-width:1025px) {
|
||||
.link-list{ margin:0; }
|
||||
ul.address-list li { width: calc(25% - 8px); }
|
||||
ul.address-list li:nth-child(4n) { margin-right: 0; }
|
||||
@ -129,8 +127,7 @@ ul.address-list, .business-item ul { overflow: hidden; }
|
||||
.buy-point-discharge { padding: 10px 0px; }
|
||||
}
|
||||
|
||||
@media only screen and (max-width:640px)
|
||||
{
|
||||
@media only screen and (max-width:640px) {
|
||||
.cart-content table tr .base { width: 100%; }
|
||||
|
||||
.address { margin-top: 10px; }
|
||||
@ -166,6 +163,7 @@ strong.total-price-content { color: #d2364c; font-size: 16px; }
|
||||
.am-table { margin-bottom: 10px; }
|
||||
.am-table > tbody > tr > td { border-top: 1px solid #F5F5F5; }
|
||||
.am-table > thead > tr > th { border-bottom: 1px solid #f7f7f7; }
|
||||
|
||||
@media only screen and (min-width:640px) {
|
||||
.cart-content table tr .base { width: 40%; }
|
||||
.cart-content table tr .price { width: 20%; }
|
||||
|
@ -111,13 +111,11 @@ color: #F5F5F2;font-size: 14px;cursor:pointer;border-radius:0px 0px ;}
|
||||
.navCir li.active a{color:#d2364c ;}
|
||||
|
||||
|
||||
@media only screen and (max-width: 640px)
|
||||
{
|
||||
@media only screen and (max-width: 640px) {
|
||||
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 640px)
|
||||
{
|
||||
@media only screen and (min-width: 640px) {
|
||||
.am-container {padding-left:0px;padding-right:0px ;}
|
||||
.shop-nav {position: relative;}
|
||||
|
||||
@ -151,8 +149,7 @@ color: #F5F5F2;font-size: 14px;cursor:pointer;border-radius:0px 0px ;}
|
||||
.am-nav-tabs > li span{font-size:16px;}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1025px)
|
||||
{
|
||||
@media only screen and (min-width: 1025px) {
|
||||
.am-container { padding-left:0rem;padding-right:0rem;max-width: 1000px;}
|
||||
.shop-nav{margin:0px;border-bottom: 2px solid #d2364c; height: 49px;}
|
||||
|
||||
@ -447,8 +444,7 @@ background:url(../Images/ibar_sprites.png) no-repeat;background-position:0px -23
|
||||
* 框架覆盖
|
||||
*/
|
||||
/* 手机模式下 */
|
||||
@media only screen and (max-width:640px)
|
||||
{
|
||||
@media only screen and (max-width:640px) {
|
||||
.am-container {
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
|
@ -11,7 +11,7 @@ input{font-size:12px;font-size:100%;outline:none;line-height:normal;color:#444;}
|
||||
.buy-event,.item-props-can{cursor: pointer;}
|
||||
|
||||
.theme-popover-mask{z-index:1000;position:fixed;left:0;top:0;width:100%;height:100%;background:#333;opacity:0.5;filter:alpha(opacity=50);-moz-opacity:0.5;display:none;}
|
||||
.theme-popover{z-index:10000009;position:fixed;bottom:0;left:0;width:100%;display:none;}
|
||||
.theme-popover{z-index:1001;position:fixed;bottom:0;left:0;width:100%;display:none;}
|
||||
.theme-poptit{padding:12px;position:relative;overflow: hidden;background:#fff ;height:80px ;}
|
||||
.theme-poptit .close{float:right;color:#999;padding:5px;margin:-2px -5px -5px;font:bold 14px/14px simsun;text-shadow:0 1px 0 #ddd}
|
||||
.theme-poptit .close:hover{color:#444;}
|
||||
@ -56,8 +56,7 @@ input{font-size:12px;font-size:100%;outline:none;line-height:normal;color:#444;}
|
||||
.text-active { color: #cf2915 !important; }
|
||||
|
||||
|
||||
@media only screen and (min-width:640px)
|
||||
{
|
||||
@media only screen and (min-width:640px) {
|
||||
.theme-span{height:0px;background:#fff ;}
|
||||
.theme-popover{box-shadow:0 0 10px #666;position:fixed;top:20%;left:calc(50% - 130px);width:260px;bottom:auto;border:solid 6px #d3d3d3;border-radius:3px;}
|
||||
.theme-poptit{display: none;}
|
||||
@ -95,8 +94,7 @@ input{font-size:12px;font-size:100%;outline:none;line-height:normal;color:#444;}
|
||||
.buy-nav .buy-nav-opt .favor-submit { width: 60px; border: 0; margin-top: 5px; }
|
||||
}
|
||||
|
||||
@media only screen and (min-width:1025px)
|
||||
{
|
||||
@media only screen and (min-width:1025px) {
|
||||
i.buy-event{display: none;}
|
||||
.theme-signin-left{padding-top:15px ;float: left;max-width:none;padding-bottom:0px ;}
|
||||
.theme-signin-right{float: left;display:block;overflow: hidden;padding: 10px;}
|
||||
@ -279,8 +277,7 @@ li.am-comment{ width:100%}
|
||||
/* 文字提示 */
|
||||
.shelves-tips { color: #FF5722; margin: 5px 0; font-size: 14px; }
|
||||
|
||||
@media only screen and (min-width:640px)
|
||||
{
|
||||
@media only screen and (min-width:640px) {
|
||||
/*导航固定*/
|
||||
ul.am-tabs-nav.am-nav.am-nav-tabs {margin-right:10px ;margin-left: 10px;width: auto;}
|
||||
.scoll{float: left;width: calc(45% - 10px);max-width:360px;padding-right:20px; }
|
||||
@ -333,8 +330,7 @@ li.am-comment{ width:100%}
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (min-width:1025px)
|
||||
{
|
||||
@media only screen and (min-width:1025px) {
|
||||
/*放大镜*/
|
||||
/* box */
|
||||
.box { width:700px; margin:0px auto; }
|
||||
@ -408,10 +404,8 @@ li.am-comment{ width:100%}
|
||||
.like li:nth-of-type(3n) { border-right: 1px solid #eee; }
|
||||
.like li:nth-child(4) { border-top: 0px; }
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (min-width:1260px)
|
||||
{
|
||||
@media only screen and (min-width:1260px) {
|
||||
.item-inform ,.match,.introduce-main,.am-breadcrumb-slash{max-width: 1200px;}
|
||||
.clearfix-left {width: 400px;}
|
||||
/*放大镜*/
|
||||
@ -424,15 +418,13 @@ li.am-comment{ width:100%}
|
||||
|
||||
|
||||
/* 小于1025 */
|
||||
@media only screen and (max-width:1025px)
|
||||
{
|
||||
@media only screen and (max-width:1025px) {
|
||||
ul.am-tabs-nav.am-nav.am-nav-tabs { width:100% !important; left: 0px !important; }
|
||||
.goods-detail { padding: 10px; }
|
||||
}
|
||||
|
||||
/* 手机模式下 */
|
||||
@media only screen and (max-width:640px)
|
||||
{
|
||||
@media only screen and (max-width:640px) {
|
||||
.nav-search { display: none; }
|
||||
.goods-detail { padding: 0px; }
|
||||
.detail-title, .tb-detail-price, .detail-attr { padding: 0px 5px; }
|
||||
|
@ -218,8 +218,7 @@ text-align: center;float:none}
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (min-width: 1025px)
|
||||
{
|
||||
@media only screen and (min-width: 1025px) {
|
||||
.small-nav { display:none;}
|
||||
.am-g-fixed{max-width:1000px;}
|
||||
.flood li{width:20%;}
|
||||
|
@ -1,8 +1,4 @@
|
||||
.my-content { padding: 15px 10px; }
|
||||
.region-linkage .chosen-select { display: -webkit-inline-box; width: calc(33.3% - 3px) !important; }
|
||||
.region-linkage .chosen-select .chosen-single { width: 100%; }
|
||||
|
||||
#map { width: 100%; height: 260px; }
|
||||
@media only screen and (max-width:640px) {
|
||||
#map { width: 100%; height: 160px; }
|
||||
}
|
||||
#map { width: 100%; height: 250px; }
|
@ -64,18 +64,18 @@ $(function()
|
||||
$.AMUI.progress.done();
|
||||
if(result.code == 0)
|
||||
{
|
||||
Prompt(result.msg, 'success');
|
||||
PromptCenter(result.msg, 'success');
|
||||
|
||||
// 计算选择的商品总数和总价
|
||||
cart_base_total();
|
||||
} else {
|
||||
Prompt(result.msg);
|
||||
PromptCenter(result.msg);
|
||||
}
|
||||
},
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt('网络异常错误');
|
||||
PromptCenter('网络异常错误');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -152,7 +152,7 @@ $(function()
|
||||
var ids = $(this).parents('form').find('input[name="ids"]').val() || 0;
|
||||
if(ids == 0)
|
||||
{
|
||||
Prompt('请选择商品');
|
||||
PromptCenter('请选择商品');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
@ -212,16 +212,32 @@ $(function() {
|
||||
} else {
|
||||
$this.removeClass('text-active');
|
||||
}
|
||||
PromptCenter(result.msg, 'success');
|
||||
|
||||
if($(window).width() < 640)
|
||||
{
|
||||
PromptBottom(result.msg, 'success', null, 50);
|
||||
} else {
|
||||
PromptCenter(result.msg, 'success');
|
||||
}
|
||||
} else {
|
||||
PromptCenter(result.msg);
|
||||
if($(window).width() < 640)
|
||||
{
|
||||
PromptBottom(result.msg, null, null, 50);
|
||||
} else {
|
||||
PromptCenter(result.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(xhr, type)
|
||||
{
|
||||
poptit_close();
|
||||
$.AMUI.progress.done();
|
||||
PromptCenter('网络异常错误');
|
||||
if($(window).width() < 640)
|
||||
{
|
||||
PromptBottom('网络异常错误', null, null, 50);
|
||||
} else {
|
||||
PromptCenter('网络异常错误');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user