完善页面

This commit is contained in:
wangxiaowei
2025-12-29 14:39:14 +08:00
parent 14ddb7ce7b
commit 338a99a54a
15 changed files with 1347 additions and 1314 deletions

269
src/bundle/address/add.vue Normal file
View File

@ -0,0 +1,269 @@
<route lang="jsonc" type="page">
{
"layout": "default",
"style": {
"navigationStyle": "custom"
}
}
</route>
<template>
<view>
<!-- 消息弹窗 -->
<wd-message-box selector="wd-message-box-slot"></wd-message-box>
<navbar title="新增地址" :leftArrow="false" custom-class='!bg-[#F6F7F8]'></navbar>
<view class="bg-white mx-32rpx rounded-16rpx px-42rpx py-34rpx mt-32rpx">
<view class="flex items-center">
<view class="text-30rpx leading-42rpx text-[#303133] w-200rpx">选择地区</view>
<wd-picker :columns="cityColumns" v-model="form.city" use-default-slot>
<view class="flex items-center">
<wd-input readonly v-model="form.city" size="large" placeholder="请选择地区" no-border placeholderStyle="font-size: 30rpx; line-height: 42rpx; color: #c9c9c9;"></wd-input>
<wd-icon name="chevron-right" size="32rpx" color="#909399"></wd-icon>
</view>
</wd-picker>
</view>
<view class="h-2rpx bg-#F2F2F2 mt-20rpx"></view>
<view>
<view class="flex items-center">
<view class="text-30rpx leading-42rpx text-#303133 w-200rpx">地址</view>
<view @click="Add.handleChooseLocation" class="flex items-center">
<wd-input readonly v-model="form.address" size="large" placeholder="请选择地址" no-border placeholderStyle="font-size: 30rpx; line-height: 42rpx; color: #c9c9c9;"></wd-input>
<wd-icon name="chevron-right" size="32rpx" color="#909399"></wd-icon>
</view>
</view>
</view>
</view>
<view class="fixed bottom-70rpx left-0 right-0">
<view
v-if="addressId === 0"
class="bg-#4C9F44 text-#fff font-bold text-30rpx leading-42rpx mx-60rpx h-90rpx leading-90rpx text-center rounded-8rpx"
@click="Add.handleAddAddress">
确定
</view>
<view class="flex items-center justify-between mx-30rpx" v-if="addressId > 0">
<view class="w-330rpx h-90rpx leading-90rpx text-center bg-[#F6F7F8] text-#303133 rounded-8rpx mr-30rpx" @click="Add.handleDeleteAddress">删除地址</view>
<view class="w-330rpx h-90rpx leading-90rpx text-center bg-[#4C9F44] text-#FFFFFF rounded-8rpx" @click="Add.handleAddAddress">确定</view>
</view>
</view>
</view>
</template>
<script lang="ts" setup>
import { useMessage } from 'wot-design-uni'
import { useColPickerData } from '@/hooks/useColPickerData'
// import { addUserAddress, IAddUserAddressParams, deleteUserAddress, userAddressDetails, editUserAddress } from '@/api/user'
import { toast } from '@/utils/toast'
import { mobile } from '@/utils/test'
import { router } from '@/utils/tools'
const OSS = inject('OSS')
// 弹出框
const message = useMessage('wd-message-box-slot')
// 获取已开通城市
const cityColumns = ref<Array<{ label: string; value: string }>>([
{ label: '北京市', value: '110000' },
{ label: '上海市', value: '310000' },
{ label: '广州市', value: '440100' },
{ label: '深圳市', value: '440300' },
])
// 页面标题
const title = ref<string>('新增地址')
// 地址id
const addressId = ref<number>(0)
// 表单信息
const form = ref({
city: '',
address: '',
id: 0
})
onLoad((args) => {
if (args.id) {
// 编辑地址
title.value = '修改地址'
addressId.value = Number(args.id)
// Add.handleGetAddressDetails()
}
})
const Add = {
// // 确认省市区
// handleConfirmAddress: (e) => {
// form.province = e.selectedItems[0]?.label || ''
// form.province_id = Number(e.selectedItems[0]?.value) || 0
// form.city = e.selectedItems[1]?.label || ''
// form.city_id = Number(e.selectedItems[1]?.value) || 0
// form.district = e.selectedItems[2]?.label || ''
// form.district_id = Number(e.selectedItems[2]?.value) || 0
// },
// // 获取地址详情
// handleGetAddressDetails: async () => {
// const res = await userAddressDetails({
// id: addressId.value
// })
// form.contact = res.address_details.contact
// form.telephone = res.address_details.telephone
// form.province = res.address_details.province
// form.province_id = res.address_details.province_id
// console.log("🚀 ~ form.province_id :", form.province_id )
// form.city = res.address_details.city
// form.city_id = res.address_details.city_id
// form.district = res.address_details.district
// form.district_id = res.address_details.district_id
// form.address = res.address_details.address
// form.is_default = res.address_details.is_default
// isDefaultAddress.value = res.address_details.is_default === 1 ? true : false
// address.value = [
// String(res.address_details.province_id),
// String(res.address_details.city_id),
// String(res.address_details.district_id)
// ]
// console.log("🚀 ~ address.value:", address.value)
// },
// // 删除地址
// handleDeleteAddress: async () => {
// console.log("🚀 ~ 删除地址:", message)
// message.confirm({
// title: '删除地址',
// msg: '确定要删除该地址吗?',
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// cancelButtonProps: {
// customClass: '!bg-[#F6F7F8] !text-[#303133] !text-32rpx !leading-44rpx !rounded-8rpx',
// },
// confirmButtonProps: {
// customClass: '!bg-[#4C9F44] !text-[#fff] !text-32rpx !leading-44rpx !rounded-8rpx',
// }
// }).then(async (res) => {
// // 点击确认按钮回调事件
// await deleteUserAddress({
// id: addressId.value
// })
// toast.info('删除成功')
// uni.$emit('refreshAddressList')
// router.navigateBack(500)
// }).catch((res) => {
// console.log("🚀 ~ res2:", res)
// // 点击取消按钮回调事件
// })
// },
/**
* 选择地址
*/
handleChooseLocation: async () => {
uni.chooseLocation({
success: (res) => {
console.log("🚀 ~ res:", res)
// res.address: "浙江省嘉兴市南湖区景宜路"
// res.name: "嘉兴市南湖区人民政府(景宜路西)"
// res.latitude: 30.74744
// res.longitude: 120.78483
form.value.address = res.address + res.name
},
fail: (err) => {
console.log("🚀 ~ err:", err)
}
})
},
/**
* 添加地址
*/
handleAddAddress: async () => {
// if (!form.address) {
// toast.info('请填写地址信息')
// return
// }
// // form.is_default = isDefaultAddress.value ? 1 : 0
// if (addressId.value > 0 ) {
// // 编辑地址
// form.id = addressId.value
// // await editUserAddress(form)
// } else {
// // await addUserAddress(form)
// }
// uni.$emit('refreshAddressList')
// router.navigateBack(500)
}
// // 添加地址
// handleAddAddress: async () => {
// if (!form.contact) {
// toast.info('请填写联系人')
// return
// }
// if (!mobile(form.telephone)) {
// toast.info('请填写正确手机号格式')
// return
// }
// if (!form.province || !form.city || !form.district) {
// toast.info('请选择省市区')
// return
// }
// if (!form.address) {
// toast.info('请填写具体地址')
// return
// }
// form.is_default = isDefaultAddress.value ? 1 : 0
// if (addressId.value > 0 ) {
// // 编辑地址
// form.id = addressId.value
// await editUserAddress(form)
// } else {
// await addUserAddress(form)
// }
// uni.$emit('refreshAddressList')
// router.navigateBack(500)
// },
// handleSleep: async (second: number = 1) => {
// return new Promise((resolve) => {
// setTimeout(() => {
// resolve(true)
// }, 1000 * second)
// })
// }
}
</script>
<style lang="scss">
page {
background-color: $cz-page-background;
}
.add-address {
:deep() {
.wd-cell {
padding-left: 12px;
}
}
}
</style>

