diff --git a/pages/published/published.vue b/pages/published/published.vue
index 25ff32b..7b05f8a 100644
--- a/pages/published/published.vue
+++ b/pages/published/published.vue
@@ -8,11 +8,12 @@
-
-
-
-
-
+
+
+
+
+
+
@@ -21,93 +22,128 @@
export default {
data() {
return {
- titletext:'',
- listId:'',
- matchList:[]
+ titletext: '',
+ listId: '',
+ 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: {
- getMatch(){
- this.$api.getMyMatch().then(res => {
- this.macthList = res.data.data
- console.log(res);
+ getMatch() {
+ this.$api.getMyMatch({
+ pageSize: this.matchPageSize,
+ 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){
- this.$api.getMyPublished(type).then(res => {
- console.log(res);
+ getMyPublished(type) {
+ this.$api.getMyPublished({
+ type: type,
+ pageSize: this.pageSize,
+ pageNum: this.pageNum
+ }).then(res => {
+ console.log('发布信息', res);
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) {
- wx.setNavigationBarTitle({
- title: option.titletext
- })
+ onLoad: function(option) {
+ wx.setNavigationBarTitle({
+ title: option.titletext
+ })
this.titletext = option.titletext
- if(this.titletext == '发布的店铺转让'){
+ if (this.titletext == '发布的店铺转让') {
this.listId = 0
this.getMyPublished(1)
}
- if(this.titletext == '发布的找店选址'){
+ if (this.titletext == '发布的找店选址') {
this.listId = 1
this.getMyPublished(2)
}
-
- if(this.titletext == '发布的项目招商'){
+ if (this.titletext == '发布的店铺出租') {
this.listId = 2
- this.getMyPublished(4)
- }
- if(this.titletext == '发布的店铺出租'){
- this.listId = 3
this.getMyPublished(3)
}
- if(this.titletext == '我的匹配'){
+ if (this.titletext == '发布的项目招商') {
+ this.listId = 3
+ this.getMyPublished(4)
+ }
+
+ if (this.titletext == '我的匹配') {
this.listId = 4
- this.getMatch()
- }
-
- },
- computed:{
-
+ this.getMatch()
+ }
+
+ },
+ computed: {
+
}
}
+ }
+
+ page {
+ background-color: #F8F8F8;
+ }
+
+ .content {
+ margin: 0 10px;
+ }
+
\ No newline at end of file
diff --git a/service/request.js b/service/request.js
index eb65803..4545818 100644
--- a/service/request.js
+++ b/service/request.js
@@ -159,7 +159,7 @@ const apiService = {
})
},
// 获取详情
- getShopDetail(type,id) {
+ getShopDetail(type, id) {
const url = `/home/adetail/?type=${type}&id=${id}`
return new Promise((resolve, reject) => {
resolve(service.get(url))
@@ -225,10 +225,10 @@ const apiService = {
})
},
//获取我的匹配
- getMyMatch() {
+ getMyMatch(data) {
const url = `/center/match/`
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`
- return new Promise((resolve,reject) => {
+ return new Promise((resolve, reject) => {
console.log(data);
- resolve(service.post(url,data))
+ resolve(service.post(url, data))
})
},
//获取商铺列表
- getShopList(query){
+ getShopList(query) {
const url = `/shop/alllist${query}`
- return new Promise((resolve,reject) => {
+ return new Promise((resolve, reject) => {
resolve(service.get(url))
})
},
//发布店铺转让
- publishTransfer(data){
+ publishTransfer(data) {
const url = `/shop/transfer/`
return new Promise((resolve, reject) => {
resolve(service.post(url, data))
})
},
//发布店铺出租
- publishRent(data){
+ publishRent(data) {
const url = `/shop/rent/`
return new Promise((resolve, reject) => {
resolve(service.post(url, data))
})
},
//发布找店地址
- publishAddress(data){
+ publishAddress(data) {
const url = `/shop/selection/`
return new Promise((resolve, reject) => {
resolve(service.post(url, data))
})
},
//发布项目招商
- publishInvestment(data){
+ publishInvestment(data) {
const url = `/shop/investment/`
return new Promise((resolve, reject) => {
resolve(service.post(url, data))
})
},
// 获得成交案例
- getSuccList(type){
+ getSuccList(type) {
if (!type) {
type = 1
}
const url = `/shop/succ/?type=${type}`
- return new Promise((resolve,reject) => {
+ return new Promise((resolve, reject) => {
resolve(service.get(url))
})
},
//获取个人发布过的信息
- getMyPublished(type){
- const url = `/center/mypub/?type=${type}`
- return new Promise((resolve,reject) => {
- resolve(service.post(url))
+ getMyPublished(data) {
+ const url = `/center/mypub/`
+ return new Promise((resolve, reject) => {
+ resolve(service.post(url, data))
})
}
}