修复已知问题
This commit is contained in:
@@ -43,10 +43,16 @@
|
||||
title: '实名认证',
|
||||
key: '4',
|
||||
url: '/pages/my-index/wallet/real-id'
|
||||
},
|
||||
// #ifdef H5
|
||||
{
|
||||
title: '邀请好友',
|
||||
key: '6',
|
||||
url: '/pages/my-index/wallet/invite'
|
||||
}
|
||||
// #endif
|
||||
]
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
getData()
|
||||
})
|
||||
|
||||
178
pages/my-index/wallet/invite.vue
Normal file
178
pages/my-index/wallet/invite.vue
Normal file
@@ -0,0 +1,178 @@
|
||||
<script setup>
|
||||
import { computed } from 'vue'
|
||||
import { useAuthUser } from '../../../composables/useAuthUser'
|
||||
|
||||
const { userInfo } = useAuthUser()
|
||||
|
||||
const inviteLink = computed(() => {
|
||||
const { href } = window.location
|
||||
return `${href}/pages/login/phone-register/phone-register?invitationCode=${userInfo.value.invitationCode}`
|
||||
})
|
||||
|
||||
// 复制文本通用函数
|
||||
const copyText = text => {
|
||||
uni.setClipboardData({
|
||||
data: text,
|
||||
success: () => {
|
||||
console.log('已复制到剪贴板')
|
||||
},
|
||||
fail: () => {
|
||||
console.log('复制失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="invite-page">
|
||||
<view class="header">
|
||||
<text class="subtitle">邀请好友一起使用,双方都能获得奖励!</text>
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
<view class="card-item">
|
||||
<text class="label">您的邀请码</text>
|
||||
<view class="code-box">
|
||||
<text class="code">{{ userInfo.invitationCode }}</text>
|
||||
<button
|
||||
class="copy-btn"
|
||||
@click="copyText(userInfo.invitationCode)"
|
||||
>
|
||||
复制
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="divider"></view>
|
||||
|
||||
<view class="card-item">
|
||||
<text class="label">邀请注册链接</text>
|
||||
<view class="link-box">
|
||||
<text class="link" selectable>{{ inviteLink }}</text>
|
||||
<button class="copy-btn" @click="copyText(inviteLink)">
|
||||
复制
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="share-tips">
|
||||
<text>将链接或邀请码发送给好友即可完成邀请</text>
|
||||
</view>
|
||||
|
||||
<!-- 可选:添加分享按钮(如微信、朋友圈等) -->
|
||||
<!-- <button class="share-btn">分享到微信</button> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.invite-page {
|
||||
padding: 40rpx;
|
||||
background-color: #f9fafc;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 48rpx;
|
||||
font-weight: bold;
|
||||
color: #1a1a1a;
|
||||
display: block;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: white;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.card-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 28rpx;
|
||||
color: #888;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.code-box,
|
||||
.link-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #f5f7fa;
|
||||
padding: 24rpx;
|
||||
border-radius: 16rpx;
|
||||
min-height: 80rpx;
|
||||
}
|
||||
|
||||
.code {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #1a1a1a;
|
||||
letter-spacing: 8rpx;
|
||||
}
|
||||
|
||||
.link {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
flex: 1;
|
||||
word-break: break-all;
|
||||
margin-right: 20rpx;
|
||||
white-space: nowrap; /* 禁止换行 */
|
||||
overflow: hidden; /* 隐藏溢出内容 */
|
||||
text-overflow: ellipsis; /* 溢出部分显示省略号 */
|
||||
}
|
||||
|
||||
.copy-btn {
|
||||
width: 120rpx;
|
||||
height: 56rpx;
|
||||
background: #4a6cf7;
|
||||
color: white;
|
||||
border-radius: 12rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 56rpx;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.copy-btn::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.divider {
|
||||
height: 2rpx;
|
||||
background: #eee;
|
||||
margin: 30rpx 0;
|
||||
}
|
||||
|
||||
.share-tips {
|
||||
text-align: center;
|
||||
margin-top: 40rpx;
|
||||
color: #999;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
/* .share-btn {
|
||||
margin-top: 60rpx;
|
||||
background: #07c160;
|
||||
color: white;
|
||||
border-radius: 50rpx;
|
||||
height: 80rpx;
|
||||
font-size: 32rpx;
|
||||
} */
|
||||
</style>
|
||||
@@ -136,20 +136,6 @@
|
||||
<template>
|
||||
<view v-if="!loading" class="real-id">
|
||||
<view v-if="[0, 2].includes(stateData)">
|
||||
<!-- 主播申请输入 -->
|
||||
<view
|
||||
v-if="props?.isLiveStream && [9, 2].includes(stateLiveAnchor)"
|
||||
>
|
||||
<text v-if="stateLiveAnchor === 9" class="top-text">
|
||||
*添加手机号审核
|
||||
</text>
|
||||
<text v-else class="top-text">*信息填写有误</text>
|
||||
<CardInput
|
||||
v-model="formData.phone"
|
||||
title="联系电话"
|
||||
placeholder="请输入联系电话"
|
||||
></CardInput>
|
||||
</view>
|
||||
<view
|
||||
v-if="
|
||||
(props?.isLiveStream && [0, 2].includes(stateData)) ??
|
||||
@@ -196,6 +182,49 @@
|
||||
:disabled="stateData === 3"
|
||||
></CardInput>
|
||||
</view>
|
||||
|
||||
<!-- 从未实名认证过 -->
|
||||
<view v-if="!props.isLiveStream">
|
||||
<!-- 实名认证输入 -->
|
||||
<!-- 说明 -->
|
||||
<text v-if="stateData === 2" class="top-text">
|
||||
*审核未通过请重新上传
|
||||
</text>
|
||||
<text v-else-if="stateData === 0" class="top-text">
|
||||
*为保证您的账户安全,请先完成实名认证
|
||||
</text>
|
||||
<text v-else class="top-text">*您已完成实名认证</text>
|
||||
<CardInput :is-input="false" title="证件">
|
||||
<view class="qrcode-box">
|
||||
<cb-file-picker
|
||||
v-model="formData.front"
|
||||
v-model:list="formData.frontList"
|
||||
:readonly="stateData === 3"
|
||||
isFront
|
||||
></cb-file-picker>
|
||||
<cb-file-picker
|
||||
v-model="formData.back"
|
||||
v-model:list="formData.backList"
|
||||
:readonly="stateData === 3"
|
||||
isBack
|
||||
></cb-file-picker>
|
||||
</view>
|
||||
</CardInput>
|
||||
|
||||
<CardInput
|
||||
v-model="formData.realName"
|
||||
title="姓名"
|
||||
placeholder="请输入姓名"
|
||||
:disabled="stateData === 3"
|
||||
></CardInput>
|
||||
|
||||
<CardInput
|
||||
v-model="formData.idCard"
|
||||
title="身份证号"
|
||||
placeholder="请输入身份证号"
|
||||
:disabled="stateData === 3"
|
||||
></CardInput>
|
||||
</view>
|
||||
<!-- 底部按钮 v-if="props?.isLiveStream && stateData === 3" -->
|
||||
<bottom-view
|
||||
v-if="
|
||||
@@ -212,7 +241,29 @@
|
||||
</cb-button>
|
||||
</bottom-view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 主播申请输入 -->
|
||||
<view
|
||||
v-if="
|
||||
props?.isLiveStream &&
|
||||
stateData == 3 &&
|
||||
[2, 9].includes(stateLiveAnchor)
|
||||
"
|
||||
>
|
||||
<text v-if="stateLiveAnchor === 9" class="top-text">
|
||||
*添加手机号审核
|
||||
</text>
|
||||
<text v-else class="top-text">*信息填写有误</text>
|
||||
<CardInput
|
||||
v-model="formData.phone"
|
||||
title="联系电话"
|
||||
placeholder="请输入联系电话"
|
||||
></CardInput>
|
||||
|
||||
<bottom-view v-if="[9, 2].includes(stateLiveAnchor)">
|
||||
<cb-button @click="onAddStreamer">确认</cb-button>
|
||||
</bottom-view>
|
||||
</view>
|
||||
<view v-if="stateData == 3 && !props?.isLiveStream">
|
||||
<text class="top-text">*您已完成实名认证</text>
|
||||
<CardInput :is-input="false" title="证件">
|
||||
<view class="qrcode-box">
|
||||
|
||||
Reference in New Issue
Block a user