新增:网盘设置

This commit is contained in:
jmal 2020-10-28 18:01:36 +08:00
parent 7ff4c95b0f
commit 9bf86fdd46
2 changed files with 48 additions and 0 deletions

11
src/api/setting-api.js Normal file
View File

@ -0,0 +1,11 @@
import request from '@/utils/request'
export default {
sync(params) {
return request({
url: 'setting/sync',
method: 'get',
params
})
}
}

View File

@ -0,0 +1,37 @@
<template>
<div class="app-container" v-wechat-title="title">
<el-card class="box-card">
同步网盘
<el-button type="primary" :loading="syncLoading" @click="sync"><i class="el-icon-upload el-icon--right"></i></el-button>
</el-card>
</div>
</template>
<script>
import settingApi from "@/api/setting-api";
export default {
data() {
return {
title: '网盘管理',
syncLoading: false
}
},
methods: {
sync() {
this.syncLoading = true
settingApi.sync({username: this.$store.state.user.name}).then(() => {
this.syncLoading = false
})
}
}
}
</script>
<style scoped>
</style>