From 6f090681ff355f865300c94dae57b2b1f3486f05 Mon Sep 17 00:00:00 2001
From: "Mr.jiang" <714156421@qq.com>
Date: Wed, 26 Jun 2024 17:29:23 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=94=AF=E4=BB=98=E8=AE=A2?=
=?UTF-8?q?=E5=8D=95=20=E6=96=B0=E5=8A=A0=E9=80=89=E6=8B=A9=E4=BC=98?=
=?UTF-8?q?=E6=83=A0=E5=8A=B5=E9=A1=B5=E9=9D=A2=20=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E9=80=89=E6=8B=A9=E6=97=B6=E9=97=B4=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
my/hongbao/youhuijuanList.vue | 278 ++++++++++++++++++++++++++++++++++
my/order/payModify.vue | 171 ++++++++++++++++++---
pages.json | 10 ++
pages/my/cikarDrtail.vue | 11 +-
pages/my/fuwuDateil.vue | 4 +-
5 files changed, 448 insertions(+), 26 deletions(-)
create mode 100644 my/hongbao/youhuijuanList.vue
diff --git a/my/hongbao/youhuijuanList.vue b/my/hongbao/youhuijuanList.vue
new file mode 100644
index 0000000..a15b7b2
--- /dev/null
+++ b/my/hongbao/youhuijuanList.vue
@@ -0,0 +1,278 @@
+
+
+
+ 确定
+
+
+
+
+ {{item.money}}
+ 元
+
+
+ 满{{item.minMoney}}元可用
+
+
+
+
+ {{item.couponName}}
+ {{item.endDate}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/my/order/payModify.vue b/my/order/payModify.vue
index bda7f12..4027f2b 100644
--- a/my/order/payModify.vue
+++ b/my/order/payModify.vue
@@ -2,13 +2,14 @@
-
@@ -211,7 +240,11 @@
export default {
data() {
return {
- single:'2024-06-19',
+ startTime: '',
+ msTimeList: [],
+ msTimeDate: 0,
+ isTrue1: false,
+ single:'请选择时间',
radio1:'',
sex: [{
text: '我已同意《盛安健康服务协议》',
@@ -253,8 +286,6 @@
user: {},
game: {}
},
- isTrue: 0,
-
phone: '',
isVip: false,
birthDate: '',
@@ -277,7 +308,7 @@
city:'',
district:'',
addressId:'',
- isTrues: true,
+ isTrue: false,
jishiName:'',
checkbox:false,
couponData:[],
@@ -285,19 +316,32 @@
textareaData:'',
ordersId:'',
userPackageDetailId:'',
+ couponDataList:''
}
},
onLoad(e) {
- this.jishiName=this.$queue.getData('getJishi');
- // setTimeout(() => {
- // // this.loading = false;
- // }, 2000)
- this.isTrue = e.isTrue
- if (this.isTrue) {
- uni.setNavigationBarTitle({
- title: '订单详情'
- })
+ if (this.$queue.getData('msTimeDate')) {
+ this.msTimeDate = parseInt(this.$queue.getData('msTimeDate'));
+ } else {
+ this.msTimeDate = 60;
}
+ var date = new Date();
+ var year = date.getFullYear();
+ let month = (parseInt(date.getMonth()) + 1) > 9 ? (parseInt(date.getMonth()) + 1) : "0" + (parseInt(
+ date.getMonth()) + 1) // 当前月份
+ let days = (date.getDate()) > 9 ? date.getDate() : "0" + date.getDate() //当前日期
+ let fullDate = `${month}-${days}`
+ let Time = year + '-' + fullDate
+ this.yearsDate = Time;
+ var classifyId=this.$queue.getData('classifyId')
+ this.classifyId = classifyId;
+ this.getMsTime(Time);
+ this.jishiName=this.$queue.getData('getJishi');
+ this.couponId=this.$queue.getData('youhui');
+ if(this.couponId){
+ this.youhuiF(this.couponId)
+ }
+
this.ordersId = this.$queue.getData('ordersId');
this.userPackageDetailId = this.$queue.getData('userPackageDetailId');
this.youhui()
@@ -343,6 +387,54 @@
// #endif
},
methods: {
+ // 时间段数据
+ TimeData(e) {
+ var date = new Date();
+ var year = date.getFullYear();
+ // if(this.msTimeList.length > 0){
+ // let startTime = year + '-' + e.days + ' ' + e.hours
+ // for (var i = 0; i < this.msTimeList.length; i++) {
+ // let msTime = this.msTimeList[i].artificerDate + ' ' + this.msTimeList[i].artificerTime
+ // if(startTime === msTime){
+ // this.isTrue = false
+ // uni.showModal({
+ // title: '温馨提示',
+ // content: '当前时段已被预约,请更换预约时段!',
+ // showCancel: true,
+ // cancelText: '取消',
+ // confirmText: '确定',
+ // success: res => {
+ // if(res.confirm){
+ // this.isTrue = true
+ // }
+ // }
+ // });
+ // return;
+ // }
+ // }
+ // }else{
+ this.startTime = year + '-' + e.days + ' ' + e.hours
+ this.isTrue = false
+ // }
+ },
+ getMsTime(artificerDate) {
+ this.$Request.getT('/app/artificerTime/selectArtificerTimeListByArtificerId?artificerId=' + this
+ .artificerId + '&artificerDate=' + artificerDate).then(res => {
+ if (res.code == 0) {
+ this.msTimeList = res.data;
+ console.log(res.data, "获取忙时时间")
+ }
+ })
+ },
+ // 打开弹窗
+ openData() {
+ this.isTrue = true
+ },
+ youhuijuan(){
+ uni.navigateTo({
+ url:'/my/hongbao/youhuijuanList'
+ })
+ },
openpay() {//验证
if(this.single=='2024-06-19'){
uni.showToast({
@@ -369,6 +461,24 @@
checkboxChange(e){
this.couponId=e.detail.value.join(",")
},
+ youhuiF(couponId){//获取优惠卷
+ let that = this;
+ let data = {
+ page: 1,
+ limit: 10,
+ id:couponId,
+ }
+ that.$Request.get("/app/coupon/selectCouponUserList", data).then(res => {
+ if (res.code == 0) {
+ var list=res.data.list;
+ that.couponDataList=list.reduce((sum, item) => sum + item.money, 0)
+ console.log("asdasdasdasd",that.couponDataList)
+ } else {
+ that.$queue.showToast(res.msg)
+ }
+
+ });
+ },
youhui(){//获取优惠卷
let that = this
let data = {
@@ -561,7 +671,7 @@
userId: uni.getStorageSync('userId'),
longitude:that.longitude,
latitude:that.latitude,
- serveTime:that.single,
+ serveTime:that.startTime,
remarks:that.textareaData,
ordersMassageList:[
{massageId: that.userPackageDetailId? that.userPackageDetailId:that.ordersId,num: 1},
@@ -1223,6 +1333,16 @@