作者 徐强

提交

... ... @@ -212,6 +212,7 @@
...mapState(["userinfo"])
},
onLoad(){
uni.setStorageSync('refreshFindWonderful',false)
this.param.page = 1
this.last_page = 0
this.current_page = 1
... ... @@ -219,6 +220,18 @@
this.showWaterFalls = false
this.getData()
},
onShow(){
console.log('是否刷新帖子',uni.getStorageSync('refreshFindWonderful'))
if(uni.getStorageSync('refreshFindWonderful')){
uni.setStorageSync('refreshFindWonderful',false)
this.param.page = 1
this.last_page = 0
this.current_page = 1
this.list = []
this.showWaterFalls = false
this.getData()
}
},
onPullDownRefresh(){
this.param.page = 1
this.last_page = 0
... ...
... ... @@ -382,6 +382,8 @@
this.$request('/article/del',{article_id:this.article_id}).then((res)=>{
console.log('删除故事',res)
if(res.code == 1){
uni.setStorageSync('refreshMy',true)
uni.setStorageSync('refreshFindWonderful',true)
uni.navigateBack({
delta:1
})
... ...
... ... @@ -304,6 +304,8 @@
console.log(retMsg,res)
if(res.code == 1){
this.handle = 'publish'
uni.setStorageSync('refreshMy',true)
uni.setStorageSync('refreshFindWonderful',true)
uni.navigateBack({
delta:1
})
... ...
... ... @@ -313,9 +313,20 @@
...mapState(["isLogin","userinfo","isSDKReady"])
},
onLoad(){
uni.setStorageSync('refreshMy',false)
this.getData()
},
onShow(){
console.log('是否刷新帖子',uni.getStorageSync('refreshMy'))
if(uni.getStorageSync('refreshMy')){
uni.setStorageSync('refreshMy',false)
this.showList = false
this.param.page = 1
this.last_page = 0
this.current_page = 1
this.list = []
this.getData()
}
//获取成为地主图片
this.$request('/common/getConfig',{type:'1'}).then((res)=>{
this.becomeLandImg = res.data.landlord_index
... ...
... ... @@ -19,6 +19,7 @@ const store=new Vuex.Store({
noReadNum:0,
attrVal:[],//detailAttr里的valindex [0,0]
attrTxt:'请选择商品规格尺寸',
refreshStory:false,
isLogin:false,
userinfo:uni.getStorageSync('userinfo')?JSON.parse(uni.getStorageSync('userinfo')):{},
isSDKReady: false ,// TIM SDK 是否 ready
... ... @@ -28,6 +29,12 @@ const store=new Vuex.Store({
currentMessageList:[], //消息列表
},
mutations:{
setRefreshStory(state,data){
state.refreshStory = data
},
defaultRefreshStory(state){
state.refreshStory = false
},
setLandParam(state,data){
state.landParam = data
},
... ...