Blame view

lvdao-miniapp/pages/business/businessList/businessList.vue 3.11 KB
e5b57447   杨鑫   '分包问卷'
1
2
3
4
  <template>
  	<!-- 商务合作 -->
  	<view class="page">
  		<!-- 搜索 -->
f692f3a5   wesley88   1
5
  		<view style="margin: 20rpx 0;background-color: #FFFFFF;border-radius: 18rpx;border: 2rpx solid #E8E8E8;	margin: 22rpx 24rpx;overflow: hidden;" >
9d9c6f7d   杨鑫   最新
6
  			<u-search :action-style="{'background':'#19be6b','color':'#fff','height':'32px','line-height':'32px','border-radius':'18rpx'}" bg-color="#fff" placeholder="请输入关键词" v-model="pagesize.likeAt" action-text="搜索" @clear="search" @search="search" @custom="search"></u-search>
e5b57447   杨鑫   '分包问卷'
7
8
9
10
11
12
13
  		</view>
  		<view class="goods-data">
  			<view class="goods-list">
  				<view class="good-item" v-for="(v, i) in list" :key="i" @click="toDetail(v)">
  					<view class="body">
  						<view class="info">
  							<view class="title">{{v.title}}</view>
60cd6339   杨鑫   '最新'
14
  							<view class="info-item">{{v.createTime}}</view>
e5b57447   杨鑫   '分包问卷'
15
  						</view>
f692f3a5   wesley88   1
16
  						<image :src="imgurl+v.coverImage" ></image>
e5b57447   杨鑫   '分包问卷'
17
18
  					</view>
  				</view>
f692f3a5   wesley88   1
19
  				<!-- <u-loadmore :status="statuslist" @loadmore='loading' style="width: 100%; text-align: center;"/> -->
e5b57447   杨鑫   '分包问卷'
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
  			</view>
  		</view>
  	</view>
  </template>
  
  <script>
  	export default {
  		data() {
  			return {
  				tabList:[
  					{ name: '全部' },
  					{ name: '待提交' },
  					{ name: '待审核' },
  					{ name: '通过' },
  					{ name: '驳回' },
  					{ name: '进行中' },
  					{ name: '已结束' },
  				],
  				current: 0,
  				datalist: [],
  				total: 2,
  				statuslist: 'loadmore',
60cd6339   杨鑫   '最新'
42
  				pagesize: {			
9d9c6f7d   杨鑫   最新
43
  							likeAt: '',
e5b57447   杨鑫   '分包问卷'
44
45
  							pageNumber: 1,
  							pageSize: 10,
cfcb44ef   杨鑫   '改bug版'
46
  							status:'1',
e5b57447   杨鑫   '分包问卷'
47
48
49
  					},
  				listIn:0,
  				num:0,
f692f3a5   wesley88   1
50
51
  				list:[],
  				imgurl:''
e5b57447   杨鑫   '分包问卷'
52
53
54
55
  				
  			};
  		},
  		onLoad(option) {
f692f3a5   wesley88   1
56
  			this.imgurl = this.$img
e5b57447   杨鑫   '分包问卷'
57
58
59
60
61
  			// console.log(option.id);
  			// this.num = option.id;
  			this.statuslist = 'nomore';
  		},
  		mounted() {
60cd6339   杨鑫   '最新'
62
  			this.getAll()
e5b57447   杨鑫   '分包问卷'
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  		},
  		onPullDownRefresh(e) {
  			let that = this
  			that.statuslist = 'loading';
  			this.page = 0;
  			setTimeout(() => {
  				that.datalist = [{}];
  				that.statuslist = that.datalist.length >= that.total ? 'nomore' : 'loadmore';
  				uni.stopPullDownRefresh();
  			}, 1000);
  		},
  		onReachBottom(e) {
  			// this.loading();
  		},
  		methods: {
  			tabsChange(val) {
  				this.current = val;
  			},
  			search() {
f692f3a5   wesley88   1
82
  				console.error('=========')
60cd6339   杨鑫   '最新'
83
  				this.getAll()
e5b57447   杨鑫   '分包问卷'
84
  			},
60cd6339   杨鑫   '最新'
85
86
  			getAll(){
  			this.$http.sendRequest('/cereBusinessCooperation/queryByPage', 'POST', this.pagesize,1).then(res => {
e5b57447   杨鑫   '分包问卷'
87
88
89
90
91
92
93
  				this.list =res.data.data.content 
  			})
  				},
  			loading() {
  				let that = this
  				if(that.statuslist == 'nomore') return;
  				that.statuslist = 'loading';
60cd6339   杨鑫   '最新'
94
  				that.pagesize.pageNum = ++that.pagesize.pageNum;
e5b57447   杨鑫   '分包问卷'
95
96
97
98
99
100
101
102
103
104
105
106
107
  				setTimeout(() => {
  					let data = [{}, {}];
  					that.datalist = [...that.datalist, ...data];
  					console.log(that.datalist);
  					that.statuslist = that.datalist.length >= that.total ? 'nomore' : 'loadmore';
  				}, 300)
  			},
  			sel(val){
  				this.listIn = val
  			},
  			toDetail(items) {
  				let msg = JSON.stringify(items)
  				uni.navigateTo({
866d1a6a   wesley88   1
108
  					url: `/pages/business/businessDetail/businessDetail?item=${encodeURIComponent(msg)}`
e5b57447   杨鑫   '分包问卷'
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
  				})
  
  			},
  			reconciliationdetail() {
  	
  			},
  			toAdd() {
  				uni.navigateTo({
  					url: '/pages/activityAdd/activityAdd'
  				})
  			}
  		}
  	}
  </script>
  
  <style scoped lang="scss">
  	@import 'businessList.scss';
  </style>