Commit e010714d authored by Morson's avatar Morson
parents a90b8aba 87838937
......@@ -14,7 +14,7 @@
>
<text class="title-view">充电桩自营平台</text>
</u-navbar>
<u-swiper
<!-- <u-swiper
:height="240"
:list="list"
:indicator-pos="indicatorPos"
......@@ -22,7 +22,9 @@
:interval="3000"
@click="clickSwiper"
>
</u-swiper>
</u-swiper> -->
<image class="banner-image" :src="bannerImage"></image>
<view class="msg-view">
<view class="msg-title">最新消息</view>
<view class="msg-list-view">
......@@ -33,14 +35,14 @@
>
<view class="msg-content-view">
<view class="left-view">
<image class="msg-icon"></image>
<text>{{ item.body }}</text>
<image class="msg-icon" :src="msgStyleImage[item.content_type]"></image>
<text>{{ item.title }}</text>
</view>
<image class="right-icon"></image>
<image class="right-icon" :src="shouyeyouImage"></image>
</view>
<view
class="line-view"
v-if="messageList.length > index + 1"
v-if="index != 2"
></view>
</view>
</view>
......@@ -109,20 +111,20 @@ export default {
return {
status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
triggered: false,
list: [
{
image: "https://cdn.uviewui.com/uview/swiper/1.jpg",
},
{
image: "https://cdn.uviewui.com/uview/swiper/2.jpg",
},
{
image: "https://cdn.uviewui.com/uview/swiper/3.jpg",
},
],
// list: [
// {
// image: "https://cdn.uviewui.com/uview/swiper/1.jpg",
// },
// {
// image: "https://cdn.uviewui.com/uview/swiper/2.jpg",
// },
// {
// image: "https://cdn.uviewui.com/uview/swiper/3.jpg",
// },
// ],
title: false,
mode: "round",
indicatorPos: "bottomCenter",
// mode: "round",
// indicatorPos: "bottomCenter",
title: "Hello",
loaded: false,
needSettled: true,
......@@ -154,13 +156,19 @@ export default {
"font-weight": "bold",
};
},
msgStyle() {
msgStyleImage() {
return {
1: "", // 置顶
2: "", // 通知
3: "", // 消息
};
},
'1': process.uniEnv.qn_base_url + "zhiding.png", // 置顶
'2': process.uniEnv.qn_base_url + "tongzhi.png", // 通知
'3': process.uniEnv.qn_base_url + "xiaoxi.png", // 消息
}
},
bannerImage() {
return process.uniEnv.qn_base_url + 'banner.png'
},
shouyeyouImage() {
return process.uniEnv.qn_base_url + 'shouyeyou.png'
}
},
onLoad() {
this._freshing = false;
......@@ -265,7 +273,7 @@ export default {
});
}, 1000);
},
clickSwiper(index) {},
// clickSwiper(index) {},
handleScroll() {
console.log("-----scroll-------");
},
......@@ -328,6 +336,12 @@ export default {
color: #333333;
font-weight: bold;
font-size: 40rpx;
}
.banner-image {
width: 730rpx;
height: 280rpx;
margin-left: -14rpx;
}
.msg-view {
......@@ -335,14 +349,14 @@ export default {
color: #333333;
font-size: 32rpx;
font-weight: bold;
padding: 50rpx 0rpx 30rpx 0rpx;
padding: 1rpx 0rpx 30rpx 0rpx;
}
.msg-list-view {
border-radius: 12rpx;
background-color: #ffffff;
padding: 6rpx 30rpx;
height: 268rpx;
padding: 12rpx 30rpx;
height: 252rpx;
}
.msg-content {
......@@ -362,13 +376,14 @@ export default {
.msg-icon {
width: 80rpx;
height: 36rpx;
height: 36rpx;
margin-right: 20rpx;
}
}
.right-icon {
width: 14rpx;
height: 24px;
height: 24rpx;
}
}
......
......@@ -103,7 +103,7 @@
return process.uniEnv.qn_base_url + 'erweima-bg.png'
},
},
onLoad(e) {
onLoad(e) {
if (e) {
if (e.pageIndex) {
this.pageIndex = e.pageIndex;
......@@ -114,8 +114,8 @@
// }
},
onShow() {
if (!this.settledInfo) {
onShow() {
if (!this.settledInfo) {
this.getBaseInfo()
}
},
......@@ -131,7 +131,28 @@
}
let settledInfo = await app.getBaseInfo(this, callBack)
this.settledInfo = settledInfo
this.status = settledInfo.record.status
this.status = settledInfo.record.status
switch (this.status) {
case 1:
case 2:
case 3:
case 4:
this.pageIndex = 2;
break;
case 8:
this.pageIndex = 3;
break;
case 5:
case 6:
this.pageIndex = 4;
break;
case 7:
this.pageIndex = 5;
break;
default:
this.pageIndex = 1;
break;
}
uni.hideLoading()
this.initInfo(settledInfo.record)
},
......
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