diff --git a/extend/payment/QQ.php b/extend/payment/QQ.php index c92a11af7..13fbeff80 100644 --- a/extend/payment/QQ.php +++ b/extend/payment/QQ.php @@ -187,7 +187,7 @@ class QQ { return $this->PayHandleReturn($ret['data'], $result, $params); } - $msg = is_string($result) ? $result : (empty($result['return_msg']) ? '支付接口异常' : $result['return_msg']); + $msg = is_string($result) ? $result : (empty($result['retmsg']) ? (empty($result['return_msg']) ? '支付接口异常' : $result['return_msg']) : $result['retmsg']); if(!empty($result['err_code_des'])) { $msg .= '-'.$result['err_code_des']; diff --git a/sourcecode/alipay/app.js b/sourcecode/alipay/app.js index d0879b3ed..f1080f63b 100644 --- a/sourcecode/alipay/app.js +++ b/sourcecode/alipay/app.js @@ -680,8 +680,8 @@ App({ var is_show_cancel = (e.is_show_cancel == 0) ? false : true; var cancel_text = e.cancel_text || '取消'; var confirm_text = e.confirm_text || '确认'; - var cancel_color = e.cancel_color || ''; - var confirm_color = e.confirm_color || ''; + var cancel_color = e.cancel_color || '#000000'; + var confirm_color = e.confirm_color || '#576B95'; if(is_show_cancel) { diff --git a/sourcecode/alipay/components/popup/popup.axml b/sourcecode/alipay/components/popup/popup.axml index 0c0b545ac..c03720804 100755 --- a/sourcecode/alipay/components/popup/popup.axml +++ b/sourcecode/alipay/components/popup/popup.axml @@ -1,4 +1,4 @@ - + diff --git a/sourcecode/alipay/pages/buy/buy.axml b/sourcecode/alipay/pages/buy/buy.axml index 79b1f6398..58abf7400 100644 --- a/sourcecode/alipay/pages/buy/buy.axml +++ b/sourcecode/alipay/pages/buy/buy.axml @@ -121,7 +121,7 @@ - + @@ -133,7 +133,7 @@ - {{price_symbol}} + {{price_symbol}} {{item.coupon.discount_value}} {{item.coupon.type_unit}} {{item.coupon.desc}} diff --git a/sourcecode/alipay/pages/buy/buy.js b/sourcecode/alipay/pages/buy/buy.js index 31ff9d3f6..126916b10 100644 --- a/sourcecode/alipay/pages/buy/buy.js +++ b/sourcecode/alipay/pages/buy/buy.js @@ -129,7 +129,7 @@ Page({ var cupk = data.plugins_coupon_data[i]['warehouse_id']; if((data.plugins_coupon_data[i]['coupon_data']['coupon_choice'] || null) != null) { - plugins_choice_coupon_value[cupk] = data.plugins_coupon_data[i]['coupon_data']['coupon_choice']['desc']; + plugins_choice_coupon_value[cupk] = data.plugins_coupon_data[i]['coupon_data']['coupon_choice']['coupon']['desc']; } else { var coupon_count = (data.plugins_coupon_data[i]['coupon_data']['coupon_list'] || null) != null ? data.plugins_coupon_data[i]['coupon_data'].coupon_list.length : 0; plugins_choice_coupon_value[cupk] = (coupon_count > 0) ? '可选优惠劵' + coupon_count + '张' : '暂无可用优惠劵'; diff --git a/sourcecode/alipay/pages/cart/cart.js b/sourcecode/alipay/pages/cart/cart.js index 87b909e35..5cb5cd0cc 100644 --- a/sourcecode/alipay/pages/cart/cart.js +++ b/sourcecode/alipay/pages/cart/cart.js @@ -397,7 +397,7 @@ Page({ this.setData({ total_price: total_price.toFixed(2), buy_submit_disabled_status: (selected_count <= 0), - is_selected_all: (selected_count >= data_count), + is_selected_all: (selected_count > 0 && selected_count >= data_count), }); }, diff --git a/sourcecode/alipay/pages/extraction-address/extraction-address.axml b/sourcecode/alipay/pages/extraction-address/extraction-address.axml index 7bf93d5fe..8a3a9ec50 100644 --- a/sourcecode/alipay/pages/extraction-address/extraction-address.axml +++ b/sourcecode/alipay/pages/extraction-address/extraction-address.axml @@ -13,7 +13,7 @@ - + diff --git a/sourcecode/baidu/app.js b/sourcecode/baidu/app.js index 78c83e039..e44b2ab1d 100755 --- a/sourcecode/baidu/app.js +++ b/sourcecode/baidu/app.js @@ -606,8 +606,8 @@ App({ var is_show_cancel = (e.is_show_cancel == 0) ? false : true; var cancel_text = e.cancel_text || '取消'; var confirm_text = e.confirm_text || '确认'; - var cancel_color = e.cancel_color || ''; - var confirm_color = e.confirm_color || ''; + var cancel_color = e.cancel_color || '#000000'; + var confirm_color = e.confirm_color || '#576B95'; swan.showModal({ title: title, diff --git a/sourcecode/baidu/components/popup/popup.swan b/sourcecode/baidu/components/popup/popup.swan index 5f9eb0f02..7cd63a263 100755 --- a/sourcecode/baidu/components/popup/popup.swan +++ b/sourcecode/baidu/components/popup/popup.swan @@ -1,4 +1,4 @@ - + diff --git a/sourcecode/baidu/pages/buy/buy.js b/sourcecode/baidu/pages/buy/buy.js index 5e883655a..88a4cd2bf 100755 --- a/sourcecode/baidu/pages/buy/buy.js +++ b/sourcecode/baidu/pages/buy/buy.js @@ -106,7 +106,7 @@ Page({ for (var i in data.plugins_coupon_data) { var cupk = data.plugins_coupon_data[i]['warehouse_id']; if ((data.plugins_coupon_data[i]['coupon_data']['coupon_choice'] || null) != null) { - plugins_choice_coupon_value[cupk] = data.plugins_coupon_data[i]['coupon_data']['coupon_choice']['desc']; + plugins_choice_coupon_value[cupk] = data.plugins_coupon_data[i]['coupon_data']['coupon_choice']['coupon']['desc']; } else { var coupon_count = (data.plugins_coupon_data[i]['coupon_data']['coupon_list'] || null) != null ? data.plugins_coupon_data[i]['coupon_data'].coupon_list.length : 0; plugins_choice_coupon_value[cupk] = coupon_count > 0 ? '可选优惠劵' + coupon_count + '张' : '暂无可用优惠劵'; diff --git a/sourcecode/baidu/pages/buy/buy.swan b/sourcecode/baidu/pages/buy/buy.swan index e6e3b718e..b45129747 100755 --- a/sourcecode/baidu/pages/buy/buy.swan +++ b/sourcecode/baidu/pages/buy/buy.swan @@ -134,7 +134,7 @@ - {{price_symbol}} + {{price_symbol}} {{item.coupon.discount_value}} {{item.coupon.type_unit}} {{item.coupon.desc}} diff --git a/sourcecode/baidu/pages/cart/cart.js b/sourcecode/baidu/pages/cart/cart.js index 0e75198d3..38f382e7f 100755 --- a/sourcecode/baidu/pages/cart/cart.js +++ b/sourcecode/baidu/pages/cart/cart.js @@ -349,7 +349,7 @@ Page({ this.setData({ total_price: total_price.toFixed(2), buy_submit_disabled_status: (selected_count <= 0), - is_selected_all: (selected_count >= data_count), + is_selected_all: (selected_count > 0 && selected_count >= data_count), }); }, diff --git a/sourcecode/baidu/pages/extraction-address/extraction-address.swan b/sourcecode/baidu/pages/extraction-address/extraction-address.swan index bd915fa1b..91cc710c1 100644 --- a/sourcecode/baidu/pages/extraction-address/extraction-address.swan +++ b/sourcecode/baidu/pages/extraction-address/extraction-address.swan @@ -13,7 +13,7 @@ - + diff --git a/sourcecode/qq/app.js b/sourcecode/qq/app.js index b6b90dd39..73b8d6e37 100755 --- a/sourcecode/qq/app.js +++ b/sourcecode/qq/app.js @@ -67,15 +67,16 @@ App({ // 请求地址 request_url: "{{request_url}}", - // request_url: 'http://shopxo.com/', - // request_url: 'https://dev.shopxo.net/', + request_url: 'http://shopxo.com/', + request_url: 'https://dev.shopxo.net/', // 基础信息 application_title: "{{application_title}}", application_describe: "{{application_describe}}", // 价格符号 - price_symbol: "{{price_symbol}}" + price_symbol: "{{price_symbol}}", + price_symbol: "¥", }, /** @@ -543,12 +544,12 @@ App({ if ((status || 'error') == 'success') { qq.showToast({ + icon: 'success', title: msg, duration: 3000 }); } else { qq.showToast({ - image: '/images/default-toast-error.png', title: msg, duration: 3000 }); @@ -576,8 +577,8 @@ App({ var is_show_cancel = (e.is_show_cancel == 0) ? false : true; var cancel_text = e.cancel_text || '取消'; var confirm_text = e.confirm_text || '确认'; - var cancel_color = e.cancel_color || ''; - var confirm_color = e.confirm_color || ''; + var cancel_color = e.cancel_color || '#000000'; + var confirm_color = e.confirm_color || '#576B95'; qq.showModal({ title: title, diff --git a/sourcecode/qq/components/popup/popup.qml b/sourcecode/qq/components/popup/popup.qml index 2780ac4d2..9b9b37103 100755 --- a/sourcecode/qq/components/popup/popup.qml +++ b/sourcecode/qq/components/popup/popup.qml @@ -1,4 +1,4 @@ - + diff --git a/sourcecode/qq/images/default-toast-error.png b/sourcecode/qq/images/default-toast-error.png old mode 100755 new mode 100644 index 83eadd245..920959dbe Binary files a/sourcecode/qq/images/default-toast-error.png and b/sourcecode/qq/images/default-toast-error.png differ diff --git a/sourcecode/qq/pages/buy/buy.js b/sourcecode/qq/pages/buy/buy.js index 47f748319..4c3594222 100755 --- a/sourcecode/qq/pages/buy/buy.js +++ b/sourcecode/qq/pages/buy/buy.js @@ -26,9 +26,10 @@ Page({ // 优惠劵 plugins_coupon_data: null, - plugins_use_coupon_id: 0, - plugins_choice_coupon_value: '选择优惠劵', + plugins_use_coupon_ids: [], + plugins_choice_coupon_value: [], popup_plugins_coupon_status: false, + popup_plugins_coupon_index: null, }, onLoad(params) { //params['data'] = '{"buy_type":"goods","goods_id":"1","stock":"1","spec":"[]"}'; @@ -80,12 +81,11 @@ Page({ var data = this.data.params; data['address_id'] = this.data.address_id; data['payment_id'] = this.data.payment_id; - data['coupon_id'] = this.data.plugins_use_coupon_id; data['site_model'] = this.data.site_model; qq.request({ url: app.get_request_url("index", "buy"), method: "POST", - data: data, + data: this.request_data_coupon_merge(data), dataType: "json", success: res => { qq.stopPullDownRefresh(); @@ -110,13 +110,19 @@ Page({ // 优惠劵选择处理 if ((data.plugins_coupon_data || null) != null) { - if ((data.plugins_coupon_data.coupon_choice || null) != null) + var plugins_choice_coupon_value = []; + for(var i in data.plugins_coupon_data) { - this.setData({ plugins_choice_coupon_value: data.plugins_coupon_data.coupon_choice.coupon.desc }); - } else { - var coupon_count = ((data.plugins_coupon_data.coupon_list || null) != null) ? data.plugins_coupon_data.coupon_list.length : 0; - this.setData({ plugins_choice_coupon_value: (coupon_count > 0) ? '可选优惠劵' + coupon_count + '张' : '暂无可用优惠劵' }); + var cupk = data.plugins_coupon_data[i]['warehouse_id']; + if((data.plugins_coupon_data[i]['coupon_data']['coupon_choice'] || null) != null) + { + plugins_choice_coupon_value[cupk] = data.plugins_coupon_data[i]['coupon_data']['coupon_choice']['coupon']['desc']; + } else { + var coupon_count = (data.plugins_coupon_data[i]['coupon_data']['coupon_list'] || null) != null ? data.plugins_coupon_data[i]['coupon_data'].coupon_list.length : 0; + plugins_choice_coupon_value[cupk] = (coupon_count > 0) ? '可选优惠劵' + coupon_count + '张' : '暂无可用优惠劵'; + } } + this.setData({ plugins_choice_coupon_value: plugins_choice_coupon_value }); } // 地址 @@ -155,6 +161,19 @@ Page({ }); }, + // 请求参数合并优惠券参数 + request_data_coupon_merge(data) { + var coupon_ids = this.data.plugins_use_coupon_ids; + if((coupon_ids || null) != null && coupon_ids.length > 0) + { + for(var i in coupon_ids) + { + data['coupon_id_'+i] = coupon_ids[i]; + } + } + return data; + }, + // 下拉刷新 onPullDownRefresh() { this.init(); @@ -172,7 +191,6 @@ Page({ data['address_id'] = this.data.address_id; data['payment_id'] = this.data.payment_id; data['user_note'] = this.data.user_note_value; - data['coupon_id'] = this.data.plugins_use_coupon_id; data['site_model'] = this.data.site_model; // 数据验证 @@ -184,6 +202,7 @@ Page({ if (this.data.common_order_is_booking != 1) { validation.push({ fields: 'payment_id', msg: '请选择支付方式' }); } + if (app.fields_check(data, validation)) { // 加载loding qq.showLoading({title: '提交中...'}); @@ -192,14 +211,14 @@ Page({ qq.request({ url: app.get_request_url("add", "buy"), method: "POST", - data: data, + data: this.request_data_coupon_merge(data), dataType: "json", success: res => { qq.hideLoading(); if (res.data.code == 0) { - if (res.data.data.order.status == 1) { + if (res.data.data.order_status == 1) { qq.redirectTo({ - url: '/pages/user-order/user-order?is_pay=1&order_id=' + res.data.data.order.id + url: '/pages/user-order/user-order?is_pay=1&order_ids=' + res.data.data.order_ids.join(',') }); } else { qq.redirectTo({url: '/pages/user-order/user-order'}); @@ -212,7 +231,6 @@ Page({ fail: () => { qq.hideLoading(); this.setData({buy_submit_disabled_status: false}); - app.showToast("服务器请求出错"); } }); @@ -242,7 +260,11 @@ Page({ // 优惠劵弹层开启 plugins_coupon_open_event(e) { - this.setData({ popup_plugins_coupon_status: true}); + var index = e.currentTarget.dataset.index; + this.setData({ + popup_plugins_coupon_status: true, + popup_plugins_coupon_index: index, + }); }, // 优惠劵弹层关闭 @@ -252,19 +274,28 @@ Page({ // 优惠劵选择 plugins_coupon_use_event(e) { - var index = e.currentTarget.dataset.index; + var wid = e.currentTarget.dataset.wid; var value = e.currentTarget.dataset.value; - this.setData({ - plugins_use_coupon_id: value, - popup_plugins_coupon_status: false, - }); - this.init(); + var temp = this.data.plugins_use_coupon_ids; + // 是否已选择优惠券id + if(temp.indexOf(value) == -1) + { + temp[wid] = value; + this.setData({ + plugins_use_coupon_ids: temp, + popup_plugins_coupon_status: false, + }); + this.init(); + } }, // 不使用优惠劵 plugins_coupon_not_use_event(e) { + var wid = e.currentTarget.dataset.wid; + var temp = this.data.plugins_use_coupon_ids; + temp[wid] = 0; this.setData({ - plugins_use_coupon_id: 0, + plugins_use_coupon_ids: temp, popup_plugins_coupon_status: false, }); this.init(); @@ -306,4 +337,25 @@ Page({ this.init(); } }, + + // 地图查看 + map_event(e) { + var index = e.currentTarget.dataset.index || 0; + var data = this.data.goods_list[index] || null; + if (data == null) + { + app.showToast("地址有误"); + return false; + } + + var lng = parseFloat(data.lng || 0); + var lat = parseFloat(data.lat || 0); + qq.openLocation({ + latitude: lat, + longitude: lng, + scale: 18, + name: data.name || data.alias || '', + address: (data.province_name || '') + (data.city_name || '') + (data.county_name || '') + (data.address || ''), + }); + }, }); diff --git a/sourcecode/qq/pages/buy/buy.qml b/sourcecode/qq/pages/buy/buy.qml index 738d664ef..518d3ece6 100755 --- a/sourcecode/qq/pages/buy/buy.qml +++ b/sourcecode/qq/pages/buy/buy.qml @@ -2,7 +2,7 @@ - + @@ -32,9 +32,20 @@ - - - + + + + + + {{group.name}} + {{group.alias}} + + + 查看地图 + + + + {{item.title}} @@ -52,6 +63,25 @@ + + + 优惠劵 + {{((plugins_choice_coupon_value || null) != null && (plugins_choice_coupon_value[group.id] || null) != null) ? plugins_choice_coupon_value[group.id] : '请选择优惠券'}} + + + + + {{item.name}} + + {{item.tips}} + + + + + + {{price_symbol}}{{group.order_base.total_price}} + {{price_symbol}}{{group.order_base.actual_price}} + @@ -60,22 +90,6 @@ {{user_note_value || '留言'}} - - - 优惠劵 - {{plugins_choice_coupon_value}} - - - - - - {{item.name}} - - {{item.tips}} - - - - @@ -105,21 +119,22 @@ + - + - 不使用优惠劵 + 不使用优惠劵 - - + + - {{price_symbol}} + {{price_symbol}} {{item.coupon.discount_value}} {{item.coupon.type_unit}} {{item.coupon.desc}} @@ -127,9 +142,9 @@ {{item.coupon.use_limit_type_name}} {{item.time_start_text}} 至 {{item.time_end_text}} - + - {{plugins_use_coupon_id == item.id ? '已选' : '选择'}} + {{tools.indexOf(plugins_use_coupon_ids, item.id) ? '已选' : '选择'}} diff --git a/sourcecode/qq/pages/buy/buy.qss b/sourcecode/qq/pages/buy/buy.qss index 76e55ea29..99657b11f 100755 --- a/sourcecode/qq/pages/buy/buy.qss +++ b/sourcecode/qq/pages/buy/buy.qss @@ -41,14 +41,40 @@ /** * 商品 */ -.goods .goods-item:not(:last-child) { +.goods-group-list .goods-item:not(:last-child) { border-bottom: 1px dashed #efefef; } -.goods-item { - padding: 20rpx 10rpx; +.goods-group-list { + padding: 0 10rpx 10rpx 10rpx; +} +.goods-group-hd { + padding: 20rpx 0; +} +.goods-group-title { + font-weight: bold; + vertical-align: middle; +} +.goods-group-alias { + border: 1px solid #3bb4f2; + color: #3bb4f2; + padding: 2rpx 10rpx; + border-radius: 6rpx; + margin-left: 10rpx; +} +.goods-group-footer .original-price { + margin-right: 10rpx; +} +.goods-group-map-submit { + font-size: 24rpx; + padding: 5rpx 20rpx; + background: #f0f0f0; + border-radius: 6rpx; } .goods-title, .goods-spec { - margin-bottom: 10rpx; + margin-bottom: 5rpx; +} +.goods-item { + padding: 10rpx 0; } .goods-image { width: 160rpx; @@ -119,6 +145,7 @@ */ .extension-list { background-color: #ffffeb; + border: 1px solid #ffe2cf; } .extension-list .item { padding: 20rpx 10rpx; @@ -136,6 +163,7 @@ .content-textarea-view, .content-textarea-view textarea { height: 180rpx; + padding: 5rpx; } .content-textarea-view view { padding: 12rpx; diff --git a/sourcecode/qq/pages/cart/cart.js b/sourcecode/qq/pages/cart/cart.js index 4a251751b..486f2124d 100755 --- a/sourcecode/qq/pages/cart/cart.js +++ b/sourcecode/qq/pages/cart/cart.js @@ -351,7 +351,7 @@ Page({ this.setData({ total_price: total_price.toFixed(2), buy_submit_disabled_status: (selected_count <= 0), - is_selected_all: (selected_count >= data_count), + is_selected_all: (selected_count > 0 && selected_count >= data_count), }); }, diff --git a/sourcecode/qq/pages/extraction-address/extraction-address.qml b/sourcecode/qq/pages/extraction-address/extraction-address.qml index 4667f643e..7c5ab8829 100644 --- a/sourcecode/qq/pages/extraction-address/extraction-address.qml +++ b/sourcecode/qq/pages/extraction-address/extraction-address.qml @@ -12,9 +12,9 @@ {{item.province_name}}{{item.city_name}}{{item.county_name}}{{item.address}} - + + + diff --git a/sourcecode/qq/pages/goods-category/goods-category.js b/sourcecode/qq/pages/goods-category/goods-category.js index 47e16d8b6..758745886 100755 --- a/sourcecode/qq/pages/goods-category/goods-category.js +++ b/sourcecode/qq/pages/goods-category/goods-category.js @@ -1,18 +1,19 @@ const app = getApp(); Page({ data: { - tab_active: 0, - tab_active_text_color: '#d2364c', - tab_active_line_color: '#d2364c', data_list_loding_status: 1, - data_bottom_line_status: false, + nav_active_index: 0, data_list: [], - data_content: [], + category_show_level: 3, + data_content: null, }, onShow() { qq.setNavigationBarTitle({title: app.data.common_pages_title.goods_category}); this.init(); + + // 显示分享菜单 + app.show_share_menu(); }, // 获取数据 @@ -32,17 +33,19 @@ Page({ success: res => { qq.stopPullDownRefresh(); if (res.data.code == 0) { - var data = res.data.data; + var category = res.data.data.category; var data_content = []; - if (data.length > 0) + var index = this.data.nav_active_index || 0; + if (category.length > 0) { - data[0]['active'] = 'nav-active'; - data_content = data[0]['items']; + category[index]['active'] = 'nav-active'; + data_content = category[index]; } this.setData({ - data_list: data, + data_list: category, + category_show_level: res.data.data.category_show_level || 3, data_content: data_content, - data_list_loding_status: data.length == 0 ? 0 : 3, + data_list_loding_status: category.length == 0 ? 0 : 3, data_bottom_line_status: true, }); } else { @@ -50,7 +53,6 @@ Page({ data_list_loding_status: 0, data_bottom_line_status: true, }); - app.showToast(res.data.msg); } }, @@ -60,7 +62,6 @@ Page({ data_list_loding_status: 2, data_bottom_line_status: true, }); - app.showToast("服务器请求出错"); } }); @@ -81,7 +82,8 @@ Page({ } this.setData({ data_list: temp_data, - data_content: temp_data[index]['items'], + data_content: temp_data[index], + nav_active_index: index, }); }, diff --git a/sourcecode/qq/pages/goods-category/goods-category.json b/sourcecode/qq/pages/goods-category/goods-category.json index b55b5a254..1e3ffd8f1 100755 --- a/sourcecode/qq/pages/goods-category/goods-category.json +++ b/sourcecode/qq/pages/goods-category/goods-category.json @@ -1,4 +1,5 @@ { + "enablePullDownRefresh": true, "usingComponents": { } } \ No newline at end of file diff --git a/sourcecode/qq/pages/goods-category/goods-category.qml b/sourcecode/qq/pages/goods-category/goods-category.qml index d9273f144..e5b56c242 100755 --- a/sourcecode/qq/pages/goods-category/goods-category.qml +++ b/sourcecode/qq/pages/goods-category/goods-category.qml @@ -1,23 +1,77 @@ - - - - {{item.name}} + + + + + + + + + {{v.name}} + + + - - - - - - - {{v.name}} + + + + + + {{item.name}} + + + + + + + + {{data_content.vice_name}} + {{data_content.describe}} + + + + + + + + + + + {{v.name}} + + + + + + + + + + {{v.name}} + + + + + + {{vs.name}} + + + + + + + + + + + + - + - + \ No newline at end of file diff --git a/sourcecode/qq/pages/goods-category/goods-category.qss b/sourcecode/qq/pages/goods-category/goods-category.qss index 5f7b6b686..fcdc037b2 100755 --- a/sourcecode/qq/pages/goods-category/goods-category.qss +++ b/sourcecode/qq/pages/goods-category/goods-category.qss @@ -1,10 +1,10 @@ /** - 左侧导航 -*/ + * 左侧导航 + */ .left-nav { height: 100vh; - background: #ececec; - width: 230rpx; + background: #fff; + width: 210rpx; overflow-x: hidden; overflow-y: auto; } @@ -15,44 +15,77 @@ padding: 0 10rpx; text-align: center; color: #666; - border-left: 3px solid #ececec; - border-right: 3px solid #ececec; + border-left: 3px solid #fff; + border-right: 3px solid #fff; overflow: hidden; } .left-nav .items:not(:last-child) { - border-bottom: 1px solid #e6e6e6; + border-bottom: 1px solid #f1f1f1; } .nav-active { + background: #f5f5f5; border-left: 3px solid #e23f36 !important; - border-right: 3px solid #fff !important; - color: #e23f36; - background: #fff; + border-right: 3px solid #f5f5f5 !important; + color: #e23f36 !important; } - /** - 右侧内容 -*/ -.right-content { + * 右侧内容 + */ +.right-container { height: 100vh; - width: calc( 100% - 230rpx ); + width: calc( 100% - 210rpx ); overflow-x: hidden; overflow-y: auto; position: absolute; top: 0; right: 0; + background: #f5f5f5; } -.content-items { - float: left; - width: calc(33.33% - 20rpx); - padding: 20rpx 10rpx; - text-align: center; +.right-content { + padding: 0 20rpx 20rpx 20rpx; } -.content-items .text { - font-size: 28rpx; - line-height: 46rpx; +.one-content { + padding: 20rpx; } -.content-items .icon { - width: 100%; - height: 120rpx; +.one-content, .two-content { + margin-top: 20rpx; +} +.one-vice-name { + font-size: 30rpx; + font-weight: 500; +} +.one-desc { + color: #999; + margin-top: 10rpx; +} +.two-name { + font-weight: bold; + font-size: 32rpx; + background: #f5f5f5; + padding: 20rpx 10rpx; +} +.content-item { + display: -webkit-inline-box; + width: calc(33.33% - 20rpx); + padding: 10rpx; + text-align: center; +} +.content-item .content { + margin: 0 auto; + padding: 15rpx 0; +} +.content-item .text { + font-size: 28rpx; + line-height: 46rpx; +} +.content-item .icon { + width: 100%; + height: 120rpx; +} +.model-one { + padding: 10rpx; +} +.model-one .content-item:nth-child(3n) { + border-right: 0; } \ No newline at end of file diff --git a/sourcecode/qq/pages/goods-detail/goods-detail.qml b/sourcecode/qq/pages/goods-detail/goods-detail.qml index b05dbe298..63a4e7a69 100755 --- a/sourcecode/qq/pages/goods-detail/goods-detail.qml +++ b/sourcecode/qq/pages/goods-detail/goods-detail.qml @@ -73,7 +73,7 @@ - {{price_symbol}} + {{price_symbol}} {{item.discount_value}} {{item.type_unit}} diff --git a/sourcecode/qq/pages/user-order-detail/user-order-detail.js b/sourcecode/qq/pages/user-order-detail/user-order-detail.js index e395eaf65..f0349e5d1 100755 --- a/sourcecode/qq/pages/user-order-detail/user-order-detail.js +++ b/sourcecode/qq/pages/user-order-detail/user-order-detail.js @@ -45,12 +45,13 @@ Page({ self.setData({ detail: data.data, detail_list:[ - {name: "订单号", value: data.data.order_no || ''}, + {name: "出货仓库", value: data.data.warehouse_name || ''}, {name: "订单模式", value: data.data.order_model_name || '' }, - {name: "状态", value: data.data.status_name || ''}, + {name: "订单编号", value: data.data.order_no || ''}, + {name: "订单状态", value: data.data.status_name || ''}, {name: "支付状态", value: data.data.pay_status_name || ''}, - {name: "单价", value: data.data.price || ''}, - {name: "总价", value: data.data.total_price || ''}, + {name: "订单单价", value: data.data.price || ''}, + {name: "订单总价", value: data.data.total_price || ''}, {name: "优惠金额", value: data.data.preferential_price || ''}, {name: "增加金额", value: data.data.increase_price || '' }, {name: "支付金额", value: data.data.pay_price || ''}, diff --git a/sourcecode/qq/pages/user-order/user-order.js b/sourcecode/qq/pages/user-order/user-order.js index 8fedb02e6..aae86be3f 100755 --- a/sourcecode/qq/pages/user-order/user-order.js +++ b/sourcecode/qq/pages/user-order/user-order.js @@ -13,8 +13,7 @@ Page({ is_show_payment_popup: false, payment_list: [], payment_id: 0, - temp_pay_value: 0, - temp_pay_index: 0, + temp_pay_value: '', nav_status_list: [ { name: "全部", value: "-1" }, { name: "待付款", value: "1" }, @@ -24,6 +23,7 @@ Page({ { name: "已失效", value: "5,6" }, ], nav_status_index: 0, + order_select_ids: [], }, onLoad(params) { @@ -115,16 +115,9 @@ Page({ // 下订单支付处理 if(this.data.load_status == 0) { - if((this.data.params.is_pay || 0) == 1 && (this.data.params.order_id || 0) != 0) + if((this.data.params.is_pay || 0) == 1 && (this.data.params.order_ids || null) != null) { - for(var i in temp_data_list) - { - if(this.data.params.order_id == temp_data_list[i]['id']) - { - this.pay_handle(this.data.params.order_id, i); - break; - } - } + this.pay_handle(this.data.params.order_ids); } } } else { @@ -200,7 +193,7 @@ Page({ this.setData({ is_show_payment_popup: true, temp_pay_value: e.currentTarget.dataset.value, - temp_pay_index: e.currentTarget.dataset.index, + order_select_ids: [], }); }, @@ -214,11 +207,11 @@ Page({ var payment_id = e.currentTarget.dataset.value || 0; this.setData({payment_id: payment_id}); this.payment_popup_event_close(); - this.pay_handle(this.data.temp_pay_value, this.data.temp_pay_index); + this.pay_handle(this.data.temp_pay_value); }, // 支付方法 - pay_handle(order_id, index) { + pay_handle(order_ids) { var self = this; // 加载loding qq.showLoading({title: "请求中..." }); @@ -227,7 +220,7 @@ Page({ url: app.get_request_url("pay", "order"), method: "POST", data: { - id: order_id, + ids: order_ids, payment_id: this.data.payment_id, }, dataType: "json", @@ -242,12 +235,11 @@ Page({ package: res.data.data.data, success: function(res) { // 数据设置 - self.order_item_pay_success_handle(index); + self.order_item_pay_success_handle(order_ids); // 跳转支付页面 qq.navigateTo({ - url: "/pages/paytips/paytips?code=9000&total_price=" + - self.data.data_list[index]['total_price'] + url: "/pages/paytips/paytips?code=9000" }); }, fail: function (res) { @@ -258,15 +250,22 @@ Page({ // 线下支付 case 1 : + var order_ids_arr = order_ids.split(','); var temp_data_list = self.data.data_list; - temp_data_list[index]['is_under_line'] = 1; + for(var i in temp_data_list) + { + if(order_ids_arr.indexOf(temp_data_list[i]['id']) != -1) + { + temp_data_list[i]['is_under_line'] = 1; + } + } self.setData({ data_list: temp_data_list }); app.alert({ msg: res.data.msg, is_show_cancel: 0}); break; // 钱包支付 case 2 : - self.order_item_pay_success_handle(index); + self.order_item_pay_success_handle(order_ids); app.showToast('支付成功', 'success'); break; @@ -280,33 +279,41 @@ Page({ }, fail: () => { qq.hideLoading(); - app.showToast("服务器请求出错"); + app.showToast('服务器请求出错'); } }); }, // 支付成功数据设置 - order_item_pay_success_handle(index) { - // 数据设置 + order_item_pay_success_handle(order_ids) { + var order_ids_arr = order_ids.split(','); var temp_data_list = this.data.data_list; - switch (parseInt(temp_data_list[index]['order_model'])) { - // 销售模式 - case 0: - temp_data_list[index]['status'] = 2; - temp_data_list[index]['status_name'] = '待发货'; - break; - // 自提模式 - case 2: - temp_data_list[index]['status'] = 2; - temp_data_list[index]['status_name'] = '待取货'; - break; + // 数据设置 + for(var i in temp_data_list) + { + if(order_ids_arr.indexOf(temp_data_list[i]['id']) != -1) + { + switch (parseInt(temp_data_list[i]['order_model'])) { + // 销售模式 + case 0: + temp_data_list[i]['status'] = 2; + temp_data_list[i]['status_name'] = '待发货'; + break; - // 虚拟模式 - case 3: - temp_data_list[index]['status'] = 3; - temp_data_list[index]['status_name'] = '待收货'; - break; + // 自提模式 + case 2: + temp_data_list[i]['status'] = 2; + temp_data_list[i]['status_name'] = '待取货'; + break; + + // 虚拟模式 + case 3: + temp_data_list[i]['status'] = 3; + temp_data_list[i]['status_name'] = '待收货'; + break; + } + } } this.setData({ data_list: temp_data_list }); }, @@ -409,7 +416,10 @@ Page({ this.setData({ nav_status_index: e.currentTarget.dataset.index || 0, data_page: 1, + order_select_ids: [], }); + + // 重新拉取数据 this.get_data_list(1); }, @@ -435,4 +445,31 @@ Page({ url: "/pages/user-order-comments/user-order-comments?id=" + e.currentTarget.dataset.value }); }, + + // 选中处理 + selected_event(e) { + var oid = e.currentTarget.dataset.oid || 0; + var temp_select_ids = this.data.order_select_ids; + if(temp_select_ids.indexOf(oid) == -1) + { + temp_select_ids.push(oid); + } else { + for(var i in temp_select_ids) + { + if(temp_select_ids[i] == oid) + { + temp_select_ids.splice(i, 1); + } + } + } + this.setData({order_select_ids: temp_select_ids}); + }, + + // 合并支付 + pay_merge_event(e) { + this.setData({ + is_show_payment_popup: true, + temp_pay_value: this.data.order_select_ids.join(',') + }); + }, }); diff --git a/sourcecode/qq/pages/user-order/user-order.qml b/sourcecode/qq/pages/user-order/user-order.qml index 7a72bab92..d746ea098 100755 --- a/sourcecode/qq/pages/user-order/user-order.qml +++ b/sourcecode/qq/pages/user-order/user-order.qml @@ -1,8 +1,9 @@ + {{item.name}} - {{item.name}} + {{item.name}} @@ -11,10 +12,13 @@ - {{item.add_time}} - - {{item.status_name}}({{item.is_under_line_text}}) - + + + + + + {{item.warehouse_name}} + {{item.status_name}}({{item.is_under_line_text}}) @@ -26,7 +30,7 @@ {{spec.type}}:{{spec.value}} - {{detail.orderaftersale_btn_text}} + {{detail.orderaftersale_btn_text}} {{price_symbol}}{{detail.price}} @@ -56,6 +60,11 @@ + + + + + @@ -67,5 +76,5 @@ - 没有支付方式 + 没有支付方式 \ No newline at end of file diff --git a/sourcecode/qq/pages/user-order/user-order.qss b/sourcecode/qq/pages/user-order/user-order.qss index 68dcfaa47..7ae2568c1 100755 --- a/sourcecode/qq/pages/user-order/user-order.qss +++ b/sourcecode/qq/pages/user-order/user-order.qss @@ -85,4 +85,25 @@ height: 50rpx !important; vertical-align: middle; margin-right: 10rpx; +} + +/** + * 选择 + */ + .selected .icon { + width: 35rpx; + height: 35rpx !important; + margin: 0 20rpx 0 10rpx; + vertical-align: middle; +} + +/** + * 合并支付按钮 + */ +.pay-merge-submit { + width: 220rpx; + height: 70rpx !important; + line-height: 35rpx !important; + left: calc(50% - 110rpx); + bottom: 50rpx; } \ No newline at end of file diff --git a/sourcecode/qq/utils/tools.qs b/sourcecode/qq/utils/tools.qs new file mode 100644 index 000000000..3ba62093a --- /dev/null +++ b/sourcecode/qq/utils/tools.qs @@ -0,0 +1,8 @@ +function indexOf(arr, value) { + if (arr.indexOf(value) < 0) { + return false; + } else { + return true; + } +} +module.exports.indexOf = indexOf; \ No newline at end of file diff --git a/sourcecode/toutiao/app.js b/sourcecode/toutiao/app.js index f06b97532..1217c7049 100755 --- a/sourcecode/toutiao/app.js +++ b/sourcecode/toutiao/app.js @@ -583,8 +583,8 @@ App({ var is_show_cancel = (e.is_show_cancel == 0) ? false : true; var cancel_text = e.cancel_text || '取消'; var confirm_text = e.confirm_text || '确认'; - var cancel_color = e.cancel_color || ''; - var confirm_color = e.confirm_color || ''; + var cancel_color = e.cancel_color || '#000000'; + var confirm_color = e.confirm_color || '#576B95'; tt.showModal({ title: title, diff --git a/sourcecode/toutiao/components/popup/popup.ttml b/sourcecode/toutiao/components/popup/popup.ttml index 30e676547..d8f2f15f0 100755 --- a/sourcecode/toutiao/components/popup/popup.ttml +++ b/sourcecode/toutiao/components/popup/popup.ttml @@ -1,4 +1,4 @@ - + diff --git a/sourcecode/toutiao/pages/buy/buy.ttml b/sourcecode/toutiao/pages/buy/buy.ttml index b2bca7d4f..41efc0d7d 100755 --- a/sourcecode/toutiao/pages/buy/buy.ttml +++ b/sourcecode/toutiao/pages/buy/buy.ttml @@ -119,7 +119,7 @@ - {{price_symbol}} + {{price_symbol}} {{item.coupon.discount_value}} {{item.coupon.type_unit}} {{item.coupon.desc}} diff --git a/sourcecode/toutiao/pages/cart/cart.js b/sourcecode/toutiao/pages/cart/cart.js index 13c9f59ad..38042cf57 100755 --- a/sourcecode/toutiao/pages/cart/cart.js +++ b/sourcecode/toutiao/pages/cart/cart.js @@ -351,7 +351,7 @@ Page({ this.setData({ total_price: total_price.toFixed(2), buy_submit_disabled_status: (selected_count <= 0), - is_selected_all: (selected_count >= data_count), + is_selected_all: (selected_count > 0 && selected_count >= data_count), }); }, diff --git a/sourcecode/toutiao/pages/extraction-address/extraction-address.ttml b/sourcecode/toutiao/pages/extraction-address/extraction-address.ttml index 24eedf4a9..d2b65386b 100644 --- a/sourcecode/toutiao/pages/extraction-address/extraction-address.ttml +++ b/sourcecode/toutiao/pages/extraction-address/extraction-address.ttml @@ -13,7 +13,7 @@ - + diff --git a/sourcecode/toutiao/pages/goods-detail/goods-detail.ttml b/sourcecode/toutiao/pages/goods-detail/goods-detail.ttml index 863bc570e..39b9c39e1 100755 --- a/sourcecode/toutiao/pages/goods-detail/goods-detail.ttml +++ b/sourcecode/toutiao/pages/goods-detail/goods-detail.ttml @@ -73,7 +73,7 @@ - {{price_symbol}} + {{price_symbol}} {{item.discount_value}} {{item.type_unit}} diff --git a/sourcecode/weixin/app.js b/sourcecode/weixin/app.js index 5bf04cf5d..c6d1c7ebb 100755 --- a/sourcecode/weixin/app.js +++ b/sourcecode/weixin/app.js @@ -581,8 +581,8 @@ App({ var is_show_cancel = (e.is_show_cancel == 0) ? false : true; var cancel_text = e.cancel_text || '取消'; var confirm_text = e.confirm_text || '确认'; - var cancel_color = e.cancel_color || ''; - var confirm_color = e.confirm_color || ''; + var cancel_color = e.cancel_color || '#000000'; + var confirm_color = e.confirm_color || '#576B95'; wx.showModal({ title: title, diff --git a/sourcecode/weixin/components/popup/popup.wxml b/sourcecode/weixin/components/popup/popup.wxml index caae536ae..deecf02e5 100755 --- a/sourcecode/weixin/components/popup/popup.wxml +++ b/sourcecode/weixin/components/popup/popup.wxml @@ -1,4 +1,4 @@ - + diff --git a/sourcecode/weixin/pages/buy/buy.js b/sourcecode/weixin/pages/buy/buy.js index 43fbf993a..3796886c3 100755 --- a/sourcecode/weixin/pages/buy/buy.js +++ b/sourcecode/weixin/pages/buy/buy.js @@ -116,7 +116,7 @@ Page({ var cupk = data.plugins_coupon_data[i]['warehouse_id']; if((data.plugins_coupon_data[i]['coupon_data']['coupon_choice'] || null) != null) { - plugins_choice_coupon_value[cupk] = data.plugins_coupon_data[i]['coupon_data']['coupon_choice']['desc']; + plugins_choice_coupon_value[cupk] = data.plugins_coupon_data[i]['coupon_data']['coupon_choice']['coupon']['desc']; } else { var coupon_count = (data.plugins_coupon_data[i]['coupon_data']['coupon_list'] || null) != null ? data.plugins_coupon_data[i]['coupon_data'].coupon_list.length : 0; plugins_choice_coupon_value[cupk] = (coupon_count > 0) ? '可选优惠劵' + coupon_count + '张' : '暂无可用优惠劵'; diff --git a/sourcecode/weixin/pages/buy/buy.wxml b/sourcecode/weixin/pages/buy/buy.wxml index e6fc5868e..0e1fa1f94 100755 --- a/sourcecode/weixin/pages/buy/buy.wxml +++ b/sourcecode/weixin/pages/buy/buy.wxml @@ -134,7 +134,7 @@ - {{price_symbol}} + {{price_symbol}} {{item.coupon.discount_value}} {{item.coupon.type_unit}} {{item.coupon.desc}} diff --git a/sourcecode/weixin/pages/cart/cart.js b/sourcecode/weixin/pages/cart/cart.js index 505b2d08d..0e4f1f673 100755 --- a/sourcecode/weixin/pages/cart/cart.js +++ b/sourcecode/weixin/pages/cart/cart.js @@ -351,7 +351,7 @@ Page({ this.setData({ total_price: total_price.toFixed(2), buy_submit_disabled_status: (selected_count <= 0), - is_selected_all: (selected_count >= data_count), + is_selected_all: (selected_count > 0 && selected_count >= data_count), }); }, diff --git a/sourcecode/weixin/pages/extraction-address/extraction-address.wxml b/sourcecode/weixin/pages/extraction-address/extraction-address.wxml index 27826898e..e73012cf1 100644 --- a/sourcecode/weixin/pages/extraction-address/extraction-address.wxml +++ b/sourcecode/weixin/pages/extraction-address/extraction-address.wxml @@ -13,7 +13,7 @@ - +