修复已知问题

This commit is contained in:
bobobobo
2026-01-22 01:23:57 +08:00
parent 2b26bfed69
commit 5f2fab9335
18 changed files with 414 additions and 61 deletions

View File

@@ -4,6 +4,7 @@
import { navigateTo } from '@/utils/router'
import { useUI } from '@/utils/use-ui'
import { formatNumberWithWan } from '../../utils'
import { getUserPayPwd } from '@/api/my-index'
const bottomList = [
{
@@ -43,6 +44,23 @@
const { showDialog } = useUI()
const { userInfo, integralData } = useAuthUser()
/** 点击列表跳转 */
const onGo = async item => {
if (item.url === '/pages/my-index/wallet/index') {
const res = await getUserPayPwd()
if (res?.data) {
navigateTo(item.url)
} else {
const show = await showDialog('提示', '请先设置支付密码')
if (show) {
navigateTo('/pages/my-index/wallet/edit-password', { type: 0 })
}
}
} else {
navigateTo(item.url)
}
}
onLoad(() => {
// 获取用户信息
console.log(userInfo.value, '===获取用户信息')
@@ -99,7 +117,7 @@
v-for="(item, index) in bottomList"
:key="index"
class="item-box"
@click="item.url && navigateTo(item.url)"
@click="item.url && onGo(item)"
>
<view class="item-name">
<uni-icons

View File

@@ -11,7 +11,7 @@
const itemList = [
{ title: '我的二维码', key: '1', value: '' },
{ title: 'ID', key: '2', value: 'userId' },
// { title: 'ID', key: '2', value: 'userId' },
{ title: '昵称', key: '3', value: 'userName' },
{ title: '性别', key: '4', value: 'sex' },
{ title: '手机号码', key: '5', value: 'mobile' },

View File

@@ -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()
})

View 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>

View File

@@ -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">