店铺主页调整及主页店铺二维码跳转支持
This commit is contained in:
parent
e209aefe2c
commit
1f4ad93162
|
|
@ -1,14 +1,15 @@
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="brand-list">
|
<view class="brand-list">
|
||||||
<navigator url="../brandDetail/brandDetail?id={{item.id}}" class="item" wx:for="{{brandList}}" wx:key="id">
|
<navigator url="../brandDetail/brandDetail?id={{item.id}}" class="item" wx:for="{{brandList}}" wx:key="id">
|
||||||
|
<view class="h">
|
||||||
|
<view class="l">{{item.name}}</view>
|
||||||
|
<view class="r">进店看看</view>
|
||||||
|
</view>
|
||||||
<view class="img-bg">
|
<view class="img-bg">
|
||||||
<image src="{{item.picUrl}}" background-size="cover"></image>
|
<image src="{{item.picUrl}}" background-size="cover"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="txt-box">
|
<view class="txt-box">
|
||||||
<view class="line">
|
<view class="line">
|
||||||
<text class="name">{{item.name}}</text>
|
|
||||||
<text class="s">|</text>
|
|
||||||
<text class="price">{{item.floorPrice}}元起</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,25 @@
|
||||||
.brand-list .item {
|
.brand-list .item {
|
||||||
display: block;
|
display: block;
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
height: 416rpx;
|
height: 500rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 4rpx;
|
background: #fff;
|
||||||
|
margin-top: 5rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-list .item .img-bg {
|
.brand-list .item .img-bg {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
height: 417rpx;
|
height: 400rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-list .item .img-bg image {
|
.brand-list .item .img-bg image {
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
height: 416rpx;
|
height: 400rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-list .item .txt-box {
|
.brand-list .item .txt-box {
|
||||||
|
|
@ -28,7 +29,7 @@
|
||||||
display: table;
|
display: table;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
width: 750rpx;
|
width: 750rpx;
|
||||||
height: 417rpx;
|
height: 317rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand-list .item .line {
|
.brand-list .item .line {
|
||||||
|
|
@ -50,3 +51,31 @@
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.brand-list .h {
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
margin-left: 31.25rpx;
|
||||||
|
padding-right: 31.25rpx;
|
||||||
|
border-bottom: 1px solid #f4f4f4;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-list .h .l {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand-list .h .r {
|
||||||
|
float: right;
|
||||||
|
margin-top: 19rpx;
|
||||||
|
height: 64.5rpx;
|
||||||
|
margin-right: 5rpx;
|
||||||
|
line-height: 64.5rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
background: #85c43f;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,20 @@ Page({
|
||||||
size: 10,
|
size: 10,
|
||||||
totalPages: 1
|
totalPages: 1
|
||||||
},
|
},
|
||||||
|
onShareAppMessage: function () {
|
||||||
|
let that = this;
|
||||||
|
let userInfo = wx.getStorageSync('userInfo');
|
||||||
|
let shareUserId = 1;
|
||||||
|
if (userInfo) {
|
||||||
|
shareUserId = userInfo.userId;
|
||||||
|
}
|
||||||
|
console.log('/pages/index/index?scene=brand,' + that.data.brand.id+'&shareUserId=' + shareUserId);
|
||||||
|
return {
|
||||||
|
title: that.data.brand.name,
|
||||||
|
//desc: that.data.brand.desc,
|
||||||
|
path: '/pages/index/index?scene=brand,' + that.data.brand.id + '&shareUserId=' + shareUserId
|
||||||
|
}
|
||||||
|
},
|
||||||
onLoad: function(options) {
|
onLoad: function(options) {
|
||||||
// 页面初始化 options为页面跳转所带来的参数
|
// 页面初始化 options为页面跳转所带来的参数
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@
|
||||||
<image class="img" src="{{brand.picUrl}}" background-size="cover"></image>
|
<image class="img" src="{{brand.picUrl}}" background-size="cover"></image>
|
||||||
<view class="info-box">
|
<view class="info-box">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<text class="txt">{{brand.name}}</text>
|
|
||||||
<text class="line"></text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -20,7 +18,7 @@
|
||||||
<navigator class="item {{iindex % 2 == 0 ? 'item-b' : ''}}" url="../goods/goods?id={{iitem.id}}">
|
<navigator class="item {{iindex % 2 == 0 ? 'item-b' : ''}}" url="../goods/goods?id={{iitem.id}}">
|
||||||
<image class="img" src="{{iitem.picUrl}}" background-size="cover"></image>
|
<image class="img" src="{{iitem.picUrl}}" background-size="cover"></image>
|
||||||
<text class="name">{{iitem.name}}</text>
|
<text class="name">{{iitem.name}}</text>
|
||||||
<text class="price">¥{{iitem.retailPrice}}</text>
|
<text class="price jhx_f8">¥{{iitem.retailPrice}}</text>
|
||||||
</navigator>
|
</navigator>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -53,11 +53,11 @@ page {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 41.5rpx 31.25rpx;
|
padding: 21.5rpx 31.25rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
line-height: 41.5rpx;
|
line-height: 41.5rpx;
|
||||||
text-align: center;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cate-item .b {
|
.cate-item .b {
|
||||||
|
|
@ -107,5 +107,4 @@ page {
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #b4282d;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ page {
|
||||||
}
|
}
|
||||||
|
|
||||||
.sort-box .item.active .txt {
|
.sort-box .item.active .txt {
|
||||||
color: #b4282d;
|
color: #ec4223;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sort-box .item.by-price {
|
.sort-box .item.by-price {
|
||||||
|
|
@ -122,8 +122,8 @@ page {
|
||||||
}
|
}
|
||||||
|
|
||||||
.sort-box-category .item.active {
|
.sort-box-category .item.active {
|
||||||
color: #b4282d;
|
color: #ec4223;
|
||||||
border: 1px solid #b4282d;
|
border: 1px solid #ec4223;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cate-item .b {
|
.cate-item .b {
|
||||||
|
|
@ -173,5 +173,5 @@ page {
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #b4282d;
|
color: #ec4223;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,14 @@ Page({
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '../goods/goods?grouponId=' + id
|
url: '../goods/goods?grouponId=' + id
|
||||||
});
|
});
|
||||||
|
} else if (_type == 'brand') {
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '../brandDetail/brandDetail?id=' + id
|
||||||
|
});
|
||||||
|
} else if (_type == 'topic') {
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '../topicDetail/topicDetail?id=' + id
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
if (id != null){
|
if (id != null){
|
||||||
wx.setStorageSync('shareUserId', id);
|
wx.setStorageSync('shareUserId', id);
|
||||||
|
|
@ -160,7 +168,6 @@ Page({
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onHide: function() {
|
onHide: function() {
|
||||||
// 页面隐藏
|
// 页面隐藏
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ page {
|
||||||
}
|
}
|
||||||
|
|
||||||
.sort-box .item.active .txt {
|
.sort-box .item.active .txt {
|
||||||
color: #b4282d;
|
color: #ec4223;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sort-box .item.by-price {
|
.sort-box .item.by-price {
|
||||||
|
|
@ -122,8 +122,8 @@ page {
|
||||||
}
|
}
|
||||||
|
|
||||||
.sort-box-category .item.active {
|
.sort-box-category .item.active {
|
||||||
color: #b4282d;
|
color: #ec4223;
|
||||||
border: 1px solid #b4282d;
|
border: 1px solid #ec4223;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cate-item .b {
|
.cate-item .b {
|
||||||
|
|
@ -173,5 +173,5 @@ page {
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #b4282d;
|
color: #ec4223;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -127,8 +127,8 @@ page {
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-keywords .item.active {
|
.search-keywords .item.active {
|
||||||
color: #b4282d;
|
color: #ec4223;
|
||||||
border: 1px solid #b4282d;
|
border: 1px solid #ec4223;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shelper-list {
|
.shelper-list {
|
||||||
|
|
@ -183,7 +183,7 @@ page {
|
||||||
}
|
}
|
||||||
|
|
||||||
.sort-box .item.active .txt {
|
.sort-box .item.active .txt {
|
||||||
color: #b4282d;
|
color: #ec4223;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sort-box .item.by-price {
|
.sort-box .item.by-price {
|
||||||
|
|
@ -223,8 +223,8 @@ page {
|
||||||
}
|
}
|
||||||
|
|
||||||
.sort-box-category .item.active {
|
.sort-box-category .item.active {
|
||||||
color: #b4282d;
|
color: #ec4223;
|
||||||
border: 1px solid #b4282d;
|
border: 1px solid #ec4223;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cate-item {
|
.cate-item {
|
||||||
|
|
@ -309,7 +309,7 @@ page {
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #b4282d;
|
color: #ec4223;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-result-empty {
|
.search-result-empty {
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,20 @@ Page({
|
||||||
commentList: [],
|
commentList: [],
|
||||||
topicGoods: []
|
topicGoods: []
|
||||||
},
|
},
|
||||||
|
onShareAppMessage: function () {
|
||||||
|
let that = this;
|
||||||
|
let userInfo = wx.getStorageSync('userInfo');
|
||||||
|
let shareUserId = 1;
|
||||||
|
if (userInfo) {
|
||||||
|
shareUserId = userInfo.userId;
|
||||||
|
}
|
||||||
|
console.log('/pages/index/index?scene=topic,' + that.data.topic.id + '&shareUserId=' + shareUserId);
|
||||||
|
return {
|
||||||
|
title: that.data.topic.subtitle,
|
||||||
|
//desc: that.data.brand.desc,
|
||||||
|
path: '/pages/index/index?scene=topic,' + that.data.topic.id + '&shareUserId=' + shareUserId
|
||||||
|
}
|
||||||
|
},
|
||||||
onLoad: function(options) {
|
onLoad: function(options) {
|
||||||
// 页面初始化 options为页面跳转所带来的参数
|
// 页面初始化 options为页面跳转所带来的参数
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue