首页资讯模块开发完成

This commit is contained in:
zxy
2024-02-20 09:03:01 +08:00
parent 0cb9b30292
commit 3ae78e3992
2 changed files with 23 additions and 6 deletions

View File

@@ -181,17 +181,26 @@
</view> </view>
</view> </view>
<view class="latestMission"> <view class="latestMission">
<view class="cardTips" style="margin-left: 16px;">最新资讯</view> <view class="cardTips" style="margin: 0 26rpx;display: flex;align-items: center;justify-content: space-between;padding-bottom: 10rpx;">
<view style="position:absolute;right: 0;">更多</view> <view>最新资讯</view>
<view style="display: flex;align-items: center;" @click="toNewProject">
<view style="color:#707070;font-size:26rpx;margin-right: 10rpx;">更多</view>
<image src="../../static/img/right.svg" mode="" style="width: 14rpx;height: 26rpx;"></image>
</view>
</view>
<view class="newPeojectList"> <view class="newPeojectList">
<!-- <block v-if="companyList.length>0" v-for="(item, index) in companyList" :key="item.id"> <!-- <block v-if="companyList.length>0" v-for="(item, index) in companyList" :key="item.id">
<view class="baddd"></view> <view class="baddd"></view>
<company-list :companyitem="item"></company-list> <company-list :companyitem="item"></company-list>
</block> --> </block> -->
<view style="display: flex;"> <view style="background-color: #fff;padding: 20rpx 30rpx;">
<view v-for="(item,index) in policyContentList" :key="index" style="display: flex;align-items: center;padding: 20rpx 0;">
<image :src="item.headPic" style="width: 80rpx;height: 80rpx;margin-right: 20rpx;border-radius: 10rpx;" mode=""></image>
<view style="font-size: 28rpx;">{{ item.articleTitle }}</view>
</view>
</view> </view>
<view v-if="companyList.length<=0"> <view v-if="policyContentList.length<=0">
<image src="../../static/img/pic_notask.svg" class="nothing" mode=""></image> <image src="../../static/img/pic_notask.svg" class="nothing" mode=""></image>
<view class="nothing_text">暂无最新资讯</view> <view class="nothing_text">暂无最新资讯</view>
<view class="baddd"></view> <view class="baddd"></view>
@@ -408,6 +417,11 @@
}); });
} }
}, },
toNewProject() {
uni.navigateTo({
url: `/pages/project/newProject?tabIndex=${2}`
});
},
gouserSet: function() { gouserSet: function() {
if (!this.$store.state.user.token) { if (!this.$store.state.user.token) {
uni.showModal({ uni.showModal({

View File

@@ -148,7 +148,10 @@ export default {
nonReactiveArray: ["最新任务", "最新岗位", "最新政策"], nonReactiveArray: ["最新任务", "最新岗位", "最新政策"],
} }
}, },
onLoad: function () { onLoad: function (option) {
if(option.tabIndex) {
this.activeTab = option.tabIndex
}
this.getData() this.getData()
this.getPolicy() this.getPolicy()
}, },