| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- <template>
- <view class="content">
- <foot-tabs></foot-tabs>
- <div class="self-inf">
- <div class="img-name-box">
- <image src="/static/logo.png" alt="" class="heade-img" mode="aspectFill"></image>
- <p src="" alt="" class="nickname">微信昵称2233</p>
- </div>
- <image class="bg-img" :src="swiperBackground" mode="aspectFill"></image>
- <image src="../../static/Intersect.svg" class="groove-img"></image>
- </div>
- <div class="options">
- <div v-for="(item, idx) in list" :key="idx" class="options-item">
- <div class="img-box">
- <img :src="item.icoin" alt="" class="options-item-img" /><span></span>
- </div>
- <div
- class="options-item-name"
- :class="{ fontGrey: idx == list.length - 1 }"
- >
- {{ item.name }}
- </div>
- </div>
- </div>
- </view>
- </template>
- <script>
- import md5 from '@/common/md5.js';
- export default {
- data() {
- return {
- message: "我的",
- list: [
- { icoin: "/static/selfCenter/suggest.png", name: "我的建议" },
- { icoin: "/static/selfCenter/sign.png", name: "我的报名" },
- { icoin: "/static/selfCenter/collection.png", name: "我的收藏" },
- { icoin: "/static/selfCenter/back.png", name: "退出登录" },
- ],
- swiperBackground:'',
- };
- },
- onLoad() {
- this.getSwiperList();
- },
- methods: {
- getSwiperList(){
- let md5Sign = md5("method="+'common'+"×tamp="+getApp().globalData.globalTimestamp+"&secret="+getApp().globalData.secret)
- let url = getApp().globalData.shareUrl+'api/api.php'+'?method=common&source=main_pics&action=list×tamp='+getApp().globalData.globalTimestamp +'&sign='+md5Sign
- uni.request({
- url:url,
- method: 'POST',
- header: {
- 'content-type': 'application/x-www-form-urlencoded'
- },
- data: {
- order_by:"weight desc",
- s_status:1,
- },
- success: (res) => {
- if(res.data.code === 200){
- this.swiperBackground = getApp().globalData.shareUrl + res.data.data.list[0].pic_path
- }
- },
- fail: () => {
- console.log("连接失败");
- }
- });
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .content {
- display: flex;
- flex-direction: column;
- .self-inf {
- position: relative;
- height: 440rpx;
- width: 100%;
- display: flex;
- margin-bottom: 80rpx;
- border-radius: 0rpx 0rpx 100% 100%;
- .img-name-box {
- height: 150rpx;
- margin-top: 70rpx;
- display: flex;
- align-items: center;
- .heade-img {
- z-index: 1;
- width: 100rpx;
- height: 100rpx;
- border-radius: 50%;
- margin-left: 80rpx;
- }
- }
- .bg-img {
- z-index: -1;
- position: absolute;
- width: 100%;
- height: 100%;
- // border-radius: 0rpx 0rpx 70rpx 70rpx;
- }
- .groove-img {
- width: 100%;
- height: 100rpx;
- bottom: -22rpx;
- position: absolute;
- }
- .nickname {
- font-weight: 600;
- font-size: 28rpx;
- margin-left: 30rpx;
- margin-top: 20rpx;
- color: #ffffff;
- letter-spacing: 1rpx;
- }
- }
- .options {
- padding: 70rpx;
- z-index: 99;
- position: relative;
- top: -270rpx;
- .options-item {
- background-color: #fff;
- display: flex;
- box-shadow: 0px 4rpx 32rpx rgba(0, 0, 0, 0.1);
- border-radius: 32rpx;
- margin-top: 20px;
- height: 150rpx;
- align-items: center;
- .img-box {
- margin-left: 40rpx;
- .options-item-img {
- width: 56rpx;
- height: 56rpx;
- }
- }
- .options-item-name {
- margin-left: 40rpx;
- font-weight: 600;
- font-size: 30rpx;
- margin-bottom: 10rpx;
- }
- }
- }
- }
- .fontGrey {
- color: $uni-text-color-grey;
- }
- </style>
|