update 修复发现需要登录没有关闭的问题
This commit is contained in:
parent
0344e669b4
commit
e52a5fd2f3
@ -973,6 +973,12 @@ export default {
|
|||||||
return "diy";
|
return "diy";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
isLogin:{
|
||||||
|
type:Boolean,
|
||||||
|
default(){
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -1110,7 +1116,16 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
tplGoToPage: function (e) {
|
tplGoToPage: function (e) {
|
||||||
|
|
||||||
let that = this;
|
let that = this;
|
||||||
|
if(this.isLogin){
|
||||||
|
|
||||||
|
if(!this.hasLogin){
|
||||||
|
that.$emit("showLogin",true)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
debugger;
|
||||||
var t = e.currentTarget.dataset;
|
var t = e.currentTarget.dataset;
|
||||||
//console.info(t);
|
//console.info(t);
|
||||||
switch (parseInt(t.type)) {
|
switch (parseInt(t.type)) {
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
:style="{ background: PageNav.window.navigationBarBackgroundColor }"
|
:style="{ background: PageNav.window.navigationBarBackgroundColor }"
|
||||||
>
|
>
|
||||||
<view class="xx-box" style="position: relative">
|
<view class="xx-box" style="position: relative">
|
||||||
|
|
||||||
<navigator hover-class="none" class="xx" url="/member/member/message">
|
<navigator hover-class="none" class="xx" url="/member/member/message">
|
||||||
<view style="position: absolute; right: 44rpx; top: 10rpx">
|
<view style="position: absolute; right: 44rpx; top: 10rpx">
|
||||||
<uni-badge :text="newMsgNum" type="red" class="badge"></uni-badge>
|
<uni-badge :text="newMsgNum" type="red" class="badge"></uni-badge>
|
||||||
@ -43,10 +44,10 @@
|
|||||||
@confirm="searchinput"
|
@confirm="searchinput"
|
||||||
/></view>
|
/></view>
|
||||||
<view class="sq_0-box">
|
<view class="sq_0-box">
|
||||||
<navigator
|
<view
|
||||||
hover-class="none"
|
hover-class="none"
|
||||||
:url="'/community/community/userspace?uid=' + userInfo.user_id"
|
|
||||||
:class="'sq_0 ' + (istop == true ? 'border22' : '')"
|
:class="'sq_0 ' + (istop == true ? 'border22' : '')"
|
||||||
|
@click="checkLoginBeforeNavigate(`/community/community/userspace?uid=${userInfo.user_id}`)"
|
||||||
>
|
>
|
||||||
<image
|
<image
|
||||||
lazy-load
|
lazy-load
|
||||||
@ -54,7 +55,7 @@
|
|||||||
:src="userInfo.user_avatar"
|
:src="userInfo.user_avatar"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
/>
|
/>
|
||||||
</navigator>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zhanwei"> </view>
|
<view class="zhanwei"> </view>
|
||||||
</view>
|
</view>
|
||||||
@ -67,6 +68,8 @@
|
|||||||
:pageId="pageId"
|
:pageId="pageId"
|
||||||
:PageNav="PageNav"
|
:PageNav="PageNav"
|
||||||
:loadPageFlag="loadPageFlag"
|
:loadPageFlag="loadPageFlag"
|
||||||
|
:isLogin="true"
|
||||||
|
@showLogin="handerShowLogin"
|
||||||
></diy>
|
></diy>
|
||||||
|
|
||||||
<WaterfallsFlow :wfList="MemberPostsList" @itemTap="choose" />
|
<WaterfallsFlow :wfList="MemberPostsList" @itemTap="choose" />
|
||||||
@ -88,7 +91,7 @@
|
|||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="u-top" v-if="plantformInfo.config.sns_enable">
|
<view class="u-top" v-if="plantformInfo && plantformInfo.config && plantformInfo.config.sns_enable">
|
||||||
<movable-area class="movableArea">
|
<movable-area class="movableArea">
|
||||||
<movable-view
|
<movable-view
|
||||||
class="movableView"
|
class="movableView"
|
||||||
@ -110,7 +113,7 @@
|
|||||||
</movable-view>
|
</movable-view>
|
||||||
</movable-area>
|
</movable-area>
|
||||||
</view>
|
</view>
|
||||||
<loginPopup :show="showLoginPopup" @close="closeLoginPopup" :showCloseIcon="false"></loginPopup>
|
<loginPopup :show="showLoginPopup" @close="closeLoginPopup" ></loginPopup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -199,12 +202,6 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
|
|
||||||
if(!this.hasLogin){
|
|
||||||
this.showLoginPopup = true
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
let view = uni.createSelectorQuery().in(this).select(".movableArea");
|
let view = uni.createSelectorQuery().in(this).select(".movableArea");
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
||||||
@ -360,6 +357,11 @@ export default {
|
|||||||
// item 返回选中 JSON 对象
|
// item 返回选中 JSON 对象
|
||||||
//console.log(item)
|
//console.log(item)
|
||||||
|
|
||||||
|
if(!this.hasLogin){
|
||||||
|
this.showLoginPopup = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
let url = "/community/community/detail?id=" + item.story_id;
|
let url = "/community/community/detail?id=" + item.story_id;
|
||||||
|
|
||||||
if (item.story_type == 4) {
|
if (item.story_type == 4) {
|
||||||
@ -378,7 +380,21 @@ export default {
|
|||||||
|
|
||||||
this.$.gopage(url);
|
this.$.gopage(url);
|
||||||
},
|
},
|
||||||
|
handerShowLogin(){
|
||||||
|
this.showLoginPopup = true
|
||||||
|
},
|
||||||
|
checkLoginBeforeNavigate(url){
|
||||||
|
if(!this.hasLogin) {
|
||||||
|
this.showLoginPopup = true
|
||||||
|
return false
|
||||||
|
}else{
|
||||||
|
uni.navigateTo({
|
||||||
|
url:url
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
getPostsList: function (force_refresh) {
|
getPostsList: function (force_refresh) {
|
||||||
let that = this;
|
let that = this;
|
||||||
var params = { page: this.page, rand: 1 };
|
var params = { page: this.page, rand: 1 };
|
||||||
@ -619,6 +635,9 @@ export default {
|
|||||||
duration: 300,
|
duration: 300,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
closeLoginPopup(){
|
||||||
|
this.showLoginPopup = false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user