diff --git a/api/order/order.js b/api/order/order.js index 9536933..464dc69 100644 --- a/api/order/order.js +++ b/api/order/order.js @@ -147,3 +147,15 @@ export const orderCancel = (data) => { + +// 再次支付订单 +export const orderPay = (data) => { + return request({ + url: '/applet/mall/order/orderPay', + headers: { + isToken: true + }, + method: "POST", + data + }) +} \ No newline at end of file diff --git a/static/images/profile.jpg b/doc/profile.jpg similarity index 100% rename from static/images/profile.jpg rename to doc/profile.jpg diff --git a/pages/companionPetList/companionPetInfo.vue b/pages/companionPetList/companionPetInfo.vue index c9fe021..2f5d5eb 100644 --- a/pages/companionPetList/companionPetInfo.vue +++ b/pages/companionPetList/companionPetInfo.vue @@ -22,7 +22,7 @@ style="height: 40rpx;"> --> - + @@ -282,9 +282,9 @@ {{item.serviceTime}} - + - 宠物:{{item.petName}} + 宠物:{{ item.petName }} @@ -294,7 +294,9 @@ - + @@ -508,6 +510,12 @@ url: `/pages/newOrder/serviceNew2?userName=${this.companionInfo.name}&servicerId=${this.companionInfo.id}`, }); }, + previewImage(urls, current){ + uni.previewImage({ + current, + urls + }) + }, } } diff --git a/pages/companionPetList/companionPetList.vue b/pages/companionPetList/companionPetList.vue index 867aa68..2aff41c 100644 --- a/pages/companionPetList/companionPetList.vue +++ b/pages/companionPetList/companionPetList.vue @@ -3,7 +3,7 @@ + src="https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/petServiceOrder/SystemOrderCircle.png"/> @@ -541,11 +541,15 @@ .personal-name { color: #333; - font-size: 32rpx; + font-size: 28rpx; // line-height: 32rpx; margin-right: 10rpx; font-weight: 900; font-style: normal; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 200rpx; } .personal-star { diff --git a/pages/index.vue b/pages/index.vue index abebf8a..51ba288 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -957,11 +957,8 @@ if (!getToken() || !getOpenIdKey()) { this.login() } else { + this.getCouponListAuth() } - this.getCouponListAuth() - - // 获取优惠券列表(无需登录) - this.getCouponListNoAuth() // 设置默认位置,这样即使用户不选择位置也能显示一些伴宠师 this.$store.commit('setPosition', { @@ -1116,6 +1113,7 @@ justify-content: space-between; align-items: center; height: 60px; + font-size: 24rpx; .card-content { width: 77%; diff --git a/pages/newOrder/confirmOrder.vue b/pages/newOrder/confirmOrder.vue index a766ccc..c7b7c16 100644 --- a/pages/newOrder/confirmOrder.vue +++ b/pages/newOrder/confirmOrder.vue @@ -738,7 +738,7 @@ totalPrice: 0, needPreFamiliarize: [] } - uni.navigateTo({ + uni.reLaunch({ url: '/pages_order/order/payOrderSuccessful' // url: '/pages/details/successful' }); diff --git a/pages/newOrder/serviceNew.vue b/pages/newOrder/serviceNew.vue index 42d0c71..88f0add 100644 --- a/pages/newOrder/serviceNew.vue +++ b/pages/newOrder/serviceNew.vue @@ -28,6 +28,17 @@ + + + + + + + + + 下单方式:指定喂养员 - {{buyInfo.teacher.userName}} + + diff --git a/pages/newOrder/serviceNew2.vue b/pages/newOrder/serviceNew2.vue index de6dbce..30787ea 100644 --- a/pages/newOrder/serviceNew2.vue +++ b/pages/newOrder/serviceNew2.vue @@ -18,6 +18,7 @@ + diff --git a/pages/personalCenter/index.vue b/pages/personalCenter/index.vue index d2a7c0b..376cdcd 100644 --- a/pages/personalCenter/index.vue +++ b/pages/personalCenter/index.vue @@ -691,10 +691,10 @@ .personal-functions-content{ width: 100%; display: flex; - justify-content: space-between; + // justify-content: space-between; align-items: center; flex-wrap: wrap; - gap: 30rpx 0; + gap: 34rpx 0; .personal-function{ width: 24%; display: flex; diff --git a/pages_order/components/order/ServiceAddress.vue b/pages_order/components/order/ServiceAddress.vue index 95d4ba0..b6c289c 100644 --- a/pages_order/components/order/ServiceAddress.vue +++ b/pages_order/components/order/ServiceAddress.vue @@ -54,7 +54,6 @@ .address-content { padding: 20rpx; - background-color: #FFF9EF; border-radius: 10rpx; } diff --git a/pages_order/components/order/ServiceRemarks.vue b/pages_order/components/order/ServiceRemarks.vue index 70cfa83..609d4be 100644 --- a/pages_order/components/order/ServiceRemarks.vue +++ b/pages_order/components/order/ServiceRemarks.vue @@ -14,9 +14,9 @@ 是否提前熟悉 - + @@ -66,7 +66,7 @@ type: Object, default: () => ({ keyHandoverMethod: '存于快递柜', - isAdvanceFamiliar: true, + isAdvanceFamiliar: false, priceInfo: '价格40元/次', serviceContent: '服务内容: 购买此服务后,伴宠师将在您需要前,按照约定时间提前上门为您照顾宠物', serviceCondition: '服务保障: 购买此服务后,平台支付在提前熟悉店,上门服务第一天前,充电由客服联系您预约一次', diff --git a/pages_order/order/AppletComment.java b/pages_order/order/AppletComment.java deleted file mode 100644 index 6e6bedd..0000000 --- a/pages_order/order/AppletComment.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.ruoyi.model.domain; - -import com.baomidou.mybatisplus.annotation.TableField; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 用户评价对象 applet_comment - * - * @author ruoyi - * @date 2025-03-28 - */ -public class AppletComment extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 唯一标识 */ - private Long id; - - /** 评价内容 */ - @Excel(name = "评价内容") - private String comment; - - /** 满意度 */ - @Excel(name = "满意度") - private Long satisfaction; - - /** 关联评价人员ID */ - @Excel(name = "关联评价人员ID") - private Long user1Id; - - /** 关联服务人员ID */ - @Excel(name = "关联服务人员ID") - private Long user2Id; - - /** 删除标识 */ - private Integer delFlag; - - -} diff --git a/pages_order/order/orderDetail.json b/pages_order/order/orderDetail.json deleted file mode 100644 index 651410c..0000000 --- a/pages_order/order/orderDetail.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "orderId": 6278884034316288, - "payId": 6278884034316289, - "orderSn": "250418-6278884034316288", - "memberId": 211, - "totalAmount": 71.25, - "payAmount": 71.25, - "status": 4, - "aftersaleStatus": 1, - "orderItemList": [{ - "createBy": 211, - "createTime": "2025-04-18 22:26:50", - "updateBy": null, - "updateTime": null, - "id": 6278884043425792, - "orderId": 6278884034316288, - "orderServiceId": 6278884036069376, - "productId": 63, - "outProductId": "P001", - "skuId": 404, - "outSkuId": null, - "productSnapshotId": null, - "skuSnapshotId": null, - "pic": "https://catmdogf.oss-cn-shanghai.aliyuncs.com/2024/01/08ba3980c107c2472397b13ef9769257e1陪玩.png", - "productName": "专业遛狗", - "salePrice": 75.00, - "purchasePrice": null, - "quantity": 1, - "productCategoryId": 76, - "spData": "{\"时间\":\"60\"}" - }], - "orderServiceList": [{ - "createBy": 211, - "createTime": "2025-04-18 22:26:50", - "updateBy": null, - "updateTime": null, - "id": 6278884036069376, - "orderId": 6278884034316288, - "pet": null, - "serviceFrequency": null, - "serviceDate": "2025-04-30", - "serviceTimeFirst": null, - "serviceTimeSecond": null, - "delFlag": 0, - "petId": 177, - "expectServiceTime": "MORNING", - "feedCount": null, - "petVo": { - "createBy": null, - "createTime": null, - "updateBy": null, - "updateTime": null, - "id": 177, - "name": "1", - "petType": "cat", - "gender": "男生", - "birthDate": "2025-04", - "remark": "", - "photo": "https://cdn.catmdogd.com/2025/04/188453a042e71a4617b02121d1d9a580c7t92DaD6zscoI266f52064207b09da62f45b9b38e5bf3.png", - "breed": "重点色短毛猫", - "bodyType": "小型(<10 KG)", - "personality": ["友善热情", "粘人乖巧"], - "vaccineStatus": "每年都免疫", - "sterilization": "已绝育", - "dewormingStatus": "未驱虫", - "doglicenseStatus": "", - "healthStatus": ["身体健康,无异常"], - "owner": "211" - }, - "pets": null - }], - "service": null, - "note": null, - "deliverySn": null, - "createTime": "2025-04-18 22:26:49", - "paymentTime": null, - "receiverName": "1", - "receiverPhone": "13055015802", - "receiverProvince": "", - "receiverCity": "湖南省湘潭市雨湖区雨湖路272号湘潭市雨湖区人民政府", - "receiverDistrict": "", - "receiverDetailAddress": "1", - "timeToPay": null, - "staffId": null, - "petVOList": [{ - "createBy": null, - "createTime": null, - "updateBy": null, - "updateTime": null, - "id": 177, - "name": "1", - "petType": "cat", - "gender": "男生", - "birthDate": "2025-04", - "remark": "", - "photo": "https://cdn.catmdogd.com/2025/04/188453a042e71a4617b02121d1d9a580c7t92DaD6zscoI266f52064207b09da62f45b9b38e5bf3.png", - "breed": "重点色短毛猫", - "bodyType": "小型(<10 KG)", - "personality": ["友善热情", "粘人乖巧"], - "vaccineStatus": "每年都免疫", - "sterilization": "已绝育", - "dewormingStatus": "未驱虫", - "doglicenseStatus": "", - "healthStatus": ["身体健康,无异常"], - "owner": "211" - }], - "teacherId": null, - "companionLevel": null -} \ No newline at end of file diff --git a/pages_order/order/orderDetail.vue b/pages_order/order/orderDetail.vue index 15c5f40..b72458d 100644 --- a/pages_order/order/orderDetail.vue +++ b/pages_order/order/orderDetail.vue @@ -141,12 +141,39 @@ console.error('解析商品附加数据失败', e); } + // 获取对应的宠物信息 + const pet = data.petVOList && data.petVOList[index] ? { + name: data.petVOList[index].name, + avatar: data.petVOList[index].photo + } : null; + + // 生成模拟的定制服务数据 + const customServices = [ + // { + // name: '基础护理', + // price: 50, + // quantity: 2 + // }, + // { + // name: '美容服务', + // price: 100, + // quantity: 1 + // }, + // { + // name: '特殊护理', + // price: 80, + // quantity: 1 + // } + ]; + return { id: index + 1, name: item.productName, price: item.salePrice, quantity: item.quantity, - customServices: [] + pet: pet ? pet.name : null, + petAvatar: pet ? pet.avatar : null, + customServices: customServices }; }), diff --git a/pages_order/order/orderList.vue b/pages_order/order/orderList.vue index e1b4774..f2c4878 100644 --- a/pages_order/order/orderList.vue +++ b/pages_order/order/orderList.vue @@ -72,12 +72,15 @@ - + 去评价 再来一单 + + 查看服务记录 + @@ -116,7 +119,8 @@ // getOrderList } from "@/api/system/user.js" import { - getOrderList + getOrderList, + orderPay } from "@/api/order/order.js" import { getOpenIdKey @@ -161,6 +165,7 @@ loading: false, refreshing: false, currentOrder: null, + isPaying : false, // 示例数据,实际应从API获取 exampleData: [{ id: '1', @@ -232,10 +237,41 @@ // 去付款 goToPay(orderId) { - uni.navigateTo({ - url: `/pages/details/order?id=${orderId}` + orderPay({ + orderId: orderId + }).then(res => { + this.pay(res.data) + }).catch(err => { + console.log(err); }); }, + pay(params) { + if (this.isPaying) { + return; + } + this.isPaying = true + uni.requestPayment({ + provider: 'wxpay', + timeStamp: params.timeStamp, + nonceStr: params.nonceStr, + package: params.package_, + signType: params.signType, + paySign: params.paySign, + success: (res) => { + this.$modal.showToast('支付成功') + this.getOrderList() + }, + fail: (err) => { + this.loading = false + console.log('支付失败', err) + this.$modal.showToast('支付失败') + }, + complete: () => { + this.loading = false + this.isPaying = false + } + }) + }, // 去评价 goToReview({teacherId, orderId}) { diff --git a/pages_order/order/payOrderSuccessful.vue b/pages_order/order/payOrderSuccessful.vue index 43c9d76..7f9d6e4 100644 --- a/pages_order/order/payOrderSuccessful.vue +++ b/pages_order/order/payOrderSuccessful.vue @@ -29,7 +29,7 @@ 完善服务档案 请上传宠物喂养要求及用品摆放位置 - + 去完善 @@ -42,7 +42,7 @@ 完善门锁信息 请上传门锁及相应密码要求 - + 去完善 @@ -81,6 +81,11 @@ url: "/pages/index" }); }, + toPath(url){ + uni.navigateTo({ + url + }) + }, } } @@ -124,8 +129,8 @@ .item-text { display: flex; flex-direction: column; - justify-content: center;; - align-items: center; + justify-content: center; + //align-items: center; .item-title { font-size: 28rpx; color: #333;