sunChengjie 1 年間 前
コミット
e011724f52
2 ファイル変更16 行追加2 行削除
  1. 1 1
      src/pages/login.vue
  2. 15 1
      src/pages/new/sign.vue

+ 1 - 1
src/pages/login.vue

@@ -68,7 +68,7 @@ export default {
 				localStorage.setItem("courierId", res.userId);
 				this.$router.push({ path: '/' });
 			} else {
-				Toast('登录失败!');
+				Toast(res.message);
 			}
 
 			//发送失败

+ 15 - 1
src/pages/new/sign.vue

@@ -1,7 +1,7 @@
 <template>
     <div>
         <div class="container">
-            <van-search @search="check" v-model="value" placeholder="请输入快递单号" />
+            <van-search @search="check" ref="searchRef" class="search" v-model="value" placeholder="请输入快递单号" />
             <img @click="onImg" src="@/assets/user/u4.png" alt="">
 
             <!-- <van-button style="width: 200px; border-radius: 6px; margin-left: 10px;" type="info"
@@ -28,6 +28,14 @@ export default {
             signList: []
         };
     },
+    mounted() {
+        this.$nextTick(() => {
+            if (this.$refs.searchRef) {
+                const inputEle = this.$refs.searchRef.querySelector("input")
+                inputEle.focus()
+            }
+        })
+    },
     methods: {
         onImg() {
 
@@ -94,5 +102,11 @@ export default {
         right: 22px;
         top: 18px;
     }
+
+    .search {
+        /deep/ .van-icon-clear.van-field__clear {
+            margin-right: 22px;
+        }
+    }
 }
 </style>