|
@@ -3,12 +3,12 @@
|
|
|
<view class="main">
|
|
|
<view class="one">
|
|
|
<view class="one_1" v-if="barActive=='0'">
|
|
|
- <view class="first">
|
|
|
- <image class="image" :src="info.logo&&info.logo.length>0?info.logo[0].url:''" mode=""></image>
|
|
|
- </view>
|
|
|
- <view class="second">
|
|
|
- <scroll-view scroll-y="true" class="scroll-view">
|
|
|
- <view class="list-scroll-view">
|
|
|
+ <scroll-view scroll-y="true" class="scroll-view">
|
|
|
+ <view class="one_1_1">
|
|
|
+ <image class="image" :src="info.logo&&info.logo.length>0?info.logo[0].url:''" mode=""></image>
|
|
|
+ </view>
|
|
|
+ <view class="one_1_2">
|
|
|
+ <view class="pubu">
|
|
|
<view class="list" v-for="(item,index) in shoplist" :key="index">
|
|
|
<image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode=""></image>
|
|
|
<view class="name">
|
|
@@ -25,15 +25,15 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </scroll-view>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
</view>
|
|
|
<view class="one_3" v-else-if="barActive=='1'">
|
|
|
<view class="first">
|
|
|
<input type="text" v-model="searchInfo.name" @blur="toInput" placeholder="搜索商品">
|
|
|
</view>
|
|
|
<view class="second">
|
|
|
- <scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
|
|
|
+ <scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
|
|
|
<view class="list-scroll-view">
|
|
|
<view class="second_1">
|
|
|
<view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList" :key="index" @tap="toCond(index,item)">
|
|
@@ -53,25 +53,30 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="second_2">
|
|
|
- <view class="list" v-for="(item,index) in list" :key="index">
|
|
|
- <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode=""></image>
|
|
|
- <view class="sale" v-if="item.is_sale==true">
|
|
|
- <text>已售尽</text>
|
|
|
- </view>
|
|
|
- <view class="name">
|
|
|
- {{item.name}}
|
|
|
- </view>
|
|
|
- <view class="other">
|
|
|
- <view class="money">
|
|
|
- <text>¥</text>
|
|
|
- <text>{{item.sell_money}}</text>
|
|
|
+ <view class="pubu">
|
|
|
+ <view class="list" v-for="(item,index) in list" :key="index">
|
|
|
+ <image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode=""></image>
|
|
|
+ <view class="sale" v-if="item.is_sale==true">
|
|
|
+ <text>已售尽</text>
|
|
|
+ </view>
|
|
|
+ <view class="name">
|
|
|
+ {{item.name}}
|
|
|
</view>
|
|
|
- <view class="btn">
|
|
|
- <button type="default" size="mini" @click="toBuy(item)">购买</button>
|
|
|
+ <view class="other">
|
|
|
+ <view class="money">
|
|
|
+ <text>¥</text>
|
|
|
+ <text>{{item.sell_money}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="btn">
|
|
|
+ <button type="default" size="mini" @click="toBuy(item)">购买</button>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="is_bottom" v-if="is_bottom">
|
|
|
+ <text>数据到底了!!</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
@@ -191,6 +196,9 @@
|
|
|
xiaActive: 'icon-xiajiantou-copy'
|
|
|
}
|
|
|
],
|
|
|
+ // 数据是否触底
|
|
|
+ is_bottom: false,
|
|
|
+ scrollTop: 0,
|
|
|
// 二维码内容
|
|
|
uqrcodeInfo: ''
|
|
|
};
|
|
@@ -198,8 +206,8 @@
|
|
|
onLoad: async function(e) {
|
|
|
const that = this;
|
|
|
let id = '6333d71d32c5f69745f9bd32';
|
|
|
- if (e && e.id) id = e.id;
|
|
|
- else id = decodeURIComponent(e.q).split('id=')[1];
|
|
|
+ // if (e && e.id) id = e.id;
|
|
|
+ // else id = decodeURIComponent(e.q).split('id=')[1];
|
|
|
that.$set(that, `id`, id);
|
|
|
await that.watchLogin();
|
|
|
await that.search();
|
|
@@ -316,9 +324,14 @@
|
|
|
that.$set(that, `skip`, skip)
|
|
|
that.searchAll();
|
|
|
uni.hideLoading();
|
|
|
- } else uni.showToast({
|
|
|
- title: '没有更多数据了'
|
|
|
- });
|
|
|
+ } else that.$set(that, `is_bottom`, true)
|
|
|
+ },
|
|
|
+ toScroll(e) {
|
|
|
+ const that = this;
|
|
|
+ let up = that.scrollTop;
|
|
|
+ that.$set(that, `scrollTop`, e.detail.scrollTop);
|
|
|
+ let num = Math.sign(up - e.detail.scrollTop);
|
|
|
+ if (num == 1) that.$set(that, `is_bottom`, false);
|
|
|
},
|
|
|
// 输入框
|
|
|
toInput(e) {
|
|
@@ -436,15 +449,11 @@
|
|
|
flex-grow: 1;
|
|
|
|
|
|
.one_1 {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- width: 96vw;
|
|
|
- height: 90vh;
|
|
|
- padding: 2vw;
|
|
|
+ height: 92vh;
|
|
|
background-color: var(--fFB1Color);
|
|
|
|
|
|
- .first {
|
|
|
- margin: 0 0 2vw 0;
|
|
|
+ .one_1_1 {
|
|
|
+ padding: 2vw;
|
|
|
|
|
|
.image {
|
|
|
width: 100%;
|
|
@@ -452,56 +461,122 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .second {
|
|
|
- position: relative;
|
|
|
- flex-grow: 1;
|
|
|
-
|
|
|
- .list {
|
|
|
- margin: 0 2vw 2vw 0;
|
|
|
- background-color: var(--fffColor);
|
|
|
- padding: 2vw;
|
|
|
- width: 43vw;
|
|
|
- border-radius: 5px;
|
|
|
+ .one_1_2 {
|
|
|
+ padding: 0 2vw 2vw 2vw;
|
|
|
|
|
|
- .image {
|
|
|
- width: 100%;
|
|
|
- height: 49vw;
|
|
|
- margin: 0 0 1vw 0;
|
|
|
- }
|
|
|
+ .pubu {
|
|
|
+ column-count: 2;
|
|
|
+ column-gap: 2vw;
|
|
|
|
|
|
- .name {
|
|
|
- font-size: var(--font15Size);
|
|
|
+ .list {
|
|
|
+ background: #fff;
|
|
|
+ padding: 2vw;
|
|
|
+ border-radius: 5px;
|
|
|
margin: 0 0 2vw 0;
|
|
|
- }
|
|
|
+ break-inside: avoid;
|
|
|
|
|
|
- .other {
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- justify-content: space-between;
|
|
|
+ .image {
|
|
|
+ width: 100%;
|
|
|
+ height: 50vw;
|
|
|
+ }
|
|
|
|
|
|
- .money {
|
|
|
- color: var(--ff0Color);
|
|
|
+ .name {
|
|
|
+ font-size: var(--font15Size);
|
|
|
+ margin: 0 0 2vw 0;
|
|
|
+ }
|
|
|
|
|
|
- text:nth-child(1) {
|
|
|
- font-size: var(--font12Size);
|
|
|
+ .other {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-between;
|
|
|
+
|
|
|
+ .money {
|
|
|
+ color: var(--ff0Color);
|
|
|
+
|
|
|
+ text:nth-child(1) {
|
|
|
+ font-size: var(--font12Size);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- .btn {
|
|
|
- button {
|
|
|
- border-radius: 25px;
|
|
|
- color: var(--fffColor);
|
|
|
- background-color: var(--ff0Color);
|
|
|
- font-size: var(--font12Size);
|
|
|
+ .btn {
|
|
|
+ button {
|
|
|
+ border-radius: 25px;
|
|
|
+ color: var(--fffColor);
|
|
|
+ background-color: var(--ff0Color);
|
|
|
+ font-size: var(--font12Size);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- .list:nth-child(2n) {
|
|
|
- margin: 0 0 2vw 0;
|
|
|
- }
|
|
|
}
|
|
|
+
|
|
|
+ // display: flex;
|
|
|
+ // flex-direction: column;
|
|
|
+ // width: 96vw;
|
|
|
+ // height: 90vh;
|
|
|
+ // padding: 2vw;
|
|
|
+ // background-color: var(--fFB1Color);
|
|
|
+
|
|
|
+ // .first {
|
|
|
+ // margin: 0 0 2vw 0;
|
|
|
+
|
|
|
+ // .image {
|
|
|
+ // width: 100%;
|
|
|
+ // height: 50vw;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ // .second {
|
|
|
+ // position: relative;
|
|
|
+ // flex-grow: 1;
|
|
|
+
|
|
|
+ // .list {
|
|
|
+ // margin: 0 2vw 2vw 0;
|
|
|
+ // background-color: var(--fffColor);
|
|
|
+ // padding: 2vw;
|
|
|
+ // width: 43vw;
|
|
|
+ // border-radius: 5px;
|
|
|
+
|
|
|
+ // .image {
|
|
|
+ // width: 100%;
|
|
|
+ // height: 49vw;
|
|
|
+ // margin: 0 0 1vw 0;
|
|
|
+ // }
|
|
|
+
|
|
|
+ // .name {
|
|
|
+ // font-size: var(--font15Size);
|
|
|
+ // margin: 0 0 2vw 0;
|
|
|
+ // }
|
|
|
+
|
|
|
+ // .other {
|
|
|
+ // display: flex;
|
|
|
+ // flex-direction: row;
|
|
|
+ // justify-content: space-between;
|
|
|
+
|
|
|
+ // .money {
|
|
|
+ // color: var(--ff0Color);
|
|
|
+
|
|
|
+ // text:nth-child(1) {
|
|
|
+ // font-size: var(--font12Size);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ // .btn {
|
|
|
+ // button {
|
|
|
+ // border-radius: 25px;
|
|
|
+ // color: var(--fffColor);
|
|
|
+ // background-color: var(--ff0Color);
|
|
|
+ // font-size: var(--font12Size);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ // .list:nth-child(2n) {
|
|
|
+ // margin: 0 0 2vw 0;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
.one_2 {
|
|
@@ -580,7 +655,7 @@
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
width: 100vw;
|
|
|
- height: 90vh;
|
|
|
+ height: 92vh;
|
|
|
|
|
|
.first {
|
|
|
border-bottom: 1px solid var(--f85Color);
|
|
@@ -634,85 +709,162 @@
|
|
|
}
|
|
|
|
|
|
.second_2 {
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- flex-wrap: wrap;
|
|
|
- padding: 2vw 2vw 0 2vw;
|
|
|
+ padding: 2vw;
|
|
|
background-color: var(--f1Color);
|
|
|
|
|
|
- .list {
|
|
|
- position: relative;
|
|
|
- width: 43vw;
|
|
|
- margin: 0 2vw 2vw 0;
|
|
|
- padding: 2vw;
|
|
|
- border-radius: 9px;
|
|
|
- background-color: var(--fffColor);
|
|
|
+ .pubu {
|
|
|
+ column-count: 2;
|
|
|
+ column-gap: 2vw;
|
|
|
|
|
|
- .image {
|
|
|
-
|
|
|
- width: 100%;
|
|
|
- height: 40vw;
|
|
|
- }
|
|
|
+ .list {
|
|
|
+ position: relative;
|
|
|
+ margin: 0 0 2vw 0;
|
|
|
+ padding: 2vw;
|
|
|
+ border-radius: 10px;
|
|
|
+ background-color: var(--fffColor);
|
|
|
+ break-inside: avoid;
|
|
|
|
|
|
- .sale {
|
|
|
- position: absolute;
|
|
|
- top: 18vw;
|
|
|
- text-align: center;
|
|
|
- width: 43vw;
|
|
|
+ .image {
|
|
|
+ width: 100%;
|
|
|
+ height: 40vw;
|
|
|
+ }
|
|
|
|
|
|
- text {
|
|
|
- background-color: #0000005f;
|
|
|
- border-radius: 90px;
|
|
|
- display: inline-block;
|
|
|
- width: 15vw;
|
|
|
- height: 15vw;
|
|
|
- color: var(--fffColor);
|
|
|
+ .sale {
|
|
|
+ position: absolute;
|
|
|
+ top: 18vw;
|
|
|
text-align: center;
|
|
|
- line-height: 15vw;
|
|
|
+ width: 43vw;
|
|
|
+
|
|
|
+ text {
|
|
|
+ background-color: #0000005f;
|
|
|
+ border-radius: 90px;
|
|
|
+ display: inline-block;
|
|
|
+ width: 15vw;
|
|
|
+ height: 15vw;
|
|
|
+ color: var(--fffColor);
|
|
|
+ text-align: center;
|
|
|
+ line-height: 15vw;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- .name {
|
|
|
- font-size: var(--font16Size);
|
|
|
- margin: 0 0 1vw 0;
|
|
|
- }
|
|
|
+ .name {
|
|
|
+ font-size: var(--font16Size);
|
|
|
+ margin: 0 0 1vw 0;
|
|
|
+ }
|
|
|
|
|
|
- .other {
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- justify-content: space-between;
|
|
|
+ .other {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-between;
|
|
|
|
|
|
- .money {
|
|
|
- font-size: var(--font14Size);
|
|
|
- color: var(--ff0Color);
|
|
|
+ .money {
|
|
|
+ font-size: var(--font14Size);
|
|
|
+ color: var(--ff0Color);
|
|
|
|
|
|
- text:nth-child(1) {
|
|
|
- font-size: var(--font12Size);
|
|
|
+ text:nth-child(1) {
|
|
|
+ font-size: var(--font12Size);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- .other_1 {
|
|
|
- flex-grow: 1;
|
|
|
- margin: 0 0 0 2vw;
|
|
|
- font-size: var(--font12Size);
|
|
|
- color: var(--f85Color);
|
|
|
- }
|
|
|
|
|
|
- .btn {
|
|
|
- button {
|
|
|
- border-radius: 25px;
|
|
|
- color: var(--fffColor);
|
|
|
- background-color: var(--ff0Color);
|
|
|
+ .other_1 {
|
|
|
+ flex-grow: 1;
|
|
|
+ margin: 0 0 0 2vw;
|
|
|
font-size: var(--font12Size);
|
|
|
+ color: var(--f85Color);
|
|
|
+ }
|
|
|
|
|
|
+ .btn {
|
|
|
+ button {
|
|
|
+ border-radius: 25px;
|
|
|
+ color: var(--fffColor);
|
|
|
+ background-color: var(--ff0Color);
|
|
|
+ font-size: var(--font12Size);
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .list:nth-child(2n) {
|
|
|
- margin: 0 0 2vw 0;
|
|
|
- }
|
|
|
+ // display: flex;
|
|
|
+ // flex-direction: row;
|
|
|
+ // flex-wrap: wrap;
|
|
|
+ // padding: 2vw 2vw 0 2vw;
|
|
|
+ // background-color: var(--f1Color);
|
|
|
+
|
|
|
+ // .list {
|
|
|
+ // position: relative;
|
|
|
+ // width: 43vw;
|
|
|
+ // margin: 0 2vw 2vw 0;
|
|
|
+ // padding: 2vw;
|
|
|
+ // border-radius: 9px;
|
|
|
+ // background-color: var(--fffColor);
|
|
|
+
|
|
|
+ // .image {
|
|
|
+
|
|
|
+ // width: 100%;
|
|
|
+ // height: 40vw;
|
|
|
+ // }
|
|
|
+
|
|
|
+ // .sale {
|
|
|
+ // position: absolute;
|
|
|
+ // top: 18vw;
|
|
|
+ // text-align: center;
|
|
|
+ // width: 43vw;
|
|
|
+
|
|
|
+ // text {
|
|
|
+ // background-color: #0000005f;
|
|
|
+ // border-radius: 90px;
|
|
|
+ // display: inline-block;
|
|
|
+ // width: 15vw;
|
|
|
+ // height: 15vw;
|
|
|
+ // color: var(--fffColor);
|
|
|
+ // text-align: center;
|
|
|
+ // line-height: 15vw;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ // .name {
|
|
|
+ // font-size: var(--font16Size);
|
|
|
+ // margin: 0 0 1vw 0;
|
|
|
+ // }
|
|
|
+
|
|
|
+ // .other {
|
|
|
+ // display: flex;
|
|
|
+ // flex-direction: row;
|
|
|
+ // justify-content: space-between;
|
|
|
+
|
|
|
+ // .money {
|
|
|
+ // font-size: var(--font14Size);
|
|
|
+ // color: var(--ff0Color);
|
|
|
+
|
|
|
+ // text:nth-child(1) {
|
|
|
+ // font-size: var(--font12Size);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ // .other_1 {
|
|
|
+ // flex-grow: 1;
|
|
|
+ // margin: 0 0 0 2vw;
|
|
|
+ // font-size: var(--font12Size);
|
|
|
+ // color: var(--f85Color);
|
|
|
+ // }
|
|
|
+
|
|
|
+ // .btn {
|
|
|
+ // button {
|
|
|
+ // border-radius: 25px;
|
|
|
+ // color: var(--fffColor);
|
|
|
+ // background-color: var(--ff0Color);
|
|
|
+ // font-size: var(--font12Size);
|
|
|
+
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ // .list:nth-child(2n) {
|
|
|
+ // margin: 0 0 2vw 0;
|
|
|
+ // }
|
|
|
|
|
|
|
|
|
}
|
|
@@ -839,4 +991,14 @@
|
|
|
flex-wrap: wrap;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .is_bottom {
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ text {
|
|
|
+ padding: 1vw 0;
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|