diff --git a/components/CheckBox/index.vue b/components/CheckBox/index.vue
index f0471db..9bf97cc 100644
--- a/components/CheckBox/index.vue
+++ b/components/CheckBox/index.vue
@@ -1,5 +1,5 @@
-
+
-
-
-
- {{ item }}
-
-
-
+
+
+
+ {{
+ item
+ }}
+
+
+
diff --git a/pages/goods/components/GoodConfirm/index.vue b/pages/goods/components/GoodConfirm/index.vue
index 33080ec..b4e0087 100644
--- a/pages/goods/components/GoodConfirm/index.vue
+++ b/pages/goods/components/GoodConfirm/index.vue
@@ -66,11 +66,7 @@
-
+
@@ -83,11 +79,7 @@
>
diff --git a/pages/goods/index.vue b/pages/goods/index.vue
index f69ad5f..24bef51 100644
--- a/pages/goods/index.vue
+++ b/pages/goods/index.vue
@@ -66,7 +66,7 @@ import Calender from "@/components/Calender/index.vue";
const calendarVisible = ref(false);
const goodsData = ref({});
const goodConfirmRef = ref(null);
-const selectedDate = ref("");
+const selectedDate = ref();
const priceData = ref([]);
// 获取商品详情数据
@@ -117,25 +117,40 @@ const showConfirmPopup = () => {
// 处理确认订单
const handleConfirmOrder = async (orderData) => {
- console.log("确认订单:", orderData);
- // const commodityId = orderData.commodityId;
- // const purchaseAmount = orderData.purchaseAmount;
- // const checkInData = orderData.checkInData;
- // const checkOutData = orderData.checkOutData;
- // const consumerInfoEntityList = orderData.consumerInfoEntityList;
- // const payWay = "0";
- // const paySource = "1";
+ console.log("确认订单---1:", orderData);
+ const { goodsData } = orderData;
+ // 购买的商品id
+ const commodityId = goodsData.commodityId;
+ // 消费者信息
+ const consumerInfoEntityList = orderData.userFormList;
+ // 购买数量
+ const purchaseAmount = orderData.userFormList.length;
+ // 支付方式 0-微信 1-支付宝 2-云闪付
+ const payWay = "0";
+ // 支付渠道 0-app 1-小程序 2-h5
+ const paySource = "1";
- // const params = {
- // commodityId,
- // purchaseAmount,
- // payWay,
- // paySource,
- // consumerInfoEntityList,
- // checkInData,
- // checkOutData,
- // };
- // const res = await orderPay(params);
+ const params = {
+ commodityId,
+ purchaseAmount,
+ payWay,
+ paySource,
+ consumerInfoEntityList,
+ };
+
+ //酒店类型添加入住时间、离店时间
+ if (goodsData.commodityTypeCode === "0" && selectedDate.value) {
+ const { startDate, endDate } = selectedDate.value;
+ // 入住时间
+ params.checkInData = startDate;
+ // 离店时间
+ params.checkOutData = endDate;
+ }
+
+ // 购买数量
+
+ const res = await orderPay(params);
+ console.log("确认订单---2:", res);
// 仅作为示例,非真实参数信息。
// uni.requestPayment({
diff --git a/pages/login/components/AgreePopup/README.md b/pages/login/components/AgreePopup/README.md
new file mode 100644
index 0000000..90df96f
--- /dev/null
+++ b/pages/login/components/AgreePopup/README.md
@@ -0,0 +1,71 @@
+# AgreePopup 用户协议同意弹窗组件
+
+## 组件概述
+
+AgreePopup 是一个用于登录流程中的用户协议同意弹窗组件,用于向用户展示隐私政策和用户协议,并获取用户的同意确认。
+
+## 功能需求
+
+### 界面设计
+- **弹窗标题**:显示"温馨提示"标题,居中显示
+- **关闭按钮**:右上角显示"×"关闭按钮,点击可关闭弹窗
+- **内容区域**:
+ - 主要说明文字:"您在使用朵花温泉服务前,请仔细阅读用户隐私条款及用户注册须知,当您点击同意,即表示您已经理解并同意该条款,该条款将构成对您具有法律约束力的文件。"
+ - 注意事项:"请您注意:如果您不同意上述用户注册须知、隐私政策或其中任何约定,请您停止注册。如您阅读并点击同意即表示您已充分阅读理解并接受其全部内容,并表明您也同意朵花温泉可以依据以上隐私政策来处理您的个人信息。"
+
+### 交互功能
+- **复选框**:
+ - 显示蓝色勾选框
+ - 文字说明:"本人已仔细阅读《用户协议》和《隐私协议》,知悉并诺遵守该内容。"
+ - 支持点击切换选中/未选中状态
+- **确认按钮**:
+ - 显示"我知道了"按钮
+ - 蓝色背景,白色文字
+ - 圆角设计
+ - 点击后触发同意事件并关闭弹窗
+
+### 技术要求
+- 使用 Vue 3 Composition API
+- 支持弹窗显示/隐藏控制
+- 提供事件回调:同意、关闭
+- 响应式设计,适配移动端
+- 使用 uni-app 框架
+
+### 样式规范
+- 弹窗背景:白色
+- 圆角设计
+- 文字颜色:深灰色
+- 按钮:蓝色主题色
+- 复选框:蓝色选中状态
+- 适当的内边距和间距
+
+### 使用场景
+- 用户首次登录时显示
+- 隐私政策更新后重新确认
+- 注册流程中的协议确认
+
+## 组件接口
+
+### Props
+- `visible`: Boolean - 控制弹窗显示/隐藏
+- `title`: String - 弹窗标题,默认"温馨提示"
+
+### Events
+- `@agree`: 用户点击同意时触发
+- `@close`: 用户关闭弹窗时触发
+- `@cancel`: 用户取消操作时触发
+
+### Methods
+- `show()`: 显示弹窗
+- `hide()`: 隐藏弹窗
+
+## 文件结构
+```
+AgreePopup/
+├── README.md # 组件说明文档
+├── index.vue # 组件主文件
+├── styles/
+│ └── index.scss # 组件样式文件
+└── images/
+ └── 登录授权1.png # 设计稿参考图
+```
\ No newline at end of file
diff --git a/pages/login/components/AgreePopup/demo.vue b/pages/login/components/AgreePopup/demo.vue
new file mode 100644
index 0000000..f399cf1
--- /dev/null
+++ b/pages/login/components/AgreePopup/demo.vue
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+
+ 组件状态:
+ 弹窗可见:{{ popupVisible }}
+ 用户操作:{{ userAction }}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/login/components/AgreePopup/images/登录授权1.png b/pages/login/components/AgreePopup/images/登录授权1.png
new file mode 100644
index 0000000..dc5c8dd
Binary files /dev/null and b/pages/login/components/AgreePopup/images/登录授权1.png differ
diff --git a/pages/login/components/AgreePopup/index.vue b/pages/login/components/AgreePopup/index.vue
new file mode 100644
index 0000000..c1c37b8
--- /dev/null
+++ b/pages/login/components/AgreePopup/index.vue
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/login/components/AgreePopup/styles/index.scss b/pages/login/components/AgreePopup/styles/index.scss
new file mode 100644
index 0000000..754aa97
--- /dev/null
+++ b/pages/login/components/AgreePopup/styles/index.scss
@@ -0,0 +1,95 @@
+// AgreePopup 组件样式
+.agree-popup {
+ width: 327px;
+ background: #ffffff;
+ border-radius: 12px;
+ overflow: hidden;
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
+
+ // 弹窗头部
+ .popup-header {
+ position: relative;
+ padding: 20px 20px 0 20px;
+
+ .popup-title {
+ font-size: 18px;
+ font-weight: 600;
+ color: #333333;
+ text-align: center;
+ line-height: 24px;
+ }
+
+ .close-btn {
+ position: absolute;
+ top: 16px;
+ right: 16px;
+ width: 28px;
+ height: 28px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+
+ &:hover {
+ background: #f5f5f5;
+ border-radius: 50%;
+ }
+ }
+ }
+
+ // 弹窗内容
+ .popup-content {
+ padding: 20px;
+
+ .content-text {
+ margin-bottom: 16px;
+
+ .main-text {
+ font-size: 14px;
+ color: #333;
+ line-height: 22px;
+ display: block;
+ }
+ }
+
+ .notice-text {
+ text {
+ font-size: 13px;
+ color: #333;
+ line-height: 20px;
+ display: block;
+ }
+ }
+ }
+
+ // 按钮区域
+ .button-area {
+ padding: 0 20px 20px 20px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ .confirm-btn {
+ width: 148px;
+ height: 44px;
+ background: linear-gradient(90deg, #22a7ff 0%, #2567ff 100%);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: #ffffff;
+ border-radius: 50px;
+ font-size: 16px;
+ font-weight: 500;
+ transition: all 0.3s ease;
+
+ &:hover {
+ background: #0056cc;
+ }
+
+ &:active {
+ background: #004499;
+ transform: scale(0.98);
+ }
+ }
+ }
+}
diff --git a/pages/login/index.vue b/pages/login/index.vue
index cc54432..0a6a039 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -42,29 +42,33 @@
阅读并同意
- 《服务协议》《服务协议》
和
- 《隐私协议》《隐私协议》
+
+