【类 型】:feat topbar的刷新按钮 让esp向飞控刷新请求功能
【原 因】: 【过 程】:发布refreshRequest主题 【影 响】:
This commit is contained in:
parent
0149d4be59
commit
f98d53769e
@ -153,6 +153,7 @@ import Breadcrumb from '@/components/Breadcrumb'
|
||||
import QuestTabs from '@/components/QuestTabs'
|
||||
import SelectionShopId from '@/components/SelectionShopId'
|
||||
import { speakText } from '@/utils/index'
|
||||
import mqtt from '@/utils/mqtt'
|
||||
|
||||
export default {
|
||||
name: 'Headbar',
|
||||
@ -305,7 +306,7 @@ export default {
|
||||
* @description: 刷新当前页面
|
||||
*/
|
||||
refreshPage () {
|
||||
/* init */
|
||||
/* init 数据接口 */
|
||||
this.$store.commit('app/setIsMobile') // 获取客户端平台类型
|
||||
this.$store.dispatch('fetchAirList') // 获取飞机列表
|
||||
this.$store.dispatch('fetchShopList') // 获取商铺列表
|
||||
@ -314,6 +315,8 @@ export default {
|
||||
this.$store.dispatch('fetchRouteList') // 获取航线列表
|
||||
this.$store.dispatch('fetchCategoryList') // 获取分类列表(小程序)
|
||||
this.$store.dispatch('fetchPaidOrderList') // 获取订单列表
|
||||
/* 向飞发送 让飞控刷新各种请求 */
|
||||
mqtt.publishFun(`cmd/${this.plane.macadd}`, '{"refreshRequest":1}')
|
||||
},
|
||||
/**
|
||||
* @description: 登出
|
||||
|
@ -11,7 +11,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mqtt from '@/utils/mqtt'
|
||||
import MapBox from '@/components/MapBox'
|
||||
import ControllerTabs from '@/components/ControllerTabs'
|
||||
import BatteryStatus from '@/components/BatteryStatus'
|
||||
@ -99,9 +98,6 @@ export default {
|
||||
mounted () {
|
||||
if (this.plane) {
|
||||
this.makePlane(this.plane) // 创建飞机图标
|
||||
if (!this.plane.planeState.battCapacity) {
|
||||
mqtt.publishFun(`cmd/${this.plane.macadd}`, '{"getBattCapacity":1}')// 发送设置飞机状态主题 请求飞控返回 电池总容量
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
Loading…
Reference in New Issue
Block a user