清空
This commit is contained in:
@@ -1,212 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>{$node.node_title}</title>
|
||||
{include file="common/header"/}
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>目前仅支持夸克</span>
|
||||
</div>
|
||||
<div class="text item">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>设置夸克cookie</span>
|
||||
</div>
|
||||
<div style="font-size:14px;color:#666;">
|
||||
<el-form :model="form">
|
||||
<el-form-item>
|
||||
<el-input style="width: 100%;" v-model="form.cookie" placeholder="夸克云盘网页版的cookie"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">保存</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<p>Tips:夸克云盘网页版的cookie,不懂如何获取请百度;填写并保存后才能使用下面功能</p>
|
||||
</div>
|
||||
</el-card>
|
||||
<br>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>一键转存他人链接</span>
|
||||
</div>
|
||||
<div style="margin-bottom: 20px;font-size:14px;color:#666;">
|
||||
<font color=orangered>简单理解就是将别人的资源分享转成自己的并添加该资源到系统中</font>
|
||||
<p>功能说明:</p>
|
||||
<p>1、转存短剧资源到自己的网盘</p>
|
||||
<p>2、生成自己的分享链接</p>
|
||||
<p>3、将分享链接添加到该系统资源管理中</p>
|
||||
<p>Tips:该功能仅支持单条操作;资源标题重复的会跳过;复制他人分享的网盘链接,如:https://pan.quark.cn/s/fb8402aed9c4</p>
|
||||
</div>
|
||||
<el-button type="danger" @click="s1Btn">立即转存</el-button>
|
||||
</el-card>
|
||||
<br>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>每日自动更新</span>
|
||||
</div>
|
||||
<div style="margin-bottom: 20px;font-size:14px;color:#666;">
|
||||
<p>自动更新:<font color=orangered>转存当日及昨天的资源数据;</font></p>
|
||||
<font color=orangered>将此接口添加到计划任务中,计划任务每2个小时执行一次即可;接口地址:https://你的域名/api/source/day</font>
|
||||
<p>Tips:添加计划任务后方可生效;名称重复的资源会跳过转存;</p>
|
||||
</div>
|
||||
</el-card>
|
||||
<br>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>转存心悦搜剧资源</span>
|
||||
</div>
|
||||
<div style="margin-bottom: 20px;font-size:14px;color:#666;">
|
||||
<p>全部转存:<font color=orangered>一键转存心悦搜剧所有资源到自己的网盘及系统中</font></p>
|
||||
<font color=orangered>全部转存速度比较慢,提交后请耐心等待;名称重复的资源会跳过转存;</font>
|
||||
<p>Tips:心悦搜剧:https://pan.xinyuedh.com;</p>
|
||||
</div>
|
||||
<el-button type="danger" @click="s2Btn">全部转存</el-button>
|
||||
</el-card>
|
||||
<!-- <el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>清除缓存</span>
|
||||
</div>
|
||||
<div style="margin-bottom: 20px;font-size:14px;color:#666;">
|
||||
清除缓存
|
||||
<font color=orangered>不可逆操作</font>
|
||||
</div>
|
||||
<el-button type="danger" @click="">清除缓存</el-button>
|
||||
</el-card> -->
|
||||
</div>
|
||||
</el-card>
|
||||
{include file="common/footer"/}
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
cookie: '',
|
||||
},
|
||||
file: '',
|
||||
files: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
this.getFile()
|
||||
},
|
||||
methods: {
|
||||
getData(){
|
||||
let that = this
|
||||
axios.post('/admin/conf/getBaseConfig', Object.assign({}, PostBase))
|
||||
.then(function (response) {
|
||||
if (response.data.code == 200) {
|
||||
for (let item of response.data.data) {
|
||||
if(item.conf_key === 'quark_cookie'){
|
||||
that.form.cookie = item.conf_value
|
||||
}
|
||||
if(item.conf_key === 'quark_file'){
|
||||
that.file = item.conf_value
|
||||
}
|
||||
}
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
});
|
||||
},
|
||||
onSubmit(){
|
||||
let that = this
|
||||
axios.post('/admin/conf/updateBaseConfig', Object.assign({}, PostBase, {
|
||||
quark_cookie: that.form.cookie
|
||||
}))
|
||||
.then(function (response) {
|
||||
if (response.data.code == 200) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
that.getFile()
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
|
||||
s1Btn(){
|
||||
let that = this
|
||||
this.$prompt('请输入夸克资源分享地址', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputPattern: /.+/,
|
||||
inputErrorMessage: '不能为空'
|
||||
}).then(({ value }) => {
|
||||
axios.post('/admin/source/transfer', Object.assign({}, PostBase, {
|
||||
url: value
|
||||
}))
|
||||
.then(function (res) {
|
||||
if (res.data.code == 200) {
|
||||
that.$message({
|
||||
message: res.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
that.$message.error(res.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
||||
s2Btn(){
|
||||
let that = this
|
||||
this.$confirm('全部转存速度比较慢,提交后请耐心等待, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
axios.post('/admin/source/transferAll', Object.assign({}, PostBase))
|
||||
.then(function (res) {
|
||||
if (res.data.code == 200) {
|
||||
} else {
|
||||
that.$message.error(res.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
});
|
||||
that.$message({
|
||||
message: "已提交任务,稍后查看结果",
|
||||
type: 'success'
|
||||
});
|
||||
}).catch(() => {});
|
||||
|
||||
},
|
||||
|
||||
|
||||
getFile(){
|
||||
let that = this
|
||||
axios.post('/admin/source/getFiles', Object.assign({}, PostBase))
|
||||
.then(function (res) {
|
||||
if (res.data.code == 200) {
|
||||
that.files = res.data || []
|
||||
} else {
|
||||
that.$message.error(res.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user