From 3b26ca74ed459acbd400ae11fe88e75d02d9eb9c Mon Sep 17 00:00:00 2001 From: devil Date: Sat, 1 Feb 2020 13:27:34 +0800 Subject: [PATCH] =?UTF-8?q?=20=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/lang/zh-cn.php | 135 ------------------- application/service/BuyService.php | 2 +- public/appmini/old/weixin/pages/buy/buy.js | 26 +++- public/appmini/old/weixin/pages/buy/buy.wxml | 11 +- public/appmini/old/weixin/pages/buy/buy.wxss | 11 ++ 5 files changed, 45 insertions(+), 140 deletions(-) diff --git a/application/admin/lang/zh-cn.php b/application/admin/lang/zh-cn.php index 130b9e4c7..919b80ac3 100755 --- a/application/admin/lang/zh-cn.php +++ b/application/admin/lang/zh-cn.php @@ -126,140 +126,5 @@ return array( 'type' => 'string', ], ], - - - // 订单excel导出 - 'excel_order_title_list' => [ - 'order_no' => [ - 'name' => '订单编号', - 'type' => 'string', - ], - - // 收件人信息 - 'receive_name' => [ - 'name' => '收件人姓名', - 'type' => 'string', - ], - 'receive_tel' => [ - 'name' => '收件人电话', - 'type' => 'string', - ], - 'receive_province_name'=> [ - 'name' => '收件人所在省', - 'type' => 'string', - ], - 'receive_city_name' => [ - 'name' => '收件人所在市', - 'type' => 'string', - ], - 'receive_county_name' => [ - 'name' => '收件人所在区县', - 'type' => 'string', - ], - 'receive_address' => [ - 'name' => '收件人详细地址', - 'type' => 'string', - ], - - // 用户留言 - 'user_note' => [ - 'name' => '用户留言', - 'type' => 'string', - ], - - // 快递信息 - 'express_name' => [ - 'name' => '快递公司', - 'type' => 'string', - ], - 'express_number' => [ - 'name' => '快递单号', - 'type' => 'string', - ], - - // 支付信息 - 'payment_name' => [ - 'name' => '支付方式', - 'type' => 'string', - ], - 'pay_status_name' => [ - 'name' => '支付状态', - 'type' => 'string', - ], - - // 基础信息 - 'status_name' => [ - 'name' => '订单状态', - 'type' => 'string', - ], - 'preferential_price' => [ - 'name' => '优惠金额', - 'type' => 'string', - ], - 'price' => [ - 'name' => '订单单价', - 'type' => 'string', - ], - 'total_price' => [ - 'name' => '订单总价(订单最终价格)', - 'type' => 'string', - ], - 'pay_price' => [ - 'name' => '已支付金额', - 'type' => 'string', - ], - 'excel_export_items' => [ - 'name' => '商品信息', - 'type' => 'string', - ], - 'items_count' => [ - 'name' => '购买总数', - 'type' => 'int', - ], - 'describe' => [ - 'name' => '描述', - 'type' => 'string', - ], - - // 时间 - 'confirm_time' => [ - 'name' => '确认时间', - 'type' => 'string', - ], - 'pay_time' => [ - 'name' => '支付时间', - 'type' => 'string', - ], - 'delivery_time' => [ - 'name' => '发货时间', - 'type' => 'string', - ], - 'collect_time' => [ - 'name' => '完成时间', - 'type' => 'string', - ], - 'cancel_time' => [ - 'name' => '取消时间', - 'type' => 'string', - ], - 'close_time' => [ - 'name' => '关闭时间', - 'type' => 'string', - ], - 'add_time' => [ - 'name' => '创建时间', - 'type' => 'string', - ], - 'upd_time' => [ - 'name' => '更新时间', - 'type' => 'string', - ], - - // 评论 - 'user_is_comments_time' => [ - 'name' => '评论时间', - 'type' => 'string', - ], - ], ); ?> \ No newline at end of file diff --git a/application/service/BuyService.php b/application/service/BuyService.php index c270776d6..03e66917d 100755 --- a/application/service/BuyService.php +++ b/application/service/BuyService.php @@ -614,7 +614,7 @@ class BuyService // 站点模式 0销售, 2自提, 4销售+自提, 则其它正常模式 $common_site_type = MyC('common_site_type', 0, true); - $site_model = isset($params['site_model']) ? intval($params['site_model']) : -1; + $site_model = isset($params['site_model']) ? intval($params['site_model']) : 0; // 数据处理 $address = null; diff --git a/public/appmini/old/weixin/pages/buy/buy.js b/public/appmini/old/weixin/pages/buy/buy.js index a12c0a4eb..df28ab77e 100755 --- a/public/appmini/old/weixin/pages/buy/buy.js +++ b/public/appmini/old/weixin/pages/buy/buy.js @@ -17,6 +17,11 @@ Page({ common_order_is_booking: 0, common_site_type: 0, extraction_address: [], + site_model: 0, + buy_header_nav: [ + { name: "快递邮寄", value: 0 }, + { name: "自提点取货", value: 2 } + ], // 优惠劵 plugins_coupon_data: null, @@ -75,6 +80,7 @@ Page({ 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; wx.request({ url: app.get_request_url("index", "buy"), method: "POST", @@ -166,6 +172,7 @@ Page({ 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; // 数据验证 var validation = []; @@ -264,12 +271,12 @@ Page({ // 地址选择事件 address_event(e) { - if(this.data.common_site_type == 0) + if (this.data.common_site_type == 0 || (this.data.common_site_type == 4 && this.data.site_model == 0)) { wx.navigateTo({ url: '/pages/user-address/user-address?is_back=1' }); - } else if (this.data.common_site_type == 2) + } else if (this.data.common_site_type == 2 || (this.data.common_site_type == 4 && this.data.site_model == 2)) { wx.navigateTo({ url: '/pages/extraction-address/extraction-address?is_back=1' @@ -279,4 +286,19 @@ Page({ } }, + // 销售+自提 模式选择事件 + buy_header_nav_event(e) { + // 数据设置 + this.setData({ + address: null, + address_id: null, + site_model: e.currentTarget.dataset.value || 0, + }); + + // 删除地址缓存 + wx.removeStorageSync(app.data.cache_buy_user_address_select_key); + + // 数据初始化 + this.init(); + }, }); diff --git a/public/appmini/old/weixin/pages/buy/buy.wxml b/public/appmini/old/weixin/pages/buy/buy.wxml index 5772fb84c..9b0b56d41 100755 --- a/public/appmini/old/weixin/pages/buy/buy.wxml +++ b/public/appmini/old/weixin/pages/buy/buy.wxml @@ -4,8 +4,15 @@ + + + + {{item.name}} + + + - + @@ -19,7 +26,7 @@ - 请选择地址 + {{(common_site_type == 0 || (common_site_type == 4 && site_model == 0)) ? '请选择收货地址' : '请选择取货地址'}} diff --git a/public/appmini/old/weixin/pages/buy/buy.wxss b/public/appmini/old/weixin/pages/buy/buy.wxss index c3283e906..76e55ea29 100755 --- a/public/appmini/old/weixin/pages/buy/buy.wxss +++ b/public/appmini/old/weixin/pages/buy/buy.wxss @@ -141,6 +141,17 @@ padding: 12rpx; } +/** + * 销售+自提 模式选择 + */ +.buy-header-nav { + background: #e9e9e9; +} +.buy-header-nav .item { + padding: 25rpx 0; + width: 50%; +} + /** * 插件样式区域 */ -- GitLab