diff --git a/api/home.js b/api/home.js
new file mode 100644
index 0000000..b66f208
--- /dev/null
+++ b/api/home.js
@@ -0,0 +1,13 @@
+
+
+import request from '@/utils/request'
+
+
+//
+export function getTeacherListIndex(data) {
+ return request({
+ url: '/applet/mall/teacher/getTeacherListIndex',
+ method: 'get',
+ data: data
+ })
+}
\ No newline at end of file
diff --git a/api/order/order.js b/api/order/order.js
index d135c37..9536933 100644
--- a/api/order/order.js
+++ b/api/order/order.js
@@ -94,6 +94,32 @@ export const getOrderDetail = (params) => {
})
}
+// 根据id查询
+export function getOrderDetailById(data) {
+ return request({
+ url: '/api/order/detail',
+ method: 'post',
+ data: data
+ })
+}
+
+// 创建订单
+export function createOrder(data) {
+ return request({
+ url: '/api/order/create',
+ method: 'post',
+ data: data
+ })
+}
+
+// 更新订单
+export function updateOrder(data) {
+ return request({
+ url: '/api/order/update',
+ method: 'post',
+ data: data
+ })
+}
// 评价订单
export const orderEvaluate = (params) => {
@@ -107,5 +133,17 @@ export const orderEvaluate = (params) => {
})
}
+// 取消订单
+export const orderCancel = (data) => {
+ return request({
+ url: '/applet/mall/order/orderCancel',///applet/mall/order/orderCancel
+ headers: {
+ isToken: true
+ },
+ method: "POST",
+ data
+ })
+}
+
diff --git a/api/order/task.js b/api/order/task.js
index f515578..313a0e7 100644
--- a/api/order/task.js
+++ b/api/order/task.js
@@ -1,14 +1,49 @@
import upload from '@/utils/upload'
import request from '@/utils/request'
-// 查询伴宠师列表
-export function getTeacherList(params) {
+// 查询任务列表
+export function getTaskList(params) {
return request({
- url: '/applet/mall/teacher/getTeacherList',
+ url: '/applet/mall/task/list',
headers: {
"isToken": true
},
method: 'get',
params
})
+}
+
+// 查询任务详情
+export function getTaskDetail(params) {
+ return request({
+ url: '/applet/mall/task/taskDetail/' + params,
+ headers: {
+ "isToken": true
+ },
+ method: 'get',
+ })
+}
+
+// 接受任务
+export function acceptTask(params) {
+ return request({
+ url: '/applet/mall/task/acceptTask',
+ headers: {
+ "isToken": true
+ },
+ method: 'get',
+ params
+ })
+}
+
+// 提交任务
+export function submitTask(data) {
+ return request({
+ url: '/applet/mall/task/submitTask',
+ headers: {
+ "isToken": true
+ },
+ method: 'post',
+ data
+ })
}
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 84d90e2..ad0f776 100644
--- a/pages.json
+++ b/pages.json
@@ -393,6 +393,24 @@
"enablePullDownRefresh": false,
"navigationBarTextStyle": "white"
}
+ },
+ {
+ "path": "order/orderModify",
+ "style": {
+ "navigationBarTitleText": "服务过的伴宠师",
+ "navigationBarBackgroundColor": "#FFBF60",
+ "enablePullDownRefresh": false,
+ "navigationBarTextStyle": "white"
+ }
+ },
+ {
+ "path": "mine/InvitationCode",
+ "style": {
+ "navigationBarTitleText": "邀请绑定",
+ "navigationBarBackgroundColor": "#FFBF60",
+ "enablePullDownRefresh": false,
+ "navigationBarTextStyle": "white"
+ }
}
]
}
diff --git a/pages/companionPetList/companionPetInfo.vue b/pages/companionPetList/companionPetInfo.vue
index dc2a520..c9fe021 100644
--- a/pages/companionPetList/companionPetInfo.vue
+++ b/pages/companionPetList/companionPetInfo.vue
@@ -108,7 +108,7 @@
+ src="https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/petServiceOrder/CMDFServiceDetail.png" />
@@ -64,7 +60,6 @@
:startDate="startDate" :endDate="endDate" :showMonth="false"
@change="changeCalendar" @confirm="changeCalendar" @close="close" />
-
@@ -76,11 +71,11 @@
+ src="https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/petServiceOrder/OrderByCompanion.png" />
+ src="https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/petServiceOrder/OrderBySystem.png" />
@@ -117,13 +112,11 @@
专业喂养
专业遛狗
- 有效期至: {{item.availableEndTime.slice(0, 16)}}
+ 有效期至: {{item && item.availableEndTime ? item.availableEndTime.slice(0, 16) : ''}}
-
- 立即领取
+ 立即领取
@@ -132,7 +125,7 @@
优惠券不可兑换现金
-
+
查看详细规则>
@@ -160,7 +153,7 @@
+ :src="defaultCompanion.staffImages && defaultCompanion.staffImages.length > 0 ? defaultCompanion.staffImages[0].url : defaultStaffIamge">
@@ -169,8 +162,7 @@
{{defaultCompanion.name}}
-
@@ -244,8 +236,8 @@
-
+
@@ -271,7 +263,7 @@
+ src="https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/petServiceOrder/joinus.png" />
@@ -279,7 +271,6 @@
点击领取到卡包
-
@@ -290,7 +281,6 @@
优惠券列表显示
-
+
+
+
+
+
@@ -317,19 +337,20 @@
getOpenId,
receiveCoupon,
} from "@/api/system/user"
- import {
- getCompanionList
- } from "@/api/system/companion"
import {
setToken,
getToken,
getOpenIdKey,
setOpenIdKey
} from '@/utils/auth'
+ import { getTeacherListIndex } from '@/api/home'
import Kefu from './common/kefu.vue'
import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
import NewUserCoupon from './components/NewUserCoupon.vue';
+ import positionMixin from '@/mixins/position.js';
+
export default {
+ mixins: [positionMixin],
data() {
return {
current: 0,
@@ -387,6 +408,7 @@
num: "47131",
numTime: "2024.12.12",
},
+ currentCoupon: null,
}
},
components: {
@@ -400,12 +422,9 @@
},
methods: {
checkNewUser() {
- // 检查是否为新用户,这里可以根据实际需求修改判断逻辑
- // 例如:检查本地存储中是否有首次访问的标记
const isFirstVisit = !uni.getStorageSync('hasVisited');
if (isFirstVisit) {
this.isNewUser = true;
- // 设置访问标记
uni.setStorageSync('hasVisited', true);
}
},
@@ -413,11 +432,9 @@
this.isNewUser = false;
},
handleGetCoupon() {
- // 如果用户已登录,则直接调用领券方法
if (getToken()) {
this.getCoupon();
} else {
- // 未登录,跳转到登录页面
uni.navigateTo({
url: '/pages/personalCenter/index'
});
@@ -475,11 +492,9 @@
changeCalendar(e) {
console.log('change 返回:', e)
this.selectedDateShowText = ''
- // 选中日期
const selectedValue = this.selectedDate.find(item => item.date === e.fulldate)
console.log('const selectedValue', selectedValue)
if (selectedValue) {
- // 存在则移除
this.selectedDate = this.selectedDate.filter(item => item.date !== e.fulldate);
this.allInfo.selectedDate = this.selectedDate;
} else {
@@ -518,7 +533,6 @@
let tomorrow = new Date()
tomorrow.setDate(tomorrow.getDate() + 2);
this.startDate = this.formatDate(tomorrow);
- // 获取三个月后的日期
let threeMonthsLater = new Date();
threeMonthsLater.setMonth(threeMonthsLater.getMonth() + 3);
this.endDate = this.formatDate(threeMonthsLater);
@@ -531,9 +545,8 @@
},
getLocationInfo() {
wx.chooseLocation({
- type: 'gcj02', // 坐标系,默认为 wgs84 返回 gps 原始坐标,gcj02 返回可用于 wx.openLocation 的坐标
+ type: 'gcj02',
success: (res) => {
- // 成功回调
this.isCheckLocation = true
this.locationName = res.address
this.locationLongitude = res.longitude
@@ -545,18 +558,26 @@
this.allInfo.locationLongitude = res.longitude
this.allInfo.locationLatitude = res.latitude
this.allInfo.locationAddress = res.address
+
+ // 保存位置信息到Vuex
+ this.$store.commit('setPosition', {
+ address: res.address,
+ longitude: res.longitude,
+ latitude: res.latitude
+ });
+
+ // 获取周边伴宠师
+ this.getCompanionList();
},
fail: (err) => {
- // 失败回调
console.error('选择位置失败:', err);
}
});
},
getLocationFirst() {
wx.chooseLocation({
- type: 'gcj02', // 坐标系,默认为 wgs84 返回 gps 原始坐标,gcj02 返回可用于 wx.openLocation 的坐标
+ type: 'gcj02',
success: (res) => {
- // 成功回调
this.isCheckLocation = true
this.locationName = res.address
this.locationLongitude = res.longitude
@@ -567,44 +588,87 @@
this.allInfo.locationLongitude = res.longitude
this.allInfo.locationLatitude = res.latitude
this.allInfo.locationAddress = res.address
- this.getCompanionList()
+
+ // 保存位置信息到Vuex
+ this.$store.commit('setPosition', {
+ address: res.address,
+ longitude: res.longitude,
+ latitude: res.latitude
+ });
+
+ // 获取周边伴宠师
+ this.getCompanionList();
},
fail: (err) => {
- // 失败回调
console.error('选择位置失败:', err);
}
});
},
getCompanionList() {
- // let data = {
- // longitude: this.locationLongitude,
- // latitude: this.locationLatitude,
- // petTypes: this.selectedPet,
- // staffName: '',
- // address: this.locationAddress
- // }
+ // 构建参数,使用当前位置坐标
let data = {
- address: "上海市浦东新区浦东南路150弄",
- latitude: 29.56471,
- longitude: 106.55073,
+ address: this.locationAddress || "上海市浦东新区浦东南路150弄",
+ latitude: this.locationLatitude || 31.22514,
+ longitude: this.locationLongitude || 121.49857,
petTypes: ["1", "2"],
- staffName: "君"
+ staffName: ""
}
- console.log('data', data);
- getCompanionList(data).then(response => {
- if (response.code == 200) {
- // this.companionList = response.rows
- this.defaultCompanion.name = response.rows[0].name
- this.defaultCompanion.gender = response.rows[0].gender
- this.defaultCompanion.star = response.rows[0].id
- this.defaultCompanion.distance = response.rows[0].id
- this.defaultCompanion.shortDescription = response.rows[0].shortDescription
- this.defaultCompanion.staffImages = response.rows[0].staffImages
- this.defaultCompanion.year = 4
- this.defaultCompanion.record = 11
- this.defaultCompanion.serviceNum = 13
+ console.log('获取周边伴宠师参数:', data);
+
+ // 保存当前位置到Vuex,让position mixin能使用
+ this.$store.commit('setPosition', {
+ address: this.locationAddress,
+ longitude: this.locationLongitude,
+ latitude: this.locationLatitude
+ });
+
+ getTeacherListIndex(data).then(response => {
+ if (response.code == 200 && response.rows && response.rows.length > 0) {
+ const nearbyTeacher = response.rows[0];
+ console.log('伴宠师原始数据:', nearbyTeacher);
+
+ // 如果伴宠师有地址信息,使用mixin的calculateDistanceAddress计算距离
+ let distance = 0;
+ if (nearbyTeacher.addressList && nearbyTeacher.addressList.length > 0) {
+ distance = this.calculateDistanceAddress(nearbyTeacher.addressList);
+ } else if (nearbyTeacher.latitude && nearbyTeacher.longitude) {
+ // 如果没有地址列表但有经纬度信息,则构造地址对象
+ const addressList = [{
+ latitude: nearbyTeacher.latitude,
+ longitude: nearbyTeacher.longitude
+ }];
+ distance = this.calculateDistanceAddress(addressList);
+ }
+
+ // 处理用户图片
+ let userImageUrl = "";
+ if (typeof nearbyTeacher.userImage === 'string') {
+ userImageUrl = nearbyTeacher.userImage;
+ } else if (nearbyTeacher.userImage && Array.isArray(nearbyTeacher.userImage) && nearbyTeacher.userImage.length > 0) {
+ userImageUrl = nearbyTeacher.userImage[0].url || "";
+ }
+
+ // 构建伴宠师信息对象
+ this.defaultCompanion = {
+ name: nearbyTeacher.userName || '宠小二',
+ gender: nearbyTeacher.gender || '1', // 性别,1-男,2-女
+ star: nearbyTeacher.likeNum || 0,
+ distance: distance.toFixed(1),
+ shortDescription: nearbyTeacher.shortDescription || '专业伴宠师,用心照顾每一位小宠物',
+ staffImages: [{
+ url: userImageUrl || "https://catmdogf.oss-cn-shanghai.aliyuncs.com/CMDF/front/personal/pet/catdog.png"
+ }],
+ year: nearbyTeacher.serviceAge || 1, // 服务年限
+ record: nearbyTeacher.commentNum || 0, // 评价数
+ serviceNum: nearbyTeacher.serviceSummaryNum || 0 // 服务小结数
+ }
+
+ console.log('周边伴宠师信息:', this.defaultCompanion);
+ } else {
+ console.log('没有找到周边伴宠师或返回数据有误');
}
- console.log(response);
+ }).catch(err => {
+ console.error('获取周边伴宠师失败:', err);
})
},
getOrder(value) {
@@ -625,7 +689,6 @@
})
uni.navigateTo({
- // url: '/pages/companionPetList/companionPetList',
url: `/pages/companionPetList/companionPetList?info=`
+ encodeURIComponent(JSON
.stringify(this.allInfo))
@@ -635,22 +698,20 @@
this.$store.commit('setPosition', {})
this.buyInfo.teacher = null
uni.navigateTo({
- // url: '/pages_order/order/payOrderSuccessful',
url: '/pages/newOrder/serviceNew',
- // url: '/pages/newOrder/serviceNew2',
});
}
},
getCoupon() {
- getCouponList().then(res => {
- if (res.code == 200) {
- this.couponList = res.rows
- this.showMask = true
- } else {
- this.$modal.showToast('获取优惠券失败')
- }
+ // getCouponList().then(res => {
+ // if (res.code == 200) {
+ // this.couponList = res.rows
+ // this.showMask = true
+ // } else {
+ // this.$modal.showToast('获取优惠券失败')
+ // }
- })
+ // })
},
getCouponListAuth() {
@@ -689,20 +750,28 @@
})
},
getCouponListNoAuth() {
- console.log('进入 getCouponListNoAuth:');
- getCouponListNoAuth().then(res => {
- if (res.code == 200) {
- this.couponData = res.rows
- } else {
- this.$modal.showToast('获取优惠券失败')
- }
-
- })
+ // console.log('进入 getCouponListNoAuth:');
+ // getCouponListNoAuth().then(res => {
+ // if (res.code == 200) {
+ // if (res.rows && Array.isArray(res.rows)) {
+ // this.couponData = res.rows.filter(item => item !== null);
+ // console.log("优惠券数据加载成功:", this.couponData);
+ // } else if (res.data && Array.isArray(res.data)) {
+ // this.couponData = res.data.filter(item => item !== null);
+ // console.log("优惠券数据加载成功:", this.couponData);
+ // } else {
+ // console.log("获取优惠券数据格式异常:", res);
+ // }
+ // } else {
+ // this.$modal.showToast('获取优惠券失败')
+ // }
+ // }).catch(err => {
+ // console.error("获取优惠券列表出错:", err);
+ // })
},
closeMask() {
this.showMask = false
},
- // 点击领券获取优惠券信息
getSendCoupon(res) {
let that = this
console.log('res', res)
@@ -733,7 +802,6 @@
that.showMask = false
}
},
- // 点击确认收券按钮后回调
redirectuser() {},
getBanner() {
getBannerList().then(res => {
@@ -770,9 +838,6 @@
},
goDetails(item) {
if (item) {
- // uni.navigateTo({
- // url: `/pages/details/successful`
- // });
uni.navigateTo({
url: `/pages/details/detail?id=${item.id}`
});
@@ -813,7 +878,6 @@
this.getOpenId(loginRes.code)
},
fail: function(error) {
- // 授权失败处理
uni.showToast('授权失败,请授权后再试')
}
});
@@ -831,23 +895,80 @@
}
})
},
+ showRulePopup(coupon) {
+ if (!coupon) {
+ console.warn('尝试显示空优惠券详情');
+ return;
+ }
+ this.currentCoupon = coupon;
+ this.$refs.rulePopup.open();
+ },
+ closeRulePopup() {
+ this.$refs.rulePopup.close();
+ },
+ getDiscountText(coupon) {
+ if (!coupon || !coupon.stockType) return '';
+
+ if (coupon.stockType === 'PNORMAL') {
+ return '满100可减10元';
+ } else if (coupon.stockType === 'PDISCOUNT') {
+ return '打8折';
+ } else if (coupon.stockType === 'PTRAIL') {
+ return '免费体验一次';
+ }
+ return '';
+ },
},
+ onShow() {
+ if (!getToken() || !getOpenIdKey()) {
+ this.login()
+ }
+ if(this.$globalData.mainSku.length < 1 || !this.$globalData.mainSku[0].price){
+ // 获取主产品
+ this.getProductList()
+ }
+ this.currentAddress = this.$globalData.newOrderData.currentAddress
+ if(this.currentAddress&&this.currentAddress.name){
+ this.isAddressSelected=true
+ }
+ this.currentPets = this.$globalData.newOrderData.currentPets
+ if(this.currentPets&&this.currentPets.length>0){
+ this.isPetSelected=true
+ }
+ this.needPreFamiliarize = this.$globalData.newOrderData.needPreFamiliarize
+ // 初始化伴宠师等级
+ if(this.$globalData.newOrderData.companionLevel) {
+ this.companionLevel = this.$globalData.newOrderData.companionLevel
+ }
+
+ // 获取周边伴宠师数据
+ this.getCompanionList();
+ },
+
onLoad: function() {
this.init()
this.getPeopleList()
this.getProductList()
this.getBanner()
- // this.getCouponListNoAuth()
const accountInfo = wx.getAccountInfoSync();
this.envVersion = accountInfo.miniProgram.envVersion;
if (!getToken() || !getOpenIdKey()) {
this.login()
} else {
- // this.getLocationFirst()
- this.getCouponListAuth()
}
+ this.getCouponListAuth()
+
+ // 获取优惠券列表(无需登录)
+ this.getCouponListNoAuth()
+
+ // 设置默认位置,这样即使用户不选择位置也能显示一些伴宠师
+ this.$store.commit('setPosition', {
+ address: "上海市浦东新区浦东南路150弄",
+ longitude: 121.49857,
+ latitude: 31.22514
+ });
}
}
@@ -859,12 +980,10 @@
.home-content {
position: relative;
- // background: linear-gradient(360deg, #F5F5F7 0%, #FFBF60 99%);
.swiper {
height: calc(100vw * 1098/1125);
- // background-image: linear-gradient(180deg, #FFBF60 0%, #FFBF60 90%, #ffffff 99.41%);
}
.banner {
@@ -879,15 +998,9 @@
.float-button {
position: fixed;
bottom: 150px;
- /* 距离底部的距离 */
right: 10px;
- /* 距离右侧的距离 */
width: 50px;
- /* 按钮的宽度 */
height: 50px;
-
- /* 按钮的高度 */
- /* 其他样式 */
.kf-btn {
background-color: rgba(255, 255, 255, 1);
height: 52px;
@@ -944,17 +1057,7 @@
align-items: center;
width: 100%;
padding: 10px 0;
- // background: #fff;
- // background: #f6f5f8;
- // border: 1px solid #FFBF60;
border-radius: 8px 8px 0 0;
- // -webkit-mask-image: radial-gradient(circle at 88px 4px, transparent 4px, #d8d8d8 4.5px), radial-gradient(closest-side circle at 50%, #d8d8d8 99%, transparent 100%);
- // -webkit-mask-size: 100%, 2px 4px;
- // -webkit-mask-repeat: repeat, repeat-y;
- // -webkit-mask-position: 0 -4px, 87px;
- // -webkit-mask-composite: source-out;
- // mask-composite: subtract;
- // background: linear-gradient(45deg, orange, red);
}
.card-bottom {
@@ -984,7 +1087,6 @@
.card-center {
display: flex;
flex-direction: column;
- // align-items: center;
.card-center-top {
width: 40rpx;
@@ -1011,7 +1113,6 @@
padding: 0 16rpx 0 0;
display: flex;
flex: 1;
- /* flex-direction: column; */
justify-content: space-between;
align-items: center;
height: 60px;
@@ -1026,42 +1127,6 @@
top: -10px;
}
}
-
- .card-info {
- margin: 0;
- font-size: 28rpx;
- line-height: 28rpx;
- color: #333333;
- font-weight: 500;
- }
-
- .card-type {
- font-size: 24rpx;
- font-weight: 400;
- line-height: 24rpx;
- font-weight: 400;
- color: #AAAAAA;
- margin-top: 10rpx;
-
- .card-type-text {
- color: #FFAA48;
- font-size: 24rpx;
- font-weight: 400;
- line-height: 24rpx;
- border: #FFAA48 1px solid;
- border-radius: 7rpx;
- margin-left: 8rpx;
- }
- }
-
- .card-time {
- font-size: 24rpx;
- font-weight: 400;
- line-height: 24rpx;
- font-weight: 400;
- color: #AAAAAA;
- margin-top: 10rpx;
- }
}
}
@@ -1138,7 +1203,6 @@
.companion-name {
color: #333;
font-size: 32rpx;
- // line-height: 32rpx;
margin-right: 10rpx;
font-weight: 900;
font-style: normal;
@@ -1354,7 +1418,6 @@
}
}
- /* #ifndef APP-NVUE */
page {
display: flex;
flex-direction: column;
@@ -1364,8 +1427,6 @@
height: auto;
}
- /* #endif */
-
.text {
text-align: center;
font-size: 26rpx;
@@ -1400,9 +1461,7 @@
}
.swiper-item {
- /* #ifndef APP-NVUE */
display: flex;
- /* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
@@ -1426,7 +1485,6 @@
}
.service-content-img {
- // height: 208px;
padding: 5px;
margin-top: 5px;
border-radius: 8px;
@@ -1479,7 +1537,6 @@
font-size: 10px;
font-style: normal;
line-height: 14px;
- /* 140% */
position: absolute;
top: 15px;
left: 0;
@@ -1531,11 +1588,8 @@
.text-wrapper {
position: absolute;
bottom: 83px;
- /* 根据需要调整文字距离图片底部的距离 */
left: 10px;
- /* 根据需要调整文字距离图片左边的距离 */
color: #fff;
- /* 根据需要调整文字颜色 */
font-size: 10px;
font-weight: blod;
font-family: PingFang SC;
@@ -1632,9 +1686,7 @@
@media screen and (min-width: 500px) {
.uni-swiper-dot-box {
width: 400px;
- /* #ifndef APP-NVUE */
margin: 0 auto;
- /* #endif */
margin-top: 8px;
}
@@ -1642,4 +1694,54 @@
width: 100%;
}
}
+
+ /* 优惠券规则弹窗样式 */
+ .rule-popup {
+ width: 600rpx;
+ background-color: #FFFFFF;
+ border-radius: 16rpx;
+ overflow: hidden;
+ }
+
+ .rule-popup-title {
+ height: 100rpx;
+ line-height: 100rpx;
+ text-align: center;
+ font-size: 32rpx;
+ font-weight: 600;
+ color: #FFFFFF;
+ background-color: #FFAA48;
+ }
+
+ .rule-popup-content {
+ padding: 30rpx;
+ }
+
+ .rule-item {
+ display: flex;
+ margin-bottom: 20rpx;
+ }
+
+ .rule-label {
+ width: 140rpx;
+ font-size: 28rpx;
+ color: #666666;
+ flex-shrink: 0;
+ }
+
+ .rule-value {
+ flex: 1;
+ font-size: 28rpx;
+ color: #333333;
+ line-height: 40rpx;
+ }
+
+ .rule-popup-close {
+ height: 90rpx;
+ line-height: 90rpx;
+ text-align: center;
+ font-size: 30rpx;
+ color: #FFAA48;
+ border-top: 1px solid #EEEEEE;
+ }
\ No newline at end of file
diff --git a/pages/newOrder/confirmOrder.vue b/pages/newOrder/confirmOrder.vue
index 5aca76c..a766ccc 100644
--- a/pages/newOrder/confirmOrder.vue
+++ b/pages/newOrder/confirmOrder.vue
@@ -683,6 +683,8 @@
if(this.buyInfo.teacher){
order.teacherId = this.buyInfo.teacher.userId
}else{
+ //打印
+ console.log(this.$globalData.newOrderData.companionLevel);
order.companionLevel = ['', 'junior', 'senior'].indexOf(this.$globalData.newOrderData.companionLevel)
}
diff --git a/pages/newOrder/serviceNew.vue b/pages/newOrder/serviceNew.vue
index 0c47ce8..42d0c71 100644
--- a/pages/newOrder/serviceNew.vue
+++ b/pages/newOrder/serviceNew.vue
@@ -244,7 +244,9 @@
// 初始化伴宠师等级
if(this.$globalData.newOrderData.companionLevel) {
this.companionLevel = this.$globalData.newOrderData.companionLevel
- }
+ }else{
+ this.$globalData.newOrderData.companionLevel = this.companionLevel
+ }
},
methods:{
selectAddress(){
diff --git a/pages/personalCenter/index.vue b/pages/personalCenter/index.vue
index 63311b3..d2a7c0b 100644
--- a/pages/personalCenter/index.vue
+++ b/pages/personalCenter/index.vue
@@ -111,7 +111,7 @@
-
+
+
+
diff --git a/pages_order/order/orderDetail.vue b/pages_order/order/orderDetail.vue
index 44c25d6..15c5f40 100644
--- a/pages_order/order/orderDetail.vue
+++ b/pages_order/order/orderDetail.vue
@@ -28,6 +28,9 @@
+
@@ -208,6 +211,14 @@
// 处理取消订单
handleCancelOrder() {
// 待实现取消订单逻辑
+ },
+
+ // 修改订单
+ modifyOrder() {
+ // 跳转到服务选择页面,并传递订单ID参数
+ uni.navigateTo({
+ url: `/pages_order/order/orderModify?orderId=${this.orderId}`
+ });
}
}
}
@@ -252,6 +263,11 @@
color: #FFFFFF;
}
+ .modify-btn {
+ background-color: #FFAA48;
+ color: #FFFFFF;
+ }
+
.review-btn {
background-color: #FFAA48;
color: #FFFFFF;
diff --git a/pages_order/order/orderList.vue b/pages_order/order/orderList.vue
index 7ab515f..e1b4774 100644
--- a/pages_order/order/orderList.vue
+++ b/pages_order/order/orderList.vue
@@ -60,7 +60,7 @@
+ @click="$refs.cancelOrderPopup.open(order)">
取消订单
@@ -69,6 +69,9 @@
去付款
+
去评价
@@ -210,7 +213,7 @@
},
handleCancelOrder() {
-
+ this.refresh()
},
// 加载更多
@@ -311,6 +314,13 @@
this.currentOrder = order;
this.$refs.companionSelectPopup.open();
},
+
+ // 修改订单
+ modifyOrder(order) {
+ uni.navigateTo({
+ url: `/pages_order/order/orderModify?orderId=${order.orderId}`
+ });
+ },
},
onLoad() {
diff --git a/pages_order/order/orderModify.vue b/pages_order/order/orderModify.vue
index 4fb89e8..1e1f086 100644
--- a/pages_order/order/orderModify.vue
+++ b/pages_order/order/orderModify.vue
@@ -1,66 +1,51 @@
-
-
-
\ No newline at end of file
diff --git a/pages_order/order/orderReview.vue b/pages_order/order/orderReview.vue
index 566ccc2..f35191c 100644
--- a/pages_order/order/orderReview.vue
+++ b/pages_order/order/orderReview.vue
@@ -4,11 +4,11 @@