update
parent
9ae2729807
commit
a040a82fd8
|
@ -16,6 +16,7 @@ declare module 'vue' {
|
||||||
NCheckbox: typeof import('naive-ui')['NCheckbox']
|
NCheckbox: typeof import('naive-ui')['NCheckbox']
|
||||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||||
NDatePicker: typeof import('naive-ui')['NDatePicker']
|
NDatePicker: typeof import('naive-ui')['NDatePicker']
|
||||||
|
NDivider: typeof import('naive-ui')['NDivider']
|
||||||
NDropdown: typeof import('naive-ui')['NDropdown']
|
NDropdown: typeof import('naive-ui')['NDropdown']
|
||||||
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||||
NEmpty: typeof import('naive-ui')['NEmpty']
|
NEmpty: typeof import('naive-ui')['NEmpty']
|
||||||
|
|
|
@ -249,7 +249,7 @@ async function handlePictureChange(event: Event) {
|
||||||
placeholder="请输入加入费用"
|
placeholder="请输入加入费用"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
积分
|
金币
|
||||||
</template>
|
</template>
|
||||||
</NInputNumber>
|
</NInputNumber>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
|
|
|
@ -78,8 +78,8 @@ async function getCommunityDetail() {
|
||||||
formValue.value = {
|
formValue.value = {
|
||||||
imageUrl,
|
imageUrl,
|
||||||
communityName,
|
communityName,
|
||||||
communityTag: communityTag.toString(),
|
communityTag: communityTag?.toString() || '',
|
||||||
type: type.toString(),
|
type: type?.toString() || '',
|
||||||
price,
|
price,
|
||||||
id,
|
id,
|
||||||
validityDay,
|
validityDay,
|
||||||
|
@ -274,7 +274,7 @@ async function handlePictureChange(event: Event) {
|
||||||
placeholder="请输入加入费用"
|
placeholder="请输入加入费用"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
积分
|
金币
|
||||||
</template>
|
</template>
|
||||||
</NInputNumber>
|
</NInputNumber>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
|
|
|
@ -122,7 +122,7 @@ watchEffect(() => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="bg-white rounded-lg w-[290px] p-4 h-fit">
|
<div class="bg-white rounded-lg w-[290px] p-4 h-fit">
|
||||||
<div class="flex flex-col gap-4">
|
<div class="flex flex-col">
|
||||||
<!-- 左侧图片 -->
|
<!-- 左侧图片 -->
|
||||||
<div class="w-[258px] h-[258px] rounded-lg relative bg-[#f2f3f5] overflow-hidden">
|
<div class="w-[258px] h-[258px] rounded-lg relative bg-[#f2f3f5] overflow-hidden">
|
||||||
<img
|
<img
|
||||||
|
@ -150,7 +150,7 @@ watchEffect(() => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<n-divider />
|
||||||
<!-- 右侧信息 -->
|
<!-- 右侧信息 -->
|
||||||
<div class="flex flex-col justify-between flex-1">
|
<div class="flex flex-col justify-between flex-1">
|
||||||
<div class="space-y-2">
|
<div class="space-y-2">
|
||||||
|
|
|
@ -36,14 +36,14 @@ const showEditPlanet = ref(false)
|
||||||
|
|
||||||
const menuItems = computed(() => {
|
const menuItems = computed(() => {
|
||||||
const items = [
|
const items = [
|
||||||
{
|
// {
|
||||||
label: '分享星球',
|
// label: '分享星球',
|
||||||
action: () => {
|
// action: () => {
|
||||||
const url = window.location.href
|
// const url = window.location.href
|
||||||
navigator.clipboard.writeText(url)
|
// navigator.clipboard.writeText(url)
|
||||||
message.success('链接已复制到剪贴板')
|
// message.success('链接已复制到剪贴板')
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
label: '退出星球',
|
label: '退出星球',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
|
|
|
@ -28,6 +28,7 @@ const typeList = ref([
|
||||||
value: 999,
|
value: 999,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const showPublishModal = ref(false)
|
const showPublishModal = ref(false)
|
||||||
|
|
||||||
const publishListParams = ref({
|
const publishListParams = ref({
|
||||||
|
@ -74,6 +75,38 @@ function closePublishModal() {
|
||||||
PublishComponentKey.value++
|
PublishComponentKey.value++
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
const state = history.state
|
||||||
|
if (state && state.communityId && state.tenantId) {
|
||||||
|
publishListParams.value = {
|
||||||
|
communityId: state.communityId,
|
||||||
|
tenantId: state.tenantId,
|
||||||
|
publishId: state.id,
|
||||||
|
type: null,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
}
|
||||||
|
|
||||||
|
questionParams.value = {
|
||||||
|
communityId: state.communityId,
|
||||||
|
tenantId: state.tenantId,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// 如果没有 state,回退到 URL 参数
|
||||||
|
publishListParams.value = {
|
||||||
|
communityId: route.query.communityId as string,
|
||||||
|
tenantId: route.query.tenantId as string,
|
||||||
|
publishId: route.query.id as string,
|
||||||
|
type: null,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -139,7 +172,7 @@ function closePublishModal() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-[300px]">
|
<div class="w-[300px]">
|
||||||
<PlanetBaseInfo :community-id="route.query.communityId" :tenant-id="route.query.tenantId" />
|
<PlanetBaseInfo v-if="publishListParams.communityId && publishListParams.tenantId" :community-id="publishListParams.communityId" :tenant-id="publishListParams.tenantId" />
|
||||||
</div>
|
</div>
|
||||||
<n-modal
|
<n-modal
|
||||||
v-model:show="showPublishModal"
|
v-model:show="showPublishModal"
|
||||||
|
@ -149,8 +182,9 @@ function closePublishModal() {
|
||||||
class="rounded-lg"
|
class="rounded-lg"
|
||||||
>
|
>
|
||||||
<PublishContent
|
<PublishContent
|
||||||
:community-id="route.query.communityId"
|
v-if="publishListParams.communityId && publishListParams.tenantId"
|
||||||
:tenant-id="route.query.tenantId"
|
:community-id="publishListParams.communityId"
|
||||||
|
:tenant-id="publishListParams.tenantId"
|
||||||
@success="closePublishModal"
|
@success="closePublishModal"
|
||||||
/>
|
/>
|
||||||
</n-modal>
|
</n-modal>
|
||||||
|
|
|
@ -210,9 +210,9 @@ function copyToClipboard(text: string) {
|
||||||
<div class="min-h-screen bg-[#F7F8FA] px-10 py-6 flex gap-4">
|
<div class="min-h-screen bg-[#F7F8FA] px-10 py-6 flex gap-4">
|
||||||
<div class="bg-white rounded-lg flex-1">
|
<div class="bg-white rounded-lg flex-1">
|
||||||
<div class="flex justify-between items-center m-3 text-sm">
|
<div class="flex justify-between items-center m-3 text-sm">
|
||||||
<div class="bg-[#328afe] text-white px-3 py-1 rounded-sm cursor-pointer">
|
<!-- <div class="bg-[#328afe] text-white px-3 py-1 rounded-sm cursor-pointer">
|
||||||
分享星球
|
分享星球
|
||||||
</div>
|
</div> -->
|
||||||
<div class="relative flex items-center w-[300px]">
|
<div class="relative flex items-center w-[300px]">
|
||||||
<input
|
<input
|
||||||
v-model="params.searchContent"
|
v-model="params.searchContent"
|
||||||
|
|
|
@ -111,7 +111,12 @@ const qrUrl = ref('')
|
||||||
|
|
||||||
// 初始化获取支付二维码
|
// 初始化获取支付二维码
|
||||||
const paymentStatus = ref(1)
|
const paymentStatus = ref(1)
|
||||||
|
const isJoinModal = ref(false)
|
||||||
async function handleJoin() {
|
async function handleJoin() {
|
||||||
|
isJoinModal.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
async function onPositiveJoinClick() {
|
||||||
try {
|
try {
|
||||||
const data = {
|
const data = {
|
||||||
communityId: params.value.communityId,
|
communityId: params.value.communityId,
|
||||||
|
@ -119,25 +124,24 @@ async function handleJoin() {
|
||||||
}
|
}
|
||||||
const res = await request.post(`/community/join`, data)
|
const res = await request.post(`/community/join`, data)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
isJoinModal.value = false
|
||||||
message.success('加入成功')
|
message.success('加入成功')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
router.push(`/planet-detail?communityId=${params.value.communityId}&tenantId=${params.value.tenantId}`)
|
router.push(`/planet-detail?communityId=${params.value.communityId}&tenantId=${params.value.tenantId}`)
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err: any) {
|
||||||
if (err.code === 12202) {
|
if (err.code === 12202 && err.msg === '钱包余额不足,请充值') {
|
||||||
// isShowGoldPayment.value = true
|
|
||||||
showConfirmModal.value = true
|
showConfirmModal.value = true
|
||||||
}
|
}
|
||||||
// isShowGoldPayment.value = true
|
|
||||||
// if (goldPaymentRef.value) {
|
|
||||||
// goldPaymentRef.value.isVisible = true
|
|
||||||
// }
|
|
||||||
// console.log(err)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onNegativeJoinClick() {
|
||||||
|
isJoinModal.value = false
|
||||||
|
}
|
||||||
|
|
||||||
function closePayment() {
|
function closePayment() {
|
||||||
paymentModal.value = false
|
paymentModal.value = false
|
||||||
}
|
}
|
||||||
|
@ -393,6 +397,18 @@ async function getQrCode() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</n-modal>
|
</n-modal>
|
||||||
|
<!-- 是否加入弹框 -->
|
||||||
|
<n-modal
|
||||||
|
v-model:show="isJoinModal"
|
||||||
|
:mask-closable="false"
|
||||||
|
preset="dialog"
|
||||||
|
title="确认"
|
||||||
|
content="是否确认加入星球?"
|
||||||
|
positive-text="确认"
|
||||||
|
negative-text="算了"
|
||||||
|
@positive-click="onPositiveJoinClick"
|
||||||
|
@negative-click="onNegativeJoinClick"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue