Index.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace app\admin\controller;
  3. use app\common\service\SmsService;
  4. use chuanglan\Chuanglan;
  5. use payment\wechat\WechatTransfers;
  6. class Index
  7. {
  8. public function index()
  9. {
  10. return redirect('/admin.php/home');
  11. }
  12. public function t1()
  13. {
  14. halt(11);
  15. $batch_name = '测试提现功能';//转账的名称
  16. $out_trade_no = 'lgd'.getUniId();//单号
  17. $money = 1;//金额
  18. $openid = 'o4a9g5ffjsMcXS9wCtTyONqMTdEc';//用户openid
  19. $detail = [];
  20. $transfers = new WechatTransfers();
  21. $detail[] = $transfers->getDetailList($out_trade_no,$money,$batch_name,$openid);
  22. $res = $transfers->transfers($batch_name,$detail);
  23. halt($res);
  24. }
  25. public function t2()
  26. {
  27. halt(22);
  28. $msg = '福利商城有订单已超过24小时未发货,订单号:请及时发货';
  29. $mobile = '13313826760';
  30. $sms = new Chuanglan();
  31. $res = $sms->send($mobile,['message'=>$msg]);
  32. halt($res);
  33. }
  34. public function t3()
  35. {
  36. $sms = new SmsService();
  37. $res = $sms->send('13313826760', 'worker_get_user');
  38. halt($res);
  39. }
  40. }