feat(navigation): 即将上线的导航也在小程序显示,点击弹提示
- 后端API改为返回status!=0的导航(上线+即将上线) - 前端即将上线状态判断改为status===2 - 点击即将上线导航弹出'该功能暂未开放'提示
This commit is contained in:
parent
845a302718
commit
a48a4affba
|
|
@ -82,7 +82,7 @@ public class HomeService : IHomeService
|
||||||
|
|
||||||
var navigations = await _dbContext.HomeNavigations
|
var navigations = await _dbContext.HomeNavigations
|
||||||
.AsNoTracking()
|
.AsNoTracking()
|
||||||
.Where(n => n.Status == 1 && !n.IsDeleted)
|
.Where(n => n.Status != 0 && !n.IsDeleted)
|
||||||
.OrderByDescending(n => n.Sort)
|
.OrderByDescending(n => n.Sort)
|
||||||
.Select(n => new HomeNavigationDto
|
.Select(n => new HomeNavigationDto
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
@click="handleNavigationClick(item)"
|
@click="handleNavigationClick(item)"
|
||||||
>
|
>
|
||||||
<!-- 即将上线标签 -->
|
<!-- 即将上线标签 -->
|
||||||
<view v-if="item.status === 0" class="coming-soon-tag">
|
<view v-if="item.status === 2" class="coming-soon-tag">
|
||||||
<text>即将上线</text>
|
<text>即将上线</text>
|
||||||
</view>
|
</view>
|
||||||
<image
|
<image
|
||||||
|
|
@ -223,7 +223,7 @@ function handleBannerClick(item) {
|
||||||
*/
|
*/
|
||||||
function handleNavigationClick(item) {
|
function handleNavigationClick(item) {
|
||||||
// 即将上线的导航,弹出提示
|
// 即将上线的导航,弹出提示
|
||||||
if (item.status === 0) {
|
if (item.status === 2) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '该功能暂未开放',
|
title: '该功能暂未开放',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user