| xqd
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace App\Http\Controllers\Admin;
|
|
|
|
|
|
+use App\Models\Notification;
|
|
|
use App\Models\Project;
|
|
|
use App\Models\User;
|
|
|
use App\Models\UserAuth;
|
| xqd
@@ -13,31 +14,34 @@ class TestController extends Controller
|
|
|
{
|
|
|
public function index(Request $request)
|
|
|
{
|
|
|
- $user = User::where('phone', '13438082119')->first();
|
|
|
- User::where('phone', 'like', '%1343808211%')->update([
|
|
|
- 'open_id' => $user->open_id,
|
|
|
- 'union_id' => $user->union_id,
|
|
|
- 'official_open_id' => $user->official_open_id
|
|
|
- ]);
|
|
|
- dd(User::where('phone', 'like', '%1343808211%')->pluck('union_id'));
|
|
|
- $app = app('wechat.official_account.default');
|
|
|
- $res = $app->template_message->send([
|
|
|
- 'touser' => 'oEDlJ5p8EFuHepjBi0cASmHjb7Qg',
|
|
|
- 'template_id' => 'dlRsvUWqeziBvGbdT89b69slvZll6gZVRCotIXCwwjM',
|
|
|
- 'miniprogram' => [
|
|
|
- 'appid' => 'xxxxxxx',
|
|
|
- 'pagepath' => 'pages/xxx',
|
|
|
- ],
|
|
|
- 'data' => [
|
|
|
- 'first' => '您有一条待审核的订单,请注意查看!',
|
|
|
- 'keyword1' => '2010-01-01',
|
|
|
- 'keyword2' => '设备租赁订单',
|
|
|
- 'keyword3' => '待审核/机电负责人',
|
|
|
- 'keyword4' => 'XX-项目',
|
|
|
- 'keyword5' => 'XXXXXX',
|
|
|
- 'remark' => '点击进入小程序查看详情,请及时处理。',
|
|
|
- ],
|
|
|
- ]);
|
|
|
- dd($res);
|
|
|
+ $info = Notification::orderBy('id', 'desc')->first();
|
|
|
+ dd($info->sendOfficialInfo());
|
|
|
+ return false;
|
|
|
+// $user = User::where('phone', '13438082119')->first();
|
|
|
+// User::where('phone', 'like', '%1343808211%')->update([
|
|
|
+// 'open_id' => $user->open_id,
|
|
|
+// 'union_id' => $user->union_id,
|
|
|
+// 'official_open_id' => $user->official_open_id
|
|
|
+// ]);
|
|
|
+// dd(User::where('phone', 'like', '%1343808211%')->pluck('union_id'));
|
|
|
+// $app = app('wechat.official_account.default');
|
|
|
+// $res = $app->template_message->send([
|
|
|
+// 'touser' => 'oEDlJ5p8EFuHepjBi0cASmHjb7Qg',
|
|
|
+// 'template_id' => 'dlRsvUWqeziBvGbdT89b69slvZll6gZVRCotIXCwwjM',
|
|
|
+// 'miniprogram' => [
|
|
|
+// 'appid' => 'xxxxxxx',
|
|
|
+// 'pagepath' => 'pages/xxx',
|
|
|
+// ],
|
|
|
+// 'data' => [
|
|
|
+// 'first' => '您有一条待审核的订单,请注意查看!',
|
|
|
+// 'keyword1' => '2010-01-01',
|
|
|
+// 'keyword2' => '设备租赁订单',
|
|
|
+// 'keyword3' => '待审核/机电负责人',
|
|
|
+// 'keyword4' => 'XX-项目',
|
|
|
+// 'keyword5' => 'XXXXXX',
|
|
|
+// 'remark' => '点击进入小程序查看详情,请及时处理。',
|
|
|
+// ],
|
|
|
+// ]);
|
|
|
+// dd($res);
|
|
|
}
|
|
|
}
|