update:优化个人训练图片
@@ -286,6 +286,14 @@
|
||||
{
|
||||
"type" : "file",
|
||||
"value" : "static/tab-mall.png"
|
||||
},
|
||||
{
|
||||
"type" : "folder",
|
||||
"value" : "static/training-home"
|
||||
},
|
||||
{
|
||||
"type" : "folder",
|
||||
"value" : "static/training-difficulty-design"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -4,43 +4,43 @@ export const trainingHomeWeekSchedule = [
|
||||
key: "mon",
|
||||
label: "周一",
|
||||
status: "done",
|
||||
icon: "/pages/training/static/training-home/done.png",
|
||||
icon: "https://static.shelingxingqiu.com/shootmini/static/training-home/done.png",
|
||||
},
|
||||
{
|
||||
key: "tue",
|
||||
label: "周二",
|
||||
status: "done",
|
||||
icon: "/pages/training/static/training-home/done.png",
|
||||
icon: "https://static.shelingxingqiu.com/shootmini/static/training-home/done.png",
|
||||
},
|
||||
{
|
||||
key: "wed",
|
||||
label: "周三",
|
||||
status: "missed",
|
||||
icon: "/pages/training/static/training-home/missed.png",
|
||||
icon: "https://static.shelingxingqiu.com/shootmini/static/training-home/missed.png",
|
||||
},
|
||||
{
|
||||
key: "thu",
|
||||
label: "周四",
|
||||
status: "missed",
|
||||
icon: "/pages/training/static/training-home/missed.png",
|
||||
icon: "https://static.shelingxingqiu.com/shootmini/static/training-home/missed.png",
|
||||
},
|
||||
{
|
||||
key: "fri",
|
||||
label: "周五",
|
||||
status: "done",
|
||||
icon: "/pages/training/static/training-home/done.png",
|
||||
icon: "https://static.shelingxingqiu.com/shootmini/static/training-home/done.png",
|
||||
},
|
||||
{
|
||||
key: "sat",
|
||||
label: "周六",
|
||||
status: "done",
|
||||
icon: "/pages/training/static/training-home/done.png",
|
||||
icon: "https://static.shelingxingqiu.com/shootmini/static/training-home/done.png",
|
||||
},
|
||||
{
|
||||
key: "sun",
|
||||
label: "周日",
|
||||
status: "missed",
|
||||
icon: "/pages/training/static/training-home/missed.png",
|
||||
icon: "https://static.shelingxingqiu.com/shootmini/static/training-home/missed.png",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -73,7 +73,7 @@ export const trainingHomeModes = [
|
||||
key: "endurance",
|
||||
title: "耐力训练",
|
||||
progressText: "当前进度 LV5 >",
|
||||
icon: "/pages/training/static/training-home/img_3.png",
|
||||
icon: "https://static.shelingxingqiu.com/shootmini/static/training-home/img_3.png",
|
||||
recommended: true,
|
||||
disabled: false,
|
||||
},
|
||||
@@ -81,7 +81,7 @@ export const trainingHomeModes = [
|
||||
key: "precision",
|
||||
title: "精准训练",
|
||||
progressText: "当前进度 LV3 >",
|
||||
icon: "/pages/training/static/training-home/img_4.png",
|
||||
icon: "https://static.shelingxingqiu.com/shootmini/static/training-home/img_4.png",
|
||||
recommended: false,
|
||||
disabled: false,
|
||||
},
|
||||
@@ -89,7 +89,7 @@ export const trainingHomeModes = [
|
||||
key: "rhythm",
|
||||
title: "节奏训练",
|
||||
progressText: "当前进度 LV6 >",
|
||||
icon: "/pages/training/static/training-home/img_5.png",
|
||||
icon: "https://static.shelingxingqiu.com/shootmini/static/training-home/img_5.png",
|
||||
recommended: false,
|
||||
disabled: false,
|
||||
},
|
||||
@@ -97,7 +97,7 @@ export const trainingHomeModes = [
|
||||
key: "power",
|
||||
title: "力量训练",
|
||||
progressText: "Coming! LV10",
|
||||
icon: "/pages/training/static/training-home/img_6.png",
|
||||
icon: "https://static.shelingxingqiu.com/shootmini/static/training-home/img_6.png",
|
||||
recommended: false,
|
||||
disabled: true,
|
||||
},
|
||||
|
||||
@@ -36,7 +36,7 @@ const props = defineProps({
|
||||
<Avatar :src="user.avatar" :rankLvl="user.rankLvl" :size="45" />
|
||||
<view>
|
||||
<text>{{ user.nickName }}</text>
|
||||
<text>{{ user.lvlName }}</text>
|
||||
<!-- <text>{{ user.lvlName }}</text> -->
|
||||
</view>
|
||||
</view>
|
||||
<view @click="onClose">
|
||||
|
||||
@@ -85,8 +85,8 @@ onBeforeUnmount(() => {
|
||||
class="score-item-bg"
|
||||
:src="
|
||||
isLowScore(arrows[index])
|
||||
? '../static/training-difficulty-design/block-gray.png'
|
||||
: '../static/training-difficulty-design/block-gold.png'
|
||||
? 'https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/block-gray.png'
|
||||
: 'https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/block-gold.png'
|
||||
"
|
||||
/>
|
||||
<text
|
||||
|
||||
@@ -39,7 +39,7 @@ const displayArrows = computed(() => {
|
||||
:key="index"
|
||||
class="score-card"
|
||||
>
|
||||
<image class="score-card-bg" :src="isLowScore(arrow)?'../static/training-difficulty-design/block-gray.png':'../static/training-difficulty-design/block-gold.png'"></image>
|
||||
<image class="score-card-bg" :src="isLowScore(arrow)?'https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/block-gray.png':'https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/block-gold.png'"></image>
|
||||
<text
|
||||
class="score-value"
|
||||
:class="{ 'score-value--low': isLowScore(arrow) }"
|
||||
|
||||
@@ -319,9 +319,9 @@ const calories = computed(
|
||||
|
||||
<template>
|
||||
<view :class="['result-mask', showPanel ? 'result-mask--show' : 'result-mask--hide']">
|
||||
<image class="hero-glow" src="../static/training-difficulty-design/result-bg.png" mode="widthFix" />
|
||||
<image class="hero-glow" src="https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/result-bg.png" mode="widthFix" />
|
||||
<view class="result-title">
|
||||
<image class="result-title-bg" src="../static/training-difficulty-design/result-t-bg.png" mode="widthFix" />
|
||||
<image class="result-title-bg" src="https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/result-t-bg.png" mode="widthFix" />
|
||||
<view class="result-title-text">Lv{{ resultDifficultyLevel }}</view>
|
||||
</view>
|
||||
|
||||
@@ -330,7 +330,7 @@ const calories = computed(
|
||||
<view class="line-bottom"></view>
|
||||
<view class="stats">
|
||||
<view v-for="row in resultRows" :key="row.label" class="stat-row">
|
||||
<image class="stat-bg" src="../static/training-difficulty-design/result-c-bg.png" mode="scaleToFill" />
|
||||
<image class="stat-bg" src="https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/result-c-bg.png" mode="scaleToFill" />
|
||||
<view class="stat-cell">
|
||||
<text class="stat-label">{{ row.label }}</text>
|
||||
<view class="stat-value">
|
||||
@@ -345,13 +345,13 @@ const calories = computed(
|
||||
<text>{{ row.delta > 0 ? "+" : "-" }}{{ row.deltaText }}</text>
|
||||
<text v-if="row.deltaUnit" class="stat-unit">{{ row.deltaUnit }}</text>
|
||||
<image class="trend-icon" :class="{ 'trend-icon--down': row.delta < 0 }"
|
||||
src="../static/training-difficulty-design/result-up.png" mode="widthFix" />
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/result-up.png" mode="widthFix" />
|
||||
</view>
|
||||
<view v-else class="stat-value">--</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="stat-row">
|
||||
<image class="stat-bg" src="../static/training-difficulty-design/result-c-bg.png" mode="scaleToFill" />
|
||||
<image class="stat-bg" src="https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/result-c-bg.png" mode="scaleToFill" />
|
||||
<view class="stat-cell">
|
||||
<text class="stat-label">消耗卡路里</text>
|
||||
<view class="stat-value">
|
||||
@@ -363,7 +363,7 @@ const calories = computed(
|
||||
<view class="stat-cell stat-cell--compare">
|
||||
<view class="stat-value">
|
||||
<image v-for="index in 3" :key="index" class="rice-icon"
|
||||
src="../static/training-difficulty-design/result-rice.png" mode="widthFix" />
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/result-rice.png" mode="widthFix" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -371,15 +371,15 @@ const calories = computed(
|
||||
|
||||
<view class="actions">
|
||||
<view class="action-item" @click="() => (showBowData = true)">
|
||||
<image class="action-icon" src="../static/training-difficulty-design/result-icon-1.png" mode="widthFix" />
|
||||
<image class="action-icon" src="https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/result-icon-1.png" mode="widthFix" />
|
||||
<text>查看靶纸</text>
|
||||
</view>
|
||||
<view class="action-item" @click="() => (showComment = true)">
|
||||
<image class="action-icon" src="../static/training-difficulty-design/result-icon-2.png" mode="widthFix" />
|
||||
<image class="action-icon" src="https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/result-icon-2.png" mode="widthFix" />
|
||||
<text>教练点评</text>
|
||||
</view>
|
||||
<view class="action-item" @click="onClickShare">
|
||||
<image class="action-icon" src="../static/training-difficulty-design/result-icon-3.png" mode="widthFix" />
|
||||
<image class="action-icon" src="https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/result-icon-3.png" mode="widthFix" />
|
||||
<text>分享成绩</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -54,10 +54,14 @@ const props = defineProps({
|
||||
});
|
||||
|
||||
const trainingTitleIconMap = Object.freeze({
|
||||
base: "../static/training-difficulty-design/text-icon-jcxl.png",
|
||||
precision: "../static/training-difficulty-design/text-icon-jingzxl.png",
|
||||
rhythm: "../static/training-difficulty-design/text-icon-jzxl.png",
|
||||
endurance: "../static/training-difficulty-design/text-icon-nlxl.png",
|
||||
base:
|
||||
"https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/text-icon-jcxl.png",
|
||||
precision:
|
||||
"https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/text-icon-jingzxl.png",
|
||||
rhythm:
|
||||
"https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/text-icon-jzxl.png",
|
||||
endurance:
|
||||
"https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/text-icon-nlxl.png",
|
||||
});
|
||||
const trainingTitleIcon = computed(
|
||||
() =>
|
||||
|
||||
@@ -82,7 +82,7 @@ onBeforeUnmount(() => {
|
||||
<view class="test-area">
|
||||
<image
|
||||
class="text-bg"
|
||||
src="../static/training-difficulty-design/par-bg.png"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/par-bg.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<button
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
import { computed } from "vue";
|
||||
|
||||
const lockedBadgeBackground =
|
||||
"../static/training-difficulty-design/unlock.svg";
|
||||
"https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/unlock.svg";
|
||||
const unlockedBadgeBackground =
|
||||
"../static/training-difficulty-design/lock.svg";
|
||||
"https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/lock.svg";
|
||||
|
||||
const props = defineProps({
|
||||
node: {
|
||||
|
||||
@@ -21,7 +21,7 @@ const previewLines = computed(() => {
|
||||
<view class="difficulty-preview">
|
||||
<image
|
||||
class="difficulty-preview__bg"
|
||||
src="../static/training-difficulty-design/text.png"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/text.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<view class="difficulty-preview__content">
|
||||
|
||||
@@ -21,7 +21,7 @@ const handleClick = () => {
|
||||
>
|
||||
<image
|
||||
class="difficulty-start__button"
|
||||
src="../static/training-difficulty-design/btn.png"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/btn.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</button>
|
||||
|
||||
@@ -784,7 +784,7 @@ onUnload(() => {
|
||||
v-for="connector in difficultyConnectors"
|
||||
:key="connector.id"
|
||||
class="difficulty-page__connector"
|
||||
src="./static/training-difficulty-design/jiantou.png"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/jiantou.png"
|
||||
mode="aspectFit"
|
||||
:style="connector"
|
||||
/>
|
||||
|
||||
@@ -5,8 +5,10 @@ import Container from "@/components/Container.vue";
|
||||
import TargetPicker from "@/components/TargetPicker.vue";
|
||||
import { getPersonalTrainingAPI } from "@/apis";
|
||||
|
||||
const checkedIcon = "./static/training-home/done.png";
|
||||
const missedIcon = "./static/training-home/missed.png";
|
||||
const checkedIcon =
|
||||
"https://static.shelingxingqiu.com/shootmini/static/training-home/done.png";
|
||||
const missedIcon =
|
||||
"https://static.shelingxingqiu.com/shootmini/static/training-home/missed.png";
|
||||
// 后端训练项目 id 与难度页 mode 参数的映射关系。
|
||||
const trainingModeRouteMap = {
|
||||
base: "basic",
|
||||
@@ -17,18 +19,25 @@ const trainingModeRouteMap = {
|
||||
};
|
||||
// 训练项目卡片右侧主图标。
|
||||
const trainingModeIconMap = {
|
||||
base_bow: "./static/training-home/img_22.png",
|
||||
bow: "./static/training-home/img_3.png",
|
||||
target: "./static/training-home/img_4.png",
|
||||
wave: "./static/training-home/img_5.png",
|
||||
muscle: "./static/training-home/img_6.png",
|
||||
base_bow:
|
||||
"https://static.shelingxingqiu.com/shootmini/static/training-home/img_22.png",
|
||||
bow: "https://static.shelingxingqiu.com/shootmini/static/training-home/img_3.png",
|
||||
target:
|
||||
"https://static.shelingxingqiu.com/shootmini/static/training-home/img_4.png",
|
||||
wave: "https://static.shelingxingqiu.com/shootmini/static/training-home/img_5.png",
|
||||
muscle:
|
||||
"https://static.shelingxingqiu.com/shootmini/static/training-home/img_6.png",
|
||||
};
|
||||
// 训练项目卡片标题图,按接口 id 映射本地资源。
|
||||
// 训练项目卡片标题图,按接口 id 映射 CDN 资源。
|
||||
const trainingModeTitleImageMap = {
|
||||
endurance: "./static/training-home/nailixunlian.png",
|
||||
precision: "./static/training-home/jingzhunxunlian.png",
|
||||
rhythm: "./static/training-home/jiezouxunlian.png",
|
||||
strength: "./static/training-home/liliangxulian.png",
|
||||
endurance:
|
||||
"https://static.shelingxingqiu.com/shootmini/static/training-home/nailixunlian.png",
|
||||
precision:
|
||||
"https://static.shelingxingqiu.com/shootmini/static/training-home/jingzhunxunlian.png",
|
||||
rhythm:
|
||||
"https://static.shelingxingqiu.com/shootmini/static/training-home/jiezouxunlian.png",
|
||||
strength:
|
||||
"https://static.shelingxingqiu.com/shootmini/static/training-home/liliangxulian.png",
|
||||
};
|
||||
const defaultWeekDays = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"];
|
||||
const defaultRadarDimensions = [
|
||||
@@ -360,12 +369,12 @@ onShow(async () => {
|
||||
<view class="stats-card-bg"></view>
|
||||
<image
|
||||
class="stats-quote stats-quote-left"
|
||||
src="./static/training-home/img_17.png"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/training-home/img_17.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<image
|
||||
class="stats-quote stats-quote-right"
|
||||
src="./static/training-home/img_16.png"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/training-home/img_16.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<view class="stats-grid">
|
||||
@@ -440,7 +449,7 @@ onShow(async () => {
|
||||
<view class="record-bubble" @click="openTrainingRecord">
|
||||
<image
|
||||
class="record-bubble-bg"
|
||||
src="./static/training-home/img_28.png"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/training-home/img_28.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<view class="record-bubble-copy">
|
||||
@@ -451,7 +460,7 @@ onShow(async () => {
|
||||
<text class="record-sub-text">我的训练记录</text>
|
||||
<image
|
||||
class="record-arrow"
|
||||
src="./static/training-home/img_7.png"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/training-home/img_7.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
@@ -479,7 +488,7 @@ onShow(async () => {
|
||||
<image
|
||||
class="radar-grid-image"
|
||||
:style="radarFigureStyle"
|
||||
src="./static/training-home/img_19.png"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/training-home/img_19.png"
|
||||
/>
|
||||
<canvas
|
||||
:canvas-id="trainingRadarCanvasId"
|
||||
@@ -491,7 +500,7 @@ onShow(async () => {
|
||||
/>
|
||||
<image
|
||||
class="radar-mascot"
|
||||
src="./static/training-home/img_21.png"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/training-home/img_21.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
@@ -501,7 +510,7 @@ onShow(async () => {
|
||||
<view class="featured-card" @click="openRoutineTraining">
|
||||
<image
|
||||
class="featured-card-bg"
|
||||
src="./static/training-home/img_22.png"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/training-home/img_22.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<view class="featured-card-mask"></view>
|
||||
|
||||
@@ -953,7 +953,7 @@ onBeforeUnmount(() => {
|
||||
<view class="bat-text-big-box">
|
||||
<image
|
||||
class="dao-icon"
|
||||
src="./static/training-difficulty-design/dao-icon.png"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/dao-icon.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<view v-if="trainingCopy" class="bat-text-box">
|
||||
@@ -998,7 +998,7 @@ onBeforeUnmount(() => {
|
||||
<view class="btn-box">
|
||||
<image
|
||||
class="btn-box-bg"
|
||||
src="./static/training-difficulty-design/par-star.png"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/training-difficulty-design/par-star.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<button class="btn" @click="onReady">准备好了,开始练习</button>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 838 B |
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="55px" height="55px" viewBox="0 0 55 55" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>编组 11</title>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="训练难度展示" transform="translate(-160.000000, -478.000000)">
|
||||
<g id="编组-2备份" transform="translate(154.000000, 472.000000)">
|
||||
<g id="编组-11" transform="translate(6.000000, 6.000000)">
|
||||
<circle id="椭圆形" fill="#CACACA" cx="27.5" cy="27.5" r="27.5"></circle>
|
||||
<circle id="椭圆形" fill="#FFFFFF" cx="27.5" cy="26" r="25"></circle>
|
||||
<circle id="椭圆形" fill="#5E5E5E" cx="27.5" cy="26" r="22"></circle>
|
||||
<circle id="椭圆形" fill="#17B6F2" cx="27.5" cy="26" r="19.5"></circle>
|
||||
<circle id="椭圆形" fill="#FFC2C2" cx="27.5" cy="26" r="17"></circle>
|
||||
<circle id="椭圆形" fill="#FF1F33" opacity="0.800000012" cx="27.5" cy="26" r="14.5"></circle>
|
||||
<circle id="椭圆形" fill="#FED847" cx="27.5" cy="26" r="13"></circle>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 338 KiB |
|
Before Width: | Height: | Size: 849 B |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 719 B |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="56px" height="55px" viewBox="0 0 56 55" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>编组 9</title>
|
||||
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="训练难度展示" transform="translate(-60.000000, -313.000000)">
|
||||
<g id="编组-2备份" transform="translate(54.500000, 307.000000)">
|
||||
<g id="编组-9" transform="translate(5.500000, 6.000000)">
|
||||
<circle id="椭圆形" fill="#CACACA" cx="28" cy="27.5" r="27.5"></circle>
|
||||
<circle id="椭圆形" fill="#FFFFFF" cx="28" cy="26" r="25"></circle>
|
||||
<circle id="椭圆形" fill="#5E5E5E" cx="28" cy="26" r="22"></circle>
|
||||
<circle id="椭圆形" fill="#808080" cx="28" cy="26" r="19.5"></circle>
|
||||
<circle id="椭圆形" fill="#FFFFFF" cx="28" cy="26" r="17"></circle>
|
||||
<circle id="椭圆形" fill="#8C8C8C" cx="28" cy="26" r="14.5"></circle>
|
||||
<circle id="椭圆形" fill="#DBDBDB" cx="28" cy="26" r="13"></circle>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1011 B |
|
Before Width: | Height: | Size: 184 B |
|
Before Width: | Height: | Size: 192 B |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 468 B |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 173 B |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 351 B |
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -5,6 +5,11 @@ const { Reader, Writer } = protobuf;
|
||||
// 比赛服 protobuf 协议适配层:
|
||||
// 小程序环境不支持 protobufjs 反射模式里的动态 Function codegen,
|
||||
// 所以这里使用 minimal Reader/Writer 做静态字段解码和客户端消息编码。
|
||||
// <match-schema-generated>
|
||||
// 此区块由 scripts/generate-match-schema.mjs 自动生成,请勿手动修改。
|
||||
// 来源:src/utils/match.min.js(sha256: b4f272aad40fb951)
|
||||
// 协议命名空间:rpc;消息数:12;字段数:137
|
||||
|
||||
export const ServerMessageType = {
|
||||
SERVER_MSG_UNKNOWN: 0,
|
||||
SERVER_MSG_MATCH_READY: 1,
|
||||
@@ -21,6 +26,7 @@ export const ServerMessageType = {
|
||||
SERVER_MSG_HEARTBEAT: 12,
|
||||
SERVER_MSG_PRACTICE_END: 13,
|
||||
SERVER_MSG_SYNC_PRACTICE_INFO: 14,
|
||||
SERVER_MSG_SYNC_MATCH_INFO: 15,
|
||||
};
|
||||
|
||||
export const ClientMessageType = {
|
||||
@@ -30,18 +36,9 @@ export const ClientMessageType = {
|
||||
CLIENT_MSG_ACK: 3,
|
||||
CLIENT_MSG_LEAVE: 4,
|
||||
CLIENT_MSG_SYNC_PRACTICE_INFO: 5,
|
||||
CLIENT_MSG_SYNC_MATCH_INFO: 6,
|
||||
};
|
||||
|
||||
// protobufjs 的 enum 默认是 name -> value,这里反转成 value -> name 用于日志打印。
|
||||
const ServerMessageTypeNameByValue = Object.keys(ServerMessageType).reduce(
|
||||
(result, name) => {
|
||||
result[ServerMessageType[name]] = name;
|
||||
return result;
|
||||
},
|
||||
{}
|
||||
);
|
||||
|
||||
// 当前只需要解码比赛服下发的字段并打印,字段表按后端 proto 定义维护。
|
||||
const SCHEMAS = {
|
||||
MatchShoot: {
|
||||
1: { name: "player_id", kind: "int64" },
|
||||
@@ -210,12 +207,7 @@ const SCHEMAS = {
|
||||
17: { name: "win_team", kind: "int32" },
|
||||
18: { name: "mvp", kind: "message", type: "PlayerFull" },
|
||||
19: { name: "room_id", kind: "string" },
|
||||
20: {
|
||||
name: "result_list",
|
||||
kind: "message",
|
||||
type: "PlayerMatchResult",
|
||||
repeated: true,
|
||||
},
|
||||
20: { name: "result_list", kind: "message", type: "PlayerMatchResult", repeated: true },
|
||||
21: { name: "timeout_time", kind: "int64" },
|
||||
22: { name: "target_type", kind: "int32" },
|
||||
23: { name: "event_type", kind: "int32" },
|
||||
@@ -233,6 +225,16 @@ const SCHEMAS = {
|
||||
7: { name: "sequence", kind: "int64" },
|
||||
},
|
||||
};
|
||||
// </match-schema-generated>
|
||||
|
||||
// protobufjs 的 enum 默认是 name -> value,这里反转成 value -> name 用于日志打印。
|
||||
const ServerMessageTypeNameByValue = Object.keys(ServerMessageType).reduce(
|
||||
(result, name) => {
|
||||
result[ServerMessageType[name]] = name;
|
||||
return result;
|
||||
},
|
||||
{}
|
||||
);
|
||||
|
||||
// 小程序 websocket 收到的 data 可能是 ArrayBuffer、TypedArray 或字符串,这里统一成 Uint8Array。
|
||||
function toUint8Array(data) {
|
||||
|
||||