dev
This commit is contained in:
parent
570a0962f8
commit
3b9d87ee3e
|
|
@ -33,7 +33,8 @@
|
||||||
<Mask :is-show="loading" :width="300" :height="300" title="更新版本" :close="false">
|
<Mask :is-show="loading" :width="300" :height="300" title="更新版本" :close="false">
|
||||||
{{ tip_message }}
|
{{ tip_message }}
|
||||||
<div class="demo-progress" style="margin-top: 20px">
|
<div class="demo-progress" style="margin-top: 20px">
|
||||||
<el-progress :percentage="percentage" :format="format"/>
|
<el-progress :percentage="100" :stroke-width="15" striped
|
||||||
|
striped-flow :show-text="false"/>
|
||||||
</div>
|
</div>
|
||||||
</Mask>
|
</Mask>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -129,12 +130,10 @@ let percentage = ref(0)
|
||||||
const tip_message = ref("正在更新目录,请稍后...")
|
const tip_message = ref("正在更新目录,请稍后...")
|
||||||
const start_type = () => {
|
const start_type = () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
percentage.value = 0;
|
|
||||||
post("social/directory_version/get_current", {type: current_tab.value}, {catch_error: true}).then((res: any) => {
|
post("social/directory_version/get_current", {type: current_tab.value}, {catch_error: true}).then((res: any) => {
|
||||||
tip_message.value = "正在更新目录,上一个版本:" + res.currentVersionName + ",请不要强制关闭程序,否则数据不完整";
|
tip_message.value = "正在更新目录,上一个版本:" + res.currentVersionName + ",请不要强制关闭程序,否则数据不完整";
|
||||||
download(res.currentVersionName, current_tab.value);
|
download(res.currentVersionName, current_tab.value);
|
||||||
}).catch((err: any) => {
|
}).catch((err: any) => {
|
||||||
percentage.value = 100
|
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|
@ -145,11 +144,6 @@ const start_type = () => {
|
||||||
}
|
}
|
||||||
let download = (ver: any, type: any) => {
|
let download = (ver: any, type: any) => {
|
||||||
post("social/directory/download", {ver: ver, type: type}).then((res: any) => {
|
post("social/directory/download", {ver: ver, type: type}).then((res: any) => {
|
||||||
percentage.value = setInterval(() => {
|
|
||||||
if (percentage.value < 100) {
|
|
||||||
percentage.value += 1;
|
|
||||||
}
|
|
||||||
}, 100);
|
|
||||||
if (res == null) {
|
if (res == null) {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElNotification({
|
ElNotification({
|
||||||
|
|
@ -161,7 +155,6 @@ let download = (ver: any, type: any) => {
|
||||||
}
|
}
|
||||||
start_type()
|
start_type()
|
||||||
}).catch((err: any) => {
|
}).catch((err: any) => {
|
||||||
percentage.value = 100
|
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue