ソースを参照

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner into dev

lifanagju_citu 10 ヶ月 前
コミット
7443085e5b
24 ファイル変更141 行追加615 行削除
  1. 5 12
      src/layout/company/navBar.vue
  2. 8 14
      src/layout/personal/navBar.vue
  3. 3 1
      src/locales/en.js
  4. 2 0
      src/locales/zh-CN.js
  5. 6 6
      src/router/modules/components/recruit/personal.js
  6. 0 109
      src/views/integral/pointsManagement/components/exchange.vue
  7. 0 27
      src/views/integral/pointsManagement/components/exchangeRecords.vue
  8. 0 41
      src/views/integral/pointsManagement/components/exchangeRecordsTable.vue
  9. 2 6
      src/views/integral/pointsManagement/components/integralShow.vue
  10. 15 7
      src/views/integral/pointsManagement/components/integralTable.vue
  11. 0 39
      src/views/integral/pointsManagement/components/signInTable.vue
  12. 56 28
      src/views/integral/pointsManagement/index.vue
  13. 0 60
      src/views/integral/pointsManagement/pointsDetails.vue
  14. 0 16
      src/views/integral/pointsManagement/pointsMall.vue
  15. 18 3
      src/views/mall/index.vue
  16. 1 1
      src/views/publicRecruitment/myRegistration.vue
  17. 0 109
      src/views/recruit/enterprise/memberCenter/myPoints/components/exchange.vue
  18. 0 46
      src/views/recruit/enterprise/memberCenter/myPoints/components/table.vue
  19. 6 11
      src/views/recruit/enterprise/memberCenter/myPoints/index.vue
  20. 0 59
      src/views/recruit/enterprise/memberCenter/myPoints/pointsDetails.vue
  21. 0 16
      src/views/recruit/enterprise/memberCenter/myPoints/pointsMall.vue
  22. 4 2
      src/views/recruit/personal/PersonalCenter/dynamic/right.vue
  23. 13 0
      src/views/recruit/personal/myWallet/index.vue
  24. 2 2
      src/views/recruit/personal/taskCenter/components/signIn.vue

+ 5 - 12
src/layout/company/navBar.vue

@@ -13,15 +13,14 @@
         </div>
         
         <div class="d-flex user-nav">
-          <!-- <a target="_blank" href="/recruit/enterprise/purchasePackage" class="cursor-pointer mr-5" style="font-size: 15px;color: #FB8C00;line-height: 40px;">{{ $t('vipPackage.purchasePackage') }}</a> -->
-          <div class="d-flex align-center cursor-pointer" @click="handleEnterpriseClick">
+          <div class="d-flex align-center cursor-pointer">
             <v-img @click="enterpriseClick(2)" rounded width="40" height="40" :src="baseInfo?.logoUrl || 'https://minio.citupro.com/dev/menduner/7.png'" ></v-img>
             <span @click="enterpriseClick(1)" class="ml-3">{{ baseInfo?.enterpriseAnotherName || $t('sys.tourist') }}</span>
           </div>
           <div class="line"></div>
           <div class="d-flex align-center ml-6">
-            <div>{{ $t('enterprise.account.accountBalances') }}:{{ enterpriseUserAccount?.balance || 0 }}元</div>
-            <div class="ml-5">{{ $t('enterprise.account.remainingPoints') }}:{{ enterpriseUserAccount?.point || 0 }}点</div>
+            <div class="cursor-pointer" @click="router.push({ path: '/recruit/enterprise/memberCenter/myPoints' })">{{ $t('enterprise.account.accountBalances') }}:{{ enterpriseUserAccount?.balance || 0 }}元</div>
+            <div class="ml-5 cursor-pointer" @click="router.push({ path: '/recruit/enterprise/memberCenter/myPoints' })">{{ $t('enterprise.account.remainingPoints') }}:{{ enterpriseUserAccount?.point || 0 }}点</div>
           </div>
           <div class="line"></div>
           
@@ -29,7 +28,7 @@
           <div class="d-flex align-center" v-if="getToken()">
             <v-menu open-on-hover>
               <template v-slot:activator="{ props }">
-                <div class="d-flex ml-5 pl-2 align-center cursor-pointer" v-bind="props" @click="handleToPersonalCenter">
+                <div class="d-flex ml-5 pl-2 align-center cursor-pointer" v-bind="props">
                   <v-avatar>
                     <v-img alt="" :src="baseInfo?.avatar || 'https://minio.citupro.com/dev/menduner/7.png'"></v-img>
                   </v-avatar>
