123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- <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 padding-bottom" @tap="goDetail(item.comjobs.id)">
- <view class="padding-lr flex justify-between align-center">
- <view class="basis-lg text-bold text-df text-cut">
- {{item.comjobs.title}}
- <text class="text-red text-sm" v-if="item.comjobs.wtype==1">(按月)</text>
- <text class="text-red text-sm" v-if="item.comjobs.wtype==2">(按时)</text>
- <text class="text-red text-sm" v-if="item.comjobs.wtype==3">(按件)</text>
- <text class="text-red text-sm" v-if="item.comjobs.wtype==4">(按项目)</text>
- </view>
- <view class="basis-sm text-cut text-right text-gray text-sm">
- <view class="basis-xs text-cut text-right text-gray text-sm" @tap.stop="delLog(index, item.id)">取消报名</view>
- </view>
- </view>
- <view class="padding-lr flex justify-between align-bottom">
- <view class="basis-lg text-bold text-df text-cut">
- <view><text class="text-red text-bold">{{item.comjobs.zwagall}}</text></view>
- </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 text-cut">
- <view v-for="(titem,tindex) in item.comjobs.tags" :key="tindex" class="cu-tag light bg-blue lg echo-tags-item">{{titem}}</view>
- </view>
- <view class="padding-lr text-cut text-sm flex justify-between align-center">
- <view class="basis-lg text-df text-cut">{{item.comjobs.worker.title}}</view>
- <view class="basis-sm text-cut text-right text-sm">
- 浏览量:{{item.comjobs.volume}}
- </view>
- </view>
- </view>
- </view>
- </block>
- <uni-load-more :status="pstatus"></uni-load-more>
- </view>
- </template>
- <script>
- import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue";
- var _this;
- export default {
- components: {
- uniLoadMore
- },
- data() {
- return {
- userinfo: {},
- pstatus: 'more',
- ppage: 1,
- psize: 20,
- plist: []
- };
- },
- onLoad: function(){
- _this = this;
- _this.userinfo = _this.checkLogin("/pages/comjobs/log");
- if (_this.userinfo===false){
- return false;
- }
- _this.getMore();
- },
- onPullDownRefresh: function() {
- _this.ppage = 1;
- _this.pstatus = 'more';
- _this.plist = [];
- _this.getMore();
- },
- onReachBottom: function() {
- if (_this.pstatus !== 'more') {
- return;
- }
- _this.getMore();
- },
- methods: {
- delLog: function(index,logid) {
- uni.showModal({
- title: '温馨提示',
- content: '确定要删除吗?',
- success(res) {
- if (res.confirm) {
- _this.$req.ajax({
- path: "comjobs/dellog",
- data: {
- logid: logid,
- userid: _this.userinfo.id
- }
- }).then((data) => {
- _this.plist.splice(index, 1);
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- }
- }
- });
-
- },
- getMore: function() {
- _this.$req.ajax({
- path: "comjobs/listlog",
- data: {
- ppage: _this.ppage,
- psize: _this.psize,
- userid: _this.userinfo.id
- }
- }).then((data) => {
- _this.pstatus = data.pstatus;
- _this.plist = _this.plist.concat(data.plist);
- _this.ppage += 1;
- uni.stopPullDownRefresh();
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- },
- goDetail: function(comjobsid) {
- uni.navigateTo({
- url: '/pages/comjobs/detail?comjobsid=' + comjobsid
- });
- },
- goShop: function(workerid) {
- uni.navigateTo({
- url: '/pages/worker/shop?workerid=' + workerid
- });
- },
- }
- }
- </script>
- <style>
- </style>
|