123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace Product\Lib;
- use Dever;
- class Manage
- {
- public function showOrderUser($id)
- {
- $info = Dever::db('product/order')->one($id);
- $table = array();
- $user = Dever::db('passport/user')->one($info['uid']);
- $table['用户名'] = $user['username'];
- $table['手机号'] = $user['mobile'];
- //$table['产品名'] = $info['name'];
- if ($info['type'] == 1) {
- $table['支付方式'] = '购买';
- $table['支付金额'] = $info['cash'];
- } else {
- $table['支付方式'] = '兑换';
- $table['兑换码'] = $info['code'];
- }
- $table['购买数量'] = $info['num'];
- if (isset($info['address_name'])) {
- $table['收货人姓名'] = $info['address_name'];
- $table['收货人手机'] = $info['address_mobile'];
- $table['收货人地址'] = $info['address_address'];
- }
-
- if ($info['invite_uid'] && $info['invite_uid'] != $info['uid']) {
- $user = Dever::db('passport/user')->one($info['invite_uid']);
- $table['邀请人'] = $user['username'];
- }
- return Dever::table($table);
- }
- }
|