当前位置: 首页 > news >正文

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

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行

				<yzb-position :positions="list" @click="positionDetail"></yzb-position>

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

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

		<view class="item" v-for="(item, index) in positions" :key="index" @click="onClick(item)"><view class="title space-between"><view class="left"><text class="title-parttime" v-if="item.ifParttime==1">兼职</text><text class="title-name">{{ item.postName }}</text><text class="title-share" v-if="item.positionType==3">共享</text></view><text class="right">{{ item.salary }}</text></view><view class="company"><!-- {{ item.companyName }}<view class="height-line"></view>{{ item.companyStaffSize }}<view class="height-line"></view>{{ item.companyNature }} --><view class="left">{{ item.companyName }}<view class="height-line"></view>{{ item.companyStaffSize }}<view class="height-line"></view>{{ item.companyNature }}</view><view class="right"><text class="address">{{formatDistance(item.distance)}}</text></view></view><view class="desc"><text>{{ item.expRequire }}</text><text>{{ item.minEducation }}</text><text v-for="(item2, index2) in item.skill" :key="index2">{{ item2 }}</text><text class="position-type3" v-if="item.shareMoney > 0">佣金¥{{ item.shareMoney }}</text></view><view class="share" v-if="item.positionType == 3">空闲{{ item.shareNumber }}人<view class="height-line"></view>{{ formatCreateTime(item.startDate) }} - {{ formatCreateTime(item.endDate) }}<view class="height-line"></view>最多{{ item.workDays }}天</view><view class="user"><view class="left"><image :src="item.memberAvatar"></image><text class="name">{{ item.memberName }}</text><text class="post">{{ item.memberPostName }}</text></view><view class="right"><text class="area">{{item.pcity}}</text><text class="address">{{item.city}}</text></view></view></view>

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

另外,/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('位置不能为空哦');}},

http://www.lryc.cn/news/141809.html

相关文章:

  • 一生一芯8——在github上添加ssh key
  • 2023年6月电子学会Python等级考试试卷(一级)答案解析
  • ppt如何转pdf文档?用这个方法可将ppt转pdf
  • Hope.money:新兴DeFi项目如何重新定义稳定币生态的未来?
  • 使用 S3 生命周期精确管理对象生命周期
  • RocketMQ零拷贝原理
  • HTML <tbody> 标签
  • 4.22 TCP 四次挥手,可以变成三次吗?
  • 鲁棒性简述
  • 复习leetcode
  • 从聚类(Clustering)到异常检测(Anomaly Detection):常用无监督学习方法的优缺点
  • git仓库提交流程
  • 层叠上下文、层叠顺序
  • postgres开发目录
  • 计算机视觉入门 6) 数据集增强(Data Augmentation)
  • Python分享之redis(2)
  • springboot aop方式实现敏感数据自动加解密
  • RabbitMQ---work消息模型
  • GitRedisNginx合集
  • 系统架构设计师之缓存技术:Redis与Memcache能力比较
  • 02.sqlite3学习——嵌入式数据库的基本要求和SQLite3的安装
  • AIGC ChatGPT 按年份进行动态选择的动态图表
  • 分布式—雪花算法生成ID
  • Python语言实现React框架
  • Netty入门学习和技术实践
  • MySQL详细安装与配置
  • 裸露土堆识别算法
  • 说说你对Redux的理解?其工作原理?
  • 《基于 Vue 组件库 的 Webpack5 配置》7.路径别名 resolve.alias 和 性能 performance
  • 基于PaddleOCR2.7.0发布WebRest服务测试案例