wangfukang 22 hours ago
parent
commit
3f169c8ca1
  1. 18
      pages/index/index.vue

18
pages/index/index.vue

@ -101,7 +101,7 @@
<!-- <img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1a02b40d853a4cfdb062fff44ec49e6a.png" <!-- <img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/1a02b40d853a4cfdb062fff44ec49e6a.png"
alt="" style="position: absolute;top: -10rpx;right: 0;width: 78rpx;height: 32rpx;"> --> alt="" style="position: absolute;top: -10rpx;right: 0;width: 78rpx;height: 32rpx;"> -->
<view class="menu-name">饭团星球</view> <view class="menu-name">饭团星球</view>
<view class="menu-desc">{{isSocialArea ? '美食搭子' : '食堂搭子'}}</view> <view class="menu-desc">{{useSocialText ? '美食搭子' : '食堂搭子'}}</view>
</view> </view>
<view class="menu-list world-store" @tap="goDetail('3')"> <view class="menu-list world-store" @tap="goDetail('3')">
<view class="world-light"></view> <view class="world-light"></view>
@ -446,10 +446,10 @@
<de-livery ref="deLiveryPage" @tabbar-visible-change="setTabBarVisible"></de-livery> <de-livery ref="deLiveryPage" @tabbar-visible-change="setTabBarVisible"></de-livery>
</view> </view>
<view class="swiper-page" v-show="currentIndex == 2"> <view class="swiper-page" v-show="currentIndex == 2">
<release-page ref="releasePage" :social-mode="isSocialArea"></release-page> <release-page ref="releasePage" :social-mode="useSocialText"></release-page>
</view> </view>
<view class="swiper-page" v-show="currentIndex == 3"> <view class="swiper-page" v-show="currentIndex == 3">
<post-list ref="postListPage" :social-mode="isSocialArea"></post-list> <post-list ref="postListPage" :social-mode="useSocialText"></post-list>
</view> </view>
<view class="swiper-page" v-show="currentIndex == 4"> <view class="swiper-page" v-show="currentIndex == 4">
<my-center ref="myCenterPage"></my-center> <my-center ref="myCenterPage"></my-center>
@ -567,7 +567,7 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<tab-bar v-if="isTabBarVisible" ref="tabBar" :width="width" @tab-index="changeIndex" :currentIndex="currentIndex" :socialMode="isSocialArea" :socialDeliveryEnabled="socialDeliveryEnabled"></tab-bar> <tab-bar v-if="isTabBarVisible" ref="tabBar" :width="width" @tab-index="changeIndex" :currentIndex="currentIndex" :socialMode="isSocialArea" :socialTextMode="useSocialText" :socialDeliveryEnabled="socialDeliveryEnabled"></tab-bar>
</view> </view>
</template> </template>
<script> <script>
@ -579,6 +579,7 @@
import homeGroupPending from "@/components/tab-bar/homeGroupPending.vue"; import homeGroupPending from "@/components/tab-bar/homeGroupPending.vue";
import { getIeRealNameAuditSetting } from '@/common/ieApi.js' import { getIeRealNameAuditSetting } from '@/common/ieApi.js'
import { resolveHomeShareTarget, normalizeShareTargetPath, resolveMiniCodeSceneTarget, isShareTargetHandled, completeShareEnter, reopenShareEnter, consumeShareRedirectSuppression, rememberInviteParams, buildInviteHomeSharePath } from '@/utils/sharePath.js' import { resolveHomeShareTarget, normalizeShareTargetPath, resolveMiniCodeSceneTarget, isShareTargetHandled, completeShareEnter, reopenShareEnter, consumeShareRedirectSuppression, rememberInviteParams, buildInviteHomeSharePath } from '@/utils/sharePath.js'
import { resolveCampusTextEnabled, shouldUseSocialText } from '@/utils/areaTextMode.js'
const HOME_AD_IMAGE_CACHE_KEY = 'home_ad_image_cache_v1' const HOME_AD_IMAGE_CACHE_KEY = 'home_ad_image_cache_v1'
const HOME_POPUP_AD_SHOWN_KEY_PREFIX = 'home_popup_ad_shown_v1' const HOME_POPUP_AD_SHOWN_KEY_PREFIX = 'home_popup_ad_shown_v1'
@ -702,6 +703,7 @@
}], }],
areaName: '', areaName: '',
areaKind: 1, areaKind: 1,
campusTextEnabled: 0,
expressErrandEnabled: 1, expressErrandEnabled: 1,
errandPlanetVisible: null, errandPlanetVisible: null,
gaoxiaoList:[{ gaoxiaoList:[{
@ -845,6 +847,9 @@
isSocialArea() { isSocialArea() {
return Number(this.areaKind) === 2 return Number(this.areaKind) === 2
}, },
useSocialText() {
return shouldUseSocialText(this.areaKind, this.campusTextEnabled)
},
socialDeliveryEnabled() { socialDeliveryEnabled() {
return !this.isSocialArea || Number(this.expressErrandEnabled) !== 0 return !this.isSocialArea || Number(this.expressErrandEnabled) !== 0
}, },
@ -852,10 +857,10 @@
return this.errandPlanetVisible === null || this.errandPlanetVisible === '' || Number(this.errandPlanetVisible) !== 0 return this.errandPlanetVisible === null || this.errandPlanetVisible === '' || Number(this.errandPlanetVisible) !== 0
}, },
displayGaoxiaoList() { displayGaoxiaoList() {
return this.isSocialArea ? this.socialGaoxiaoList : this.gaoxiaoList return this.useSocialText ? this.socialGaoxiaoList : this.gaoxiaoList
}, },
gaoxiaoSuffix() { gaoxiaoSuffix() {
return this.isSocialArea ? '同城好友在拼' : '附近宿舍在拼' return this.useSocialText ? '同城好友在拼' : '附近宿舍在拼'
}, },
stickyCoverHeight() { stickyCoverHeight() {
const nav = Number(this.navBarHeight) || 0 const nav = Number(this.navBarHeight) || 0
@ -2162,6 +2167,7 @@
} }
const kind = area ? Number(area.areaKind) : 1 const kind = area ? Number(area.areaKind) : 1
this.areaKind = kind === 2 ? 2 : 1 this.areaKind = kind === 2 ? 2 : 1
this.campusTextEnabled = resolveCampusTextEnabled(area)
this.expressErrandEnabled = this.resolveExpressErrandEnabled(area) this.expressErrandEnabled = this.resolveExpressErrandEnabled(area)
this.errandPlanetVisible = this.resolveErrandPlanetVisible(area) this.errandPlanetVisible = this.resolveErrandPlanetVisible(area)
this.leaveClosedSocialDeliveryTab() this.leaveClosedSocialDeliveryTab()

Loading…
Cancel
Save