223
src/bundle/address/list.vue Normal file
View File

@ -0,0 +1,223 @@
<route lang="jsonc" type="page">
{
"layout": "default",
"style": {
"navigationStyle": "custom"
}
}
</route>
<template>
<view class="">
<!-- 消息弹窗 -->
<wd-message-box selector="wd-message-box-slot"></wd-message-box>
<view>
<navbar title="地址簿" custom-class='!bg-[#F6F7F8]' :leftArrow="false"></navbar>
</view>
<view class="">
<!-- 地址为空显示 -->
<view class="text-center" v-if="addressList.length === 0">
<view class="mt-318rpx">
<wd-img width="260rpx" height='260rpx' :src="`${OSS}icon/icon_address_empty.png`"></wd-img>
</view>
<view class="text-28rpx leading-40rpx text-[#8A94A3] mt-18rpx">还没有地址,请尽快新建地址</view>
</view>
<!-- <wd-radio-group v-model="addressId" shape="button" >
<wd-radio :value="1">沃特</wd-radio>
<wd-radio :value="2">商家后台</wd-radio>
</wd-radio-group> -->
<!-- 地址列表 -->
<!-- <view class="mx-30rpx mt-20rpx" v-if="addressList.length > 0">
<view class="bg-#fff rounded-16rpx px-30rpx py-36rpx flex items-center mb-20rpx" v-for="(item, index) in addressList" :key="index">
<view @click="List.handleChooseAddress(item)">
<view class="flex items-center">
<view class="mr-10rpx">
<wd-tag color="#4C9F44" bg-color="#F3F3F3" custom-class="!rounded-4rpx !px-10rpx" v-if="item.is_default">默认</wd-tag>
</view>
<view class="text-30rpx leading-42rpx text-#303133">
<text class="mr-16rpx">{{ item.contact}}</text>
<text>{{ item.telephone }}</text>
</view>
</view>
<view class="w-562rpx line-1 text-26rpx leading-34rpx text-#909399 mt-10rpx">{{ item.address }}</view>
</view>
<view class="flex-1 ml-30rpx" @click="List.handleEditAddress(item.id)">
<wd-icon name="edit-outline" size="32rpx" color="#666666"></wd-icon>
</view>
</view>
</view> -->
<view class="mx-30rpx mt-38rpx address-radio">
<wd-radio-group v-model="addressId" shape="dot" >
<view class="bg-white rounded-16rpx px-40rpx py-30rpx mb-20rpx" v-for="item in addressList" :key="item.id">
<view class="">
<wd-radio :value="item.id" checked-color="#4C9F44">
<view class="flex items-center">
<wd-img :src="`${OSS}icon/icon_location5.png`" width="40rpx" height="40rpx"></wd-img>
<view class="ml-16rpx text-30rpx leading-42rpx text-[#303133]">位置1</view>
</view>
</wd-radio>
</view>
<view class="line-2 text-26rpx leading-34rpx text-[#606266] mt-16rpx">
北京市海淀区恒大新宏福苑西区20号楼2单元301
</view>
<view class="flex items-center justify-end mt-24rpx text-26rpx leading-34rpx text-[##303133]">
<view class="w-112rpx h-48rpx bg-[#F6F7F8] text-center leading-48rpx mr-12rpx" @click="List.handleDeleteAddress(item.id)">删除</view>
<view class="w-112rpx h-48rpx bg-[#F6F7F8] text-center leading-48rpx" @click="List.handleEditAddress(item.id)">修改</view>
</view>
</view>
</wd-radio-group>
</view>
</view>
<!-- <view
v-if="addressList.length == 0"
class="fixed bottom-70rpx left-0 right-0 bg-#4C9F44 text-#fff font-bold text-30rpx leading-42rpx mx-60rpx h-90rpx leading-90rpx text-center rounded-8rpx"
@click="router.navigateTo('/bundle/address/add')">新建地址</view> -->
<view
class="bg-white fixed left-0 right-0 bottom-0 h-152rpx flex items-center px-30rpx"
@click="router.navigateTo('/bundle/address/add')">
<view v-if="addressList.length == 0" class="w-630rpx bg-#4C9F44 text-#fff font-bold text-30rpx leading-42rpx mx-60rpx h-90rpx leading-90rpx text-center rounded-8rpx">新建地址</view>
<view class="flex items-center justify-between w-full" v-if="addressList.length > 0">
<view class="w-330rpx bg-[#F6F7F8] text-[#303133] h-90rpx text-center leading-90rpx rounded-8rpx" @click="router.navigateTo('/bundle/address/add')">新建地址</view>
<view class="w-330rpx bg-[#4C9F44] text-[#FFFFFF] h-90rpx text-center leading-90rpx rounded-8rpx" @click="List.handleUpdateLocation">位置更新</view>
</view>
</view>
</view>
</template>
<script lang="ts" setup>
// import { getUserAddress } from '@/api/user'
import type { IUserAddressListResult } from '@/api/types/user'
import { router } from '@/utils/tools'
import { useMessage } from 'wot-design-uni'
const OSS = inject('OSS')
const from = ref<string>('')
// 弹出框
const message = useMessage('wd-message-box-slot')
// 地址列表
// const addressList = ref<IUserAddressListResult[]>([])
// 选中的地址ID
const addressId = ref<number>(0)
const addressList = ref<Array<{id:number, address: string}>>([
{
id: 1,
address: '浙江省杭州市西湖区文三路138号',
},
{
id: 2,
address: '浙江省杭州市西湖区文三路138号',
}
])
onLoad((args) => {
if (args.from) {
from.value = args.from as string
}
// 监听地址列表刷新
uni.$on('refreshAddressList', () => {
List.handleInit()
})
// 初始化地址列表
List.handleInit()
})
onUnload(() => {
uni.$off('refreshAddressList')
})
const List = {
/**
* 初始化地址列表
*/
handleInit: async () => {
const res = await getUserAddress()
addressList.value = Array.isArray(res) ? res : []
},
/**
* 编辑地址
* @param id 地址ID
*/
handleEditAddress: (id: number) => {
router.navigateTo(`/bundle_b/pages/tea-specialist/address/add?id=${id}`)
},
/**
* 选择地址
* @param item 地址内容
*/
handleChooseAddress(item: IUserAddressListResult) {
if (from.value === 'reserve') {
uni.$emit('chooseAddress', item)
uni.navigateBack()
}
},
/**
* 删除地址
*/
handleDeleteAddress: (id: number) => {
message.confirm({
title: '删除地址',
msg: '确定要删除该地址吗?',
confirmButtonText: '确定',
cancelButtonText: '取消',
cancelButtonProps: {
customClass: '!bg-[#F6F7F8] !text-[#303133] !text-32rpx !leading-44rpx !rounded-8rpx',
},
confirmButtonProps: {
customClass: '!bg-[#4C9F44] !text-[#fff] !text-32rpx !leading-44rpx !rounded-8rpx',
}
}).then(async (res) => {
// // 点击确认按钮回调事件
// await deleteUserAddress({
// id: addressId.value
// })
// toast.info('删除成功')
// uni.$emit('refreshAddressList')
// router.navigateBack(500)
}).catch((res) => {
console.log("🚀 ~ res2:", res)
// 点击取消按钮回调事件
})
},
/**
* 更新位置
*/
handleUpdateLocation: () => {
}
}
</script>
<style lang="scss" scoped>
page {
background-color: $cz-page-background;
}
.address-radio {
:deep() {
.wd-radio-group {
background-color: transparent !important;
}
}
}
</style>

