Commit 869f9c96 authored by 刘帅阳's avatar 刘帅阳

修改

parent d2828be0
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
<u-col> <u-col>
<u-swiper <u-swiper
:list="topicList" :list="topicList"
circular
indicator indicator
indicatorMode="line" indicatorMode="line"
circular
@click="navigateToPage" @click="navigateToPage"
></u-swiper> ></u-swiper>
</u-col> </u-col>
...@@ -21,16 +21,16 @@ ...@@ -21,16 +21,16 @@
<view style="padding-bottom: 30rpx;"> <view style="padding-bottom: 30rpx;">
<view class="gl-title"> <view class="gl-title">
<view style="height: 35px;display: flex;align-items: center;"> <view style="height: 35px;display: flex;align-items: center;">
<image src="../../static/img/image/home_icon_remen@2x.png" class="smallicon"></image> <image class="smallicon" src="../../static/img/image/home_icon_remen@2x.png"></image>
<span>推荐</span> <span>推荐</span>
</view> </view>
<view style="width: 40%;"> <view style="width: 40%;">
<u-subsection :list="list" :current="curNow" @change="sectionChange"></u-subsection> <u-subsection :current="curNow" :list="list" @change="sectionChange"></u-subsection>
</view> </view>
</view> </view>
<view v-if="curNow === 0 && hotList.length > 0"> <view v-if="curNow === 0 && hotList.length > 0">
<view v-for="(item,index) in hotList" :key="index" class="indexcard"> <view v-for="(item,index) in hotList" :key="index" class="indexcard">
<image class="cardimage" :src="item.path" @click="toDetail(item.businessId)"></image> <image :src="item.path" class="cardimage" @click="toDetail(item.businessId)"></image>
<view class="cardtitle" @click="toDetail(item.businessId)"> <view class="cardtitle" @click="toDetail(item.businessId)">
<view class="cardtitle1">{{item.title}}</view> <view class="cardtitle1">{{item.title}}</view>
<view class="cardtitle2">{{item.details.replace(/<[^>]*>/g, '')}}</view> <view class="cardtitle2">{{item.details.replace(/<[^>]*>/g, '')}}</view>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</view> </view>
<view v-else-if="curNow === 1 && newList.length > 0"> <view v-else-if="curNow === 1 && newList.length > 0">
<view v-for="(item,index) in newList" :key="index" class="indexcard"> <view v-for="(item,index) in newList" :key="index" class="indexcard">
<image class="cardimage" :src="item.defaultUrl" @click="toDetail(item.businessId)"></image> <image :src="item.defaultUrl" class="cardimage" @click="toDetail(item.businessId)"></image>
<view class="cardtitle" @click="toDetail(item.businessId)"> <view class="cardtitle" @click="toDetail(item.businessId)">
<view class="cardtitle1">{{item.videoTitle}}</view> <view class="cardtitle1">{{item.videoTitle}}</view>
<view class="cardtitle1">总推广量:{{item.readNum || '-'}}</view> <view class="cardtitle1">总推广量:{{item.readNum || '-'}}</view>
...@@ -181,6 +181,20 @@ import USwiper from "../../uview-ui/components/u-swiper/u-swiper.vue"; ...@@ -181,6 +181,20 @@ import USwiper from "../../uview-ui/components/u-swiper/u-swiper.vue";
'nomore' : 'loadmore' 'nomore' : 'loadmore'
const baseApi = this.baseApi; const baseApi = this.baseApi;
console.log("unitId",this.unitId)
if(this.unitList && this.unitList.length >0) {
if (this.unitList[0].businessId !== null){
console.log(1)
this.unitId = this.unitList[0].businessId
}else{
console.log(2)
this.unitId = ''
}
}else {
console.log(3)
this.unitId = ''
}
console.log("unitId",this.unitId)
this.$u.get('/cmsnews/miniProgram/listByTop?page='+this.articlePage+ '&rows='+this.articleRows+ '&source=1'+ '&unitId='+this.unitId).then(res => { this.$u.get('/cmsnews/miniProgram/listByTop?page='+this.articlePage+ '&rows='+this.articleRows+ '&source=1'+ '&unitId='+this.unitId).then(res => {
if (this.articlePage === 1) { if (this.articlePage === 1) {
let list = res.records; let list = res.records;
......
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
<view class="viewRow">姓名:{{item.name || '-'}}</view> <view class="viewRow">姓名:{{item.name || '-'}}</view>
<view class="viewRow">账号:{{item.username || '-'}}</view> <view class="viewRow">账号:{{item.username || '-'}}</view>
<u-row gutter="8" class="expressRow"> <u-row class="expressRow" gutter="8">
<u-col :span="6"><view class="viewRow">文章推广量:{{item.clickThroughRate || '-'}}</view></u-col> <u-col :span="6"><view class="viewRow">文章推广量:{{item.clickThroughRate || '-'}}</view></u-col>
<u-col :span="6"><view class="viewRow">视频推广量:{{item.clickThroughRateVideo || '-'}}</view></u-col> <u-col :span="6"><view class="viewRow">视频推广量:{{item.clickThroughRateVideo || '-'}}</view></u-col>
</u-row> </u-row>
<u-row gutter="8" class="expressRow"> <u-row class="expressRow" gutter="8">
<u-col :span="6"><view class="viewRow">文章推广次数:{{item.clickThroughRateArticle || '-'}}</view></u-col> <u-col :span="6"><view class="viewRow">文章推广次数:{{item.clickThroughRateArticle || '-'}}</view></u-col>
<u-col :span="6"><view class="viewRow">视频推广次数:{{item.clickThroughRateVideoArticle || '-'}}</view></u-col> <u-col :span="6"><view class="viewRow">视频推广次数:{{item.clickThroughRateVideoArticle || '-'}}</view></u-col>
</u-row> </u-row>
...@@ -69,8 +69,14 @@ export default { ...@@ -69,8 +69,14 @@ export default {
this.status = this.page*this.rows >= this.total ? this.status = this.page*this.rows >= this.total ?
'nomore' : 'loadmore' 'nomore' : 'loadmore'
this.unitList = this.vuex_unit this.unitList = this.vuex_unit
if(this.unitList && this.unitList.length >0 && this.unitId === "null") { console.log("unitId",this.unitId)
this.unitId = this.unitList[0].businessId console.log( this.unitList[0].businessId)
if(this.unitList && this.unitList.length >0) {
if (this.unitList[0].businessId !== null){
this.unitId = this.unitList[0].businessId
}else{
this.unitId = ''
}
}else { }else {
this.unitId = '' this.unitId = ''
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment