regular.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view class="page-container">
  3. <!-- 顶部导航栏 -->
  4. <view class="nav-header">
  5. <view class="nav-left" @click="goBack">
  6. <u-icon name="close" color="rgba(56, 58, 63, 1)" size="32"></u-icon>
  7. </view>
  8. <view class="nav-center">
  9. <text class="nav-title">常用语</text>
  10. </view>
  11. <view class="nav-right"></view>
  12. </view>
  13. <!-- 常用语列表 -->
  14. <view class="content-area">
  15. <view class="phrase-item">
  16. <view class="phrase-content">
  17. <text class="phrase-text">我可以去贵公司面试吗?</text>
  18. </view>
  19. <view class="phrase-action">
  20. <text class="action-text">编辑</text>
  21. <u-icon name="arrow-right" color="rgba(29, 33, 41, 1)" size="24"></u-icon>
  22. </view>
  23. </view>
  24. <view class="phrase-item">
  25. <view class="phrase-content">
  26. <text class="phrase-text">对不起,我觉得该职位不适合我,祝您朝日找到满意的工作人选</text>
  27. </view>
  28. <view class="phrase-action">
  29. <text class="action-text">编辑</text>
  30. <u-icon name="arrow-right" color="rgba(29, 33, 41, 1)" size="24"></u-icon>
  31. </view>
  32. </view>
  33. <view class="phrase-item">
  34. <view class="phrase-content">
  35. <text class="phrase-text">刚刚看了您发布的这个职位,我特别喜欢,可否聊聊呢?</text>
  36. </view>
  37. <view class="phrase-action">
  38. <text class="action-text">编辑</text>
  39. <u-icon name="arrow-right" color="rgba(29, 33, 41, 1)" size="24"></u-icon>
  40. </view>
  41. </view>
  42. </view>
  43. <!-- 底部添加按钮 -->
  44. <view class="bottom-button">
  45. <u-button class="add-button" :custom-style="customStyle" :hair-line="false" @click="addPhrase">
  46. 添加常用语
  47. </u-button>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. export default {
  53. data() {
  54. return {
  55. customStyle: {
  56. background: 'linear-gradient(90deg, rgba(13, 39, 247, 1) 0%, rgba(19, 193, 234, 1) 100%)',
  57. border: 0,
  58. color: '#FFFFFF',
  59. height: '98rpx',
  60. borderRadius: '130rpx'
  61. }
  62. }
  63. },
  64. methods: {
  65. // 返回上一页
  66. goBack() {
  67. uni.navigateBack()
  68. },
  69. // 添加常用语
  70. addPhrase() {
  71. console.log('添加常用语');
  72. // 跳转到添加页面,设置标题为"新建常用语"
  73. uni.navigateTo({
  74. url: '/pages/msg/add?type=0&type1=0&title=新建常用语'
  75. });
  76. }
  77. }
  78. }
  79. </script>
  80. <style lang="scss">
  81. page {
  82. padding-top: 80rpx;
  83. }
  84. .page-container {
  85. min-height: 100vh;
  86. padding-bottom: 120rpx; /* 为底部按钮留出空间 */
  87. }
  88. // 顶部导航栏样式
  89. .nav-header {
  90. height: 80rpx;
  91. display: flex;
  92. align-items: center;
  93. justify-content: space-between;
  94. padding: 0 40rpx;
  95. background: #FFFFFF;
  96. }
  97. .nav-left {
  98. width: 60rpx;
  99. display: flex;
  100. justify-content: flex-start;
  101. }
  102. .nav-center {
  103. flex: 1;
  104. display: flex;
  105. justify-content: center;
  106. }
  107. .nav-title {
  108. color: rgba(51, 51, 51, 1);
  109. font-family: DM Sans;
  110. font-size: 18px;
  111. font-weight: 700;
  112. line-height: 26px;
  113. letter-spacing: 0%;
  114. text-align: center;
  115. }
  116. .nav-right {
  117. width: 60rpx;
  118. display: flex;
  119. justify-content: flex-end;
  120. align-items: center;
  121. }
  122. // 内容区域
  123. .content-area {
  124. padding: 20rpx;
  125. }
  126. // 常用语项样式
  127. .phrase-item {
  128. display: flex;
  129. align-items: center;
  130. justify-content: space-between;
  131. background: rgba(253, 253, 253, 1);
  132. padding: 30rpx 20rpx;
  133. margin-bottom: 20rpx;
  134. border-radius: 12rpx;
  135. border: 0.5px solid rgba(227, 231, 236, 1);
  136. }
  137. .phrase-content {
  138. flex: 1;
  139. margin-right: 20rpx;
  140. .phrase-text {
  141. color: rgba(153, 153, 153, 1);
  142. font-family: DM Sans;
  143. font-size: 14px;
  144. font-weight: 400;
  145. line-height: 13px;
  146. letter-spacing: 0%;
  147. text-align: left;
  148. }
  149. }
  150. .phrase-action {
  151. display: flex;
  152. align-items: center;
  153. }
  154. .action-text {
  155. color: rgba(153, 153, 153, 1);
  156. font-family: DM Sans;
  157. font-size: 14px;
  158. font-weight: 400;
  159. line-height: 13px;
  160. letter-spacing: 0%;
  161. text-align: left;
  162. margin-right: 10rpx;
  163. }
  164. // 底部按钮
  165. .bottom-button {
  166. position: fixed;
  167. bottom: 40rpx;
  168. left: 40rpx;
  169. right: 40rpx;
  170. .add-button {
  171. width: 100%;
  172. }
  173. }
  174. </style>