Xiao_123 6 miesięcy temu
rodzic
commit
fa714fb921

+ 9 - 14
src/hooks/web/useDictionaries.js

@@ -9,23 +9,10 @@ import {
   getAreaTreeData,
   getPositionData
 } from '@/api/common/index'
-// 定义对应的api
-// const DICT_CITY_API = {
-//   menduner_exp_type: getDictData
-// }
 import { getSecondNodes } from '@/utils/dealData'
 
 // const setDict = (type, val, cacheTime = 7200) => {
 const setDict = (type, val) => {
-  if (type === 'areaTreeData') {
-    const obj = val.find(e => e.name === '中国')
-    val = obj?.children ? obj.children.map(e =>{
-      // 市辖区直接显示区
-      const municipality = e.children && e.children.length && e.children[0].name === '市辖区'
-      if (municipality && e.children[0].children?.length) e.children = e.children[0].children
-      return e
-    }) : []
-  }
   if (type === 'positionSecondData') {
     val = getSecondNodes(val)
   }
@@ -66,7 +53,15 @@ export const getDict = (type, params, apiType = 'dict') => {
         positionSecondData: getPositionTreeData
       }
       apiFn[apiType](query).then(data => {
-        // setDict(type, data, Date.now())
+        if (type === 'areaTreeData') {
+          const obj = data.find(e => e.name === '中国')
+          data = obj?.children ? obj.children.map(e =>{
+            // 市辖区直接显示区
+            const municipality = e.children && e.children.length && e.children[0].name === '市辖区'
+            if (municipality && e.children[0].children?.length) e.children = e.children[0].children
+            return e
+          }) : []
+        }
         setDict(type, data)
         resolve({ data })
       })

+ 19 - 10
src/router/modules/components/recruit/enterprise.js

@@ -276,7 +276,7 @@ const enterprise = [
   {
     component: Layout,
     path: '/recruit/enterprise/financialCenter',
-    redirect: '/recruit/enterprise/membershipPackage',
+    redirect: '/recruit/enterprise/tradingOrder',
     name: 'enterpriseMemberCenter',
     meta: {
       title: '财务中心',
@@ -285,14 +285,6 @@ const enterprise = [
       // isAdmin: true // 企业管理员菜单
     },
     children: [
-      // {
-      //   path: '/recruit/enterprise/membershipPackage',
-      //   meta: {
-      //     title: '会员权益',
-      //     enName: 'Membership Benefits'
-      //   },
-      //   component: () => import('@/views/recruit/enterprise/membershipPackage/index.vue')
-      // },
       {
         path: '/recruit/enterprise/tradingOrder',
         meta: {
@@ -361,6 +353,23 @@ const enterprise = [
       },
       
     ]
-  }
+  },
+  // {
+  //   path: '/recruit/enterprise/membershipPackage',
+  //   component: Layout,
+  //   name: 'membershipPackage',
+  //   meta: {
+  //     title: '会员套餐',
+  //     enName: 'Membership Benefits',
+  //     icon: 'mdi-wallet-membership'
+  //   },
+  //   children: [
+  //     {
+  //       path: '/recruit/enterprise/membershipPackage',
+  //       show: true,
+  //       component: () => import('@/views/recruit/enterprise/membershipPackage/index.vue')
+  //     }
+  //   ]
+  // },
 ]
 export default enterprise

+ 45 - 3
src/views/recruit/enterprise/membershipPackage/index.vue

@@ -1,13 +1,26 @@
 <!-- 购买套餐 -->
 <template>
   <v-card class="card-box pa-3" style="min-width: 1100px;">
-    <v-tabs v-model="tab" align-tabs="center" color="rgb(195 15 15)">
+    <!-- <v-tabs v-model="tab" align-tabs="center" color="rgb(195 15 15)">
       <v-tab :value="0" class="font-weight-bold font-size-18">套餐列表</v-tab>
       <v-tab :value="1" class="font-weight-bold font-size-18">当前套餐</v-tab>
     </v-tabs>
     <Package v-if="tab === 0"></Package>
     <div v-if="tab === 1">
       <empty :elevation="false" message="无购买的套餐内容" class="mt-15"></empty>
+    </div> -->
+
+    <div class="d-flex list">
+      <div v-for="(val, index) in list" :key="index" class="list-item text-center cursor-pointer" :class="{'active': index === active}" @click="active = index">
+        <h4 class="mt-5">{{ val.title }}</h4>
+        <div class="color-primary">
+          <span>¥</span>
+          <span style="font-size: 35px;">{{ val.price }}</span>
+          <span> 元</span>
+        </div>
+        <div class="text-decoration-line-through color-666">原价:{{ val.originalPrice }}元</div>
+        <div class="font-size-14 color-999 mt-3 periodValidity py-2">有效期:120天</div>
+      </div>
     </div>
   </v-card>
 </template>
@@ -15,13 +28,42 @@
 <script setup>
 defineOptions({name: 'enterprise-memberCenter-myAccount'})
 import { ref } from 'vue'
-import Package from './components/package.vue'
+// import Package from './components/package.vue'
+
+// const tab = ref(0)
 
-const tab = ref(0)
+const active = ref(0)
+const list = [
+  { title: '1个职位', price: 399, originalPrice: 599 },
+  { title: '2个职位', price: 599, originalPrice: 799 },
+  { title: '3个职位', price: 799, originalPrice: 999 },
+  { title: '5个职位', price: 999, originalPrice: 1299 }
+]
 </script>
 
 <style lang="scss" scoped>
 :deep(.v-slide-group__content) {
   background: linear-gradient(45deg, #ff8a04, transparent);
 }
+
+.list {
+  &-item {
+    width: 25%;
+    height: 172px;
+    background-color: #fcfcfd;
+    border: 1px solid #f3f3f3;
+    border-radius: 8px;
+    margin-right: 12px;
+    &:last-child {
+      margin-right: 0;
+    }
+    .periodValidity {
+      background-color: #f2f4f7;
+      border-radius: 0 0 8px 8px;
+    }
+  }
+  .active {
+    border: 1px solid #00897B;
+  }
+}
 </style>