update:代码备份
@@ -333,6 +333,9 @@ export const createOrderAPI = (vipId) => {
|
|||||||
quanity: 1,
|
quanity: 1,
|
||||||
tradeType: "mini",
|
tradeType: "mini",
|
||||||
payType: "wxpay",
|
payType: "wxpay",
|
||||||
|
returnUrl: "",
|
||||||
|
remark: "",
|
||||||
|
mockTest: false,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,12 @@ const props = defineProps({
|
|||||||
src="https://static.shelingxingqiu.com/shootmini/static/rank/rank-bg.png"
|
src="https://static.shelingxingqiu.com/shootmini/static/rank/rank-bg.png"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
/>
|
/>
|
||||||
|
<image
|
||||||
|
class="bg-image"
|
||||||
|
v-if="type === 10"
|
||||||
|
src="@/static/vip/vip-bg.png"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
<view class="bg-overlay" v-if="type === 0"></view>
|
<view class="bg-overlay" v-if="type === 0"></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const tabs = [
|
|||||||
function handleTabClick(index) {
|
function handleTabClick(index) {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/be-vip",
|
url: "/pages/member/be-vip",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ onBeforeUnmount(() => {
|
|||||||
width: 156rpx;
|
width: 156rpx;
|
||||||
height: 28rpx;
|
height: 28rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 20rpx;
|
font-size: 24rpx;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 28rpx;
|
line-height: 28rpx;
|
||||||
|
|||||||
234
src/components/ModalDialog.vue
Normal file
@@ -0,0 +1,234 @@
|
|||||||
|
<script setup>
|
||||||
|
const props = defineProps({
|
||||||
|
show: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
content: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
cancelText: {
|
||||||
|
type: String,
|
||||||
|
default: "取消",
|
||||||
|
},
|
||||||
|
confirmText: {
|
||||||
|
type: String,
|
||||||
|
default: "确定",
|
||||||
|
},
|
||||||
|
showCancel: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
showConfirm: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
onCancel: {
|
||||||
|
type: Function,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
onConfirm: {
|
||||||
|
type: Function,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const handleCancel = () => {
|
||||||
|
props.onCancel?.();
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleConfirm = () => {
|
||||||
|
props.onConfirm?.();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view class="modal-mask" :style="{ display: show ? 'flex' : 'none' }">
|
||||||
|
<view class="modal-wrap scale-in">
|
||||||
|
<image
|
||||||
|
class="dialog-light"
|
||||||
|
src="../static/common/dialog-light.png"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
class="dialog-icon"
|
||||||
|
src="../static/common/dialog-icon.png"
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<view class="dialog-panel">
|
||||||
|
<image
|
||||||
|
class="dialog-bg"
|
||||||
|
src="../static/common/dialog-bg.png"
|
||||||
|
mode="scaleToFill"
|
||||||
|
/>
|
||||||
|
<view class="dialog-content">
|
||||||
|
<slot>
|
||||||
|
<text v-if="title" class="dialog-title">{{ title }}</text>
|
||||||
|
<text v-if="content" class="dialog-text">{{ content }}</text>
|
||||||
|
</slot>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
v-if="showCancel || showConfirm"
|
||||||
|
class="dialog-actions"
|
||||||
|
:class="{ single: !(showCancel && showConfirm) }"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
v-if="showCancel"
|
||||||
|
class="dialog-button cancel"
|
||||||
|
@click="handleCancel"
|
||||||
|
>
|
||||||
|
<text>{{ cancelText }}</text>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-if="showConfirm"
|
||||||
|
class="dialog-button confirm"
|
||||||
|
@click="handleConfirm"
|
||||||
|
>
|
||||||
|
<text>{{ confirmText }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.modal-mask {
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
background-color: rgba(0, 0, 0, 0.62);
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-wrap {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
width: 549rpx;
|
||||||
|
min-height: 318rpx;;
|
||||||
|
padding-top: 168rpx;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-light {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 50%;
|
||||||
|
width: 520rpx;
|
||||||
|
z-index: 1;
|
||||||
|
transform-origin: center center;
|
||||||
|
animation: rotateLight 8s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 70rpx;
|
||||||
|
left: 50%;
|
||||||
|
width: 250rpx;
|
||||||
|
z-index: 5;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-panel {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
min-height: 318rpx;
|
||||||
|
padding: 98rpx 36rpx 40rpx 36rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
z-index: 3;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
border: 2rpx solid rgba(249, 213, 161, 0.5);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-bg {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-content {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-title {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-text {
|
||||||
|
margin-top: 10rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
line-height: 36rpx;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-actions {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
display: flex;
|
||||||
|
margin-top: 50rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
gap: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-actions.single {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-button {
|
||||||
|
display: flex;
|
||||||
|
width: 232rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
border-radius: 44rpx;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-button.cancel {
|
||||||
|
color: #fff;
|
||||||
|
background-color: rgba(255,255,255,0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-button.confirm {
|
||||||
|
color: #000000;
|
||||||
|
background-color: #ffda3f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes rotateLight {
|
||||||
|
from {
|
||||||
|
transform: translateX(-50%) rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
transform: translateX(-50%) rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import { onShow } from "@dcloudio/uni-app";
|
import { onShow } from "@dcloudio/uni-app";
|
||||||
import SModal from "@/components/SModal.vue";
|
import SModal from "@/components/SModal.vue";
|
||||||
import Avatar from "@/components/Avatar.vue";
|
import Avatar from "@/components/Avatar.vue";
|
||||||
@@ -60,6 +60,21 @@ function onNicknameChange(e) {
|
|||||||
nickName.value = e.detail.value;
|
nickName.value = e.detail.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const resetForm = () => {
|
||||||
|
loading.value = false;
|
||||||
|
agree.value = false;
|
||||||
|
phone.value = "";
|
||||||
|
avatarUrl.value = "";
|
||||||
|
nickName.value = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.show,
|
||||||
|
(show) => {
|
||||||
|
if (show) resetForm();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const handleLogin = async () => {
|
const handleLogin = async () => {
|
||||||
if (loading.value) return;
|
if (loading.value) return;
|
||||||
if (!phone.value) {
|
if (!phone.value) {
|
||||||
@@ -137,11 +152,7 @@ const openPrivacyLink = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
loading.value = false;
|
resetForm();
|
||||||
agree.value = false;
|
|
||||||
phone.value = "";
|
|
||||||
avatarUrl.value = "";
|
|
||||||
nickName.value = "";
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -187,10 +198,11 @@ onShow(() => {
|
|||||||
<text :style="{ color: noBg ? '#666' : '#fff' }">昵称:</text>
|
<text :style="{ color: noBg ? '#666' : '#fff' }">昵称:</text>
|
||||||
<input
|
<input
|
||||||
type="nickname"
|
type="nickname"
|
||||||
|
:value="nickName"
|
||||||
placeholder="请输入昵称"
|
placeholder="请输入昵称"
|
||||||
:placeholder-style="`color: ${noBg ? '#666' : '#fff9'} `"
|
:placeholder-style="`color: ${noBg ? '#666' : '#fff9'} `"
|
||||||
|
@input="onNicknameChange"
|
||||||
@change="onNicknameChange"
|
@change="onNicknameChange"
|
||||||
@blur="onNicknameBlur"
|
|
||||||
:style="{ color: noBg ? '#333' : '#fff' }"
|
:style="{ color: noBg ? '#333' : '#fff' }"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -69,15 +69,18 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/user"
|
"path": "pages/user"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/orders"
|
"path": "pages/member/orders"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/order-detail"
|
"path": "pages/member/order-detail"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/be-vip"
|
"path": "pages/member/be-vip"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/member/vip-intro"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/grade-intro"
|
"path": "pages/grade-intro"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,258 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import { ref, onMounted, onBeforeUnmount } from "vue";
|
|
||||||
import Container from "@/components/Container.vue";
|
|
||||||
import Avatar from "@/components/Avatar.vue";
|
|
||||||
import SButton from "@/components/SButton.vue";
|
|
||||||
import Signin from "@/components/Signin.vue";
|
|
||||||
import UserHeader from "@/components/UserHeader.vue";
|
|
||||||
import { createOrderAPI, getHomeData, getVIPDescAPI } from "@/apis";
|
|
||||||
import { formatTimestamp } from "@/util";
|
|
||||||
import useStore from "@/store";
|
|
||||||
import { storeToRefs } from "pinia";
|
|
||||||
const store = useStore();
|
|
||||||
const { user, config } = storeToRefs(store);
|
|
||||||
const { updateUser } = store;
|
|
||||||
|
|
||||||
const selectedVIP = ref(0);
|
|
||||||
const showModal = ref(false);
|
|
||||||
const lastDate = ref(user.value.expiredAt);
|
|
||||||
const refreshing = ref(false);
|
|
||||||
const timer = ref(null);
|
|
||||||
const richContent = ref("");
|
|
||||||
|
|
||||||
const onPay = async () => {
|
|
||||||
if (!user.value.id) {
|
|
||||||
showModal.value = true;
|
|
||||||
} else if (config.value.vipMenus[selectedVIP.value]) {
|
|
||||||
if (config.value.vipMenus[selectedVIP.value].id) {
|
|
||||||
const result = await createOrderAPI(
|
|
||||||
config.value.vipMenus[selectedVIP.value].id
|
|
||||||
);
|
|
||||||
if (!result.pay) return;
|
|
||||||
const params = result.pay.order.jsApi.params;
|
|
||||||
if (params) {
|
|
||||||
wx.requestPayment({
|
|
||||||
timeStamp: params.timeStamp, // 时间戳
|
|
||||||
nonceStr: params.nonceStr, // 随机字符串
|
|
||||||
package: params.package, // 统一下单接口返回的 prepay_id 参数值,格式:prepay_id=***
|
|
||||||
paySign: params.paySign, // 签名
|
|
||||||
signType: "RSA", // 签名类型,默认为RSA
|
|
||||||
async success(res) {
|
|
||||||
uni.showToast({
|
|
||||||
title: "支付成功",
|
|
||||||
icon: "none",
|
|
||||||
});
|
|
||||||
timer.value = setInterval(async () => {
|
|
||||||
refreshing.value = true;
|
|
||||||
const result = await getHomeData();
|
|
||||||
if (result.user.expiredAt > lastDate.value) {
|
|
||||||
refreshing.value = false;
|
|
||||||
if (result.user) updateUser(result.user);
|
|
||||||
clearInterval(timer.value);
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
},
|
|
||||||
fail(res) {
|
|
||||||
console.log("pay error", res);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
const result = await getVIPDescAPI();
|
|
||||||
richContent.value = result.describe;
|
|
||||||
});
|
|
||||||
|
|
||||||
const toOrderPage = () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pages/orders",
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
|
||||||
if (timer.value) clearInterval(timer.value);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<Container title="会员说明">
|
|
||||||
<view v-if="user.id" class="header">
|
|
||||||
<view>
|
|
||||||
<Avatar :src="user.avatar" :size="35" />
|
|
||||||
<text class="truncate">{{ user.nickName }}</text>
|
|
||||||
<image
|
|
||||||
class="user-name-image"
|
|
||||||
src="../static/vip1.png"
|
|
||||||
mode="widthFix"
|
|
||||||
/>
|
|
||||||
</view>
|
|
||||||
<block v-if="refreshing">
|
|
||||||
<image
|
|
||||||
src="../static/btn-loading.png"
|
|
||||||
mode="widthFix"
|
|
||||||
class="loading"
|
|
||||||
/>
|
|
||||||
</block>
|
|
||||||
<block v-else>
|
|
||||||
<text v-if="user.expiredAt">
|
|
||||||
{{ formatTimestamp(user.expiredAt) }} 到期
|
|
||||||
</text>
|
|
||||||
</block>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
class="container"
|
|
||||||
:style="{ height: !user.id ? 'calc(100% - 10px)' : 'calc(100% - 62px)' }"
|
|
||||||
>
|
|
||||||
<view class="content vip-content">
|
|
||||||
<view class="title-bar">
|
|
||||||
<view />
|
|
||||||
<text>VIP 介绍</text>
|
|
||||||
</view>
|
|
||||||
<view :style="{ marginTop: '10rpx' }">
|
|
||||||
<rich-text :nodes="richContent" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="content">
|
|
||||||
<view class="title-bar">
|
|
||||||
<view />
|
|
||||||
<text>会员续费</text>
|
|
||||||
</view>
|
|
||||||
<view class="vip-items">
|
|
||||||
<view
|
|
||||||
v-for="(item, index) in config.vipMenus || []"
|
|
||||||
:key="index"
|
|
||||||
:style="{
|
|
||||||
color: selectedVIP === index ? '#fff' : '#333333',
|
|
||||||
borderColor: selectedVIP === index ? '#FF7D57' : '#eee',
|
|
||||||
background:
|
|
||||||
selectedVIP === index
|
|
||||||
? '#FF7D57'
|
|
||||||
: 'linear-gradient(180deg, #fbfbfb 0%, #f5f5f5 100%)',
|
|
||||||
}"
|
|
||||||
@click="() => (selectedVIP = index)"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<SButton :onClick="onPay">支付</SButton>
|
|
||||||
<view class="my-orders" v-if="user.id">
|
|
||||||
<view @click="toOrderPage">
|
|
||||||
<text>我的订单</text>
|
|
||||||
<image src="../static/enter-arrow-blue.png" mode="widthFix" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<Signin :show="showModal" :onClose="() => (showModal = false)" />
|
|
||||||
</view>
|
|
||||||
</Container>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.header {
|
|
||||||
width: calc(100% - 30px);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
color: #fff;
|
|
||||||
padding: 15px;
|
|
||||||
padding-top: 0;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
.header > view {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.header > view > text {
|
|
||||||
margin-left: 10px;
|
|
||||||
max-width: 120px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
.header > view > image {
|
|
||||||
margin-left: 5px;
|
|
||||||
width: 20px;
|
|
||||||
}
|
|
||||||
.header > text:nth-child(2) {
|
|
||||||
color: #fed847;
|
|
||||||
}
|
|
||||||
.container {
|
|
||||||
width: 100%;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
padding-top: 10px;
|
|
||||||
}
|
|
||||||
.content {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
background-color: #fff;
|
|
||||||
padding: 15px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.title-bar {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
.title-bar > view:first-child {
|
|
||||||
width: 5px;
|
|
||||||
height: 15px;
|
|
||||||
border-radius: 10px;
|
|
||||||
background-color: #fed847;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
.content > view:nth-child(2) {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
.vip-items {
|
|
||||||
width: 100%;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(4, 23.5%);
|
|
||||||
padding: 10px;
|
|
||||||
row-gap: 5%;
|
|
||||||
column-gap: 2%;
|
|
||||||
}
|
|
||||||
.vip-items > view {
|
|
||||||
border: 1px solid #eee;
|
|
||||||
padding: 12px 0;
|
|
||||||
border-radius: 10px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 27rpx;
|
|
||||||
}
|
|
||||||
.vip-content {
|
|
||||||
max-height: 62%;
|
|
||||||
}
|
|
||||||
.vip-content > view:nth-child(2) {
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
.vip-content > view:nth-child(2)::-webkit-scrollbar {
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
color: transparent;
|
|
||||||
}
|
|
||||||
.my-orders {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
color: #39a8ff;
|
|
||||||
margin-top: 10px;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
.my-orders > view {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.my-orders > view > image {
|
|
||||||
width: 15px;
|
|
||||||
}
|
|
||||||
.loading {
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
margin-left: 10px;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
background-blend-mode: darken;
|
|
||||||
animation: rotate 2s linear infinite;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
876
src/pages/member/be-vip.vue
Normal file
@@ -0,0 +1,876 @@
|
|||||||
|
<script setup>
|
||||||
|
import { computed, ref, onBeforeUnmount } from "vue";
|
||||||
|
import { onShow } from "@dcloudio/uni-app";
|
||||||
|
import Container from "@/components/Container.vue";
|
||||||
|
import Signin from "@/components/Signin.vue";
|
||||||
|
import { createOrderAPI, getAppConfig, getHomeData } from "@/apis";
|
||||||
|
import { capsuleHeight } from "@/util";
|
||||||
|
import useStore from "@/store";
|
||||||
|
import { storeToRefs } from "pinia";
|
||||||
|
|
||||||
|
const store = useStore();
|
||||||
|
const { user, config } = storeToRefs(store);
|
||||||
|
const { updateConfig, updateUser } = store;
|
||||||
|
|
||||||
|
const currentTypeIndex = ref(0);
|
||||||
|
const selectedPackageIndex = ref(0);
|
||||||
|
const showModal = ref(false);
|
||||||
|
const loadingConfig = ref(false);
|
||||||
|
const paying = ref(false);
|
||||||
|
const refreshing = ref(false);
|
||||||
|
const timer = ref(null);
|
||||||
|
const lastDate = ref(user.value.expiredAt || 0);
|
||||||
|
const maxRefreshTimes = 12;
|
||||||
|
|
||||||
|
// 会员页核心展示数据:视觉、权益、套餐均按蓝湖当前两张设计稿拆分。
|
||||||
|
const memberTypes = [
|
||||||
|
{
|
||||||
|
key: "normal",
|
||||||
|
tab: "VIP",
|
||||||
|
title: "普通会员",
|
||||||
|
prefix: "成为射灵星球",
|
||||||
|
desc: "特享约战竞技次数包、专属会员标识",
|
||||||
|
benefitTitle: "普通会员专属权益",
|
||||||
|
themeClass: "vip-page--normal",
|
||||||
|
heroCard: "../../static/vip/vip-title.png",
|
||||||
|
activeHeroCard: "../../static/vip/vip-title2.png",
|
||||||
|
orderIcon: "../../static/vip/vip-order.png",
|
||||||
|
heroBadge: "../../static/vip/normal-hero-badge.png",
|
||||||
|
buttonClass: "activate-btn--normal",
|
||||||
|
benefits: [
|
||||||
|
{ label: "专属会员标识", icon: "../../static/vip/vip-badge.png" },
|
||||||
|
{ label: "教练点评", icon: "../../static/vip/vip-comment.png" },
|
||||||
|
{ label: "专享VIP客服", icon: "../../static/vip/vip-service.png" },
|
||||||
|
{ 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",
|
||||||
|
tab: "SVIP",
|
||||||
|
title: "超级会员",
|
||||||
|
prefix: "成为射灵星球",
|
||||||
|
desc: "尊享专属特效、无限制约战竞技、专属会员标识",
|
||||||
|
benefitTitle: "超级会员专属权益",
|
||||||
|
themeClass: "vip-page--super",
|
||||||
|
heroCard: "../../static/vip/svip-title.png",
|
||||||
|
activeHeroCard: "../../static/vip/svip-title2.png",
|
||||||
|
orderIcon: "../../static/vip/svip-order.png",
|
||||||
|
heroBadge: "../../static/vip/super-hero-badge.png",
|
||||||
|
buttonClass: "activate-btn--super",
|
||||||
|
benefits: [
|
||||||
|
{ label: "专属落点标识", icon: "../../static/vip/svip-point.png" },
|
||||||
|
{ label: "专属命中效果", icon: "../../static/vip/svip-hit.png" },
|
||||||
|
{ label: "专属射箭效果", icon: "../../static/vip/svip-arrow.png" },
|
||||||
|
{ label: "专属会员标识", icon: "../../static/vip/svip-badge.png" },
|
||||||
|
{ label: "教练点评", icon: "../../static/vip/svip-comment.png" },
|
||||||
|
{ label: "约战无限制", icon: "../../static/vip/svip-battle.png" },
|
||||||
|
{ 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" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const currentType = computed(() => memberTypes[currentTypeIndex.value]);
|
||||||
|
|
||||||
|
// 后端到期时间可能是秒级时间戳、毫秒级时间戳或日期字符串,这里统一转成毫秒。
|
||||||
|
const toTimestamp = (value) => {
|
||||||
|
if (!value) return 0;
|
||||||
|
const numberValue = Number(value);
|
||||||
|
if (!Number.isNaN(numberValue)) {
|
||||||
|
return numberValue < 1000000000000 ? numberValue * 1000 : numberValue;
|
||||||
|
}
|
||||||
|
const time = new Date(value).getTime();
|
||||||
|
return Number.isNaN(time) ? 0 : time;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 当前卡片只关心本 tab 对应的会员到期时间,普通会员和超级会员互不兜底。
|
||||||
|
const getVipExpiredValue = (type, source = user.value) => {
|
||||||
|
if (!source) return 0;
|
||||||
|
return type.key === "super" ? source.superVipExpiredAt : source.normalVipExpiredAt;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 支付后轮询需要比较最新会员到期时间,兼容旧字段 expiredAt。
|
||||||
|
const getLatestVipExpiredTime = (source = user.value) => {
|
||||||
|
if (!source) return 0;
|
||||||
|
return Math.max(
|
||||||
|
toTimestamp(source.normalVipExpiredAt),
|
||||||
|
toTimestamp(source.superVipExpiredAt),
|
||||||
|
toTimestamp(source.expiredAt)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 未过期才展示“会员生效中”样式,已过期或无值继续展示未开通样式。
|
||||||
|
const isVipActive = (type) => {
|
||||||
|
return toTimestamp(getVipExpiredValue(type)) > Date.now();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 会员卡片只展示日期,不展示具体时分秒。
|
||||||
|
const formatVipDate = (value) => {
|
||||||
|
const timestamp = toTimestamp(value);
|
||||||
|
if (!timestamp) return "";
|
||||||
|
const date = new Date(timestamp);
|
||||||
|
const year = date.getFullYear();
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, "0");
|
||||||
|
const day = String(date.getDate()).padStart(2, "0");
|
||||||
|
return `${year}-${month}-${day}`;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 会员生效时使用 title2 切图,未生效时沿用原来的开通引导图。
|
||||||
|
const getHeroCard = (type) => {
|
||||||
|
return isVipActive(type) ? type.activeHeroCard : type.heroCard;
|
||||||
|
};
|
||||||
|
|
||||||
|
const getActiveVipExpiredDate = (type) => {
|
||||||
|
return formatVipDate(getVipExpiredValue(type));
|
||||||
|
};
|
||||||
|
|
||||||
|
// 设计稿里的“下期自动续费”按到期日前一天展示。
|
||||||
|
const getActiveVipRenewDate = (type) => {
|
||||||
|
const timestamp = toTimestamp(getVipExpiredValue(type));
|
||||||
|
if (!timestamp) return "";
|
||||||
|
return formatVipDate(timestamp - 24 * 60 * 60 * 1000);
|
||||||
|
};
|
||||||
|
|
||||||
|
const configMenus = computed(() => {
|
||||||
|
return config.value.vipMenus || [];
|
||||||
|
});
|
||||||
|
|
||||||
|
const getMenuName = (item) => {
|
||||||
|
return item.name || item.vipName || item.title || "";
|
||||||
|
};
|
||||||
|
|
||||||
|
const getMenuPrice = (item) => {
|
||||||
|
const value = item.price || item.total || item.amount || item.money;
|
||||||
|
return value ? String(value).replace("¥", "").replace("¥", "") : "";
|
||||||
|
};
|
||||||
|
|
||||||
|
const getMenuType = (item) => {
|
||||||
|
const vipType = Number(item.vipType);
|
||||||
|
if (vipType === 1) return "normal";
|
||||||
|
if (vipType === 2) return "super";
|
||||||
|
|
||||||
|
const type = String(item.type || "").toLowerCase();
|
||||||
|
if (["super", "svip"].includes(type)) return "super";
|
||||||
|
if (["normal", "vip"].includes(type)) return "normal";
|
||||||
|
|
||||||
|
const name = getMenuName(item);
|
||||||
|
if (/超级|SVIP/i.test(name)) return "super";
|
||||||
|
if (/普通|VIP|会员/i.test(name)) return "normal";
|
||||||
|
return "";
|
||||||
|
};
|
||||||
|
|
||||||
|
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 = 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,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const currentPackages = computed(() => {
|
||||||
|
return getPackages(currentType.value);
|
||||||
|
});
|
||||||
|
|
||||||
|
const selectedPackage = computed(() => {
|
||||||
|
return currentPackages.value[selectedPackageIndex.value] || currentPackages.value[0];
|
||||||
|
});
|
||||||
|
|
||||||
|
const switchType = (index) => {
|
||||||
|
currentTypeIndex.value = index;
|
||||||
|
selectedPackageIndex.value = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
const onSwiperChange = (event) => {
|
||||||
|
currentTypeIndex.value = event.detail.current;
|
||||||
|
selectedPackageIndex.value = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
const selectPackage = (index) => {
|
||||||
|
selectedPackageIndex.value = index;
|
||||||
|
};
|
||||||
|
|
||||||
|
const toPackageDesc = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/member/vip-intro",
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const toOrderPage = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/member/orders",
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const loadVipConfig = async () => {
|
||||||
|
if (loadingConfig.value || configMenus.value.length) return;
|
||||||
|
loadingConfig.value = true;
|
||||||
|
try {
|
||||||
|
const result = await getAppConfig();
|
||||||
|
if (result) updateConfig(result);
|
||||||
|
} catch (error) {
|
||||||
|
console.log("load vip config error", error);
|
||||||
|
} finally {
|
||||||
|
loadingConfig.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const clearRefreshTimer = () => {
|
||||||
|
if (timer.value) {
|
||||||
|
clearInterval(timer.value);
|
||||||
|
timer.value = null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const refreshUserAfterPay = () => {
|
||||||
|
clearRefreshTimer();
|
||||||
|
let refreshTimes = 0;
|
||||||
|
// 先记录支付前的最大到期时间,轮询到更大的值就认为会员状态已刷新。
|
||||||
|
lastDate.value = getLatestVipExpiredTime();
|
||||||
|
refreshing.value = true;
|
||||||
|
timer.value = setInterval(async () => {
|
||||||
|
refreshTimes += 1;
|
||||||
|
try {
|
||||||
|
const result = await getHomeData();
|
||||||
|
const latestExpiredAt = getLatestVipExpiredTime(result.user);
|
||||||
|
if (result.user && latestExpiredAt > lastDate.value) {
|
||||||
|
lastDate.value = latestExpiredAt;
|
||||||
|
updateUser(result.user);
|
||||||
|
clearRefreshTimer();
|
||||||
|
refreshing.value = false;
|
||||||
|
} else if (refreshTimes >= maxRefreshTimes) {
|
||||||
|
clearRefreshTimer();
|
||||||
|
refreshing.value = false;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log("refresh user after pay error", error);
|
||||||
|
if (refreshTimes >= maxRefreshTimes) {
|
||||||
|
clearRefreshTimer();
|
||||||
|
refreshing.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
};
|
||||||
|
|
||||||
|
const onPay = async () => {
|
||||||
|
if (paying.value || refreshing.value) return;
|
||||||
|
if (!user.value.id) {
|
||||||
|
showModal.value = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!configMenus.value.length) {
|
||||||
|
await loadVipConfig();
|
||||||
|
}
|
||||||
|
const vipId = selectedPackage.value && selectedPackage.value.id;
|
||||||
|
if (!vipId) {
|
||||||
|
uni.showToast({
|
||||||
|
title: loadingConfig.value ? "套餐配置加载中" : "套餐暂不可购买",
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
paying.value = true;
|
||||||
|
let waitingPayment = false;
|
||||||
|
try {
|
||||||
|
const result = await createOrderAPI(vipId);
|
||||||
|
const params = result?.pay?.order?.jsApi?.params;
|
||||||
|
if (!params?.timeStamp || !params?.nonceStr || !params?.package || !params?.paySign) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "支付参数生成失败",
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
refreshing.value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
waitingPayment = true;
|
||||||
|
wx.requestPayment({
|
||||||
|
timeStamp: params.timeStamp, // 微信支付时间戳
|
||||||
|
nonceStr: params.nonceStr, // 微信支付随机串
|
||||||
|
package: params.package, // 预支付交易会话标识
|
||||||
|
paySign: params.paySign, // 微信支付签名
|
||||||
|
signType: params.signType || "RSA",
|
||||||
|
success() {
|
||||||
|
uni.showToast({
|
||||||
|
title: "支付成功",
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
refreshUserAfterPay();
|
||||||
|
},
|
||||||
|
fail(res) {
|
||||||
|
console.log("pay error", res);
|
||||||
|
if (res.errMsg && res.errMsg.indexOf("cancel") !== -1) return;
|
||||||
|
uni.showToast({
|
||||||
|
title: "支付失败,请稍后重试",
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
complete() {
|
||||||
|
paying.value = false;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.log("create vip order error", error);
|
||||||
|
} finally {
|
||||||
|
if (!waitingPayment) paying.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
onShow(loadVipConfig);
|
||||||
|
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
clearRefreshTimer();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Container title="" :bgType="10" :scroll="false" :showBottom="false">
|
||||||
|
<view class="vip-page" :class="currentType.themeClass">
|
||||||
|
<view class="type-tabs" :style="{ top: capsuleHeight + 'px' }">
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in memberTypes"
|
||||||
|
:key="item.key"
|
||||||
|
class="type-tab"
|
||||||
|
:class="{ 'type-tab--active': currentTypeIndex === index }"
|
||||||
|
@click="switchType(index)"
|
||||||
|
>
|
||||||
|
<text>{{ item.tab }}</text>
|
||||||
|
<view class="type-tab__indicator" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<swiper
|
||||||
|
class="type-swiper"
|
||||||
|
:current="currentTypeIndex"
|
||||||
|
:duration="260"
|
||||||
|
@change="onSwiperChange"
|
||||||
|
>
|
||||||
|
<swiper-item v-for="type in memberTypes" :key="type.key">
|
||||||
|
<scroll-view scroll-y class="type-scroll" :show-scrollbar="false">
|
||||||
|
<view class="vip-content">
|
||||||
|
<view
|
||||||
|
class="hero-card"
|
||||||
|
:class="{ 'hero-card--active': isVipActive(type) }"
|
||||||
|
>
|
||||||
|
<image class="hero-card__bg" :src="getHeroCard(type)" mode="scaleToFill" />
|
||||||
|
<!-- 生效态卡片使用 title2 底图,补充有效期和订单入口叠层。 -->
|
||||||
|
<view v-if="isVipActive(type)" class="hero-card__content">
|
||||||
|
<text class="hero-card__date">
|
||||||
|
有效期至:{{ getActiveVipExpiredDate(type) }}
|
||||||
|
</text>
|
||||||
|
<!-- <text v-if="type.key === 'super'" class="hero-card__renew">
|
||||||
|
下期会员将于:{{ getActiveVipRenewDate(type) }}自动续费
|
||||||
|
</text> -->
|
||||||
|
<view class="hero-card__order" @click.stop="toOrderPage">
|
||||||
|
<image class="hero-card__order-icon" :src="type.orderIcon" mode="aspectFit" />
|
||||||
|
<text>订单管理</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="benefit-title">
|
||||||
|
<view class="benefit-title__line" />
|
||||||
|
<text>{{ type.benefitTitle }}</text>
|
||||||
|
<view class="benefit-title__line" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="benefit-grid" :class="{ 'benefit-grid--normal': type.key === 'normal' }">
|
||||||
|
<view
|
||||||
|
v-for="benefit in type.benefits"
|
||||||
|
:key="benefit.label"
|
||||||
|
class="benefit-item"
|
||||||
|
>
|
||||||
|
<view class="benefit-icon">
|
||||||
|
<image class="benefit-icon__img" :src="benefit.icon" mode="aspectFit" />
|
||||||
|
</view>
|
||||||
|
<text class="benefit-item__label">{{ benefit.label }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="package-header">
|
||||||
|
<text class="package-header__title">选择套餐</text>
|
||||||
|
<view class="package-header__link" @click="toPackageDesc">
|
||||||
|
<text>套餐说明</text>
|
||||||
|
<image
|
||||||
|
class="package-header__icon"
|
||||||
|
src="../../static/enter.png"
|
||||||
|
mode="aspectFit"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<scroll-view scroll-x class="package-scroll" :show-scrollbar="false">
|
||||||
|
<view class="package-list">
|
||||||
|
<view
|
||||||
|
v-for="(pack, index) in getPackages(type)"
|
||||||
|
:key="`${type.key}-${pack.name}`"
|
||||||
|
class="package-card"
|
||||||
|
:class="{ 'package-card--active': selectedPackageIndex === index }"
|
||||||
|
@click="selectPackage(index)"
|
||||||
|
>
|
||||||
|
<view class="package-card__inner">
|
||||||
|
<text class="package-name">{{ pack.name }}</text>
|
||||||
|
<view class="package-price">
|
||||||
|
<text class="package-price__symbol">¥</text>
|
||||||
|
<text class="package-price__value">{{ pack.price }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="package-origin">
|
||||||
|
<text>¥{{ pack.original }}</text>
|
||||||
|
<view class="package-origin__line" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
<button
|
||||||
|
hover-class="none"
|
||||||
|
class="activate-btn"
|
||||||
|
:class="type.buttonClass"
|
||||||
|
:disabled="loadingConfig || paying || refreshing"
|
||||||
|
@click="onPay"
|
||||||
|
>
|
||||||
|
<text v-if="loadingConfig">加载套餐中</text>
|
||||||
|
<text v-else-if="paying">创建订单中</text>
|
||||||
|
<text v-else-if="!refreshing">¥ {{ selectedPackage.price }} 一键激活</text>
|
||||||
|
<text v-else>刷新会员状态中</text>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<view class="agreement">
|
||||||
|
<text>支付即同意</text>
|
||||||
|
《 <text class="agreement__link">会员自动续费服务协议</text>》
|
||||||
|
《 <text class="agreement__link">扣款授权服务协议</text>》
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
<Signin :show="showModal" :onClose="() => (showModal = false)" />
|
||||||
|
</view>
|
||||||
|
</Container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.vip-page {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.type-tabs {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
z-index: 998;
|
||||||
|
width: 50%;
|
||||||
|
height: 50px;
|
||||||
|
margin-left: 50%;
|
||||||
|
transform:translateX(-60%);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.type-tab {
|
||||||
|
width: 132rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: rgba(255, 255, 255, 0.45);
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.type-tab__indicator {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 4rpx;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
margin-top: 8rpx;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.type-tab--active {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vip-page--normal .type-tab--active .type-tab__indicator {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vip-page--super .type-tab--active {
|
||||||
|
color: #fedab5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vip-page--super .type-tab--active .type-tab__indicator {
|
||||||
|
background-color: #fedab5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.type-swiper {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.type-scroll {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vip-content {
|
||||||
|
min-height: 100%;
|
||||||
|
padding: 32rpx 24rpx 52rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-card {
|
||||||
|
position: relative;
|
||||||
|
width: 702rpx;
|
||||||
|
height: 260rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-card__bg {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 702rpx;
|
||||||
|
height: 260rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-card__content {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
/* 对齐 title2 切图左侧预留文案区域。 */
|
||||||
|
padding: 132rpx 0 0 44rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-card__date,
|
||||||
|
.hero-card__renew {
|
||||||
|
color: #8d6d55;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 34rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vip-page--normal .hero-card__date,
|
||||||
|
.vip-page--normal .hero-card__renew {
|
||||||
|
color: #555555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-card__order {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
color: #6d5644;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 34rpx;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vip-page--normal .hero-card__order {
|
||||||
|
color: #555555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-card__order-icon {
|
||||||
|
width: 28rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
margin-right: 8rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.benefit-title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 38rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 34rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.benefit-title__line {
|
||||||
|
width: 14rpx;
|
||||||
|
height: 2rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
margin: 0 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.benefit-grid {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
width: 622rpx;
|
||||||
|
margin: 38rpx auto 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.benefit-grid--normal {
|
||||||
|
width: 672rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.benefit-item {
|
||||||
|
width: 144rpx;
|
||||||
|
height: 122rpx;
|
||||||
|
margin-right: 94rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.benefit-item:nth-child(3n) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.benefit-grid--normal .benefit-item {
|
||||||
|
margin-right: 120rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.benefit-grid--normal .benefit-item:nth-child(3n) {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.benefit-icon {
|
||||||
|
width: 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.benefit-icon__img {
|
||||||
|
width: 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.benefit-item__label {
|
||||||
|
margin-top: 8rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
opacity: 0.7;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 34rpx;
|
||||||
|
text-align: center;
|
||||||
|
white-space: pre-line;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 56rpx;
|
||||||
|
padding-right: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.benefit-grid--normal + .package-header {
|
||||||
|
margin-top: 146rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-header__title {
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vip-page--super .package-header__title {
|
||||||
|
color: #e7ba80;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-header__link {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #999999;
|
||||||
|
font-size: 22rpx;
|
||||||
|
line-height: 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-header__icon {
|
||||||
|
width: 24rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-scroll {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 40rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-list {
|
||||||
|
display: flex;
|
||||||
|
width: 984rpx;
|
||||||
|
padding: 6rpx 84rpx 6rpx 6rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-card {
|
||||||
|
position: relative;
|
||||||
|
width: 264rpx;
|
||||||
|
height: 224rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
border: 2rpx solid #999999;
|
||||||
|
margin-right: 32rpx;
|
||||||
|
padding: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-card__inner {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-card--active {
|
||||||
|
border-width: 6rpx;
|
||||||
|
border-color: #fed847;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vip-page--super .package-card--active {
|
||||||
|
border: none;
|
||||||
|
padding: 6rpx;
|
||||||
|
background: linear-gradient(180deg, #fef3e6 0%, #f0c191 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.vip-page--super .package-card--active .package-card__inner {
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background-color: #050b19;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-name {
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 34rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-price {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
margin-top: 12rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-card--active .package-price {
|
||||||
|
color: #fed847;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vip-page--super .package-card--active .package-price {
|
||||||
|
color: #ffe8cd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-price__symbol {
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 36rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-price__value {
|
||||||
|
font-size: 56rpx;
|
||||||
|
line-height: 66rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-origin {
|
||||||
|
position: relative;
|
||||||
|
margin-top: 2rpx;
|
||||||
|
color: #999999;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 34rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.package-origin__line {
|
||||||
|
position: absolute;
|
||||||
|
left: -4rpx;
|
||||||
|
right: -4rpx;
|
||||||
|
top: 16rpx;
|
||||||
|
height: 2rpx;
|
||||||
|
background-color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.activate-btn {
|
||||||
|
width: 686rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
border-radius: 44rpx;
|
||||||
|
margin: 34rpx auto 0;
|
||||||
|
padding: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #000000;
|
||||||
|
font-size: 30rpx;
|
||||||
|
line-height: 42rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.activate-btn::after {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.activate-btn--normal {
|
||||||
|
background-color: #fed847;
|
||||||
|
}
|
||||||
|
|
||||||
|
.activate-btn--super {
|
||||||
|
background: linear-gradient( 181deg, #FDFDFC 0%, #FDF8F2 0%, #FFC992 100%, #FFB96C 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.agreement {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
color: #999999;
|
||||||
|
font-size: 20rpx;
|
||||||
|
line-height: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agreement__link {
|
||||||
|
margin-left: -6rpx;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -3,6 +3,7 @@ import { ref, onMounted } from "vue";
|
|||||||
import { onShow } from "@dcloudio/uni-app";
|
import { onShow } from "@dcloudio/uni-app";
|
||||||
import Container from "@/components/Container.vue";
|
import Container from "@/components/Container.vue";
|
||||||
import ScrollList from "@/components/ScrollList.vue";
|
import ScrollList from "@/components/ScrollList.vue";
|
||||||
|
import ModalDialog from "@/components/ModalDialog.vue";
|
||||||
import { getOrderListAPI } from "@/apis";
|
import { getOrderListAPI } from "@/apis";
|
||||||
import useStore from "@/store";
|
import useStore from "@/store";
|
||||||
import { orderStatusNames, getStatusColor } from "@/constants";
|
import { orderStatusNames, getStatusColor } from "@/constants";
|
||||||
@@ -10,13 +11,34 @@ import { storeToRefs } from "pinia";
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
const { user, config } = storeToRefs(store);
|
const { user, config } = storeToRefs(store);
|
||||||
|
|
||||||
|
const autoRenewDialogVisible = ref(false);
|
||||||
|
const selectedRenewOrder = ref(null);
|
||||||
|
|
||||||
const toDetailPage = (detail) => {
|
const toDetailPage = (detail) => {
|
||||||
uni.setStorageSync("order", detail);
|
uni.setStorageSync("order", detail);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/order-detail`,
|
url: "/pages/member/order-detail",
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const openAutoRenewDialog = (detail) => {
|
||||||
|
selectedRenewOrder.value = detail;
|
||||||
|
autoRenewDialogVisible.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const closeAutoRenewDialog = () => {
|
||||||
|
autoRenewDialogVisible.value = false;
|
||||||
|
selectedRenewOrder.value = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
const confirmAutoRenewDialog = () => {
|
||||||
|
autoRenewDialogVisible.value = false;
|
||||||
|
uni.showToast({
|
||||||
|
title: "功能实现中",
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const list = ref([]);
|
const list = ref([]);
|
||||||
|
|
||||||
const onLoading = async (page) => {
|
const onLoading = async (page) => {
|
||||||
@@ -44,7 +66,7 @@ onShow(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Container title="订单">
|
<Container title="订单管理">
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<ScrollList :onLoading="onLoading">
|
<ScrollList :onLoading="onLoading">
|
||||||
<view
|
<view
|
||||||
@@ -67,9 +89,22 @@ onShow(() => {
|
|||||||
>
|
>
|
||||||
<text>金额:{{ item.total }} 元</text>
|
<text>金额:{{ item.total }} 元</text>
|
||||||
<text>支付方式:微信</text>
|
<text>支付方式:微信</text>
|
||||||
|
<!-- <text class="renew-action" @click.stop="openAutoRenewDialog(item)">
|
||||||
|
自动续费
|
||||||
|
</text> -->
|
||||||
</view>
|
</view>
|
||||||
</ScrollList>
|
</ScrollList>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<ModalDialog
|
||||||
|
:show="autoRenewDialogVisible"
|
||||||
|
title=""
|
||||||
|
:content="'确定关闭自动续费吗?\n会员到期后你将失去7项特权哦!'"
|
||||||
|
cancel-text="一意孤行"
|
||||||
|
confirm-text="继续享受"
|
||||||
|
:on-cancel="closeAutoRenewDialog"
|
||||||
|
:on-confirm="confirmAutoRenewDialog"
|
||||||
|
/>
|
||||||
</Container>
|
</Container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -78,15 +113,15 @@ onShow(() => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
padding-top: 10px;
|
padding-top: 16rpx;
|
||||||
}
|
}
|
||||||
.order-item {
|
.order-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 16rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 15px;
|
padding: 28rpx 30rpx 18rpx 30rpx;
|
||||||
}
|
}
|
||||||
.order-item > view:first-child {
|
.order-item > view:first-child {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -98,12 +133,19 @@ onShow(() => {
|
|||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
.order-item > text:nth-child(2) {
|
.order-item > text:nth-child(2) {
|
||||||
color: #000;
|
color: #333333;
|
||||||
font-size: 16px;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
.order-item > text {
|
.order-item > text {
|
||||||
color: #666666;
|
color: #666666;
|
||||||
font-size: 13px;
|
font-size: 26rpx;
|
||||||
margin-top: 5px;
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
.order-item > .renew-action {
|
||||||
|
position: absolute;
|
||||||
|
right: 30rpx;
|
||||||
|
bottom: 18rpx;
|
||||||
|
color: #1f6ed4;
|
||||||
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
244
src/pages/member/vip-intro.vue
Normal file
@@ -0,0 +1,244 @@
|
|||||||
|
<script setup>
|
||||||
|
import Container from "@/components/Container.vue";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Container title="会员权益说明">
|
||||||
|
<scroll-view scroll-y class="vip-intro" :show-scrollbar="false">
|
||||||
|
<view class="content">
|
||||||
|
<view class="page-title">射灵星球会员权益</view>
|
||||||
|
|
||||||
|
<view class="paragraph">
|
||||||
|
<text class="strong">核心特权:</text>
|
||||||
|
<text>解锁约战、段位评级、实时排位赛、AI智能教练点评四大核心功能。</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="paragraph">
|
||||||
|
<text class="strong">专属服务:</text>
|
||||||
|
<text>享全年不同阶段VIP专属客服,快速解决技术故障、规则疑问等所有问题。</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="paragraph">
|
||||||
|
<text class="strong">新用户福利:</text>
|
||||||
|
<text>所有初次绑定设备的用户,免费赠送6个月普通会员。</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="paragraph">
|
||||||
|
<text>
|
||||||
|
加入射灵星球,在真实射箭运动中体验在线竞技的乐趣,结识全球志同道合的弓友,持续享受新功能与系统升级,不断挑战自我,创造属于你的辉煌战绩!
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="table-wrap">
|
||||||
|
<view class="intro-toast">
|
||||||
|
<image class="intro-toast__bg" src="../../static/vip/intro-toast.png" mode="scaleToFill" />
|
||||||
|
<text class="intro-toast__text">初次绑定设备赠送6个月</text>
|
||||||
|
</view>
|
||||||
|
<view class="benefit-table">
|
||||||
|
<view class="table-row table-head">
|
||||||
|
<text class="table-cell table-cell--feature">特权</text>
|
||||||
|
<text class="table-cell">基础用户</text>
|
||||||
|
<text class="table-cell">普通会员</text>
|
||||||
|
<text class="table-cell">超级会员</text>
|
||||||
|
</view>
|
||||||
|
<view class="table-row">
|
||||||
|
<text class="table-cell table-cell--feature">专属落点标识</text>
|
||||||
|
<text class="table-cell">无</text>
|
||||||
|
<text class="table-cell">无</text>
|
||||||
|
<text class="table-cell">螺旋</text>
|
||||||
|
</view>
|
||||||
|
<view class="table-row">
|
||||||
|
<text class="table-cell table-cell--feature">专属命中效果</text>
|
||||||
|
<text class="table-cell">无</text>
|
||||||
|
<text class="table-cell">无</text>
|
||||||
|
<text class="table-cell">玻璃裂纹</text>
|
||||||
|
</view>
|
||||||
|
<view class="table-row">
|
||||||
|
<text class="table-cell table-cell--feature">箭矢飞行特效</text>
|
||||||
|
<text class="table-cell">无</text>
|
||||||
|
<text class="table-cell">无</text>
|
||||||
|
<text class="table-cell">光箭</text>
|
||||||
|
</view>
|
||||||
|
<view class="table-row">
|
||||||
|
<text class="table-cell table-cell--feature">每日约战次数</text>
|
||||||
|
<text class="table-cell">2次</text>
|
||||||
|
<text class="table-cell">22次</text>
|
||||||
|
<text class="table-cell">无限</text>
|
||||||
|
</view>
|
||||||
|
<view class="table-row">
|
||||||
|
<text class="table-cell table-cell--feature">每日排位赛次数</text>
|
||||||
|
<text class="table-cell">2次</text>
|
||||||
|
<text class="table-cell">22次</text>
|
||||||
|
<text class="table-cell">无限</text>
|
||||||
|
</view>
|
||||||
|
<view class="table-row">
|
||||||
|
<text class="table-cell table-cell--feature">教练点评</text>
|
||||||
|
<text class="table-cell">无</text>
|
||||||
|
<text class="table-cell">专享</text>
|
||||||
|
<text class="table-cell">专享</text>
|
||||||
|
</view>
|
||||||
|
<view class="table-row">
|
||||||
|
<text class="table-cell table-cell--feature">会员标识</text>
|
||||||
|
<text class="table-cell">无</text>
|
||||||
|
<text class="table-cell">专享</text>
|
||||||
|
<text class="table-cell">专享</text>
|
||||||
|
</view>
|
||||||
|
<view class="table-row">
|
||||||
|
<text class="table-cell table-cell--feature">专属客服</text>
|
||||||
|
<text class="table-cell">无</text>
|
||||||
|
<text class="table-cell">专享</text>
|
||||||
|
<text class="table-cell">专享</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="section-title">会员时长叠加与生效规则</view>
|
||||||
|
|
||||||
|
<view class="paragraph">
|
||||||
|
<text class="strong">等级优先级:</text>
|
||||||
|
<text>
|
||||||
|
同时拥有 超级会员 和 普通会员 时,优先使用超级会员权益,普通会员时长自动顺延,待 超级会员 到期后自动生效。
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="paragraph">
|
||||||
|
<text class="strong">连续套餐叠加:</text>
|
||||||
|
<text>
|
||||||
|
已有月 / 半年 / 年卡时再购买连续包月 / 包年,总有效期直接累加;连续套餐从下单日起算,下个周期正常自动扣费。
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="paragraph example">
|
||||||
|
<text>
|
||||||
|
示例:1 月 1 日买半年卡(7 月 1 日到期),1 月 10 日买连续包月,总有效期延至 8 月 1 日,8 月 1 日会发起首次自动扣款。
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="paragraph">
|
||||||
|
<text class="strong">升级超级会员规则:</text>
|
||||||
|
<text>
|
||||||
|
购买升级 超级会员 后立即生效,可升级时长以购买页面提示为准;未升级的剩余 普通会员 时长,将在 超级会员 到期后继续使用。
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</Container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.vip-intro {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-title,
|
||||||
|
.section-title {
|
||||||
|
color: #333333;
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-title {
|
||||||
|
margin-bottom: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
margin: 42rpx 0 22rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paragraph {
|
||||||
|
margin-bottom: 22rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 26rpx;
|
||||||
|
line-height: 38rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.strong {
|
||||||
|
color: #333333;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.example {
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-wrap {
|
||||||
|
position: relative;
|
||||||
|
margin-top: 34rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intro-toast {
|
||||||
|
position: absolute;
|
||||||
|
top: -38rpx;
|
||||||
|
right: 118rpx;
|
||||||
|
z-index: 2;
|
||||||
|
width: 222rpx;
|
||||||
|
height: 54rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intro-toast__bg {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 222rpx;
|
||||||
|
height: 54rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intro-toast__text {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 18rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
white-space: nowrap;
|
||||||
|
margin-top: -6rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.benefit-table {
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1rpx solid #e5e5e5;
|
||||||
|
border-left: 1rpx solid #e5e5e5;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-row {
|
||||||
|
display: flex;
|
||||||
|
min-height: 60rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-cell {
|
||||||
|
width: 22.5%;
|
||||||
|
min-height: 60rpx;
|
||||||
|
padding: 12rpx 4rpx;
|
||||||
|
border-right: 1rpx solid #e5e5e5;
|
||||||
|
border-bottom: 1rpx solid #e5e5e5;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 34rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-cell--feature {
|
||||||
|
width: 32.5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-head .table-cell {
|
||||||
|
color: #666666;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -316,7 +316,7 @@ onBeforeUnmount(() => {
|
|||||||
width: 156rpx;
|
width: 156rpx;
|
||||||
height: 28rpx;
|
height: 28rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 20rpx;
|
font-size: 24rpx;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 28rpx;
|
line-height: 28rpx;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const { updateUser } = store;
|
|||||||
|
|
||||||
const toOrderPage = () => {
|
const toOrderPage = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/orders",
|
url: "/pages/member/orders",
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ const toFristTryPage = async () => {
|
|||||||
};
|
};
|
||||||
const toBeVipPage = () => {
|
const toBeVipPage = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/be-vip",
|
url: "/pages/member/be-vip",
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const toMyGrowthPage = () => {
|
const toMyGrowthPage = () => {
|
||||||
|
|||||||
BIN
src/static/common/dialog-bg.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
src/static/common/dialog-icon.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
src/static/common/dialog-light.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
src/static/vip/intro-toast.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/static/vip/super-battle.png
Normal file
|
After Width: | Height: | Size: 862 B |
BIN
src/static/vip/super-button.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/static/vip/svip-arrow.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
src/static/vip/svip-badge.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/static/vip/svip-battle.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/static/vip/svip-comment.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
src/static/vip/svip-hit.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/static/vip/svip-off.png
Normal file
|
After Width: | Height: | Size: 724 B |
BIN
src/static/vip/svip-on.png
Normal file
|
After Width: | Height: | Size: 777 B |
BIN
src/static/vip/svip-order.png
Normal file
|
After Width: | Height: | Size: 492 B |
BIN
src/static/vip/svip-point.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
src/static/vip/svip-rank.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/static/vip/svip-service.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
src/static/vip/svip-title.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
src/static/vip/svip-title2.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
src/static/vip/vip-badge.png
Normal file
|
After Width: | Height: | Size: 1001 B |
BIN
src/static/vip/vip-battle.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/static/vip/vip-bg.png
Normal file
|
After Width: | Height: | Size: 111 KiB |
BIN
src/static/vip/vip-comment.png
Normal file
|
After Width: | Height: | Size: 949 B |
BIN
src/static/vip/vip-off.png
Normal file
|
After Width: | Height: | Size: 594 B |
BIN
src/static/vip/vip-on.png
Normal file
|
After Width: | Height: | Size: 637 B |
BIN
src/static/vip/vip-order.png
Normal file
|
After Width: | Height: | Size: 476 B |
BIN
src/static/vip/vip-rank.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/static/vip/vip-service.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/static/vip/vip-title.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
src/static/vip/vip-title2.png
Normal file
|
After Width: | Height: | Size: 33 KiB |