修改论坛、促销、登录,增加测试
Change-Id: I71883fc1da46a94db47f90a4cd61474c274a5b2c
diff --git a/src/pages/PromotionsPage/PromotionsPage.css b/src/pages/PromotionsPage/PromotionsPage.css
new file mode 100644
index 0000000..6752c69
--- /dev/null
+++ b/src/pages/PromotionsPage/PromotionsPage.css
@@ -0,0 +1,206 @@
+.promotions-page {
+ padding: 20px;
+ font-family: Arial, sans-serif;
+}
+
+.promotions-container {
+ max-width: 1200px;
+ margin: 0 auto;
+ background-color: #fff;
+ border-radius: 8px;
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+ padding: 20px;
+}
+
+h1, h2, h3 {
+ color: #333;
+}
+
+.admin-actions {
+ margin-bottom: 20px;
+}
+
+.create-button, .submit-button, .delete-button {
+ background-color: #4CAF50;
+ color: white;
+ border: none;
+ padding: 10px 15px;
+ border-radius: 4px;
+ cursor: pointer;
+ font-size: 14px;
+ transition: background-color 0.3s;
+}
+
+.create-button:hover, .submit-button:hover {
+ background-color: #45a049;
+}
+
+.delete-button {
+ background-color: #f44336;
+ margin-top: 10px;
+}
+
+.delete-button:hover {
+ background-color: #d32f2f;
+}
+
+.create-promotion-form {
+ background-color: #f9f9f9;
+ padding: 20px;
+ border-radius: 8px;
+ margin-bottom: 20px;
+}
+
+.form-group {
+ margin-bottom: 15px;
+}
+
+.form-row {
+ display: flex;
+ gap: 20px;
+}
+
+.form-row .form-group {
+ flex: 1;
+}
+
+label {
+ display: block;
+ margin-bottom: 5px;
+ font-weight: bold;
+}
+
+input, select {
+ width: 100%;
+ padding: 8px;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ box-sizing: border-box;
+}
+
+.error-message {
+ color: #f44336;
+ margin-bottom: 15px;
+ padding: 10px;
+ background-color: #ffebee;
+ border-radius: 4px;
+}
+
+.promotions-grid {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 20px;
+}
+
+.promotions-list {
+ border-right: 1px solid #eee;
+ padding-right: 20px;
+}
+
+.promotion-items {
+ max-height: 600px;
+ overflow-y: auto;
+}
+
+.promotion-item {
+ background-color: #f9f9f9;
+ padding: 15px;
+ border-radius: 8px;
+ margin-bottom: 15px;
+ cursor: pointer;
+ transition: background-color 0.3s;
+}
+
+.promotion-item:hover {
+ background-color: #f0f0f0;
+}
+
+.promotion-item.active {
+ background-color: #e3f2fd;
+ border-left: 4px solid #2196F3;
+}
+
+.promotion-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 10px;
+}
+
+.promotion-type {
+ background-color: #2196F3;
+ color: white;
+ padding: 3px 8px;
+ border-radius: 12px;
+ font-size: 12px;
+}
+
+.promotion-dates {
+ color: #666;
+ font-size: 14px;
+ margin-bottom: 10px;
+}
+
+.promotion-coeffs {
+ display: flex;
+ gap: 15px;
+ font-weight: bold;
+}
+
+.promotion-coeffs span {
+ background-color: #e3f2fd;
+ padding: 3px 8px;
+ border-radius: 4px;
+}
+
+.promotion-details {
+ padding: 0 20px;
+}
+
+.detail-item {
+ margin-bottom: 15px;
+}
+
+.detail-item label {
+ font-weight: bold;
+ color: #555;
+}
+
+.detail-item span {
+ display: block;
+ margin-top: 5px;
+ padding: 8px;
+ background-color: #f5f5f5;
+ border-radius: 4px;
+}
+
+.no-promotions, .no-selection, .loading {
+ text-align: center;
+ padding: 40px;
+ color: #888;
+}
+
+.pagination {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ gap: 15px;
+ margin-top: 20px;
+}
+
+.pagination button {
+ padding: 5px 10px;
+ background-color: #f0f0f0;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ cursor: pointer;
+}
+
+.pagination button:disabled {
+ opacity: 0.5;
+ cursor: not-allowed;
+}
+
+.pagination span {
+ font-size: 14px;
+}
\ No newline at end of file