邓洁 : "我的" 模块接口对接
This commit is contained in:
@@ -8,11 +8,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<ShowShopList v-if="listId == 0" class="list" :isEdit="true" :showStyle="1"></ShowShopList>
|
<ShowShopList v-if="listId == 0" :isEdit="true" :showStyle="1" :shopInfoList="searchInfoList"></ShowShopList>
|
||||||
<SearchShopList v-if="listId == 1" class="list" :is-edit="true" :showStyle="1"></SearchShopList>
|
<SearchShopList v-if="listId == 1" :searchInfoList="searchInfoList" :is-edit="true" :showStyle="1">
|
||||||
<ShowShopList v-if="listId == 2" class="list" :is-edit="true" :showStyle="2"></ShowShopList>
|
</SearchShopList>
|
||||||
<ShowShopList v-if="listId == 3" class="list" :is-edit="true" :showStyle="2"></ShowShopList>
|
<ShowShopList v-if="listId == 3" :is-edit="true" :showStyle="2" :shopInfoList="searchInfoList"></ShowShopList>
|
||||||
<ShowShopList v-if="listId == 4" class="list" :showStyle="0"></ShowShopList>
|
<ShowShopList v-if="listId == 2" :is-edit="true" :showStyle="2" :shopInfoList="searchInfoList"></ShowShopList>
|
||||||
|
<ShowShopList v-if="listId == 4" :showStyle="0" :shopInfoList="matchList"></ShowShopList>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -21,93 +22,128 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
titletext:'',
|
titletext: '',
|
||||||
listId:'',
|
listId: '',
|
||||||
matchList:[]
|
matchList: [],
|
||||||
|
shopInfoList: [],
|
||||||
|
searchInfoList: [],
|
||||||
|
matchListLength: '',
|
||||||
|
searchListLength: '',
|
||||||
|
pageSize: 5,
|
||||||
|
pageNum: 1,
|
||||||
|
matchPageSize: 5,
|
||||||
|
matchPageNum: 1,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.listId !== 4 && this.searchListLength !== 0) {
|
||||||
|
this.pageNum++
|
||||||
|
this.getMyPublished(this.listId + 1)
|
||||||
|
} else if (this.listId == 4 && this.matchListLength !== 0) {
|
||||||
|
this.matchPageNum++
|
||||||
|
this.getMatch()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getMatch(){
|
getMatch() {
|
||||||
this.$api.getMyMatch().then(res => {
|
this.$api.getMyMatch({
|
||||||
this.macthList = res.data.data
|
pageSize: this.matchPageSize,
|
||||||
console.log(res);
|
pageNum: this.matchPageNum
|
||||||
|
}).then(res => {
|
||||||
|
if (res.data.code == 1) {
|
||||||
|
this.matchListLength = res.data.data.length
|
||||||
|
this.matchList = [...this.matchList, ...res.data.data[0]]
|
||||||
|
} else {
|
||||||
|
uni.$u.toast(res.data.msg)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getMyPublished(type){
|
getMyPublished(type) {
|
||||||
this.$api.getMyPublished(type).then(res => {
|
this.$api.getMyPublished({
|
||||||
console.log(res);
|
type: type,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
pageNum: this.pageNum
|
||||||
|
}).then(res => {
|
||||||
|
console.log('发布信息', res);
|
||||||
console.log(type);
|
console.log(type);
|
||||||
|
if (res.data.code == 1) {
|
||||||
|
this.searchListLength = res.data.data.length
|
||||||
|
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
|
||||||
|
} else {
|
||||||
|
uni.$u.toast(res.data.msg)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad: function (option) {
|
onLoad: function(option) {
|
||||||
wx.setNavigationBarTitle({
|
wx.setNavigationBarTitle({
|
||||||
title: option.titletext
|
title: option.titletext
|
||||||
})
|
})
|
||||||
this.titletext = option.titletext
|
this.titletext = option.titletext
|
||||||
if(this.titletext == '发布的店铺转让'){
|
if (this.titletext == '发布的店铺转让') {
|
||||||
this.listId = 0
|
this.listId = 0
|
||||||
this.getMyPublished(1)
|
this.getMyPublished(1)
|
||||||
}
|
}
|
||||||
if(this.titletext == '发布的找店选址'){
|
if (this.titletext == '发布的找店选址') {
|
||||||
this.listId = 1
|
this.listId = 1
|
||||||
this.getMyPublished(2)
|
this.getMyPublished(2)
|
||||||
}
|
}
|
||||||
|
if (this.titletext == '发布的店铺出租') {
|
||||||
if(this.titletext == '发布的项目招商'){
|
|
||||||
this.listId = 2
|
this.listId = 2
|
||||||
this.getMyPublished(4)
|
|
||||||
}
|
|
||||||
if(this.titletext == '发布的店铺出租'){
|
|
||||||
this.listId = 3
|
|
||||||
this.getMyPublished(3)
|
this.getMyPublished(3)
|
||||||
}
|
}
|
||||||
if(this.titletext == '我的匹配'){
|
if (this.titletext == '发布的项目招商') {
|
||||||
|
this.listId = 3
|
||||||
|
this.getMyPublished(4)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.titletext == '我的匹配') {
|
||||||
this.listId = 4
|
this.listId = 4
|
||||||
this.getMatch()
|
this.getMatch()
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
computed:{
|
computed: {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.search-box {
|
.search-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
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;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
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;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
page{
|
}
|
||||||
background-color: #F8F8F8;
|
|
||||||
}
|
page {
|
||||||
|
background-color: #F8F8F8;
|
||||||
.content{
|
}
|
||||||
margin: 0 10px;
|
|
||||||
}
|
.content {
|
||||||
</style>
|
margin: 0 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -159,7 +159,7 @@ const apiService = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取详情
|
// 获取详情
|
||||||
getShopDetail(type,id) {
|
getShopDetail(type, id) {
|
||||||
const url = `/home/adetail/?type=${type}&id=${id}`
|
const url = `/home/adetail/?type=${type}&id=${id}`
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
resolve(service.get(url))
|
resolve(service.get(url))
|
||||||
@@ -225,10 +225,10 @@ const apiService = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
//获取我的匹配
|
//获取我的匹配
|
||||||
getMyMatch() {
|
getMyMatch(data) {
|
||||||
const url = `/center/match/`
|
const url = `/center/match/`
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
resolve(service.get(url))
|
resolve(service.get(url, data))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//获取行业和业态
|
//获取行业和业态
|
||||||
@@ -239,63 +239,63 @@ const apiService = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
//招募合伙
|
//招募合伙
|
||||||
toBePartner(data){
|
toBePartner(data) {
|
||||||
const url = `/center/partner`
|
const url = `/center/partner`
|
||||||
return new Promise((resolve,reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
resolve(service.post(url,data))
|
resolve(service.post(url, data))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//获取商铺列表
|
//获取商铺列表
|
||||||
getShopList(query){
|
getShopList(query) {
|
||||||
const url = `/shop/alllist${query}`
|
const url = `/shop/alllist${query}`
|
||||||
return new Promise((resolve,reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
resolve(service.get(url))
|
resolve(service.get(url))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//发布店铺转让
|
//发布店铺转让
|
||||||
publishTransfer(data){
|
publishTransfer(data) {
|
||||||
const url = `/shop/transfer/`
|
const url = `/shop/transfer/`
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
resolve(service.post(url, data))
|
resolve(service.post(url, data))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//发布店铺出租
|
//发布店铺出租
|
||||||
publishRent(data){
|
publishRent(data) {
|
||||||
const url = `/shop/rent/`
|
const url = `/shop/rent/`
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
resolve(service.post(url, data))
|
resolve(service.post(url, data))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//发布找店地址
|
//发布找店地址
|
||||||
publishAddress(data){
|
publishAddress(data) {
|
||||||
const url = `/shop/selection/`
|
const url = `/shop/selection/`
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
resolve(service.post(url, data))
|
resolve(service.post(url, data))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//发布项目招商
|
//发布项目招商
|
||||||
publishInvestment(data){
|
publishInvestment(data) {
|
||||||
const url = `/shop/investment/`
|
const url = `/shop/investment/`
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
resolve(service.post(url, data))
|
resolve(service.post(url, data))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获得成交案例
|
// 获得成交案例
|
||||||
getSuccList(type){
|
getSuccList(type) {
|
||||||
if (!type) {
|
if (!type) {
|
||||||
type = 1
|
type = 1
|
||||||
}
|
}
|
||||||
const url = `/shop/succ/?type=${type}`
|
const url = `/shop/succ/?type=${type}`
|
||||||
return new Promise((resolve,reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
resolve(service.get(url))
|
resolve(service.get(url))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//获取个人发布过的信息
|
//获取个人发布过的信息
|
||||||
getMyPublished(type){
|
getMyPublished(data) {
|
||||||
const url = `/center/mypub/?type=${type}`
|
const url = `/center/mypub/`
|
||||||
return new Promise((resolve,reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
resolve(service.post(url))
|
resolve(service.post(url, data))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user