work_order/pages/test/test.vue

54 lines
1.0 KiB
Vue
Raw Normal View History

2024-01-07 14:26:19 +08:00
<template>
2024-01-11 19:12:26 +08:00
<view>
<!-- <button type="primary" @click="open">开始定位(已获取{{count}})</button>
2024-01-07 14:26:19 +08:00
<button type="primary" @click="close">停止定位</button>
<view v-for="(item, index) in list" :key="index" :class="item.type==0?'green': 'red'">
<view>{{item.a}}</view>
<view style="color: #333;">{{item.b}}</view>
2024-01-11 19:12:26 +08:00
</view> -->
<button type="primary" @click="logout">退出登录</button>
</view>
2024-01-07 14:26:19 +08:00
</template>
<script>
2024-01-11 19:12:26 +08:00
export default {
data() {
return {
list: [],
count: 0
}
},
onLoad() {
console.log(this.userInfo);
},
computed: {
userInfo(){
return this.$store.state.app.userInfo;
}
},
methods: {
open() {
},
close() {
},
logout() {
this.$store.commit('LOGOUT');
uni.redirectTo({
url: '/pages/login/login'
})
}
}
}
2024-01-07 14:26:19 +08:00
</script>
<style lang="scss">
2024-01-11 19:12:26 +08:00
.green {
color: green;
}
.red {
color: red;
}
</style>