| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- /**
- * 重庆赤晓店信息科技有限公司
- * https://www.chixiaodian.com
- * Copyright (c) 2023 赤店商城 All rights reserved.
- */
- namespace app\plugins\scanCodePay\controllers;
- use app\models\Order;
- use app\plugins\scanCodePay\models\form\OrderListForm;
- use app\plugins\scanCodePay\models\form\ScanCodePaySendIntegralForm;
- use yii\base\BaseObject;
- use app\utils\ShareQrcode;
- class OrderController
- {
- /**
- * 平台商品订单列表
- */
- public function actionList() {
- $store_id = get_store_id();
- $form = new OrderListForm();
- $form->attributes = get_params();
- $form->store_id = $store_id;
- $form->order_id = get_params('order_id');
- $form->is_offline = 1;
- $form->md_id = get_md_id();
- return $form->search();
- }
- public function actionSendIntegral() {
- $form = new ScanCodePaySendIntegralForm();
- $form->attributes = get_params();
- $form->store_id = get_store_id();
- $form->mch = 0;
- return $form->save();
- }
- /**
- * 商盟二维码
- */
- public function actionFoodQr()
- {
- $scene = '';
- $store_id = get_store_id();
- $scene = $scene ?: "store:{$store_id}";
- //需要小程序页面存在 不然会报错
- $res = ShareQrcode::wxQrcode('pages/shop/shopDetail', $scene);
- //$res = ShareQrcode::wxQrcode('pages/home/home', $scene);
- $wx_url_path = $res['url_path'];
- return [
- 'code'=>0,
- 'msg'=>"成功",
- 'data'=>[
- $wx_url_path
- ]
- ];
- }
- }
|