chore:跳转智能客服的更多详情按钮放到商品页面里面
This commit is contained in:
@@ -120,10 +120,7 @@
|
||||
<text>{{ showMarketPrice(item) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ai-chat-btn" @tap.stop="sendToAIChat(item)">
|
||||
<text class="iconfont">🤖</text>
|
||||
<text>更多详情</text>
|
||||
</view>
|
||||
|
||||
<!-- <view class="right-wrap" v-if="value.template == 2 || value.template == 4">
|
||||
<block v-if="item.is_virtual">
|
||||
<view class="color-base-bg select-sku" @tap.stop="toDetail(item)">立即购买</view>
|
||||
@@ -216,10 +213,7 @@
|
||||
<text>{{ showMarketPrice(item) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ai-chat-btn" @tap.stop="sendToAIChat(item)">
|
||||
<text class="iconfont">🤖</text>
|
||||
<text>更多详情</text>
|
||||
</view>
|
||||
|
||||
<view class="right-wrap" v-if="value.template == 2">
|
||||
<block v-if="item.is_virtual">
|
||||
<view class="color-base-bg select-sku" @tap.stop="toDetail(item)">立即购买</view>
|
||||
@@ -1412,27 +1406,5 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.ai-chat-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8rpx;
|
||||
padding: 8rpx 16rpx;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
border-radius: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
margin-top: 10rpx;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.95);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -94,6 +94,11 @@
|
||||
<text v-if="goodsSkuDetail.stock_show">{{$lang('stock')}}: {{ goodsSkuDetail.stock +goodsSkuDetail.unit}}</text>
|
||||
<text v-if="goodsSkuDetail.sale_show">{{$lang('sales')}}: {{ goodsSkuDetail.sale_num+goodsSkuDetail.unit }}</text>
|
||||
</view>
|
||||
|
||||
<view class="ai-chat-btn" @tap.stop="sendToAIChat(goodsSkuDetail)">
|
||||
<text class="iconfont">🤖</text>
|
||||
<text>更多详情</text>
|
||||
</view>
|
||||
<!-- 会员卡 -->
|
||||
<!-- <view class="member-card-wrap" @click="$util.redirectTo('/pages_tool/member/card_buy')" v-if="membercard">
|
||||
<text class="iconfont icon-huiyuan"></text>
|
||||
@@ -531,7 +536,28 @@ export default {
|
||||
goodsDetailView,
|
||||
nsGoodsPromotion
|
||||
},
|
||||
mixins: [base, detail, scroll]
|
||||
mixins: [base, detail, scroll],
|
||||
methods: {
|
||||
/**
|
||||
* 发送商品信息到智能客服
|
||||
* @param {Object} item 商品信息
|
||||
*/
|
||||
sendToAIChat(item) {
|
||||
const productInfo = {
|
||||
goods_id: item.goods_id,
|
||||
goods_name: item.goods_name,
|
||||
price: item.discount_price || item.member_price || item.price,
|
||||
image: item.sku_image,
|
||||
category_id: item.category_id
|
||||
}
|
||||
|
||||
uni.setStorageSync('selectedProduct', productInfo)
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages_tool/ai-chat/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@@ -640,4 +666,28 @@ export default {
|
||||
height: 72rpx;
|
||||
line-height: 72rpx;
|
||||
}
|
||||
|
||||
.ai-chat-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8rpx;
|
||||
padding: 8rpx 16rpx;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
border-radius: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
margin-top: 10rpx;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.ai-chat-btn:active {
|
||||
transform: scale(0.95);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.ai-chat-btn .iconfont {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user