remoteList.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. </uni-list>
  16. </uni-collapse>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import uniList from '@/components/uni-list/uni-list.vue'
  22. import uniListItem from '@/components/uni-list-item/uni-list-item.vue'
  23. import {
  24. mapState,
  25. mapActions,
  26. mapMutations
  27. } from 'vuex'
  28. export default {
  29. data() {
  30. return {
  31. show: true,
  32. show2: true
  33. }
  34. },
  35. onShow(state) {
  36. var globalUser = uni.getStorageSync("globalUser");
  37. var gid = globalUser.id;
  38. var name = globalUser.name;
  39. // if (gid != 1||gid != 236||name!="邱咪") {
  40. // this.show = true;
  41. // this.show2 = true;
  42. // }
  43. },
  44. methods: {
  45. sugar() {
  46. uni.navigateTo({
  47. url: 'dosugar',
  48. });
  49. },
  50. parameters() {
  51. uni.navigateTo({
  52. url: './parameters',
  53. });
  54. },
  55. alarmClock() {
  56. uni.navigateTo({
  57. url: 'alarmClockList',
  58. });
  59. },
  60. }
  61. }
  62. </script>
  63. <style>
  64. </style>