remoteList.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <view>
  3. <view>
  4. <uni-collapse :accordion="true">
  5. <uni-list>
  6. <view v-show="show">
  7. <uni-list-item :title="$t('remoteList.dosugur')" @click="sugar()" />
  8. </view>
  9. <view v-show="show">
  10. <uni-list-item :title="$t('remoteList.flowers')" @click="flowers()" />
  11. </view>
  12. <view v-show="show2">
  13. <uni-list-item :title="$t('remoteList.parameters')" @click="parameters()" />
  14. </view>
  15. <view v-show="show">
  16. <uni-list-item :title="$t('remoteList.alarmClock')" @click="alarmClock()" />
  17. </view>
  18. <view v-show="show">
  19. <uni-list-item :title="$t('remoteList.volume')" @click="volume()" />
  20. </view>
  21. </uni-list>
  22. </uni-collapse>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import uniList from '@/components/uni-list/uni-list.vue'
  28. import uniListItem from '@/components/uni-list-item/uni-list-item.vue'
  29. import {
  30. mapState,
  31. mapActions,
  32. mapMutations
  33. } from 'vuex'
  34. import {
  35. dateUtils
  36. } from '@/common/util.js';
  37. export default {
  38. data() {
  39. return {
  40. show: true,
  41. show2: true
  42. }
  43. },
  44. onShow(state) {
  45. var globalUser = uni.getStorageSync("globalUser");
  46. var gid = globalUser.id;
  47. var name = globalUser.name;
  48. // if (gid != 1||gid != 236||name!="邱咪") {
  49. // this.show = true;
  50. // this.show2 = true;
  51. // }
  52. },
  53. methods: {
  54. sugar() {
  55. uni.navigateTo({
  56. url: 'dosugar',
  57. });
  58. },
  59. flowers(){
  60. uni.navigateTo({
  61. url:'flowerShow'
  62. })
  63. },
  64. parameters() {
  65. uni.navigateTo({
  66. url: './parameters',
  67. });
  68. },
  69. alarmClock() {
  70. uni.navigateTo({
  71. url: 'alarmClockList',
  72. });
  73. },
  74. volume() {
  75. uni.navigateTo({
  76. url: 'volume',
  77. });
  78. },
  79. }
  80. }
  81. </script>
  82. <style>
  83. </style>