邓洁 : 首页icon页面渲染
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<view class="yzr" v-if="showStyle === 2">
|
<view class="yzr" v-if="showStyle === 2">
|
||||||
<u-image src="/static/cjal/anl_tu.png" width="156rpx" height="156rpx"></u-image>
|
<u-image src="/static/cjal/anl_tu.png" width="156rpx" height="156rpx"></u-image>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-container">
|
<view class="list-container" @click="enterDetail()">
|
||||||
<view class="text-area">
|
<view class="text-area">
|
||||||
<text>{{shopInfo.tt}}</text>
|
<text>{{shopInfo.tt}}</text>
|
||||||
|
|
||||||
@@ -141,6 +141,18 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
enterDetail() {
|
||||||
|
// console.log("进入详情页面");
|
||||||
|
const query = this.$u.queryParams({
|
||||||
|
id: this.shopInfo.id,
|
||||||
|
type: this.shopInfo.type,
|
||||||
|
search: 1
|
||||||
|
})
|
||||||
|
console.log("query", query);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/detail/detail' + `${query}`
|
||||||
|
})
|
||||||
|
},
|
||||||
handleEdit(searchid) {
|
handleEdit(searchid) {
|
||||||
// TODO 完成页面跳转
|
// TODO 完成页面跳转
|
||||||
console.log("点击了编辑ID为", searchid);
|
console.log("点击了编辑ID为", searchid);
|
||||||
@@ -221,6 +233,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
>text {
|
>text {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/detail/detail",
|
"path": "pages/detail/detail",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "商品详情",
|
"navigationBarTitleText": "商铺详情",
|
||||||
"navigationBarTextStyle": "white",
|
"navigationBarTextStyle": "white",
|
||||||
"navigationBarBackgroundColor": "#339967",
|
"navigationBarBackgroundColor": "#339967",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="detail" ref="viewref">
|
<view class="detail" ref="viewref">
|
||||||
<view class="swiper">
|
<view class="swiper" v-if="search">
|
||||||
<u-swiper :list="shopInfo.pics" height="500rpx" radius="0"></u-swiper>
|
<u-swiper :list="shopInfo.pics" height="500rpx" radius="0"></u-swiper>
|
||||||
</view>
|
</view>
|
||||||
<view class="sub-detail u-flex">
|
<view class="sub-detail u-flex">
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<view class="location-detail">
|
<view class="location-detail">
|
||||||
<text>行业:{{shopInfo.trade1}}</text>
|
<text>行业:{{shopInfo.trade1}}</text>
|
||||||
<text>区域:{{shopInfo.area1}}</text>
|
<text>区域:{{shopInfo.area1}}</text>
|
||||||
<text>地址:{{shopInfo.adress}}</text>
|
<text v-if="search">地址:{{shopInfo.adress}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="bgc">
|
<view class="bgc">
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
</u-modal>
|
</u-modal>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bug-figure">
|
<view v-if="search" class="bug-figure">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -79,11 +79,17 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
shopInfo: {},
|
shopInfo: {},
|
||||||
showM: false
|
showM: false,
|
||||||
|
search: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad: function(options) {
|
onLoad: function(options) {
|
||||||
console.log('detail', options);
|
console.log('detail', options);
|
||||||
|
if (options.search == "1") {
|
||||||
|
this.search = false
|
||||||
|
} else {
|
||||||
|
this.search = true
|
||||||
|
}
|
||||||
//点击轮播图跳转详情, 传递的参数id, type
|
//点击轮播图跳转详情, 传递的参数id, type
|
||||||
if (options.id !== undefined && options.type !== undefined) {
|
if (options.id !== undefined && options.type !== undefined) {
|
||||||
this.getDetail(options.type, options.id)
|
this.getDetail(options.type, options.id)
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<view class="head-img">
|
<!-- <view class="head-img">
|
||||||
<u-image
|
<u-image :src="headimg" width=100% height=200rpx radius="10px"></u-image>
|
||||||
:src="headimg"
|
</view> -->
|
||||||
width=100%
|
|
||||||
height=200rpx
|
|
||||||
radius="10px"
|
|
||||||
></u-image>
|
|
||||||
</view>
|
|
||||||
<view>
|
<view>
|
||||||
<SearchShopList :show-style="2"></SearchShopList>
|
<SearchShopList :show-style="2" :searchInfoList="shopInfoList"></SearchShopList>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -19,10 +14,20 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
headimg: "https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg",
|
headimg: "https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg",
|
||||||
|
shopInfoList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getInfo()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getInfo() {
|
||||||
|
this.$api.getSuccList().then(res => {
|
||||||
|
this.shopListLength = res.data.data.length
|
||||||
|
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
||||||
|
console.log(this.shopInfoList);
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -31,14 +36,15 @@
|
|||||||
page {
|
page {
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.marginLR10 {
|
.marginLR10 {
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.head-img {
|
.head-img {
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 200rpx;
|
height: 200rpx;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
</style>
|
|
||||||
@@ -10,65 +10,108 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
<DropDown></DropDown>
|
<DropDown @getQueryInfo="getShopList"></DropDown>
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<ShowShopList :showStyle="2" :adlinkPath = "adlinkPath" :listType="3"/>
|
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath" :listType="3" :shopInfoList="shopInfoList" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import DropDownItem from "@/components/DropDown/DropDownItem.vue"
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
DropDownItem
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
adlinkPath: "/pages/publish/publishRent/publishRent"
|
adlinkPath: "/pages/publish/publishRent/publishRent",
|
||||||
|
shopInfoList: [],
|
||||||
|
pageSize: 5,
|
||||||
|
pageNum: 1,
|
||||||
|
customQuery: {},
|
||||||
|
shopListLength: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.shopInfoList.length !== 0) {
|
||||||
|
this.pageNum++
|
||||||
|
this.getShopList()
|
||||||
|
console.log("触底加载");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getShopList()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getShopList(q) {
|
||||||
|
let query = this.getQueryInfo(q)
|
||||||
|
console.log("listquery", query);
|
||||||
|
this.$api.getShopList(query).then(res => {
|
||||||
|
this.shopListLength = res.data.data.length
|
||||||
|
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
||||||
|
console.log(this.shopInfoList);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getQueryInfo(query) {
|
||||||
|
console.log("getQueryInfo", query);
|
||||||
|
const q = this.$u.queryParams({
|
||||||
|
type: 3,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
pageNum: this.pageNum,
|
||||||
|
...query
|
||||||
|
})
|
||||||
|
this.customQuery = q
|
||||||
|
return q
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page{
|
page {
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
}
|
}
|
||||||
.marginLR10{
|
|
||||||
|
.marginLR10 {
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
}
|
}
|
||||||
.search-box-bg{
|
|
||||||
|
.search-box-bg {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
|
|
||||||
.bug-fix {
|
.bug-fix {
|
||||||
transform: translateY(-20rpx);
|
transform: translateY(-20rpx);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20rpx;
|
height: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-box {
|
.search-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
width: 84.6%;
|
width: 84.6%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
|
|
||||||
.search-box-input {
|
.search-box-input {
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
opacity: 0.85;
|
opacity: 0.85;
|
||||||
|
|
||||||
.u-border {
|
.u-border {
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
.u-input__content {
|
.u-input__content {
|
||||||
height: 62rpx;
|
height: 62rpx;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
.u-input__content__field-wrapper__field {
|
.u-input__content__field-wrapper__field {
|
||||||
font-size: 26rpx !important;
|
font-size: 26rpx !important;
|
||||||
}
|
}
|
||||||
@@ -77,5 +120,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
</style>
|
|
||||||
@@ -10,65 +10,108 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
<DropDown></DropDown>
|
<DropDown @getQueryInfo="getShopList"></DropDown>
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath" :listType="4"/>
|
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath" :listType="4" :shopInfoList="shopInfoList" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import DropDownItem from "@/components/DropDown/DropDownItem.vue"
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
DropDownItem
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
adlinkPath: "/pages/publish/publishInvestment/publishInvestment"
|
adlinkPath: "/pages/publish/publishInvestment/publishInvestment",
|
||||||
|
shopInfoList: [],
|
||||||
|
pageSize: 5,
|
||||||
|
pageNum: 1,
|
||||||
|
customQuery: {},
|
||||||
|
shopListLength: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.shopInfoList.length !== 0) {
|
||||||
|
this.pageNum++
|
||||||
|
this.getShopList()
|
||||||
|
console.log("触底加载");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getShopList()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getShopList(q) {
|
||||||
|
let query = this.getQueryInfo(q)
|
||||||
|
console.log("listquery", query);
|
||||||
|
this.$api.getShopList(query).then(res => {
|
||||||
|
this.shopListLength = res.data.data.length
|
||||||
|
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
||||||
|
console.log(this.shopInfoList);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getQueryInfo(query) {
|
||||||
|
console.log("getQueryInfo", query);
|
||||||
|
const q = this.$u.queryParams({
|
||||||
|
type: 4,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
pageNum: this.pageNum,
|
||||||
|
...query
|
||||||
|
})
|
||||||
|
this.customQuery = q
|
||||||
|
return q
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page{
|
page {
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
}
|
}
|
||||||
.marginLR10{
|
|
||||||
|
.marginLR10 {
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
}
|
}
|
||||||
.search-box-bg{
|
|
||||||
|
.search-box-bg {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
|
|
||||||
.bug-fix {
|
.bug-fix {
|
||||||
transform: translateY(-20rpx);
|
transform: translateY(-20rpx);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20rpx;
|
height: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-box {
|
.search-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
width: 84.6%;
|
width: 84.6%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
|
|
||||||
.search-box-input {
|
.search-box-input {
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
opacity: 0.85;
|
opacity: 0.85;
|
||||||
|
|
||||||
.u-border {
|
.u-border {
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
.u-input__content {
|
.u-input__content {
|
||||||
height: 62rpx;
|
height: 62rpx;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
.u-input__content__field-wrapper__field {
|
.u-input__content__field-wrapper__field {
|
||||||
font-size: 26rpx !important;
|
font-size: 26rpx !important;
|
||||||
}
|
}
|
||||||
@@ -77,5 +120,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
</style>
|
|
||||||
@@ -10,65 +10,107 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
<DropDown></DropDown>
|
<DropDown @getQueryInfo="getShopList"></DropDown>
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<SearchShopList :showStyle="1"/>
|
<SearchShopList :showStyle="1" :searchInfoList="searchInfoList" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import DropDownItem from "@/components/DropDown/DropDownItem.vue"
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
DropDownItem
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
pageSize: 5,
|
||||||
|
pageNum: 1,
|
||||||
|
searchInfoList: [],
|
||||||
|
customQuery: {},
|
||||||
|
searchListLength: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.searchListLength !== 0) {
|
||||||
|
this.pageNum++
|
||||||
|
this.getShopList()
|
||||||
|
console.log("触底加载");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getShopList()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getShopList(q) {
|
||||||
|
let query = this.getQueryInfo(q)
|
||||||
|
console.log("listquery", query);
|
||||||
|
this.$api.getShopList(query).then(res => {
|
||||||
|
this.searchListLength = res.data.data.length
|
||||||
|
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
|
||||||
|
console.log(this.searchInfoList);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getQueryInfo(query) {
|
||||||
|
console.log("getQueryInfo", query);
|
||||||
|
const q = this.$u.queryParams({
|
||||||
|
type: 2,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
pageNum: this.pageNum,
|
||||||
|
...query
|
||||||
|
})
|
||||||
|
this.customQuery = q
|
||||||
|
return q
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page{
|
page {
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
}
|
}
|
||||||
.marginLR10{
|
|
||||||
|
.marginLR10 {
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
}
|
}
|
||||||
.search-box-bg{
|
|
||||||
|
.search-box-bg {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
|
|
||||||
.bug-fix {
|
.bug-fix {
|
||||||
transform: translateY(-20rpx);
|
transform: translateY(-20rpx);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20rpx;
|
height: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-box {
|
.search-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
width: 84.6%;
|
width: 84.6%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
|
|
||||||
.search-box-input {
|
.search-box-input {
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
opacity: 0.85;
|
opacity: 0.85;
|
||||||
|
|
||||||
.u-border {
|
.u-border {
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
.u-input__content {
|
.u-input__content {
|
||||||
height: 62rpx;
|
height: 62rpx;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
.u-input__content__field-wrapper__field {
|
.u-input__content__field-wrapper__field {
|
||||||
font-size: 26rpx !important;
|
font-size: 26rpx !important;
|
||||||
}
|
}
|
||||||
@@ -77,5 +119,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
</style>
|
|
||||||
@@ -10,65 +10,108 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
<DropDown></DropDown>
|
<DropDown @getQueryInfo="getShopList"></DropDown>
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<ShowShopList :showStyle="1"/>
|
<ShowShopList :showStyle="1" :shopInfoList="shopInfoList" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import DropDownItem from "@/components/DropDown/DropDownItem.vue"
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
DropDownItem
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
shopInfoList: [],
|
||||||
|
pageSize: 5,
|
||||||
|
pageNum: 1,
|
||||||
|
customQuery: {},
|
||||||
|
shopListLength: '',
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.shopInfoList.length !== 0) {
|
||||||
|
this.pageNum++
|
||||||
|
this.getShopList()
|
||||||
|
console.log("触底加载");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getShopList()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getShopList(q) {
|
||||||
|
let query = this.getQueryInfo(q)
|
||||||
|
console.log("listquery", query);
|
||||||
|
this.$api.getShopList(query).then(res => {
|
||||||
|
this.shopListLength = res.data.data.length
|
||||||
|
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
||||||
|
console.log(this.shopInfoList);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getQueryInfo(query) {
|
||||||
|
console.log("getQueryInfo", query);
|
||||||
|
const q = this.$u.queryParams({
|
||||||
|
type: 1,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
pageNum: this.pageNum,
|
||||||
|
...query
|
||||||
|
})
|
||||||
|
this.customQuery = q
|
||||||
|
return q
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page{
|
page {
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
}
|
}
|
||||||
.marginLR10{
|
|
||||||
|
.marginLR10 {
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
}
|
}
|
||||||
.search-box-bg{
|
|
||||||
|
.search-box-bg {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
|
|
||||||
.bug-fix {
|
.bug-fix {
|
||||||
transform: translateY(-20rpx);
|
transform: translateY(-20rpx);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20rpx;
|
height: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-box {
|
.search-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
width: 84.6%;
|
width: 84.6%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
|
|
||||||
.search-box-input {
|
.search-box-input {
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
opacity: 0.85;
|
opacity: 0.85;
|
||||||
|
|
||||||
.u-border {
|
.u-border {
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
.u-input__content {
|
.u-input__content {
|
||||||
height: 62rpx;
|
height: 62rpx;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
.u-input__content__field-wrapper__field {
|
.u-input__content__field-wrapper__field {
|
||||||
font-size: 26rpx !important;
|
font-size: 26rpx !important;
|
||||||
}
|
}
|
||||||
@@ -77,5 +120,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
</style>
|
|
||||||
Reference in New Issue
Block a user