宅男在线永久免费观看网直播,亚洲欧洲日产国码无码久久99,野花社区在线观看视频,亚洲人交乣女bbw,一本一本久久a久久精品综合不卡

全部
常見問題
產(chǎn)品動態(tài)
精選推薦

多商戶2.2.2添加自定義短信

管理 管理 編輯 刪除
  1. 添加短信模版

通過一下代碼可以判斷出,模版ID是通過數(shù)據(jù)庫查出來了

0e93c202401251014272663.png

細(xì)看getSmsTemplate方法發(fā)現(xiàn),是根據(jù)類型返回不同的模版ID,數(shù)據(jù)都在system_notice_config這個表里。思路清晰了,我們要自定義短信就得在這個表里面加一條數(shù)據(jù)。如下

ad929202401251017271310.png


INSERT INTO `eb_system_notice_config` (`notice_config_id`, `notice_title`, `const_key`, `notice_info`, `notice_sys`, `notice_sms`, `notice_wechat`, `wechat_tempkey`, `wechat_content`, `wechat_tempid`, `notice_routine`, `routine_tempkey`, `routine_content`, `routine_tempid`, `type`, `sms_tempid`, `sms_ali_tempid`, `sms_content`, `create_time`, `update_time`, `kid`) VALUES (33, '自定義名稱', '自定義key', '自定義消息說明', -1, 1, -1, null, '', null, -1, null, '', 0, '自定義一號通短信模版ID', '自定義阿里云短信模版ID', '阿里云短信模板內(nèi)容', '2022-12-05 14:41:52', '2023-09-06 15:48:31', 0);

注意里面一些自定義參數(shù),這參數(shù)得根據(jù)具體使用情況而定

`notice_sys`,`notice_sms`,`notice_wechat`,`notice_routine`這幾個字段是控制消息開關(guān)。

`kid` 小程序模版消息時使用。

`sms_content` 模板內(nèi)容

例如sms_content為: 恭喜您已成為${store_name}商城付費(fèi)會員,擁有專享優(yōu)惠權(quán)益,有效期截至${date},祝您購物愉快!

這個消息模版需要兩個參數(shù)store_name和date

我們在使用時需要以數(shù)組的形式傳參,如下(代碼路徑:crmeb/services/SmsService.php。287行)

self::create()->send('要發(fā)送的手機(jī)號', $tempId, ['store_name' => '自定義名稱','date' => '自定義時間']);

2. 添加短信發(fā)送

在文件 crmeb/services/SmsService.php  sendMessage() 方法下定義新的類型,如下所示

f95a8202401251106554171.png

注意:這里面的自定義key得根具上面添加數(shù)據(jù)時的const_key走

        store_name和date是短信模版里面的參數(shù)。

3. 使用

發(fā)送消息的總?cè)肟谠陉犃蠸endSmsJob中,路徑crmeb/jobs/SendSmsJob.php

使用時調(diào)用隊列,如下。 參數(shù)說明:tempId是必傳的,其它參數(shù)根據(jù)實際使用情況而定

Queue::push(SendSmsJob::class, ['tempId' => '自定義key']);

acebd202401251110152935.png

修改完隊列代碼后要重啟隊列在測試

請登錄后查看

Always Prosperous Yang 最后編輯于2024-01-25 11:16:51

快捷回復(fù)
回復(fù)
回復(fù)
回復(fù)({{post_count}}) {{!is_user ? '我的回復(fù)' :'全部回復(fù)'}}
排序 默認(rèn)正序 回復(fù)倒序 點贊倒序

{{item.user_info.nickname ? item.user_info.nickname : item.user_name}} LV.{{ item.user_info.bbs_level || item.bbs_level }}

作者 管理員 企業(yè)

{{item.floor}}# 同步到gitee 已同步到gitee {{item.is_suggest == 1? '取消推薦': '推薦'}}
{{item.is_suggest == 1? '取消推薦': '推薦'}}
沙發(fā) 板凳 地板 {{item.floor}}#
{{item.user_info.title || '暫無簡介'}}
附件

{{itemf.name}}

{{item.created_at}}  {{item.ip_address}}
打賞
已打賞¥{{item.reward_price}}
{{item.like_count}}
{{item.showReply ? '取消回復(fù)' : '回復(fù)'}}
刪除
回復(fù)
回復(fù)

{{itemc.user_info.nickname}}

{{itemc.user_name}}

回復(fù) {{itemc.comment_user_info.nickname}}

附件

{{itemf.name}}

{{itemc.created_at}}
打賞
已打賞¥{{itemc.reward_price}}
{{itemc.like_count}}
{{itemc.showReply ? '取消回復(fù)' : '回復(fù)'}}
刪除
回復(fù)
回復(fù)
查看更多
打賞
已打賞¥{{reward_price}}
3055
{{like_count}}
{{collect_count}}
添加回復(fù) ({{post_count}})

相關(guān)推薦

快速安全登錄

使用微信掃碼登錄
{{item.label}} 加精
{{item.label}} {{item.label}} 板塊推薦 常見問題 產(chǎn)品動態(tài) 精選推薦 首頁頭條 首頁動態(tài) 首頁推薦
取 消 確 定
回復(fù)
回復(fù)
問題:
問題自動獲取的帖子內(nèi)容,不準(zhǔn)確時需要手動修改. [獲取答案]
答案:
提交
bug 需求 取 消 確 定
打賞金額
當(dāng)前余額:¥{{rewardUserInfo.reward_price}}
{{item.price}}元
請輸入 0.1-{{reward_max_price}} 范圍內(nèi)的數(shù)值
打賞成功
¥{{price}}
完成 確認(rèn)打賞

微信登錄/注冊

切換手機(jī)號登錄

{{ bind_phone ? '綁定手機(jī)' : '手機(jī)登錄'}}

{{codeText}}
切換微信登錄/注冊
暫不綁定
CRMEB客服

CRMEB咨詢熱線 咨詢熱線

400-8888-794

微信掃碼咨詢

CRMEB開源商城下載 源碼下載 CRMEB幫助文檔 幫助文檔
返回頂部 返回頂部
CRMEB客服