View File

@ -9,43 +9,127 @@
<template>
<view class="home-bg pb-80rpx">
<view class="home-bg w-[100%] fixed top-0 left-0 z-100">
<wd-navbar left-arrow safeAreaInsetTop title="财务管理" :bordered="false" custom-style="background-color: transparent !important;" @click-left="router.navigateBack()"></wd-navbar>
<navbar title="收入统计" custom-class="!bg-[transparent]"></navbar>
</view>
<view :style="{ paddingTop: navbarHeight + 'px' }">
<view class="relative mx-30rpx mt-16rpx">
<wd-img width="692rpx" height="334rpx" :src="`${OSS}images/store/finance/image1.png`" mode="aspectFit" />
<wd-img width="692rpx" height="592rpx" :src="`${OSS}images/chayishi/finance_image1.png`"/>
<!-- 时间选择 -->
<view class="absolute top-50rpx left-40rpx">
<view class="font-400 text-26rpx text-[#B4CEFF] leading-36rpx">经营资产</view>
<view class="mt-20rpx font-bold text-36rpx text-[#fff] leading-34rpx">{{ userFinance.total_amount }}</view>
<view class="font-400 text-28rpx leading-40rpx text-[#fff]">本期时间</view>
<view class="font-bold text-[#fff] datetime-picker">
<wd-datetime-picker
custom-value-class="!text-[#fff]"
v-model="value"
:maxDate="Date.now()"
type="year-month"
@confirm="Finance.handleConfirmDate">
</wd-datetime-picker>
</view>
</view>
<view class="flex items-center justify-around w-100% absolute bottom-40rpx left-0 px-40rpx">
<view class="flex items-center justify-around w-100% absolute top-238rpx left-0 px-40rpx">
<view class="flex flex-col items-center justify-start">
<view class="font-400 text-24rpx text-[#606266] text-34rpx">已提现</view>
<view class="font-bold text-32rpx text-[#303133] leading-34rpx mt-14rpx">{{ userFinance.total_reflect_amount }}</view>
<view class="font-400 text-24rpx text-[#606266] text-34rpx">本期业绩(元)</view>
<view class="font-bold text-32rpx text-[#303133] leading-34rpx mt-14rpx">123</view>
</view>
<view class="h-98rpx">
<wd-divider vertical color="#EAEEF2" custom-class="!h-98rpx"></wd-divider>
</view>
<view class="flex flex-col items-center justify-start">
<view class="font-400 text-24rpx text-[#606266] text-34rpx">待提现</view>
<view class="font-bold text-32rpx text-[#303133] leading-34rpx mt-14rpx">{{ userFinance.balance }}</view>
<view class="font-400 text-24rpx text-[#606266] text-34rpx">本期收入(元)</view>
<view class="font-bold text-32rpx text-[#303133] leading-34rpx mt-14rpx">345</view>
</view>
</view>
<view class="h-2rpx bg-[#EAEEF2] w-647rpx absolute top-368rpx" style="left: 50%; transform:translateX(-50%)"></view>
<view class="absolute top-388rpx">
<view class="mx-36rpx">
<view class="flex items-center">
<view class="flex items-center">
<wd-img :src="`${OSS}icon/icon_pay.png`" width="36rpx" height="36rpx"></wd-img>
</view>
<view class="font-bold text-28rpx leading-40rpx text-[#303133] mx-14rpx">实际收入</view>
<view class="font-400 text-22rpx leading-32rpx text-[#909399]">已扣除平台服务费</view>
</view>
</view>
<view class="flex items-center justify-around w-674rpx mt-28rpx">
<!-- 服务费 -->
<view class="flex items-center">
<view class="w-120rpx text-center">
<view class="font-400 text-28rpx leading-34rpx text-[#303133]">500.00</view>
<view class="font-400 text-28rpx leading-34rpx text-[#606266] mt-12rpx">服务费</view>
</view>
<view class="h-98rpx">
<wd-divider vertical color="#EAEEF2" custom-class="!h-98rpx"></wd-divider>
</view>
</view>
<!-- 车马费 -->
<view class="flex items-center">
<view class="w-120rpx text-center">
<view class="font-400 text-28rpx leading-34rpx text-[#303133]">500.00</view>
<view class="font-400 text-28rpx leading-34rpx text-[#606266] mt-12rpx">车马费</view>
</view>
<view class="h-98rpx">
<wd-divider vertical color="#EAEEF2" custom-class="!h-98rpx"></wd-divider>
</view>
</view>
<!-- 茶叶 -->
<view class="flex items-center">
<view class="w-120rpx text-center">
<view class="font-400 text-28rpx leading-34rpx text-[#303133]">500.00</view>
<view class="font-400 text-28rpx leading-34rpx text-[#606266] mt-12rpx">茶叶</view>
</view>
<view class="h-98rpx">
<wd-divider vertical color="#EAEEF2" custom-class="!h-98rpx"></wd-divider>
</view>
</view>
<!-- 打赏 -->
<view class="flex items-center">
<view class="w-120rpx text-center">
<view class="font-400 text-28rpx leading-34rpx text-[#303133]">500.00</view>
<view class="font-400 text-28rpx leading-34rpx text-[#606266] mt-12rpx">打赏</view>
</view>
</view>
</view>
</view>
</view>
<!-- 业绩明细表格 -->
<view class="mt-30rpx">
<view class="overflow-x-auto">
<view class="min-w-[800rpx]">
<!-- 表头 -->
<view class="flex items-center rounded-t-12rpx" style="background: #EEEFF0;">
<view class="flex-1 text-center py-18rpx text-26rpx font-bold w-120rpx">日期</view>
<view class="flex-1 text-center py-18rpx text-26rpx font-bold">业绩</view>
<view class="flex-1 text-center py-18rpx text-26rpx font-bold">服务费</view>
<view class="flex-1 text-center py-18rpx text-26rpx font-bold">车马费</view>
<view class="flex-1 text-center py-18rpx text-26rpx font-bold">茶叶</view>
<view class="flex-1 text-center py-18rpx text-26rpx font-bold">打赏</view>
</view>
<!-- 示例数据行可替换为v-for渲染 -->
<view class="flex items-center border-b border-[#EEEFF0] bg-[#fff]" v-for="(item, idx) in 31" :key="idx">
<view class="flex-1 text-center py-16rpx font-400 text-24rpx leading-36rpx border-r border-[#EEEFF0] text-[#303133]">2025-12-{{ idx+7 }}</view>
<view class="flex-1 text-center py-16rpx font-400 text-24rpx leading-36rpx border-r border-[#EEEFF0] text-[#303133]">1000</view>
<view class="flex-1 text-center py-16rpx font-400 text-24rpx leading-36rpx border-r border-[#EEEFF0] text-[#303133]">160</view>
<view class="flex-1 text-center py-16rpx font-400 text-24rpx leading-36rpx border-r border-[#EEEFF0] text-[#303133]">30</view>
<view class="flex-1 text-center py-16rpx font-400 text-24rpx leading-36rpx border-r border-[#EEEFF0] text-[#303133]">50</view>
<view class="flex-1 text-center py-16rpx font-400 text-24rpx leading-36rpx">20</view>
</view>
</view>
</view>
</view>
<view class="mx-30rpx">
<view class="flex items-center">
<view class="font-bold text-[#303133] datetime-picker">
<wd-datetime-picker v-model="value" :maxDate="Date.now()" type="year-month" @confirm="Finance.handleConfirmDate"></wd-datetime-picker>
</view>
</view>
<view class="font-400 text-24rpx text-[#606266] leading-34rpx">
收入¥{{ allPrice }}
</view>
<!-- <view class="mx-30rpx">
<view class="mt-20rpx">
<mescroll-body ref="mescrollItem0" @init="mescrollInit" @down="downCallback" @up="Finance.upCallback" :down="downOption" :up="upOption">
<view class="bg-white rounded-16rpx px-16rpx py-28rpx mb-20rpx" v-for="item in list" :key="item.id" @click="router.navigateTo(`/bundle/finance/detail?id=${item.id}`)">
@ -71,7 +155,7 @@
</view>
</mescroll-body>
</view>
</view>
</view> -->
</view>
</view>
</template>
@ -178,8 +262,14 @@
.datetime-picker {
:deep() {
.wd-cell {
padding-left: 0 !important;
background-color: transparent !important;
}
.wd-datetime-picker__arrow {
margin-top: 2rpx !important;
color: #fff !important;
}
}
}
</style>

