update:新增装修分类商品组件,新增未登录不给看用户帖子
This commit is contained in:
parent
9e8d512bf0
commit
a1524b7e9a
1447
components/item-list.vue
Normal file
1447
components/item-list.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -877,7 +877,12 @@
|
|||||||
borderBottomRightRadius: (item.borderBottomRightRadius || 0) + 'px',
|
borderBottomRightRadius: (item.borderBottomRightRadius || 0) + 'px',
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
}" v-if="item.eltmType == 102"></store-lists>
|
}" v-if="item.eltmType == 102"></store-lists>
|
||||||
|
<product-lists :id="'product-'+ uniId" :uniId="uniId" :isFilterFixed="isFilterFixed" :fixTop="fixTop"
|
||||||
|
:isShowFilter="true" :options="item.eltm104"
|
||||||
|
:style="{backgroundColor:item.bgColor, borderTopLeftRadius: (item.borderTopLeftRadius||0) + 'px', borderTopRightRadius: (item.borderTopRightRadius||0) + 'px', borderBottomLeftRadius: (item.borderBottomLeftRadius||0) + 'px', borderBottomRightRadius: (item.borderBottomRightRadius||0) + 'px', overflow: 'hidden'}"
|
||||||
|
v-if="item.eltmType==104">
|
||||||
|
</product-lists>
|
||||||
|
|
||||||
<guess-you-like ref="guessYouLike" :uniId="uniId" :isFilterTop0="true" :isShowFilter="item.eltm103.isShowFilter"
|
<guess-you-like ref="guessYouLike" :uniId="uniId" :isFilterTop0="true" :isShowFilter="item.eltm103.isShowFilter"
|
||||||
:isShowLoading="item.eltm103.isShowLoading" :optionStr="item.eltm103.options"
|
:isShowLoading="item.eltm103.isShowLoading" :optionStr="item.eltm103.options"
|
||||||
:viewtype="item.eltm103.viewtype * 1" :titleText="item.eltm103.title" :titleColor="item.eltm103.titleColor"
|
:viewtype="item.eltm103.viewtype * 1" :titleText="item.eltm103.title" :titleColor="item.eltm103.titleColor"
|
||||||
@ -903,7 +908,7 @@ import diyCountdown from "../../components/themes/diy-countdown";
|
|||||||
import guessYouLike from "@/components/product-list.vue";
|
import guessYouLike from "@/components/product-list.vue";
|
||||||
import storeLists from "@/components/store-lists.vue";
|
import storeLists from "@/components/store-lists.vue";
|
||||||
import loginPopup from "@/components/loginPopup.vue";
|
import loginPopup from "@/components/loginPopup.vue";
|
||||||
|
import productLists from '@/components/item-list.vue'
|
||||||
import { mapState, mapMutations } from "vuex";
|
import { mapState, mapMutations } from "vuex";
|
||||||
import $ from "../../helpers/util";
|
import $ from "../../helpers/util";
|
||||||
|
|
||||||
@ -915,6 +920,7 @@ export default {
|
|||||||
wxParse,
|
wxParse,
|
||||||
diyCountdown,
|
diyCountdown,
|
||||||
loginPopup,
|
loginPopup,
|
||||||
|
productLists
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
BgConfig: {
|
BgConfig: {
|
||||||
|
|||||||
@ -72,8 +72,25 @@
|
|||||||
@showLogin="handerShowLogin"
|
@showLogin="handerShowLogin"
|
||||||
></diy>
|
></diy>
|
||||||
|
|
||||||
<WaterfallsFlow :wfList="MemberPostsList" @itemTap="choose" />
|
<!-- <WaterfallsFlow :wfList="MemberPostsList" @itemTap="choose" /> -->
|
||||||
|
|
||||||
|
<view class="waterfalls-container">
|
||||||
|
<WaterfallsFlow
|
||||||
|
:wfList="MemberPostsList"
|
||||||
|
v-if="hasLogin"
|
||||||
|
@itemTap="choose"
|
||||||
|
/>
|
||||||
|
<view v-else class="login-tip">
|
||||||
|
<text class="tip-text">更多精彩内容请先登录后可查看</text>
|
||||||
|
<button
|
||||||
|
class="login-btn"
|
||||||
|
@tap="handerShowLogin"
|
||||||
|
>
|
||||||
|
去登录
|
||||||
|
</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="m-loading-box" style="margin-top: 120rpx">
|
<view class="m-loading-box" style="margin-top: 120rpx">
|
||||||
<block v-if="ispage">
|
<block v-if="ispage">
|
||||||
<view class="u-loadmore">
|
<view class="u-loadmore">
|
||||||
@ -259,8 +276,9 @@ export default {
|
|||||||
this.setData({
|
this.setData({
|
||||||
refresh: true,
|
refresh: true,
|
||||||
});
|
});
|
||||||
|
if (this.hasLogin && !this.is_loaded) {
|
||||||
|
this.initData(false);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onReady() {
|
onReady() {
|
||||||
@ -343,7 +361,13 @@ export default {
|
|||||||
onPageScroll: function (e) {
|
onPageScroll: function (e) {
|
||||||
this.scroll(e);
|
this.scroll(e);
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
hasLogin(newVal) {
|
||||||
|
if (newVal) { // 登录成功时
|
||||||
|
this.initData(true); // 强制刷新数据
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations([
|
...mapMutations([
|
||||||
"logout",
|
"logout",
|
||||||
@ -450,6 +474,7 @@ export default {
|
|||||||
//初始化数据,获取店铺分类
|
//初始化数据,获取店铺分类
|
||||||
initData: function (force_refresh) {
|
initData: function (force_refresh) {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
if (!this.hasLogin) return;
|
||||||
|
|
||||||
that.getDivModel(force_refresh);
|
that.getDivModel(force_refresh);
|
||||||
|
|
||||||
@ -523,6 +548,7 @@ export default {
|
|||||||
let that = this;
|
let that = this;
|
||||||
that.forceUserInfo(function (user) {
|
that.forceUserInfo(function (user) {
|
||||||
that.$.navigateTo({ url: "/community/community/post" });
|
that.$.navigateTo({ url: "/community/community/post" });
|
||||||
|
that.initData(true); // 登录成功后立即刷新数据
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -759,4 +785,41 @@ page {
|
|||||||
.border22 {
|
.border22 {
|
||||||
/* border: 1rpx solid #d9d9d9; */
|
/* border: 1rpx solid #d9d9d9; */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.waterfalls-container {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 300rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 40rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 未登录提示文本 */
|
||||||
|
.login-tip {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 20rpx; /* 文本和按钮间距 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.tip-text {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #666; /* 灰色文本,不刺眼 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-btn {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
background-color: #3273dc;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 28rpx;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.login-btn::after {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user