shish 10 months ago
parent
commit
a000fdb44b
1 changed files with 30 additions and 17 deletions
  1. 30 17
      mallApp/src/components/app-delivery.vue

+ 30 - 17
mallApp/src/components/app-delivery.vue

@@ -56,12 +56,11 @@
       </tui-list-cell>
 
       <tui-list-cell class="line-cell" :hover="false">
-        <div class="none-name-delivery flex-center" style="padding-left:0upx;">
-          <div class="tui-title">匿名派送</div>
-            <checkbox-group @change="anonymityChange">
-                <checkbox class="ljd-checkbox" value="1" id="noneNameText" ></checkbox>
-                <label for="noneNameText" class="none-name-text">需要请勾选</label>
-            </checkbox-group>
+        <div class="tui-title">派送方式</div>
+        <div class="delivery-mode-wrapper">
+          <switch :checked="form.anonymity == 1" @change="anonymityChange" color="#ff6b35" />
+          <span v-if="form.anonymity == 0" class="mode-text normal">不匿名</span>
+          <span v-else class="mode-text anonymous">要匿名</span>
         </div>
       </tui-list-cell>
 
@@ -177,7 +176,7 @@ export default {
       this.$emit("countFreight")
     },
     anonymityChange(e) {
-      this.form.anonymity = e.detail.value == 1 ? 1 : 0;
+      this.form.anonymity = e.detail.value ? 1 : 0;
     },
     // 省市联动
     openAddres() {
@@ -251,16 +250,30 @@ export default {
     }
   }
 
-  // 匿名派送
-  .none-name-delivery {
-    // padding-left: 30upx;
-    // padding: 26upx 30upx;
-    // margin-top: 40upx;
-    margin-bottom: 20upx;
-    background-color: #fff;
-    .none-name-text {
-      margin-left: 14upx;
-      color: $fontColor2;
+  // 派送方式选择器样式
+  .delivery-mode-wrapper {
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+    
+    .mode-text {
+      font-size: 40upx;
+      margin-left: 10upx;
+      transition: color 0.3s ease;
+      &.normal {
+        // 不匿名 - 使用页面常规颜色
+        color: #666666;
+      }
+      
+      &.anonymous {
+        // 匿名 - 使用显眼颜色
+        color: #ff6b35;
+        font-weight: bold;
+      }
+    }
+    
+    switch {
+      transform: scale(0.8);
     }
   }