|
@@ -11,21 +11,26 @@
|
|
|
文章内容
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
- style="float: right; margin-top: 0.3em; margin-right: 0.5em;padding: 0 1.8em;"
|
|
|
+ style="
|
|
|
+ float: right;
|
|
|
+ margin-top: 0.3em;
|
|
|
+ margin-right: 0.5em;
|
|
|
+ padding: 0 1.8em;
|
|
|
+ "
|
|
|
@click="getServer"
|
|
|
:loading="loading"
|
|
|
>
|
|
|
校验
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- class="clearError"
|
|
|
- type="primary"
|
|
|
- style="float: right; margin-top: 0.3em; margin-right: 0.5em"
|
|
|
- @click="clearError"
|
|
|
- :icon="Delete"
|
|
|
- >
|
|
|
- 清空
|
|
|
- </el-button>
|
|
|
+ class="clearError"
|
|
|
+ type="primary"
|
|
|
+ style="float: right; margin-top: 0.3em; margin-right: 0.5em"
|
|
|
+ @click="clearError"
|
|
|
+ :icon="Delete"
|
|
|
+ >
|
|
|
+ 清空
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
<div class="Fle">
|
|
|
<Editor v-model:rawText="rawText" />
|
|
@@ -166,7 +171,6 @@
|
|
|
<el-radio :label="1">已忽略: {{ search.list1.length }}</el-radio>
|
|
|
<el-radio :label="2">已替换: {{ search.list2.length }}</el-radio>
|
|
|
</el-radio-group>
|
|
|
-
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="search">
|
|
@@ -549,24 +553,37 @@ function back(v, i, type) {
|
|
|
function getServer() {
|
|
|
if (!window.fetch || !rawText.value) return;
|
|
|
loading.value = true;
|
|
|
- const ele = document.createElement("div");
|
|
|
+ const ele = document.createElement('div');
|
|
|
ele.innerHTML = rawText.value;
|
|
|
+ if (!urlData.spm) {
|
|
|
+ if (location.replace) location.replace('https://home.sxtvs.net/');
|
|
|
+ else location.href = 'https://home.sxtvs.net/';
|
|
|
+ }
|
|
|
window
|
|
|
.fetch('https://topic.smcic.net/youmei/check', {
|
|
|
method: 'POST',
|
|
|
body: JSON.stringify({
|
|
|
raw: ele.innerText,
|
|
|
- text: rawText.value
|
|
|
+ text: rawText.value,
|
|
|
}),
|
|
|
headers: {
|
|
|
'Content-Type': 'application/json',
|
|
|
- "spm": urlData.spm || ""
|
|
|
+ spm: urlData.spm || '',
|
|
|
},
|
|
|
})
|
|
|
.then(json => json.json())
|
|
|
.then(res => {
|
|
|
loading.value = false;
|
|
|
- if (!res || res.code !== 0) return ElMessage.error('请稍后再试!');
|
|
|
+ if (!res || res.code !== 0)
|
|
|
+ return ElMessage({
|
|
|
+ type: 'error',
|
|
|
+ message: res.message || '请稍后再试!',
|
|
|
+ onClose() {
|
|
|
+ if (res.code !== 1000) return;
|
|
|
+ if (location.replace) location.replace('https://home.sxtvs.net/');
|
|
|
+ else location.href = 'https://home.sxtvs.net/';
|
|
|
+ },
|
|
|
+ });
|
|
|
search.list = res.data.checklist || [];
|
|
|
search.list1 = [];
|
|
|
search.list2 = [];
|
|
@@ -599,13 +616,13 @@ function getServer() {
|
|
|
}
|
|
|
|
|
|
function geturl() {
|
|
|
- let search = (location.search || "").replace("?", "").split("&");
|
|
|
- let obj = {};
|
|
|
- for (let i = 0; i < search.length; i++) {
|
|
|
- const v = search[i].split("=");
|
|
|
- obj[v[0]] = v[1] || "";
|
|
|
- }
|
|
|
- return obj
|
|
|
+ let search = (location.search || '').replace('?', '').split('&');
|
|
|
+ let obj = {};
|
|
|
+ for (let i = 0; i < search.length; i++) {
|
|
|
+ const v = search[i].split('=');
|
|
|
+ obj[v[0]] = v[1] || '';
|
|
|
+ }
|
|
|
+ return obj;
|
|
|
}
|
|
|
|
|
|
function changeTab(i) {
|