Commit b4b3ced7 authored by 张伯涛's avatar 张伯涛

接口传参修改

parent 869f9c96
...@@ -130,8 +130,13 @@ import USwiper from "../../uview-ui/components/u-swiper/u-swiper.vue"; ...@@ -130,8 +130,13 @@ import USwiper from "../../uview-ui/components/u-swiper/u-swiper.vue";
}, },
onShow(){ onShow(){
console.log('this.vuex_unit',this.vuex_unit)
if(this.vuex_unit && this.vuex_unit.length > 0) { if(this.vuex_unit && this.vuex_unit.length > 0) {
if(this.vuex_unit[0].businessId === null) {
this.unitId = ''
}else {
this.unitId = this.vuex_unit[0].businessId this.unitId = this.vuex_unit[0].businessId
}
}else { }else {
this.unitId = '' this.unitId = ''
} }
...@@ -181,20 +186,6 @@ import USwiper from "../../uview-ui/components/u-swiper/u-swiper.vue"; ...@@ -181,20 +186,6 @@ 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;
......
...@@ -69,13 +69,11 @@ export default { ...@@ -69,13 +69,11 @@ 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
console.log("unitId",this.unitId)
console.log( this.unitList[0].businessId)
if(this.unitList && this.unitList.length >0) { if(this.unitList && this.unitList.length >0) {
if (this.unitList[0].businessId !== null){ if(this.unitList[0].businessId === null) {
this.unitId = this.unitList[0].businessId
}else{
this.unitId = '' this.unitId = ''
}else {
this.unitId = this.unitList[0].businessId
} }
}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