store 8.5
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="merchant">
|
||||
<view v-if="show">
|
||||
<!-- <view v-if="show" class="show-hide">
|
||||
<view>
|
||||
<image></image>
|
||||
<view>消息</view>
|
||||
@@ -13,67 +13,70 @@
|
||||
<image></image>
|
||||
<view>我的</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="top" :style="{'background-image':'url(' + info.store_banner + ')'}">
|
||||
<image :src="info.store_avatar"></image>
|
||||
<view class="info">
|
||||
<view class="name u-line-1">{{info.store_name}}</view>
|
||||
<view class="num">粉丝数:{{info.store_collect}}</view>
|
||||
</view>
|
||||
<view class="btn">
|
||||
<image></image>
|
||||
<view>{{ 0 ? "关注" : "已关注" }}</view>
|
||||
<view class="btn" @click="attentionMember">
|
||||
<image src="/static/image/shop/8.png"></image>
|
||||
<view>{{ info.is_attention == 0 ? "关注" : "已关注" }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="follow">
|
||||
<view class="follow" v-if="info.attention_member && info.attention_member.length">
|
||||
<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 v-for="(item, index) in info.attention_member" :key="index" class="item">
|
||||
<image :src="item.friend_frommavatar"></image>
|
||||
<view class="nickname u-line-1">{{ item.friend_frommname }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="main">
|
||||
<view class="classify" v-if="cur==0">
|
||||
<view class="video-image" v-if="cur==0 && indextop.length">
|
||||
<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;">
|
||||
<view style="display: flex;flex-wrap: wrap;" v-if="indexlist.length">
|
||||
<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>
|
||||
|
||||
</view>
|
||||
<!-- 商品筛选排序未完成 -->
|
||||
<view class="item" v-if="cur==1">
|
||||
<item v-for="item in list" :key="item.gc_id" :info="item" class="item"></item>
|
||||
<!-- <item v-for="item in list" :key="item.gc_id" :info="item" class="item"></item> -->
|
||||
<goods :sid="sid"></goods>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tabbar">
|
||||
<view @click="cur=0">
|
||||
<image></image>
|
||||
<view @click="switchCurrent(0)">
|
||||
<image src="/static/image/shop/9.png"></image>
|
||||
<view>商品分类</view>
|
||||
</view>
|
||||
<view @click="cur=1">
|
||||
<image></image>
|
||||
<view>商品列表</view>
|
||||
<view @click="switchCurrent(1)">
|
||||
<image src="/static/image/shop/10.png" v-if="cur != 1"></image>
|
||||
<image src="/static/image/shop/13.png" v-else></image>
|
||||
<view :style="{ color: cur == 1 ? '#FF780F' : '#999999' }">商品列表</view>
|
||||
</view>
|
||||
<view @click="toDetailsPage">
|
||||
<image></image>
|
||||
<view @click="switchCurrent(2)">
|
||||
<image src="/static/image/shop/11.png"></image>
|
||||
<view>店铺信息</view>
|
||||
</view>
|
||||
<view>
|
||||
<image></image>
|
||||
<view @click="switchCurrent(3)">
|
||||
<image src="/static/image/shop/12.png"></image>
|
||||
<view>联系客服</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import item from "@/components/shop/list/item"
|
||||
// import item from "@/components/shop/list/item"
|
||||
import goods from "./goods"
|
||||
import videoTop from "../components/merchant/video-top"
|
||||
import imageTop from "../components/merchant/image-top"
|
||||
import listitem from "../components/merchant/list-item"
|
||||
@@ -81,6 +84,7 @@ import listitem from "../components/merchant/list-item"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
sid: '',
|
||||
show: false,
|
||||
cur: 0,
|
||||
list:[],
|
||||
@@ -90,38 +94,64 @@ export default {
|
||||
}
|
||||
},
|
||||
components:{
|
||||
item,
|
||||
goods,
|
||||
videoTop,
|
||||
imageTop,
|
||||
listitem
|
||||
},
|
||||
methods: {
|
||||
toDetailsPage() {
|
||||
uni.navigateTo({
|
||||
url: './details'
|
||||
});
|
||||
}
|
||||
onPullDownRefresh() {
|
||||
this.getStoreInfo();
|
||||
this.getStoreImgVideoList();
|
||||
},
|
||||
onLoad(){
|
||||
this.$u.api.getStoreGoodsList({id:1}).then((res)=>{
|
||||
// console.log(res.data)
|
||||
this.list= res.data.list
|
||||
})
|
||||
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,)
|
||||
})
|
||||
this.$u.api.getStoreInfo({id:1}).then((res)=>{
|
||||
console.log(res)
|
||||
this.info = res.data
|
||||
})
|
||||
onNavigationBarButtonTap(e) {
|
||||
// console.log(e.index);
|
||||
if(e.index == 1) this.$u.route('/pageC/cart/index');
|
||||
// if(e.index == 0) this.show = true;
|
||||
},
|
||||
methods: {
|
||||
switchCurrent(current) {
|
||||
this.cur = current;
|
||||
if(current == 0) {
|
||||
this.$u.route('/pageC/merchant/storeClassify', { id: this.sid });
|
||||
} else if(current == 2) {
|
||||
this.$u.route('./details', { id: this.sid });
|
||||
}
|
||||
},
|
||||
getStoreInfo() {
|
||||
this.$u.api.getStoreInfo({ id: this.sid }).then((res)=>{
|
||||
this.info = res.data;
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
getStoreImgVideoList() {
|
||||
this.$u.api.getStoreImgVideoList({ id: this.sid }).then((res)=>{
|
||||
if(res.data.length) {
|
||||
this.indextop = [res.data[0], res.data[1]];
|
||||
this.indexlist = res.data.slice(2,);
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
},
|
||||
attentionMember() {
|
||||
this.$u.api.attentionMember({ member_id: this.info.member_id }).then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.getStoreInfo();
|
||||
}
|
||||
this.$u.toast(res.message);
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad(option){
|
||||
this.sid = option.id;
|
||||
console.log(this.sid);
|
||||
this.getStoreInfo();
|
||||
this.getStoreImgVideoList();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.merchant {
|
||||
min-height: 100vh;
|
||||
// min-height: 100vh;
|
||||
background-color: #ECECEC;
|
||||
padding-top: calc(350rpx - var(--window-top));
|
||||
.top {
|
||||
@@ -168,7 +198,6 @@ export default {
|
||||
height: 28rpx;
|
||||
flex-shrink: 0;
|
||||
margin-right: 14rpx;
|
||||
background-color: aqua;
|
||||
}
|
||||
> view {
|
||||
white-space: nowrap;
|
||||
@@ -230,13 +259,18 @@ export default {
|
||||
}
|
||||
}
|
||||
.main{
|
||||
padding-bottom: 98rpx;
|
||||
.video-image {
|
||||
padding-bottom: 98rpx;
|
||||
}
|
||||
> view {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
.tabbar {
|
||||
border-top: 1rpx #DBDADA solid;
|
||||
width: 100%;
|
||||
height: 98rpx;
|
||||
background: rgb(95, 64, 64);
|
||||
background: rgba(251,251,251,1);
|
||||
display: flex;
|
||||
padding: 10rpx 55rpx;
|
||||
position: fixed;
|
||||
@@ -251,7 +285,6 @@ export default {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-bottom: 15rpx;
|
||||
background-color: aqua;
|
||||
}
|
||||
> view {
|
||||
font-size: 24rpx;
|
||||
@@ -259,12 +292,5 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.item{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
// margin-top: 20rpx;
|
||||
padding:25rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user