Browse Source

修复高级筛选弹窗滚动问题和添加电话号码复制功能

Xfy
Default User 1 week ago
parent
commit
3fde4b86ad
  1. 22
      pages/goods-detail/goods-detail.js
  2. 2
      pages/goods-detail/goods-detail.wxml
  3. 4
      pages/index/index.wxml
  4. 2
      pages/index/index.wxss

22
pages/goods-detail/goods-detail.js

@ -885,6 +885,28 @@ Page({
// 阻止点击弹窗内容时关闭弹窗
},
// 复制电话号码
copyPhone: function(e) {
const phone = e.currentTarget.dataset.phone;
if (phone) {
wx.setClipboardData({
data: phone,
success: function(res) {
wx.showToast({
title: '电话已复制',
icon: 'success'
});
},
fail: function() {
wx.showToast({
title: '复制失败',
icon: 'none'
});
}
});
}
},
// 隐藏讲价弹窗
hideBargainModal() {
this.setData({

2
pages/goods-detail/goods-detail.wxml

@ -206,7 +206,7 @@
<view class="viewer-item">
<view class="viewer-header">
<text class="viewer-name">{{item.nickName || '未知用户'}}</text>
<text class="viewer-phone">{{item.phoneNumber || '暂无电话'}}</text>
<text class="viewer-phone" bindlongpress="copyPhone" data-phone="{{item.phoneNumber}}">{{item.phoneNumber || '暂无电话'}}</text>
</view>
<!-- 跟进记录 -->

4
pages/index/index.wxml

@ -1,6 +1,6 @@
<view class="container" catchtouchmove="stopPropagation">
<view class="container">
<view class="top-section-container" catchtouchmove="stopPropagation">
<view class="top-section-container">
<!-- 搜索区域 -->
<view class="search-section" style="height: 100rpx; display: block; box-sizing: border-box">
<view class="search-bar" style="width: 693rpx; display: flex; box-sizing: border-box; position: relative; left: 0rpx; top: 19rpx">

2
pages/index/index.wxss

@ -2273,6 +2273,7 @@ video.product-media {
width: 30%;
background-color: #f5f5f5;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
.filter-category-item {
@ -2297,6 +2298,7 @@ video.product-media {
overflow-y: auto;
height: 100%;
max-height: 600rpx;
-webkit-overflow-scrolling: touch;
}
.filter-options {

Loading…
Cancel
Save