diff --git a/App.vue b/App.vue
index e027018..ea791f2 100644
--- a/App.vue
+++ b/App.vue
@@ -9,6 +9,7 @@ onLaunch(()=>{
// console.log('onLaunch方法被触发');
// getFonts() //更改全局字体
})
+
// const getFonts = () => { //导入字体
// uni.loadFontFace({
// family: 'FangZhengFonts',
diff --git a/api/request.ts b/api/request.ts
index 800524d..7230ec5 100644
--- a/api/request.ts
+++ b/api/request.ts
@@ -4,4 +4,4 @@ export const suiUrl = 'http://154.8.193.216:9092/api' //隋宇霏的接口地
export const domain = 'https://www.carboner.cn/api'
export const myIp = 'http://8.130.119.119:9092/api'
-export const baseUrl = Url
+export const baseUrl = testUrl
diff --git a/pages.json b/pages.json
index 3981628..3f2dfde 100644
--- a/pages.json
+++ b/pages.json
@@ -21,6 +21,13 @@
"navigationBarTitleText" : ""
}
},
+ {
+ "path" : "pages/order/component/contactsComponent",
+ "style" :
+ {
+ "navigationBarTitleText" : ""
+ }
+ },
{
"path" : "pages/coupon/CouponMall/CouponMall",
"style" :
@@ -234,13 +241,6 @@
"enablePullDownRefresh":true //开启下拉刷新
}
},
- {
- "path" : "pages/syy",
- "style" :
- {
- "navigationBarTitleText" : ""
- }
- },
{
"path" : "pages/order/singleGoodOrder/singleGoodOrder",
"style" :
@@ -283,6 +283,27 @@
"navigationBarTitleText" : ""
}
},
+ {
+ "path" : "pages/order/serviceWaitPay/serviceWaitPay",
+ "style" :
+ {
+ "navigationBarTitleText" : ""
+ }
+ },
+ {
+ "path" : "pages/mine/Contact/testContact",
+ "style" :
+ {
+ "navigationBarTitleText" : ""
+ }
+ },
+ {
+ "path" : "pages/mine/component/contactPop",
+ "style" :
+ {
+ "navigationBarTitleText" : ""
+ }
+ },
{
"path" : "pages/coupon/OverDueCoupon/OverDueCoupon",
"style" :
diff --git a/pages/Shopping-cart/component/addProduct.vue b/pages/Shopping-cart/component/addProduct.vue
index c1c58c7..c39c174 100644
--- a/pages/Shopping-cart/component/addProduct.vue
+++ b/pages/Shopping-cart/component/addProduct.vue
@@ -13,7 +13,6 @@
{{productBrief.name}}
-
@@ -37,8 +36,7 @@
- 加入购物车
+ 加入购物车
@@ -53,9 +51,7 @@
onShow
} from "@dcloudio/uni-app";
import {
- baseUrl,
- testUrl,
- suiUrl
+ baseUrl
} from '../../../api/request';
const productBrief = ref({}) //商品简要对象
const quantity = ref(1)
@@ -206,7 +202,7 @@
.image-wrapper_2 {
padding: 11.25rpx 0;
- background-color: #f5f5dc;
+ background-color: #FBDEDF;
border-radius: 5.63rpx 0rpx 0rpx 5.63rpx;
width: 52.5rpx;
height: 52.5rpx;
@@ -219,7 +215,7 @@
.text-wrapper {
padding: 15rpx 0 11.25rpx;
- background-color: #f5f5dc;
+ background-color: #FBDEDF;
width: 52.5rpx;
height: 52.5rpx;
}
@@ -233,7 +229,7 @@
.image-wrapper_3 {
padding: 11.25rpx 0;
- background-color: #f5f5dc;
+ background-color: #FBDEDF;
border-radius: 0rpx 5.63rpx 5.63rpx 0rpx;
width: 52.5rpx;
height: 52.5rpx;
@@ -242,7 +238,7 @@
.text-wrapper_2 {
margin-right: 15rpx;
padding: 22.5rpx 0;
- background-color: #ffd45a;
+ background-color: #E79EA1;
border-radius: 93.75rpx;
}
diff --git a/pages/Shopping-cart/newaddress_Info/newaddress_Info.vue b/pages/Shopping-cart/newaddress_Info/newaddress_Info.vue
index 3f17a83..6a5c9cb 100644
--- a/pages/Shopping-cart/newaddress_Info/newaddress_Info.vue
+++ b/pages/Shopping-cart/newaddress_Info/newaddress_Info.vue
@@ -1,7 +1,6 @@
- 收货信息
收货人
@@ -22,25 +21,24 @@
:disabled="true"/>
详细地址
-
+
-
- 设为默认收货地址
+ 设为默认收货地址
-
+
@@ -148,9 +146,6 @@ const chooseLocation = () => { //定位获取地址
})
}
const bindTimeChange = (e) => { //picker省市区选择
- // console.log('省--->',e.detail.value[0]);
- // console.log('市--->',e.detail.value[1]);
- // console.log('区--->',e.detail.value[2]);
addressParam.value.region = e.detail.value[0] + e.detail.value[1] + e.detail.value[2]
}
@@ -170,11 +165,13 @@ const bindTimeChange = (e) => { //picker省市区选择
}
.page {
padding-top: 26.44rpx;
- background-color: #fffaf0;
+ // background-color: #fffaf0;
+ background-image: url('https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FQfLHXSAU-feiyigongfangbeijin.png');
+ background-size: 100% 100%;
width: 100%;
overflow-y: auto;
overflow-x: hidden;
- // height: 100vh;
+ height: 100vh;
overflow: hidden;
}
.group {
@@ -194,9 +191,9 @@ const bindTimeChange = (e) => { //picker省市区选择
margin-right: 14.1rpx;
padding-left: 20.49rpx;
padding-right: 15.13rpx;
- background-color: #fffef8;
+ background-color: #ffffff;
border-radius: 9.38rpx;
- border: solid 1.88rpx #818181;
+ // border: solid 1.88rpx #818181;
}
.group_2 {
padding: 24.24rpx 4.65rpx 12.19rpx;
@@ -218,7 +215,7 @@ const bindTimeChange = (e) => { //picker省市区选择
margin-right: 28.71rpx;
}
.group_4 {
- padding: 12.19rpx 4.29rpx 10.31rpx;
+ padding: 14.06rpx 5.04rpx 12.19rpx;
border-bottom: solid 1.88rpx #efefef;
}
.text_5 {
@@ -248,12 +245,12 @@ const bindTimeChange = (e) => { //picker省市区选择
}
.section_2 {
width: 300rpx;
- height: 150rpx;
+ // height: 45rpx;
flex: 1 1 0;
margin-right: 19.57rpx;
}
.group_7 {
- padding: 25.31rpx 4.88rpx 32.01rpx;
+ padding: 14.06rpx 5.04rpx 12.19rpx;
}
.image_2 {
margin-right: 19.5rpx;
@@ -265,18 +262,18 @@ const bindTimeChange = (e) => { //picker省市区选择
left: 0;
right: 0;
bottom: 0;
- margin-right: 13.13rpx;
+ // margin-right: 13.13rpx;
padding: 16.88rpx 0;
background-color: #fffef8;
}
.text-wrapper_4 {
padding: 27.24rpx 0 23.61rpx;
- background-color: #ffa948;
+ background-color: #FBDEDF;
border-radius: 46.88rpx;
width: 618.75rpx;
}
.text_8 {
- color: #ffffff;
+ color: #C35C5D;
font-size: 30rpx;
font-family: Open Sans;
line-height: 27.9rpx;
@@ -285,6 +282,15 @@ const bindTimeChange = (e) => { //picker省市区选择
height: 100rpx;
width: 450rpx;
margin-left: 50rpx;
+}
+.tag {
+ width: 55.75rpx;
+ height: 55.75rpx;
+}
+.radius {
+ transform: scale(0.7);
+ width: 37.5rpx;
+ height: 37.5rpx;
}
@import url(../../../common/css/global.css);
\ No newline at end of file
diff --git a/pages/Shopping-cart/productmain/productmain.vue b/pages/Shopping-cart/productmain/productmain.vue
index f7d6ecc..95fb481 100644
--- a/pages/Shopping-cart/productmain/productmain.vue
+++ b/pages/Shopping-cart/productmain/productmain.vue
@@ -56,6 +56,7 @@
+
+
@@ -138,16 +140,19 @@ const current = ref(1) //用于判断是实体类商品还是服务类商品
const allCheck = ref(false) //全选
const checkedData = ref([]) //选择的暂存保存数组
const totalPrice = ref(0)
-// const userInfo = wx.getStorageSync('userInfo')
const stateText = ref({
topBtn: '编辑',
bottomBtn: '去结算'
})
+//服务类商品
+const serviceProduct = ref([])
onShow(()=>{
getProductCart() //获取商品类
+ getServiceCart() //获取服务类
})
onLoad(()=>{
getProductCart() //再获取一次实体类商品的列表
+ getServiceCart() //再获取一次
})
//小程序刷新根据用户id获取购物车信息
const getProductCart = async ()=>{
@@ -185,7 +190,7 @@ const deleteProduct = async (idArr) =>{ //删除商品
totalPrice.value = 0
}
}
-const getServiceCart =()=>{
+const getServiceCart = async () => {
console.log('获取服务类商品方法被触发');
}
//更改实体商品和服务类方法
diff --git a/pages/Shopping-cart/productmain/testproductmain.vue b/pages/Shopping-cart/productmain/testproductmain.vue
index a9f1c36..73e0bf0 100644
--- a/pages/Shopping-cart/productmain/testproductmain.vue
+++ b/pages/Shopping-cart/productmain/testproductmain.vue
@@ -1,683 +1,838 @@
-
-
- 购物车
-
-
-
-
- {{ stateText.topBtn }}
-
-
-
- 商品类
- 服务类
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.cartGoodVO.name }}
- 【{{ item.cartGoodVO.type }}】
-
-
-
- ¥{{ item.cartGoodVO.price }}
-
+
+
+
+
+
+
+
+ {{ item.cartGoodVO.name }}
+ 【{{ item.cartGoodVO.type }}】
+
+
+
+ ¥{{ item.cartGoodVO.price }}
+
-
-
-
-
-
-
- {{ item.quantity }}
-
-
-
-
-
-
-
-
-
-
-
- 【非遗手工艺体验】纸笺加工技艺-流沙笺团扇制作体验
-
-
- 仿真丝团扇;上午场(09:30-12:00)
- 预约日期:2024-10-15
-
-
-
-
-
-
-
- 138.
-
- 00
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ {{ item.quantity }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.cartExperienceGoodVO.name }}
+
+
+ {{ item.timeSlot }}
+ 预约日期:{{ item.reservationDate }}
+
+
+
+
+
+
+
+ ¥{{ item.cartExperienceGoodVO.price }}
+
+
+
+ {{ item.quantity }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 全选
-
-
- 合计:{{ totalPrice }}元
-
- {{ stateText.bottomBtn }}
-
-
-
-
+ 全选
+
+
+ 合计:{{ totalPrice }}元
+
+ {{ stateText.bottomBtn }}
+
+
+
+
+ .ml-17 {
+ margin-left: 31.88rpx;
+ }
+
+ .ml-83 {
+ margin-left: 155.63rpx;
+ }
+
+ .ml-9 {
+ margin-left: 16.88rpx;
+ }
+
+ .ml-7 {
+ margin-left: 13.13rpx;
+ }
+
+ .page {
+ background-image: url('https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FQfLHXSAU-feiyigongfangbeijin.png');
+ background-size: 100% 100%;
+ background-repeat: no-repeat;
+ width: 100%;
+ overflow-y: auto;
+ overflow-x: hidden;
+ // height: 100%;
+ height: 100vh;
+ }
+
+ .section_2 {
+ position: fixed;
+ left: 0;
+ right: 0;
+ top: 0;
+ padding: 28.13rpx 30.69rpx 18.75rpx;
+ background-color: #fbdedf;
+ z-index: 99;
+ }
+
+ .font {
+ font-size: 30rpx;
+ font-family: FangZhengFonts;
+ line-height: 27.77rpx;
+ color: #c35c5d;
+ }
+
+ .text {
+ line-height: 28.24rpx;
+ }
+
+ .section_3 {
+ padding: 0 15rpx;
+ background-color: #ffffff;
+ border-radius: 9.38rpx;
+ height: 56.25rpx;
+ }
+
+ .image {
+ width: 54.38rpx;
+ height: 52.5rpx;
+ }
+
+ .section_1 {
+ flex: 1 1 0;
+ margin-right: 7.5rpx;
+ }
+
+ .text_2 {
+ margin-right: 4.46rpx;
+ }
+
+ .section_5 {
+ position: fixed;
+ left: 0;
+ right: 0;
+ top: 102rpx;
+ padding: 0 121.88rpx;
+ background-color: #ffffff;
+ z-index: 99;
+ }
+
+ .group {
+ padding: 27.06rpx 4.33rpx 23.08rpx 10.89rpx;
+ z-index: 1;
+ }
+
+ .font_2 {
+ font-size: 30rpx;
+ font-family: FangZhengFonts;
+ line-height: 27.77rpx;
+ color: #323232;
+ }
+
+ .text_3 {
+ line-height: 27.9rpx;
+ }
+
+ .text_4 {
+ line-height: 28.71rpx;
+ }
+
+ .section_6 {
+ background-color: #fb8b05;
+ width: 112.5rpx;
+ height: 5.63rpx;
+ }
+
+ .list {
+ margin: 192rpx 24rpx 120rpx 24rpx;
+ }
+
+ .list-item:first-child {
+ margin-top: 0;
+ }
+
+ .mt-14 {
+ margin-top: 9rpx;
+ }
+
+ .section_10 {
+ padding: 38.1rpx 31.52rpx 30.07rpx 27.31rpx;
+ background-color: #ffffff;
+ border-radius: 18.75rpx;
+ }
+
+ .image_3 {
+ transform: scale(0.7);
+ width: 37.5rpx;
+ height: 37.5rpx;
+ }
+
+ .image_2 {
+ // margin-bottom: 8.7rpx;
+ border-radius: 9.38rpx;
+ width: 127.5rpx;
+ height: 170.00rpx;
+ }
+
+ .group_2 {
+ margin-left: 23.31rpx;
+ margin-top: 2.33rpx;
+ }
+
+ .group_3 {
+ padding: 0 9.49rpx;
+ }
+
+ .font_3 {
+ font-size: 26.25rpx;
+ font-family: FangZhengFonts;
+ line-height: 25.01rpx;
+ color: #323232;
+ }
+
+ .text_5 {
+ line-height: 25.54rpx;
+ }
+
+ .font_4 {
+ font-size: 33.75rpx;
+ font-family: FangZhengFonts;
+ line-height: 22.07rpx;
+ color: #e79ea1;
+ }
+
+ .text_6 {
+ margin-left: 24.19rpx;
+ margin-bottom: 7.78rpx;
+ line-height: 22.54rpx;
+ }
+
+ .image_6 {
+ margin-left: -76.69rpx;
+ width: 30rpx;
+ height: 28.13rpx;
+ }
+
+ .font_5 {
+ font-size: 26.25rpx;
+ font-family: FangZhengFonts;
+ line-height: 18.73rpx;
+ color: #e79ea1;
+ }
+
+ .text_7 {
+ margin-left: 61.44rpx;
+ margin-bottom: 6.15rpx;
+ line-height: 17.53rpx;
+ }
+
+ .image_4 {
+ border-radius: 9.38rpx 0rpx 0rpx 9.38rpx;
+ width: 45.21rpx;
+ height: 48.13rpx;
+ }
+
+ .group_4 {
+ margin-left: 3.77rpx;
+ }
+
+ .text-wrapper {
+ padding: 14.74rpx 0 14.66rpx;
+ background-color: #fbdedf;
+ width: 58.41rpx;
+ height: 48.13rpx;
+ }
+
+ .font_6 {
+ font-size: 26.25rpx;
+ font-family: Open Sans;
+ line-height: 18.73rpx;
+ color: #323232;
+ }
+
+ .image_5 {
+ border-radius: 0rpx 9.38rpx 9.38rpx 0rpx;
+ width: 45.21rpx;
+ height: 48.13rpx;
+ }
+
+ .list-item_2 {
+ padding: 22.01rpx 18.84rpx 33.75rpx;
+ background-color: #ffffff;
+ border-radius: 18.75rpx;
+ }
+
+ .image_8 {
+ transform: scale(0.7);
+ width: 37.5rpx;
+ height: 37.5rpx;
+ }
+
+ .image_7 {
+ border-radius: 9.38rpx;
+ margin-left: 39.79rpx;
+ margin-top: 2.36rpx;
+ width: 127.5rpx;
+ height: 170rpx;
+ }
+
+ .group_5 {
+ margin: 0 13.99rpx 7.5rpx 23.25rpx;
+ }
+
+ .font_7 {
+ font-size: 26.25rpx;
+ font-family: FangZhengFonts;
+ line-height: 31.88rpx;
+ color: #323233;
+ }
+
+ .section_7 {
+ margin-right: 8.63rpx;
+ padding: 11.1rpx 10.14rpx 14.25rpx;
+ background-color: #fbdedf;
+ border-radius: 9.38rpx;
+ }
+
+ .font_8 {
+ font-size: 22.5rpx;
+ font-family: FangZhengFonts;
+ line-height: 22.07rpx;
+ color: #6b6e72;
+ }
+
+ .text_8 {
+ line-height: 20.83rpx;
+ }
+
+ .image_9 {
+ margin-right: 5.06rpx;
+ width: 22.5rpx;
+ height: 22.5rpx;
+ }
+
+ .group_6 {
+ padding: 0 22.61rpx;
+ }
+
+ .font_9 {
+ font-size: 33.75rpx;
+ font-family: FangZhengFonts;
+ line-height: 25.01rpx;
+ font-weight: 600;
+ color: #e79ea1;
+ }
+
+ .text_9 {
+ // margin-left: 25.14rpx;
+ line-height: 24.88rpx;
+ margin-right: 56rpx;
+ }
+
+ .image_12 {
+ margin-left: -90.77rpx;
+ width: 30rpx;
+ height: 26.25rpx;
+ }
+
+ .font_10 {
+ font-size: 26.25rpx;
+ font-family: FangZhengFonts;
+ line-height: 18.73rpx;
+ font-weight: 600;
+ color: #e79ea1;
+ }
+
+ .text_10 {
+ margin-left: 61.61rpx;
+ line-height: 19.29rpx;
+ }
+
+ .image_10 {
+ border-radius: 9.38rpx 0rpx 0rpx 9.38rpx;
+ width: 45.24rpx;
+ height: 45rpx;
+ }
+
+ .text-wrapper_2 {
+ padding: 12.39rpx 0 13.88rpx;
+ background-color: #fbdedf;
+ width: 58.42rpx;
+ height: 45rpx;
+ }
+
+ .image_11 {
+ border-radius: 0rpx 9.38rpx 9.38rpx 0rpx;
+ width: 45.24rpx;
+ height: 45rpx;
+ }
+
+ .section_8 {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ padding: 20.63rpx 20.63rpx 15rpx;
+ background-color: #ffffff;
+ }
+
+ .image_13 {
+ margin-top: 0;
+ }
+
+ .text_11 {
+ line-height: 27.3rpx;
+ }
+
+ .text_12 {
+ color: #000000;
+ }
+
+ .text-wrapper_3 {
+ padding: 20.93rpx 0 25.24rpx;
+ background-color: #e79ea1;
+ border-radius: 75rpx;
+ width: 219.38rpx;
+ height: 76.88rpx;
+ }
+
+ .text_13 {
+ color: #ffffff;
+ line-height: 30.71rpx;
+ }
+
+ .flex_1 {
+ // display: flex
+ width: 480rpx;
+ }
+
+ @import url(../../../common/css/global.css);
+
\ No newline at end of file
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 777e098..144b436 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -3,7 +3,7 @@
泠
珑
@@ -92,7 +92,7 @@ const getFonts =()=>{ //获取字体
diff --git a/pages/mine/Contact/testContact.vue b/pages/mine/Contact/testContact.vue
new file mode 100644
index 0000000..a4e8f1d
--- /dev/null
+++ b/pages/mine/Contact/testContact.vue
@@ -0,0 +1,242 @@
+
+
+
+ 联系人列表
+
+
+
+ {{ item.name }}
+ {{ item.phone }}
+
+ 默认
+
+
+
+
+
+
+
+
+ 新增联系人
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/mine/component/contactPop.vue b/pages/mine/component/contactPop.vue
new file mode 100644
index 0000000..e5ab6a7
--- /dev/null
+++ b/pages/mine/component/contactPop.vue
@@ -0,0 +1,225 @@
+
+
+
+ 添加联系人
+
+
+
+ 姓名
+
+
+
+ 手机号码
+
+
+
+
+ 设为默认联系人
+
+
+
+
+ 保存联系人
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/mine/main/main.vue b/pages/mine/main/main.vue
index a5c7649..f198c87 100644
--- a/pages/mine/main/main.vue
+++ b/pages/mine/main/main.vue
@@ -113,7 +113,7 @@ onMounted(() => {
// }
const goToText = () => { //跳转到联系人信息
uni.navigateTo({
- url: '/pages/mine/Contact/Contact'
+ url: '/pages/mine/Contact/testContact'
})
}
const goTo = ()=>{ //跳转到预约
diff --git a/pages/order/component/addressComponent.vue b/pages/order/component/addressComponent.vue
index ed19e2d..dd54c00 100644
--- a/pages/order/component/addressComponent.vue
+++ b/pages/order/component/addressComponent.vue
@@ -2,7 +2,7 @@
收货地址
-
@@ -10,10 +10,6 @@
-
{{ item.name }}
{{ item.phone }}
@@ -38,7 +34,7 @@
diff --git a/pages/order/product-waitpay/product-waitpay.vue b/pages/order/product-waitpay/product-waitpay.vue
index bb76570..22edfa7 100644
--- a/pages/order/product-waitpay/product-waitpay.vue
+++ b/pages/order/product-waitpay/product-waitpay.vue
@@ -156,7 +156,7 @@
+
+
diff --git a/pages/store-home/ProductDetails/ProductDetails.vue b/pages/store-home/ProductDetails/ProductDetails.vue
index b6fb5cb..607bba7 100644
--- a/pages/store-home/ProductDetails/ProductDetails.vue
+++ b/pages/store-home/ProductDetails/ProductDetails.vue
@@ -82,7 +82,7 @@
-
-
\ No newline at end of file
diff --git a/pages/workshop/component/timeSelect.vue b/pages/workshop/component/timeSelect.vue
index 28132da..0e08bc2 100644
--- a/pages/workshop/component/timeSelect.vue
+++ b/pages/workshop/component/timeSelect.vue
@@ -13,7 +13,7 @@
src="./images/cha.png"
/>
- ¥99
+ ¥{{ productObject.price }}
请选择
@@ -66,7 +66,7 @@
- 下一步
+ 加入购物车
@@ -92,7 +92,7 @@
const cookie = wx.getStorageSync("cookie") //请求头
const appIdx = ref(0)
const cnt = ref(1)
- const productObject = ref({})
+ const productObject = ref()
const appointmentDateVOList = ref([])
let appointmentDate = ''
@@ -107,6 +107,7 @@
closeyyxzTip()
emitter.on('getGoodData', (val) => {
productObject.value = val
+ // console.log('');
appointmentDateVOList.value = val.appointmentDateVOList
selectObj.value = new Array(appointmentDateVOList.value.length).fill(null).map(() => ({
backgroundColor: '#fff',
@@ -130,9 +131,9 @@
}
})
- emitter.on('getBookingNumberMap', (val:any) => {
+ emitter.on('getBookingNumberMap', (val:any) => { //将map集合传过来
countMap = val
- console.log("==============>", val)
+ console.log("val==============>", val)
appointmentDate = appointmentDateVOList.value[appIdx.value].specificDate;
})
})
@@ -141,7 +142,43 @@
const maskClosehandler = () => {
}
-
+
+ const addCart = async () =>{ //加入购物车方法
+ console.log('日期--->',appointmentDate,'时间段--->',timeSlot,'数量--->',cnt.value,'商品id---->',productObject.value.id);
+ if(appointmentDate === '' || timeSlot === '' ) {
+ await uni.showToast({
+ icon: 'error',
+ title: "字段不能为空"
+ })
+ return;
+ }
+ const res = await uni.request({
+ url: baseUrl + '/cartExperience/add',
+ method: 'POST',
+ header: {
+ 'cookie': wx.getStorageSync('cookie')
+ },
+ data: {
+ goodId : productObject.value.id,
+ quantity : cnt.value,
+ reservationDate : appointmentDate,
+ timeSlot : timeSlot
+ }
+ })
+ console.log('加入购物车结果',res);
+ if(res.data.code === 1) {
+ uni.showToast({
+ icon: 'success',
+ title: "加入购物车成功"
+ })
+ close() //关闭弹窗
+ } else {
+ uni.showToast({
+ icon: 'error',
+ title: "服务错误"
+ })
+ }
+ }
@@ -157,7 +194,7 @@
tip.value.open()
}
- const add = () => {
+ const add = () => { //添加商品方法
if (restNumber.value === '请选择时间段') {
uni.showToast({
title: '请选择时间段',
@@ -170,21 +207,22 @@
}
}
- const sub = () => {
+ const sub = () => { //减少商品方法
if (cnt.value > 1) {
cnt.value --
}
}
- const close = () => {
+ const close = () => { //关闭弹窗
emitter.emit('closeTimeDialog')
}
- const isSelected = (index:any) => {
+ const isSelected = (index:any) => { //选择预约日期方法
appIdx.value = index
restNumber.value = '请选择时间段'
appointmentDate = appointmentDateVOList.value[appIdx.value].specificDate;
+ timeSlot = ''
console.log('appointmentDate===================================>', appointmentDate)
for (var i = 0; i < appointmentDateVOList.value.length; i ++ ) {
if (i == index) {
@@ -205,7 +243,7 @@
}
- const itemIsSelected = (index:any) => {
+ const itemIsSelected = (index:any) => { //选择时间段方法
timeSlot = appointmentDateVOList.value[appIdx.value].timePeriodVOList[index].timeSlot
restNumber.value = countMap[appointmentDate + '&' + timeSlot]
console.log('timeSlot====================================>', timeSlot)
diff --git a/pages/workshop/productmain/productmain.vue b/pages/workshop/productmain/productmain.vue
index 3e29fae..804ec38 100644
--- a/pages/workshop/productmain/productmain.vue
+++ b/pages/workshop/productmain/productmain.vue
@@ -72,7 +72,7 @@