View File

@ -0,0 +1,104 @@
<route lang="jsonc" type="page">{
"layout": "default",
"style": {
"navigationBarTitleText": "消息",
"navigationBarBackgroundColor": "#fff"
}
}</route>
<template>
<view class="mt-24rpx">
<mescroll-body @init="mescrollInit" @down="downCallback" :down="downOption" @up="Notice.upCallback" :up="upOption" fixed>
<view class="mx-32rpx flex items-center justify-between">
<view class="">
<wd-img :src="`${OSS}icon/icon_notice.png`" width="72rpx" height="72rpx"></wd-img>
</view>
<view class="flex-1 ml-20rpx">
<view class="flex items-center justify-between">
<view class="font-bold text-28rpx leading-48rpx text-[#171717]">上线邀约</view>
<view class="font-400 text-24rpx leading-40rpx text-[#606266]">今天 08:22</view>
</view>
<view class="font-400 text-26rpx leading-40rpx text-[#606266] mt-10rpx">
[客户昵称]正向您发出上线邀约要接收订单请先将状态切换至上班中
</view>
</view>
</view>
</mescroll-body>
</view>
</template>
<script lang="ts" setup>
import { useStoreStore } from '@/store'
import { switchStore } from '@/api/store'
import { router } from '@/utils/tools'
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js"
const OSS = inject('OSS')
// 读取仓库
const useStore = useStoreStore()
// 店铺列表
const storeList = ref<Array<any>>([])
// mescroll
const { mescrollInit, downCallback, getMescroll } = useMescroll(onPageScroll, onReachBottom) // 调用mescroll的hook
const downOption = {
auto: true
}
const upOption = {
empty: {
icon : OSS + 'icon/icon_reserver_empty.png',
tip: '暂无预约信息',
},
auto: true,
textNoMore: '~ 已经到底啦 ~', //无更多数据的提示
}
const orderStatus = ref<string>('')
const list = ref<Array<any>>([]) // 茶室列表
const keywords = ref<string>('') // 搜索关键词
onShow(async () => {
// 获取店铺列表
})
onLoad(() => {
console.log("🚀 ~ useStore.defaultStore:", useStore.defaultStore)
})
const Notice = {
/**
* 筛选表
*/
upCallback: (mescroll) => {
// const filter = {
// level_id: selectedLevel.value.join(',') || '0',
// page: mescroll.num,
// size: mescroll.size,
// latitude: uni.getStorageSync('latitude') || import.meta.env.VITE_DEFAULT_LATITUDE,
// longitude: uni.getStorageSync('longitude') || import.meta.env.VITE_DEFAULT_LONGITUDE,
// search: keywords.value
// }
// getTeaSpecialist(filter).then((res: ITeaSpecialistResult) => {
// 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() // 请求失败, 结束加载
// })
},
}
</script>
<style lang="scss">
page {
background-color: #fff;
}
</style>

