diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 74dd72e..f5344b1 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -36,7 +36,7 @@ jobs: - name: Installing Dependencies if: steps.cache-dependencies.outputs.cache-hit != 'true' - run: pnpm install --ignore-scripts + run: pnpm install --no-frozen-lockfile - name: Building run: | diff --git a/components.d.ts b/components.d.ts index c0e2f9d..1e3feba 100644 --- a/components.d.ts +++ b/components.d.ts @@ -16,7 +16,6 @@ declare module 'vue' { ElInput: typeof import('element-plus/es')['ElInput'] ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] - ElRadio: typeof import('element-plus/es')['ElRadio'] ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElSelect: typeof import('element-plus/es')['ElSelect'] diff --git a/src/apis/service/User/getStatistic.ts b/src/apis/service/User/getStatistic.ts new file mode 100644 index 0000000..ba92e20 --- /dev/null +++ b/src/apis/service/User/getStatistic.ts @@ -0,0 +1,14 @@ +import { request } from "@/apis/axios"; + +// 定义请求数据的接口 + + + +const setStatisticAPI = (params: { id: number }) => { + return request("/api/user/statistic", { + method: "GET", + params: params + }); +}; + +export default setStatisticAPI; \ No newline at end of file diff --git a/src/pages/DetailInfo/index.vue b/src/pages/DetailInfo/index.vue index 1ad2899..5582306 100644 --- a/src/pages/DetailInfo/index.vue +++ b/src/pages/DetailInfo/index.vue @@ -273,6 +273,7 @@ onMounted(() => { id.value = Number(localStorage.getItem('id')) getInfo(); }else{ + console.log(tempStore.surveyType) submitData.value = { desc: '', img: '', @@ -281,7 +282,7 @@ onMounted(() => { time: '', title: '', day_limit: 0, - survey_type: tempStore.surveyType.value, + survey_type: Number(tempStore.surveyType), verify: false } loading.value = false diff --git a/src/pages/Home/index.vue b/src/pages/Home/index.vue index b2fc343..9d8c516 100644 --- a/src/pages/Home/index.vue +++ b/src/pages/Home/index.vue @@ -45,7 +45,7 @@ import { modal, showModal } from '@/components'; import questionnaireItem from './questionnaireItem.vue'; import { useRequest } from 'vue-hooks-plus'; import { getQuestionnaireListAPI } from '@/apis'; -import {nextTick, onMounted, ref} from 'vue'; +import {nextTick, onMounted, ref, watch} from 'vue'; import router from '@/router'; import {closeLoading, startLoading} from "@/utilities"; import { useMainStore } from '@/stores'; @@ -57,7 +57,10 @@ const pageSize = 4; const totalPageNum = ref(1); const questionnaireList = ref(); const loading = ref(true); -const surveyType = ref(tempStore.surveyType.value) +const surveyType = ref(tempStore.surveyType) +watch(surveyType, () => { + tempStore.surveyType = surveyType +}) onMounted(() => { loginStore.setShowHeader(true); }) diff --git a/src/pages/View/checkbox.vue b/src/pages/View/checkbox.vue index a01c565..bbe0450 100644 --- a/src/pages/View/checkbox.vue +++ b/src/pages/View/checkbox.vue @@ -19,7 +19,8 @@
- 最少选 {{ props.minimum_option }} 个 最多选 {{ props.maximum_option }} 个 + 最少选 {{ props.minimum_option }} 个  + 最多选 {{ props.maximum_option }} 个
{{ item.content }} diff --git a/src/pages/View/view.vue b/src/pages/View/view.vue index 4bd5a04..2e0cf0e 100644 --- a/src/pages/View/view.vue +++ b/src/pages/View/view.vue @@ -47,7 +47,7 @@
-
+
@@ -61,7 +61,7 @@
@@ -100,10 +100,30 @@
+
+
+ +
+
+
+
+ +
+
+ - diff --git a/src/pages/View/vote.vue b/src/pages/View/vote.vue new file mode 100644 index 0000000..19b2f82 --- /dev/null +++ b/src/pages/View/vote.vue @@ -0,0 +1,154 @@ + + + + +