123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- <template>
- <view>
- <view class="main">
- <view class="title">{{ item.title || '' }}</view>
- <view class="price" v-if="item.type == 0">{{ item.salary == '面议' ? item.salary : item.salary + '/月' }}</view>
- <view class="desc">{{ item.experience || '' }} · {{ item.positionName || '' }} · {{ item.type == 0 ? '全职' : '兼职' }}</view>
- </view>
- <view class="bos">
- <view class="ms" style="margin-top: 0px">
- <view class="mtitle">职位描述</view>
- <u-parse :content="item.contents" class="item"></u-parse>
- </view>
- <!--企业信息-->
- <view v-if="item.type == 0">
- <view class="ms" @click="go('/pages/job/enterprise/detail?id=' + enterprise.id)">
- <view class="icon gs"></view>
- <view class="con">
- <view class="mti omit">{{ enterprise.name }}</view>
- <view class="address omit">{{ enterprise.address }}</view>
- </view>
- <text class="icon more"></text>
- </view>
- <map :latitude="item.latitude" :longitude="item.longitude" :markers="covers"></map>
- </view>
- </view>
- <view class="mfooter">
- <view class="cn">
- <button class="tob share" open-type="share">
- <text class="icon"></text>
- <view class="mtt">分享</view>
- </button>
- <view class="tob" @click="add()" :class="{ active: flag }">
- <text class="icon"></text>
- <view class="mtt">收藏</view>
- </view>
- <button class="btn" @click="send()">
- <text class="icon"></text>
- <text>投递简历</text>
- </button>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- item: {},
- enterprise: {},
- covers: [],
- flag: false
- };
- },
- onLoad(e) {
- this.http.request({
- url: '/app/position/detail/' + e.id,
- success: (res) => {
- this.item = res.data.data.position;
- this.enterprise = res.data.data.enterprise;
- this.covers.push({ latitude: this.item.latitude, longitude: this.item.longitude });
- }
- });
- },
- methods: {
- go(url) {
- uni.navigateTo({ url: url });
- },
- //收藏职位
- add() {
- this.http.request({
- url: '/app/favorite/add/' + this.item.id,
- success: (res) => {
- uni.showToast({ title: '收藏成功' });
- this.flag = true;
- }
- });
- },
- //投递简历
- send() {
- this.http.request({
- url: '/app/deliver/send/' + this.item.id,
- success: (res) => {
- if (res.data.code == 7979) {
- uni.showModal({
- title: '提示',
- content: res.data.msg,
- showCancel: false,
- success: (res) => {
- uni.navigateTo({ url: '/pages/user/resume/index' });
- }
- });
- } else {
- uni.showModal({ content: '投递成功,等待企业回应', showCancel: false });
- }
- }
- });
- },
- //分享
- onShareAppMessage: function (res) {
- return {
- title: this.item.title,
- path: '/pages/job/detail?id=' + this.item.id,
- success: (res) => {},
- fail: (res) => {}
- };
- }
- }
- };
- </script>
- <style lang="scss">
- .title {
- font-weight: bold;
- }
- .price {
- padding-top: 5px;
- font-size: 15px;
- font-weight: bold;
- color: #ff5722;
- }
- .desc {
- padding-top: 5px;
- font-size: 14px;
- }
- .bos {
- background-color: white;
- padding: 20px;
- border-radius: 25px;
- .ms {
- margin-top: 20px;
- overflow: hidden;
- .mtitle {
- font-weight: bold;
- margin-bottom: 10px;
- }
- .item {
- font-size: 14px;
- padding-top: 7px;
- }
- .gs {
- float: left;
- width: 50px;
- height: 50px;
- border-radius: 50%;
- background-color: #f1f1f1;
- text-align: center;
- font-size: 30px;
- line-height: 47px;
- }
- .con {
- float: left;
- padding-left: 10px;
- width: 70%;
- .mti {
- font-weight: bold;
- padding-bottom: 5px;
- }
- .address {
- font-size: 13px;
- }
- }
- .more {
- float: right;
- margin-top: 14px;
- }
- }
- map {
- border-radius: 8px;
- overflow: hidden;
- margin-top: 15px;
- width: 100%;
- height: 150px;
- }
- }
- .mfooter {
- background-color: white;
- bottom: 0px;
- border-top: 1px solid $line;
- .cn {
- padding: 10px 10px 15px 10px;
- overflow: hidden;
- .tob {
- margin-right: 15px;
- float: left;
- color: $font-c;
- &.active {
- color: $main-color;
- }
- .icon {
- font-size: 28px;
- }
- .mtt {
- font-size: 14px;
- }
- }
- .share {
- background-color: white;
- line-height: 22px;
- padding-top: 3px;
- }
- .btn {
- float: right;
- margin-top: 5px;
- }
- }
- }
- </style>
|