This commit is contained in:
Ling53666
2025-08-18 09:11:51 +08:00
commit 02554225da
2516 changed files with 133155 additions and 0 deletions

View File

@ -0,0 +1,66 @@
.text{
position: relative;
}
.image2{
width: 160rpx;
height: 160rpx;
border-radius: 20rpx;
margin-top: 20rpx;
margin-left: 20rpx;
}
.image1{
width: 50rpx;
height:50rpx;
}
.hezi{
width: 100%;
height: 80%;
display: flex;
align-items: center;
}
.image{
width: 60rpx;
height:60rpx;
border-radius: 50rpx;
margin-left: 10rpx;
margin-top: 10rpx;
}
.biaoti1{
display: flex;
align-items: center;
}
.biaoti{
width: 100%;
height: 20%;
justify-content: space-between;
align-items: center;
display: flex;
}
.kuandu{
width: 30%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.wenzi{
width: 70%;
height: 100%;
display: flex;
justify-content: center;
flex-direction: column;
}
.box1{
width: 90%;
border: 1px solid #eec2c7;
border-radius: 20rpx;
height: 300rpx;
margin-bottom: 10rpx;
}
.box{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
margin-top: 50rpx;
}

View File

@ -0,0 +1,32 @@
<view class="box" >
<!-- 最外层盒子 -->
<view class="box1" a:for="{{dingdan}}" onTap="xiangqing" data-num="{{item}}" >
<!-- 粉色框 -->
<view class="biaoti">
<!-- 标题栏 -->
<view class="biaoti1">
<image mode="scaleToFill" class="image" src="{{item.businessVO.businessAvatar}}" />
<text style="margin-left:10rpx;font-weight:bolder">{{item.businessVO.businessName}}</text>
<image class="image1" mode="scaleToFill" src="/pages/image/jiantou.png" />
</view>
<view style="margin-right:20rpx">
<text>已预约</text>
</view>
</view>
<!-- 图片 -->
<view a:for="{{ item.orderItemsVOList }}" class="hezi">
<view class="kuandu">
<image mode="scaleToFill" class="image2" src="{{item.commoditiesVO.commoditiesImage}}" />
</view>
<view class="wenzi">
<text class="text">{{item.commoditiesVO.commoditiesName}}</text>
<text class="text">到店服务</text>
<text class="text">¥{{item.subtotal}}</text>
</view>
</view>
<view style="width:240px">
</view>
</view>
</view>

View File

@ -0,0 +1,86 @@
import {url} from '../request'
Page({
data: {
myyuyue:[],
},
onShow() {
console.log('jjjjjjjj');
my.getStorage({
key: 'userInfo',
success: (res) => {
const userInfo = res.data;
this.setData({
id: userInfo.id, // 获取 id
});
if (userInfo) {
my.request({
url: url + '/api/orders/my/page',
method: 'POST',
data: {
claimStatus: 0,
current: 1,
endTime: "",
id: "",
pageSize: 1000,
paymentStatus: "",
sortField: "",
sortOrder: "",
startTime: "",
userId: userInfo.id,
userRole: 0,
},
headers: {
'content-type': 'application/json',
},
dataType: 'json',
success: (res) => {
console.log(res);
if (res.data.code === 0) {
// 在成功返回数据后,修改数据结构
const updatedDingdan = res.data.data.records.map(item => {
// 遍历 orderItemsVOList为每个商品添加 orderNumber
item.orderItemsVOList = item.orderItemsVOList.map(orderItem => {
orderItem.commoditiesVO.orderNumber = item.orderNumber; // 添加 orderNumber
return orderItem;
});
return item;
});
// 更新数据到页面
this.setData({
dingdan: updatedDingdan,
});
} else{
my.alert({
content: '',
});
my.navigateTo({
url: '/pages/denglu/denglu',
});
}
console.log(res);
console.log(this.data.dingdan);
},
fail: (error) => {
console.error('请求失败: ', JSON.stringify(error));
my.alert({ content: '请求失败,请稍后重试' });
},
});
} else {
my.alert({
content: '您未登录,请先登录。',
success: () => {
my.navigateTo({
url: '/pages/denglu/denglu',
});
},
});
}
},
});
},
});

View File

@ -0,0 +1,5 @@
{
"defaultTitle": "我的预约",
"usingComponents": {},
"styleIsolation": "apply-shared"
}