diff --git a/src/App.vue b/src/App.vue index 37d5c66..d45b4ab 100644 --- a/src/App.vue +++ b/src/App.vue @@ -203,4 +203,19 @@ button::after { margin-top: 20px; color: #fff9; } +.see-more { + display: flex; + align-items: center; + justify-content: center; + margin-top: 5px; +} +.see-more > text { + color: #39a8ff; + margin-top: 2px; + font-size: 13px; +} +.see-more > image { + width: 15px; + margin-top: 2px; +} diff --git a/src/apis.js b/src/apis.js index 24fcf38..bfe195b 100644 --- a/src/apis.js +++ b/src/apis.js @@ -15,7 +15,7 @@ function request(method, url, data = {}) { if (res.data) { const { code, data, message } = res.data; if (code === 0) resolve(data); - else { + else if (message) { if (message.indexOf("登录身份已失效") !== -1) { uni.removeStorageSync("token"); } @@ -365,3 +365,48 @@ export const getCurrentGameAPI = async () => { const result = await request("GET", "/user/join/battle"); return result.currentGame || {}; }; + +export const getPointBookConfigAPI = async () => { + return request("GET", "/user/score/sheet/option"); +}; + +export const savePointBookAPI = async ( + bowType, + distance, + targetType, + groups, + arrows, + data = [] +) => { + return request("POST", "/user/score/sheet/report", { + bowType, + distance, + targetType, + groups, + arrows, + group_data: data.map((item) => + item.map((i) => ({ + ...i, + ring: i.ring === "M" ? -1 : i.ring === "X" ? 0 : Number(i.ring), + })) + ), + }); +}; + +export const getPointBookListAPI = async ( + page = 1, + bowType, + distance, + targetType +) => { + let url = `/user/score/sheet/list?pageNum=${page}&pageSize=10`; + if (bowType) url += `&bowType=${bowType}`; + if (distance) url += `&distance=${distance}`; + if (targetType) url += `&targetType=${targetType}`; + const result = await request("GET", url); + return result.list || []; +}; + +export const getPointBookDetailAPI = async (id) => { + return request("GET", `/user/score/sheet/detail?id=${id}`); +}; diff --git a/src/components/AppBackground.vue b/src/components/AppBackground.vue index 160c042..6011659 100644 --- a/src/components/AppBackground.vue +++ b/src/components/AppBackground.vue @@ -5,11 +5,15 @@ const props = defineProps({ type: Number, default: 0, }, + bgColor: { + type: String, + default: "#050b19", + }, }); @@ -34,7 +44,6 @@ const props = defineProps({ left: 0; top: 0; z-index: -1; - background-color: #050b19; } .bg-image { diff --git a/src/components/AppFooter.vue b/src/components/AppFooter.vue index 4c7caf8..52285fc 100644 --- a/src/components/AppFooter.vue +++ b/src/components/AppFooter.vue @@ -13,7 +13,7 @@ const props = defineProps({ const tabs = [ { image: "../static/tab-vip.png" }, - { image: "../static/tab-grow.png" }, + { image: "../static/tab-point-book.png" }, { image: "../static/tab-mall.png" }, ]; @@ -26,7 +26,7 @@ function handleTabClick(index) { } if (index === 1) { uni.navigateTo({ - url: "/pages/my-growth", + url: "/pages/point-book-create", }); } if (index === 2) { @@ -45,14 +45,11 @@ function handleTabClick(index) { :key="index" class="tab-item" @click="handleTabClick(index)" + :style="{ + width: index === 1 ? '32%' : '10%', + }" > - + @@ -76,10 +73,16 @@ function handleTabClick(index) { .tab-item { z-index: 1; } +.tab-item > image { + width: 88%; +} .tab-item:nth-child(2) { - transform: translateY(10px); + transform: translateY(20%) translateX(25%); +} +.tab-item:nth-child(3) { + transform: translateY(-10%) translateX(5%); } .tab-item:nth-child(4) { - transform: translateY(10px) translateX(-10px); + transform: translateY(20%) translateX(-25%); } diff --git a/src/components/BowTarget.vue b/src/components/BowTarget.vue index 34cca2f..46b4ef1 100644 --- a/src/components/BowTarget.vue +++ b/src/components/BowTarget.vue @@ -249,6 +249,7 @@ const simulShoot2 = async () => { text-align: center; line-height: 10px; box-sizing: border-box; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); } .hit > text { transform: scaleX(0.7); diff --git a/src/components/BowTargetEdit.vue b/src/components/BowTargetEdit.vue new file mode 100644 index 0000000..57ea4ba --- /dev/null +++ b/src/components/BowTargetEdit.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/components/Container.vue b/src/components/Container.vue index 10591b5..d0aafb9 100644 --- a/src/components/Container.vue +++ b/src/components/Container.vue @@ -32,6 +32,14 @@ defineProps({ type: Boolean, default: false, }, + bgColor: { + type: String, + default: "#050b19", + }, + whiteBackArrow: { + type: Boolean, + default: true, + }, }); const isIos = ref(true); const showHint = ref(false); @@ -67,8 +75,13 @@ const goBack = () => {