Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd7c4b4bbf | ||
|
|
efb186d242 | ||
|
|
4ce2e6a7c4 | ||
|
|
52c5b9504a |
@@ -521,10 +521,6 @@ export const getPhoneNumberAPI = (data) => {
|
||||
return request("POST", "/index/getPhone", data);
|
||||
};
|
||||
|
||||
export const getPhoneNumberAPIv2 = (data) => {
|
||||
return request("POST", "/index/getPhone/v2", data);
|
||||
};
|
||||
|
||||
export const getPointBookRankListAPI = (page = 1) => {
|
||||
return request(
|
||||
"GET",
|
||||
|
||||
@@ -85,25 +85,25 @@ const handleUpdateClick = async () => {
|
||||
<!-- 悬浮图标(溢出卡片顶部) -->
|
||||
<image
|
||||
v-if="isNewVersion"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/ota/ota-mascot.png"
|
||||
src="../static/ota/ota-mascot.png"
|
||||
mode="aspectFit"
|
||||
class="float-icon float-mascot"
|
||||
/>
|
||||
<image
|
||||
v-else-if="isSuccess"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/ota/check-char.png"
|
||||
src="../static/ota/check-char.png"
|
||||
mode="aspectFit"
|
||||
class="float-icon float-check"
|
||||
/>
|
||||
<image
|
||||
v-else-if="isFailure"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/ota/close-char.png"
|
||||
src="../static/ota/close-char.png"
|
||||
mode="aspectFit"
|
||||
class="float-icon float-close"
|
||||
/>
|
||||
<image
|
||||
v-else-if="isProgress"
|
||||
src="https://static.shelingxingqiu.com/shootmini/static/ota/target-char.png"
|
||||
src="../static/ota/target-char.png"
|
||||
mode="aspectFit"
|
||||
class="float-icon float-target"
|
||||
/>
|
||||
@@ -111,7 +111,7 @@ const handleUpdateClick = async () => {
|
||||
<!-- 弹窗卡片:overflow:visible 允许按钮溢出底部,背景图通过 ota-bg-clip 独立裁剪保持圆角 -->
|
||||
<view class="ota-dialog">
|
||||
<view class="ota-bg-clip">
|
||||
<image src="https://static.shelingxingqiu.com/shootmini/static/ota/ota-bg.png" mode="aspectFill" class="ota-bg" />
|
||||
<image src="../static/ota/ota-bg.png" mode="aspectFill" class="ota-bg" />
|
||||
</view>
|
||||
<view
|
||||
class="ota-content"
|
||||
@@ -120,9 +120,9 @@ const handleUpdateClick = async () => {
|
||||
|
||||
<!-- 发现新版本:new-ver.png 已包含标题图,不再重复文字;版本号使用 ota-ver.png 胶囊背景 -->
|
||||
<block v-if="isNewVersion">
|
||||
<image src="https://static.shelingxingqiu.com/shootmini/static/ota/new-ver.png" mode="aspectFit" class="new-ver-img" />
|
||||
<image src="../static/ota/new-ver.png" mode="aspectFit" class="new-ver-img" />
|
||||
<view v-if="version" class="version-tag-wrap">
|
||||
<image src="https://static.shelingxingqiu.com/shootmini/static/ota/ota-ver.png" mode="aspectFit" class="version-tag-bg-img" />
|
||||
<image src="../static/ota/ota-ver.png" mode="aspectFit" class="version-tag-bg-img" />
|
||||
<text class="version-tag">{{ version }}</text>
|
||||
</view>
|
||||
<!-- 副标题:如“新版本将优化智能弓体验”,离下方详情 12rpx -->
|
||||
@@ -139,7 +139,7 @@ const handleUpdateClick = async () => {
|
||||
|
||||
<!-- 更新成功:图片左边距 34rpx,文案左边距 44rpx,按钮浮动底部居中 -->
|
||||
<block v-else-if="isSuccess">
|
||||
<image src="https://static.shelingxingqiu.com/shootmini/static/ota/update-ok.png" mode="aspectFit" class="result-title-img" style="width: 220rpx; height: 62rpx;" />
|
||||
<image src="../static/ota/update-ok.png" mode="aspectFit" class="result-title-img" style="width: 220rpx; height: 62rpx;" />
|
||||
<text class="dialog-desc">请关机并重启智能弓</text>
|
||||
<view class="btn-group-result">
|
||||
<view class="primary-btn" @click="emit('done')">
|
||||
@@ -150,7 +150,7 @@ const handleUpdateClick = async () => {
|
||||
|
||||
<!-- 更新中:复用成功标题图,正文区域展示进度条,无底部按钮 -->
|
||||
<block v-else-if="isProgress">
|
||||
<image src="https://static.shelingxingqiu.com/shootmini/static/ota/update_progress.png" mode="aspectFit" class="result-title-img" style="width: 220rpx; height: 62rpx;" />
|
||||
<image src="../static/ota/update_progress.png" mode="aspectFit" class="result-title-img" style="width: 220rpx; height: 62rpx;" />
|
||||
<view class="progress-wrap">
|
||||
<view class="progress-track">
|
||||
<view class="progress-fill" :style="{ width: `${progressValue}%` }"></view>
|
||||
@@ -160,7 +160,7 @@ const handleUpdateClick = async () => {
|
||||
|
||||
<!-- 更新失败:图片左边距 34rpx,文案左对齐 44rpx,按钮浮动底部居中 -->
|
||||
<block v-else-if="isFailure">
|
||||
<image src="https://static.shelingxingqiu.com/shootmini/static/ota/update-fail.png" mode="aspectFit" class="result-title-img" style="width: 222rpx; height: 62rpx;" />
|
||||
<image src="../static/ota/update-fail.png" mode="aspectFit" class="result-title-img" style="width: 222rpx; height: 62rpx;" />
|
||||
<text class="dialog-desc">请确保:</text>
|
||||
<text class="dialog-desc">1、智能弓已开启</text>
|
||||
<text class="dialog-desc">2、网路连接稳定</text>
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
loginAPI,
|
||||
getHomeData,
|
||||
getPhoneNumberAPI,
|
||||
getPhoneNumberAPIv2,
|
||||
getDeviceBatteryAPI,
|
||||
} from "@/apis";
|
||||
|
||||
@@ -44,12 +43,12 @@ const handleAgree = () => {
|
||||
|
||||
async function getphonenumber(e) {
|
||||
if (e.detail.code) {
|
||||
// const wxResult = await wxLogin();
|
||||
const result = await getPhoneNumberAPIv2({
|
||||
// ...e.detail,
|
||||
code: e.detail.code,
|
||||
const wxResult = await wxLogin();
|
||||
const result = await getPhoneNumberAPI({
|
||||
...e.detail,
|
||||
code: wxResult.code,
|
||||
});
|
||||
if (result.purePhoneNumber) phone.value = result.purePhoneNumber;
|
||||
if (result.phone) phone.value = result.phone;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ const loadingConfig = ref(false);
|
||||
const paying = ref(false);
|
||||
const refreshing = ref(false);
|
||||
|
||||
// 会员页核心展示数据:视觉、权益按蓝湖当前两张设计稿拆分,套餐完全使用接口数据。
|
||||
// 会员页核心展示数据:视觉、权益、套餐均按蓝湖当前两张设计稿拆分。
|
||||
const memberTypes = [
|
||||
{
|
||||
key: "normal",
|
||||
@@ -41,6 +41,11 @@ const memberTypes = [
|
||||
{ label: "排位赛\n每日+20次", icon: "../../static/vip/vip-rank.png" },
|
||||
{ label: "约战\n每日+20次", icon: "../../static/vip/vip-battle.png" },
|
||||
],
|
||||
packages: [
|
||||
{ name: "连续包月", price: "20", original: "35" },
|
||||
{ name: "12个月", price: "300", original: "420" },
|
||||
{ name: "3个月", price: "84", original: "105" },
|
||||
],
|
||||
},
|
||||
{
|
||||
key: "super",
|
||||
@@ -65,6 +70,11 @@ const memberTypes = [
|
||||
{ label: "排位赛无限制", icon: "../../static/vip/svip-rank.png" },
|
||||
{ label: "专享SVIP客服", icon: "../../static/vip/svip-service.png" },
|
||||
],
|
||||
packages: [
|
||||
{ name: "连续包月", price: "20", original: "35" },
|
||||
{ name: "12个月", price: "300", original: "420" },
|
||||
{ name: "3个月", price: "84", original: "105" },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -130,17 +140,9 @@ const getMenuName = (item) => {
|
||||
return item.name || item.vipName || item.title || "";
|
||||
};
|
||||
|
||||
const formatPrice = (value) => {
|
||||
if (value === undefined || value === null || value === "") return "";
|
||||
return String(value).replace("¥", "").replace("¥", "");
|
||||
};
|
||||
|
||||
const getMenuPrice = (item) => {
|
||||
return formatPrice(item && item.price);
|
||||
};
|
||||
|
||||
const getMenuOriginalPrice = (item) => {
|
||||
return formatPrice(item && item.originalPrice);
|
||||
const value = item.price || item.total || item.amount || item.money;
|
||||
return value ? String(value).replace("¥", "").replace("¥", "") : "";
|
||||
};
|
||||
|
||||
const getMenuSortValue = (item) => {
|
||||
@@ -175,19 +177,48 @@ const getMenuType = (item) => {
|
||||
return "";
|
||||
};
|
||||
|
||||
const getPackages = (type) => {
|
||||
return sortMenusBySort(configMenus.value)
|
||||
.filter((item) => getMenuType(item) === type.key)
|
||||
.map((item) => {
|
||||
return {
|
||||
source: item,
|
||||
id: item.id,
|
||||
name: getMenuName(item),
|
||||
price: getMenuPrice(item),
|
||||
originalPrice: getMenuOriginalPrice(item),
|
||||
icon: item.icon,
|
||||
};
|
||||
const getPackageMonths = (name) => {
|
||||
if (/连续包月/.test(name)) return 1;
|
||||
const match = String(name || "").match(/(\d+)\s*个?月/);
|
||||
return match ? Number(match[1]) : 0;
|
||||
};
|
||||
|
||||
const matchPackageSource = (type, pack, index) => {
|
||||
const menus = sortMenusBySort(configMenus.value);
|
||||
const typedMenus = menus.filter((item) => {
|
||||
const menuType = getMenuType(item);
|
||||
if (type.key === "super") return menuType === "super";
|
||||
return menuType === "normal";
|
||||
});
|
||||
const pool = typedMenus.length ? typedMenus : menus;
|
||||
const packMonths = getPackageMonths(pack.name);
|
||||
return (
|
||||
pool.find((item) => getMenuName(item).indexOf(pack.name) !== -1) ||
|
||||
pool.find((item) => packMonths && getPackageMonths(getMenuName(item)) === packMonths) ||
|
||||
pool.find((item) => getMenuPrice(item) === pack.price) ||
|
||||
pool[index]
|
||||
);
|
||||
};
|
||||
|
||||
const getPackages = (type) => {
|
||||
return type.packages
|
||||
.map((item, index) => {
|
||||
const source = matchPackageSource(type, item, index);
|
||||
return {
|
||||
...item,
|
||||
source,
|
||||
name: source ? getMenuName(source) || item.name : item.name,
|
||||
price: source ? getMenuPrice(source) || item.price : item.price,
|
||||
icon: source && source.icon,
|
||||
id: source && source.id,
|
||||
};
|
||||
})
|
||||
.map((item, index) => ({ item, index }))
|
||||
.sort((a, b) => {
|
||||
const sortDiff = getMenuSortValue(a.item.source) - getMenuSortValue(b.item.source);
|
||||
return sortDiff || a.index - b.index;
|
||||
})
|
||||
.map(({ item }) => item);
|
||||
};
|
||||
|
||||
const currentPackages = computed(() => {
|
||||
@@ -456,7 +487,7 @@ onShow(loadVipConfig);
|
||||
<view class="package-list">
|
||||
<view
|
||||
v-for="(pack, index) in getPackages(type)"
|
||||
:key="`${type.key}-${pack.id || pack.name || index}`"
|
||||
:key="`${type.key}-${pack.id || pack.name}`"
|
||||
class="package-card"
|
||||
:class="{ 'package-card--active': selectedPackageIndex === index }"
|
||||
@click="selectPackage(index)"
|
||||
@@ -467,8 +498,8 @@ onShow(loadVipConfig);
|
||||
<text class="package-price__symbol">¥</text>
|
||||
<text class="package-price__value">{{ pack.price }}</text>
|
||||
</view>
|
||||
<view v-if="pack.originalPrice" class="package-origin">
|
||||
<text>¥{{ pack.originalPrice }}</text>
|
||||
<view class="package-origin">
|
||||
<text>¥{{ pack.original }}</text>
|
||||
<view class="package-origin__line" />
|
||||
</view>
|
||||
</view>
|
||||
@@ -480,14 +511,13 @@ onShow(loadVipConfig);
|
||||
hover-class="none"
|
||||
class="activate-btn"
|
||||
:class="type.buttonClass"
|
||||
:disabled="loadingConfig || paying || refreshing || !selectedPackage"
|
||||
:disabled="loadingConfig || paying || refreshing"
|
||||
@click="onPay"
|
||||
>
|
||||
<text v-if="loadingConfig">加载套餐中</text>
|
||||
<text v-else-if="paying">创建订单中</text>
|
||||
<text v-else-if="refreshing">刷新会员状态中</text>
|
||||
<text v-else-if="selectedPackage">¥ {{ selectedPackage.price }} 一键激活</text>
|
||||
<text v-else>套餐暂不可购买</text>
|
||||
<text v-else-if="!refreshing">¥ {{ selectedPackage.price }} 一键激活</text>
|
||||
<text v-else>刷新会员状态中</text>
|
||||
</button>
|
||||
|
||||
<view class="agreement">
|
||||
@@ -754,8 +784,8 @@ onShow(loadVipConfig);
|
||||
}
|
||||
|
||||
.package-list {
|
||||
display: inline-flex;
|
||||
min-width: 100%;
|
||||
display: flex;
|
||||
width: 984rpx;
|
||||
padding: 6rpx 84rpx 6rpx 6rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@@ -763,7 +793,6 @@ onShow(loadVipConfig);
|
||||
.package-card {
|
||||
position: relative;
|
||||
width: 264rpx;
|
||||
flex: 0 0 264rpx;
|
||||
height: 224rpx;
|
||||
border-radius: 16rpx;
|
||||
border: 2rpx solid #999999;
|
||||
|
||||
@@ -632,7 +632,7 @@ onUnmounted(() => {
|
||||
>
|
||||
<!-- Hero: wifi1.png 单图(已内含吉祥物) -->
|
||||
<view class="hero-area">
|
||||
<image src="https://static.shelingxingqiu.com/shootmini/static/ota/wifi1.png" mode="aspectFit" style="width: 194rpx; height: 164rpx;" />
|
||||
<image src="../static/ota/wifi1.png" mode="aspectFit" style="width: 194rpx; height: 164rpx;" />
|
||||
</view>
|
||||
|
||||
<text class="page-title" :class="{ 'connected-page-title': currentState === 'CONNECTED' }">
|
||||
@@ -721,7 +721,7 @@ onUnmounted(() => {
|
||||
|
||||
<!-- UPDATING -->
|
||||
<view v-else-if="currentState === 'UPDATING'" class="center-page">
|
||||
<image src="https://static.shelingxingqiu.com/shootmini/static/ota/target-char.png" mode="aspectFit" style="width: 194rpx; height: 164rpx;" />
|
||||
<image src="../static/ota/target-char.png" mode="aspectFit" style="width: 194rpx; height: 164rpx;" />
|
||||
<text class="page-title" style="margin-top: 24rpx;">更新中,请稍等片刻...</text>
|
||||
<view class="progress-wrap">
|
||||
<view class="progress-track">
|
||||
@@ -733,7 +733,7 @@ onUnmounted(() => {
|
||||
|
||||
<!-- DONE -->
|
||||
<view v-else-if="currentState === 'DONE'" class="center-page">
|
||||
<image src="https://static.shelingxingqiu.com/shootmini/static/ota/check-char.png" mode="aspectFit" style="width: 194rpx; height: 166rpx;" />
|
||||
<image src="../static/ota/check-char.png" mode="aspectFit" style="width: 194rpx; height: 166rpx;" />
|
||||
<text class="page-title" style="margin-top: 24rpx;">更新完成</text>
|
||||
<text class="page-desc-white">请关机并重启智能弓</text>
|
||||
<view class="primary-btn done-btn" style="margin-top:20px" @click="handleDone">
|
||||
@@ -743,7 +743,7 @@ onUnmounted(() => {
|
||||
|
||||
<!-- FAILED -->
|
||||
<view v-else-if="currentState === 'FAILED'" class="center-page">
|
||||
<image src="https://static.shelingxingqiu.com/shootmini/static/ota/close-char.png" mode="aspectFit" style="width: 194rpx; height: 164rpx;" />
|
||||
<image src="../static/ota/close-char.png" mode="aspectFit" style="width: 194rpx; height: 164rpx;" />
|
||||
<text class="page-title fail-title" style="margin-top: 24rpx;">更新失败</text>
|
||||
<text class="page-desc-white">请确保:</text>
|
||||
<text class="page-desc-white">1、智能弓已开启</text>
|
||||
@@ -756,7 +756,7 @@ onUnmounted(() => {
|
||||
<!-- CONNECTING 底部弹窗 -->
|
||||
<view v-if="currentState === 'CONNECTING'" class="sheet-mask">
|
||||
<view class="sheet" :style="{ marginBottom: keyboardHeight + 'px' }" @click.stop="">
|
||||
<image src="https://static.shelingxingqiu.com/shootmini/static/ota/ota-bg.png" mode="aspectFill" class="sheet-bg" />
|
||||
<image src="../static/ota/ota-bg.png" mode="aspectFill" class="sheet-bg" />
|
||||
<view class="sheet-inner">
|
||||
|
||||
<!-- 有密码网络 -->
|
||||
|
||||
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 237 B |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 3.0 KiB |