本文整理汇总了PHP中Wechat::getJssdkConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP Wechat::getJssdkConfig方法的具体用法?PHP Wechat::getJssdkConfig怎么用?PHP Wechat::getJssdkConfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wechat
的用法示例。
在下文中一共展示了Wechat::getJssdkConfig方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create
public function create()
{
$customer = \Helper::getCustomer();
if ($customer->is_registered) {
return view('register.registered')->with(['js' => \Wechat::getJssdkConfig(['closeWindow'])]);
}
return view('register.create');
}
示例2: close
public function close(Request $request)
{
$access_token = \Wechat::getWebAuthAccessToken();
$timestamp = Carbon::now()->getTimestamp();
$addr_sign = ['accesstoken=' . $access_token, 'appid=' . \Wechat::getAppId(), 'noncestr=123456', 'timestamp=' . $timestamp, 'url=' . $request->fullUrl()];
sort($addr_sign);
$addr_sign = implode('&', $addr_sign);
return view('education.close')->with(['original_url' => \Session::get('original_url', null), 'appId' => env('WX_APPID'), 'timestamp' => $timestamp, 'addrSign' => sha1($addr_sign), 'url' => $request->fullUrl(), 'js' => \Wechat::getJssdkConfig(['closeWindow', 'checkJsApi', 'editAddress', 'chooseWXPay', 'getLatestAddress', 'openCard', 'getLocation'])]);
}
示例3: test
public function test(Request $request)
{
$access_token = \Wechat::getWebAuthAccessToken();
$timestamp = Carbon::now()->getTimestamp();
$addr_sign = ['accesstoken=' . $access_token, 'appid=' . \Wechat::getAppId(), 'noncestr=123456', 'timestamp=' . $timestamp, 'url=' . $request->fullUrl()];
sort($addr_sign);
$addr_sign = implode('&', $addr_sign);
return view('shop.test')->with(['appId' => env('WX_APPID'), 'timestamp' => $timestamp, 'addrSign' => sha1($addr_sign), 'url' => $request->fullUrl(), 'js' => \Wechat::getJssdkConfig(['checkJsApi', 'editAddress', 'openAddress', 'chooseWXPay', 'getLatestAddress', 'openCard', 'getLocation'])]);
// return view('backend.article.customer_index')->with([
// 'items' => Article::paginate(10)
// ]);
}
示例4: mothersDay
public function mothersDay(Request $request)
{
return view('activities.mothersday')->with(['js' => \Wechat::getJssdkConfig(['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone'])]);
}