Hi,
I can not figure out the way to pass parameters to js, pls help! Below is my code:
my module_name.module:
function paiqian_page_attachments(array &$page) {
$currentRoute = \Drupal::routeMatch()->getRouteName();
if ( $currentRoute == 'PaiQian.ZanLiuInput' )
{
$service = \Drupal::service('paiqian.getWxUsage');
$re = $service->getSignPackage();
$page['#attached']['drupalSettings']['paiqian']['appid'] = $re['appId'];