Explorar el Código

五常h5地址栏修改

zhangjinxing hace 3 años
padre
commit
74ca78b95f

+ 3 - 1
src/assets/css/index.css

@@ -57,7 +57,9 @@
     /* color: rgb(255, 131, 39)!important; */
     color: #1A1A1A;
   }
-
+  .van-tabbar-item.van-tabbar-item--active{
+    color:#F4D022;
+  }
   .van-address-item .van-radio__icon--checked .van-icon{
       /* background: rgb(255, 131, 39)!important; */
       /* border-color: rgb(255, 131, 39)!important; */

BIN
src/assets/images/home/addr-null.png


BIN
src/assets/images/home/live-active.png


BIN
src/assets/images/home/my-active.png


BIN
src/assets/images/home/product-active.png


BIN
src/assets/images/my/my-active.png


+ 0 - 0
src/assets/images/my/product@2x.png → src/assets/images/product/product-active.png


BIN
src/assets/images/product/unit2.png


+ 4 - 1
src/layout/index.vue

@@ -7,7 +7,7 @@
       v-model="active"
       safe-area-inset-bottom
       placeholder
-      active-color="#FD762D"
+      active-color="#F4D022"
       inactive-color="#B8BDC5"
       route
     >
@@ -87,6 +87,9 @@ export default {
 .layout {
   @include layout-dev;
 }
+ .van-hairline--top-bottom.van-tabbar.van-tabbar--fixed /deep/ .van-tabbar-item.van-tabbar-item--active{
+    color:#F4D022;
+  }
 // @import "~@/styles/mixin.scss";
 // @import "~@/styles/variables.scss";
 

+ 31 - 5
src/views/address/index.vue

@@ -12,12 +12,17 @@
     <van-address-list
       v-model="chosenAddressId"
       :list="list"
-      default-tag-text="默认"
       :disabled-list="[]"
       @add="onAdd"
       @select="onSelect"
       @edit="onEdit"
     />
+    <div class="addr-null"
+    v-show="isShowAddrNull"
+    >
+      <img src="@/assets/images/home/addr-null.png" alt="">
+      <div class="addr-null-title">暂无地址~</div>
+    </div>
     <div
       class="addmore"
       v-if="total > 0 && list.length < total && list.length > 0"
@@ -39,6 +44,7 @@ export default {
   mixins: [resToken],
   data() {
     return {
+      isShowAddrNull:true,
       delId: "",
       chosenAddressId: "",
       isRes: this.$route.query.id ? this.$route.query.id : "0",
@@ -138,7 +144,6 @@ export default {
     },
     async searchList() {
       if (!this.loading) {
-        console.log(this.chosenAddressId);
         if (this.parmValue.page === 1) {
           this.list = [];//如果没有在加载中且当前页数是1,清空list列表,防止造成上次的地址残留
         }
@@ -156,7 +161,13 @@ export default {
             return v1;
           });
           this.list.push(...arr);//把arr数组解构放到list列表渲染
-          console.log(this.list);
+          console.log(this.list.length);
+          console.log(this.isShowAddrNull);
+          if(this.list.length != 0){
+            this.isShowAddrNull = false;
+          }else{
+            this.isShowAddrNull = true;
+          }
           if (this.chosenAddressId === "" && this.list.length > 0) {
             this.chosenAddressId = this.list[0].id;
           }
@@ -292,7 +303,22 @@ export default {
   color: #1A1A1A;
   line-height: 26px;
 }
-.van-icon.van-icon-arrow-left.van-nav-bar__arrow{
-  color: #1A1A1A;
+//空地址时候的样式
+.addr-null{
+  width: 73px;
+  height: 102px;
+  box-sizing: border-box;
+  position: fixed;
+  left: 130px;
+  top: 150px;
+  text-align: center;
+  font-size: 12px;
+  font-weight: 400;
+  color: #959595;
+  // line-height: 7px;
+  img{
+    width: 100%;
+    padding-bottom:10px;
+  }
 }
 </style>

+ 1 - 6
src/views/product/index.vue

@@ -317,12 +317,6 @@ export default {
         }
       }
     }
-    // margin: 17px 0 15px 0;
-    // background: #f7f7f7;
-    // border-radius: 10px;
-    // color: #333;
-    // padding: 20px 0;
-    // text-align: center;
   }
   .item-ad {
     position: relative;
@@ -373,4 +367,5 @@ export default {
     }
   }
 }
+
 </style>