From 79fa83ae8c31869ea80485604bc616c6a37932f5 Mon Sep 17 00:00:00 2001 From: devil_gong Date: Mon, 26 Nov 2018 14:45:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alipay/app.js | 17 +++-- alipay/pages/buy/buy.js | 10 ++- alipay/pages/index/index.axml | 4 +- alipay/pages/index/index.js | 8 +-- .../user-order-detail/user-order-detail.js | 7 +- alipay/pages/user/user.axml | 2 +- alipay/pages/user/user.js | 3 +- .../Admin/View/Default/AppSlide/SaveInfo.html | 6 +- .../Api/Controller/GoodsController.class.php | 2 +- .../Api/Controller/IndexController.class.php | 8 +-- .../Api/Controller/UserController.class.php | 1 + service/Application/Common/Lang/zh-cn.php | 4 +- .../Home/View/Default/Order/Detail.html | 64 +++++++++++-------- .../Home/View/Default/Order/Index.html | 2 +- .../Service/OrderService.class.php | 15 +++-- service/Public/Home/Default/Css/Common.css | 2 + 16 files changed, 97 insertions(+), 58 deletions(-) diff --git a/alipay/app.js b/alipay/app.js index df1aada65..fff325d34 100755 --- a/alipay/app.js +++ b/alipay/app.js @@ -50,7 +50,7 @@ App({ // 请求地址 request_url: "https://demo.shopxo.net/", - //request_url: 'http://localhost/project/shopxo/service/', + request_url: 'http://localhost/project/shopxo/service/', // 基础信息 application_title: "ShopXO电商系统", @@ -442,7 +442,6 @@ App({ var value = e.target.dataset.value || null; var type = parseInt(e.target.dataset.type); - console.log(value, type) if (value != null) { switch(type) { // web @@ -462,11 +461,17 @@ App({ // 跳转到地图查看位置 case 3 : + var values = value.split('|'); + if (values.length != 4) { + my.showToast({content: '事件值格式有误'}); + return false; + } + my.openLocation({ - longitude: '121.549697', - latitude: '31.227250', - name: '支付宝', - address: '杨高路地铁站', + name: values[0], + address: values[1], + longitude: values[2], + latitude: values[3], }); break; diff --git a/alipay/pages/buy/buy.js b/alipay/pages/buy/buy.js index bc2820063..3ab838ec0 100755 --- a/alipay/pages/buy/buy.js +++ b/alipay/pages/buy/buy.js @@ -151,9 +151,13 @@ Page({ success: res => { my.hideLoading(); if (res.data.code == 0) { - my.redirectTo({ - url: '/pages/user-order/user-order?is_pay=1' + '&order_id=' + res.data.data.order.id - }); + if (res.data.data.order.status == 1) { + my.redirectTo({ + url: '/pages/user-order/user-order?is_pay=1&order_id=' + res.data.data.order.id + }); + } else { + my.redirectTo({url: '/pages/user-order/user-order'}); + } } }, fail: () => { diff --git a/alipay/pages/index/index.axml b/alipay/pages/index/index.axml index 07c6e800e..1f7897d77 100755 --- a/alipay/pages/index/index.axml +++ b/alipay/pages/index/index.axml @@ -1,5 +1,5 @@ - + @@ -51,7 +51,7 @@ - + diff --git a/alipay/pages/index/index.js b/alipay/pages/index/index.js index 6aef6ea46..e3e555ce2 100755 --- a/alipay/pages/index/index.js +++ b/alipay/pages/index/index.js @@ -10,8 +10,8 @@ Page({ data_bottom_line_status: false, data_list: [], common_shop_notice: null, - is_enable_search: 1, - is_enable_answer: 1, + common_app_is_enable_search: 1, + common_app_is_enable_answer: 1, load_status: 0, }, @@ -45,8 +45,8 @@ Page({ indicator_dots: (data.data_list.length > 1), autoplay: (data.data_list.length > 1), common_shop_notice: data.common_shop_notice || null, - is_enable_search: data.is_enable_search, - is_enable_answer: data.is_enable_answer, + common_app_is_enable_search: data.common_app_is_enable_search, + common_app_is_enable_answer: data.common_app_is_enable_answer, data_list_loding_status: data.data_list.length == 0 ? 0 : 3, data_bottom_line_status: true, }); diff --git a/alipay/pages/user-order-detail/user-order-detail.js b/alipay/pages/user-order-detail/user-order-detail.js index 905e0b933..309ae3ef3 100755 --- a/alipay/pages/user-order-detail/user-order-detail.js +++ b/alipay/pages/user-order-detail/user-order-detail.js @@ -40,7 +40,7 @@ Page({ self.setData({ detail: data, detail_list:[ - {name: "订单单号", value: data.order_no}, + {name: "订单号", value: data.order_no}, {name: "状态", value: data.status_name}, {name: "支付状态", value: data.pay_status_name}, {name: "单价", value: data.price}, @@ -55,8 +55,9 @@ Page({ {name: "确认时间", value: data.confirm_time}, {name: "支付时间", value: data.pay_time}, {name: "发货时间", value: data.delivery_time}, - {name: "完成时间", value: data.success_time}, - {name: "取消时间", value: data.cancel_time}, + {name: "收货时间", value: data.collect_time}, + {name: "取消时间", value: data.close_time}, + {name: "关闭时间", value: data.close_time}, ], data_list_loding_status: 3, data_bottom_line_status: true, diff --git a/alipay/pages/user/user.axml b/alipay/pages/user/user.axml index 7506f83db..eb77d6963 100755 --- a/alipay/pages/user/user.axml +++ b/alipay/pages/user/user.axml @@ -27,7 +27,7 @@ - + diff --git a/alipay/pages/user/user.js b/alipay/pages/user/user.js index 034fa8e34..88fd01eeb 100755 --- a/alipay/pages/user/user.js +++ b/alipay/pages/user/user.js @@ -18,7 +18,7 @@ Page({ { name: "待收货", status: 3, count: 0 }, { name: "已完成", status: 4, count: 0 }, ], - lists: [ + nav_lists: [ { url: "user-order", icon: "user-nav-order-icon", @@ -121,6 +121,7 @@ Page({ nickname: (data.nickname != null) ? data.nickname : this.data.nickname, message_total: ((data.common_message_total || 0) == 0) ? 0 : data.common_message_total, head_nav_list: temp_head_nav_list, + 'nav_lists[3].is_show': (data.common_app_is_enable_answer == 1) ? 1 : 0, }); } else { my.showToast({ diff --git a/service/Application/Admin/View/Default/AppSlide/SaveInfo.html b/service/Application/Admin/View/Default/AppSlide/SaveInfo.html index 9c1e39c5e..e16f31d43 100755 --- a/service/Application/Admin/View/Default/AppSlide/SaveInfo.html +++ b/service/Application/Admin/View/Default/AppSlide/SaveInfo.html @@ -33,7 +33,7 @@
- +
+
+ +

{{:L('common_app_event_type_tips')}}

+
value="{{$data.event_value}}" />
diff --git a/service/Application/Api/Controller/GoodsController.class.php b/service/Application/Api/Controller/GoodsController.class.php index 77b842c16..4fef046d7 100755 --- a/service/Application/Api/Controller/GoodsController.class.php +++ b/service/Application/Api/Controller/GoodsController.class.php @@ -72,7 +72,7 @@ class GoodsController extends CommonController // 数据返回 $result = [ 'goods' => $goods[0], - 'common_order_is_booking' => MyC('common_order_is_booking', 0), + 'common_order_is_booking' => (int) MyC('common_order_is_booking', 0), ]; $this->ajaxReturn(L('common_operation_success'), 0, $result); } diff --git a/service/Application/Api/Controller/IndexController.class.php b/service/Application/Api/Controller/IndexController.class.php index c7e41e282..7c33b1ae8 100755 --- a/service/Application/Api/Controller/IndexController.class.php +++ b/service/Application/Api/Controller/IndexController.class.php @@ -42,10 +42,10 @@ class IndexController extends CommonController public function Index() { $result = [ - 'data_list' => GoodsService::HomeFloorList(), - 'common_shop_notice' => MyC('common_shop_notice', null, true), - 'is_enable_search' => MyC('common_app_is_enable_search', 1), - 'is_enable_answer' => MyC('common_app_is_enable_answer', 1), + 'data_list' => GoodsService::HomeFloorList(), + 'common_shop_notice' => MyC('common_shop_notice', null, true), + 'common_app_is_enable_search' => (int) MyC('common_app_is_enable_search', 1), + 'common_app_is_enable_answer' => (int) MyC('common_app_is_enable_answer', 1), ]; // 返回数据 diff --git a/service/Application/Api/Controller/UserController.class.php b/service/Application/Api/Controller/UserController.class.php index e307c0597..0676daac4 100755 --- a/service/Application/Api/Controller/UserController.class.php +++ b/service/Application/Api/Controller/UserController.class.php @@ -272,6 +272,7 @@ class UserController extends CommonController 'user_goods_favor_count' => $user_goods_favor_count, 'user_goods_browse_count' => $user_goods_browse_count, 'common_message_total' => $common_message_total, + 'common_app_is_enable_answer' => (int) MyC('common_app_is_enable_answer', 0), ); // 返回数据 diff --git a/service/Application/Common/Lang/zh-cn.php b/service/Application/Common/Lang/zh-cn.php index e01df3f62..aa38b6fde 100755 --- a/service/Application/Common/Lang/zh-cn.php +++ b/service/Application/Common/Lang/zh-cn.php @@ -319,7 +319,7 @@ return array( 'common_app_event_type_text' => '事件类型', 'common_app_event_type_format' => '事件值类型有误', - 'common_app_event_type_tips' => '1,2,3', + 'common_app_event_type_tips' => 'WEB页面
   1.以http开头
   2.并在小程序后台加入白名单

内部页面(小程序/APP内部地址)
   1.小程序或APP内部地址
   2.小程序以/pages开始
   3.例如:/pages/user/user
   4.支持带参数 ?x=xx

跳转原生地图查看指定位置
   1.以 | 竖线分割,分别顺序 名称|地址|经度|纬度
   2.例如:ShopXO|上海浦东新区张江高科技园区XXX号|121.626444|31.20843 ', 'common_app_event_value_text' => '事件值', 'common_app_event_value_format' => '事件值最多 255 个字符', @@ -575,7 +575,7 @@ return array( // app事件类型 'common_app_event_type' => array( 0 => array('value' => 0, 'name' => 'WEB页面'), - 1 => array('value' => 1, 'name' => '内部页面(小程序内部地址)'), + 1 => array('value' => 1, 'name' => '内部页面(小程序/APP内部地址)'), 2 => array('value' => 2, 'name' => '外部小程序(同一个主体下的小程序appid)'), 3 => array('value' => 3, 'name' => '跳转原生地图查看指定位置'), 4 => array('value' => 4, 'name' => '拨打电话'), diff --git a/service/Application/Home/View/Default/Order/Detail.html b/service/Application/Home/View/Default/Order/Detail.html index db8c59a39..20df6e06d 100755 --- a/service/Application/Home/View/Default/Order/Detail.html +++ b/service/Application/Home/View/Default/Order/Detail.html @@ -32,7 +32,7 @@

拍下商品

-

{{:date('Y-m-d H:i:s', $data['add_time'])}}

+

{{$data.add_time}}

@@ -44,7 +44,7 @@

付款

-

{{:date('Y-m-d H:i:s', $data['pay_time'])}}

+

{{$data.pay_time}}

@@ -56,7 +56,7 @@

卖家发货

-

{{:date('Y-m-d H:i:s', $data['delivery_time'])}}

+

{{$data.delivery_time}}

@@ -68,7 +68,7 @@

确认收货

-

{{:date('Y-m-d H:i:s', $data['collect_time'])}}

+

{{$data.collect_time}}

@@ -79,8 +79,8 @@

评价

- -

{{:date('Y-m-d H:i:s', $data['user_is_comments'])}}

+ +

{{$data.user_is_comments_time}}

@@ -110,39 +110,51 @@
下单时间:
-
{{:date('Y-m-d H:i:s', $data['add_time'])}}
+
{{$data.add_time}}
确认时间:
-
{{:date('Y-m-d H:i:s', $data['confirm_time'])}}
+
{{$data.confirm_time}}
付款时间:
-
{{:date('Y-m-d H:i:s', $data['pay_time'])}}
+
{{$data.pay_time}}
发货时间:
-
{{:date('Y-m-d H:i:s', $data['delivery_time'])}}
+
{{$data.delivery_time}}
收货时间:
-
{{:date('Y-m-d H:i:s', $data['collect_time'])}}
+
{{$data.collect_time}}
- +
评论时间:
-
{{:date('Y-m-d H:i:s', $data['user_is_comments'])}}
+
{{$data.user_is_comments_time}}
+ +
+
取消时间:
+
{{$data.cancel_time}}
+
+
+ +
+
关闭时间:
+
{{$data.close_time}}
+
+
@@ -176,20 +188,22 @@ -
-
-
快递公司:
-
- {{$data.express_name}} -
-
- + +
-
快递单号:
-
{{$data.express_number}}
+
快递公司:
+
+ {{$data.express_name}} +
- -
+ +
+
快递单号:
+
{{$data.express_number}}
+
+
+
+ diff --git a/service/Application/Home/View/Default/Order/Index.html b/service/Application/Home/View/Default/Order/Index.html index 50938e046..e9655d3d7 100755 --- a/service/Application/Home/View/Default/Order/Index.html +++ b/service/Application/Home/View/Default/Order/Index.html @@ -138,7 +138,7 @@ data-ongoing"> diff --git a/service/Application/Service/OrderService.class.php b/service/Application/Service/OrderService.class.php index da242bd69..a70dc873c 100755 --- a/service/Application/Service/OrderService.class.php +++ b/service/Application/Service/OrderService.class.php @@ -594,12 +594,18 @@ class OrderService // 发货时间 $v['delivery_time'] = empty($v['delivery_time']) ? null : date('Y-m-d H:i:s', $v['delivery_time']); - // 完成时间 - $v['success_time'] = empty($v['success_time']) ? null : date('Y-m-d H:i:s', $v['success_time']); + // 收货时间 + $v['collect_time'] = empty($v['collect_time']) ? null : date('Y-m-d H:i:s', $v['collect_time']); // 取消时间 $v['cancel_time'] = empty($v['cancel_time']) ? null : date('Y-m-d H:i:s', $v['cancel_time']); + // 关闭时间 + $v['close_time'] = empty($v['close_time']) ? null : date('Y-m-d H:i:s', $v['close_time']); + + // 评论时间 + $v['user_is_comments_time'] = ($v['user_is_comments'] == 0) ? null : date('Y-m-d H:i:s', $v['user_is_comments']); + // 空字段数据处理 if(empty($v['express_number'])) { @@ -718,8 +724,9 @@ class OrderService // 开启事务 $m->startTrans(); $upd_data = [ - 'status' => 5, - 'upd_time' => time(), + 'status' => 5, + 'cancel_time' => time(), + 'upd_time' => time(), ]; if($m->where($where)->save($upd_data)) { diff --git a/service/Public/Home/Default/Css/Common.css b/service/Public/Home/Default/Css/Common.css index c055d3f4c..a6399be84 100755 --- a/service/Public/Home/Default/Css/Common.css +++ b/service/Public/Home/Default/Css/Common.css @@ -34,6 +34,8 @@ button { outline: none; } /* 商城公告 */ .common-shop-notice { margin: 0; + border-left: 0; + border-right: 0; } /*所有超链接不要下划线*/
- {{:date('Y-m-d', $order['add_time'])}} + {{$order.add_time}} {{$order.order_no}}