<template>
  <view>
    <view class="swiper-container">
      <up-swiper
          :list="list1"
          indicator
          circular
          indicatorMode="dot"
          height="370rpx"
      ></up-swiper>
    </view>
    <view class="container">
      <view class="container-list">
        <view class="mb28 col3 font32">合伙人工作台</view>
        <!--  申请加入     -->
        <view class="container-list-but font28" v-if="show">
          <view class="flex flex-between">
            <view @click="handleAdd(1)">
              <view class="mb20">无门槛无需服务，轻松赚取高达</view>
              <view class="mb20">80%宠物服务订单收益</view>
              <view class="font24 add-but col-white">申请加入 ></view>
            </view>
            <image src="https://cdn.catmdogd.com/Work/image/work/hhr.png"></image>
          </view>
        </view>
        <!-- 申请加入后       -->
        <view class="flex flex-between font24 flex-wrap" v-else>
          <view class="icon-list" @click="handleGoto(1)">
            <up-image class="mb20" :show-loading="true" src="https://cdn.catmdogd.com/Work/image/work/icon1.png"
                      width="68rpx"
                      height="68rpx"></up-image>
            <view>用户绑定</view>
          </view>
          <view class="icon-list" @click="handleGoto(2)">
            <up-image class="mb20" :show-loading="true" src="https://cdn.catmdogd.com/Work/image/work/icon2.png"
                      width="68rpx"
                      height="68rpx"></up-image>
            <view>我的用户</view>
          </view>
          <view class="icon-list" @click="handleGoto(3)">
            <up-image class="mb20" :show-loading="true" src="https://cdn.catmdogd.com/Work/image/work/icon3.png"
                      width="68rpx"
                      height="68rpx"></up-image>
            <view>我的等级</view>
          </view>
          <view class="icon-list">
            <up-image class="mb20" :show-loading="true" src="https://cdn.catmdogd.com/Work/image/work/icon4.png"
                      width="68rpx"
                      height="68rpx"></up-image>
            <view>我的分成</view>
          </view>
          <view class="icon-list">
            <up-image class="mb20" :show-loading="true" src="https://cdn.catmdogd.com/Work/image/work/icon5.png"
                      width="68rpx"
                      height="68rpx"></up-image>
            <view>指导手册</view>
          </view>
          <view class="icon-list"></view>
        </view>
        <up-swiper
            :list="list1"
            indicator
            circular
            indicatorMode="dot"
            height="200rpx"
        ></up-swiper>
      </view>
      <view class="container-list">
        <view class="mb28 col3 font32">伴宠师工作台</view>
        <!--  申请之前       -->
        <view class="container-list-but" style="background: #FFECE5" v-if="show">
          <view class="flex flex-between">
            <view @click="handleAdd(2)">
              <view class="mb20">布丁认证上门宠物服务，与宠物</view>
              <view class="mb20">亲密接触，获得服务报酬</view>
              <view class="font24 add-but col-white" style="background: #FF8343">申请加入 ></view>
            </view>
            <image src="https://cdn.catmdogd.com/Work/image/work/bcs.png"></image>
          </view>
        </view>
        <!--  申请之后      -->
        <!-- 申请加入后       -->
        <view class="flex flex-between font24 flex-wrap" v-else>
          <view class="icon-list">
            <up-image class="mb20" :show-loading="true" src="https://cdn.catmdogd.com/Work/image/work/icon1.png"
                      width="68rpx"
                      height="68rpx"></up-image>
            <view>服务信息</view>
          </view>
          <view class="icon-list">
            <up-image class="mb20" :show-loading="true" src="https://cdn.catmdogd.com/Work/image/work/icon2.png"
                      width="68rpx"
                      height="68rpx"></up-image>
            <view>接单地址</view>
          </view>
          <view class="icon-list">
            <up-image class="mb20" :show-loading="true" src="https://cdn.catmdogd.com/Work/image/work/icon3.png"
                      width="68rpx"
                      height="68rpx"></up-image>
            <view>我的页面</view>
          </view>
          <view class="icon-list">
            <up-image class="mb20" :show-loading="true" src="https://cdn.catmdogd.com/Work/image/work/icon4.png"
                      width="68rpx"
                      height="68rpx"></up-image>
            <view>服务记录</view>
          </view>
          <view class="icon-list">
            <up-image class="mb20" :show-loading="true" src="https://cdn.catmdogd.com/Work/image/work/icon5.png"
                      width="68rpx"
                      height="68rpx"></up-image>
            <view>我的评价</view>
          </view>
          <view class="icon-list">
            <up-image class="mb20" :show-loading="true" src="https://cdn.catmdogd.com/Work/image/work/icon5.png"
                      width="68rpx"
                      height="68rpx"></up-image>
            <view>平台手册</view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script setup>
import {reactive, ref} from "vue";
import tab from "../../plugins/tab";
import {getLoginStatus} from "../../utils/useMixin";

const show = ref(true)
const list1 = reactive([
  'https://cdn.uviewui.com/uview/swiper/swiper1.png',
  'https://cdn.uviewui.com/uview/swiper/swiper2.png',
  'https://cdn.uviewui.com/uview/swiper/swiper3.png',
]);
const handleGoto = (val) => {
  switch (val) {
    case 1:
      tab.navigateTo('/otherPages/workbenchManage/bindUser/index')
      break;
    case 2:
      tab.navigateTo('/otherPages/workbenchManage/myUser/index')
      break;
    case 3:
      tab.navigateTo('/otherPages/workbenchManage/myLevel/index')
      break;
  }
}
// 加入合伙人
const handleAdd = (type) => {
  if (!getLoginStatus()) return
  switch (type) {
    case 1:
      break
    case 2:
      tab.navigateTo("/otherPages/workbenchManage/feedingStaff/index")
      break
  }
}
</script>

<style scoped lang="scss">
@import "index";
</style>
