Forráskód Böngészése

修改最近访问页面的样式

wangn 5 éve
szülő
commit
0d71fd93e0

+ 1 - 0
mallApp/src/components/app-tabbar.vue

@@ -78,6 +78,7 @@ export default {
   background-color: #fff;
   position: fixed;
   bottom: 0;
+  z-index: 9999;
   left: 0;
   display: flex;
   border-top: 1px solid #c0c4cc;

+ 1 - 1
mallApp/src/components/module/app-avatar.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="avatar-img" :class="{'radius': radius}" :style="{width: width + 'upx', height: width + 'upx', borderRadius: radius}">
-        <img :style="{width: width + 'upx', height: width + 'upx', borderRadius: radius}" :src="imgUrl" alt="头像">
+        <image :style="{width: width + 'upx', height: width + 'upx', borderRadius: radius}" :src="imgUrl" alt="头像"></image>
     </div>
 </template>
 

+ 72 - 60
mallApp/src/pages/home/recent.vue

@@ -1,24 +1,26 @@
 <template>
   <view class="latest-content_box">
-      <view class="shop-list_box">
-          <template v-if="!$util.isEmpty(list)">
-          <view 
-            :key="item.shopId"
-            @click="pageTo({
+    <view class="shop-list_box">
+      <template v-if="!$util.isEmpty(list)">
+        <view
+          :key="item.shopId"
+          @click="pageTo({
               url: '/pages/home/index?account='+item.shopId,
               type:4
             })"
-            v-for="item in list">
-            <app-avatar-module :src="item.shopImg" />
-            <view class="tit">
-              {{item.shopName}}
-            </view>
+          v-for="item in list"
+        >
+          <!-- <app-avatar-module :src="item.shopImg" /> -->
+          <image :src="item.shopImg"></image>
+          <view class="tit">
+            {{item.shopName}}
           </view>
-          </template>
-          <div v-else>
-            暂无数据
-          </div>
-      </view>
+        </view>
+      </template>
+      <div v-else>
+        暂无数据
+      </div>
+    </view>
   </view>
 </template>
 
@@ -26,69 +28,79 @@
 import { recentShop } from "@/api/user";
 import { share } from "@/mixins";
 import AppAvatarModule from "@/components/module/app-avatar";
-import {mapGetters} from 'vuex'
+import { mapGetters } from 'vuex'
 export default {
   name: "recent",
-  components: {AppAvatarModule},
+  components: { AppAvatarModule },
   mixins: [share],
-  data() {
+  data () {
     return {
-      list:[]
+      list: []
     };
   },
   computed: {
-		...mapGetters({ userInfo: "getUser" })
-	},
-  onLoad() {
+    ...mapGetters({ userInfo: "getUser" })
+  },
+  onLoad () {
 
   },
   methods: {
-    async init(){
-        try {
-          const { data } = await recentShop({})
-          this.list = data
-        } catch(e){
-        }   
+    async init () {
+      try {
+        const { data } = await recentShop({})
+        this.list = data
+      } catch (e) {
       }
+    }
   }
 };
 </script>
 
 <style lang="scss" scoped>
-  .shop-title_box {
-    color: #333333;
-    font-size: 30upx;
-    font-weight: 600;
-    padding: 48upx 0 80upx 40upx;
-  }
-  .shop-list_box {
-    padding:0 60upx;
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    flex-wrap: wrap;
-    & > view {
-      width: 120upx;
-      margin-bottom: 70upx;
-      & .tit {
-        text-align: center;
-        margin-top: 30upx;
-      }
+.shop-title_box {
+  color: #333333;
+  font-size: 30upx;
+  font-weight: 600;
+  padding: 48upx 0 80upx 40upx;
+}
+.shop-list_box {
+  padding: 0 60upx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  flex-wrap: wrap;
+  & > view {
+    width: 120upx;
+    margin-bottom: 70upx;
+    & > .tit {
+      vertical-align: middle;
+      display: inline-block;
+      text-align: center;
+      margin-top: 30upx;
+    }
+    & > image {
+      display: inline-block;
+      vertical-align: middle;
+      width: 100upx;
+      height: 100upx;
+      border-radius: 50%;
+      background: pink;
     }
   }
-  .app-footer {
-     font-size: 28upx;
-    & .des {
-      &  > text {
-        color: #3385FF;
-        display: inline-block;
-        margin-left: 3upx;
-      }
-      & .iconfont {
-        color: #3385FF;
-        font-size: 22upx;
-        margin-left: 2upx;
-      }
+}
+.app-footer {
+  font-size: 28upx;
+  & .des {
+    & > text {
+      color: #3385ff;
+      display: inline-block;
+      margin-left: 3upx;
+    }
+    & .iconfont {
+      color: #3385ff;
+      font-size: 22upx;
+      margin-left: 2upx;
     }
   }
+}
 </style>