<!-- 使用 type="home" 属性设置首页，其他页面不需要设置，默认为page；推荐使用json5，更强大，且允许注释 -->
<route lang="json5" type="home">
{
  style: {
    navigationStyle: 'custom',
    navigationBarTitleText: '首页',
  },
}
</route>
<template>
  <view class="containe">
    <!-- 渐变色 -->
    <view class="top-content px-6 pt-18">
      <view class="user-box flex">
        <!-- 左边 -->
        <view class="flex">
          <image src="../../static/logo.png" mode="scaleToFill" class="imgs" />
          <view class="user-text pt-4">
            <text>好闪闪</text>
            <view>技术部:888888</view>
          </view>
        </view>
        <!-- 右边 -->
        <!-- <view>hhhh</view> -->
      </view>
    </view>

    <!-- 工具 -->
    <view class="px-4">
      <view class="tool px-4 pt-2 pb-2">
        <view class="title">工具栏</view>
        <view class="tool-box">
          <view class="tool-item">
            <image
              class="icon pb-1"
              src="../../static/images/tool/editPsd.png"
              mode="scaleToFill"
            />
            <view>脖环管理</view>
          </view>

          <view class="tool-item">
            <image
              class="icon pb-1"
              src="../../static/images/tool/editPsd.png"
              mode="scaleToFill"
            />
            <view>脖环管理</view>
          </view>

          <view class="tool-item">
            <image
              class="icon pb-1"
              src="../../static/images/tool/editPsd.png"
              mode="scaleToFill"
            />
            <view>脖环管理</view>
          </view>

          <view class="tool-item">
            <image
              class="icon pb-1"
              src="../../static/images/tool/editPsd.png"
              mode="scaleToFill"
            />
            <view>脖环管理</view>
          </view>

          <view class="tool-item">
            <image
              class="icon pb-1"
              src="../../static/images/tool/editPsd.png"
              mode="scaleToFill"
            />
            <view>脖环管理</view>
          </view>

          <view class="tool-item">
            <image
              class="icon pb-1"
              src="../../static/images/tool/editPsd.png"
              mode="scaleToFill"
            />
            <view>脖环管理</view>
          </view>
        </view>
      </view>
    </view>

    <!-- 个人信息 -->
    <view class="user-tool px-4 pt-1 pb-1 flex mb-2">
      <view>
        <image class="icons mr-1" src="../../static/images/tool/editPsd.png" mode="scaleToFill" />
        修改密码
      </view>
      <navigator url="/pages/editPassword/editPassword">
        <wd-icon name="arrow-right" color="#8e8e8e" size="22px"></wd-icon>
      </navigator>
    </view>
    <view class="user-tool px-4 pt-1 pb-1 flex mb-2">
      <view>
        <image class="icons mr-1" src="../../static/images/tool/user.png" mode="scaleToFill" />
        客服服务
      </view>
      <wd-icon name="arrow-right" color="#8e8e8e" size="22px"></wd-icon>
    </view>
    <view class="user-tool px-4 pt-1 pb-1 flex">
      <view>
        <image class="icons mr-1" src="../../static/images/tool/advice.png" mode="scaleToFill" />
        服务条款
      </view>
      <navigator url="/pages/serviceText/serviceText">
        <wd-icon name="arrow-right" color="#8e8e8e" size="20px"></wd-icon>
      </navigator>
    </view>
    <view class="user-tool px-4 pt-1 pb-1 flex">
      <view>
        <image class="icons mr-1" src="../../static/images/tool/service.png" mode="scaleToFill" />
        意见反馈
      </view>
      <navigator url="/pages/feedBack/feedBack">
        <wd-icon name="arrow-right" color="#8e8e8e" size="22px"></wd-icon>
      </navigator>
    </view>
  </view>
</template>

<script lang="ts" setup>
defineOptions({
  name: 'Home',
})

onMounted(() => {})

onLoad(() => {})
</script>

<style lang="scss" scoped>
.containe {
  font-size: 24rpx;
  color: #333;
}
.top-content {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: -1;
  height: 260rpx;
  // border: 1px solid red;
  color: #fbeed8;
  text-align: center;
  background: linear-gradient(to bottom, #f59e0b, #f6c986);
}
.user-box {
  justify-content: space-between;
  height: 160rpx;
  // border: 4px solid #000;
  .imgs {
    width: 160rpx;
    height: 160rpx;
    margin-right: 20rpx;
    background: #fff;
    border: 1px solid #fff;
    border-radius: 50%;
  }
  .user-text {
    color: #fff;
    text-align: left;
  }
}
.tool {
  position: relative;
  top: -60rpx;
  margin-top: 400rpx;
  font-size: 24rpx;
  background: #fff;
  border-radius: 28rpx;
  box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.1);
}
.title {
  margin-bottom: 20rpx;
  font-size: 32rpx;
}
.icon {
  width: 80rpx;
  height: 80rpx;
}
.icons {
  width: 50rpx;
  height: 50rpx;
}
.tool-item {
  width: 22%;
  padding: 10rpx 0;
  margin-right: 14rpx;
  margin-bottom: 10rpx;
  // border: 1px solid red;
  text-align: center;
}
.tool-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: left;
}

.user-tool {
  justify-content: space-between;
  height: 60rpx;
  margin-bottom: 1rpx;
  line-height: 60rpx;
  background-color: #fff;
  border-bottom: 1px dotted #f5f5f5;
}
</style>
