index.vue 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <oa-scroll
  3. customClass="doorSetting-container scroll-height"
  4. :customStyle="{
  5. //#ifdef APP-PLUS || MP-WEIXIN
  6. height: `calc(100vh - (0px))`,
  7. //#endif
  8. //#ifdef H5
  9. height: `calc(100vh - (0px))`,
  10. //#endif
  11. }"
  12. :refresherLoad="false"
  13. :refresherEnabled="false"
  14. :refresherDefaultStyle="'none'"
  15. :refresherBackground="'#f5f6f7'"
  16. :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
  17. >
  18. <template #default>
  19. <text class="iconfont oaIcon-exit" @click="handleExit()"></text>
  20. <view class="Grid">
  21. <view class="Grid-item" @click="handle('serve')">
  22. <image class="Grid-item-image" src="@/static/face/img/serveSetting.png"></image>
  23. <view class="Grid-item-lable">服务器配置</view>
  24. </view>
  25. <view class="Grid-item" @click="handle('other')">
  26. <image class="Grid-item-image" src="@/static/face/img/otherSetting.png"></image>
  27. <view class="Grid-item-lable">门禁配置</view>
  28. </view>
  29. <view class="Grid-item" @click="handle('sysetm')">
  30. <image class="Grid-item-image" src="@/static/face/img/sysetmSetting.png"></image>
  31. <view class="Grid-item-lable">更多配置</view>
  32. </view>
  33. <view class="Grid-item" @click="handle('public')">
  34. <image class="Grid-item-image" src="@/static/face/img/sysetmSetting.png"></image>
  35. <view class="Grid-item-lable">公共设置</view>
  36. </view>
  37. <view class="Grid-item" @click="startActivity()">
  38. <image class="Grid-item-image" src="@/static/face/img/sysetmSetting.png"></image>
  39. <view class="Grid-item-lable">测试</view>
  40. </view>
  41. </view>
  42. </template>
  43. </oa-scroll>
  44. </template>
  45. <script setup>
  46. /*----------------------------------依赖引入-----------------------------------*/
  47. import config from "@/config";
  48. import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
  49. import { ref, reactive, computed, getCurrentInstance, toRefs, inject, nextTick, watch } from "vue";
  50. /*----------------------------------接口引入-----------------------------------*/
  51. /*----------------------------------组件引入-----------------------------------*/
  52. /*----------------------------------store引入-----------------------------------*/
  53. import { controlStores, commonStores } from "@/store/modules/index";
  54. /*----------------------------------公共方法引入-----------------------------------*/
  55. const { proxy } = getCurrentInstance();
  56. const controlStore = controlStores();
  57. const commonStore = commonStores();
  58. /*----------------------------------公共变量-----------------------------------*/
  59. const state = reactive({});
  60. const {} = toRefs(state);
  61. function handle(type) {
  62. if (type == "serve") {
  63. proxy.$tab.navigateTo("/pages/door/setting/serve/index");
  64. } else if (type == "other") {
  65. if (!controlStore.form.linkUrl) {
  66. proxy.$modal.msg("请先配置服务器信息!");
  67. return;
  68. }
  69. proxy.$tab.navigateTo("/pages/door/setting/other/index");
  70. } else if (type == "public") {
  71. proxy.$tab.navigateTo("/pages/door/setting/public/index");
  72. } else if (type == "sysetm") {
  73. proxy.$tab.navigateTo("/pages/door/setting/system/index");
  74. }
  75. }
  76. function handleExit() {
  77. proxy.$tab.navigateBack(1);
  78. }
  79. function startActivity() {
  80. proxy.$sys.getEthernetIpAddress();
  81. //#ifdef APP-PLUS
  82. const phPlugin = uni.requireNativePlugin("phPlugin");
  83. phPlugin.startActivity();
  84. //#endif
  85. }
  86. onLoad((options) => {
  87. controlStore.initData(); //初始化数据
  88. });
  89. </script>
  90. <style lang="scss">
  91. @import "./index.scss";
  92. </style>