remoteList.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. <view v-show="show3">
  22. <uni-list-item title="解绑机器" @click="jiebang()" />
  23. </view>
  24. <view v-show="show3">
  25. <uni-list-item title="连接服务器审核" @click="lianjie()" />
  26. </view>
  27. </uni-list>
  28. </uni-collapse>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import uniList from '@/components/uni-list/uni-list.vue'
  34. import uniListItem from '@/components/uni-list-item/uni-list-item.vue'
  35. import {
  36. mapState,
  37. mapActions,
  38. mapMutations
  39. } from 'vuex'
  40. import {
  41. dateUtils
  42. } from '@/common/util.js';
  43. export default {
  44. data() {
  45. return {
  46. show: true,
  47. show2: true,
  48. show3:false
  49. }
  50. },
  51. onShow(state) {
  52. var globalUser = uni.getStorageSync("globalUser");
  53. var gid = globalUser.id;
  54. var name = globalUser.name;
  55. if(gid == 1150){
  56. this.show3 = true;
  57. }
  58. // if (gid != 1||gid != 236||name!="邱咪") {
  59. // this.show = true;
  60. // this.show2 = true;
  61. // }
  62. },
  63. methods: {
  64. sugar() {
  65. uni.navigateTo({
  66. url: 'dosugar',
  67. });
  68. },
  69. flowers(){
  70. uni.navigateTo({
  71. url:'flowerShow'
  72. })
  73. },
  74. parameters() {
  75. uni.navigateTo({
  76. url: './parameters',
  77. });
  78. },
  79. alarmClock() {
  80. uni.navigateTo({
  81. url: 'alarmClockList',
  82. });
  83. },
  84. volume() {
  85. uni.navigateTo({
  86. url: 'volume',
  87. });
  88. },
  89. jiebang() {
  90. uni.navigateTo({
  91. url: 'jiebang',
  92. });
  93. },
  94. lianjie() {
  95. uni.navigateTo({
  96. url: 'lianjie',
  97. });
  98. },
  99. }
  100. }
  101. </script>
  102. <style>
  103. </style>