Commit 32956a6e by levlin

Merge branch 'feature/shop' into test

parents 3c397461 9f0e8dd6
......@@ -2,6 +2,23 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [2.42.30](https://gitlab.aodianyun.com/live/web-live/compare/v2.42.28...v2.42.30) (2025-07-24)
### Features
* 竖屏直播开放app引流 ([74ae609](https://gitlab.aodianyun.com/live/web-live/commit/74ae6091f4f66eb9744d3a7d52d2b3925200b9a8))
* 修改观看人数系列显示逻辑 ([b87558c](https://gitlab.aodianyun.com/live/web-live/commit/b87558ce0392c456391dcd1d085da2c61c8efa34))
### [2.42.29](https://gitlab.aodianyun.com/live/web-live/compare/v2.42.26...v2.42.29) (2025-07-07)
### Features
* 聊天时间显示逻辑矫正 ([5cbcbda](https://gitlab.aodianyun.com/live/web-live/commit/5cbcbda9b93bd3d100ec1e8f87db3a2b0191e78f))
* 修改观看人数系列显示逻辑 ([b87558c](https://gitlab.aodianyun.com/live/web-live/commit/b87558ce0392c456391dcd1d085da2c61c8efa34))
* pc同步播单超出动画 ([587caa3](https://gitlab.aodianyun.com/live/web-live/commit/587caa3c40e24ba7356e2b309e5fa4b9b77ceac9))
### [2.42.28](https://gitlab.aodianyun.com/live/web-live/compare/v2.42.22...v2.42.28) (2025-06-20)
......
......@@ -15,17 +15,34 @@
<div class="name">
<div class="type" v-if="info.type == 2">
<div class="tag">
{{ info.source == 1 ? '外链' : info.source == 2 ? '口令' : '' }}
{{
info.source == 1 ? '外链' : info.source == 2 ? '口令' : ''
}}
</div>
</div>{{ info.name }}
</div>
{{ info.name }}
</div>
<div class="price-box">
<div class="icon"></div>
<span class="price">{{ info.price }}</span>
<span class="shop_price" v-if="info.shop_price">
<template v-if="info.specialPrice">
<span class="price">{{ info.price }}</span>
<div class="icon right"></div>
<span class="special-price">+</span>
<span class="special-price">{{ splitSpecialPrice(info.specialPrice) }}</span>
<span class="icon right">{{ splitSpecialPriceUnit(info.specialPrice) }}</span>
<span class="shop_price" v-if="info.shop_price">
<div class="icon"></div>
{{ info.shop_price }}
</span>
</template>
<template v-else>
<div class="icon"></div>
{{ info.shop_price }}
</span>
<span class="price">{{ info.price }}</span>
<span class="shop_price" v-if="info.shop_price">
<div class="icon"></div>
{{ info.shop_price }}
</span>
</template>
</div>
</div>
<div class="pay">
......@@ -61,7 +78,7 @@ export default {
} else {
return '去看看'
}
}
},
},
mounted() {
this.getRecommendGoods()
......@@ -168,6 +185,18 @@ export default {
close() {
this.info = {}
},
// 提取特价中的数字部分
splitSpecialPrice(specialPrice) {
if (!specialPrice) return ''
const match = specialPrice.match(/^(\d+(?:\.\d+)?)/)
return match ? match[1] : ''
},
// 提取特价中的单位部分
splitSpecialPriceUnit(specialPrice) {
if (!specialPrice) return ''
const match = specialPrice.match(/^(\d+(?:\.\d+)?)(.+)$/)
return match ? match[2] : ''
},
},
beforeDestroy() {
this.$Bus.$off('bus-editShop', this.editShop)
......@@ -249,6 +278,18 @@ export default {
transform: scale(0.8);
display: inline-block;
font-weight: 500;
&.right{
font-size: 0.12rem;
margin-left: -0.05rem;
margin-right: 0;
}
}
.special-price{
color: #ee3636;
font-size: 0.13rem;
display: inline-block;
margin-left: -0.05rem;
font-weight: 500;
}
.price {
color: #ee3636;
......
......@@ -23,7 +23,14 @@
</div>
</div>
<div class="name">{{ caseInfo.goodsInfo.name }}</div>
<div class="price">
<div class="price" v-if="caseInfo.goodsInfo.specialPrice">
<div>{{ caseInfo.goodsInfo.price || caseInfo.goodsInfo.shop_price }}</div>
<div class="unit-text"></div>
<div class="special-price">+</div>
<div class="special-price">{{ splitSpecialPrice(caseInfo.goodsInfo.specialPrice) }}</div>
<div class="unit-text">{{ splitSpecialPriceUnit(caseInfo.goodsInfo.specialPrice) }}</div>
</div>
<div class="price" v-else>
<div class="small"></div>
<div>{{ ((caseInfo.goodsInfo.price || caseInfo.goodsInfo.shop_price) + '').split('.')[0] }}</div>
<div class="small">{{ ((caseInfo.goodsInfo.price || caseInfo.goodsInfo.shop_price) + '').split('.')[1] ? '.' + ((caseInfo.goodsInfo.price || caseInfo.goodsInfo.shop_price) + '').split('.')[1] : '' }}</div>
......@@ -35,7 +42,7 @@
<img :src="openIcon" alt="">
</div>
</div>
</div>
</div>
<transition name="fade">
<div class="shop-link-box" v-transfer-dom v-if="isShow && caseInfo.goodsInfo.source == 1">
<source-link v-model="isShow" :content="caseInfo.goodsInfo.sourceContent"></source-link>
......@@ -95,7 +102,11 @@ export default {
},
_enterMarket() {
if (this.caseInfo.goodsInfo.type === 2){
this.isShow = !this.isShow
if (+this.caseInfo.goodsInfo.showPromptBox === 1 ){
this.isShow = !this.isShow
} else {
window.location.href = this.caseInfo.goodsInfo.sourceContent
}
} else {
this.$emit('enterMarket', `/showcase?uin=${this.channelInfo.uin}&caseId=${this.caseInfo.caseId}&goodsId=${this.caseInfo.goodsInfo ? this.caseInfo.goodsInfo.id : ''}`)
}
......@@ -109,7 +120,19 @@ export default {
if (data.goodInfo.id === String(this.caseInfo.goodsInfo.id)) {
this.$store.dispatch('set_tobeSaleShop', data.goodInfo.saleStatus, data.goodInfo.saleTime)
}
}
},
// 提取特价中的数字部分
splitSpecialPrice(specialPrice) {
if (!specialPrice) return ''
const match = specialPrice.match(/^(\d+(?:\.\d+)?)/)
return match ? match[1] : ''
},
// 提取特价中的单位部分
splitSpecialPriceUnit(specialPrice) {
if (!specialPrice) return ''
const match = specialPrice.match(/^(\d+(?:\.\d+)?)(.+)$/)
return match ? match[2] : ''
},
},
watch: {
open(newVal) {
......@@ -329,6 +352,13 @@ export default {
transform: scale(0.8);
transform-origin: 0 100% 0;
padding-left: 0.02rem;
}
.unit-text{
transform: scale(0.8);
padding-left: 0.02rem;
}
.special-price{
margin-left: .02rem;
}
}
}
......
......@@ -102,6 +102,10 @@ export default {
} else if (obj.type === 2) {
this.sourceType = obj.source;
this.sourceContent = obj.sourceContent;
if (+obj.showPromptBox === 0 && this.sourceType === 1){
window.location.href = this.sourceContent
return
}
}
this.linkisShow = true;
},
......@@ -117,18 +121,21 @@ export default {
parentLogin() {
this.$Bus.$emit('bus-showLogin');
},
sourceLinkShop(sourceContent) {
// 来自iframe的调用 switchPostMessage
sourceLinkShop(goodsItemInfo) {
this._showDetails({
type: 2,
source: 1,
sourceContent
sourceContent: goodsItemInfo.sourceContent,
showPromptBox: goodsItemInfo.showPromptBox
})
},
sourceCommandShop(sourceContent) {
// 来自iframe的调用 switchPostMessage
sourceCommandShop(goodsItemInfo) {
this._showDetails({
type: 2,
source: 2,
sourceContent
sourceContent: goodsItemInfo.sourceContent,
})
},
payShop(res) {
......
{
"name": "web-live-v2",
"version": "2.42.28",
"version": "2.42.30",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "web-live-v2",
"version": "2.42.28",
"version": "2.42.30",
"dependencies": {
"@easy-messenger/server-connection": "^1.0.3",
"@gdyfe/gdy-component-lib": "^0.4.1",
{
"name": "web-live-v2",
"version": "2.42.28",
"version": "2.42.30",
"description": "现场直播",
"private": true,
"scripts": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment