interest-search.component.scss 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  1. :host {
  2. --primary-color: var(--ion-color-primary);
  3. --background-color: #f5f5f5;
  4. }
  5. ion-header {
  6. ion-toolbar {
  7. --background: transparent;
  8. ion-title {
  9. font-size: 18px;
  10. font-weight: 600;
  11. }
  12. }
  13. }
  14. .survey-intro {
  15. padding: 20px;
  16. background: white;
  17. margin: 16px;
  18. border-radius: 12px;
  19. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  20. h2 {
  21. margin: 0 0 12px;
  22. font-size: 20px;
  23. font-weight: 600;
  24. color: #333;
  25. }
  26. p {
  27. margin: 0;
  28. color: #666;
  29. font-size: 14px;
  30. line-height: 1.5;
  31. }
  32. }
  33. .section-container {
  34. background: white;
  35. margin: 16px;
  36. border-radius: 12px;
  37. overflow: hidden;
  38. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  39. .section-header {
  40. display: flex;
  41. align-items: center;
  42. padding: 16px;
  43. border-bottom: 1px solid #eee;
  44. ion-icon {
  45. font-size: 24px;
  46. color: var(--primary-color);
  47. margin-right: 12px;
  48. }
  49. h3 {
  50. margin: 0;
  51. font-size: 18px;
  52. font-weight: 600;
  53. color: #333;
  54. }
  55. }
  56. }
  57. ion-list {
  58. background: transparent;
  59. padding: 0;
  60. ion-item {
  61. --padding-start: 16px;
  62. --padding-end: 16px;
  63. --padding-top: 12px;
  64. --padding-bottom: 12px;
  65. --background: transparent;
  66. ion-label {
  67. color: #333;
  68. font-weight: 500;
  69. margin-bottom: 8px;
  70. }
  71. span {
  72. margin-right: 50px;
  73. font-size: 14px;
  74. margin-bottom: 20px;
  75. }
  76. ion-datetime-button {
  77. margin-bottom: 20px;
  78. }
  79. ion-input,
  80. ion-select {
  81. --padding-start: 0;
  82. --placeholder-color: #999;
  83. font-size: 15px;
  84. }
  85. }
  86. }
  87. .question-container {
  88. padding: 16px;
  89. border-bottom: 1px solid #eee;
  90. &:last-child {
  91. border-bottom: none;
  92. }
  93. .question-header {
  94. display: flex;
  95. align-items: flex-start;
  96. margin-bottom: 16px;
  97. .question-number {
  98. background: var(--primary-color);
  99. color: white;
  100. padding: 4px 8px;
  101. border-radius: 4px;
  102. font-size: 14px;
  103. margin-right: 12px;
  104. min-width: 40px;
  105. text-align: center;
  106. }
  107. h4 {
  108. margin: 0;
  109. font-size: 16px;
  110. font-weight: 500;
  111. color: #333;
  112. flex: 1;
  113. }
  114. }
  115. .options-container {
  116. padding-left: 52px;
  117. .option-item {
  118. --padding-start: 0;
  119. --padding-end: 0;
  120. --min-height: 44px;
  121. --background: transparent;
  122. ion-radio {
  123. margin-right: 12px;
  124. --color-checked: var(--primary-color);
  125. }
  126. ion-label {
  127. font-size: 15px;
  128. color: #666;
  129. }
  130. }
  131. }
  132. }
  133. .button-container {
  134. padding: 16px;
  135. display: grid;
  136. grid-template-columns: repeat(3, 1fr);
  137. gap: 12px;
  138. margin-bottom: 32px;
  139. ion-button {
  140. margin: 0;
  141. height: 44px;
  142. --border-radius: 8px;
  143. ion-icon {
  144. margin-right: 8px;
  145. }
  146. &[color="tertiary"] {
  147. --background: var(--ion-color-tertiary);
  148. --color: white;
  149. &:hover {
  150. --background: var(--ion-color-tertiary-shade);
  151. }
  152. }
  153. }
  154. }
  155. .result-modal {
  156. --height: 90%;
  157. --border-radius: 20px 20px 0 0;
  158. .modal-header {
  159. ion-toolbar {
  160. --background: var(--ion-color-primary);
  161. --color: white;
  162. ion-title {
  163. font-size: 20px;
  164. font-weight: 600;
  165. }
  166. ion-button {
  167. --color: white;
  168. }
  169. }
  170. }
  171. .result-content {
  172. --background: #f5f5f5;
  173. }
  174. .result-container {
  175. padding: 20px;
  176. h3 {
  177. display: flex;
  178. align-items: center;
  179. font-size: 18px;
  180. font-weight: 600;
  181. color: #333;
  182. margin: 0 0 16px;
  183. ion-icon {
  184. margin-right: 8px;
  185. font-size: 24px;
  186. color: var(--ion-color-primary);
  187. }
  188. }
  189. .tags-section {
  190. background: white;
  191. border-radius: 16px;
  192. padding: 20px;
  193. margin-bottom: 16px;
  194. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  195. .tags-container {
  196. display: flex;
  197. flex-wrap: wrap;
  198. gap: 12px;
  199. .interest-tag {
  200. display: flex;
  201. align-items: center;
  202. background: var(--ion-color-primary-light);
  203. color: var(--ion-color-primary);
  204. padding: 8px 16px;
  205. border-radius: 20px;
  206. font-size: 14px;
  207. ion-icon {
  208. margin-right: 6px;
  209. font-size: 16px;
  210. }
  211. }
  212. }
  213. }
  214. .analysis-section {
  215. background: white;
  216. border-radius: 16px;
  217. padding: 20px;
  218. margin-bottom: 16px;
  219. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  220. .analysis-content {
  221. color: #666;
  222. line-height: 1.6;
  223. font-size: 15px;
  224. p {
  225. margin: 8px 0;
  226. }
  227. }
  228. }
  229. .action-buttons {
  230. display: grid;
  231. grid-template-columns: 1fr 1fr;
  232. gap: 12px;
  233. margin-top: 24px;
  234. ion-button {
  235. margin: 0;
  236. height: 44px;
  237. --border-radius: 8px;
  238. ion-icon {
  239. margin-right: 8px;
  240. }
  241. }
  242. }
  243. }
  244. }
  245. // 添加动画效果
  246. @keyframes slideUp {
  247. from {
  248. transform: translateY(100%);
  249. }
  250. to {
  251. transform: translateY(0);
  252. }
  253. }
  254. .result-modal {
  255. .result-container {
  256. animation: slideUp 0.3s ease-out;
  257. }
  258. }
  259. .section-container {
  260. animation: fadeInUp 0.5s ease-out;
  261. animation-fill-mode: both;
  262. }
  263. .section-container:nth-child(2) {
  264. animation-delay: 0.2s;
  265. }
  266. .section-container:nth-child(3) {
  267. animation-delay: 0.4s;
  268. }
  269. ion-checkbox {
  270. margin-left: 15px;
  271. --size: 20px;
  272. --checkbox-background-checked: #1455ce;
  273. }
  274. ion-checkbox::part(container) {
  275. border-radius: 6px;
  276. border: 2px solid #1455ce;
  277. }
  278. ion-radio::part(container) {
  279. width: 20px;
  280. height: 20px;
  281. margin-left: 15px;
  282. border-radius: 6px;
  283. border: 2px solid #ddd;
  284. --checkbox-background-checked: #1455ce;
  285. }
  286. ion-radio::part(mark) {
  287. background: none;
  288. transition: none;
  289. transform: none;
  290. border-radius: 0;
  291. }
  292. ion-radio.radio-checked::part(container) {
  293. background: #1455ce;
  294. border-color: transparent;
  295. }
  296. ion-radio.radio-checked::part(mark) {
  297. width: 6px;
  298. height: 10px;
  299. border-width: 0px 2px 2px 0px;
  300. border-style: solid;
  301. border-color: #fff;
  302. transform: rotate(45deg);
  303. }
  304. .fontsize {
  305. font-size: 20px;
  306. }
  307. // 日期选择器样式
  308. .custom-datetime {
  309. padding: 8px 0;
  310. --background: var(--ion-color-light);
  311. border-radius: 8px;
  312. margin-top: 4px;
  313. &::part(wheel-item) {
  314. color: var(--ion-color-dark);
  315. font-size: 16px;
  316. }
  317. &::part(wheel-item active) {
  318. color: var(--ion-color-primary);
  319. font-size: 18px;
  320. font-weight: 600;
  321. }
  322. &::part(wheel) {
  323. background: var(--ion-background-color);
  324. border-radius: 8px;
  325. }
  326. }
  327. // 日期选择器头部样式
  328. .datetime-header {
  329. padding: 16px;
  330. font-size: 18px;
  331. font-weight: 600;
  332. color: var(--ion-color-dark);
  333. text-align: center;
  334. border-bottom: 1px solid var(--ion-color-light-shade);
  335. }
  336. // 日期选择器按钮样式
  337. .datetime-buttons {
  338. display: flex;
  339. justify-content: flex-end;
  340. padding: 8px;
  341. border-top: 1px solid var(--ion-color-light-shade);
  342. ion-button {
  343. margin: 0 4px;
  344. --padding-start: 16px;
  345. --padding-end: 16px;
  346. font-weight: 500;
  347. }
  348. }
  349. // 调整 ion-item 中日期选择器的样式
  350. ion-item {
  351. &.item-has-value {
  352. ion-datetime {
  353. --placeholder-color: var(--ion-color-dark);
  354. }
  355. }
  356. ion-datetime {
  357. width: 100%;
  358. min-height: 44px;
  359. --padding-start: 0;
  360. --padding-end: 0;
  361. }
  362. }
  363. .analysis-result {
  364. padding: 20px;
  365. background: #f8f9fa;
  366. .result-section {
  367. background: white;
  368. border-radius: 20px;
  369. padding: 24px;
  370. margin-bottom: 24px;
  371. box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  372. transition: transform 0.3s ease;
  373. &:hover {
  374. transform: translateY(-2px);
  375. }
  376. .section-title {
  377. display: flex;
  378. align-items: center;
  379. margin-bottom: 24px;
  380. padding-bottom: 16px;
  381. border-bottom: 2px solid #f0f0f0;
  382. ion-icon {
  383. font-size: 28px;
  384. color: var(--ion-color-primary);
  385. margin-right: 16px;
  386. }
  387. h2 {
  388. margin: 0;
  389. font-size: 20px;
  390. font-weight: 600;
  391. color: #333;
  392. letter-spacing: 0.5px;
  393. }
  394. }
  395. }
  396. .tags-section {
  397. .tags-wrapper {
  398. display: flex;
  399. flex-wrap: wrap;
  400. gap: 16px;
  401. .tag-item {
  402. display: flex;
  403. align-items: center;
  404. background: linear-gradient(135deg, var(--ion-color-primary-light), var(--ion-color-primary-tint));
  405. color: var(--ion-color-primary-contrast);
  406. padding: 12px 20px;
  407. border-radius: 50px;
  408. font-size: 16px;
  409. font-weight: 500;
  410. transition: all 0.3s ease;
  411. box-shadow: 0 4px 12px rgba(var(--ion-color-primary-rgb), 0.2);
  412. &:hover {
  413. transform: translateY(-3px) scale(1.02);
  414. box-shadow: 0 6px 16px rgba(var(--ion-color-primary-rgb), 0.3);
  415. }
  416. .tag-icon {
  417. display: flex;
  418. align-items: center;
  419. justify-content: center;
  420. width: 24px;
  421. height: 24px;
  422. margin-right: 8px;
  423. ion-icon {
  424. font-size: 18px;
  425. }
  426. }
  427. span {
  428. letter-spacing: 0.5px;
  429. }
  430. }
  431. }
  432. }
  433. .report-section {
  434. .content-wrapper {
  435. color: #444;
  436. line-height: 1.8;
  437. .analysis-item {
  438. display: flex;
  439. align-items: flex-start;
  440. margin-bottom: 20px;
  441. padding: 16px;
  442. background: #f8f9fa;
  443. border-radius: 12px;
  444. transition: all 0.3s ease;
  445. &:hover {
  446. background: #f0f2f5;
  447. transform: translateX(8px);
  448. }
  449. .bullet-point {
  450. flex-shrink: 0;
  451. width: 8px;
  452. height: 8px;
  453. border-radius: 50%;
  454. background: var(--ion-color-primary);
  455. margin-top: 8px;
  456. margin-right: 16px;
  457. }
  458. p {
  459. margin: 0;
  460. font-size: 15px;
  461. color: #333;
  462. line-height: 1.8;
  463. letter-spacing: 0.3px;
  464. }
  465. }
  466. }
  467. }
  468. }
  469. // 添加加载状态的样式
  470. .loading-container {
  471. display: flex;
  472. flex-direction: column;
  473. align-items: center;
  474. justify-content: center;
  475. min-height: 300px;
  476. padding: 32px;
  477. text-align: center;
  478. ion-spinner {
  479. width: 48px;
  480. height: 48px;
  481. --color: var(--ion-color-primary);
  482. margin-bottom: 24px;
  483. }
  484. h3 {
  485. font-size: 18px;
  486. font-weight: 600;
  487. color: #333;
  488. margin: 0 0 12px;
  489. }
  490. p {
  491. font-size: 14px;
  492. color: #666;
  493. margin: 0;
  494. max-width: 280px;
  495. line-height: 1.5;
  496. }
  497. }
  498. // 添加淡入动画
  499. @keyframes fadeIn {
  500. from {
  501. opacity: 0;
  502. }
  503. to {
  504. opacity: 1;
  505. }
  506. }
  507. .loading-container {
  508. animation: fadeIn 0.3s ease-out;
  509. }
  510. // 添加动画效果
  511. @keyframes fadeInUp {
  512. from {
  513. opacity: 0;
  514. transform: translateY(20px);
  515. }
  516. to {
  517. opacity: 1;
  518. transform: translateY(0);
  519. }
  520. }
  521. .result-section {
  522. animation: fadeInUp 0.5s ease-out forwards;
  523. &:nth-child(2) {
  524. animation-delay: 0.2s;
  525. }
  526. }