以getPositionList为例,查找接口函数定义及接口数据格式定义

以getPositionList为例,查找接口函数定义及接口数据格式定义_第1张图片

job-app-master/pages/index/index.vue中299行

		async getPositionList(type = 'refresh', pulldown = false) {
			this.status = '请求中';
			if (type == 'refresh') {
				this.query.page = 1;
			} else {
				this.query.page++;
			}
			let res = await this.$apis.getPositionList(this.query);
			if (res) {
				if (type == 'refresh') {
					this.list = [];
				}
				if (pulldown) {
					uni.stopPullDownRefresh();
				}
				let data = res.records;
				for (let i in data) {
					if (data[i].skill) {
						data[i].skill = data[i].skill.split(',');
					}
				}
				this.list = this.list.concat(data || []);
				this.changeStatus(res);
			}
		},

job-app-master/pages/index/index.vue中46行

				

/job-app-master/components/yzb/yzb-position.vue中62行

以getPositionList为例,查找接口函数定义及接口数据格式定义_第2张图片

 /job-app-master/components/yzb/yzb-position.vue中3行

		
			
				
					兼职
					{{ item.postName }}
					共享
				
				{{ item.salary }}
			
			
				
				
					{{ item.companyName }}
					
					{{ item.companyStaffSize }}
					
					{{ item.companyNature }}
				
				
					{{formatDistance(item.distance)}}
				
			
			
				{{ item.expRequire }}
				{{ item.minEducation }}
				{{ item2 }}
				佣金¥{{ item.shareMoney }}
			
			
			
				
					
					{{ item.memberName }}
					{{ item.memberPostName }}
				
				
					{{item.pcity}}
					{{item.city}}
				
			
		

从第三行就能看到接口的全部属性。需要整理

另外,/job-app-master/apis/index.js第135行是接口地址定义:

// 查询职位列表
export const getPositionList = (data) => http.GET(`${config.baseUrl}/rms/getPositionList`, data);

 接口请求时携带的参数定义:

job-app-master/pages/index/index.vue第174行和94行

 

	methods: {
		//需要位置信息的
		getDatasByLoc(type = 'refresh', pulldown = false) {
			console.log('memberRole===', this.userInfo.memberRole);
			if (this.location.pcitycode) {
				this.query.latitude = this.location.latitude;
				this.query.longitude = this.location.longitude;
				this.query.pcitycode = this.location.pcitycode;
				if (this.userInfo.memberRole == 1) {
					this.getResumeList(type, pulldown);
				} else {
					this.getPositionList(type, pulldown);
				}
			} else {
				console.log('位置不能为空哦');
			}
		},

以getPositionList为例,查找接口函数定义及接口数据格式定义_第3张图片

你可能感兴趣的:(linux,运维,服务器)