评论商品接口有问题

This commit is contained in:
bobobobo
2026-01-16 00:12:33 +08:00
parent d2ba0df2b5
commit 5cd2732562
164 changed files with 14318 additions and 197 deletions

View File

@@ -82,6 +82,7 @@
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
.right-box {
display: flex;
align-items: center;

View File

@@ -1,17 +1,48 @@
<script setup>
import { navigateTo } from '@/utils/router'
// import { onLoad } from '@dcloudio/uni-app'
// import { ref } from 'vue'
// import { getUserServiceList } from '@/api/my-index'
import TUIChatEngine, {
TUIConversationService,
TUIFriendService
} from '@tencentcloud/chat-uikit-engine-lite'
import { TUIGlobal } from '@tencentcloud/universal-api'
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
import { getUserServiceFree } from '@/api/my-index'
// const list = ref([])
// const getList = async () => {
// const res = await getUserServiceList()
// list.value = res.data
// }
// onLoad(() => {
// getList()
// })
const customerData = ref({})
const getList = async () => {
const res = await getUserServiceFree()
customerData.value = res?.data || {}
}
const handleSwitchConversation = async () => {
// 在这里可以添加提交验证信息的逻辑
let source = 'AddSource_Type_Web' // 来源渠道
// #ifdef H5
source = 'AddSource_Type_H5'
// #endif
// 判断是否为 App5+ App
// #ifdef APP-PLUS
source = 'AddSource_Type_App'
// #endif
await TUIFriendService.addFriend({
to: customerData.value.imUserId,
source,
remark: customerData.value.nickname,
type: TUIChatEngine.TYPES.SNS_ADD_TYPE_BOTH
})
TUIConversationService.switchConversation(
`C2C${customerData.value.imUserId}`
)
TUIGlobal?.navigateTo({
url: `/TUIKit/components/TUIChat/index?id=${customerData.value.id}`
})
}
onLoad(() => {
getList()
})
</script>
<template>
@@ -28,7 +59,13 @@
>
第三方客服
</button>
<!-- <button>APP客服</button> -->
<button
v-if="customerData?.imUserId"
class="btn"
@click="handleSwitchConversation"
>
APP客服
</button>
</view>
</view>
</template>
@@ -70,16 +107,16 @@
background: linear-gradient(0deg, #00d993 0%, #00d9c5 100%);
border-radius: 16rpx;
box-sizing: border-box;
&:nth-child(2) {
background: #ffffff;
color: #00d993;
border: 2rpx solid #00d993;
}
&::after {
display: none;
}
}
.btn {
background: #ffffff;
color: #00d993;
border: 2rpx solid #00d993;
}
}
}
</style>

View File

@@ -1,7 +1,7 @@
<script setup>
import { useAuthUser } from '@/composables/useAuthUser'
const { userInfo } = useAuthUser()
const { userInfo, tencentUserSig } = useAuthUser()
</script>
<template>
@@ -19,7 +19,13 @@
<text>ID: {{ userInfo.userId }}</text>
</view>
</view>
<view class="code-img">二维码</view>
<view class="code-img">
<l-qrcode
:value="`/pages/adduser/index?id=${tencentUserSig.userId}`"
size="240"
/>
</view>
<text class="bottom-text">邀请码{{ userInfo.invitationCode }}</text>
</view>
</template>
@@ -30,6 +36,13 @@
flex-direction: column;
align-items: center;
.bottom-text {
font-size: 38rpx;
color: #333333;
margin-top: 10rpx;
font-weight: 600;
}
.top-img {
width: 480rpx;
display: flex;
@@ -60,7 +73,9 @@
}
.code-img {
background: rgb(165, 136, 136);
display: flex;
justify-content: center;
align-items: center;
width: 480rpx;
height: 480rpx;
}