1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- namespace Order\Lib;
- use Dever;
- class Buy
- {
- # 获取订单信息
- public function info($id)
- {
- Dever::load('manage/auth.init');
- $info = Dever::db('order/sell')->find($id);
- $data['order'] = array();
- $data['order']['订单号'] = $info['order_num'];
- $seller = Dever::db('role/seller')->find($info['seller_id']);
- $data['order']['销售商'] = $seller['name'];
- if ($info['uid'] && $info['uid'] > 0) {
- $user = Dever::db('passport/api')->info($info['uid']);
- $data['order']['购买人'] = $user;
- }
- $data['order'] = Dever::table($data['order']);
- if ($info['address']) {
- $data['address'] = array();
- $info['address'] = Dever::json_encode($info['address']);
- if ($info['address']) {
- $data['address']['收件人'] = $info['address']['name'];
- $data['address']['手机号'] = $info['address']['mobile'];
- $data['address']['地址'] = $info['address']['address'];
- }
- $data['address'] = Dever::table($data['address']);
- }
- $data['cash'] = array();
- $data['cash']['总数量'] = $info['num'];
- $data['cash']['总金额'] = $info['cash'];
- $data['cash']['支付金额'] = $info['pay_cash'];
- $data['cash'] = Dever::table($data['cash']);
- return $data;
- }
- public function ps($id, $name, $data)
- {
- Dever::config('base')->hook = true;
- $order_id = Dever::param('order_id', $data);
- if ($order_id) {
- /*
- $info = Dever::db('order/sell')->find(array('id' => $order_id));
- if ($info && $info['status'] < 3) {
- Dever::load('shop/lib/sell')->notice($info);
- }*/
- }
- }
- }
|