留言成功發送郵件通知管理員
留言發送郵件標簽
標簽:sendemail
描述:留言成功發送郵件通知管理員
功能:用于發送郵件通(tong)知管理員(yuan)有新的表單提交(jiao)
快速開始(復制即用)
微信原生版
let that = this;
let apikey_token = App.getApikeyToken();
wx.request({
url: App.globalData.config.apiSendemailUrl,
header: {
'content-type': 'application/x-www-form-urlencoded'
},
method: 'POST',
data: {
apikey_token: apikey_token,
type: 'gbook_submit',
typeid: typeid,
aid: aid
},
success(res) {
console.log(res.data);
}
});uni-app 版
let that = this;
let apikey_token = App.getApikeyToken();
uni.request({
url: App.globalData.config.apiSendemailUrl,
header: {
'content-type': 'application/x-www-form-urlencoded'
},
method: 'POST',
data: {
apikey_token: apikey_token,
type: 'gbook_submit',
typeid: typeid,
aid: aid
},
success(res) {
console.log(res.data);
}
});全部參數
基礎參數
| 參數 | 說明 | 示例 |
|---|---|---|
apikey_token | 必填,一般使用 App.getApikeyToken() 獲取,與 setting.js 里的 apikey 配置同步 | App.getApikeyToken() |
type | 必填,只有唯一值 "gbook_submit" | type='gbook_submit' |
typeid | 必填,對應的欄目ID | typeid=2 |
aid | 必填,對應的留言文檔ID | aid=1 |
文檔最后更新時間:2026-01-13 16:23:19
小程序用戶登錄 →
未解決你的問題?請到「問答社區」反饋你遇到的問題
