quality-resources.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. <template>
  2. <view class="quality-resources">
  3. <!-- 顶部导航栏 -->
  4. <view class="header">
  5. <view class="back-icon" @click="handleBack"></view>
  6. <text class="header-title">优质资源</text>
  7. <view class="filter-icon" @click="handleFilter"></view>
  8. </view>
  9. <!-- 搜索栏 -->
  10. <view class="search-bar">
  11. <view class="search-input-wrapper">
  12. <view class="search-icon-small"></view>
  13. <input type="text" class="search-input" placeholder="请输入搜索关键词" placeholder-style="color: #999;" />
  14. </view>
  15. </view>
  16. <!-- 资源列表 -->
  17. <scroll-view scroll-y class="content">
  18. <view class="resource-item" v-for="(resource, index) in resources" :key="index">
  19. <view class="resource-header">
  20. <view class="avatar"></view>
  21. <view class="resource-info">
  22. <view class="name-gender">
  23. <text class="name">{{ resource.name }}</text>
  24. <text class="gender">{{ resource.gender }}</text>
  25. <text class="status">{{ resource.status }}</text>
  26. </view>
  27. <view class="tags">
  28. <view class="tag" v-for="(tag, tagIndex) in resource.tags" :key="tagIndex">{{ tag }}</view>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="resource-details">
  33. <view class="requirement">
  34. <text class="requirement-label">择偶要求:</text>
  35. <text class="requirement-content">{{ resource.requirement }}</text>
  36. </view>
  37. <view class="contact-info">
  38. <text class="contact-label">联系方式:</text>
  39. <text class="contact-number">{{ resource.contact }}</text>
  40. <view class="copy-btn" @click="handleCopy(resource.contact)">复制</view>
  41. </view>
  42. <view class="action-btn" @click="handleChat(resource)">牵线聊聊</view>
  43. </view>
  44. </view>
  45. </scroll-view>
  46. </view>
  47. </template>
  48. <script>
  49. export default {
  50. name: 'quality-resources',
  51. data() {
  52. return {
  53. resources: [
  54. {
  55. name: '小高',
  56. gender: '男',
  57. status: '未匹配',
  58. tags: ['气质男', '小清新'],
  59. requirement: '165+ 本科',
  60. contact: '123****8912'
  61. },
  62. {
  63. name: '小子',
  64. gender: '男',
  65. status: '未匹配',
  66. tags: ['周末有空'],
  67. requirement: '165+ 本科',
  68. contact: '123****8912'
  69. },
  70. {
  71. name: '小博',
  72. gender: '男',
  73. status: '未匹配',
  74. tags: ['电话联系', '优质男'],
  75. requirement: '180+ 本科',
  76. contact: '123****8912'
  77. }
  78. ]
  79. }
  80. },
  81. methods: {
  82. // 返回上一页
  83. handleBack() {
  84. uni.navigateBack()
  85. },
  86. // 筛选
  87. handleFilter() {
  88. // 实现筛选功能
  89. },
  90. // 复制联系方式
  91. handleCopy(contact) {
  92. uni.setClipboardData({
  93. data: contact,
  94. success: () => {
  95. uni.showToast({
  96. title: '复制成功',
  97. icon: 'success'
  98. })
  99. }
  100. })
  101. },
  102. // 牵线聊聊
  103. handleChat(resource) {
  104. // 跳转到聊天页面或打开聊天弹窗
  105. uni.showToast({
  106. title: '牵线成功',
  107. icon: 'success'
  108. })
  109. }
  110. }
  111. }
  112. </script>
  113. <style lang="scss" scoped>
  114. .quality-resources {
  115. min-height: 100vh;
  116. background: #FFF9F9;
  117. display: flex;
  118. flex-direction: column;
  119. }
  120. /* 顶部导航栏 */
  121. .header {
  122. display: flex;
  123. align-items: center;
  124. justify-content: space-between;
  125. padding: 25rpx 30rpx;
  126. padding-top: calc(25rpx + env(safe-area-inset-top));
  127. background: #FFF9F9;
  128. border-bottom: 1rpx solid #F0F0F0;
  129. .back-icon {
  130. width: 44rpx;
  131. height: 44rpx;
  132. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239C27B0"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>');
  133. background-size: contain;
  134. background-repeat: no-repeat;
  135. background-position: center;
  136. }
  137. .header-title {
  138. font-size: 38rpx;
  139. font-weight: bold;
  140. color: #9C27B0;
  141. }
  142. .filter-icon {
  143. width: 44rpx;
  144. height: 44rpx;
  145. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"/></svg>');
  146. background-size: contain;
  147. background-repeat: no-repeat;
  148. background-position: center;
  149. }
  150. }
  151. /* 搜索栏 */
  152. .search-bar {
  153. padding: 20rpx 30rpx;
  154. background: #FFF9F9;
  155. .search-input-wrapper {
  156. display: flex;
  157. align-items: center;
  158. background: #FFFFFF;
  159. border-radius: 25rpx;
  160. padding: 15rpx 20rpx;
  161. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  162. .search-icon-small {
  163. width: 32rpx;
  164. height: 32rpx;
  165. background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
  166. background-size: contain;
  167. background-repeat: no-repeat;
  168. background-position: center;
  169. margin-right: 15rpx;
  170. }
  171. .search-input {
  172. flex: 1;
  173. font-size: 28rpx;
  174. color: #333;
  175. placeholder-color: #999;
  176. }
  177. }
  178. }
  179. /* 内容区域 */
  180. .content {
  181. flex: 1;
  182. padding: 0 30rpx 20rpx;
  183. }
  184. /* 资源列表项 */
  185. .resource-item {
  186. background: #FFFFFF;
  187. border-radius: 20rpx;
  188. padding: 25rpx;
  189. margin-bottom: 20rpx;
  190. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  191. }
  192. .resource-header {
  193. display: flex;
  194. align-items: flex-start;
  195. margin-bottom: 20rpx;
  196. .avatar {
  197. width: 100rpx;
  198. height: 100rpx;
  199. border-radius: 50%;
  200. background: #F0F0F0;
  201. margin-right: 20rpx;
  202. }
  203. .resource-info {
  204. flex: 1;
  205. .name-gender {
  206. display: flex;
  207. align-items: center;
  208. gap: 15rpx;
  209. margin-bottom: 10rpx;
  210. .name {
  211. font-size: 32rpx;
  212. font-weight: bold;
  213. color: #333;
  214. }
  215. .gender {
  216. font-size: 24rpx;
  217. color: #999;
  218. padding: 4rpx 12rpx;
  219. background: #F5F5F5;
  220. border-radius: 12rpx;
  221. }
  222. .status {
  223. font-size: 24rpx;
  224. color: #FF6B8A;
  225. padding: 4rpx 12rpx;
  226. background: #FFF3F5;
  227. border-radius: 12rpx;
  228. }
  229. }
  230. .tags {
  231. display: flex;
  232. flex-wrap: wrap;
  233. gap: 10rpx;
  234. .tag {
  235. font-size: 22rpx;
  236. color: #9C27B0;
  237. padding: 6rpx 14rpx;
  238. background: #F3E5F5;
  239. border-radius: 14rpx;
  240. }
  241. }
  242. }
  243. }
  244. .resource-details {
  245. .requirement {
  246. display: flex;
  247. margin-bottom: 15rpx;
  248. .requirement-label {
  249. font-size: 26rpx;
  250. color: #666;
  251. margin-right: 10rpx;
  252. }
  253. .requirement-content {
  254. font-size: 26rpx;
  255. color: #333;
  256. }
  257. }
  258. .contact-info {
  259. display: flex;
  260. align-items: center;
  261. margin-bottom: 20rpx;
  262. .contact-label {
  263. font-size: 26rpx;
  264. color: #666;
  265. margin-right: 10rpx;
  266. }
  267. .contact-number {
  268. font-size: 26rpx;
  269. color: #333;
  270. margin-right: 15rpx;
  271. }
  272. .copy-btn {
  273. font-size: 24rpx;
  274. color: #9C27B0;
  275. padding: 6rpx 16rpx;
  276. background: #F3E5F5;
  277. border-radius: 14rpx;
  278. }
  279. }
  280. .action-btn {
  281. width: 200rpx;
  282. height: 60rpx;
  283. display: flex;
  284. align-items: center;
  285. justify-content: center;
  286. background: #9C27B0;
  287. color: #FFFFFF;
  288. font-size: 28rpx;
  289. border-radius: 30rpx;
  290. margin-left: auto;
  291. }
  292. }
  293. </style>