浏览代码

积分明细跳转

lifanagju_citu 11 月之前
父节点
当前提交
178c7c9379
共有 2 个文件被更改,包括 8 次插入4 次删除
  1. 2 1
      src/views/personal/components/integralShow.vue
  2. 6 3
      src/views/personal/myPublicRecruitment/index.vue

+ 2 - 1
src/views/personal/components/integralShow.vue

@@ -6,7 +6,7 @@
       <span style="font-size: 14px; color: #777; line-height: 24px; cursor: pointer;" class="ml-2">积分规则</span>
     </div>
     <div class="d-flex justify-space-between align-end my-1">
-      <span style="font-size: 42px; color: #ff9300; line-height: 50px;" class="ml-10">{{ integral }}</span>
+      <span style="font-size: 42px; color: #ff9300; line-height: 50px;" class="ml-10 cursor-pointer" @click="router.push({ path: '/myPublicRecruitment', query: { tab: 2 } })">{{ integral }}</span>
       <span style="font-size: 16px; color: #787d82; line-height: 24px;" class="mr-8">
         积分土豪的都喜欢来这里,
         <span style="color: #ff7802; cursor: pointer;">积分商城</span>
@@ -16,6 +16,7 @@
 </template>
 
 <script setup>
+import { useRouter } from 'vue-router'; const router = useRouter()
 defineOptions({name: 'myRegistration-integralShow'})
 const integral = '135'
 </script>

+ 6 - 3
src/views/personal/myPublicRecruitment/index.vue

@@ -21,11 +21,14 @@
 <script setup>
 import myRecommendation from './myRecommendation.vue'
 import myRegistration from './myRegistration.vue'
+import { useRoute } from 'vue-router'; const route = useRoute()
+import { useRouter } from 'vue-router'; const router = useRouter()
 import { ref } from 'vue'
 defineOptions({name: 'personal-myPublicRecruitment-index'})
-
-const tab = ref(1)
-const getPositionList = () => {}
+const tab = ref(+route.query?.tab || 1)
+const getPositionList = () => {
+  if (route.query) router.replace({ path: route.path }) // 不留记录的清除跳转带过来的参数
+}
 </script>
 <style lang="scss" scoped>
 </style>