| xqd
@@ -1831,7 +1831,7 @@ class AlbumController extends Controller
|
|
|
|
|
|
$res_account = $this->accountMesage($g_open_id,$weChatApp,$name,$content);
|
|
|
// \Log::info($res_account);
|
|
|
- if($user && $formId && (!$weChatApp->G_app_id || !$weChatApp->G_app_secret)){
|
|
|
+ if($user && $formId && !empty($weChatApp->wxFurniture_template_id) && (!$weChatApp->G_app_id || !$weChatApp->G_app_secret)){
|
|
|
$config_app = [
|
|
|
'app_id' => $weChatApp->app_id,
|
|
|
'secret' => $weChatApp->app_secret,
|
| xqd
@@ -1840,7 +1840,7 @@ class AlbumController extends Controller
|
|
|
$app_x = Factory::miniProgram($config_app);
|
|
|
$res = $app_x->template_message->send([
|
|
|
'touser' => $open_id,
|
|
|
- 'template_id' => '9PDTfnhsRvdNwpPMIcYLL7wQF4SZkB8-9ZhXUfthbmw',
|
|
|
+ 'template_id' => $weChatApp->wxFurniture_template_id,
|
|
|
'page' => 'pages/sell/sell',
|
|
|
'form_id' => $formId->form_id,
|
|
|
'data' => [
|
| xqd
@@ -1873,7 +1873,7 @@ class AlbumController extends Controller
|
|
|
// Cache::flush();
|
|
|
$value = Cache::get($g_open_id);
|
|
|
\Log::info($value);\Log::info('2225');
|
|
|
- if ($g_open_id && (!$value || ($value + 60) <= time())) {
|
|
|
+ if ($g_open_id && !empty($weChatApp->wxaccount_template_id) && (!$value || ($value + 60) <= time())) {
|
|
|
Cache::put($g_open_id, time(), 1);
|
|
|
$config = [
|
|
|
'app_id' => $weChatApp->G_app_id,
|
| xqd
@@ -1883,7 +1883,7 @@ class AlbumController extends Controller
|
|
|
$app = Factory::officialAccount($config);
|
|
|
$res = $app->template_message->send([
|
|
|
'touser' => $g_open_id,
|
|
|
- 'template_id' => 'lXMh2Xjg62C4LjB50QVi9ETbcvU21WElvqNCHBCsWuM',
|
|
|
+ 'template_id' => $weChatApp->wxaccount_template_id,
|
|
|
'url' => '',
|
|
|
'data' => [
|
|
|
'keyword1' => $name,
|