123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <template>
- <view>
-
- <block v-for="(item,index) in plist" :key="index">
- <view class="cu-card dynamic no-card solid-bottom echo-comjobs-item padding-top-sm padding-lr-sm radius">
- <view class="cu-item shadow padding-top-sm">
- <view class="padding-lr flex justify-between align-center">
- <view class="basis-lg text-bold text-df text-cut">{{item.worker.title}}</view>
- <view class="basis-sm text-cut text-right text-red text-sm">
- {{item.status_text}}
- </view>
- </view>
- <view class="padding-lr padding-tb-xs flex justify-end">
- <view class="cu-btn bg-green radius" @tap="dealInvite(item.id,2)" v-if="item.status == 1">接受邀请</view>
- <view class="cu-btn bg-red margin-left-sm radius" @tap="dealInvite(item.id,3)" v-if="item.status == 1">拒绝邀请</view>
- <view class="cu-btn bg-blue margin-left-sm radius" @tap="toCompany(item.workerid)">查看公司</view>
- </view>
- </view>
- </view>
- </block>
- <uni-load-more :status="pstatus"></uni-load-more>
-
- </view>
- </template>
- <script>
- import slFilter from '@/components/sl-filter/sl-filter.vue';
- import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
- var _this;
- export default {
- components: {
- slFilter,
- uniLoadMore
- },
- data() {
- return {
- userinfo: {},
-
- pstatus: 'more',
- ppage: 1,
- psize: 20,
- plist: [],
- };
- },
- onLoad: function(option){
- _this = this;
- _this.userinfo = _this.checkLogin("/pages/resume/log");
- _this.getMore();
- },
- onPullDownRefresh: function() {
- _this.pageRefresh();
- },
- onReachBottom: function() {
- if (_this.pstatus !== 'more') {
- return;
- }
- _this.getMore();
- },
- methods: {
- pageRefresh: function() {
- _this.pstatus = 'more';
- _this.ppage = 1;
- _this.plist = [];
- _this.getMore();
- },
- getMore: function() {
- _this.$req.ajax({
- path: "resume/userLog",
- data: {
- userid: _this.userinfo.id
- }
- }).then((data) => {
- _this.pstatus = data.status;
- _this.plist = _this.plist.concat(data.list);
- _this.ppage += 1;
- uni.stopPullDownRefresh();
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- },
-
- dealInvite: function(id,status) {
- var text = status == 2 ? '接受' : '拒绝';
- uni.showModal({
- title: '信息提示',
- content: '确定要' + text + '邀请?',
- success: (res) => {
- if(res.confirm) {
- _this.$req.ajax({
- path: "resume/dealInvite",
- data: {
- id: id,
- status: status,
- }
- }).then((data) => {
- _this.pageRefresh();
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- }
- }
- });
- },
- toCompany: function(workerid) {
- uni.navigateTo({
- url: '/pages/worker/shop?workerid=' + workerid
- });
- }
- }
- }
- </script>
- <style>
- </style>
|