重定位

This commit is contained in:
2025-08-18 13:51:04 +08:00
parent fc92bf1755
commit 5dc0b64860
6 changed files with 73 additions and 5 deletions

View File

@@ -46,6 +46,7 @@
</template>
<script>
import { rebootVehicle } from '../../config/getData.js'
import { mapGetters, mapActions } from 'vuex'
export default {
data () {
@@ -125,7 +126,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.initLink()
this._rebootVehicle()
}).catch(() => {
this.$message({
type: 'info',
@@ -133,6 +134,23 @@ export default {
})
})
},
async _rebootVehicle () {
try {
this.loading = this.$loading({
lock: true,
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.6)'
})
let res = await rebootVehicle()
if (res) {
this.initLink()
}
this.loading.close()
} catch (e) {
this.$message.error(e)
this.loading.close()
}
},
initLink () {
let link = 'stservice://systech.com:8088/router?data=reboot'
const a = document.createElement('a')