add 系统下载地址配置cookies配置及
This commit is contained in:
10
view/src/api/Config.js
Normal file
10
view/src/api/Config.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import {base} from "./base";
|
||||
|
||||
|
||||
export async function setConfig(data){
|
||||
return await base.post('/config/setConfig',data)
|
||||
}
|
||||
|
||||
export async function getConfig(){
|
||||
return await base.get('/config/getConfig')
|
||||
}
|
||||
@@ -1,16 +1,39 @@
|
||||
<script setup>
|
||||
|
||||
import { ref } from 'vue';
|
||||
import {setConfig,getConfig} from "../api/Config.js"
|
||||
import { ElMessage } from 'element-plus'
|
||||
const formLabelAlign = ref({})
|
||||
function submitForm(){
|
||||
setConfig(formLabelAlign.value).then((res)=>{
|
||||
ElMessage({
|
||||
message: '保存成功',
|
||||
type: 'success',
|
||||
})
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
getConfig().then((res)=>{
|
||||
console.log(res)
|
||||
formLabelAlign.value = res.data.data
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-row :gutter="20">
|
||||
<h1 style="padding: 20px">设置页面</h1>
|
||||
<el-divider />
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-form :label-position="labelPosition" label-width="100px" :model="formLabelAlign" style="max-width: 460px">
|
||||
<el-form-item label="临时下载地址">
|
||||
<el-input v-model="formLabelAlign.downloadPath" />
|
||||
</el-form-item>
|
||||
<el-form-item label="做种位置">
|
||||
<el-input v-model="formLabelAlign.torrentSavePath" />
|
||||
</el-form-item>
|
||||
<el-form-item label="zmptCookies">
|
||||
<el-input v-model="formLabelAlign.vCookies" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm()">
|
||||
保存
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<style></style>
|
||||
@@ -21,7 +21,7 @@ import {onMounted, ref} from "vue";
|
||||
import {delSubscribe, getSubscribe} from '../../api/Video.js'
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
|
||||
const list = ref([])
|
||||
const list = ref<any>([])
|
||||
onMounted(async ()=>{
|
||||
const res = await getSubscribe()
|
||||
list.value = res.data
|
||||
|
||||
Reference in New Issue
Block a user