remoteList.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view>
  3. <view>
  4. <uni-collapse :accordion="true">
  5. <uni-list>
  6. <view v-show="show">
  7. <uni-list-item title="远程做糖" @click="sugar()" />
  8. </view>
  9. <view v-show="show2">
  10. <uni-list-item title="参数调整" @click="parameters()" />
  11. </view>
  12. <view v-show="show">
  13. <uni-list-item title="闹钟" @click="alarmClock()" />
  14. </view>
  15. <view v-show="show">
  16. <uni-list-item title="机器音量调节" @click="volume()" />
  17. </view>
  18. </uni-list>
  19. </uni-collapse>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. import uniList from '@/components/uni-list/uni-list.vue'
  25. import uniListItem from '@/components/uni-list-item/uni-list-item.vue'
  26. import {
  27. mapState,
  28. mapActions,
  29. mapMutations
  30. } from 'vuex'
  31. export default {
  32. data() {
  33. return {
  34. show: true,
  35. show2: true
  36. }
  37. },
  38. onShow(state) {
  39. var globalUser = uni.getStorageSync("globalUser");
  40. var gid = globalUser.id;
  41. var name = globalUser.name;
  42. // if (gid != 1||gid != 236||name!="邱咪") {
  43. // this.show = true;
  44. // this.show2 = true;
  45. // }
  46. },
  47. methods: {
  48. sugar() {
  49. uni.navigateTo({
  50. url: 'dosugar',
  51. });
  52. },
  53. parameters() {
  54. uni.navigateTo({
  55. url: './parameters',
  56. });
  57. },
  58. alarmClock() {
  59. uni.navigateTo({
  60. url: 'alarmClockList',
  61. });
  62. },
  63. volume() {
  64. uni.navigateTo({
  65. url: 'volume',
  66. });
  67. },
  68. }
  69. }
  70. </script>
  71. <style>
  72. </style>