Order.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. *
  4. * @copyright ©2020 点小铺
  5. * @author hanj
  6. * @link: https://dyuit.com
  7. * Created by VSCode
  8. */
  9. namespace app\store\controller\apps\wow;
  10. use app\store\controller\Controller;
  11. use app\store\model\wow\Order as OrderModel;
  12. use app\common\service\wechat\wow\Order as WowOrderService;
  13. /**
  14. * 好物圈-订单信息
  15. * Class Order
  16. * @package app\store\controller\apps\wow
  17. */
  18. class Order extends Controller
  19. {
  20. /**
  21. * 订单记录
  22. * @param string $search
  23. * @return mixed
  24. * @throws \think\exception\DbException
  25. */
  26. public function index($search = '')
  27. {
  28. $model = new OrderModel;
  29. $list = $model->getList($search);
  30. return $this->fetch('index', compact('list'));
  31. }
  32. /**
  33. * 取消同步
  34. * @param $id
  35. * @return array|bool
  36. * @throws \app\common\exception\BaseException
  37. * @throws \think\exception\DbException
  38. */
  39. public function delete($id)
  40. {
  41. // 删除微信好物圈收藏
  42. $WechatWow = new WowOrderService($this->getWxappId());
  43. $WechatWow->delete($id);
  44. return $this->renderSuccess('操作成功');
  45. }
  46. }