|
|
@@ -0,0 +1,95 @@
|
|
|
+<template>
|
|
|
+ <view class="latest-content_box">
|
|
|
+ <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>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ <div v-else>
|
|
|
+ 暂无数据
|
|
|
+ </div>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { recentShop } from "@/api/user";
|
|
|
+import { share } from "@/mixins";
|
|
|
+import AppAvatarModule from "@/components/module/app-avatar";
|
|
|
+import {mapGetters} from 'vuex'
|
|
|
+export default {
|
|
|
+ name: "recent",
|
|
|
+ components: {AppAvatarModule},
|
|
|
+ mixins: [share],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ list:[]
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({ userInfo: "getUser" })
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async init(){
|
|
|
+ console.log(111111111111)
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .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>
|