| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace saas\controllers;
- use biz\auth\services\AuthService;
- use biz\merchant\services\MerchantService;
- use common\components\util;
- use common\components\wxUtil;
- use Yii;
- class CsController extends BaseController
- {
- public $withoutLogin = ['index'];
-
- public function actionIndex()
- {
- $content = '<p><a data-miniprogram-appid="wxe4675bab299a52f7" data-miniprogram-path="pages/case/casedetail?mainId=184&owner_user_id=19" href=""><img src="https://www.meijiabang.com/0.gif" alt="" data-width="null" data-ratio="NaN"></a></p>';
- $content = $this->html_out($content);
- $content = '<p><a data-miniprogram-appid="wxe4675bab299a52f7" data-miniprogram-path="pages/case/casedetail?mainId=184&owner_user_id=19" href=""><img src="https://www.meijiabang.com/0.gif" alt="" data-width="null" data-ratio="NaN"></a></p>';
- $merchant = MerchantService::getMerchantById(12362);
- $openId = 'oTFbYvsjwgVwXggwtlM2ESAKwuN8';
- $return = wxUtil::sendMsg($content, $merchant, $openId);
- print_r($return);
- }
-
- public function html_out($str)
- {
- if (function_exists('htmlspecialchars_decode')) {
- $str = htmlspecialchars_decode($str);
- } else {
- $str = html_entity_decode($str);
- }
- $str = stripslashes($str);
- return $str;
- }
- }
|