| 12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace mall\controllers;
- use bizHd\custom\classes\CustomClass;
- use common\components\httpUtil;
- use common\components\util;
- class CustomController extends BaseController
- {
- public $guestAccess = ['init-custom'];
- //生成客户信息 shish 2021.5.1
- public function actionInitCustom()
- {
- $custom = [];
- //非登陆情况的请求,支付宝扫码付款需要用到
- if (httpUtil::isMiniProgram() == false) {
- util::success($custom);
- }
- if (!empty($this->shopId)) {
- $custom = CustomClass::replaceCustom($this->sjId, $this->user, $this->shopId);
- if (empty($custom)) {
- util::fail('没有找到客户信息');
- }
- }
- util::success($custom);
- }
- }
|