Ver código fonte

fix 优化点击“>”进入编辑页面,其他区域为选中地址

ylong 6 meses atrás
pai
commit
a76e2ef5a1

+ 24 - 3
pages-mine/components/address-card.vue

@@ -10,7 +10,7 @@
         </view>
 
         <!-- 主要内容区 -->
-        <view class="content flex-a" @click="updateAddress">
+        <view class="content flex-a" @click="handleClick">
             <image src="/pages-mine/static/adderss.png" style="width: 40rpx; height: 40rpx"></image>
 
             <view class="flex-1 mr-40 ml-24 flex-d">
@@ -25,7 +25,9 @@
             </view>
 
             <!-- 右侧箭头 -->
-            <u-icon name="arrow-right" size="32" color="#999"></u-icon>
+            <view class="arrow-container" @tap.stop="updateAddress">
+                <u-icon name="arrow-right" size="32" color="#999"></u-icon>
+            </view>
         </view>
 
         <!-- 底部操作区 -->
@@ -77,7 +79,16 @@ export default {
         },
 
         //更新地址
-        updateAddress() {
+        updateAddress(event) {
+            // 微信小程序中阻止事件冒泡
+            if (event) {
+                event.stopPropagation();
+                event.preventDefault();
+                // 微信小程序特有的事件阻止方法
+                if (event.detail && event.detail.stopPropagation) {
+                    event.detail.stopPropagation();
+                }
+            }
             uni.navigateTo({
                 url: "/pages-mine/pages/address/add-or-update?id=" + this.address.id,
             });
@@ -167,5 +178,15 @@ export default {
         padding-top: 20rpx;
         border-top: 1rpx solid #eeeeee;
     }
+
+    .arrow-container {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        padding: 10rpx;
+        // 确保点击区域足够大,避免误触
+        min-width: 60rpx;
+        min-height: 60rpx;
+    }
 }
 </style>

+ 9 - 0
pages-mine/pages/setting.vue

@@ -15,11 +15,20 @@
                 <!-- 头像 -->
                 <u-form-item label="头像">
                     <view class="value avatarbox">
+                        <!-- #ifdef MP-WEIXIN -->
                         <button style="flex: none;" open-type="chooseAvatar" class="avatarBtn"
                             @chooseavatar="onChooseavatar">
                             <u-avatar shape="circle" style="height: 72rpx;" size="72"
                                 :src="userInfo.imgPath"></u-avatar>
                         </button>
+                        <!-- #endif -->
+                        <!-- #ifdef MP-ALIPAY -->
+                        <button style="flex: none;" open-type="chooseAvatar" class="avatarBtn"
+                        onChooseAvatar="onChooseavatar">
+                            <u-avatar shape="circle" style="height: 72rpx;" size="72"
+                                :src="userInfo.imgPath"></u-avatar>
+                        </button>
+                        <!-- #endif -->
                     </view>
                 </u-form-item>
 

+ 1 - 1
pages/home/index.vue

@@ -87,7 +87,7 @@
         </common-dialog>
 
         <!-- 温馨提示弹窗 -->
-        <KindReminder ref="kindReminder" @start="handleStartSelling" @viewRules="handleViewRules" />
+        <KindReminder ref="kindReminder" @start="handleStartSelling" />
 
         <!-- 客服按钮 -->
         <FloatingDrag :width="126" :height="140" :initial-position="servicePosition"