import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'

export default defineUniPages({
  globalStyle: {
    navigationStyle: 'default',
    navigationBarTitleText: 'unibest',
    navigationBarBackgroundColor: '#f8f8f8',
    navigationBarTextStyle: 'black',
    backgroundColor: '#FFFFFF',
  },
  easycom: {
    autoscan: true,
    custom: {
      '^wd-(.*)': 'wot-design-uni/components/wd-$1/wd-$1.vue',
      '^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)':
        'z-paging/components/z-paging$1/z-paging$1.vue',
    },
  },
  tabBar: {
    color: '#999999',
    selectedColor: '#018d71',
    backgroundColor: '#F8F8F8',
    borderStyle: 'black',
    fontSize: '10px',
    iconWidth: '24px',
    spacing: '3px',
    custom: true,
    height: '0px',
    list: [
      {
        pagePath: 'pages/home/index',
      },
      {
        pagePath: 'pages/material/index',
      },
      // {
      //   pagePath: 'pages/publish/index',
      // },
      {
        pagePath: 'pages/messages/index',
      },
      {
        pagePath: 'pages/mine/index',
      },
    ],
  },
  condition: {
    current: -1,
    list: [
      { name: '设计游学', path: 'pages/index/study-tour/index' },
      { name: '登录', path: 'pages/login/index' },
      { name: '开发登录', path: 'pages/login/index', query: 'type=test' },
      { name: '我的', path: 'pages/mine/index' },
      { name: '设计师认证', path: 'pages/mine/authentication/index' },
      { name: '设计师认证提交成功', path: 'pages/mine/authentication/submit/success/index' },
      { name: '设计师个人主页', path: 'pages/mine/homepage/index' },
      {
        name: '确认订单',
        path: '/pages/home/mall/confirm-order/index',
        query:
          'data={"isShoppingCart":1,"userId":287,"list":[{"orderNo":"241030170642FX00009","productId":"67131ee4e4b06312aac7e0e9","productName":null,"points":123,"nums":1,"orderImgUrl":"https://image.zhuchaohui.com/zhucaohui/8e5ed57d8a1c8826c9cadb01d2ee39f584c6af1c0269f82c72d60c5461b5f790.png"},{"orderNo":"241030170642FX00010","productId":"67208f37d5c1cec120ffcaae","productName":null,"points":30,"nums":3,"orderImgUrl":"https://image.zhuchaohui.com/zhucaohui/8a4db4e05845032124460e1eeda0a9f2419dd1014947e3f26652da1fa1cc4b54.jpeg"}],"couponList":[],"totalsPoints":213,"totalsCouponPoints":0,"totalsCurrPoints":0}',
      },
      { name: '商品兑换成功', path: '/pages/home/mall/purchased/success/index' },
      { name: '购物车', path: '/pages/home/mall/shopping-cart/index' },
      { name: '支付成功', path: '/pages/mine/scan/pay/success/index' },
    ],
  },
})
