2020-06-10 08:06:01 +00:00
|
|
|
|
<template>
|
|
|
|
|
<view class="merchant">
|
|
|
|
|
<view v-if="show">
|
|
|
|
|
<view>
|
|
|
|
|
<image></image>
|
|
|
|
|
<view>消息</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view>
|
|
|
|
|
<image></image>
|
|
|
|
|
<view>首页</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view>
|
|
|
|
|
<image></image>
|
|
|
|
|
<view>我的</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2020-07-21 13:01:42 +00:00
|
|
|
|
<view class="top" :style="{'background-image':'url(' + info.store_banner + ')'}">
|
|
|
|
|
<image :src="info.store_avatar"></image>
|
2020-06-10 08:06:01 +00:00
|
|
|
|
<view class="info">
|
2020-07-21 13:01:42 +00:00
|
|
|
|
<view class="name u-line-1">{{info.store_name}}</view>
|
|
|
|
|
<view class="num">粉丝数:{{info.store_collect}}</view>
|
2020-06-10 08:06:01 +00:00
|
|
|
|
</view>
|
|
|
|
|
<view class="btn">
|
|
|
|
|
<image></image>
|
|
|
|
|
<view>{{ 0 ? "关注" : "已关注" }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="follow">
|
|
|
|
|
<view class="title">关注</view>
|
|
|
|
|
<scroll-view scroll-x class="list">
|
|
|
|
|
<view class="list-items">
|
|
|
|
|
<view v-for="(item, index) in 9" :key="index" class="item">
|
|
|
|
|
<image></image>
|
|
|
|
|
<view class="nickname u-line-1">用户昵称</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</scroll-view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="main">
|
|
|
|
|
<view class="classify" v-if="cur==0">
|
2020-07-06 01:10:34 +00:00
|
|
|
|
<view v-for="item in indextop" :key="item.id">
|
|
|
|
|
<videoTop :url="item.url" v-if="item.type == 2"></videoTop>
|
|
|
|
|
<imageTop v-else :url="item.url"></imageTop>
|
|
|
|
|
</view>
|
|
|
|
|
<view style="display: flex;flex-wrap: wrap;">
|
|
|
|
|
<listitem :style="{'margin-left': index%2 == 1 ? '20rpx':'0'}" v-for="(item,index) in indexlist" :key="item.id" :type="item.type" :url="item.url"></listitem>
|
|
|
|
|
</view>
|
|
|
|
|
|
2020-06-10 08:06:01 +00:00
|
|
|
|
</view>
|
2020-07-02 07:40:01 +00:00
|
|
|
|
<!-- 商品筛选排序未完成 -->
|
2020-07-02 07:39:25 +00:00
|
|
|
|
<view class="item" v-if="cur==1">
|
|
|
|
|
<item v-for="item in list" :key="item.gc_id" :info="item" class="item"></item>
|
2020-06-10 08:06:01 +00:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="tabbar">
|
|
|
|
|
<view @click="cur=0">
|
|
|
|
|
<image></image>
|
|
|
|
|
<view>商品分类</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view @click="cur=1">
|
|
|
|
|
<image></image>
|
|
|
|
|
<view>商品列表</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view @click="toDetailsPage">
|
|
|
|
|
<image></image>
|
|
|
|
|
<view>店铺信息</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view>
|
|
|
|
|
<image></image>
|
|
|
|
|
<view>联系客服</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
2020-07-02 07:39:25 +00:00
|
|
|
|
import item from "@/components/shop/list/item"
|
2020-07-06 01:10:34 +00:00
|
|
|
|
import videoTop from "../components/merchant/video-top"
|
|
|
|
|
import imageTop from "../components/merchant/image-top"
|
|
|
|
|
import listitem from "../components/merchant/list-item"
|
|
|
|
|
|
2020-06-10 08:06:01 +00:00
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
show: false,
|
2020-07-02 07:39:25 +00:00
|
|
|
|
cur: 0,
|
2020-07-06 01:10:34 +00:00
|
|
|
|
list:[],
|
|
|
|
|
indexlist:[],
|
2020-07-21 13:01:42 +00:00
|
|
|
|
indextop:[],
|
|
|
|
|
info:{}
|
2020-06-10 08:06:01 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
2020-07-02 07:39:25 +00:00
|
|
|
|
components:{
|
2020-07-06 01:10:34 +00:00
|
|
|
|
item,
|
|
|
|
|
videoTop,
|
|
|
|
|
imageTop,
|
|
|
|
|
listitem
|
2020-07-02 07:39:25 +00:00
|
|
|
|
},
|
2020-06-10 08:06:01 +00:00
|
|
|
|
methods: {
|
|
|
|
|
toDetailsPage() {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: './details'
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
2020-07-02 07:39:25 +00:00
|
|
|
|
onLoad(){
|
|
|
|
|
this.$u.api.getStoreGoodsList({id:1}).then((res)=>{
|
2020-07-06 01:10:34 +00:00
|
|
|
|
// console.log(res.data)
|
2020-07-02 07:39:25 +00:00
|
|
|
|
this.list= res.data.list
|
|
|
|
|
})
|
2020-07-06 01:10:34 +00:00
|
|
|
|
this.$u.api.getStoreImgVideoList({id:1}).then((res)=>{
|
|
|
|
|
console.log(res.data)
|
|
|
|
|
this.indextop = [res.data[0],res.data[1]]
|
|
|
|
|
this.indexlist = res.data.slice(2,)
|
|
|
|
|
})
|
2020-07-21 13:01:42 +00:00
|
|
|
|
this.$u.api.getStoreInfo({id:1}).then((res)=>{
|
|
|
|
|
console.log(res)
|
|
|
|
|
this.info = res.data
|
|
|
|
|
})
|
2020-07-02 07:39:25 +00:00
|
|
|
|
}
|
2020-06-10 08:06:01 +00:00
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.merchant {
|
|
|
|
|
min-height: 100vh;
|
|
|
|
|
background-color: #ECECEC;
|
|
|
|
|
padding-top: calc(350rpx - var(--window-top));
|
|
|
|
|
.top {
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
z-index: 9;
|
|
|
|
|
width: 750rpx;
|
|
|
|
|
height: 350rpx;
|
|
|
|
|
background-color: #999999;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
padding: 168rpx 60rpx 0 30rpx;
|
|
|
|
|
> image {
|
|
|
|
|
margin-right: 40rpx;
|
|
|
|
|
width: 140rpx;
|
|
|
|
|
height: 140rpx;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
background-color: aqua;
|
|
|
|
|
}
|
|
|
|
|
.info {
|
|
|
|
|
width: 220rpx;
|
|
|
|
|
color: rgba(255,255,255,1);
|
|
|
|
|
.name {
|
|
|
|
|
margin-bottom: 30rpx;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
}
|
|
|
|
|
.num {
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.btn {
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
width: 162rpx;
|
|
|
|
|
height: 60rpx;
|
|
|
|
|
border: 2rpx solid rgba(255,255,255,1);
|
|
|
|
|
border-radius: 30rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
> image {
|
|
|
|
|
width: 28rpx;
|
|
|
|
|
height: 28rpx;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
margin-right: 14rpx;
|
|
|
|
|
background-color: aqua;
|
|
|
|
|
}
|
|
|
|
|
> view {
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
color: rgba(255,255,255,1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.follow {
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
width: 100%;
|
|
|
|
|
margin-bottom: 20rpx;
|
2020-07-06 01:10:34 +00:00
|
|
|
|
// height: 140rpx;
|
2020-06-10 08:06:01 +00:00
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
padding: 20rpx 30rpx;
|
|
|
|
|
.title {
|
|
|
|
|
position: relative;
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: rgba(51,51,51,1);
|
|
|
|
|
margin: 0 30rpx;
|
|
|
|
|
&::before {
|
|
|
|
|
content: "";
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: -14rpx;
|
|
|
|
|
top: 0;
|
|
|
|
|
width: 6rpx;
|
|
|
|
|
height: 30rpx;
|
|
|
|
|
background: rgba(255,120,15,1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.list {
|
|
|
|
|
width: 570rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
.list-items {
|
|
|
|
|
display: flex;
|
|
|
|
|
.item {
|
|
|
|
|
&:not(:last-child) {
|
|
|
|
|
margin-right: 35rpx;
|
|
|
|
|
}
|
|
|
|
|
text-align: center;
|
|
|
|
|
width: 90rpx;
|
|
|
|
|
> image {
|
|
|
|
|
width: 60rpx;
|
|
|
|
|
height: 60rpx;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
margin-bottom: 20rpx;
|
|
|
|
|
background-color: aqua;
|
|
|
|
|
}
|
|
|
|
|
.nickname {
|
|
|
|
|
font-size: 22rpx;
|
|
|
|
|
color: rgba(51,51,51,1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-07-02 07:39:25 +00:00
|
|
|
|
.main{
|
|
|
|
|
padding-bottom: 98rpx;
|
|
|
|
|
}
|
2020-06-10 08:06:01 +00:00
|
|
|
|
.tabbar {
|
|
|
|
|
border-top: 1rpx #DBDADA solid;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 98rpx;
|
|
|
|
|
background: rgb(95, 64, 64);
|
|
|
|
|
display: flex;
|
|
|
|
|
padding: 10rpx 55rpx;
|
|
|
|
|
position: fixed;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
z-index: 9;
|
|
|
|
|
> view {
|
|
|
|
|
flex: 1;
|
|
|
|
|
text-align: center;
|
|
|
|
|
> image {
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
width: 40rpx;
|
|
|
|
|
height: 40rpx;
|
|
|
|
|
margin-bottom: 15rpx;
|
|
|
|
|
background-color: aqua;
|
|
|
|
|
}
|
|
|
|
|
> view {
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
color: rgba(153,153,153,1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-07-02 07:39:25 +00:00
|
|
|
|
.item{
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
// margin-top: 20rpx;
|
|
|
|
|
padding:25rpx;
|
|
|
|
|
}
|
2020-06-10 08:06:01 +00:00
|
|
|
|
}
|
|
|
|
|
</style>
|