修改为最新的数据库备份协议

This commit is contained in:
fangxiang 2023-02-14 19:32:51 +08:00
parent a2102bdb5e
commit 71abf1bba2
2 changed files with 47 additions and 45 deletions

View File

@ -1,33 +1,33 @@
export namespace HttpProtocol {
export const DefaultHttpPort = 80;
export const RequestUploadFile = "/upload_file";
export const RequestPathUpdateDBBackupFile = "/common/update_db_backup_file";
export const RequestPathDBBackup = "/db_backup";
export const RequestPathListFile = "/list_file";
export const RequestPathCreateDirectory = "/create_directory";
export const RequestPathCheckFileSupport = "/check_file_support";
export const RequestPathGetWebscoketPort = "/get_websocket_port";
export const RequestPathGetAllPort = "/get_all_port";
export const RequestPathDeleteFile = "/delete_file";
export const RequestPathRenameFile = "/rename_file";
export const RequestCheckModeIndex = "/check_mode_index";
export const HttpUploadTypeNormal = "U_T_Normal";
export const UploadTypeBackgroundImage = "U_T_BACKGROUND_IMAGE";
export const UploadTypeMedia = "U_T_MEDIA";
export const UploadTypeDatabase = "U_T_DATABASE";
export const UploadTypeRootFS = "U_T_ROOT_FS";
export const UploadTypeSoftware = "U_T_SOFTWARE";
export const kHeaderXFileLength = "X-File-Length";
export const kHeaderXFileMD5 = "X-File-MD5";
export const kHeaderXProductName = "X-Product-Name";
const kHeaderDefaultValueXProductName = "LED_PLAYER";
export const getProductName = ($store: any): String => {
if ($store && $store.state && $store.state.product_name) {
return $store.state.product_name;
}
return kHeaderDefaultValueXProductName;
};
}
export namespace HttpProtocol {
export const DefaultHttpPort = 80;
export const RequestUploadFile = "/upload_file";
export const RequestPathUpdateDBBackupFile = "/update_db_backup_file";
export const RequestPathDBBackup = "/download_db_backup_file";
export const RequestPathListFile = "/list_file";
export const RequestPathCreateDirectory = "/create_directory";
export const RequestPathCheckFileSupport = "/check_file_support";
export const RequestPathGetWebscoketPort = "/get_websocket_port";
export const RequestPathGetAllPort = "/get_all_port";
export const RequestPathDeleteFile = "/delete_file";
export const RequestPathRenameFile = "/rename_file";
export const RequestCheckModeIndex = "/check_mode_index";
export const HttpUploadTypeNormal = "U_T_Normal";
export const UploadTypeBackgroundImage = "U_T_BACKGROUND_IMAGE";
export const UploadTypeMedia = "U_T_MEDIA";
export const UploadTypeDatabase = "U_T_DATABASE";
export const UploadTypeRootFS = "U_T_ROOT_FS";
export const UploadTypeSoftware = "U_T_SOFTWARE";
export const kHeaderXFileLength = "X-File-Length";
export const kHeaderXFileMD5 = "X-File-MD5";
export const kHeaderXProductName = "X-Product-Name";
const kHeaderDefaultValueXProductName = "LED_PLAYER";
export const getProductName = ($store: any): String => {
if ($store && $store.state && $store.state.product_name) {
return $store.state.product_name;
}
return kHeaderDefaultValueXProductName;
};
}

View File

@ -305,7 +305,10 @@
<q-item
clickable
:disable="!$store.state.power_state"
v-if="$store.state.isLedPlayer()&&!$store.state.custom_defines.function_magic_wall"
v-if="
$store.state.isLedPlayer() &&
!$store.state.custom_defines.function_magic_wall
"
v-close-popup
@click="
($store.state.isSpecialVideo()
@ -338,9 +341,6 @@
</q-item-section>
</q-item>
<q-item
clickable
:disable="!$store.state.power_state"
@ -447,7 +447,7 @@
$refs.fusion_settings_dialog.showDialog();
getconfig();
"
v-if="$store.state.custom_defines.function_fusion"
v-if="$store.state.custom_defines.function_fusion"
>
<q-item-section avatar>
<q-icon name="open_with" />
@ -457,7 +457,6 @@
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@ -505,7 +504,7 @@
<q-item v-else>
<q-item-section avatar style="margin-right: 0px; padding-right: 0px">
<q-btn
flat
flat
@click="isfullbtn()"
:icon="isfull ? 'fullscreen_exit' : 'fullscreen'"
/>
@ -711,9 +710,9 @@ export default defineComponent({
show_device_list.value =
typeof (<any>window).user_search?.hide_device_list == "undefined";
});
let isfan=ref(true)
let isfan = ref(true);
if ((window as any).$wujie) {
isfan.value=false
isfan.value = false;
}
return {
show_advanced_menu,
@ -738,8 +737,11 @@ export default defineComponent({
console.log(url.toString());
let response = await api.get(url.toString());
if (response.status == 200 && response && response.data) {
url.pathname =
HttpProtocol.RequestPathDBBackup + "/" + response.data;
console.log(response.data);
url.pathname = HttpProtocol.RequestPathDBBackup;
url.searchParams.append("name", response.data);
console.log(url);
openURL(url.toString());
} else {
$q.notify({
@ -992,7 +994,7 @@ export default defineComponent({
isfull.value = !isfull.value;
if ((window as any).$wujie) {
const $wujie = (window as any).$wujie as IWuJieInterface;
$wujie?.bus.$emit("isfull", isfull.value);
$wujie?.bus.$emit("isfull", isfull.value);
}
},
};