diff --git a/pages/login/login.vue b/pages/login/login.vue
index 3f45519..28be931 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -54,7 +54,7 @@ export default {
return {
code: "",
form: {
- check: true
+ check: false
},
encryptedData: "",
iv: "",
diff --git a/request/api/order.js b/request/api/order.js
index 3c51e0c..d279880 100644
--- a/request/api/order.js
+++ b/request/api/order.js
@@ -10,6 +10,14 @@ const prefix = '/order';
export async function genOrderApi(params) {
return await post(`${prefix}/gen-order`, params, 3)
}
+/**
+ * 创建订单 - 购物车
+ * @param params
+ * @returns {Promise<*>}
+ */
+export async function genOrderByCartApi(params) {
+ return await post(`${prefix}/gen-order-by-cart`, params, 3)
+}
/**
* 保存购药、复诊状态下的挂号信息
* @param params
diff --git a/request/api/store.js b/request/api/product.js
similarity index 74%
rename from request/api/store.js
rename to request/api/product.js
index ca34bd4..b4b8c7c 100644
--- a/request/api/store.js
+++ b/request/api/product.js
@@ -6,7 +6,7 @@ import {get, post, uploadFile} from './http'
* @returns {Promise<*>}
*/
export async function getStoreDrugListBySalespersonApi(params) {
- return await get('/store/drug-list-by-salesperson', params, 3)
+ return await get('/product/drug-list-by-salesperson', params, 3)
}
/**
* 获取扫码诊所的商品详情
@@ -14,5 +14,5 @@ export async function getStoreDrugListBySalespersonApi(params) {
* @returns {Promise<*>}
*/
export async function getStoreDrugDetailApi(params) {
- return await get('/store/product-detail', params, 3)
-}
+ return await get('/product/product-detail', params, 3)
+}
\ No newline at end of file
diff --git a/subPackages/product/product.vue b/subPackages/product/product.vue
index 917e3e9..16f0485 100644
--- a/subPackages/product/product.vue
+++ b/subPackages/product/product.vue
@@ -46,19 +46,82 @@
规格:
{{ item.drug.specification }}
-
- ¥{{ item.price }}
-
- 库存:999盒
+
+
+ ¥{{ item.price }}
+ 库存:999盒
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -140,6 +366,7 @@ export default {
background: #f0f5ff;
min-height: 100vh;
box-sizing: border-box;
+ position: relative;
}
.search-section {
@@ -160,6 +387,7 @@ export default {
border-radius: 16rpx;
box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.05);
transition: all 0.2s ease;
+ background-color: #ffffff;
&:active {
transform: translateY(4rpx);
@@ -176,6 +404,8 @@ export default {
.item-content {
flex: 1;
+ display: flex;
+ flex-direction: column;
}
.item-title {
@@ -200,22 +430,187 @@ export default {
margin-right: 4rpx;
}
-.item-price {
+.item-bottom {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16rpx 0;
border-top: 1rpx solid #f0f0f0;
+ margin-top: auto;
+}
+
+.price-section {
+ display: flex;
+ flex-direction: column;
}
.price-tag {
font-size: 32rpx;
font-weight: 500;
color: #3A86FF;
+ margin-bottom: 4rpx;
}
.stock-tag {
font-size: 24rpx;
color: #95a5a6;
}
+
+// 简洁的购物车图标按钮
+.cart-icon-btn {
+ width: 72rpx;
+ height: 72rpx;
+ border-radius: 50%;
+ background-color: rgba(74,144,226,0.1);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ transition: all 0.2s ease;
+
+ &:active {
+ background-color: rgba(74,144,226,0.2);
+ transform: scale(0.95);
+ }
+}
+
+// 购物车悬浮球样式
+.cart-float {
+ position: fixed;
+ width: 100rpx;
+ height: 100rpx;
+ background: linear-gradient(135deg, #4A90E2, #3A86FF);
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ box-shadow: 0 8rpx 24rpx rgba(74,144,226,0.3);
+ z-index: 999;
+ transition: transform 0.2s ease;
+
+ &:active {
+ transform: scale(0.95);
+ }
+}
+
+.cart-badge {
+ position: absolute;
+ top: -10rpx;
+ right: -10rpx;
+}
+
+// 弹窗样式
+.popup-content {
+ padding: 40rpx;
+ padding-bottom: 60rpx; // 为底部安全区域留出空间
+}
+
+.popup-header {
+ margin-bottom: 40rpx;
+ text-align: center;
+}
+
+.popup-title {
+ font-size: 36rpx;
+ font-weight: 600;
+ color: #2c3e50;
+}
+
+.product-info {
+ display: flex;
+ margin-bottom: 50rpx;
+ padding: 30rpx;
+ background-color: #f8f9fa;
+ border-radius: 16rpx;
+}
+
+.product-image {
+ width: 120rpx;
+ height: 120rpx;
+ border-radius: 12rpx;
+ margin-right: 24rpx;
+}
+
+.product-details {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+}
+
+.product-name {
+ font-size: 30rpx;
+ font-weight: 500;
+ color: #2c3e50;
+ margin-bottom: 8rpx;
+}
+
+.product-spec {
+ font-size: 24rpx;
+ color: #95a5a6;
+ margin-bottom: 12rpx;
+}
+
+.product-price {
+ font-size: 32rpx;
+ font-weight: 600;
+ color: #3A86FF;
+}
+
+.quantity-selector {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 60rpx;
+ padding: 30rpx 0;
+ border-top: 1rpx solid #f0f0f0;
+ border-bottom: 1rpx solid #f0f0f0;
+}
+
+.quantity-label {
+ font-size: 30rpx;
+ color: #2c3e50;
+ font-weight: 500;
+}
+
+.quantity-controls {
+ display: flex;
+ align-items: center;
+}
+
+.popup-actions {
+ display: flex;
+ justify-content: space-between;
+}
+
+.cancel-btn {
+ flex: 1;
+ margin-right: 20rpx;
+ background-color: #f8f9fa;
+ color: #95a5a6;
+ border: none;
+ border-radius: 50rpx;
+ padding: 24rpx 0;
+ font-size: 30rpx;
+ font-weight: 500;
+
+ &:active {
+ background-color: #e9ecef;
+ }
+}
+
+.confirm-btn {
+ flex: 1;
+ margin-left: 20rpx;
+ background: linear-gradient(135deg, #4A90E2, #3A86FF);
+ color: #ffffff;
+ border: none;
+ border-radius: 50rpx;
+ padding: 24rpx 0;
+ font-size: 30rpx;
+ font-weight: 500;
+
+ &:active {
+ opacity: 0.8;
+ }
+}
\ No newline at end of file
diff --git a/subPackages/product/symptoms.vue b/subPackages/product/symptoms.vue
index c283c66..4012f03 100644
--- a/subPackages/product/symptoms.vue
+++ b/subPackages/product/symptoms.vue
@@ -92,7 +92,7 @@