修复已知问题

This commit is contained in:
bobobobo
2026-01-29 00:27:31 +08:00
parent 990f2df972
commit 41c1e5ba89
36 changed files with 1353 additions and 169 deletions

View File

@@ -1,6 +1,6 @@
<script setup>
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
import { ref, computed } from 'vue'
import { useUI } from '../../utils/use-ui'
const { showToast } = useUI()
@@ -9,13 +9,29 @@
const productId = ref('')
const qrcodeRef = ref(null)
const BASE_URL = computed(() => {
const { origin } = window.location
return `${origin}/pages/mall/detail?productId=${productId.value}&groupId=${groupId.value}`
})
// 复制文本通用函数
const copyText = text => {
uni.setClipboardData({
data: BASE_URL.value,
success: () => {
console.log('已复制到剪贴板')
},
fail: () => {
console.log('复制失败')
}
})
}
onLoad(e => {
groupId.value = e.id
productId.value = e.productId
// /pages/mall/detail
})
</script>
<template>
@@ -36,10 +52,60 @@
</view> -->
</view>
</view>
<!-- 复制连接 -->
<!-- #ifdef H5 -->
<view class="copy-box">
<text class="link">拼单链接:{{ BASE_URL }}</text>
<button @click="copyText">复制</button>
</view>
<!-- #endif -->
</view>
</template>
<style lang="scss" scoped>
.copy-box {
margin-top: 118rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.link {
// 超过宽度显示省略号
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 544rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 32rpx;
font-style: normal;
text-transform: none;
color: #00d993;
}
button {
margin-top: 48rpx;
width: 256rpx;
height: 64rpx;
line-height: 60rpx;
border-radius: 100rpx;
border: 2rpx solid #00d993;
color: #00d993;
padding: 0;
background: none;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 28rpx;
text-align: center;
font-style: normal;
text-transform: none;
&::after {
display: none !important;
}
}
}
.share-box {
height: 100vh;
width: 100vw;