jquery - 如何正确地将 mailchimp 与您的网站集成?
问题描述
我想将 Mailchimp 用于我的网站,该网站在提交时基本上会接收用户的电子邮件,所以我从 mailchimp 获得了 url,如下面的 url,我在最后添加了post-json
and &c=?
!
https://xxxxxx.us3.list-manage.com/subscribe/post-json?u=b5d4f5b14088dceec18dc9ca8&id=9d2643cd8e&c=?
并像这样将它与我的 jquery 集成!
$(".mailchimp-submit").submit(function(e){
e.preventDefault()
var this_ = $(this)
var successMsg = "success_message"
$.ajax({
type: "GET",
url: "url",
data: this_.serialize(),
cache : false,
dataType : 'jsonp',
error : function(err) {errorMsg()},
success:(data)=>{
if (data.result != "success") {
errorMsg(successMsg)
}
else {
msg.text()
msg.css("color","#6610f2")
}
},
})
})
并像这样构建我的表格!
<form class="mailchimp-submit wow fadeInUp" data-wow-delay="0.6s" method="GET" >
<div class="input-group subcribes">
<input type="text" name="EMAIL" class="form-control memail" placeholder="abc@example.com" required>
<button class="btn btn_submit f_size_15 f_500" type="submit">{% trans 'Get Started' %}</button>
</div>
</form>
但是我在 FireFox 上提交了我的电子邮件,它在控制台中给了我一个警告:
The resource at “https://xxxxxxx.us3.list-manage.com/subscribe/post-json?u=b…1590645826995&EMAIL=yoneyos382%40whowlft.com&_=1590645826996” was blocked because content blocking is enabled.
我认为浏览器就是这种情况,所以我在 chrome 上尝试了它,但它给了我这样的错误!
A cookie associated with a cross-site resource at https://list-manage.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
但是,当我通过一次单击多次多次提交表单时,它突然给我一条错误消息“此邮件已提交”,然后我检查邮件是否正在发送到 mailchimp!
奇怪的问题吧??是我这边的错误还是MailChimp那边的错误???我该如何解决?
解决方案
推荐阅读
- java - 任务:url_launcher:testDebugUnitTest FAILED for flutter app
- java - 在 JPA 中,将列的可空值设置为 false 实际上有什么作用?
- php - 保存结帐自定义字段值并将其显示在 WooCommerce 管理订单中
- android - 我可以更改 Android Studio 中的默认 git 分支吗?
- javascript - 活动成员角色更新
- react-native - 如何在 react-native / expo 中使用Dimensions获得真实的屏幕分辨率并设置应用程序样式?
- java - 使用 Spring Boot 集中多个 Maven 工件的日志记录配置
- laravel - 未找到显示 welcome.blade.php 或 404 的视图
- ffmpeg - ffmpeg 将白色转换为 alpha
- java - Android Studio Java,无法同时输出数据