diff --git a/src/const/index.ts b/src/const/index.ts index 605acdf..b60e9a5 100644 --- a/src/const/index.ts +++ b/src/const/index.ts @@ -54,9 +54,9 @@ export const questionnaireUrl = '/static/image/questionnairePage/questionnaire.p export const emptyUrl = '/static/image/noData.png' // icons -export const indexIcon1 = '/static/image/icons/问卷填写.png' -export const indexIcon2 = '/static/image/icons/问卷查看.png' -export const indexIcon3 = '/static/image/icons/查看排行.png' +export const indexIcon1 = '/static/image/icons/问卷查看.png' +export const indexIcon2 = '/static/image/icons/关于自己.png' +export const indexIcon3 = '/static/image/icons/关于他人.png' export const indexIcon4 = '/static/image/icons/心理问答.png' // rankList @@ -65,4 +65,7 @@ export const firstRank = '/static/image/list/first.png' export const secondRank = '/static/image/list/second.png' export const thirdRank = '/static/image/list/third.png' -export const feedbackUrl = 'https://xh4u7d54le.feishu.cn/share/base/form/shrcntq0JjHrPv50gsBhU5yVRrc' \ No newline at end of file +export const feedbackUrl = 'https://xh4u7d54le.feishu.cn/share/base/form/shrcntq0JjHrPv50gsBhU5yVRrc' +export const sourceCodeUrl = 'https://github.com/Justin3go/xiaoyou-mp' + +export const wxMoney = '/static/微信收款.jpg' \ No newline at end of file diff --git a/src/pages.json b/src/pages.json index b986c74..5db6309 100644 --- a/src/pages.json +++ b/src/pages.json @@ -97,6 +97,18 @@ "style": { "navigationBarTitleText": "智能客服" } + }, + { + "path": "pages/me/supportService", + "style": { + "navigationBarTitleText": "支持我们" + } + }, + { + "path": "pages/me/aboutService", + "style": { + "navigationBarTitleText": "关于笑友" + } } ], "globalStyle": { diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 6b5bfdb..b5be6c9 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -36,26 +36,26 @@ - - + + - 填写问卷 + 查看问卷 - - + + - 查看问卷 + 关于自己 - - + + - 查看排行 + 关于他人 - - + + 心理问答 @@ -99,7 +99,7 @@ import { userDefaultData, shareCodeUrl, bannerUrl1 } from "@/const"; import oneRowCard from "@/components/oneRowCard.vue"; import empty from "@/components/empty.vue"; import { onShow } from "@dcloudio/uni-app"; -import { indexIcon1, indexIcon2, indexIcon3, indexIcon4 } from "@/const" +import { indexIcon1, indexIcon2, indexIcon3, indexIcon4 } from "@/const"; const meStore = useMeStore(); const questionnaireCount = ref(12); @@ -117,7 +117,7 @@ const curNewsId = ref(""); const curNewsContent = ref(""); onShow(async () => { - if(meStore.user === null) { + if (meStore.user === null) { await getUser(); } console.log("App Show"); @@ -128,7 +128,7 @@ async function getUser() { const { data, error } = await execute(); console.log("query user data: ", data); console.log("query user error: ", error); - meStore.$patch({ user: data.me}) + meStore.$patch({ user: data.me }); } function clickNewsCard(item: { id: string; content: string }) { @@ -146,6 +146,42 @@ function confirmNews() { news.value.splice(deleteItem, 1); newsPopup.value.close(); } + +// common +function toQuestionnaire() { + setTimeout( + () => + uni.switchTab({ + url: "/pages/questionnaire/index", + }), + 500 // 等待点击动画 + ); +} +function toRankListMe() { + setTimeout( + () => + uni.navigateTo({ + url: "/pages/me/rankList?option=me", + }), + 500 + ); +} +function toRankListOther() { + setTimeout( + () => + uni.navigateTo({ + url: "/pages/me/rankList?option=other", + }), + 500 + ); +} +function toQA() { + uni.showToast({ + title: "敬请期待", + icon: "none", + duration: 2000, + }) +} diff --git a/src/pages/me/index.vue b/src/pages/me/index.vue index 445f18c..188d4d5 100644 --- a/src/pages/me/index.vue +++ b/src/pages/me/index.vue @@ -86,25 +86,25 @@ - + 支持我们 - + 代码开源 - + 关于笑友 - + 更多 @@ -135,7 +135,7 @@ import oneRowCard from "@/components/oneRowCard.vue"; import { getToken } from "@/utils/auth"; import { userDefaultData } from "@/const"; import { onShow, onInit, onLoad, onReady, onShareAppMessage } from "@dcloudio/uni-app"; -import { logoUrl, feedbackUrl } from "@/const"; +import { logoUrl, feedbackUrl, sourceCodeUrl } from "@/const"; import { useMutation } from "villus"; import { meGQL } from "@/graphql/me.graphql"; @@ -260,6 +260,35 @@ function customerChatService() { url: "/pages/me/customerChatService", }); } + +function supportService() { + uni.navigateTo({ + url: "/pages/me/supportService", + }); +} + +function codeService() { + uni.setClipboardData({ + data: sourceCodeUrl, + success: function () { + infoPopup.value.open(); + }, + }); +} + +function aboutService() { + uni.navigateTo({ + url: "/pages/me/aboutService", + }); +} + +function moreService() { + uni.showToast({ + title: "敬请期待", + icon: "none", + duration: 2000, + }); +} \ No newline at end of file diff --git a/src/pages/questionnaire/index.vue b/src/pages/questionnaire/index.vue index 058d1f5..1191657 100644 --- a/src/pages/questionnaire/index.vue +++ b/src/pages/questionnaire/index.vue @@ -59,7 +59,7 @@ const tabs = ["已填", "未填"]; const questionnaires: Ref = ref([]); const completed: Ref = ref([]); -const noCompleted: Ref = ref([]) +const noCompleted: Ref = ref([]); // 总的减去已完成的就是未完成的 watchEffect(() => { const idSet = new Set(); @@ -72,8 +72,8 @@ watchEffect(() => { res.push(item); } }); - noCompleted.value = res -}) + noCompleted.value = res; +}); const { execute: exeMe } = useQuery({ query: meGQL, paused: () => true }); const { execute: exeFindAllQ } = useQuery({ query: findAllQGQL, paused: () => true }); diff --git "a/src/static/image/icons/\345\205\263\344\272\216\344\273\226\344\272\272.png" "b/src/static/image/icons/\345\205\263\344\272\216\344\273\226\344\272\272.png" new file mode 100644 index 0000000..f4e769d Binary files /dev/null and "b/src/static/image/icons/\345\205\263\344\272\216\344\273\226\344\272\272.png" differ diff --git "a/src/static/image/icons/\345\205\263\344\272\216\350\207\252\345\267\261.png" "b/src/static/image/icons/\345\205\263\344\272\216\350\207\252\345\267\261.png" new file mode 100644 index 0000000..590125f Binary files /dev/null and "b/src/static/image/icons/\345\205\263\344\272\216\350\207\252\345\267\261.png" differ diff --git "a/src/static/image/icons/\345\277\203\347\220\206\351\227\256\347\255\224.png" "b/src/static/image/icons/\345\277\203\347\220\206\351\227\256\347\255\224.png" index cc55a58..74aa563 100644 Binary files "a/src/static/image/icons/\345\277\203\347\220\206\351\227\256\347\255\224.png" and "b/src/static/image/icons/\345\277\203\347\220\206\351\227\256\347\255\224.png" differ diff --git "a/src/static/image/icons/\346\237\245\347\234\213\346\216\222\350\241\214.png" "b/src/static/image/icons/\346\237\245\347\234\213\346\216\222\350\241\214.png" deleted file mode 100644 index a9eae3e..0000000 Binary files "a/src/static/image/icons/\346\237\245\347\234\213\346\216\222\350\241\214.png" and /dev/null differ diff --git "a/src/static/image/icons/\351\227\256\345\215\267\345\241\253\345\206\231.png" "b/src/static/image/icons/\351\227\256\345\215\267\345\241\253\345\206\231.png" deleted file mode 100644 index fb67a24..0000000 Binary files "a/src/static/image/icons/\351\227\256\345\215\267\345\241\253\345\206\231.png" and /dev/null differ diff --git "a/src/static/image/icons/\351\227\256\345\215\267\346\237\245\347\234\213.png" "b/src/static/image/icons/\351\227\256\345\215\267\346\237\245\347\234\213.png" index 0397713..e186a9f 100644 Binary files "a/src/static/image/icons/\351\227\256\345\215\267\346\237\245\347\234\213.png" and "b/src/static/image/icons/\351\227\256\345\215\267\346\237\245\347\234\213.png" differ diff --git "a/src/static/\345\276\256\344\277\241\346\224\266\346\254\276.jpg" "b/src/static/\345\276\256\344\277\241\346\224\266\346\254\276.jpg" new file mode 100644 index 0000000..b5470e7 Binary files /dev/null and "b/src/static/\345\276\256\344\277\241\346\224\266\346\254\276.jpg" differ