2025-09-17

下拉刷新
添加商城
This commit is contained in:
2025-09-18 09:52:30 +08:00
parent 8bd31ef288
commit c5fb91910a
4 changed files with 39 additions and 2 deletions

View File

@@ -24,7 +24,8 @@
"path": "pages/message/message", "path": "pages/message/message",
"style": { "style": {
"navigationBarTitleText": "消息", "navigationBarTitleText": "消息",
"navigationStyle": "custom" "navigationStyle": "custom",
"enablePullDownRefresh": true
} }
}, },
{ {
@@ -53,6 +54,14 @@
"navigationBarTitleText": "项目详情", "navigationBarTitleText": "项目详情",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path" : "pages/mall/mall",
"style" :
{
"navigationBarTitleText" : "商城",
"navigationStyle": "custom"
}
} }
], ],
"globalStyle": { "globalStyle": {

View File

@@ -58,6 +58,10 @@
</view> </view>
</view> </view>
<view style="margin-top: 20rpx;">
<u-button @click="openShop" type="primary" style="width: 200rpx;">商城</u-button>
</view>
</view> </view>
<Tabbar id="tabbarId"></Tabbar> <Tabbar id="tabbarId"></Tabbar>
@@ -91,6 +95,12 @@
{ url: '/static/banner/3.png' }, { url: '/static/banner/3.png' },
] ]
const openShop = () => {
uni.navigateTo({
url: '/pages/mall/mall'
})
}
onUniReady(() => { onUniReady(() => {
loadHeight() loadHeight()
}) })

13
pages/mall/mall.vue Normal file
View File

@@ -0,0 +1,13 @@
<template>
<view>
商城
</view>
</template>
<script setup lang="ts">
</script>
<style scoped lang="scss">
</style>

View File

@@ -42,7 +42,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, getCurrentInstance } from 'vue'; import { ref, computed, getCurrentInstance } from 'vue';
import { import {
onReady onReady, onPullDownRefresh
} from '@dcloudio/uni-app'; } from '@dcloudio/uni-app';
import { onReady as onUniReady } from '@dcloudio/uni-app'; import { onReady as onUniReady } from '@dcloudio/uni-app';
const instance = getCurrentInstance(); const instance = getCurrentInstance();
@@ -95,6 +95,11 @@
} }
} }
// 下拉刷新
onPullDownRefresh(() => {
uni.stopPullDownRefresh()
})
onUniReady(() => { onUniReady(() => {
loadHeight() loadHeight()