...
|
...
|
@@ -199,15 +199,6 @@ |
|
|
computed:{
|
|
|
...mapState(["userinfo","articleList"])
|
|
|
},
|
|
|
/* onLoad(){
|
|
|
uni.setStorageSync('refreshFindWonderful',false)
|
|
|
this.param.page = 1
|
|
|
this.last_page = 0
|
|
|
this.current_page = 1
|
|
|
this.list = []
|
|
|
this.showWaterFalls = false
|
|
|
this.getData()
|
|
|
}, */
|
|
|
onReady(){
|
|
|
uni.setStorageSync('refreshFindWonderful',false)
|
|
|
this.param.page = 1
|
...
|
...
|
@@ -254,20 +245,12 @@ |
|
|
getData(){
|
|
|
if(this.tabIndex == 0){
|
|
|
this.listType == 'findPlay'
|
|
|
uni.getLocation({
|
|
|
type: 'gcj02',
|
|
|
geocode: true,
|
|
|
success: (res) => {
|
|
|
this.param.city = res.address.city
|
|
|
// res.address.district
|
|
|
this.param.county = res.address.district
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
this.param.city = '北京市'
|
|
|
this.param.county = '北京市'
|
|
|
},
|
|
|
complete: (com) => {
|
|
|
console.log('111111111111',this.param)
|
|
|
//获取用户信息
|
|
|
this.$request('/user/info').then((res)=>{
|
|
|
if(res.data.area_id != ''){
|
|
|
let areaNames = Object.values(res.data.area_arr)
|
|
|
this.param.city = areaNames[1]
|
|
|
this.param.county = areaNames[2]
|
|
|
this.$request('/article/areaList',this.param).then((res)=>{
|
|
|
this.last_page = res.data.last_page
|
|
|
this.current_page = res.data.current_page
|
...
|
...
|
@@ -275,6 +258,14 @@ |
|
|
this.$store.commit('setArticleList',this.list)
|
|
|
this.showWaterFalls = true
|
|
|
})
|
|
|
}else{
|
|
|
this.$request('/article/followUserList',this.param).then((res)=>{
|
|
|
this.last_page = res.data.last_page
|
|
|
this.current_page = res.data.current_page
|
|
|
this.list = this.list.concat(res.data.data)
|
|
|
this.$store.commit('setArticleList',this.list)
|
|
|
this.showWaterFalls = true
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
}
|
...
|
...
|
|