添加页面

This commit is contained in:
wangxiaowei
2025-12-15 17:53:24 +08:00
parent ad0ec0f7a1
commit 4559c450fa
44 changed files with 4342 additions and 2413 deletions

View File

@ -0,0 +1,103 @@
<route lang="jsonc" type="page">{
"layout": "default",
"style": {
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#fff"
}
}</route>
<template>
<view>
<view>
<navbar title="用户列表" custom-class="!bg-[transparent]"></navbar>
</view>
<view>
<mescroll-body ref="mescrollItem0" @init="mescrollInit" @down="downCallback" @up="UserList.upCallback" :down="downOption" :up="upOption">
<view class="mb-22rpx">
<view class="mx-64rpx flex justify-between items-center mb-10rpx">
<view class="flex items-center" @click="router.navigateTo('/bundle/user/user-detail')">
<wd-img width="100rpx" height='100rpx' src="https://shchazhi.oss-cn-hangzhou.aliyuncs.com/fronted/icon/icon_avatar.png" :round="true"></wd-img>
<view class="ml-20rpx">
<view class="flex items-center">
<view class="font-bold text-28rpx text-[#303133] leading-40rpx mr-12rpx">用户昵称</view>
<!-- TODO 如果是vip的话才显示这个皇冠 -->
<view>
<wd-img width="40rpx" height='40rpx' :src="`${OSS}icon/icon_crown.png`"></wd-img>
</view>
</view>
<view class="mt-14rpx font-400 text-26rpx text-[#303133] leading-36rpx">13525626532</view>
<view class="mt-10rpx text-24rpx text-[#F29747] leading-34rpx w-400rpx line-1">这里是备注信息备注信息这里是备注信息备注信息</view>
</view>
</view>
<view @click="UserList.handleCall">
<wd-img width="64rpx" height='64rpx' :src="`${OSS}icon/icon_phone3.png`"></wd-img>
</view>
</view>
<view class="mx-30rpx">
<wd-gap height="2rpx" bg-color="#E5E5E5"></wd-gap>
</view>
</view>
</mescroll-body>
</view>
</view>
</template>
<script lang="ts" setup>
import { router } from '@/utils/tools'
import { toTimes, copy } from '@/utils/tools'
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js"
// mescroll
const { mescrollInit, downCallback, getMescroll } = useMescroll(onPageScroll, onReachBottom) // 调用mescroll的hook
const downOption = {
auto: true
}
const upOption = {
auto: true,
textNoMore: '~ 已经到底啦 ~', //无更多数据的提示
}
const list = ref<Array<any>>([]) // 茶室列表
const OSS = inject('OSS')
onLoad((args) => {
})
const UserList = {
/**
* 分页加载
* @param mescroll
*/
upCallback: (mescroll) => {
// 需要留一下数据为空的时候显示的空数据图标内容
// getTeaRoomOrderList(filter).then((res) => {
// const curPageData = res.list || [] // 当前页数据
// if(mescroll.num == 1) list.value = [] // 第一页需手动制空列表
// list.value = list.value.concat(curPageData) //追加新数据
// mescroll.endSuccess(curPageData.length, Boolean(res.more))
// }).catch(() => {
mescroll.endErr() // 请求失败, 结束加载
// })
},
/**
* 电话
* @param phone
*/
handleCall: (phone) => {
uni.makePhoneCall({
phoneNumber: phone
})
}
}
</script>
<style lang="scss">
page {
background-color: #fff;
}
</style>