changePosition.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <view class="change-position-page">
  3. <!-- 自定义导航栏 -->
  4. <view class="custom-navbar">
  5. <view class="navbar-content">
  6. <view class="nav-left" @click="goBack">
  7. <u-icon name="arrow-leftward" color="#333" size="32"></u-icon>
  8. </view>
  9. <view class="nav-title">更换职务</view>
  10. <view class="nav-right"></view>
  11. </view>
  12. </view>
  13. <!-- 内容区域 -->
  14. <view class="content-area">
  15. <view class="position-section">
  16. <view class="section-title">我的职务</view>
  17. <view class="section-desc">填写职务名称,让求职者更了解您的身份</view>
  18. <view class="input-container">
  19. <view class="input-box">
  20. <u-input
  21. v-model="positionName"
  22. placeholder="请填写职务名称"
  23. maxlength="50"
  24. input-align="left"
  25. height="96"
  26. padding="40"
  27. class="position-input"
  28. clearable
  29. />
  30. </view>
  31. <view class="hint-text">每个月可修改3次,您还有2次机会</view>
  32. </view>
  33. </view>
  34. </view>
  35. <!-- 底部确定按钮 -->
  36. <view class="bottom-confirm-btn" @click="confirmPosition">
  37. <text>确定</text>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. data() {
  44. return {
  45. positionName: '',
  46. remainingChanges: 2 // 剩余修改次数
  47. };
  48. },
  49. methods: {
  50. // 返回上一页
  51. goBack() {
  52. uni.navigateBack();
  53. },
  54. // 确认职务修改
  55. confirmPosition() {
  56. if (!this.positionName.trim()) {
  57. uni.showToast({
  58. title: '请输入职务名称',
  59. icon: 'none'
  60. });
  61. return;
  62. }
  63. if (this.remainingChanges <= 0) {
  64. uni.showToast({
  65. title: '本月修改次数已用完',
  66. icon: 'none'
  67. });
  68. return;
  69. }
  70. uni.showLoading({
  71. title: '处理中...'
  72. });
  73. setTimeout(() => {
  74. uni.hideLoading();
  75. uni.showToast({
  76. title: '职务修改成功',
  77. icon: 'success'
  78. });
  79. setTimeout(() => {
  80. uni.navigateBack();
  81. }, 1500);
  82. }, 1500);
  83. }
  84. }
  85. }
  86. </script>
  87. <style lang="scss" scoped>
  88. .change-position-page {
  89. min-height: 100vh;
  90. // background: #f5f5f5;
  91. }
  92. /* 自定义导航栏 */
  93. .custom-navbar {
  94. position: fixed;
  95. top: 0;
  96. left: 0;
  97. right: 0;
  98. background: #fff;
  99. z-index: 9999;
  100. .navbar-content {
  101. display: flex;
  102. align-items: center;
  103. justify-content: space-between;
  104. height: 88rpx;
  105. padding: 0 40rpx;
  106. padding-top: 80rpx;
  107. .nav-left {
  108. display: flex;
  109. align-items: center;
  110. }
  111. .nav-title {
  112. color: rgba(51, 51, 51, 1);
  113. font-size: 32rpx;
  114. font-weight: 600;
  115. line-height: 44rpx;
  116. text-align: center;
  117. }
  118. .nav-right {
  119. width: 60rpx;
  120. }
  121. }
  122. }
  123. /* 内容区域 */
  124. .content-area {
  125. padding: 160rpx 30rpx 30rpx;
  126. }
  127. .position-section {
  128. background: #fff;
  129. border-radius: 24rpx;
  130. // padding: 40rpx;
  131. }
  132. .section-title {
  133. color: rgba(51, 51, 51, 1);
  134. font-family: DM Sans;
  135. font-size: 48rpx;
  136. font-weight: 700;
  137. line-height: 60rpx;
  138. letter-spacing: 0px;
  139. text-align: left;
  140. margin-bottom: 12rpx;
  141. }
  142. .section-desc {
  143. color: rgba(102, 102, 102, 1);
  144. font-family: DM Sans;
  145. font-size: 24rpx;
  146. font-weight: 400;
  147. line-height: 32rpx;
  148. letter-spacing: 0.5%;
  149. text-align: left;
  150. margin-bottom: 20rpx;
  151. }
  152. .input-container {
  153. .input-box {
  154. margin-bottom: 20rpx;
  155. .position-input {
  156. background: rgba(247, 248, 249, 1);
  157. // padding: 32rpx;
  158. }
  159. }
  160. .hint-text {
  161. color: rgba(102, 102, 102, 1);
  162. font-family: DM Sans;
  163. font-size: 24rpx;
  164. font-weight: 400;
  165. line-height: 32rpx;
  166. letter-spacing: 0.5%;
  167. margin-left: rpx;
  168. text-align: left;
  169. }
  170. }
  171. /* 底部确定按钮 */
  172. .bottom-confirm-btn {
  173. width: 90%;
  174. height: 88rpx;
  175. background: var(--线性渐变, linear-gradient(90.00deg, rgba(13, 39, 247, 1),rgba(19, 193, 234, 1) 100%));
  176. border-radius: 44rpx;
  177. display: flex;
  178. align-items: center;
  179. justify-content: center;
  180. margin: 0 auto;
  181. text {
  182. color: rgba(255, 255, 255, 1);
  183. font-size: 32rpx;
  184. font-weight: 600;
  185. line-height: 44rpx;
  186. }
  187. &:active {
  188. opacity: 0.8;
  189. }
  190. }
  191. </style>