|
@@ -22,7 +22,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="zero four">
|
|
|
|
|
|
+ <view class="zero four" v-if="recomList&&recomList.length>0">
|
|
<view class="recomList" v-for="(item,index) in recomList" :key="index">
|
|
<view class="recomList" v-for="(item,index) in recomList" :key="index">
|
|
<view class="list" v-for="(tag,indexs) in item.list" :key="indexs" @tap="toBuy(tag)">
|
|
<view class="list" v-for="(tag,indexs) in item.list" :key="indexs" @tap="toBuy(tag)">
|
|
<view class="title">
|
|
<view class="title">
|
|
@@ -36,22 +36,29 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="zero five">
|
|
<view class="zero five">
|
|
- <view class="list" v-for="(item,index) in marketList" :key="index" @tap="toBuy(item)">
|
|
|
|
- <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode="">
|
|
|
|
- </image>
|
|
|
|
- <view class="name">
|
|
|
|
- {{item.name}}
|
|
|
|
- </view>
|
|
|
|
- <view class="other">
|
|
|
|
- <view class="money">
|
|
|
|
- <text>¥</text><text>{{item.sell_money||'暂无'}}</text>
|
|
|
|
|
|
+ <view class="five_pubu">
|
|
|
|
+ <view class="list" v-for="(item,index) in marketList" :key="index" @tap="toBuy(item)">
|
|
|
|
+ <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode="">
|
|
|
|
+ </image>
|
|
|
|
+ <view class="name">
|
|
|
|
+ {{item.name}}
|
|
</view>
|
|
</view>
|
|
- <view class="btn">
|
|
|
|
- <!-- <button type="default" size="mini">购买</button> -->
|
|
|
|
|
|
+ <view class="other">
|
|
|
|
+ <view class="money">
|
|
|
|
+ <view class="money_1">
|
|
|
|
+ <text>¥</text><text>{{item.sell_money||0}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="money_2">
|
|
|
|
+ <text>¥</text><text>{{item.flow_money||0}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="is_bottom" v-if="is_bottom">
|
|
|
|
+ <text>数据到底了!!</text>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
@@ -88,11 +95,11 @@
|
|
old: {
|
|
old: {
|
|
scrollTop: 0
|
|
scrollTop: 0
|
|
},
|
|
},
|
|
|
|
+ // 数据是否触底
|
|
|
|
+ is_bottom: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- onLoad: function() {
|
|
|
|
- const that = this;
|
|
|
|
- },
|
|
|
|
|
|
+ onLoad: function() {},
|
|
onShow: function() {
|
|
onShow: function() {
|
|
const that = this;
|
|
const that = this;
|
|
that.search();
|
|
that.search();
|
|
@@ -105,7 +112,12 @@
|
|
res = await that.$api(`/banner`, 'GET', {
|
|
res = await that.$api(`/banner`, 'GET', {
|
|
status: '0'
|
|
status: '0'
|
|
});
|
|
});
|
|
- if (res.errcode == '0') that.$set(that, `bannerList`, res.data);
|
|
|
|
|
|
+ if (res.errcode == '0') {
|
|
|
|
+ let data = res.data.sort(function(a, b) {
|
|
|
|
+ return a.sort - b.sort
|
|
|
|
+ });
|
|
|
|
+ that.$set(that, `bannerList`, data);
|
|
|
|
+ }
|
|
// 首页模块管理
|
|
// 首页模块管理
|
|
res = await that.$api(`/indexModule`, 'GET', {});
|
|
res = await that.$api(`/indexModule`, 'GET', {});
|
|
if (res.errcode == '0') {
|
|
if (res.errcode == '0') {
|
|
@@ -188,10 +200,9 @@
|
|
that.$set(that, `skip`, skip)
|
|
that.$set(that, `skip`, skip)
|
|
that.search();
|
|
that.search();
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
- } else uni.showToast({
|
|
|
|
- title: '没有更多数据了',
|
|
|
|
- icon: 'none'
|
|
|
|
- });
|
|
|
|
|
|
+ } else {
|
|
|
|
+ that.$set(that, `is_bottom`, true)
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 计算高度
|
|
// 计算高度
|
|
scroll: function(e) {
|
|
scroll: function(e) {
|
|
@@ -338,58 +349,68 @@
|
|
|
|
|
|
.five {
|
|
.five {
|
|
display: flex;
|
|
display: flex;
|
|
- flex-direction: row;
|
|
|
|
- flex-wrap: wrap;
|
|
|
|
|
|
+ flex-direction: column;
|
|
background-color: var(--f2Color);
|
|
background-color: var(--f2Color);
|
|
- padding: 2vw 0 0 0;
|
|
|
|
|
|
+ padding: 2vw 0;
|
|
|
|
|
|
- .list {
|
|
|
|
- width: 40vw;
|
|
|
|
- background-color: var(--fffColor);
|
|
|
|
- padding: 2vw;
|
|
|
|
- margin: 0 2vw 2vw 2vw;
|
|
|
|
- border-radius: 10px;
|
|
|
|
|
|
+ .five_pubu {
|
|
|
|
+ column-count: 2;
|
|
|
|
+ column-gap: 2vw;
|
|
|
|
|
|
- .image {
|
|
|
|
- width: 100%;
|
|
|
|
- height: 35vw;
|
|
|
|
- }
|
|
|
|
|
|
+ .list {
|
|
|
|
+ background-color: var(--fffColor);
|
|
|
|
+ padding: 2vw;
|
|
|
|
+ margin: 0 0 2vw 0;
|
|
|
|
+ break-inside: avoid;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
|
|
- .name {
|
|
|
|
- font-size: var(--font14Size);
|
|
|
|
- margin: 0 0 1vw 0;
|
|
|
|
- }
|
|
|
|
|
|
+ .image {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 35vw;
|
|
|
|
+ }
|
|
|
|
|
|
- .other {
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: row;
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
|
+ .name {
|
|
|
|
+ font-size: var(--font14Size);
|
|
|
|
+ margin: 0 0 1vw 0;
|
|
|
|
+ }
|
|
|
|
|
|
- .money {
|
|
|
|
- color: var(--fFB1Color);
|
|
|
|
|
|
+ .other {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
|
- text:nth-child(1) {
|
|
|
|
- font-size: var(--font12Size);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ .money {
|
|
|
|
+ display: flex;
|
|
|
|
+
|
|
|
|
+ .money_1 {
|
|
|
|
+ color: var(--fFB1Color);
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
|
- .btn {
|
|
|
|
- button {
|
|
|
|
- color: var(--fffColor);
|
|
|
|
- background-color: var(--fFB1Color);
|
|
|
|
- padding: 5px 2vw;
|
|
|
|
- font-size: var(--font14Size);
|
|
|
|
- line-height: 1;
|
|
|
|
- border-radius: 90px;
|
|
|
|
|
|
+ text:last-child {
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ padding: 0 0 0 1vw;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .money_2 {
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ margin: 0 0 0 2vw;
|
|
|
|
+
|
|
|
|
+ text {
|
|
|
|
+ text-decoration: line-through;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ text:last-child {
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ padding: 0 0 0 1vw;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- .list:nth-child(2n) {
|
|
|
|
- margin: 0 0 2vw 2vw;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -417,4 +438,13 @@
|
|
border-radius: 90px;
|
|
border-radius: 90px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ .is_bottom {
|
|
|
|
+ text-align: center;
|
|
|
|
+
|
|
|
|
+ text {
|
|
|
|
+ padding: 1vw 0;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|