项目演示
总体代码
<template>
<view>
<!-- #ifdef MP-WEIXIN -->
<view class="zhanwei">
<!-- #endif -->
<!-- #ifdef H5 -->
<view class="zhanwei2">
<!-- #endif -->
<view style="margin-top: 30rpx;margin-left: 30rpx;">
<u--text color="#E4FAF9" size=25 text="Hi ~ 您好"></u--text>
<u--text color="#7A7E83" size=17 text="请选择需要咨询的问题"></u--text>
</view>
<!-- 投诉建议 -->
<view style="margin-left: 570rpx;margin-top: -80rpx;">
<view class="rectangle">
<view style="width: 200rpx;margin-left: 50rpx;">
<u--text color="#E4FAF9" size=18 text="投诉意见"></u--text>
</view>
<view style="margin-top: -46rpx;margin-left: 0rpx;">
<u--image src="/static/icon/complaint.png" width="50rpx" height="50rpx"></u--image>
</view>
</view>
</view>
<!-- 帮助中心 -->
<view class="rectangleTwo">
<view>
<view style="margin-top: 20rpx;margin-left: 10rpx;">
<u--text size=17 text="帮助中心"></u--text>
</view>
<view style="margin-top: -40rpx;margin-left: 500rpx;">
<u--text size=15 color="#7A7E83" text="查看全部"></u--text>
</view>
<view style="margin-top: -40rpx;margin-left: 640rpx;">
<image src="/static/icon/brackets.png" style="width: 30rpx;height: 30rpx;"></image>
</view>
<view class="line">
<u-divider lineColor="#007BFE"></u-divider>
</view>
</view>
<view>
<view style="margin-top: 20rpx;margin-left: 90rpx;">
<u--text size=15 text="常见问题"></u--text>
</view>
<view style="margin-top: -40rpx;margin-left: 640rpx;">
<image src="/static/icon/brackets.png" style="width: 30rpx;height: 30rpx;"></image>
</view>
<view style="margin-top: -40rpx;margin-left: 20rpx;">
<image src="/static/icon/commonproblem.png" style="width: 50rpx;height: 50rpx;"></image>
</view>
<view class="line">
<u-divider lineColor="#007BFE"></u-divider>
</view>
</view>
<view>
<view style="margin-top: 20rpx;margin-left: 90rpx;">
<u--text size=15 text="支付问题"></u--text>
</view>
<view style="margin-top: -40rpx;margin-left: 640rpx;">
<image src="/static/icon/brackets.png" style="width: 30rpx;height: 30rpx;"></image>
</view>
<view style="margin-top: -40rpx;margin-left: 20rpx;">
<image src="/static/icon/payproblem.png" style="width: 50rpx;height: 50rpx;"></image>
</view>
<view class="line">
<u-divider lineColor="#007BFE"></u-divider>
</view>
</view>
<view>
<view style="margin-top: 20rpx;margin-left: 90rpx;">
<u--text size=15 text="收货问题"></u--text>
</view>
<view style="margin-top: -40rpx;margin-left: 640rpx;">
<image src="/static/icon/brackets.png" style="width: 30rpx;height: 30rpx;"></image>
</view>
<view style="margin-top: -40rpx;margin-left: 20rpx;">
<image src="/static/icon/pickupproblem.png" style="width: 50rpx;height: 50rpx;"></image>
</view>
<view class="line">
<u-divider lineColor="#007BFE"></u-divider>
</view>
</view>
<view>
<view style="margin-top: 20rpx;margin-left: 90rpx;">
<u--text size=15 text="租赁保障"></u--text>
</view>
<view style="margin-top: -40rpx;margin-left: 640rpx;">
<image src="/static/icon/brackets.png" style="width: 30rpx;height: 30rpx;"></image>
</view>
<view style="margin-top: -40rpx;margin-left: 20rpx;">
<image src="/static/icon/safeprotect.png" style="width: 50rpx;height: 50rpx;"></image>
</view>
<view class="line">
<u-divider lineColor="#007BFE"></u-divider>
</view>
</view>
</view>
<!-- 平台热线客服 -->
<view class="rectangleThree">
<view style="margin-top: 30rpx;margin-left: 20rpx;">
<image src="/static/icon/Hotline.png" style="width: 60rpx;height: 60rpx;"></image>
</view>
<view style="margin-top: -60rpx;margin-left: 90rpx;">
<u--text size=15 text="平台热线客服"></u--text>
</view>
<view style="margin-top: -40rpx;margin-left: 270rpx;">
<image src="/static/icon/brackets.png" style="width: 30rpx;height: 30rpx;"></image>
</view>
</view>
<!-- 平台在线客服 -->
<view class="rectangleFour">
<view style="margin-top: 30rpx;margin-left: 20rpx;">
<image src="/static/icon/customerService2.png" style="width: 60rpx;height: 60rpx;"></image>
</view>
<view style="margin-top: -60rpx;margin-left: 90rpx;">
<u--text size=15 text="平台客服路线"></u--text>
</view>
<view style="margin-top: -40rpx;margin-left: 270rpx;">
<image src="/static/icon/brackets.png" style="width: 30rpx;height: 30rpx;"></image>
</view>
</view>
<view style="margin-left: 150rpx;margin-top: 40rpx;">
<u--text size=13 color="#7A7E83" text="服务时间: 周一至周日 9:00~21:30"></u--text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss">
.zhanwei {
height: 280rpx; //设置状态栏高度为状态栏的高度
//状态栏高度的获取方式为:--status-bar-height
width: 100%;
background: #2F88FF;
position: fixed; //固定定位,能够让占位标签始终占据状态栏的部分,背景颜色与导航栏颜色一致,是为了美观
top: 0;
left: 50%;
transform: translateX(-50%);
z-index: 99;
}
.zhanwei2 {
height: 280rpx; //设置状态栏高度为状态栏的高度
//状态栏高度的获取方式为:--status-bar-height
width: 100%;
background: #2F88FF;
position: fixed; //固定定位,能够让占位标签始终占据状态栏的部分,背景颜色与导航栏颜色一致,是为了美观
margin-top: 0rpx;
left: 50%;
transform: translateX(-50%);
z-index: 99;
}
.rectangle {
margin-left: -50rpx;
width: 200rpx; //给100像素的宽
height: 50rpx; //给25像素的宽
border: 1rpx solid #E4FAF9; //给一个边框大小 颜色为
border-radius: 8rpx; // 圆角的角度
background: transparent; // 给矩形一个透明的背景色
}
.rectangleTwo {
margin-left: 30rpx;
margin-top: 60rpx;
width: 690rpx; //给100像素的宽
height: 590rpx; //给25像素的宽
border: 1rpx solid #E4FAF9; //给一个边框大小 颜色为
border-radius: 8rpx; // 圆角的角度
background: #FFFFFF; // 给矩形一个透明的背景色
}
.line {
/* 充满整个屏幕 */
width: 95%;
margin-left: 20rpx;
// /* 线的宽度 */
// height: 2px;
// /* 实体白线,因为需要贯穿整个屏幕,所以第三个值不需要设置 */
// border-top: solid white;
}
.rectangleThree {
margin-left: 30rpx;
margin-top: 40rpx;
width: 320rpx; //给100像素的宽
height: 120rpx; //给25像素的宽
border: 1rpx solid #E4FAF9; //给一个边框大小 颜色为
border-radius: 8rpx; // 圆角的角度
background: #FFFFFF; // 给矩形一个透明的背景色
}
.rectangleFour {
margin-left: 400rpx;
margin-top: -125rpx;
width: 320rpx; //给100像素的宽
height: 120rpx; //给25像素的宽
border: 1rpx solid #E4FAF9; //给一个边框大小 颜色为
border-radius: 8rpx; // 圆角的角度
background: #FFFFFF; // 给矩形一个透明的背景色
}
</style>
最后
存在条件编译