提交
This commit is contained in:
89
甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.acss
Normal file
89
甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.acss
Normal file
@ -0,0 +1,89 @@
|
||||
|
||||
.image{
|
||||
width: 60rpx;
|
||||
height:60rpx;
|
||||
border-radius: 50rpx;
|
||||
margin-left: 10rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.image1{
|
||||
width: 50rpx;
|
||||
height:50rpx;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.text{
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.textboxzhifu{
|
||||
width: 100%;
|
||||
height: 10%;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
}
|
||||
.biaoti{
|
||||
width: 100%;
|
||||
height: 25%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
.biaoti1{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.hezi{
|
||||
width: 100%;
|
||||
height: 75%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.hezia{
|
||||
width: 100%;
|
||||
height: 60%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.image2{
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.textcss{
|
||||
width: 100rpx;
|
||||
height: 40rpx;
|
||||
display:flex;
|
||||
justify-content: center;
|
||||
border: 1px solid #eec2c7;
|
||||
border-radius: 50px;
|
||||
margin-left: 10rpx
|
||||
}
|
38
甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.axml
Normal file
38
甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.axml
Normal file
@ -0,0 +1,38 @@
|
||||
<view class="box" >
|
||||
<!-- 最外层盒子 -->
|
||||
<view class="box1" a:for="{{dingdan}}" a:if="{{item.paymentStatus == 4}}" >
|
||||
<!-- 粉色框 -->
|
||||
<view class="biaoti">
|
||||
<!-- 标题栏 -->
|
||||
<view class="biaoti1">
|
||||
<image mode="scaleToFill" class="image" src="{{item.businessAvatar}}" />
|
||||
<text style="margin-left:10rpx;font-weight:bolder">{{item.businessName}}</text>
|
||||
<image class="image1" mode="scaleToFill" src="/pages/image/jiantou.png" />
|
||||
</view>
|
||||
<view style="margin-right:20rpx">
|
||||
<text a:if="{{item.paymentStatus == 0}}">待支付</text>
|
||||
<text a:elif="{{item.paymentStatus == 1}}">待使用</text>
|
||||
<text a:elif="{{item.paymentStatus == 2}}">已退款</text>
|
||||
<text a:elif="{{item.paymentStatus == 3}}">已取消</text>
|
||||
<text a:elif="{{item.paymentStatus == 4}}">已完成</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 图片 -->
|
||||
<view class="hezia">
|
||||
<view class="kuandu">
|
||||
<image mode="scaleToFill" class="image2" src="{{item.commoditiesImage}}" />
|
||||
</view>
|
||||
<view class="wenzi">
|
||||
<text class="text">{{item.commoditiesName}}</text>
|
||||
<text class="text" style="color:blue" a:if="{{ item.serviceMode=='1' }}">上门服务</text>
|
||||
<text class="text" style="color:blue" a:if="{{ item.serviceMode=='0' }}">到店服务</text>
|
||||
<text class="text" style="margin-left:10rpx">¥{{item.totalPrice}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="textboxzhifu">
|
||||
<view onTap="pingjia" data-num="{{item}}">
|
||||
<text class="textcss">评价</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
95
甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.js
Normal file
95
甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.js
Normal file
@ -0,0 +1,95 @@
|
||||
import { url } from '../request';
|
||||
Page({
|
||||
data: {
|
||||
current: 0,
|
||||
businessName:'',
|
||||
},
|
||||
onLoad() {
|
||||
my.getStorage({
|
||||
key: 'userInfo',
|
||||
success: (res) => {
|
||||
const userInfo = res.data;
|
||||
this.setData({ id: userInfo.id });
|
||||
|
||||
if (userInfo) {
|
||||
my.request({
|
||||
url: url + '/api/orders/my/page',
|
||||
method: 'POST',
|
||||
data: {
|
||||
claimStatus: 0,
|
||||
current: 1,
|
||||
pageSize: 1000,
|
||||
userId: userInfo.id,
|
||||
userRole: 0,
|
||||
},
|
||||
headers: { 'content-type': 'application/json' },
|
||||
dataType: 'json',
|
||||
success: async (res) => {
|
||||
console.log(res,'rwssss');
|
||||
if (res.data.code === 0) {
|
||||
// 生成包含 appointmentId 的订单列表
|
||||
let orders = res.data.data.records.map(order => ({
|
||||
id:order.id,
|
||||
businessAvatar:order.businessVO.businessAvatar,
|
||||
serviceMode: order.serviceMode,
|
||||
businessName: order.businessVO.businessName || '未知店铺',
|
||||
commoditiesImage: order.orderItemsVOList[0].commoditiesVO.commoditiesImage || '',
|
||||
commoditiesName: order.orderItemsVOList[0].commoditiesVO.commoditiesName || '未知商品',
|
||||
orderNumber: order.orderNumber,
|
||||
totalPrice: order.totalPrice,
|
||||
paymentStatus: order.paymentStatus,
|
||||
status: '',
|
||||
appointmentId: order.appointmentId,
|
||||
phone:order.phone,
|
||||
username:order.userName,
|
||||
businessId:order.businessVO.id,
|
||||
quantity:order.orderItemsVOList.quantity,
|
||||
createTime:order.createTime,
|
||||
manicuristid:order.manicuristVO ? order.manicuristVO.id : '',
|
||||
manicuristName:order.manicuristVO? order.manicuristVO.manicuristName : '',
|
||||
manicuristAvatar:order.manicuristVO? order.manicuristVO.manicuristAvatar : '',
|
||||
}));
|
||||
this.setData({ dingdan: orders });
|
||||
console.log(this.data.dingdan);
|
||||
} else if (res.data.code === 40100) {
|
||||
my.alert({ content: '登录信息已过期,请重新登录' });
|
||||
my.navigateTo({ url: '/pages/denglu/denglu' });
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
console.error('请求失败: ', JSON.stringify(error));
|
||||
my.alert({ content: '请求失败,请稍后重试' });
|
||||
},
|
||||
});
|
||||
} else {
|
||||
my.alert({
|
||||
content: '您未登录,请先登录。',
|
||||
success: () => my.navigateTo({ url: '/pages/denglu/denglu' }),
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
pingjia(item){
|
||||
const id = item.target.dataset.num
|
||||
console.log(id);
|
||||
const businessName =id.businessName
|
||||
const businessAvatar = id.businessAvatar
|
||||
const manicuristName = id.manicuristName||''
|
||||
const manicuristid = id.manicuristid||''
|
||||
const manicuristAvatar = id.manicuristAvatar||''
|
||||
const businessId =id.businessId
|
||||
const orderid = id.id
|
||||
console.log('======>传过去的',orderid,businessId,manicuristAvatar,businessAvatar,manicuristid,businessName,manicuristName,);
|
||||
my.navigateTo({
|
||||
url:`/pages/pingjia/pingjia?&&businessName=${businessName}
|
||||
&&businessAvatar=${businessAvatar}
|
||||
&&manicuristName=${manicuristName}
|
||||
&&manicuristid=${manicuristid}
|
||||
&&manicuristAvatar=${manicuristAvatar}
|
||||
&&businessId=${businessId}
|
||||
&&orderid=${orderid}`
|
||||
})
|
||||
},
|
||||
});
|
||||
|
9
甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.json
Normal file
9
甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"defaultTitle": "待评价",
|
||||
"usingComponents": {
|
||||
"ant-icon": "antd-mini/es/Icon/index",
|
||||
"container": "antd-mini/es/Container/index",
|
||||
"ant-tabs": "antd-mini/es/Tabs/index"
|
||||
},
|
||||
"styleIsolation": "apply-shared"
|
||||
}
|
Reference in New Issue
Block a user