使用阿里云域名和腾讯云服务器 出现的问题--------记录

这里使用阿里云申请的域名,阿里云备案成功 服务器为腾讯云,后端使用的node这里获取数据时返回一篇html如下

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta
			name="viewport"
			content="width=device-width, initial-scale=1.0, user-scalable=no"
		/>
		<title>温馨提示</title>
		<meta name="keywords" content="云服务器,购买,腾讯云" />
		<meta
			name="keywords"
			content="域名注册, 云服务器, httpdns, 域名解析, 域名转入, 移动域名, 域名查询"
		/>
		<meta
			name="description"
			content="腾讯云域名注册, 腾讯云旗下品牌。腾讯云域名注册是中国领先的域名注册服务提供商, 并提供云主机、网站建设等网络服务。"
		/>
		<link
			rel="icon"
			href="https://www.cloud.tencent.com/favicon.ico"
			type="image/x-icon"
		/>
		<link
			rel="stylesheet"
			href="https://imgcache.qq.com/open_proj/proj_qcloud_v2/gateway/portal/css/global.css"
		/>
		<style>
			body {
				min-width: 1200px;
			}
			div,
			ul,
			li,
			p,
			span,
			i,
			h2,
			h3,
			h4,
			h5,
			h6 {
				box-sizing: border-box;
			}
			.block-main {
				width: 1200px;
				margin: 0 auto;
				overflow: hidden;
			}
			.block-clearfix:after {
				content: "";
				height: 0;
				visibility: hidden;
				display: block;
				clear: both;
			}
			.block-fr {
				float: right;
			}
			.block-fl {
				float: left;
			}
			/* 主要信息模块 */
			.block-info {
				padding: 120px 0 96px;
			}
			.block-info-left {
				float: left;
				width: 640px;
				margin-left: 12px;
			}
			.block-info-right {
				float: right;
				padding-top: 55px;
				padding-right: 85px;
			}
			.block-info-right img {
				width: 320px;
			}
			.block-title {
				width: 320px;
				color: #000;
				font-size: 40px;
				font-weight: 500;
				line-height: 52px;
				margin-bottom: 40px;
			}
			.block-text {
				color: #3d485d;
				font-size: 16px;
				line-height: 28px;
			}
			.block-text i {
				display: block;
				min-height: 28px;
				color: #000;
			}
			.block-text1 {
				margin-bottom: 12px;
			}
			.block-btn-wrap {
				margin-top: 40px;
			}
			.block-btn {
				display: inline-block;
				width: 152px;
				height: 36px;
				line-height: 36px;
				text-align: center;
				font-size: 14px;
				margin-right: 12px;
				cursor: pointer;
				box-sizing: border-box;
				vertical-align: top;
			}
			.block-btn-blue {
				background: #0052d9;
				color: #ffffff;
			}
			.block-btn-blue:hover {
				background-color: #266fe8;
			}
			.block-btn-white {
				border: 1px solid #0052d9;
				background: #fff;
				color: #0052d9;
			}
			.block-btn-white:hover {
				background-color: rgba(0, 82, 217, 0.05);
			}
			.open-transfer-dialog {
				display: none;
			}
			.block-ba-intro {
				color: #0052d9;
				font-size: 14px;
				line-height: 24px;
				margin-top: 16px;
				cursor: pointer;
			}
			.block-ba-intro::before {
				display: inline-block;
				content: "";
				width: 16px;
				height: 16px;
				background: url("https://cloudcache.tencent-cloud.com/qcloud/ui/static/static_source_business/9cae674d-f6bc-4958-8482-6b1569aad41c.png");
				background-size: 100%;
				margin-right: 8px;
				vertical-align: middle;
				margin-top: -2px;
			}
			/* 列表模块 */
			.block-list {
				background-color: #eef4fa;
				padding: 62px 0;
			}
			.block-list .block-main {
				overflow: visible;
			}
			.block-list ul {
				font-size: 0px;
			}
			.block-list li {
				float: right;
				position: relative;
				width: 384px;
				height: 219px;
				padding: 24px;
				margin-right: 24px;
				background: #fff;
				box-sizing: border-box;
				vertical-align: top;
				font-size: 14px;
			}
			.block-list li.recommend-item::after {
				content: "";
				position: absolute;
				right: -4px;
				top: -4px;
				width: 68px;
				height: 68px;
				background: url("https://cloudcache.tencent-cloud.com/qcloud/ui/static/static_source_business/01382544-3e4f-4653-9eda-242f6af991a7.png");
				background-size: 100%;
			}
			.block-list li:first-child {
				margin-right: 0;
			}
			.block-list li h4 {
				color: #000;
				font-size: 16px;
				font-weight: 500;
				line-height: 26px;
				margin-bottom: 12px;
			}
			.block-list li h4 i {
				display: none;
			}
			.block-list li p {
				color: #495770;
				font-size: 14px;
				line-height: 24px;
				margin-bottom: 12px;
			}
			.block-list li a {
				position: absolute;
				left: 24px;
				bottom: 24px;
				color: #0052d9;
				line-height: 24px;
				cursor: pointer;
			}
			/* 底部模块 */
			.block-footer {
				position: fixed;
				width: 100%;
				bottom: 0;
				padding: 24px 0;
				background-color: #fff;
				color: #98a3b7;
				text-align: center;
			}
			/* 弹窗模块 */
			.block-dialog {
				display: none;
				position: fixed;
				z-index: 1001;
				width: 100%;
				height: 100%;
				left: 0;
				top: 0;
			}
			.dialog-mask {
				position: absolute;
				width: 100%;
				height: 100%;
				left: 0;
				top: 0;
				background-color: rgba(0, 0, 0, 0.4);
			}
			.dialog-box {
				position: absolute;
				top: 50%;
				left: 50%;
				width: 800px;
				transform: translate(-50%, -50%);
				background: #fff;
				padding: 46px 40px 40px;
			}
			.dialog-head .dialog-title {
				font-size: 24px;
				margin-bottom: 36px;
				font-weight: 500;
				line-height: 36px;
			}
			.dialog-head .dialog-close {
				position: absolute;
				top: 20px;
				right: 20px;
				width: 20px;
				height: 20px;
				background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzg4OCIgZD0iTTEzLjk1IDMuNDE0TDEyLjUzNiAyIDggNi41MzYgMy40NjQgMiAyLjA1IDMuNDE0IDYuNTg2IDcuOTUgMi4wNSAxMi40ODVsMS40MTQgMS40MTRMOCA5LjM2NGw0LjUzNiA0LjUzNSAxLjQxNC0xLjQxNEw5LjQxNCA3Ljk1eiIvPjwvc3ZnPg==);
				background-size: 100% 100%;
				cursor: pointer;
			}
			.dialog-body img {
				width: 216px;
				margin-right: 52px;
			}
			.dialog-body p {
				width: 390px;
				line-height: 24px;
				margin-bottom: 20px;
				color: #3d485d;
			}
			.dialog-body p:last-child {
				margin-bottom: 0;
			}
			.dialog-body .dialog-btn-wrap {
				margin-top: 40px;
				text-align: center;
			}
			.video-dialog .dialog-box {
				width: 700px;
				height: 500px;
				padding: 0;
				font-size: 0;
			}
			.video-dialog .dialog-body {
				height: 100%;
			}
			.video-dialog .video-play {
				width: 100%;
				height: 100%;
			}
			.video-dialog .dialog-close {
				position: absolute;
				right: -30px;
				top: -15px;
				width: 30px;
				height: 30px;
				background: url("https://imgcache.qq.com/operation/dianshi/other/close-white.e5cb23e7475c990b39a25a7cc8730baee46acfac.svg");
				background-size: 100%;
				cursor: pointer;
			}
			@media screen and (max-width: 768px) {
				body {
					min-width: auto;
				}
				.block-main {
					width: 100%;
				}
				.block-info {
					padding: 0 15px;
				}
				.block-info-left {
					float: none;
					width: 100%;
					margin-left: 0;
					text-align: center;
				}
				.block-info-right {
					float: none;
					width: 100%;
					text-align: center;
					padding-right: 0;
					padding-top: 44px;
					margin-bottom: 20px;
				}
				.block-info-right img {
					width: auto;
					height: 165px;
				}
				.block-title {
					width: 100%;
					font-size: 18px;
					line-height: 26px;
					text-align: center;
					margin-bottom: 16px;
				}
				.block-text {
					font-size: 14px;
					line-height: 20px;
					text-align: center;
					margin-top: 8px;
				}
				.block-text i {
					min-height: 20px;
				}
				.block-text i::before {
					content: "";
					display: block;
					margin: 24px auto;
					height: 1px;
					width: 114px;
					background-color: #e5e5e5;
				}
				.block-btn-wrap {
					margin-top: 24px;
				}
				.block-btn {
					width: 100%;
					height: 48px;
					line-height: 48px;
					font-size: 16px;
				}
				.block-btn-blue {
					margin-bottom: 12px;
				}
				.block-ba-intro {
					display: inline-block;
					margin-bottom: 32px;
					margin-top: 18px;
				}
				.block-list {
					padding: 0;
				}
				.block-list ul {
					padding-top: 10px;
				}
				.block-list li {
					width: 100%;
					height: auto;
					padding: 20px 15px;
					margin-right: 0;
					margin-bottom: 10px;
				}
				.block-list li.recommend-item::after {
					background: none;
				}
				.block-list li h4 {
					font-size: 14px;
					line-height: 22px;
					margin-bottom: 8px;
				}
				.block-list li h4 i {
					display: inline-block;
					height: 20px;
					line-height: 20px;
					padding: 0 6px;
					background: #ff9c19;
					border-radius: 32px;
					color: #fff;
					font-size: 10px;
					text-align: center;
					margin-left: 10px;
				}
				.block-list li p {
					font-size: 14px;
					margin-bottom: 12px;
				}
				.block-list li a {
					position: initial;
				}
				.block-footer {
					position: relative;
				}
				.transfer-dialog .dialog-box {
					bottom: 0;
					left: 0;
					right: 0;
					top: initial;
					width: 100%;
					transform: initial;
					padding: 0 0 24px;
				}
				.dialog-head {
					height: 56px;
					line-height: 56px;
					padding: 0 15px;
					border-bottom: 1px solid #e5e5e5;
				}
				.dialog-head .dialog-title {
					font-size: 18px;
					line-height: inherit;
					margin-bottom: 0;
				}
				.dialog-head .dialog-close {
					top: 18px;
					right: 18px;
				}
				.dialog-body {
					padding: 0 15px;
				}
				.dialog-body .block-fl,
				.dialog-body .block-fr {
					float: none;
				}
				.dialog-body .block-fr {
					text-align: center;
					padding: 24px 0;
				}
				.dialog-body img {
					height: 131px;
					margin-right: 0;
				}
				.dialog-body p {
					width: initial;
					font-size: 12px;
					line-height: 20px;
					margin-bottom: 14px;
				}
				.dialog-body .dialog-btn-wrap {
					margin-top: 24px;
				}
				.video-dialog .dialog-box {
					width: 98%;
					height: auto;
					padding: 0;
					padding-top: 71.4285%;
				}
				.video-dialog .dialog-body {
					position: absolute;
					top: 0;
					left: 0;
					width: 100%;
					padding: 0;
				}
			}
		</style>
	</head>

	<body>
		<div class="body">
			<div class="block-page">
				<!-- 主要信息模块 -->
				<div class="block-info">
					<div class="block-main">
						<div class="block-info-right">
							<img src="https://cloudcache.tencent-cloud.com/qcloud/ui/static/static_source_business/a50b92ad-892c-456a-a137-6be267fcbb15.png" alt="" />
						</div>
						<div class="block-info-left">
							<div class="block-title">网站暂时无法访问</div>
							<div class="block-text block-text1">
								该网站未根据工信部相关法律规则进行备案。
							</div>
							<div class="block-text">
								国务院令第292号《互联网信息服务管理办法》和《非经营性互联网信息服务备案管理办法》规定,所有对中国大陆境内提供服务的网站都必须先进行ICP备案。
								<br /><i class="block-tip"></i>
							</div>
							<div class="block-btn-wrap">
								<a
									href="https://console.cloud.tencent.com/beian/manage"
									target="_blank"
									class="block-btn block-btn-blue"
									>去腾讯云备案</a
								>
								<div class="block-btn block-btn-white open-transfer-dialog">
									我已经备过案了
								</div>
							</div>
							<div class="block-ba-intro">网站备案介绍</div>
						</div>
					</div>
				</div>
				<!-- 列表模块 -->
				<div class="block-list">
					<div class="block-main">
						<ul class="block-clearfix">
							<li class="recommend-item">
								<h4>备案管家<i>推荐</i></h4>
								<p>
									不知道如何备案?直接咨询专业的备案管家,全程1V1指导,让您备案省时省心省力
								</p>
								<a href="https://buy.cloud.tencent.com/QHK" target="_blank">了解详情</a>
							</li>
							<li>
								<h4>接入备案是否影响其他地方的备案</h4>
								<p>
									接入备案过程中,暂不会影响您的网站访问。接入备案只是增加一个服务商,不会影响您在其它服务商的备案数据,您可同时使用两家服务商的服务器
								</p>
								<a href="https://cloud.tencent.com/document/product/243/43878#.E6.8E.A5.E5.85.A5.E5.A4.87.E6.A1.88.E6.98.AF.E5.90.A6.E5.BD.B1.E5.93.8D.E5.85.B6.E4.BB.96.E5.9C.B0.E6.96.B9.E7.9A.84.E5.A4.87.E6.A1.88.EF.BC.9F" target="_blank">了解详情</a>
							</li>
							<li>
								<h4>备案期间网站还能正常访问吗</h4>
								<p>
									首次备案:未成功办理备案的网站均不能上线访问<br />
									接入备案:在腾讯云接入备案成功后,才可在腾讯云开展网站内容服务,未接入前请继续使用其他已备案过的云服务商
								</p>
								<a href="https://cloud.tencent.com/document/product/243/19637" target="_blank">了解详情</a>
							</li>
						</ul>
					</div>
				</div>
				<!-- 底部模块 -->
				<div class="block-footer">京ICP备11018762号</div>
				<!-- 接入备案弹窗模块 -->
				<div class="block-dialog transfer-dialog">
					<div class="dialog-mask"></div>
					<div class="dialog-box">
						<div class="dialog-head">
							<div class="dialog-title">已经备过案了?</div>
							<div class="dialog-close"></div>
						</div>
						<div class="dialog-body">
							<div class="block-clearfix">
								<div class="block-fr">
									<img src="https://cloudcache.tencent-cloud.com/qcloud/ui/static/static_source_business/54ddc8c2-c1fc-458a-9da6-bdc18dcdd075.png" alt="" />
								</div>
								<div class="block-fl">
									<p>
										备案信息需要与接入服务商进行关联。如果主体已经在其他接入服务商完成备案取得备案号,表示您的网站可以在该接入商提供的服务范围从事网站内容服务。
									</p>
									<p>
										若更换了接入服务商,如换成腾讯云,则需要在腾讯云做接入备案。在腾讯云接入备案成功后,表示您可以在腾讯云开展网站内容服务。
									</p>
								</div>
							</div>
							<div class="dialog-btn-wrap">
								<a
									href="https://console.cloud.tencent.com/beian/manage"
									target="_blank"
									class="block-btn block-btn-blue"
									>我要接入备案</a
								>
							</div>
						</div>
					</div>
				</div>
				<!-- 视频播放弹窗 -->
				<div class="block-dialog video-dialog">
					<div class="dialog-mask"></div>
					<div class="dialog-box">
						<div class="dialog-close"></div>
						<div class="dialog-body"></div>
					</div>
				</div>
			</div>
		</div>
		<script
			id="sdi_js"
			aid="2019103118575411963"
			type="text/javascript"
			src="//3gimg.qq.com/webapp_scan/sdi/common/sdi_js_full_v2.js"
		></script>
		<script>
			// 获取url的query参数
			function getQueryString(name) {
				let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
				let r = window.location.search.substr(1).match(reg);
				if (r != null) {
					return decodeURIComponent(r[2]);
				}
				return null;
			}
			// 格式化请求参数
			function formatParams(data) {
				let arr = [];
				for (let name in data) {
					arr.push(
						encodeURIComponent(name) + "=" + encodeURIComponent(data[name])
					);
				}
				// arr.push(("v=" + Math.random()).replace(".", ""));
				return arr.join("&");
			}
			// ajax请求封装
			function ajax(options) {
				options = options || {};
				options.method = (options.method || "GET").toUpperCase();
				options.contentType =
					options.contentType || "application/x-www-form-urlencode";
				options.timeout = options.timeout || 30000;
				let params =
					options.method === "POST" &&
					options.contentType === "application/json"
						? JSON.stringify(options.data)
						: formatParams(options.data, options.contentType);
				let xhr;
				// 考虑兼容性
				if (window.XMLHttpRequest) {
					xhr = new XMLHttpRequest();
				} else if (window.ActiveObject) {
					// 兼容IE6以下版本
					xhr = new ActiveXobject("Microsoft.XMLHTTP");
				}

				// 启动并发送一个请求
				if (options.method == "GET") {
					xhr.open("get", options.url + "?" + params, true);
					xhr.send(null);
				} else if (options.method == "POST") {
					xhr.open("post", options.url, true);
					// 设置表单提交时的内容类型
					// Content-type数据请求的格式
					xhr.setRequestHeader("Content-type", options.contentType);
					xhr.send(params);
				}

				// 设置有效时间
				setTimeout(function () {
					if (xhr.readySate != 4) {
						xhr.abort();
					}
				}, options.timeout);
				/*
					接收
					options.success成功之后的回调函数  options.error失败后的回调函数
					xhr.responseText,xhr.responseXML  获得字符串形式的响应数据或者XML形式的响应数据
				*/
				xhr.onreadystatechange = function () {
					if (xhr.readyState == 4) {
						let status = xhr.status;
						if ((status >= 200 && status < 300) || status == 304) {
							options.success &&
								options.success(xhr.responseText, xhr.responseXML);
						} else {
							options.error && options.error(status);
						}
					}
				};
			}
		</script>
		<script>
			window.addEventListener("DOMContentLoaded", (event) => {
				// 控制接入备案弹窗显示
				document.querySelector(".open-transfer-dialog").onclick = function () {
					document.querySelector(".transfer-dialog").style.display = "block";
				};
				document.querySelector(".transfer-dialog .dialog-close").onclick =
					function () {
						document.querySelector(".transfer-dialog").style.display = "none";
					};
				// 控制视频显示
				document.querySelector(".block-ba-intro").onclick = function () {
					document.querySelector(".video-dialog").style.display = "block";
					document.querySelector(".video-dialog .dialog-body").innerHTML =
						'<iframe class="video-play" style="background-color: #000;" width="700" height="500" src="https://cloud.tencent.com/edu/learning/quick-play/1818-20734?auto=1&amp;source=gw.doc.media" allowfullscreen="">当前浏览器不能支持视频播放,请采用chrome或IE9以上浏览器</iframe>';
				};
				document.querySelector(".video-dialog .dialog-close").onclick =
					function () {
						document.querySelector(".video-dialog").style.display = "none";
						document.querySelector(".video-dialog .dialog-body").innerHTML = "";
					};
				document.querySelector(".video-dialog .dialog-mask").onclick =
					function () {
						document.querySelector(".video-dialog").style.display = "none";
						document.querySelector(".video-dialog .dialog-body").innerHTML = "";
					};
				// 埋点统计
				document.querySelectorAll("a").forEach((el) => {
					el.addEventListener("click", (e) => {
						try {
							let tag = e.currentTarget.dataset.sdi;
							let psArr = tag.split("-");
							let ptype = psArr[0];
							let stype = psArr[1];
							_sdi.stat({
								ptype: ptype,
								stype: stype,
							});
						} catch (error) {}
					});
				});
				// 判断域名状态
				var domain = getQueryString("d");
				ajax({
					url: "//icp.qcloud.com/beian/IcpStatus",
					method: "post",
					data: {
						Domain: domain,
						RequestId: new Date().getTime().toString(),
					},
					timeout: 10000,
					contentType: "application/json",
					success: function (res) {
						const result = res && JSON.parse(res);
						if (result.Response.Code === 0 && result.Response.Status === "0") {
							document.querySelector(".open-transfer-dialog").style.display =
								"inline-block";
							document.querySelector(".block-tip").innerHTML =
								"经检测您的网站未在腾讯云备案,备案成功后方可恢复访问。";
						} else {
							document.querySelector(".open-transfer-dialog").style.display =
								"none";
							document.querySelector(".block-tip").innerHTML =
								"经检测您的网站未备案或存在不适宜传播的内容,整改成功后方可恢复访问";
						}
					},
					error: function (e) {
						document.querySelector(".open-transfer-dialog").style.display =
							"inline-block";
						document.querySelector(".block-tip").innerHTML =
							"经检测您的网站未备案,备案成功后方可恢复访问。";
					},
				});
			});
		</script>
	</body>
</html>
<!--[if !IE]>|xGv00|8f85bc5ee2a463e0e5c16c474a6dd271<![endif]-->

运行结果

 在这里记录一下

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值