|
@@ -121,11 +121,9 @@
|
|
|
current:0,
|
|
current:0,
|
|
|
perillPJ:null,
|
|
perillPJ:null,
|
|
|
perillBG:null,
|
|
perillBG:null,
|
|
|
- bannarList:[
|
|
|
|
|
- this.$imgBase+'home_lb.png',
|
|
|
|
|
- this.$imgBase+'home_lb.png',
|
|
|
|
|
- this.$imgBase+'home_lb.png'
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ defaultBanner:this.$imgBase+'home_lb.png',
|
|
|
|
|
+ bannerOrigin:[],
|
|
|
|
|
+ bannarList:[],
|
|
|
newUserFreeShow:false,
|
|
newUserFreeShow:false,
|
|
|
teamKindShow:false,
|
|
teamKindShow:false,
|
|
|
teamKindMsg:'',
|
|
teamKindMsg:'',
|
|
@@ -133,6 +131,7 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
|
|
|
+ this.getBannerList();
|
|
|
if(options.q){
|
|
if(options.q){
|
|
|
try{
|
|
try{
|
|
|
const decodedUrl = decodeURIComponent(options.q);
|
|
const decodedUrl = decodeURIComponent(options.q);
|
|
@@ -170,6 +169,20 @@
|
|
|
if(uni.getStorageSync('newUser')) this.newUserFreeShow = true;
|
|
if(uni.getStorageSync('newUser')) this.newUserFreeShow = true;
|
|
|
},
|
|
},
|
|
|
methods:{
|
|
methods:{
|
|
|
|
|
+ getBannerList(){
|
|
|
|
|
+ //space 广告位置: 1首页 2发布问卷
|
|
|
|
|
+ //type 类型: 1 banner区 2弹框
|
|
|
|
|
+ this.$api.get('//core/advertisement/manage/page',{
|
|
|
|
|
+ space:1,
|
|
|
|
|
+ type:1
|
|
|
|
|
+ }).then(({data:res})=>{
|
|
|
|
|
+ if(res.code!==0) return this.$showToast(res.msg)
|
|
|
|
|
+ if(res.data&&res.data.length){
|
|
|
|
|
+ this.bannerOrigin = res.data;
|
|
|
|
|
+ this.bannarList = res.data.map(d=>d.fileUrl);
|
|
|
|
|
+ } else this.bannarList = [this.defaultBanner]
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
toTurn(url){
|
|
toTurn(url){
|
|
|
if(!url) return
|
|
if(!url) return
|
|
|
if(url!=='/pages/dialog'&&!this.isLogin()) return
|
|
if(url!=='/pages/dialog'&&!this.isLogin()) return
|