changePosition.vue 4.1 KB

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