| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- <template>
- <view class="switch-roles">
- <nav-bar
- title="岗位描述"
- color="#000"
- background="#fff"
- border-bottom="true"
- ></nav-bar>
-
- <view class="roles-content">
- <view class="content">
- <view class="title">岗位描述</view>
-
- <!-- 提示文本 -->
- <view class="desc">
- 请填写岗位信息(工作内容、任务要求等),请勿包含联系方式、特殊符号或违规内容,否则可能导致账号封禁。
- </view>
-
- <!-- 输入区域 -->
- <view class="input-container">
- <textarea
- v-model="jobDesc"
- placeholder="1. 工作内容:例如负责客户对接、日常运营等
- 2. 任务要求:例如本科以上学历、熟练使用Excel等
- 3. 其他说明:例如周末双休、五险一金等"
- maxlength="500"
- class="textarea"
- @input="updateWordCount"
- ></textarea>
-
- <!-- 字数统计 -->
- <view class="word-count">
- <text :class="{ over: wordCount > 500 }">{{ wordCount }}</text>/500
- </view>
- </view>
- </view>
- </view>
-
- <!-- 提交按钮 -->
- <button
- class="submit-btn"
- @click="sendToPrevPage"
- :disabled="wordCount > 500"
- >
- 确定
- </button>
- </view>
- </template>
- <script>
- import navBar from "@/components/nav-bar/index.vue";
- export default {
- components: { navBar },
- data() {
- return {
- jobDesc: "", // 当前页填写的岗位描述
- wordCount: 0 // 字数统计
- };
- },
- onLoad(options) {
- // 接收上个页面传递的公司名称参数
- if(options.text){
- this.jobDesc=options.text
- }
- },
- methods: {
- // 实时更新字数
- updateWordCount(e) {
- this.wordCount = e.detail.value.length;
- },
-
- // 回传数据到上一页
- sendToPrevPage() {
- // 触发全局事件,传递当前页填写的岗位描述
- uni.$emit("jobDescUpdated", {
- desc: this.jobDesc
- });
-
- // 返回上一页
- uni.navigateBack({ delta: 1 });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .switch-roles {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: #f5f5f5;
- display: flex;
- flex-direction: column;
- .roles-content {
- flex: 1;
- padding: 24rpx;
- overflow-y: auto;
- .content {
- background: #fff;
- border-radius: 16rpx;
- padding: 30rpx;
- box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
- .title {
- font-size: 34rpx;
- font-weight: 600;
- color: #333;
- margin-bottom: 20rpx;
- padding-bottom: 15rpx;
- border-bottom: 1rpx solid #eee;
- }
- .desc {
- font-size: 24rpx;
- color: #666;
- line-height: 36rpx;
- margin-bottom: 28rpx;
- padding: 12rpx 16rpx;
- background: #f9f9f9;
- border-radius: 8rpx;
- }
- .input-container {
- background: #f7f7f7;
- border-radius: 12rpx;
- padding: 24rpx;
- .textarea {
- width: 100%;
- min-height: 280rpx;
- font-size: 26rpx;
- color: #333;
- line-height: 1.6;
- background: transparent;
- padding: 0;
- margin-bottom: 12rpx;
- resize: none;
- &::placeholder {
- color: #999;
- line-height: 1.6;
- }
- }
- .word-count {
- text-align: right;
- font-size: 22rpx;
- color: #999;
- .over {
- color: #ff4d4f;
- font-weight: 500;
- }
- }
- }
- }
- }
- .submit-btn {
- margin: 30rpx 24rpx;
- padding: 22rpx 0;
- width: calc(100% - 48rpx);
- background: linear-gradient(90deg, #0d27f7, #13c1ea);
- color: #fff;
- font-size: 32rpx;
- font-weight: 500;
- border-radius: 100rpx;
- box-shadow: 0 4rpx 12rpx rgba(19, 193, 234, 0.3);
- transition: all 0.2s;
- &:disabled {
- background: #e5e5e5;
- color: #999;
- box-shadow: none;
- }
- &:active {
- opacity: 0.9;
- transform: scale(0.99);
- }
- }
- }
- </style>
|