@@ -107,12 +106,6 @@ defineProps({
 
 const handleLogoClick = () => { router.push({ path: '/recruit/enterprise'}) }
 
-const handleToPersonalCenter = () => {
-  // router.push({ path: '/recruit/personal/personalCenter' })
-}
-const handleEnterpriseClick = () => {
-  // router.push({ path: '/recruit/enterprise/enterpriseCenter?key=mIntroduction' })
-}
 const enterpriseClick = (tabKey = 1) => {
   const path = '/recruit/enterprise/informationManagement/informationSettings'
   router.push({ path, query: { tabKey } })
@@ -126,12 +119,12 @@ const handleLogout = async () => {
 const enterpriseList = ref([])
 
 const menuList = ref([
+  { title: t('enterprise.account.myAccount'), icon: 'mdi-account', change: () => router.push({ path: '/recruit/enterprise/memberCenter/myPoints' }) },
   { title: t('vipPackage.purchasePackage'), icon: 'mdi-gift-outline', change: () => router.push({ path: '/recruit/enterprise/purchasePackage' }) },
   { title: t('enterprise.personalInformationSettings'), icon: 'mdi-account-cog', change: () => router.push({ path: '/recruit/enterprise/informationSettings' }) },
   { title: t('setting.switchToOtherCompany'), icon: 'mdi-home-switch', hidden: enterpriseList.value?.length < 2, change: () => handleSwitchToAnotherEnterprise },
   { title: t('enterprise.registeringNewEnterprise'), icon: 'mdi-home-plus-outline', change: () => handleRegisteringNewEnterprise },
   { title: t('setting.switchToJobSeeker'), icon: 'mdi-swap-horizontal', change: handleLogout },
-  // { title: t('enterprise.account.myAccount'), icon: 'mdi-account', change: () => router.push({ path: '/recruit/enterprise/myAccount' }) },
   { title: t('setting.logOut'), icon: 'mdi-logout', change: handleLogout }
 ])
 const items = computed(() => {

+ 8 - 14
src/layout/personal/navBar.vue

@@ -28,20 +28,15 @@
         
         <div class="d-flex user-nav">
           <div class="btns d-flex align-center" v-if="!getToken()">
-            <!-- <span class="nav-resume-tools">
-              <a href="">{{ $t('sys.lookingJob') }}</a>
-              <a href="">{{ $t('sys.recruit') }}</a>
-            </span> -->
             <v-btn class="half-button" border color="primary" size="small" @click="handleLogin">{{ $t('login.register') }}</v-btn>
           </div>
           
           <!-- 头像用户名 -->
           <div class="d-flex align-center" v-if="getToken()">
-            <span>{{t('resume.accountWithdrawal')}}:{{ userAccount?.balance || 0 }}{{t('unit.rmb')}}</span>
-            <span class="mr-10 ml-5">{{t('resume.goldCoins')}}:{{ userAccount?.point || 0 }}{{t('unit.ge')}}</span>
+            <span class="cursor-pointer" @click="router.push({ path: '/recruit/personal/myWallet' })">{{t('resume.accountWithdrawal')}}:{{ userAccount?.balance || 0 }}{{t('unit.rmb')}}</span>
+            <span class="mr-5 ml-5 cursor-pointer" @click="router.push({ path: '/recruit/personal/myWallet' })">{{t('resume.goldCoins')}}:{{ userAccount?.point || 0 }}{{t('unit.ge')}}</span>
 
-            <span class="cursor-pointer" @click="router.push({ path: '/recruit/personal/TaskCenter' })">{{ $t('sys.signIn') }}</span>
-            <span class="cursor-pointer ml-5">{{ $t('sys.news') }}</span>
+            
             <v-menu open-on-hover>
               <template v-slot:activator="{ props }">
                 <div class="d-flex ml-5 pl-2 align-center cursor-pointer" v-bind="props" @click="handleToPersonalCenter">
@@ -87,17 +82,16 @@
               </v-list-item>
             </v-list>
           </v-menu>
+          <div class="d-flex align-center" v-if="getToken()">
+            <span class="cursor-pointer mx-5" @click="router.push({ path: '/recruit/personal/TaskCenter' })">{{ $t('sys.signIn') }}</span>
+            <span class="cursor-pointer">{{ $t('sys.news') }}</span>
+          </div>
         </div>
         
       </div>
     </v-toolbar>
 
     <CtDialog :visible="show" title="请选择要切换的公司账号" :footer="true" widthType="2" @close="show = false" @submit="handleSubmit">
-      <!-- <div class="mb-3 text-center" style="color: var(--color-999);">
-        <div class="mb-5">您还未加入或注册企业, 请选择您要操作的类型!</div>
-        <v-btn class="half-button" size="small" color="primary" variant="tonal" @click="handleChange(0)">加入企业</v-btn>
-        <v-btn class="half-button ml-5" size="small" color="primary" variant="tonal" @click="handleChange(1)">{{ $t('enterprise.registeringNewEnterprise') }}</v-btn>
-      </div> -->
       <v-radio-group v-model="radios">
         <v-radio v-for="item in enterpriseList" :key="item.enterpriseId" color="primary" :label="item.enterpriseName" :value="item.enterpriseId"></v-radio>
       </v-radio-group>
@@ -187,7 +181,7 @@ const items = ref([
   { title: t('setting.accountSettings'), icon: 'mdi-cog-outline', change: () => router.push({ path: '/recruit/personal/accountSettings/accountBinding' }) },
   { title: t('setting.switchToRecruit'), icon: 'mdi-swap-horizontal', change: changeLoginType },
   { title: t('publicRecruitment.bountyRewards'), icon: 'mdi-google-circles-extended', change: () => router.push({ path: '/publicRecruitment' }) },
-  { title: t('points.pointsManagement'), icon: ' mdi-database-outline', change: () => router.push({ path: '/integral/pointsManagement' }) },
+  { title: t('points.wallet'), icon: ' mdi-database-outline', change: () => router.push({ path: '/recruit/personal/myWallet' }) },
   { title: t('taskCenter.taskCenter'), icon: 'mdi-calendar-check-outline', change: () => router.push({ path: '/recruit/personal/TaskCenter' }) },
   { title: t('setting.logOut'), icon: 'mdi-logout', change: handleLogout }
 ])

+ 3 - 1
src/locales/en.js

@@ -273,7 +273,8 @@ export default {
   // 积分
   points: {
     pointsManagement: 'Points Management',
-    pointsDetails: 'Points details',
+    pointsDetails: 'Points Details',
+    balanceDetails: 'Balance Details',
     pointsMall: 'Points Mall',
     redemptionOfPoints: 'Redemption of points',
     handpickMall: 'handpick Mall',
@@ -284,6 +285,7 @@ export default {
     pay: 'Pay',
     exchange: 'Exchange of points',
     exchangeRecords: 'Exchange records',
+    wallet: 'my wallet'
   },
   rulesOfPoints: {
     whatIsPoints: 'What is integral?',

+ 2 - 0
src/locales/zh-CN.js

@@ -274,6 +274,7 @@ export default {
   points: {
     pointsManagement: '积分管理',
     pointsDetails: '积分明细',
+    balanceDetails: '余额明细',
     pointsMall: '积分商城',
     redemptionOfPoints: '积分兑换',
     handpickMall: '臻选商城',
@@ -284,6 +285,7 @@ export default {
     pay: '支出',
     exchange: '积分兑换',
     exchangeRecords: '积分兑换记录',
+    wallet: '我的钱包'
   },
   rulesOfPoints: {
     whatIsPoints: '什么是积分?',

+ 6 - 6
src/router/modules/components/recruit/personal.js

@@ -120,18 +120,18 @@ const personal = [
     ]
   },
   {
-    path: '/integral/pointsManagement',
+    path: '/recruit/personal/myWallet',
     component: Layout,
-    name: 'personalPointsManagement',
+    name: 'personalWallet',
     meta: {
-      title: '积分管理'
+      title: '我的钱包'
     },
     children: [
       {
-        path: '/integral/pointsManagement',
-        component: () => import('@/views/integral/pointsManagement/index'),
+        path: '/recruit/personal/myWallet',
+        component: () => import('@/views/recruit/personal/myWallet'),
         meta: {
-          title: '积分管理'
+          title: '我的钱包'
         },
       }
     ]

+ 0 - 109
src/views/integral/pointsManagement/components/exchange.vue

@@ -1,109 +0,0 @@
-<!-- 积分兑换 -->
-<template>
-  <div class="listBox">
-    <div v-for="(item, index) in dataList" :key="'exchange' + index">
-      <div class="cursor-pointer mx-5 mb-4" style="width: 180px;" @click="handleShowDetail(item)">
-        <v-img width="180" height="180" :src="item.图片 || 'https://minio.citupro.com/dev/menduner/7.png'"></v-img>
-        <div class="ellipsis mt-2" style="font-size: 14px;">{{ item.物品名称 }}</div>
-        <div class="ellipsis mt-1" style="font-size: 13px;">消耗积分<span class="ml-1" style="color: var(--v-primary-base)">{{ item.消耗积分 }}</span></div>
-      </div>
-    </div>
-  </div>
-  <Dialog :visible="showDetail" titleClass="text-h6" :widthType="3" title="详情说明" @submit="handleSubmit" @close="showDetail = false">
-    <div>
-      <!-- <span style="font-size: 15px;">物品名称:</span> -->
-      <span style="font-size: 14px;color: red;">{{ detailItem.物品名称 }}</span>
-    </div>
-    <div class="tips">
-      <div>使用规则:</div>
-      <span>兑换时,优先使用即将到期积分进行兑换</span>
-      <div>使用时间:</div>
-      <span>使用时间为当前招聘通期限内都可以使用, 超出当前招聘通期限不可以使用</span>
-      <div>使用说明:</div>
-      <span>积分一经兑换概不退回,敬请谅解。</span>
-    </div>
-    <div class="d-flex align-center my-5">
-      <div class="mr-5">兑换数量</div>
-      <textUI class="mr-5" v-model="num" :item="textItem" @change="handleChange"></textUI>
-      <div class="mr-1">消耗积分</div>
-      <div style="color: var(--v-primary-base);">{{ (detailItem.消耗积分- 0)*num }}</div>
-    </div>
-    <div v-if="(detailItem.消耗积分- 0)*num > 135" style="font-size: 14px;color: red;">积分不足,快去赚取积分吧</div>
-  </Dialog>
-</template>
-
-<script setup>
-import Dialog from '@/components/CtDialog'
-import textUI from '@/components/FormUI/TextInput'
-// import Snackbar from '@/plugins/snackbar'
-import { ref } from 'vue'
-defineOptions({name: 'pointsMall-exchange'})
-
-// 数据
-const dataList = ref([])
-const getData = () => {
-  dataList.value = [
-    { 物品名称: '掼蛋文娱套装·茶牌款', 消耗积分: '29888', 图片: 'http://www.51lip.com/public/images/17/64/c2/bd52d2072e4304a43d383069fe63d15cb12fddf6.jpg' },
-    { 物品名称: '户外两键无绳跳绳大球+羽毛球拍+抽象几何飞盘运动套装', 消耗积分: '18888', 图片: 'http://www.51lip.com/public/images/72/9b/de/42d8056bdd889217793f84cb68936d5682ea72dc.png' },
-    { 物品名称: '懒人挂脖风扇', 消耗积分: '8888', 图片: 'http://www.51lip.com/public/images/34/fb/dd/dfc8757b4204fc79352490478e6be8ae71fd748a.jpg' },
-    { 物品名称: '艾优 全自动防水成人声波电动牙刷T11-A', 消耗积分: '12888', 图片: 'http://www.51lip.com/public/images/68/0a/f4/53d5f128b19d22c04ed4538360ae0db0a388f5f8.jpg' },
-    { 物品名称: 'ApiYoo艾优成人声波电动牙刷T1-A-F', 消耗积分: '19888', 图片: 'http://www.51lip.com/public/images/07/4c/e3/0917d02b646e9a5eeec427f70197d4915007ddbe.jpg' },
-    { 物品名称: '幻响小宜多功能照明灯 led台灯', 消耗积分: '88888', 图片: 'http://www.51lip.com/public/images/2e/75/36/6c6fae90c1e7cf134a704dbcb917d2bdc9ac2805.jpg' },
-    { 物品名称: '眼罩颈枕', 消耗积分: '10080', 图片: 'http://www.51lip.com/public/images/2f/e1/99/1a861d35c0e7358633f548d6f142b92d5ec2f6cb.jpg' },
-    { 物品名称: 'PGG 腰果按摩枕W8', 消耗积分: '25000', 图片: 'http://www.51lip.com/public/images/f0/66/e2/6f9b0b756352324af411e4e4b36fed9f71c078d9.jpg' },
-    { 物品名称: '现代酒店管理实用教程电子书', 消耗积分: '100', 图片: 'https://img2.baidu.com/it/u=153650066,2494782747&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=704' },
-    // { 物品名称: '星巴克美式一杯', 消耗积分: '500', 图片: 'https://file-ve.veimg.cn/files/2024/05/2024052714240147ow0eijdnjxg.jpg' },
-  ]
-}
-getData()
-
-// 详情说明弹窗
-const showDetail = ref(false)
-const detailItem = ref(null)
-const handleShowDetail = (item) =>{
-  detailItem.value = item
-  showDetail.value = true
-}
-
-// 兑换提交
-const handleSubmit = async () =>{
-}
-
-// 兑换数量
-const num = ref(1)
-const textItem = ref({
-  type: 'number',
-  value: num.value,
-  width: 80,
-  hideDetails: true,
-  // density: 'compact',
-  // label: '请输入自定义标签',
-})
-const handleChange = async () =>{
-}
-</script>
-<style lang="scss" scoped>
-.listBox {
-  display: flex;
-  flex-wrap: wrap;
-}
-.ellipsis {
-  width: 100%;
-}
-.tips {
-  margin-top: 20px;
-  padding: 12px 20px;
-  border-radius: 5px;
-  background-color: var(--default-bgc);
-  // width: 400px;
-  div {
-    font-size: 15px;
-    margin-bottom: 4px;
-  }
-  span {
-    display: inline-block;
-    font-size: 14px;
-    margin-bottom: 20px;
-  }
-}
-</style>

+ 0 - 27
src/views/integral/pointsManagement/components/exchangeRecords.vue

@@ -1,27 +0,0 @@
-<!-- 积分兑换记录 -->
-<template>
-  <div>
-    <TablePage :items="dataList"></TablePage>
-  </div>
-</template>
-
-<script setup>
-import TablePage from './exchangeRecordsTable.vue'
-import { ref } from 'vue'
-defineOptions({name: 'pointsMall-exchangeRecords'})
-
-// 数据
-const dataList = ref([])
-const getData = () => {
-  dataList.value = [
-    { 兑换物品: '刷新简历1次体验卡', 兑换时间: '2024-06-20 20:00', 消耗积分: '500' },
-    { 兑换物品: '会员3天体验卡', 兑换时间: '2024-06-20 00:00', 消耗积分: '1000' },
-    { 兑换物品: '主动打招呼加量包(15次包)', 兑换时间: '2024-06-21 09:05', 消耗积分: '1500' },
-    { 兑换物品: '职业分析报告1次体验卡', 兑换时间: '2024-06-22 10:27', 消耗积分: '600' },
-    { 兑换物品: '星巴克美式一杯', 兑换时间: '2024-06-22 10:27', 消耗积分: '2000' },
-  ]
-}
-getData()
-</script>
-<style lang="scss" scoped>
-</style>

+ 0 - 41
src/views/integral/pointsManagement/components/exchangeRecordsTable.vue

@@ -1,41 +0,0 @@
-<template>
-  <v-data-table
-    class="mt-3"
-    v-model="selected"
-    :items="items"
-    :headers="headers"
-    hover
-    height="60vh"
-    item-value="id"
-  >
-    <template #bottom></template>
-  </v-data-table>
-</template>
-
-<script setup>
-defineOptions({ name: 'myRegistration-integralTable'})
-import { ref } from 'vue'
-defineProps({
-  tab: String,
-  items: Array
-})
-
-
-const selected = ref([])
-const headers = [
-  { title: '兑换物品', key: '兑换物品' },
-  { title: '兑换时间', key: '兑换时间' },
-  { title: '消耗积分', key: '消耗积分' },
-]
-
-</script>
-
-<style scoped lang="scss">
-:deep(.v-table > .v-table__wrapper > table > thead) {
-  background-color: #f7f8fa !important;
-}
-:deep(.v-selection-control__input) {
-  // color: var(--v-primary-base) !important;
-  color: #767778;
-}
-</style>

+ 2 - 6
src/views/integral/components/integralShow.vue → src/views/integral/pointsManagement/components/integralShow.vue

@@ -33,10 +33,6 @@ import { useUserStore } from '@/store/user'
 import { useRouter } from 'vue-router'; const router = useRouter()
 
 const props = defineProps({
-  title: {
-    type: String,
-    default: '您当前赚取积分'
-  },
   showMall: {
     type: Boolean,
     default: true
@@ -53,9 +49,9 @@ const props = defineProps({
 })
 
 const list = ref([
-  { title: props.title, value: 'point', showRules: true }
+  { title: '您当前可用积分', value: 'point', showRules: true },
+  { title: '您当前账户余额', value: 'balance', showRules: false }
 ])
-if (props.isEnterprise) list.value.push({ title: '您当前账户余额', value: 'balance', showRules: false })
 
 const userStore = useUserStore()
 const key = props.isEnterprise ? 'enterpriseUserAccount' : 'userAccount'

+ 15 - 7
src/views/integral/pointsManagement/components/integralTable.vue

@@ -2,7 +2,7 @@
   <v-data-table
     class="mt-3"
     :items="items"
-    :headers="headers"
+    :headers="tab === 0 ? integralHeaders : balanceHeaders"
     hover
     item-value="id"
   >
@@ -15,15 +15,23 @@ defineOptions({ name: 'myRegistration-integralTable'})
 import { timesTampChange } from '@/utils/date'
 
 defineProps({
-  tab: String,
+  tab: Number,
   items: Array
 })
 
-const headers = [
-  { title: '来源', key: 'description', sortable: false},
-  { title: '积分数', key: 'point', sortable: false },
-  { title: '总积分数', key: 'totalPoint', sortable: false },
-  { title: '获得时间', key: 'createTime', value: item =>  timesTampChange(item.createTime), sortable: false }
+const integralHeaders = [
+  { title: '标题', key: 'title', sortable: false },
+  { title: '描述', key: 'description', sortable: false },
+  { title: '积分点', key: 'point', sortable: false },
+  { title: '剩余点数', key: 'totalPoint', sortable: false },
+  { title: '发生时间', key: 'createTime', value: item =>  timesTampChange(item.createTime), sortable: false },
+]
+const balanceHeaders = [
+  { title: '标题', key: 'title', sortable: false },
+  { title: '描述', key: 'description', sortable: false },
+  { title: '金额', key: 'balance', sortable: false},
+  { title: '账户余额', key: 'totalBalance', sortable: false },
+  { title: '发生时间', key: 'createTime', value: item =>  timesTampChange(item.createTime), sortable: false },
 ]
 </script>
 

+ 0 - 39
src/views/integral/pointsManagement/components/signInTable.vue

@@ -1,39 +0,0 @@
-<template>
-  <v-data-table
-    class="mt-3"
-    :items="items"
-    :headers="headers"
-    hover
-    item-value="id"
-  >
-    <template #bottom></template>
-  </v-data-table>
-</template>
-
-<script setup>
-defineOptions({ name: 'myRegistration-signInTable'})
-import { useI18n } from '@/hooks/web/useI18n'
-import { timesTampChange } from '@/utils/date'
-
-defineProps({
-  tab: String,
-  items: Array
-})
-
-const { t } = useI18n()
-const headers = [
-  { title: t('taskCenter.signInDays'), key: 'day', sortable: false },
-  { title: t('taskCenter.points'), key: 'point', sortable: false },
-  { title: t('taskCenter.createTime'), key: 'createTime', value: item => timesTampChange(item.createTime), sortable: false }
-]
-</script>
-
-<style scoped lang="scss">
-:deep(.v-table > .v-table__wrapper > table > thead) {
-  background-color: #f7f8fa !important;
-}
-:deep(.v-selection-control__input) {
-  // color: var(--v-primary-base) !important;
-  color: #767778;
-}
-</style>

+ 56 - 28
src/views/integral/pointsManagement/index.vue

@@ -1,40 +1,68 @@
-<!-- 积分管理 -->
 <template>
-  <div class="default-width">
+  <div :class="{'default-width': !type}">
     <div class="pa-3 mb-2 white-bgc">
-      <integralShow :showMall="true" :taskCenter="true" :title="descriptiveTitle"></integralShow>
+      <integralShow :showMall="true" :taskCenter="!type" :isEnterprise="type"></integralShow>
     </div>
-    <div>
-      <!-- <v-tabs v-model="tab" align-tabs="start" color="primary" bg-color="#fff" @update:model-value="getPositionList">
-        <v-tab :value="1">{{ $t('points.redemptionOfPoints') }}</v-tab>
-        <v-tab :value="2">{{ $t('points.pointsDetails') }}</v-tab>
-      </v-tabs> -->
-    </div>
-    <div class="mt-3 white-bgc pa-3 pt-1">
-      <div v-if="tab === 1">
-        <pointsDetails></pointsDetails>
-      </div>
-      <div v-if="tab === 2" class="pt-5">
-        <pointsMall></pointsMall>
-      </div>
+    <div class="mt-3 white-bgc pa-3 pt-3">
+      <v-tabs v-model="tab" align-tabs="start" color="primary" bg-color="#f7f8fa" @update:model-value="handleChangeTab">
+        <v-tab :value="0">{{ $t('points.pointsDetails') }}</v-tab>
+        <v-tab :value="1">{{ $t('points.balanceDetails') }}</v-tab>
+      </v-tabs>
+      <TablePage :items="dataList" :tab="tab"></TablePage>
+      <CtPagination
+        v-if="total > 0"
+        :total="total"
+        :page="query.pageNo"
+        :limit="query.pageSize"
+        @handleChange="handleChangePage"
+      ></CtPagination>
     </div>
   </div>
 </template>
 
 <script setup>
-import pointsDetails from './pointsDetails.vue'
-import pointsMall from './pointsMall.vue'
-import integralShow from '@/views/integral/components/integralShow.vue'
-// import { useRoute } from 'vue-router'; const route = useRoute()
-// import { useRouter } from 'vue-router'; const router = useRouter()
-// import { ref } from 'vue'
 defineOptions({name: 'personal-pointsManagement-index'})
-const tab = 1
-// const tab = ref(+route.query?.tab || 1)
-// const getPositionList = () => {
-//   if (route.query) router.replace({ path: route.path }) // 不留记录的清除跳转带过来的参数
-// }
-const descriptiveTitle = '您当前可用积分'
+import { ref } from 'vue'
+import { getUserRewardPointPage } from '@/api/integral'
+import { getEnterpriseAccountRecordPage } from '@/api/recruit/enterprise/member/points'
+import TablePage from './components/integralTable.vue'
+import integralShow from '@/views/integral/pointsManagement/components/integralShow.vue'
+
+const props = defineProps({
+  type: {
+    type: Number,
+    default: 0 // 0个人 1企业
+  }
+})
+
+const tab = ref(0)
+const total = ref(0)
+const query = ref({
+  pageNo: 1,
+  pageSize: 10,
+  type: 0 // 0积分 1余额
+})
+const dataList = ref([])
+
+// 积分、签到明细
+const getData = async () => {
+  const res = props.type ? await getEnterpriseAccountRecordPage(query.value) : await getUserRewardPointPage(query.value)
+  dataList.value = res.list
+  total.value = res.total
+}
+getData()
+
+const handleChangePage = (e) => {
+  query.value.pageNo = e
+  getData()
+}
+
+// 切换
+const handleChangeTab = () => {
+  query.value.pageNo = 1
+  query.value.type = tab.value
+  getData()
+}
 </script>
 
 <style lang="scss" scoped>

+ 0 - 60
src/views/integral/pointsManagement/pointsDetails.vue

@@ -1,60 +0,0 @@
-<!-- 积分明细 -->
-<template>
-  <div class="mt-3">
-    <v-tabs v-model="tab" style="border-radius: 5px;" align-tabs="start" color="primary" bg-color="#f7f8fa" @update:model-value="handleChangeTab">
-      <v-tab :value="1"> {{ $t('points.whole') }}</v-tab>
-      <!-- <v-tab :value="2">{{ $t('sys.signIn') }}</v-tab> -->
-    </v-tabs>
-    <TablePage v-if="tab === 1" :items="dataList"></TablePage>
-    <!-- <SignInTable v-if="tab === 2" :items="dataList"></SignInTable> -->
-    <CtPagination
-      v-if="total > 0"
-      :total="total"
-      :page="query.pageNo"
-      :limit="query.pageSize"
-      @handleChange="handleChangePage"
-    ></CtPagination>
-  </div>
-</template>
-
-<script setup>
-defineOptions({name: 'personal-pointsManagement-pointsDetails'})
-import { ref } from 'vue'
-import TablePage from './components/integralTable.vue'
-// import SignInTable from './components/signInTable.vue'
-import { getUserRewardPointPage } from '@/api/integral'
-// import { getRewardSignInRecordPage } from '@/api/sign'
-
-const tab = ref(1)
-
-// 数据
-const total = ref(0)
-const query = ref({
-  pageNo: 1,
-  pageSize: 10,
-  type: 0
-})
-const dataList = ref([])
-
-// 积分、签到明细
-const getData = async () => {
-  // const res = tab.value === 1 ? await getUserRewardPointPage({ pageNo: pageNo.value, pageSize: pageSize.value, type: 0 }) : await getRewardSignInRecordPage(pageNo.value, pageSize.value)
-  const res = await getUserRewardPointPage(query.value)
-  dataList.value = res.list
-  total.value = res.total
-}
-getData()
-
-const handleChangePage = (e) => {
-  query.value.pageNo = e
-  getData()
-}
-
-// 切换
-const handleChangeTab = () => {
-  query.value.pageNo = 1
-  getData()
-}
-</script>
-<style lang="scss" scoped>
-</style>

+ 0 - 16
src/views/integral/pointsManagement/pointsMall.vue

@@ -1,16 +0,0 @@
-<!-- 积分商城 -->
-<template>
-  <exchange></exchange>
-</template>
-
-<script setup>
-import exchange from './components/exchange.vue'
-defineOptions({name: 'personal-pointsManagement-pointsMall'})
-</script>
-<style lang="scss" scoped>
-.statisticsBox {
-  padding: 10px 0;
-  border-radius: 10px;
-  background-color: var(--default-bgc);
-}
-</style>

+ 18 - 3
src/views/mall/index.vue

@@ -8,7 +8,7 @@
           <span style="font-size: 14px; color: var(--color-666); line-height: 24px; cursor: pointer;" class="ml-2" @click="toPointsDetails">积分明细</span>
         </div>
         <div class="d-flex justify-space-between align-end my-1">
-          <span style="font-size: 42px; color: #10897bba; line-height: 50px;" class="ml-10 cursor-pointer" @click="toPointsDetails">{{ integral }}</span>
+          <span style="font-size: 42px; color: #10897bba; line-height: 50px;" class="ml-10 cursor-pointer" @click="toPointsDetails">{{ accountData.point }}</span>
         </div>
       </div>
       <!-- <v-tabs v-model="tab" class="mt-1" align-tabs="start" color="primary" bg-color="#fff" @update:model-value="getPositionList()"> -->
@@ -34,20 +34,35 @@
 import exchange from './exchange.vue'
 import exchangeRecords from './exchangeRecords.vue'
 import { ref } from 'vue'
+import { useUserStore } from '@/store/user'
 import { useRoute } from 'vue-router'; const route = useRoute()
 import { useRouter } from 'vue-router'; const router = useRouter()
 defineOptions({name: 'personal-pointsMall'})
-const integral = '135'
+
+const loginType = localStorage.getItem('loginType')
 
 const toPointsDetails = () => {
-  router.push({ path: '/integral/pointsManagement', query: { tab: 1 } })
+  router.push({ 
+    path: loginType === 'personal' ? '/recruit/personal/myWallet' : '/recruit/enterprise/memberCenter/myPoints'
+  })
 }
 
 const getPositionList = () => {
   if (route.query) router.replace({ path: route.path }) // 不留记录的清除跳转带过来的参数
 }
 const tab = ref(+route.query?.tab || 1)
+
+const userStore = useUserStore()
+
+const key = loginType === 'personal' ? 'userAccount' : 'enterpriseUserAccount'
+let accountData = ref(JSON.parse(localStorage.getItem(key)) || {})
+
+userStore.$subscribe((mutation, state) => {
+  if (Object.keys(state[key]).length) accountData.value = state[key]
+})
+
 </script>
+
 <style lang="scss" scoped>
 .statisticsBox {
   padding: 10px 0;

+ 1 - 1
src/views/publicRecruitment/myRegistration.vue

@@ -19,7 +19,7 @@
 
 <script setup>
 import TablePage from './components/integralTable.vue'
-import integralShow from '@/views/integral/components/integralShow.vue'
+import integralShow from '@/views/integral/pointsManagement/components/integralShow.vue'
 import { useRouter } from 'vue-router'; const router = useRouter()
 import { ref } from 'vue'
 defineOptions({name: 'personal-myPublicRecruitment-myRegistration'})

+ 0 - 109
src/views/recruit/enterprise/memberCenter/myPoints/components/exchange.vue

@@ -1,109 +0,0 @@
-<!-- 积分兑换 -->
-<template>
-  <div class="listBox">
-    <div v-for="(item, index) in dataList" :key="'exchange' + index">
-      <div class="cursor-pointer mx-5 mb-4" style="width: 180px;" @click="handleShowDetail(item)">
-        <v-img width="180" height="180" :src="item.图片 || 'https://minio.citupro.com/dev/menduner/7.png'"></v-img>
-        <div class="ellipsis mt-2" style="font-size: 14px;">{{ item.物品名称 }}</div>
-        <div class="ellipsis mt-1" style="font-size: 13px;">消耗积分<span class="ml-1" style="color: var(--v-primary-base)">{{ item.消耗积分 }}</span></div>
-      </div>
-    </div>
-  </div>
-  <Dialog :visible="showDetail" titleClass="text-h6" :widthType="3" title="详情说明" @submit="handleSubmit" @close="showDetail = false">
-    <div>
-      <!-- <span style="font-size: 15px;">物品名称:</span> -->
-      <span style="font-size: 14px;color: red;">{{ detailItem.物品名称 }}</span>
-    </div>
-    <div class="tips">
-      <div>使用规则:</div>
-      <span>兑换时,优先使用即将到期积分进行兑换</span>
-      <div>使用时间:</div>
-      <span>使用时间为当前招聘通期限内都可以使用, 超出当前招聘通期限不可以使用</span>
-      <div>使用说明:</div>
-      <span>积分一经兑换概不退回,敬请谅解。</span>
-    </div>
-    <div class="d-flex align-center my-5">
-      <div class="mr-5">兑换数量</div>
-      <textUI class="mr-5" v-model="num" :item="textItem" @change="handleChange"></textUI>
-      <div class="mr-1">消耗积分</div>
-      <div style="color: var(--v-primary-base);">{{ (detailItem.消耗积分- 0)*num }}</div>
-    </div>
-    <div v-if="(detailItem.消耗积分- 0)*num > 135" style="font-size: 14px;color: red;">积分不足,快去赚取积分吧</div>
-  </Dialog>
-</template>
-
-<script setup>
-import Dialog from '@/components/CtDialog'
-import textUI from '@/components/FormUI/TextInput'
-// import Snackbar from '@/plugins/snackbar'
-import { ref } from 'vue'
-defineOptions({name: 'pointsMall-exchange'})
-
-// 数据
-const dataList = ref([])
-const getData = () => {
-  dataList.value = [
-    { 物品名称: '掼蛋文娱套装·茶牌款', 消耗积分: '29888', 图片: 'http://www.51lip.com/public/images/17/64/c2/bd52d2072e4304a43d383069fe63d15cb12fddf6.jpg' },
-    { 物品名称: '户外两键无绳跳绳大球+羽毛球拍+抽象几何飞盘运动套装', 消耗积分: '18888', 图片: 'http://www.51lip.com/public/images/72/9b/de/42d8056bdd889217793f84cb68936d5682ea72dc.png' },
-    { 物品名称: '懒人挂脖风扇', 消耗积分: '8888', 图片: 'http://www.51lip.com/public/images/34/fb/dd/dfc8757b4204fc79352490478e6be8ae71fd748a.jpg' },
-    { 物品名称: '艾优 全自动防水成人声波电动牙刷T11-A', 消耗积分: '12888', 图片: 'http://www.51lip.com/public/images/68/0a/f4/53d5f128b19d22c04ed4538360ae0db0a388f5f8.jpg' },
-    { 物品名称: 'ApiYoo艾优成人声波电动牙刷T1-A-F', 消耗积分: '19888', 图片: 'http://www.51lip.com/public/images/07/4c/e3/0917d02b646e9a5eeec427f70197d4915007ddbe.jpg' },
-    { 物品名称: '幻响小宜多功能照明灯 led台灯', 消耗积分: '88888', 图片: 'http://www.51lip.com/public/images/2e/75/36/6c6fae90c1e7cf134a704dbcb917d2bdc9ac2805.jpg' },
-    { 物品名称: '眼罩颈枕', 消耗积分: '10080', 图片: 'http://www.51lip.com/public/images/2f/e1/99/1a861d35c0e7358633f548d6f142b92d5ec2f6cb.jpg' },
-    { 物品名称: 'PGG 腰果按摩枕W8', 消耗积分: '25000', 图片: 'http://www.51lip.com/public/images/f0/66/e2/6f9b0b756352324af411e4e4b36fed9f71c078d9.jpg' },
-    { 物品名称: '现代酒店管理实用教程电子书', 消耗积分: '100', 图片: 'https://img2.baidu.com/it/u=153650066,2494782747&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=704' },
-    // { 物品名称: '星巴克美式一杯', 消耗积分: '500', 图片: 'https://file-ve.veimg.cn/files/2024/05/2024052714240147ow0eijdnjxg.jpg' },
-  ]
-}
-getData()
-
-// 详情说明弹窗
-const showDetail = ref(false)
-const detailItem = ref(null)
-const handleShowDetail = (item) =>{
-  detailItem.value = item
-  showDetail.value = true
-}
-
-// 兑换提交
-const handleSubmit = async () =>{
-}
-
-// 兑换数量
-const num = ref(1)
-const textItem = ref({
-  type: 'number',
-  value: num.value,
-  width: 80,
-  hideDetails: true,
-  // density: 'compact',
-  // label: '请输入自定义标签',
-})
-const handleChange = async () =>{
-}
-</script>
-<style lang="scss" scoped>
-.listBox {
-  display: flex;
-  flex-wrap: wrap;
-}
-.ellipsis {
-  width: 100%;
-}
-.tips {
-  margin-top: 20px;
-  padding: 12px 20px;
-  border-radius: 5px;
-  background-color: var(--default-bgc);
-  // width: 400px;
-  div {
-    font-size: 15px;
-    margin-bottom: 4px;
-  }
-  span {
-    display: inline-block;
-    font-size: 14px;
-    margin-bottom: 20px;
-  }
-}
-</style>

+ 0 - 46
src/views/recruit/enterprise/memberCenter/myPoints/components/table.vue

@@ -1,46 +0,0 @@
-<template>
-  <v-data-table
-    class="mt-3"
-    :items="items"
-    :headers="tab === 0 ? integralHeaders : balanceHeaders"
-    hover
-    item-value="id"
-  >
-    <template #bottom></template>
-  </v-data-table>
-</template>
-
-<script setup>
-defineOptions({ name: 'myRegistration-integralTable'})
-import { timesTampChange } from '@/utils/date'
-
-defineProps({
-  tab: Number,
-  items: Array
-})
-
-const integralHeaders = [
-  { title: '标题', key: 'title', sortable: false },
-  { title: '描述', key: 'description', sortable: false },
-  { title: '积分点', key: 'point', sortable: false },
-  { title: '剩余点数', key: 'totalPoint', sortable: false },
-  { title: '发生时间', key: 'createTime', value: item =>  timesTampChange(item.createTime), sortable: false },
-]
-const balanceHeaders = [
-  { title: '标题', key: 'title', sortable: false },
-  { title: '描述', key: 'description', sortable: false },
-  { title: '金额', key: 'balance', sortable: false},
-  { title: '账户余额', key: 'totalBalance', sortable: false },
-  { title: '发生时间', key: 'createTime', value: item =>  timesTampChange(item.createTime), sortable: false },
-]
-</script>
-
-<style scoped lang="scss">
-:deep(.v-table > .v-table__wrapper > table > thead) {
-  background-color: #f7f8fa !important;
-}
-:deep(.v-selection-control__input) {
-  // color: var(--v-primary-base) !important;
-  color: #767778;
-}
-</style>

+ 6 - 11
src/views/recruit/enterprise/memberCenter/myPoints/index.vue

@@ -1,18 +1,13 @@
-<!-- 积分管理 -->
 <template>
-  <div class="white-bgc pa-3">
-    <integralShow :showMall="true" :taskCenter="false" :title="descriptiveTitle" :isEnterprise="true"></integralShow>
-    <pointsDetails></pointsDetails>
-  </div>
+  <IntegralPage :type="1"></IntegralPage>
 </template>
 
 <script setup>
-defineOptions({name: 'personal-pointsManagement-index'})
-import pointsDetails from './pointsDetails.vue'
-import integralShow from '@/views/integral/components/integralShow.vue'
+defineOptions({ name: 'myWallet'})
+import IntegralPage from '@/views/integral/pointsManagement'
 
-const descriptiveTitle = '您当前可用积分'
 </script>
-<style lang="scss" scoped>
-</style>
 
+<style scoped lang="scss">
+
+</style>

+ 0 - 59
src/views/recruit/enterprise/memberCenter/myPoints/pointsDetails.vue

@@ -1,59 +0,0 @@
-<!-- 积分明细 -->
-<template>
-  <div class="mt-3">
-    <v-tabs v-model="tab" style="border-radius: 5px;" align-tabs="start" color="primary" bg-color="#f7f8fa" @update:model-value="handleChangeTab">
-      <v-tab :value="0">积分</v-tab>
-      <v-tab :value="1">余额</v-tab>
-    </v-tabs>
-
-    <TablePage :tab="tab" :items="dataList"></TablePage>
-
-    <CtPagination
-      v-if="total > 0"
-      :total="total"
-      :page="query.pageNo"
-      :limit="query.pageSize"
-      @handleChange="handleChangePage"
-    ></CtPagination>
-  </div>
-</template>
-
-<script setup>
-defineOptions({name: 'personal-pointsManagement-pointsDetails'})
-import { ref } from 'vue'
-import { getEnterpriseAccountRecordPage } from '@/api/recruit/enterprise/member/points'
-import TablePage from './components/table.vue'
-
-const tab = ref(0)
-
-// 数据
-const total = ref(0)
-const query = ref({
-  pageNo: 1,
-  pageSize: 10,
-  type: 0
-})
-const dataList = ref([])
-
-// 明细
-const getData = async () => {
-  const res = await getEnterpriseAccountRecordPage(query.value)
-  dataList.value = res.list
-  total.value = res.total
-}
-getData()
-
-const handleChangePage = (e) => {
-  query.value.pageNo = e
-  getData()
-}
-
-// 切换
-const handleChangeTab = () => {
-  query.value.type = tab.value
-  query.value.pageNo = 1
-  getData()
-}
-</script>
-<style lang="scss" scoped>
-</style>

+ 0 - 16
src/views/recruit/enterprise/memberCenter/myPoints/pointsMall.vue

@@ -1,16 +0,0 @@
-<!-- 积分商城 -->
-<template>
-  <exchange></exchange>
-</template>
-
-<script setup>
-import exchange from './components/exchange.vue'
-defineOptions({name: 'personal-pointsManagement-pointsMall'})
-</script>
-<style lang="scss" scoped>
-.statisticsBox {
-  padding: 10px 0;
-  border-radius: 10px;
-  background-color: var(--default-bgc);
-}
-</style>

+ 4 - 2
src/views/recruit/personal/PersonalCenter/dynamic/right.vue

@@ -2,10 +2,10 @@
   <div>
     <div class="accountBox d-flex mb-3 radius white-bgc flex-column">
       <div class="resume-header ml-3 mt-2">
-        <div class="resume-title">我的钱包</div>
+        <div class="resume-title">{{ $t('points.wallet') }}</div>
       </div>
       <div class="d-flex" v-if="userAccount && Object.keys(userAccount).length">
-        <div v-for="val in accountList" :key="val.title" class="accountItem">
+        <div v-for="val in accountList" :key="val.title" class="accountItem cursor-pointer" @click="router.push({ path: '/recruit/personal/myWallet' })">
           <v-icon color="primary">{{ val.icon }}</v-icon>
           <div class="ml-1">
             <div class="title-text">{{ (userAccount[val.key] || 0) + val.desc }}</div>
@@ -61,6 +61,7 @@ defineOptions({ name: 'personal-center-right'})
 import { ref } from 'vue'
 import { uploadFile } from '@/api/common'
 import { previewFile } from '@/utils'
+import { useRouter } from 'vue-router'
 import { getPersonResumeCv, savePersonResumeCv, deletePersonResumeCv } from '@/api/recruit/personal/resume'
 import { useI18n } from '@/hooks/web/useI18n'
 import { useUserStore } from '@/store/user'
@@ -68,6 +69,7 @@ import Snackbar from '@/plugins/snackbar'
 import Confirm from '@/plugins/confirm'
 
 const { t } = useI18n()
+const router = useRouter()
 const userStore = useUserStore()
 
 const accountList = [

+ 13 - 0
src/views/recruit/personal/myWallet/index.vue

@@ -0,0 +1,13 @@
+<template>
+  <IntegralPage></IntegralPage>
+</template>
+
+<script setup>
+defineOptions({ name: 'myWallet'})
+import IntegralPage from '@/views/integral/pointsManagement'
+
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 2 - 2
src/views/recruit/personal/taskCenter/components/signIn.vue

@@ -45,7 +45,7 @@ import { ref } from 'vue'
 import { useUserStore } from '@/store/user'
 import { useI18n } from '@/hooks/web/useI18n'
 import { getRewardSignInRecordSummary, getRewardSignInConfigList, createRewardSignInRecord } from '@/api/sign'
-import integralShow from '@/views/integral/components/integralShow.vue'
+import integralShow from '@/views/integral/pointsManagement/components/integralShow.vue'
 import Snackbar from '@/plugins/snackbar'
 
 const { t } = useI18n()
@@ -93,7 +93,7 @@ const handleSignIn = async () => {
 }
 
 const handleRecord = () => {
-  window.open('/integral/pointsManagement')
+  window.open('/recruit/personal/myWallet')
 }
 
 </script>