| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 | <?php/** * 友盟API<https://developer.umeng.com/docs/67966/detail/68343> * @copyright 引擎力 * @author lc * @since 2020-09-17 */namespace App\Http\Services;class YouMenGApiService{    const ANDROID_APP_KEY = '5f61c113a246501b6779380a';    const ANDROID_APP_MASTER_SECRET = 'lhdv2qtc8ecjn9dhdenp4wtuvpo34gis';    const IOS_APP_KEY = '5f803da59e10b50ad97d541b';    const IOS_APP_MASTER_SECRET = 'sv8rmzfdjyfobkfl8kq6yjsibuicbxap';    public function __construct()    {        require_once(base_path() . '/push/src/Demo.php');    }    /**     * 安卓消息推送     * @param $siteId     * @param $content     */    public function pushAndroidDevice($siteId, $content)    {        $uPushService = new \Demo(self::ANDROID_APP_KEY, self::ANDROID_APP_MASTER_SECRET);        $uPushService->sendAndroidCustomizedcast('alias_'.$siteId, $content);    }    /**     * ios消息推送     * @param $siteId     * @param $content     */    public function pushIosDevice($siteId, $content)    {        $uPushService = new \Demo(self::IOS_APP_KEY, self::IOS_APP_MASTER_SECRET);        $uPushService->sendIOSCustomizedcast('alias_'.$siteId, $content);    }}
 |