注释搜索:主播发送消息

观看列表只能主播跟管理员查看
This commit is contained in:
cbb
2026-02-10 17:49:33 +08:00
parent 2cc252dce0
commit 20ccbf1f14
19 changed files with 190 additions and 67 deletions

View File

@@ -1,6 +1,11 @@
<script setup>
import { onLoad, onShow } from '@dcloudio/uni-app'
import { getProductDetail, addOrder, createOrder } from '@/api/mall'
import {
getProductDetail,
addOrder,
addOrderItem,
createOrder
} from '@/api/mall'
import { reactive, ref } from 'vue'
import { formatRMB } from '@/utils'
import { getUserAddress } from '@/api'
@@ -86,13 +91,13 @@
const getData = async productId => {
const res = await getProductDetail(productId)
viewData.value = res.data
const {
id,
price,
stockQuantity,
originalPrice: nub
} = res.data.skuList[0]
originalPrice.value = nub
formData.maxNum = stockQuantity
formData.spec = id
@@ -142,15 +147,19 @@
skuId: formData.spec
}
tixian.value.close()
if (formData.startGroup) {
const res = await addOrder(data)
await refreshUserInfo()
await showToast('订单提交成功', 'success')
const isApiShow = formData.startGroup
let api = null
if (isApiShow) {
api = data.groupId ? addOrderItem : addOrder
} else {
api = createOrder
}
const res = await api(data)
await refreshUserInfo()
await showToast('订单提交成功', 'success')
if (isApiShow) {
navigateTo('/pages/shop-together/detail', { id: res.data.groupId })
} else {
const res = await createOrder(data)
await refreshUserInfo()
await showToast('订单提交成功', 'success')
navigateBack()
}
}
@@ -163,7 +172,6 @@
// groupId
groupId.value = e?.groupId || ''
console.log(e?.groupId, '===')
formData.startGroup = !!e?.groupId
await getData(e.productId)
})
</script>
@@ -268,9 +276,10 @@
></image>
</view>
</view>
<!--
v-if="groupId" -->
<view
v-if="groupId"
v-if="!groupId"
class="pay-way-item"
@click="formData.startGroup = !formData.startGroup"
>