<template>
  <view class="about-container">
    <u-navbar :titleStyle="{ color: '#fff' }" :autoBack="true" title="关于我们" :placeholder="true" :safeAreaInsetTop="true" :bgColor="proxy.$settingStore.themeColor.color">
      <template #left>
        <view class="u-navbar__content__left__item">
          <u-icon name="arrow-left" size="20" color="#fff"></u-icon>
        </view>
      </template>
    </u-navbar>

    <view class="oa-header-section text-center">
      <image style="width: 130rpx; height: 130rpx" mode="heightFix" :src="useStore.loginLogo" v-if="useStore.loginLogo" />
      <image style="width: 130rpx; height: 130rpx" mode="heightFix" src="http://192.168.123.165:9300/statics/logo200.png" v-else />
      <uni-title type="h2" :title="useStore.loginTitle"></uni-title>
    </view>

    <view class="oa-content-section">
      <view class="menu-list mt0 mlr0">
        <view class="list-cell list-cell-arrow">
          <view class="menu-item">
            <view>版本信息</view>
            <view class="text-right">v{{ version }}</view>
          </view>
        </view>
        <view class="list-cell list-cell-arrow">
          <view class="menu-item">
            <view>官方邮箱</view>
            <view class="text-right">{{ email }}</view>
          </view>
        </view>
        <view class="list-cell list-cell-arrow">
          <view class="menu-item">
            <view>服务热线</view>
            <view class="text-right">{{ hotline }}</view>
          </view>
        </view>
        <view class="list-cell list-cell-arrow">
          <view class="menu-item">
            <view>公司网站</view>
            <view class="text-right">
              <uni-link :href="url" :text="url" showUnderLine="false"></uni-link>
            </view>
          </view>
        </view>
      </view>
    </view>

    <view class="oa-footer-section">
      <view>{{ copyright }}</view>
      <u-text :text="filingInfo.code" :href="filingInfo.href" mode="link" align="center" size="12"></u-text>
    </view>
  </view>
</template>

<script setup>
/*----------------------------------依赖引入-----------------------------------*/
import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
/*----------------------------------接口引入-----------------------------------*/
/*----------------------------------组件引入-----------------------------------*/
/*----------------------------------store引入-----------------------------------*/
import { useStores, commonStores } from "@/store/modules/index";
/*----------------------------------公共方法引入-----------------------------------*/
import config from "@/config";
/*----------------------------------公共变量-----------------------------------*/
const { proxy } = getCurrentInstance();
const useStore = useStores();
/*----------------------------------变量声明-----------------------------------*/
const state = reactive({
  url: computed(() => {
    return config.appInfo.site_url;
  }),
  version: computed(() => {
    return config.appInfo.version;
  }),
  email: computed(() => {
    return config.appInfo.email;
  }),
  hotline: computed(() => {
    return config.appInfo.hotline;
  }),
  copyright: computed(() => {
    return config.appInfo.copyright;
  }),
  filingInfo: computed(() => {
    return config.appInfo.filingInfo;
  }),
});

const { url, version, email, hotline, copyright, filingInfo } = toRefs(state);

onShow(() => {
  //调用系统主题颜色
  proxy.$settingStore.systemThemeColor([1]);
});
</script>

<style lang="scss" scoped>
.about-container {
  .oa-header-section {
    display: flex;
    padding: 15px 0;
    flex-direction: column;
    align-items: center;
  }

  .oa-footer-section {
    margin-top: 25px;
    text-align: center;
    line-height: 30px;
    color: #999;
    font-size: 12px;

    :deep(.u-text__value) {
      justify-content: center;
    }
  }
}
</style>