View File

@ -30,7 +30,7 @@
</view>
<view class="mt-36rpx mx-30rpx">
<view class="flex items-center justify-between" @click="router.navigateTo('/bundle/profile/profile')">
<view class="flex items-center justify-between" @click="router.navigateTo('/pages/my/profile-display')">
<view class="flex items-center">
<wd-img width="96rpx" height="96rpx" :src="`${OSS}icon/icon_info2.png`"></wd-img>
<view class="font-400 text-30rpx text-[#171717] leading-48rpx ml-24rpx">个人信息</view>

View File

@ -7,6 +7,9 @@
<template>
<view class="pb-30rpx">
<!-- 消息提示框 -->
<wd-message-box selector="wd-message-box-slot" />
<view class="order-list">
<navbar layoutLeft custom-class='!bg-[#F6F7F8]'>
<template #left>
@ -31,8 +34,14 @@
</view>
</view>
<view class="mt-70rpx ml-68rpx mr-60rpx">
<view class="font-400 text-28rpx leading-40rpx text-[#303133]">余额</view>
<view class="mt-20rpx ml-68rpx mr-60rpx">
<view class="flex items-center justify-end" @click="Wallet.handleShowPrompt">
<view class="font-400 text-26rpx leading-36rpx text-[#909399] mr-16rpx">不可提现金额200</view>
<view class="">
<wd-img width="26rpx" height="26rpx" :src="`${OSS}icon/icon_prompt.png`"></wd-img>
</view>
</view>
<view class="font-400 text-28rpx leading-40rpx text-[#303133]">可提现金额</view>
<view class="flex justify-between items-center mt-24rpx">
<view>
<price-format color="#000" :first-size="48" :second-size="48" :subscript-size="28" :price="userStore.userMoney"></price-format>
@ -118,11 +127,13 @@
import type { IUserResult } from '@/api/types/user'
import { getUserInfo, getUserTransactionDetails } from '@/api/user'
import { router } from '@/utils/tools'
import { useMessage } from 'wot-design-uni'
const OSS = inject('OSS')
const userStore = useUserStore()
// 用户信息相关
// 消息提示框
const message = useMessage('wd-message-box-slot')
/* mescroll */
const { mescrollInit, downCallback, getMescroll } = useMescroll(onPageScroll, onReachBottom) // 调用mescroll的hook
@ -219,6 +230,20 @@
4: '团购核销'
}
return typeMap[type] || '其他'
},
/**
* 不可提现金额提示
*/
handleShowPrompt: () => {
message.alert({
title: '温馨提示',
msg: '为保障您与平台的合作权益我们将暂扣200元作为合作押金感谢您的理解与支持。',
confirmButtonText: '我知道了',
confirmButtonProps: {
customClass: '!bg-[#4C9F44] !text-[#fff] !text-32rpx !leading-44rpx !rounded-8rpx',
}
})
}
}
</script>