<?php
 namespace App\Util; use TechOnline\Laravel\Dao\ModelUtil; use TechOnline\Laravel\Http\Request; class ModuleHtmlUtil { public static function indictmentUrl($url = null) { if (null === $url) { $url = Request::currentPageUrl(); } return '/m/indictment?url=' . urlencode($url); } public static function shareScript($memberUserId) { return action('\App\Http\Controllers\Module\Common\Mobile\HomeController@shareScript', ['memberUserId' => $memberUserId,]); } public static function shareDisableScript($memberUserId) { return action('\App\Http\Controllers\Module\Common\Mobile\HomeController@shareDisableScript', ['memberUserId' => $memberUserId,]); } public static function userMoneyHomeUrl($memberUserId) { $memberUser = ModelUtil::getWithCache('member_user', ['id' => $memberUserId]); return '/m/user_money_' . $memberUser['alias']; } public static function userCreditHomeUrl($memberUserId) { $memberUser = ModelUtil::getWithCache('member_user', ['id' => $memberUserId]); return '/m/user_credit_' . $memberUser['alias']; } public static function prizePoolActivityUrl($memberUserId, $activityType, $activityAlias) { $memberUser = ModelUtil::getWithCache('member_user', ['id' => $memberUserId]); return action('\App\Modules\PrizePool\Mobile\HomeController@activity', [ 'alias' => $memberUser['alias'], 'activityType' => $activityType, 'activityAlias' => $activityAlias, ]); } public static function prizePoolUsersUrl($memberUserId, $activityType, $activityAlias) { $memberUser = ModelUtil::getWithCache('member_user', ['id' => $memberUserId]); return action('\App\Modules\PrizePool\Mobile\HomeController@users', [ 'alias' => $memberUser['alias'], 'activityType' => $activityType, 'activityAlias' => $activityAlias, ]); } }