import { lan } from "@/utils/config";
import setting from '@/view/setting'
import updateEmail from '@/view/updateEmail'
import updatePhone from '@/view/updatePhone'
import updatePassword from '@/view/updatePassword'
import updateDealPassword from '@/view/updateDealPassword'
import updateName from '@/view/updateName'
import updateSex from '@/view/updateSex'
import updateIntroduction from '@/view/updateIntroduction'
import updatebusinessCard from '@/view/updatebusinessCard'
import frozen from '@/view/frozen'
import authIdentity from '@/view/authIdentity'
import authSuccess from '@/view/authSuccess'
import authFail from '@/view/authFail'
import editOptional from '@/view/market/favoriteView/edit'

export default [
  {
    path: '/:locale' + lan + '?/setting',
    component: setting,
    name: 'setting',
    meta: { keepAlive: true, mustLogin: true }
  },
  {
    path: '/:locale' + lan + '?/optional/edit',
    component: editOptional,
    name: 'editOptional',
    meta: { mustLogin: false }
  },
  {
    path: '/:locale' + lan + '?/email',
    component: updateEmail,
    name: 'updateEmail',
    meta: { mustLogin: true }
  },
  {
    path: '/:locale' + lan + '?/phone',
    component: updatePhone,
    name: 'updatePhone',
    meta: { mustLogin: true }
  },
  {
    path: '/:locale' + lan + '?/password',
    component: updatePassword,
    name: 'updatePassword',
    meta: { mustLogin: true }
  },
  {
    path: '/:locale' + lan + '?/deal',
    component: updateDealPassword,
    name: 'updateDealPassword',
    meta: { mustLogin: true }
  },
  {
    path: '/:locale' + lan + '?/name',
    component: updateName,
    name: 'updateName',
    meta: { mustLogin: true }
  },
  {
    path: '/:locale' + lan + '?/frozen',
    component: frozen,
    name: 'frozen',
    meta: { mustLogin: true }
  },
  {
    path: '/:locale' + lan + '?/auth',
    component: authIdentity,
    name: 'authIdentity',
    meta: { mustLogin: true }
  },
  {
    path: '/:locale' + lan + '?/auth-fail',
    component: authFail,
    name: 'authFail',
    meta: { mustLogin: true }
  },
  {
    path: '/:locale' + lan + '?/auth-success',
    component: authSuccess,
    name: 'authSuccess',
    meta: { mustLogin: true }
  },
  {
    path: '/:locale' + lan + '?/sex',
    component: updateSex,
    name: 'updateSex',
    meta: { mustLogin: true }
  },
  {
    path: '/:locale' + lan + '?/introduction',
    component: updateIntroduction,
    name: 'updateIntroduction',
    meta: { mustLogin: true }
  },
  {
    path: '/:locale' + lan + '?/business-card',
    component: updatebusinessCard,
    name: 'updatebusinessCard',
    meta: { mustLogin: true }
  },
]