diff --git a/alipay/pages/buy/buy.js b/alipay/pages/buy/buy.js index 4ce91005b..e8a8402d0 100755 --- a/alipay/pages/buy/buy.js +++ b/alipay/pages/buy/buy.js @@ -87,11 +87,12 @@ Page({ this.setData({ goods_list: data.goods_list, total_price: data.base.total_price, - payment_list: data.payment_list || [], extension_list: data.extension_list || [], data_list_loding_status: 3, common_order_is_booking: data.common_order_is_booking || 0, }); + + // 地址 if (this.data.address == null || this.data.address_id == 0) { if((data.base.address || null) != null) { this.setData({ @@ -100,6 +101,9 @@ Page({ }); } } + + // 支付方式 + this.payment_list_data(data.payment_list); } } else { this.setData({ @@ -190,19 +194,22 @@ Page({ // 支付方式选择 payment_event(e) { - var payment_id = e.currentTarget.dataset.value || 0; - var temp_payment_list = this.data.payment_list; - for(var i in temp_payment_list) { - if(temp_payment_list[i]['id'] == payment_id) { - temp_payment_list[i]['selected'] = 'selected'; - } else { - temp_payment_list[i]['selected'] = ''; + this.setData({ payment_id: e.target.dataset.value}); + this.payment_list_data(this.data.payment_list); + }, + + // 支付方式数据处理 + payment_list_data(data) { + if (this.data.payment_id != 0) { + for (var i in data) { + if (data[i]['id'] == this.data.payment_id) { + data[i]['selected'] = 'selected'; + } else { + data[i]['selected'] = ''; + } } } - this.setData({ - payment_id: payment_id, - payment_list: temp_payment_list - }); + this.setData({payment_list: data || []}); } }); diff --git a/alipay/pages/cart/cart.acss b/alipay/pages/cart/cart.acss index b6a71e18b..c78ace19a 100644 --- a/alipay/pages/cart/cart.acss +++ b/alipay/pages/cart/cart.acss @@ -45,27 +45,25 @@ position: absolute; right: 20rpx; top: 100rpx; -} -.number-content button -{ background: #eee; - height: 64rpx; - line-height: 64rpx; + border-radius: 2px; + border: 1px solid #eee; +} +.number-content .number-submit +{ + width: 80rpx; font-weight: bold; - color: #666; } .number-content input { width: 50px; - margin: 2rpx 10rpx 0 10rpx; - height: 60rpx; - line-height: 60rpx; - border-radius: 2px; } -.number-content button, +.number-content .number-submit, .number-content input { - border: 1px solid #ddd; padding: 0; + vertical-align: middle; + height: 60rpx; + line-height: 60rpx; } /** diff --git a/alipay/pages/cart/cart.axml b/alipay/pages/cart/cart.axml index ec07800b3..0ed4bfa24 100644 --- a/alipay/pages/cart/cart.axml +++ b/alipay/pages/cart/cart.axml @@ -22,10 +22,10 @@ - - - - + + - + + + diff --git a/alipay/pages/goods-detail/goods-detail.acss b/alipay/pages/goods-detail/goods-detail.acss index a62b777cf..b9edbe57e 100755 --- a/alipay/pages/goods-detail/goods-detail.acss +++ b/alipay/pages/goods-detail/goods-detail.acss @@ -52,33 +52,35 @@ } .goods-popup .goods-buy-number { margin-bottom: 20rpx; + position: relative; + height: 70rpx; } .goods-popup .goods-buy-number .title { line-height: 60rpx; } -.goods-popup .number-content button -{ - background: #eee; - height: 64rpx; - line-height: 64rpx; - font-weight: bold; - color: #666; -} .goods-popup .number-content { - width: calc(100% - 200rpx); + position: absolute; + right: 20rpx; + top: 0; + background: #eee; + border-radius: 2px; + border: 1px solid #eee; +} +.goods-popup .number-content .number-submit +{ + width: 80rpx; + font-weight: bold; } .goods-popup .number-content input { width: 50px; - margin: 2rpx 10rpx 0 10rpx; - height: 60rpx; - line-height: 60rpx; - border-radius: 2px; } -.goods-popup .number-content button, +.goods-popup .number-content .number-submit, .goods-popup .number-content input { - border: 1px solid #ddd; padding: 0; + vertical-align: middle; + height: 60rpx; + line-height: 60rpx; } .goods-detail-app .content-items view { diff --git a/alipay/pages/goods-detail/goods-detail.axml b/alipay/pages/goods-detail/goods-detail.axml index b18a1ddf9..7dca1417c 100755 --- a/alipay/pages/goods-detail/goods-detail.axml +++ b/alipay/pages/goods-detail/goods-detail.axml @@ -101,10 +101,10 @@ 购买数量 - - - - + + - + + + diff --git a/alipay/pages/index/index.axml b/alipay/pages/index/index.axml index f485b37b3..320ca2195 100755 --- a/alipay/pages/index/index.axml +++ b/alipay/pages/index/index.axml @@ -11,11 +11,15 @@ {{common_shop_notice}} - - + + + + + + + + - - @@ -62,5 +66,7 @@ - - \ No newline at end of file + + + + \ No newline at end of file diff --git a/alipay/pages/user/user.axml b/alipay/pages/user/user.axml index f1a052462..7290a3fd3 100755 --- a/alipay/pages/user/user.axml +++ b/alipay/pages/user/user.axml @@ -68,5 +68,4 @@ - +