2 Commits 460ac9386a ... 81f908f547

Tác giả SHA1 Thông báo Ngày
  abpcoder 81f908f547 Merge branch 'mp' of http://49.234.186.218:9000/root/ieplus-app into mp 1 tháng trước cách đây
  abpcoder ee42de6599 vhs - index - score step init 1 tháng trước cách đây

+ 20 - 0
src/api/flyio.ts

@@ -17,6 +17,20 @@ fly.config = requestConfig;
 const refreshFly = new Fly();
 refreshFly.config = requestConfig;
 
+const cleanParams = (obj: any) => {
+  if (!obj || typeof obj !== 'object') return obj
+  Object.keys(obj).forEach(k => {
+    const v = obj[k]
+    if (v === undefined || v === null) {
+      delete obj[k]
+    } else if (typeof v === 'object') {
+      cleanParams(v)
+    }
+  })
+
+  return obj
+}
+
 fly.interceptors.request.use((request: any) => {
   const userStore = useUserStore();
   const token = userStore.accessToken;
@@ -33,6 +47,12 @@ fly.interceptors.request.use((request: any) => {
   if (location) {
     request.headers['location'] = encodeURIComponent(location);
   }
+  if (request.params) {
+    request.params = cleanParams(request.params)
+  }
+  if (request.body) {
+    request.body = cleanParams(request.body)
+  }
   return request;
 });
 fly.interceptors.response.use(

+ 276 - 267
src/common/enum.ts

@@ -2,170 +2,170 @@
  * 应用配置项的 key
  */
 export enum EnumAppConfigKey {
-  /**
-   * 短信验证码是否开启图形验证
-   */
-  SMS_CAPTCHA_ENABLE = 'sys.sms.captchaEnabled'
+    /**
+     * 短信验证码是否开启图形验证
+     */
+    SMS_CAPTCHA_ENABLE = 'sys.sms.captchaEnabled'
 }
 
 /**
  * 短信发送类型
  */
 export enum EnumSmsApiType {
-  /**
-   * 无需校验 无需token 发送短信-适用于登录
-   */
-  NO_VALIDATION_NO_TOKEN = 'NoValidationNoToken',
-  /**
-   * 需校验 需要 token 发送短信-适用于注册
-   */
-  NO_TOKEN = 'NoToken',
-  /**
-   * 普通发送短信
-   */
-  NORMAL = 'normal'
+    /**
+     * 无需校验 无需token 发送短信-适用于登录
+     */
+    NO_VALIDATION_NO_TOKEN = 'NoValidationNoToken',
+    /**
+     * 需校验 需要 token 发送短信-适用于注册
+     */
+    NO_TOKEN = 'NoToken',
+    /**
+     * 普通发送短信
+     */
+    NORMAL = 'normal'
 }
 
 /**
  * 短信类型
  */
 export enum EnumSmsType {
-  /**
-   * code
-   */
-  CODE = 'CODE',
-  /**
-   * ecard
-   */
-  ECARD = 'ECARD',
-  /**
-   * password
-   */
-  PASSWORD = 'PASSWORD'
+    /**
+     * code
+     */
+    CODE = 'CODE',
+    /**
+     * ecard
+     */
+    ECARD = 'ECARD',
+    /**
+     * password
+     */
+    PASSWORD = 'PASSWORD'
 }
 
 export enum EnumDictName {
-  /**
-   * 考生类别
-   */
-  EXAM_TYPE = 'exam_type'
+    /**
+     * 考生类别
+     */
+    EXAM_TYPE = 'exam_type'
 }
 
 export enum STATIC_PAGE_PATH {
-  /**
-   * 登录
-   */
-  LOGIN = '/pagesSystem/pages/login/login',
-  /**
-   * 注册
-   */
-  REGISTER = '/pagesSystem/pages/register/register',
-  /**
-   * 找回密码
-   */
-  FIND_PASSWORD = '/pagesSystem/pages/find-password/find-password',
-  /**
-   * 修改密码
-   */
-  CHANGE_PASSWORD = '/pagesSystem/pages/change-password/change-password',
-  /**
-   * 绑定手机号
-   */
-  BIND_PHONE = '/pagesSystem/pages/bind-phone/bind-phone'
+    /**
+     * 登录
+     */
+    LOGIN = '/pagesSystem/pages/login/login',
+    /**
+     * 注册
+     */
+    REGISTER = '/pagesSystem/pages/register/register',
+    /**
+     * 找回密码
+     */
+    FIND_PASSWORD = '/pagesSystem/pages/find-password/find-password',
+    /**
+     * 修改密码
+     */
+    CHANGE_PASSWORD = '/pagesSystem/pages/change-password/change-password',
+    /**
+     * 绑定手机号
+     */
+    BIND_PHONE = '/pagesSystem/pages/bind-phone/bind-phone'
 }
 
 export enum EnumExamMode {
-  /**
-   * 练习
-   */
-  PRACTICE = 1,
-  /**
-   * 考试
-   */
-  EXAM = 2
+    /**
+     * 练习
+     */
+    PRACTICE = 1,
+    /**
+     * 考试
+     */
+    EXAM = 2
 }
 
 /**
  * 题目类型
  */
 export enum EnumQuestionType {
-  /**
-   * 单选
-   */
-  SINGLE_CHOICE = 1,
-  /**
-   * 多选
-   */
-  MULTIPLE_CHOICE = 2,
-  /**
-   * 判断
-   */
-  JUDGMENT = 3,
-  /**
-   * 填空
-   */
-  FILL_IN_THE_BLANK = 4,
-  /**
-   * 主观题
-   */
-  SUBJECTIVE = 5,
-  /**
-   * 简答
-   */
-  SHORT_ANSWER = 6,
-  /**
-   * 问答题
-   */
-  ESSAY = 7,
-  /**
-   * 分析题
-   */
-  ANALYSIS = 8,
+    /**
+     * 单选
+     */
+    SINGLE_CHOICE = 1,
+    /**
+     * 多选
+     */
+    MULTIPLE_CHOICE = 2,
+    /**
+     * 判断
+     */
+    JUDGMENT = 3,
+    /**
+     * 填空
+     */
+    FILL_IN_THE_BLANK = 4,
+    /**
+     * 主观题
+     */
+    SUBJECTIVE = 5,
+    /**
+     * 简答
+     */
+    SHORT_ANSWER = 6,
+    /**
+     * 问答题
+     */
+    ESSAY = 7,
+    /**
+     * 分析题
+     */
+    ANALYSIS = 8,
 
-  /**
-   * 阅读题
-   */
-  OTHER = 99
+    /**
+     * 阅读题
+     */
+    OTHER = 99
 }
 
 /**
  * 用户类型
  */
 export enum EnumUserType {
-  /**
-   * 系统用户
-   */
-  SYSTEM = '00',
-  /**
-   * 学生
-   */
-  STUDENT = '01',
-  /**
-   * 教师
-   */
-  TEACHER = '11',
-  /**
-   * 代理商
-   */
-  AGENT = '10',
-  /**
-   * 机构
-   */
-  AGENCY = '12'
+    /**
+     * 系统用户
+     */
+    SYSTEM = '00',
+    /**
+     * 学生
+     */
+    STUDENT = '01',
+    /**
+     * 教师
+     */
+    TEACHER = '11',
+    /**
+     * 代理商
+     */
+    AGENT = '10',
+    /**
+     * 机构
+     */
+    AGENCY = '12'
 }
 
 /**
  * 考试类型
  */
 export enum EnumExamRecordType {
-  /**
-   * 模拟考试
-   */
-  SIMULATED = 'simulated',
-  /**
-   * 组卷作业
-   */
-  HOMEWORK = 'homework'
+    /**
+     * 模拟考试
+     */
+    SIMULATED = 'simulated',
+    /**
+     * 组卷作业
+     */
+    HOMEWORK = 'homework'
 }
 
 
@@ -173,183 +173,192 @@ export enum EnumExamRecordType {
  * 绑定场景
  */
 export enum EnumBindScene {
-  /**
-   * 注册
-   */
-  REGISTER = 'register',
-  /**
-   * 注册绑定
-   */
-  REGISTER_BIND = 'register_bind',
-  /**
-   * 登录绑定
-   */
-  LOGIN_BIND = 'login_bind',
-  /**
-   * 老师或者代理商完善信息
-   */
-  IMPROVE = 'improve'
+    /**
+     * 注册
+     */
+    REGISTER = 'register',
+    /**
+     * 注册绑定
+     */
+    REGISTER_BIND = 'register_bind',
+    /**
+     * 登录绑定
+     */
+    LOGIN_BIND = 'login_bind',
+    /**
+     * 老师或者代理商完善信息
+     */
+    IMPROVE = 'improve'
 }
 
 export enum EnumExamType {
-  /**
-   * 职高对口升学
-   */
-  VHS = 'VHS',
-  /**
-   * 单招(应届普高)
-   */
-  OHS = 'OHS',
-  /**
-   * 单招(中职)
-   */
-  SVS = 'SVS'
+    /**
+     * 职高对口升学
+     */
+    VHS = 'VHS',
+    /**
+     * 单招(应届普高)
+     */
+    OHS = 'OHS',
+    /**
+     * 单招(中职)
+     */
+    SVS = 'SVS'
 }
 
 export enum EnumSimulatedRecordStatus {
-  /**
-   * 空卷
-   */
-  INIT = 1,
-  /**
-   * 签到
-   */
-  SIGN = 2,
-  /**
-   * 考试
-   */
-  EXAM = 3,
-  /**
-   * 交卷
-   */
-  SUBMIT = 4,
-  /**
-   * 阅卷
-   */
-  REVIEW = 5,
-  /**
-   * 发布
-   */
-  PUBLISH = 6,
-  /**
-   * 关闭
-   */
-  CLOSE = 7,
+    /**
+     * 空卷
+     */
+    INIT = 1,
+    /**
+     * 签到
+     */
+    SIGN = 2,
+    /**
+     * 考试
+     */
+    EXAM = 3,
+    /**
+     * 交卷
+     */
+    SUBMIT = 4,
+    /**
+     * 阅卷
+     */
+    REVIEW = 5,
+    /**
+     * 发布
+     */
+    PUBLISH = 6,
+    /**
+     * 关闭
+     */
+    CLOSE = 7,
 }
 
 export enum EnumPaperType {
-  /**
-   * 练习
-   */
-  PRACTICE = 'Practice',
-  /**
-   * 考试
-   */
-  SIMULATED = 'Simulated',
-  /**
-   * 教材同步练习
-   */
-  COURSE = 'Course',
-  /**
-   * 测试卷
-   */
-  TEST = 'Test'
+    /**
+     * 练习
+     */
+    PRACTICE = 'Practice',
+    /**
+     * 考试
+     */
+    SIMULATED = 'Simulated',
+    /**
+     * 教材同步练习
+     */
+    COURSE = 'Course',
+    /**
+     * 测试卷
+     */
+    TEST = 'Test'
 }
 
 export enum EnumReviewMode {
-  /**
-   * 交卷后评卷
-   */
-  AFTER_SUBMIT = 1,
-  /**
-   * 答完一题就评卷
-   */
-  DURING_ANSWER = 2
+    /**
+     * 交卷后评卷
+     */
+    AFTER_SUBMIT = 1,
+    /**
+     * 答完一题就评卷
+     */
+    DURING_ANSWER = 2
 }
 
 export enum EnumUserRole {
-  /**
-   * 普通用户
-   */
-  NORMAL = 'normal',
-  /**
-   * 游客
-   */
-  GUEST = 'guest',
-  /**
-   * 会员
-   */
-  VIP = 'vip',
-  /**
-   * 代理商
-   */
-  AGENT = 'agent',
-  /**
-   * 教师
-   */
-  TEACHER = 'teacher'
+    /**
+     * 普通用户
+     */
+    NORMAL = 'normal',
+    /**
+     * 游客
+     */
+    GUEST = 'guest',
+    /**
+     * 会员
+     */
+    VIP = 'vip',
+    /**
+     * 代理商
+     */
+    AGENT = 'agent',
+    /**
+     * 教师
+     */
+    TEACHER = 'teacher'
 }
 
 export enum EnumEvent {
-  /**
-   * 打开VIP弹窗
-   */
-  OPEN_VIP_POPUP = 'OPEN_VIP_POPUP'
+    /**
+     * 打开VIP弹窗
+     */
+    OPEN_VIP_POPUP = 'OPEN_VIP_POPUP'
 }
 
 /**
  * 卡类型
  */
 export enum CardType {
-  VIP = 1,
-  DEPT = 2,
-  PLATFORM = 6,
-  /**
-   * 体验卡
-   */
-  EXPERIENCE = 9
+    VIP = 1,
+    DEPT = 2,
+    PLATFORM = 6,
+    /**
+     * 体验卡
+     */
+    EXPERIENCE = 9
 }
 
 export enum EnumPaperWorkState {
-  /**
-   * 未完成
-   */
-  NOT_COMPLETED = 2,
-  /**
-   * 已完成
-   */
-  COMPLETED = 4
+    /**
+     * 未完成
+     */
+    NOT_COMPLETED = 2,
+    /**
+     * 已完成
+     */
+    COMPLETED = 4
 }
 
 export enum EnumPaperBuildType {
-  /**
-   * 定向智能
-   */
-  EXACT_INTELLIGENT = 'ExactIntelligent',
-  /**
-   * 全量智能
-   */
-  FULL_INTELLIGENT = 'FullIntelligent',
-  /**
-   * 定向手动
-   */
-  EXACT_HAND = 'ExactHand',
-  /**
-   * 全量手动
-   */
-  FULL_HAND = 'FullHand'
+    /**
+     * 定向智能
+     */
+    EXACT_INTELLIGENT = 'ExactIntelligent',
+    /**
+     * 全量智能
+     */
+    FULL_INTELLIGENT = 'FullIntelligent',
+    /**
+     * 定向手动
+     */
+    EXACT_HAND = 'ExactHand',
+    /**
+     * 全量手动
+     */
+    FULL_HAND = 'FullHand'
 }
 
 export enum EnumBrochureType {
-  INTRODUCTION = 1, // 学校概况
-  ENROLL_RULE = 2, // 招生简章
-  EXAM_TIME = 3, // 考试大纲
-  WORK = 4, // 就业
-  OTHER_RULE = 5 // 其它
+    INTRODUCTION = 1, // 学校概况
+    ENROLL_RULE = 2, // 招生简章
+    EXAM_TIME = 3, // 考试大纲
+    WORK = 4, // 就业
+    OTHER_RULE = 5 // 其它
 }
 
 export enum EnumSimulatePickType {
-  DANGER = 0,
-  NORMAL = 1,
-  SAFETY = 2
+    DANGER = 0,
+    NORMAL = 1,
+    SAFETY = 2
+}
+
+export enum EnumScoreLock {
+    // 待锁定状态
+    locking = -1,
+    // 正常状态
+    unlock = 0,
+    // 已锁定状态
+    locked = 1
 }

+ 24 - 24
src/pages.json

@@ -195,30 +195,30 @@
             "navigationBarTitleText": ""
           }
         },
-        // {
-        //   "path": "pages/vhs/index/index",
-        //   "style": {
-        //     "navigationBarTitleText": ""
-        //   }
-        // },
-        // {
-        //   "path": "pages/vhs/detail/detail",
-        //   "style": {
-        //     "navigationBarTitleText": ""
-        //   }
-        // },
-        // {
-        //   "path": "pages/vhs/edit/edit",
-        //   "style": {
-        //     "navigationBarTitleText": ""
-        //   }
-        // },
-        // {
-        //   "path": "pages/vhs/list/list",
-        //   "style": {
-        //     "navigationBarTitleText": ""
-        //   }
-        // },
+         {
+           "path": "pages/vhs/index/index",
+           "style": {
+             "navigationBarTitleText": ""
+           }
+         },
+         {
+           "path": "pages/vhs/detail/detail",
+           "style": {
+             "navigationBarTitleText": ""
+           }
+         },
+         {
+           "path": "pages/vhs/edit/edit",
+           "style": {
+             "navigationBarTitleText": ""
+           }
+         },
+         {
+           "path": "pages/vhs/list/list",
+           "style": {
+             "navigationBarTitleText": ""
+           }
+         },
         {
           "path": "pages/ranking/ranking",
           "style": {

+ 7 - 5
src/pagesMain/pages/volunteer/components/volunteer-banner.vue

@@ -5,9 +5,11 @@
                                @click="goRateCalc"/>
         <view class="flex-1 flex flex-col justify-between">
             <volunteer-banner-item :title="secondaryEntry.title" :desc="secondaryEntry.desc" desc-bg-color="#F8ECA6"
-                                   bg-src="/volunteer/index/banner_skill.png" custom-class="h-162" @click="goSkillCalc"/>
+                                   bg-src="/volunteer/index/banner_skill.png" custom-class="h-162"
+                                   @click="goSkillCalc"/>
             <volunteer-banner-item title="志愿表" desc="我的报考意向" desc-bg-color="#DDD6FF"
-                                   bg-src="/volunteer/index/banner_list.png" custom-class="h-162" @click="goVoluntaryList"/>
+                                   bg-src="/volunteer/index/banner_list.png" custom-class="h-162"
+                                   @click="goVoluntaryList"/>
         </view>
     </view>
 </template>
@@ -24,7 +26,7 @@ const userStore = useUserStore()
 const mainEntry = computed(() => userStore.isVHS ? {
     title: '填志愿',
     desc: '大数据分析+智能算法'
-}: {
+} : {
     title: '测录取概率',
     desc: '院校录取风险评估'
 })
@@ -32,7 +34,7 @@ const mainEntry = computed(() => userStore.isVHS ? {
 const secondaryEntry = computed(() => userStore.isVHS ? {
     title: '查位次',
     desc: '查历年等效分'
-}: {
+} : {
     title: '测技能分',
     desc: '精准定位'
 })
@@ -41,7 +43,7 @@ const goRateCalc = function () {
     transferTo(userStore.isVHS ? routes.VHSIndex : routes.voluntaryIndex)
 }
 const goSkillCalc = function () {
-    transferTo(routes.skillIndex)
+    transferTo(userStore.isVHS ? routes.pageRanking : routes.skillIndex)
 }
 const goVoluntaryList = function () {
     transferTo(userStore.isVHS ? routes.VHSList : routes.voluntaryList)

+ 4 - 3
src/pagesOther/hooks/useUserSnapshotInjection.js → src/pagesOther/hooks/useUserSnapshotInjection.ts

@@ -1,15 +1,16 @@
 import {useUserStore} from "@/store/userStore";
 import {VHS_USER_SNAPSHOT} from "@/types/injectionSymbols";
+import {UserInfo} from "@/types/user";
 
-export const useProvideUserSnapshot = function (userSnapshotRefOrGetter) {
+export const useProvideUserSnapshot = function (userSnapshotRefOrGetter: Ref<Partial<UserInfo>> | null = null) {
     // 有时志愿表会存储一部分当前用户信息,这部分信息命名为userSnapshot
     // 使用时,用快照信息去覆盖用户信息,即可得到当时保存志愿表时的用户信息。
-    const {userInfo} = storeToRefs(useUserStore())
+    const userStore = useUserStore()
 
     const userSnapshot = computed(() => {
         const snapshot = toValue(userSnapshotRefOrGetter)
         return {
-            ...toValue(userInfo),
+            ...userStore.userInfo,
             ...snapshot
         }
     })

+ 1 - 5
src/pagesOther/pages/vhs/hooks/useVoluntarySearchInjection.js

@@ -1,8 +1,4 @@
-import {ref, computed, onMounted} from 'vue';
-import {injectLocal, provideLocal, toValue} from "@vueuse/core";
-import {useProvideSearchModel} from "@/components/mx-condition/useSearchModelInjection";
-import {filters} from "@/api/webApi/collegemajor";
-import {useCacheStore} from "@/hooks/useCacheStore";
+import {injectLocal, provideLocal} from "@vueuse/core";
 import {useConditionPickType} from "@/components/mx-condition/modules/useConditionPickType";
 import {useConditionCollegeFeatures} from "@/components/mx-condition/modules/useConditionCollegeFeatures";
 import {useConditionCollegeType} from "@/components/mx-condition/modules/useConditionCollegeType";

+ 4 - 6
src/pagesOther/pages/vhs/hooks/useVoluntarySortService.js

@@ -1,8 +1,6 @@
-import {computed, ref, watch} from 'vue';
-import {toValue} from "@vueuse/core";
-import {useInjectVoluntaryCart} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryCartInjection";
-import {useInjectVoluntaryData} from "@/hooks/useVoluntaryDataInjection";
-import MxConst from "@/common/mxConst";
+import {useInjectVoluntaryCart} from "@/pagesOther/pages/vhs/hooks/useVoluntaryCartInjection";
+import {useInjectVoluntaryData} from "@/pagesOther/hooks/useVoluntaryDataInjection";
+import {recommendMajorSortFn} from "@/utils/common";
 
 export const useVoluntarySortService = function (popupRef, defaultSort = []) {
 
@@ -150,7 +148,7 @@ export const useVoluntarySortService = function (popupRef, defaultSort = []) {
     }
 
     const getSelectedSortedMajors = (group) => {
-        return group.majors.filter(m => m.selected).sort(MxConst.recommendMajorSortFn)
+        return group.majors.filter(m => m.selected).sort(recommendMajorSortFn)
     }
 
     // hooks

+ 5 - 4
src/pagesOther/pages/vhs/index/components/course-selector.vue

@@ -1,9 +1,9 @@
 <template>
-    <view class="fx-col">
+    <view class="flex flex-col">
         <view class="pl-20">
             专业类别
         </view>
-        <view class="py-15 fx-row gap-20">
+        <view class="py-15 flex gap-20">
             <uv-tags size="large" type="primary" shape="circle" icon="lock" plain plain-fill
                      :text="currentUser.examMajorName"/>
         </view>
@@ -11,9 +11,10 @@
 </template>
 
 <script setup>
-import {useUserStore} from "@/hooks/useUserStore";
 
-const {currentUser} = useUserStore()
+import {useUserStore} from "@/store/userStore";
+
+const currentUser = useUserStore()
 </script>
 
 <style lang="scss" scoped>

+ 16 - 17
src/pagesOther/pages/vhs/index/components/score-form.vue

@@ -28,20 +28,19 @@
 </template>
 
 <script setup>
-import {watch} from 'vue';
-import MxConfig from "@/common/mxConfig";
-import {createPropDefine} from "@/utils";
-import {useUserStore} from "@/hooks/useUserStore";
-import {useInjectTransfer} from "@/hooks/useTransfer";
-import {useInjectVoluntaryData} from "@/hooks/useVoluntaryDataInjection";
-import CourseSelector from "@/pagesOther/pages/voluntary/index/components/course-selector.vue";
+import CourseSelector from "@/pagesOther/pages/vhs/index/components/course-selector.vue";
 import debounce from "@/uni_modules/uv-ui-tools/libs/function/debounce";
-import {useCacheStore} from "@/hooks/useCacheStore";
-import {getRankByScore} from "@/api/webApi/volunteer";
-import {toast} from "@/uni_modules/uv-ui-tools/libs/function";
+import {getRankByScore} from "@/api/modules/vhs";
+import {useInjectVoluntaryData} from "@/pagesOther/hooks/useVoluntaryDataInjection";
+import {useTransferPage} from "@/hooks/useTransferPage";
+import {useUserStore} from "@/store/userStore";
+import {routes} from "@/common/routes";
 
 const props = defineProps({
-    model: createPropDefine({}, Object)
+    model: {
+        type: Object,
+        default: () => ({})
+    }
 })
 const inputCommon = {
     type: 'number',
@@ -50,13 +49,12 @@ const inputCommon = {
     customStyle: {height: '30px'}
 }
 
-const {isScoreLocked, isScoreUnlocked} = useUserStore()
-const {transferTo} = useInjectTransfer()
+const {isScoreLocked, isScoreUnlocked} = storeToRefs(useUserStore())
+const {transferTo} = useTransferPage()
 const {validate, voluntaryData} = useInjectVoluntaryData()
-const {dispatchCache} = useCacheStore()
 
 const goQuerySegment = () => {
-    transferTo('/pages/career/query-segment/query-segment')
+    transferTo(routes.pageRanking)
 }
 
 const setRankByScore = async () => {
@@ -68,7 +66,7 @@ const setRankByScore = async () => {
     }
 
     const payload = {mode: firstSubject, scoreRank: score}
-    const res = await dispatchCache(getRankByScore, payload)
+    const res = await getRankByScore(payload)
     // 2次校验,防止串分
     if (payload.scoreRank != props.model.score) return
     props.model.rank = res.data
@@ -84,11 +82,12 @@ const validateForm = async function () {
     await validate(score)
     // seat validate
     let error = ''
+    debugger
     if (!seatInput) error = '请输入位次'
     else if (seatInput && !/^[1-9]\d*$/.test(seatInput)) error = '请输入合法的位次'
     else if (!isScoreUnlocked.value && (seatInput < rank.highestRank || seatInput > rank.lowestRank)) error = `位次必须在[${rank.highestRank}~${rank.lowestRank}]之间`
     if (error) {
-        toast(error)
+        uni.$ie.showError(error)
         return Promise.reject(error)
     }
 }

+ 27 - 21
src/pagesOther/pages/vhs/index/components/score-step.vue

@@ -1,9 +1,9 @@
 <template>
     <view class="tabs-swiper-content">
-        <uv-image :src="banner" width="100vw" height="auto" mode="widthFix" class="-mt-[44px]"/>
+        <ie-image src="/volunteer/vhs/vhs_voluntary_banner.png" is-oss custom-class="w-[100vw] h-450 mt-[-44px]"/>
         <view class="mx-30 -mt-60 bg-white rounded-lg relative z-20">
-            <view class="fx-col items-center py-50">
-                <view class="fx-row items-center gap-5 mb-10" @click="$refs.popup.open()">
+            <view class="flex flex-col items-center py-50">
+                <view class="flex items-center gap-5 mb-10" @click="$refs.popup.open()">
                     <uv-icon name="question-circle" color="primary"/>
                     <view class="text-sm text-primary">填报须知</view>
                 </view>
@@ -11,7 +11,7 @@
             </view>
             <score-form ref="scoreForm" :model="model"/>
         </view>
-        <view class="px-30 my-40 fx-row fx-bet-cen gap-30">
+        <view class="px-30 my-40 flex justify-between items-center gap-30">
             <view class="flex-2">
                 <uv-button type="primary" plain shape="circle" :icon="iconList"
                            :custom-style="{height: '44px'}" @click="goVoluntaryList">
@@ -20,37 +20,43 @@
             </view>
             <view class="flex-3">
                 <uv-button type="primary" shape="circle" text="下一步"
-                           color="linear-gradient(to right, var(--primary-deep-color), var(--primary-light-color))"
+                           color="linear-gradient(to right, var(--primary-color), var(--primary-color-500))"
                            :custom-style="{height: '44px', border: 'none'}" @click="handleForward"/>
             </view>
         </view>
-        <mx-popup-template ref="popup" title="填报须知" left="" right="我知道了" @right="$refs.popup.close()">
-            <view class="text-main text-xs fx-col gap-30">
-                <view v-for="line in noticeTips" class="indent-50">{{ line }}</view>
+        <ie-popup ref="popup" mode="center">
+            <view class="w-[80vw] px-30 pb-30">
+                <view class="h-90 flex justify-center items-center text-30 font-bold text-fore-title">
+                    填报须知
+                </view>
+                <view class="mb-30 text-fore-content text-xs flex flex-col gap-30">
+                    <view v-for="line in noticeTips" class="indent-50">{{ line }}</view>
+                </view>
+                <uv-button type="primary" text="我知道了" shape="circle" @click="$refs.popup.close()"/>
             </view>
-        </mx-popup-template>
+        </ie-popup>
     </view>
 </template>
 
 <script setup>
-import {ref} from 'vue';
-import {combineOssFile} from "@/utils";
-import ScoreForm from "@/pagesOther/pages/voluntary/index/components/score-form.vue";
-import {useInjectTransfer} from "@/hooks/useTransfer";
-import {useInjectVoluntaryForm} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryFormInjection";
-import {useInjectVoluntaryAssistant} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryAssistantInjection";
-import {useInjectVoluntaryStep} from "@/pagesOther/pages/voluntary/hooks/useVoluntaryStepInjection";
-import {useInjectVoluntaryData} from "@/hooks/useVoluntaryDataInjection";
 
-const banner = combineOssFile('/static/voluntary/voluntary_banner.png')
-const iconList = combineOssFile('/static/voluntary/voluntary_list_icon.png')
+import config from "@/config";
+import ScoreForm from "@/pagesOther/pages/vhs/index/components/score-form.vue";
+import {useTransferPage} from "@/hooks/useTransferPage";
+import {useInjectVoluntaryStep} from "@/pagesOther/pages/vhs/hooks/useVoluntaryStepInjection";
+import {useInjectVoluntaryForm} from "@/pagesOther/pages/vhs/hooks/useVoluntaryFormInjection";
+import {useInjectVoluntaryData} from "@/pagesOther/hooks/useVoluntaryDataInjection";
+import {useInjectVoluntaryAssistant} from "@/pagesOther/pages/vhs/hooks/useVoluntaryAssistantInjection";
+import {routes} from "@/common/routes";
+
+const iconList = config.ossUrl + '/volunteer/vhs/vhs_voluntary_list_icon.png'
 const noticeTips = [
     '本系统提供高考志愿填报智能模拟功能,不等同于实际的网上填报志愿,正式填报请登录省考试院指定填报网站。',
     '各地的高考政策不同,模拟志愿填报会根据当前注册用户所属地自动匹配。',
     '本系统数据均来自省考试院公布的当年招生计划和历年录取数据,推荐结果仅供您模拟参考使用。正式填报时请务必参阅省考试院发布的相关招生计划书籍,如遇到数据错漏请以考试院公布信息为准。',
 ]
 
-const {transferTo} = useInjectTransfer()
+const {transferTo} = useTransferPage()
 const {currentStep} = useInjectVoluntaryStep()
 const {model} = useInjectVoluntaryForm()
 const {validate} = useInjectVoluntaryData()
@@ -58,7 +64,7 @@ const {handleForward, onBeforeForward} = useInjectVoluntaryAssistant()
 const scoreForm = ref(null)
 
 const goVoluntaryList = () => {
-    transferTo('/pages/voluntary/list/list')
+    transferTo(routes.VHSList)
 }
 
 onBeforeForward(async () => {

+ 3 - 3
src/pagesOther/pages/vhs/index/index.vue

@@ -1,10 +1,10 @@
 <template>
-    <ie-page>
+    <ie-page fix-height :safe-area-inset-bottom="false">
         <ie-navbar :title="navBinding.title"/>
         <ie-auto-resizer>
             <swiper :current="currentStep" disable-touch class="swiper h-full">
                 <swiper-item>
-<!--                    <score-step/>-->
+                    <score-step/>
                 </swiper-item>
                 <swiper-item>
 <!--                    <batch-step/>-->
@@ -18,7 +18,7 @@
 </template>
 
 <script setup>
-// import ScoreStep from "@/pagesOther/pages/vhs/index/components/score-step.vue";
+import ScoreStep from "@/pagesOther/pages/vhs/index/components/score-step.vue";
 // import BatchStep from "@/pagesOther/pages/vhs/index/components/batch-step.vue";
 // import CartStep from "@/pagesOther/pages/vhs/index/components/cart-step.vue";
 import {useProvideVoluntaryStep} from "@/pagesOther/pages/vhs/hooks/useVoluntaryStepInjection";

+ 10 - 1
src/store/userStore.ts

@@ -6,7 +6,7 @@ import type { Study, UserStoreState } from '@/types';
 import type { UserInfo, VipCardInfo } from '@/types/user';
 import tools from '@/utils/uni-tool';
 import defaultAvatar from '@/static/personal/avatar_default.png'
-import { CardType, EnumBindScene, EnumExamType, EnumReviewMode, EnumUserType } from '@/common/enum';
+import {CardType, EnumBindScene, EnumExamType, EnumReviewMode, EnumScoreLock, EnumUserType} from '@/common/enum';
 import { getDirectedSchool, saveDirectedSchool } from '@/api/modules/study';
 import { usePay } from '@/hooks/usePay';
 import { getUserBindCard } from '@/api/modules/user';
@@ -131,6 +131,15 @@ export const useUserStore = defineStore('ie-user', {
     examMajorName(): string {
       return this.userInfo.examMajorName || '';
     },
+    isScoreLocked(): boolean {
+      return this.userInfo.scoreLock == EnumScoreLock.locked
+    },
+    isScoreUnlocked(): boolean {
+      return this.userInfo.scoreLock == EnumScoreLock.unlock
+    },
+    isScoreLocking(): boolean {
+      return this.userInfo.scoreLock == EnumScoreLock.locking
+    },
     isBindWechat(): boolean {
       return !!this.userInfo.wxOpenId;
     }