|
@@ -5,30 +5,26 @@
|
|
<input type="text" v-model="searchInfo.name" @blur="toInput" placeholder="搜索店铺名称">
|
|
<input type="text" v-model="searchInfo.name" @blur="toInput" placeholder="搜索店铺名称">
|
|
</view>
|
|
</view>
|
|
<view class="two">
|
|
<view class="two">
|
|
- <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="list-scroll-view">
|
|
<view class="two_1">
|
|
<view class="two_1">
|
|
- <view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList"
|
|
|
|
- :key="index" @tap="toCond(index,item)">
|
|
|
|
|
|
+ <view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList" :key="index" @tap="toCond(index,item)">
|
|
<view class="name" v-if="index!=2">
|
|
<view class="name" v-if="index!=2">
|
|
{{item.name}}
|
|
{{item.name}}
|
|
</view>
|
|
</view>
|
|
<view v-if="index==2" class="icon4">
|
|
<view v-if="index==2" class="icon4">
|
|
<view class="icon_1">
|
|
<view class="icon_1">
|
|
- <text :class="['iconfont',item.shangActive]"
|
|
|
|
- v-if="condActive==index&&shang=='1'"></text>
|
|
|
|
|
|
+ <text :class="['iconfont',item.shangActive]" v-if="condActive==index&&shang=='1'"></text>
|
|
<text :class="['iconfont',item.shang]" v-else></text>
|
|
<text :class="['iconfont',item.shang]" v-else></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view v-else class="icon">
|
|
<view v-else class="icon">
|
|
<view class="icon_1">
|
|
<view class="icon_1">
|
|
- <text :class="['iconfont',item.shangActive]"
|
|
|
|
- v-if="condActive==index&&shang=='1'"></text>
|
|
|
|
|
|
+ <text :class="['iconfont',item.shangActive]" v-if="condActive==index&&shang=='1'"></text>
|
|
<text :class="['iconfont',item.shang]" v-else></text>
|
|
<text :class="['iconfont',item.shang]" v-else></text>
|
|
</view>
|
|
</view>
|
|
<view class="icon_1">
|
|
<view class="icon_1">
|
|
- <text :class="['iconfont', item.xiaActive]"
|
|
|
|
- v-if="condActive==index&&xia=='-1'"></text>
|
|
|
|
|
|
+ <text :class="['iconfont', item.xiaActive]" v-if="condActive==index&&xia=='-1'"></text>
|
|
<text :class="['iconfont', item.xia]" v-else></text>
|
|
<text :class="['iconfont', item.xia]" v-else></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -36,8 +32,7 @@
|
|
</view>
|
|
</view>
|
|
<view class="two_2" v-if="type=='list'">
|
|
<view class="two_2" v-if="type=='list'">
|
|
<view class="list" v-for="(item, index) in list" :key="index" @tap="toView(item)">
|
|
<view class="list" v-for="(item, index) in list" :key="index" @tap="toView(item)">
|
|
- <image class="image"
|
|
|
|
- :src="item.logo&&item.logo.length>0?item.logo[0].url:''" mode="">
|
|
|
|
|
|
+ <image class="image" :src="item.logo&&item.logo.length>0?item.logo[0].url:''" mode="">
|
|
</image>
|
|
</image>
|
|
<view class="other">
|
|
<view class="other">
|
|
<view class="name">{{item.name}}</view>
|
|
<view class="name">{{item.name}}</view>
|
|
@@ -55,8 +50,7 @@
|
|
</view>
|
|
</view>
|
|
<view class="two_3" v-else>
|
|
<view class="two_3" v-else>
|
|
<view class="list" v-for="(item, index) in list" :key="index" @tap="toView(item)">
|
|
<view class="list" v-for="(item, index) in list" :key="index" @tap="toView(item)">
|
|
- <image class="image"
|
|
|
|
- :src="item.logo&&item.logo.length>0?item.logo[0].url:''" mode="">
|
|
|
|
|
|
+ <image class="image" :src="item.logo&&item.logo.length>0?item.logo[0].url:''" mode="">
|
|
</image>
|
|
</image>
|
|
<view class="name">
|
|
<view class="name">
|
|
{{item.name||'暂无'}}
|
|
{{item.name||'暂无'}}
|
|
@@ -74,6 +68,9 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="is_bottom" v-if="is_bottom">
|
|
|
|
+ <text>{{config.bottom_title}}</text>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
</view>
|
|
</view>
|
|
@@ -85,6 +82,8 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ // 系统设置
|
|
|
|
+ config: {},
|
|
searchInfo: {},
|
|
searchInfo: {},
|
|
user: {},
|
|
user: {},
|
|
list: [],
|
|
list: [],
|
|
@@ -112,17 +111,30 @@
|
|
}
|
|
}
|
|
],
|
|
],
|
|
type: 'list',
|
|
type: 'list',
|
|
|
|
+ // 数据是否触底
|
|
|
|
+ is_bottom: false,
|
|
|
|
+ scrollTop: 0
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- onShow: function() {
|
|
|
|
|
|
+ onLoad: function() {
|
|
const that = this;
|
|
const that = this;
|
|
|
|
+ that.searchConfig();
|
|
that.watchLogin()
|
|
that.watchLogin()
|
|
},
|
|
},
|
|
- onHide: function() {
|
|
|
|
- const that = this;
|
|
|
|
- that.clearPage();
|
|
|
|
- },
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 查询基本设置
|
|
|
|
+ searchConfig() {
|
|
|
|
+ const that = this;
|
|
|
|
+ uni.getStorage({
|
|
|
|
+ key: 'config',
|
|
|
|
+ success: function(res) {
|
|
|
|
+ if (res.data) that.$set(that, `config`, res.data)
|
|
|
|
+ },
|
|
|
|
+ fail: function(err) {
|
|
|
|
+ console.log(err);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 输入框
|
|
// 输入框
|
|
toInput(e) {
|
|
toInput(e) {
|
|
const that = this;
|
|
const that = this;
|
|
@@ -221,14 +233,19 @@
|
|
that.$set(that, `skip`, skip)
|
|
that.$set(that, `skip`, skip)
|
|
that.search();
|
|
that.search();
|
|
uni.hideLoading();
|
|
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);
|
|
},
|
|
},
|
|
// 详细信息
|
|
// 详细信息
|
|
toView(e) {
|
|
toView(e) {
|
|
const that = this;
|
|
const that = this;
|
|
- that.clearPage();
|
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: `/pagesHome/shop/index?id=${e._id}`
|
|
url: `/pagesHome/shop/index?id=${e._id}`
|
|
})
|
|
})
|
|
@@ -442,4 +459,15 @@
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ .is_bottom {
|
|
|
|
+ text-align: center;
|
|
|
|
+
|
|
|
|
+ text {
|
|
|
|
+ padding: 2vw 0;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ color: #858585;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|