修复已知问题

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

13
App.vue
View File

@@ -14,20 +14,27 @@
const { token } = useAuthUser()
const { loginTencentIM } = useUserStore()
/** 静默登录逻辑 */
const silentLogin = async () => {
const silentLogin = async (e: any) => {
if (token.value) {
loginTencentIM()
// reLaunch('/TUIKit/components/TUIConversation/index')
return
}
console.log(e, '=====222==')
if (e?.query?.invitationCode) {
reLaunch('/pages/login/phone-register/phone-register', {
invitationCode: e.query.invitationCode
})
} else {
// 没有token去登录页
reLaunch('/pages/login/login')
}
}
onLaunch(() => {
onLaunch((e: any) => {
console.log('App Launch111')
silentLogin()
silentLogin(e)
// #ifdef APP-PLUS
setSdkLanguageFromSystem()

View File

@@ -7,6 +7,10 @@
:selectedConversationDomRect="currentConversationDomRect"
@closeConversationActionMenu="closeConversationActionMenu"
/>
<cb-empty
v-if="conversationList.length === 0"
name="您还没有好友"
></cb-empty>
<div
v-for="(conversation, index) in conversationList"
:id="`convlistitem-${index}`"

View File

@@ -21,6 +21,10 @@
type: {
type: String,
default: 'phone'
},
invitationCode: {
type: String,
default: ''
}
})
@@ -34,7 +38,7 @@
// 确认密码
confirmPassword: '',
// 邀请码
invitationCode: '',
invitationCode: props.invitationCode,
agreement: true
})
@@ -112,9 +116,9 @@
<view class="register-app">
<view class="top-register-nav">
<text class="title-left">{{ isPhone ? '手机' : '邮箱' }}注册</text>
<text class="title-right" @click="onTopRight">
<!-- <text class="title-right" @click="onTopRight">
{{ isPhone ? '邮箱' : '手机号' }}注册
</text>
</text> -->
</view>
<div class="input-wrapper">
<cb-input

View File

@@ -14,7 +14,7 @@
<!--preload-links-->
<!--app-context-->
</head>
<script disable-devtool-auto src='https://cdn.jsdelivr.net/npm/disable-devtool'></script>
<!-- <script disable-devtool-auto src='https://cdn.jsdelivr.net/npm/disable-devtool'></script> -->
<body>
<div id="app"><!--app-html--></div>

View File

@@ -1,9 +1,9 @@
{
"name" : "uniapp-imitate-wx",
"name" : "密谈IM",
"appid" : "__UNI__9EFDC69",
"description" : "",
"versionName" : "1.0.3",
"versionCode" : 102,
"versionName" : "1.0.4",
"versionCode" : 103,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@@ -61,13 +61,53 @@
"UIBackgroundModes" : [ "audio" ]
},
/* SDK */
"sdkConfigs" : {}
"sdkConfigs" : {},
"splashscreen" : {
"androidStyle" : "default",
"android" : {
"hdpi" : "D:/下载/聊天界面(其他功能).png",
"xhdpi" : "D:/下载/聊天界面(其他功能).png",
"xxhdpi" : "D:/下载/聊天界面(其他功能).png"
}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
}
},
"h5" : {
"optimization" : {
"treeShaking" : {
"enable" : true
"enable" : false
}
},
"router" : {

View File

@@ -112,7 +112,8 @@
"path": "pages/discover/discover",
"style": {
"navigationBarTitleText": "发现",
"navigationBarBackgroundColor": "#ffffff"
"navigationBarBackgroundColor": "#ffffff",
"navigationStyle": "custom"
}
},
{
@@ -193,6 +194,13 @@
"navigationBarBackgroundColor": "#ffffff"
}
},
{
"path": "pages/my-index/wallet/invite",
"style": {
"navigationBarTitleText": "邀请好友",
"navigationBarBackgroundColor": "#ffffff"
}
},
{
"path": "pages/my-index/my-team",
"style": {

View File

@@ -59,9 +59,32 @@
return
}
}
const onScan = () => {
uni.scanCode({
onlyFromCamera: false,
scanType: ['qrCode'],
success: res => {
navigateTo(res.result)
}
})
}
</script>
<template>
<view>
<nav-bar :showBack="false" isTopBg isPlaceholder title="发现">
<template #right>
<!-- #ifdef APP-PLUS -->
<image
src="/TUIKit/assets/icon/scan.svg"
mode="heightFix"
class="scan-icon"
@click="onScan"
></image>
<!-- #endif -->
</template>
</nav-bar>
<view class="discover-box">
<view
v-for="(item, index) in btnList"
@@ -84,9 +107,13 @@
></image>
</view>
</view>
</view>
</template>
<style lang="scss" scoped>
.scan-icon {
height: 34rpx;
}
.discover-box {
padding: 32rpx 24rpx;
.card-box {

View File

@@ -163,19 +163,23 @@ text-transform: none;`
<view class="top-bg-img">
<image
:src="userInfo?.avatar"
lazy-load
mode="aspectFill"
class="img"
@click="onImage([userInfo?.avatar])"
></image>
<!-- 用户信息 -->
<view class="user-info">
<text>{{ userInfo?.userName }}</text>
<text class="name">{{ userInfo?.userName }}</text>
<image
v-if="userInfo?.avatar"
:src="userInfo?.avatar"
lazy-load
mode="aspectFill"
class="avatar"
@click="onImage([userInfo?.avatar])"
></image>
<uni-icons v-else type="contact-filled" size="160rpx"></uni-icons>
</view>
</view>
@@ -184,6 +188,7 @@ text-transform: none;`
<view v-for="item in dataList" :key="item.id" class="list">
<image
:src="item.avatar"
lazy-load
mode="aspectFill"
class="avatar"
></image>

View File

@@ -13,7 +13,7 @@
<!-- <view class="home-footer">
<view class="create-btn" @click="goAnchorPage()">
<image style="width: 36rpx; height: 36rpx; margin-right: 10rpx;" src="/static/images/create-live.png" />
<text class="btn-text">开2直播</text>
<text class="btn-text">开直播</text>
</view>
</view> -->
</view>

View File

@@ -2,6 +2,7 @@
width: 100%;
height: 544rpx;
position: relative;
background: #87d8ff;
.img {
width: 100%;
height: 100%;
@@ -12,7 +13,7 @@
bottom: -60rpx;
display: flex;
align-items: flex-start;
text {
.name {
margin-top: 30rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 600;

View File

@@ -1,10 +1,14 @@
<script setup>
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
const invitationCode = ref('')
onLoad(e => {
invitationCode.value = e?.invitationCode || ''
})
</script>
<template>
<register-app></register-app>
<register-app :invitationCode></register-app>
</template>
<script setup>
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 26 KiB