chore:立即咨询点击会弹出对话框
This commit is contained in:
@@ -460,11 +460,11 @@
|
|||||||
<ns-goods-action-icon :text="$lang('follow')" :icon="whetherCollection == 1 ? 'icon-likefill color-base-text' : 'icon-guanzhu'" @click="editCollection" />
|
<ns-goods-action-icon :text="$lang('follow')" :icon="whetherCollection == 1 ? 'icon-likefill color-base-text' : 'icon-guanzhu'" @click="editCollection" />
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<block v-if="goodsSkuDetail.isinformation >= 1">
|
<block v-if="goodsSkuDetail.isinformation >= 1">
|
||||||
|
|
||||||
<ns-goods-action-button v-if="goodsSkuDetail.isinformation == 1" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="sendToAIChat(goodsSkuDetail)" text="立即咨询" :disabled="false" />
|
<ns-goods-action-button v-if="goodsSkuDetail.isinformation == 1" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="sendToAIChat(goodsSkuDetail)" text="立即咨询" :disabled="false" />
|
||||||
<ns-goods-action-button v-if="goodsSkuDetail.isinformation == 2" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="showinformation" text="立即咨询" :disabled="false" />
|
<ns-goods-action-button v-if="goodsSkuDetail.isinformation == 2" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="showinformation" text="立即咨询" :disabled="false" />
|
||||||
<!-- <ns-goods-action-button v-if="goodsSkuDetail.isinformation == 2" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="buyNow" text="商品留言" :disabled="false" /> -->
|
<!-- <ns-goods-action-button v-if="goodsSkuDetail.isinformation == 2" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="buyNow" text="商品留言" :disabled="false" /> -->
|
||||||
|
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<block v-if="goodsSkuDetail.stock == 0 && !goodsSkuDetail.sku_spec_format">
|
<block v-if="goodsSkuDetail.stock == 0 && !goodsSkuDetail.sku_spec_format">
|
||||||
@@ -514,6 +514,19 @@
|
|||||||
|
|
||||||
<!-- 隐私弹窗 -->
|
<!-- 隐私弹窗 -->
|
||||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
<privacy-popup ref="privacyPopup"></privacy-popup>
|
||||||
|
|
||||||
|
<!-- 联系电话弹窗 -->
|
||||||
|
<uni-popup ref="contactPopup" type="center">
|
||||||
|
<view class="contact-popup">
|
||||||
|
<view class="contact-content">
|
||||||
|
<text class="contact-text">可在手机端拨打 021-51815181</text>
|
||||||
|
</view>
|
||||||
|
<view class="contact-buttons">
|
||||||
|
<button class="contact-btn cancel-btn" @click="closeContactPopup">取消</button>
|
||||||
|
<button class="contact-btn copy-btn" @click="copyPhoneNumber">复制到剪切板</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -537,23 +550,35 @@ export default {
|
|||||||
* @param {Object} item 商品信息
|
* @param {Object} item 商品信息
|
||||||
*/
|
*/
|
||||||
sendToAIChat(item) {
|
sendToAIChat(item) {
|
||||||
const productInfo = {
|
this.$refs.contactPopup.open();
|
||||||
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 || ''
|
*/
|
||||||
}
|
closeContactPopup() {
|
||||||
|
this.$refs.contactPopup.close();
|
||||||
uni.setStorageSync('selectedProduct', productInfo)
|
},
|
||||||
|
|
||||||
uni.navigateTo({
|
/**
|
||||||
url: '/pages_tool/ai-chat/index'
|
* 复制电话号码到剪切板
|
||||||
})
|
*/
|
||||||
|
copyPhoneNumber() {
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: '021-51815181',
|
||||||
|
success: () => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '复制成功',
|
||||||
|
icon: 'success'
|
||||||
|
});
|
||||||
|
this.closeContactPopup();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '@/common/css/goods_detail.scss';
|
@import '@/common/css/goods_detail.scss';
|
||||||
@import './public/css/detail.scss';
|
@import './public/css/detail.scss';
|
||||||
@@ -565,6 +590,57 @@ export default {
|
|||||||
z-index: 999;
|
z-index: 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.contact-popup {
|
||||||
|
width: 600rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-content {
|
||||||
|
padding: 60rpx 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-text {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-buttons {
|
||||||
|
display: flex;
|
||||||
|
border-top: 1px solid #eeeeee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-btn {
|
||||||
|
flex: 1;
|
||||||
|
height: 90rpx;
|
||||||
|
line-height: 90rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 30rpx;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-btn::after {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cancel-btn {
|
||||||
|
color: #666666;
|
||||||
|
background: #f5f5f5;
|
||||||
|
border-right: 1px solid #eeeeee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.copy-btn {
|
||||||
|
color: #ffffff;
|
||||||
|
background: #54c952;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
::v-deep .action-icon-wrap .iconfont.icon-shouye1 {
|
::v-deep .action-icon-wrap .iconfont.icon-shouye1 {
|
||||||
|
|||||||
Reference in New Issue
Block a user