123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416 |
- <template>
- <view>
- <view class="gwList flex justify-center" v-if="dataList.length>0">
- <view class="gwList-box">
- <view class="gwList-box-item flex justify-center" @click="gotoInfo(item.postPushId)"
- v-for="(item,index) in dataList" :key="index">
- <view class="gwList-box-item-box">
- <view v-if="item" class="gwList-box-item-box-title flex justify-between align-center">
- <text>{{item.stationName}}</text>
- <text>{{item.salaryRange}}</text>
- </view>
- <view class="gwList-box-item-box-label flex align-center flex-wrap">
- <text
- style="color: #666666;font-size: 26rpx;padding: 10rpx 25rpx 10rpx 25rpx;background-color: #F6F6F6;border-radius: 8rpx;margin-right: 20rpx;margin-bottom: 20rpx;"
- v-for="(ite,ind) in item.positionWelfare" :key="ind">{{ite}}</text>
- </view>
- <block v-if="title=='我的收藏'">
- <view class="gwList-box-item-box-name flex justify-between align-center">
- <text>{{item.companyName?item.companyName:'匿名公司'}}</text>
- <text v-if="item.companyPeople">{{item.companyPeople}}</text>
- </view>
- <view class="gwList-box-item-box-line"></view>
- <view class="gwList-box-item-box-info flex justify-between align-center">
- <view class="gwList-box-item-box-info-l flex align-center">
- <image :src="item.companyLogo?item.companyLogo:'../../static/logo.png'"
- style="width: 58rpx;height: 58rpx;border-radius: 50%;margin-right: 20rpx;"
- mode=""></image>
- <text v-if="item.companyLegalPerson">{{item.companyLegalPerson}}·创始人</text>
- </view>
- <view class="gwList-box-item-box-info-r">
- {{item.county}}
- {{item.address}}
- </view>
- </view>
- </block>
- <block v-else-if="title=='浏览记录'">
- <view class="gwList-box-item-box-name flex justify-between align-center">
- <text>{{item.companyName?item.companyName:'匿名公司'}}</text>
- <text>{{item.companyPeople?item.companyPeople:0}}</text>
- </view>
- <view class="gwList-box-item-box-line"></view>
- <view class="gwList-box-item-box-info flex justify-between align-center">
- <view class="gwList-box-item-box-info-l flex align-center">
- <image :src="item.companyLogo?item.companyLogo:'../../static/logo.png'"
- style="width: 58rpx;height: 58rpx;border-radius: 50%;margin-right: 20rpx;"
- mode=""></image>
- <text v-if="item.companyLegalPerson">{{item.companyLegalPerson}}·创始人</text>
- </view>
- <view class="gwList-box-item-box-info-r">
- {{item.county}}
- {{item.address}}
- </view>
- </view>
- </block>
- <block v-else>
- <view class="gwList-box-item-box-name flex justify-between align-center">
- <text>{{item.companyName?item.companyName:'匿名公司'}}</text>
- <text v-if="item.companyPeople">{{item.companyPeople}}</text>
- </view>
- <view class="gwList-box-item-box-line"></view>
- <view class="gwList-box-item-box-info flex justify-between align-center">
- <view class="gwList-box-item-box-info-l flex align-center">
- <image :src="item.companyLogo?item.companyLogo:'../../static/logo.png'"
- style="width: 58rpx;height: 58rpx;border-radius: 50%;margin-right: 20rpx;"
- mode=""></image>
- <text v-if="item.companyLegalPerson">{{item.companyLegalPerson}}·创始人</text>
- </view>
- <view class="gwList-box-item-box-info-r">
- {{item.county}}
- {{item.address}}
- </view>
- </view>
- </block>
- </view>
- </view>
- </view>
- </view>
- <!-- 暂无数据 -->
- <view class="gwList" v-else>
- <empty />
- </view>
- <!-- 筛选悬浮 -->
- <view class="filterSe" @click="goScreen()">
- <image src="../../static/images/my/filterSe.png" mode=""></image>
- </view>
- </view>
- </template>
- <script>
- import empty from '../../components/empty.vue'
- export default {
- components: {
- empty
- },
- data() {
- return {
- dataList: [],
- page: 1,
- limit: 10,
- pages: '',
- title: '',
- filter: {
- education: '', //学历
- salaryRange: '', //薪资
- experience: '', //经验
- companyPeople: '', //公司规模
- industry: '', //行业
- }
- };
- },
- onLoad(option) {
- uni.setNavigationBarTitle({
- title: option.title
- })
- uni.showLoading({
- title: '加载中'
- })
- this.title = option.title
- if (option.title == '我的收藏') {
- this.getMyCollectionList()
- } else if (option.title == '浏览记录') {
- this.getDataList()
- } else {
- this.getDataLists()
- }
- },
- onUnload() {
- uni.removeStorageSync('browse')
- },
- watch: {
- filter: {
- handler() {
- this.page = 1
- if (this.title == '我的收藏') {
- this.getMyCollectionList()
- } else if (this.title == '浏览记录') {
- this.getDataList()
- } else {
- this.getDataLists()
- }
- },
- deep: true,
- immediate: true
- }
- },
- onShow() {
- if (uni.getStorageSync('browse') && (uni.getStorageSync('browse')).length > 0) {
- let browse = uni.getStorageSync('browse')
- console.log(browse, '2222222222')
- browse.map(item => {
- let arr = []
- item.list.map(ite => {
- if (ite.value != '不限') {
- arr.push(ite.value)
- }
- })
- switch (item.name) {
- case '学历':
- this.filter.education = arr.join(',')
- break;
- case '薪资':
- this.filter.salaryRange = arr.join(',')
- break;
- case '经验':
- this.filter.experience = arr.join(',')
- break;
- case '公司规模':
- this.filter.companyPeople = arr.join(',')
- break;
- case '行业':
- this.filter.industry = arr.join(',')
- break;
- }
- })
- } else {
- this.filter.education = '' //学历
- this.filter.experience = '' //经验
- this.filter.industry = '' //行业
- this.filter.salaryRange = '' //薪资
- this.filter.companyPeople = '' //公司规模
- }
- },
- onReachBottom() {
- if (this.page < this.pages) {
- this.page += 1
- if (this.title == '我的收藏') {
- this.getMyCollectionList()
- } else if (this.title == '浏览记录') {
- this.getDataList()
- } else {
- this.getDataLists()
- }
- }
- },
- onPullDownRefresh() {
- this.page = 1
- if (this.title == '我的收藏') {
- this.getMyCollectionList()
- } else if (this.title == '浏览记录') {
- this.getDataList()
- } else {
- this.getDataLists()
- }
- },
- methods: {
- // 去筛选
- goScreen() {
- uni.navigateTo({
- url: '/package/screen/screen?isBrowse=1'
- })
- },
- /**
- * 我的收藏记录列表
- */
- getMyCollectionList() {
- let data = {
- page: this.page,
- limit: this.limit,
- education: this.filter.education, //学历
- salaryRange: this.filter.salaryRange, //薪资
- experience: this.filter.experience, //经验
- companyPeople: this.filter.companyPeople, //公司规模
- industry: this.filter.industry, //行业
- }
- this.$Request.getT('/app/myCollection/getMyCollectionListV2', data).then(res => {
- uni.stopPullDownRefresh()
- uni.hideLoading()
- if (res.code == 0) {
- res.data.records.map(item => {
- if (item.positionWelfare) {
- item.positionWelfare = item.positionWelfare.split(',')
- }
- })
- this.pages = res.data.pages
- if (this.page == 1) {
- this.dataList = res.data.records
- } else {
- this.dataList = [...this.dataList, ...res.data.records]
- }
- }
- })
- },
- gotoInfo(postPushId) {
- if (!postPushId) {
- uni.showToast({
- title: '岗位不存在',
- icon: 'none'
- })
- return
- }
- uni.navigateTo({
- url: '/pages/index/game/order?postPushId=' + postPushId
- })
- },
- getDataLists() {
- let data = {
- page: this.page,
- limit: this.limit,
- userId: uni.getStorageSync('userId'),
- education: this.filter.education, //学历
- salaryRange: this.filter.salaryRange, //薪资
- experience: this.filter.experience, //经验
- companyPeople: this.filter.companyPeople, //公司规模
- industry: this.filter.industry, //行业
- }
- this.$Request.getT('/app/sendRecord/getMyRecordListV2', data).then(res => {
- uni.stopPullDownRefresh()
- uni.hideLoading()
- if (res.code == 0) {
- res.data.records.map(item => {
- if (item.positionWelfare) {
- item.positionWelfare = item.positionWelfare.split(',')
- }
- })
- this.pages = res.data.pages
- if (this.page == 1) {
- this.dataList = res.data.records
- } else {
- this.dataList = [...this.dataList, ...res.data.records]
- }
- }
- })
- },
- getDataList() {
- let data = {
- page: this.page,
- limit: this.limit,
- education: this.filter.education, //学历
- salaryRange: this.filter.salaryRange, //薪资
- experience: this.filter.experience, //经验
- companyPeople: this.filter.companyPeople, //公司规模
- industry: this.filter.industry, //行业
- // browseType:1
- }
- this.$Request.getT('/app/userBrowse/selectMyBrowseV2', data).then(res => {
- uni.stopPullDownRefresh()
- uni.hideLoading()
- if (res.code == 0) {
- res.data.records.map(item => {
- if (item.positionWelfare) {
- item.positionWelfare = item.positionWelfare.split(',')
- } else {
- item.positionWelfare = []
- }
- })
- this.pages = res.data.pages
- if (this.page == 1) {
- this.dataList = res.data.records
- } else {
- this.dataList = [...this.dataList, ...res.data.records]
- }
- }
- })
- },
- },
- }
- </script>
- <style lang="scss">
- page {
- background: #F2F2F7;
- }
- .filterSe {
- position: fixed;
- bottom: 10vh;
- right: 30rpx;
- image {
- width: 100rpx;
- height: 100rpx;
- // border-radius: 50%;
- }
- }
- .gwList {
- width: 100%;
- .gwList-box {
- width: 686rpx;
- height: 100%;
- .gwList-box-item {
- width: 100%;
- // height: 329rpx;
- background-color: #ffffff;
- border-radius: 24rpx;
- margin-bottom: 20rpx;
- padding-bottom: 20rpx;
- margin-top: 20rpx;
- }
- .gwList-box-item-box {
- width: 623rpx;
- height: 100%;
- .gwList-box-item-box-title {
- margin-top: 30rpx;
- text:nth-of-type(1) {
- color: #1F1F1F;
- font-size: 38rpx;
- font-weight: 800;
- }
- text:nth-of-type(2) {
- color: #00B88F;
- font-size: 38rpx;
- font-weight: bold;
- }
- }
- .gwList-box-item-box-label {
- margin-top: 30rpx;
- }
- .gwList-box-item-box-name {
- margin-top: 24rpx;
- color: #999999;
- font-size: 28rpx;
- font-weight: 500;
- text:nth-of-type(1) {
- width: 450rpx;
- }
- }
- .gwList-box-item-box-line {
- width: 100%;
- border: 1rpx solid #E6E6E6;
- margin-top: 30rpx;
- margin-bottom: 20rpx;
- }
- .gwList-box-item-box-info {
- font-size: 26rpx;
- .gwList-box-item-box-info-l {
- color: #1A1A1A;
- }
- .gwList-box-item-box-info-r {
- color: #999999;
- max-width: 340rpx;
- }
- }
- }
- }
- }
- </style>
|