Browse Source

添加退出应用按钮

master
huanglingchen 4 months ago
parent
commit
50a9907e6e
1 changed files with 3 additions and 11 deletions
  1. +3
    -11
      pages/index/index.vue

+ 3
- 11
pages/index/index.vue View File

@ -8,9 +8,9 @@
<span :class="optionIndex==0?'pitch':''" @click="cutOption(0)">控制面板</span>
<span :class="optionIndex==1?'pitch':''" @click="cutOption(1)">车辆面板</span>
</view>
<!-- <view class="outButton">
<view class="outButton">
<span :class="optionIndex==2?'pitch':''" @click="outLogin()">退出</span>
</view> -->
</view>
<controlPage v-if="optionIndex==0" :Data='deviceData'></controlPage>
<carPage v-if="optionIndex==1" :carData='deviceData'></carPage>
@ -53,15 +53,7 @@
content: '是否退出',
success: (res)=>{
if (res.confirm) {
httpPost({
url:'/logout',
data:{}
}).then((res)=>{
console.log(res)
uni.reLaunch({
url:"/pages/login/LoginPage"
})
})
plus.runtime.quit();
} else if (res.cancel) {
console.log('用户点击取消');
}


Loading…
Cancel
Save