与牧同行-小程序用户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

385 lines
6.2 KiB

  1. .forum-page {
  2. min-height: 100vh;
  3. padding-bottom: 40rpx;
  4. }
  5. /* 顶部栏 */
  6. .header {
  7. display: flex;
  8. justify-content: space-between;
  9. align-items: center;
  10. padding: 30rpx 30rpx 20rpx;
  11. background-color: #fff;
  12. border-bottom: 1rpx solid #eee;
  13. position: sticky;
  14. top: 0;
  15. z-index: 10;
  16. }
  17. .title {
  18. font-size: 36rpx;
  19. font-weight: bold;
  20. color: #333;
  21. }
  22. .add-btn {
  23. background-color: #007AFF;
  24. color: white;
  25. font-size: 26rpx;
  26. padding: 10rpx 20rpx;
  27. line-height: normal;
  28. border-radius: 30rpx;
  29. margin: 0;
  30. }
  31. .add-btn:after {
  32. border: none;
  33. }
  34. /* 帖子项 */
  35. .post-list {
  36. padding: 20rpx 30rpx;
  37. }
  38. .post-item {
  39. background-color: white;
  40. border-radius: 16rpx;
  41. padding: 30rpx;
  42. margin-bottom: 24rpx;
  43. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
  44. }
  45. .post-header {
  46. display: flex;
  47. justify-content: space-between;
  48. align-items: center;
  49. margin-bottom: 24rpx;
  50. }
  51. .user-info {
  52. display: flex;
  53. align-items: center;
  54. }
  55. .avatar {
  56. width: 70rpx;
  57. height: 70rpx;
  58. border-radius: 50%;
  59. margin-right: 20rpx;
  60. }
  61. .user-detail {
  62. display: flex;
  63. flex-direction: column;
  64. }
  65. .username {
  66. font-size: 30rpx;
  67. font-weight: bold;
  68. color: #333;
  69. margin-bottom: 6rpx;
  70. }
  71. .post-time {
  72. font-size: 24rpx;
  73. color: #999;
  74. }
  75. /* 帖子内容 */
  76. .post-content {
  77. margin-bottom: 24rpx;
  78. }
  79. .post-title {
  80. font-size: 34rpx;
  81. font-weight: bold;
  82. color: #333;
  83. margin-bottom: 16rpx;
  84. line-height: 1.4;
  85. }
  86. .post-desc {
  87. font-size: 28rpx;
  88. color: #555;
  89. line-height: 1.6;
  90. margin-bottom: 20rpx;
  91. }
  92. /* 回复列表 */
  93. .reply-list {
  94. margin-top: 24rpx;
  95. }
  96. .reply-title {
  97. font-size: 26rpx;
  98. color: #666;
  99. margin-bottom: 20rpx;
  100. font-weight: bold;
  101. }
  102. .reply-item {
  103. padding: 24rpx 0;
  104. border-bottom: 1rpx solid #f8f8f8;
  105. }
  106. .reply-item:last-child {
  107. border-bottom: none;
  108. }
  109. .reply-user {
  110. display: flex;
  111. align-items: center;
  112. margin-bottom: 16rpx;
  113. }
  114. .reply-avatar {
  115. width: 56rpx;
  116. height: 56rpx;
  117. border-radius: 50%;
  118. margin-right: 16rpx;
  119. }
  120. .reply-user-info {
  121. display: flex;
  122. flex-direction: column;
  123. }
  124. .reply-username {
  125. font-size: 26rpx;
  126. color: #333;
  127. margin-bottom: 4rpx;
  128. }
  129. .reply-time {
  130. font-size: 22rpx;
  131. color: #999;
  132. }
  133. .reply-content {
  134. font-size: 28rpx;
  135. color: #444;
  136. line-height: 1.5;
  137. margin-left: 72rpx;
  138. }
  139. .view-more-replies {
  140. font-size: 26rpx;
  141. color: #007AFF;
  142. text-align: center;
  143. padding: 20rpx 0;
  144. margin-top: 10rpx;
  145. }
  146. /* 回复输入区域 */
  147. .reply-input-container {
  148. display: flex;
  149. align-items: center;
  150. margin-top: 20rpx;
  151. padding-top: 20rpx;
  152. border-top: 1rpx solid #f0f0f0;
  153. }
  154. .reply-input {
  155. flex: 1;
  156. background-color: #f8f8f8;
  157. border-radius: 30rpx;
  158. padding: 16rpx 24rpx;
  159. font-size: 28rpx;
  160. margin-right: 16rpx;
  161. }
  162. .send-reply-btn {
  163. background-color: #007AFF;
  164. color: white;
  165. font-size: 26rpx;
  166. padding: 12rpx 24rpx;
  167. line-height: normal;
  168. border-radius: 30rpx;
  169. margin: 0;
  170. }
  171. .send-reply-btn:after {
  172. border: none;
  173. }
  174. /* 空状态 */
  175. .empty-state {
  176. display: flex;
  177. flex-direction: column;
  178. align-items: center;
  179. justify-content: center;
  180. padding: 100rpx 30rpx;
  181. text-align: center;
  182. }
  183. .empty-image {
  184. width: 300rpx;
  185. height: 300rpx;
  186. margin-bottom: 40rpx;
  187. opacity: 0.6;
  188. }
  189. .empty-text {
  190. font-size: 30rpx;
  191. color: #999;
  192. margin-bottom: 40rpx;
  193. }
  194. .empty-btn {
  195. background-color: #007AFF;
  196. color: white;
  197. font-size: 30rpx;
  198. padding: 20rpx 40rpx;
  199. line-height: normal;
  200. border-radius: 40rpx;
  201. margin: 0;
  202. }
  203. .empty-btn:after {
  204. border: none;
  205. }
  206. /* 弹窗样式 */
  207. .modal-overlay {
  208. position: fixed;
  209. top: 0;
  210. left: 0;
  211. right: 0;
  212. bottom: 0;
  213. background-color: rgba(0, 0, 0, 0.5);
  214. display: flex;
  215. align-items: center;
  216. justify-content: center;
  217. z-index: 100;
  218. }
  219. .modal-content {
  220. background-color: white;
  221. border-radius: 20rpx;
  222. width: 85%;
  223. max-height: 80vh;
  224. overflow-y: auto;
  225. padding: 40rpx;
  226. }
  227. .modal-header {
  228. font-size: 36rpx;
  229. font-weight: bold;
  230. color: #333;
  231. margin-bottom: 40rpx;
  232. text-align: center;
  233. }
  234. .form-item {
  235. margin-bottom: 40rpx;
  236. }
  237. .form-input {
  238. background-color: #f8f8f8;
  239. border-radius: 12rpx;
  240. padding: 24rpx;
  241. font-size: 28rpx;
  242. }
  243. .form-textarea {
  244. background-color: #f8f8f8;
  245. border-radius: 12rpx;
  246. padding: 24rpx;
  247. font-size: 28rpx;
  248. height: 200rpx;
  249. width: 100%;
  250. box-sizing: border-box;
  251. }
  252. .textarea-counter {
  253. font-size: 24rpx;
  254. color: #999;
  255. text-align: right;
  256. margin-top: 10rpx;
  257. }
  258. .selected-tags {
  259. display: flex;
  260. flex-wrap: wrap;
  261. }
  262. .selected-tag {
  263. font-size: 24rpx;
  264. color: #007AFF;
  265. background-color: #e6f2ff;
  266. padding: 8rpx 20rpx;
  267. border-radius: 20rpx;
  268. margin-right: 12rpx;
  269. margin-bottom: 12rpx;
  270. display: flex;
  271. align-items: center;
  272. }
  273. .remove-tag {
  274. font-size: 30rpx;
  275. margin-left: 8rpx;
  276. color: #999;
  277. }
  278. .modal-buttons {
  279. display: flex;
  280. justify-content: space-between;
  281. margin-top: 40rpx;
  282. }
  283. .modal-btn {
  284. flex: 1;
  285. font-size: 30rpx;
  286. border-radius: 50px;
  287. margin: 0 10rpx;
  288. }
  289. .modal-btn::after{
  290. border: none;
  291. }
  292. .modal-btn.cancel {
  293. background-color: #f0f0f0;
  294. color: #666;
  295. }
  296. .modal-btn.submit {
  297. background-color: #007AFF;
  298. color: white;
  299. }
  300. .modal-btn.submit[disabled] {
  301. background-color: #cccccc;
  302. color: white;
  303. }
  304. /* 加载提示 */
  305. .loading {
  306. display: flex;
  307. flex-direction: column;
  308. align-items: center;
  309. justify-content: center;
  310. padding: 60rpx 0;
  311. color: #999;
  312. font-size: 28rpx;
  313. }
  314. .loading-icon {
  315. width: 60rpx;
  316. height: 60rpx;
  317. margin-bottom: 20rpx;
  318. animation: rotate 1s linear infinite;
  319. }
  320. @keyframes rotate {
  321. 0% {
  322. transform: rotate(0deg);
  323. }
  324. 100% {
  325. transform: rotate(360deg);
  326. }
  327. }