From 3c7907bcdde1c14358623263935041e1278c59ff Mon Sep 17 00:00:00 2001 From: gongfuxiang <2499232802@qq.com> Date: Thu, 27 Sep 2018 00:51:37 +0800 Subject: [PATCH] buy --- .../Home/View/Default/Buy/Index.html | 31 ++++++++++++++++++- .../Service/OrderService.class.php | 8 ++--- service/Public/Home/Default/Css/Buy.css | 1 + 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/service/Application/Home/View/Default/Buy/Index.html b/service/Application/Home/View/Default/Buy/Index.html index 08517a60c..5369c74c5 100644 --- a/service/Application/Home/View/Default/Buy/Index.html +++ b/service/Application/Home/View/Default/Buy/Index.html @@ -259,4 +259,33 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/service/Application/Service/OrderService.class.php b/service/Application/Service/OrderService.class.php index db79daef4..1c8b60c1a 100644 --- a/service/Application/Service/OrderService.class.php +++ b/service/Application/Service/OrderService.class.php @@ -31,7 +31,7 @@ class OrderService $m = M('Order'); $where = ['id'=>intval($params['id']), 'user_id' => $this->user['id']]; - $data = $m->where($where)->field('id,status,total_price')->find(); + $data = $m->where($where)->field('id,status,total_price,payment_id')->find(); if(empty($data)) { return DataReturn(L('common_data_no_exist_error'), -1); @@ -49,13 +49,13 @@ class OrderService // 发起支付 $notify_url = __MY_URL__.'Notify/order.php'; $pay_data = array( - 'out_user' => md5($this->user['id']), - 'order_sn' => $data['id'].GetNumberCode(6), + 'out_user' => md5($params['user']['id']), + 'order_sn' => date('YmdHis').$data['id'], 'name' => '订单支付', 'total_price' => $data['total_price'], 'notify_url' => $notify_url, ); - $pay = (new \Library\Alipay())->SoonPay($pay_data, C("alipay_key_secret")); + $pay = (new \Library\Payment\Alipay())->Pay($pay_data); if(empty($pay)) { return DataReturn('支付接口异常', -1); diff --git a/service/Public/Home/Default/Css/Buy.css b/service/Public/Home/Default/Css/Buy.css index c1b7feb1e..686409297 100644 --- a/service/Public/Home/Default/Css/Buy.css +++ b/service/Public/Home/Default/Css/Buy.css @@ -48,6 +48,7 @@ ul.logistics-list li img, ul.payment-list li img { width: 36px; height: 36px; } .link-list h3 { padding: 0 0 5px 5px; } ul.address-list, .business-item ul { overflow: hidden; } +.nav-buy .btn-go.am-disabled { background-color: #efa4af; } /** * 手机下选择地址