Browse Source

小程序分享信息

master
weigang 5 years ago
parent
commit
3b923246a6
  1. 9
      app/Service/v3/Implementations/ShareInfoService.php

9
app/Service/v3/Implementations/ShareInfoService.php

@ -3,6 +3,7 @@
namespace App\Service\v3\Implementations; namespace App\Service\v3\Implementations;
use App\TaskWorker\SSDBTask; use App\TaskWorker\SSDBTask;
use Hyperf\Redis\Redis;
use Hyperf\Utils\ApplicationContext; use Hyperf\Utils\ApplicationContext;
class ShareInfoService implements \App\Service\v3\Interfaces\ShareInfoServiceInterface class ShareInfoService implements \App\Service\v3\Interfaces\ShareInfoServiceInterface
@ -10,6 +11,12 @@ class ShareInfoService implements \App\Service\v3\Interfaces\ShareInfoServiceInt
public function getForApplet() public function getForApplet()
{ {
return [];
$redis = ApplicationContext::getContainer()->get(Redis::class);
$shareInfos = $redis->hGetAll('program_share_card');
$shareInfos = array_values($shareInfos);
array_walk($shareInfos, function (&$value, $key) {
$value = json_decode($value, true);
});
return $shareInfos?:[];
} }
} }
Loading…
Cancel
Save