Commit a8b82e47 authored by liwei's avatar liwei

对接了banner相关接口,后续要改

parent 4b897d7f
......@@ -14,8 +14,7 @@
<!-- 轮播图 后面放banner里的图-->
<view class="box">
<view class="swiper">
<ls-swiper :list="userData.imgList" imgKey="" :loop="true" :dots="true" :autoplay="true"
:height="200" />
<ls-swiper :list="bannerList" imgKey="" :loop="true" :dots="true" :autoplay="true" :height="200" />
</view>
</view>
<!-- 公告-->
......@@ -128,7 +127,6 @@
<image src="../../static/images/share.png" class="simg" mode="aspectFill"></image>
{{userData.gender!='MALE'?'她':'他'}}推荐给好友
</u-button>
<!-- <view class="name">{{userData.gender!='MALE'?'她':'他'}}推荐给好友</view> -->
</view>
<view class="fe">
<view class="" style="height: 40rpx;display: flex;align-items: center;margin-top: 26rpx;">
......@@ -280,7 +278,8 @@
rows:this.queryParam.rows
}
bannerList(query).then(res =>{
this.bannerList = res.data.rows
//将res.data.rows集合里的bannerPicture取出来,放到集合中
this.bannerList = res.data.rows.map(item => item.bannerPicture)
}).catch(e => {
console.log(e)
})
......
......@@ -43,17 +43,20 @@
};
},
onShow() {
if (uni.getStorageSync('itemobj')) {
uni.switchTab({
url: '/pages/tab/index'
});
// this.falg = false
} else {
console.log('[]');
setTimeout(() => {
this.falg = true;
}, 1000);
}
uni.switchTab({
url: '/pages/tab/index'
});
// if (uni.getStorageSync('itemobj')) {
// uni.switchTab({
// url: '/pages/tab/index'
// });
// // this.falg = false
// } else {
// console.log('[]');
// setTimeout(() => {
// this.falg = true;
// }, 1000);
// }
},
components: {
ELM
......@@ -167,7 +170,7 @@
},
// 生成指定长度的随机字符串
generateRandomString(length) {
debugger
let result = uni.getStorageSync('touristopenid');
if (result != null&&result!="") {
......@@ -176,7 +179,7 @@
result='';
}
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; // 包含大小写字母和数字的所有字符集合
for (let i = 0; i < length; i++) {
const randomIndex = Math.floor(Math.random() * characters.length);
result += characters[randomIndex];
......@@ -321,4 +324,4 @@
pointer-events: none;
height: 100%;
}
</style>
\ No newline at end of file
</style>
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