Manage.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace Product\Lib;
  3. use Dever;
  4. class Manage
  5. {
  6. public function showOrderUser($id)
  7. {
  8. $info = Dever::db('product/order')->one($id);
  9. $table = array();
  10. $user = Dever::db('passport/user')->one($info['uid']);
  11. $table['用户名'] = $user['username'];
  12. $table['手机号'] = $user['mobile'];
  13. //$table['产品名'] = $info['name'];
  14. if ($info['type'] == 1) {
  15. $table['支付方式'] = '购买';
  16. $table['支付金额'] = $info['cash'];
  17. } else {
  18. $table['支付方式'] = '兑换';
  19. $table['兑换码'] = $info['code'];
  20. }
  21. $table['购买数量'] = $info['num'];
  22. if (isset($info['address_name'])) {
  23. $table['收货人姓名'] = $info['address_name'];
  24. $table['收货人手机'] = $info['address_mobile'];
  25. $table['收货人地址'] = $info['address_address'];
  26. }
  27. if ($info['invite_uid'] && $info['invite_uid'] != $info['uid']) {
  28. $user = Dever::db('passport/user')->one($info['invite_uid']);
  29. $table['邀请人'] = $user['username'];
  30. }
  31. return Dever::table($table);
  32. }
  33. }