forked from TDesignOteam/tdesign-miniprogram-starter-apply
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from LindsBravill/revert-2-feat/my
Revert "feat/my"
- Loading branch information
Showing
20 changed files
with
17 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,11 @@ | ||
// index.js | ||
const app = getApp(); | ||
import { | ||
fetchMyatvs | ||
} from '../../services/fetchMyAtvs'; | ||
// logs.js | ||
const util = require('../../utils/util.js') | ||
|
||
Page({ | ||
data: { | ||
navBarHeight: app.globalData.navBarHeight, | ||
profile: "https://tdesign.gtimg.com/miniprogram/images/avatar1.png", | ||
username: '蔡宣轩', | ||
tags: ['29岁', '设计/艺术从业者'], | ||
myAtvs: [] | ||
logs: [] | ||
}, | ||
|
||
// 加载页面数据 | ||
async loadData() { | ||
const { | ||
data | ||
} = await fetchMyatvs(); | ||
this.setData({ | ||
myAtvs: data | ||
}) | ||
}, | ||
|
||
onLoad() { | ||
this.loadData(); | ||
|
||
} | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,4 @@ | ||
{ | ||
"navigationBarTitleText": "我的", | ||
"usingComponents": { | ||
"t-avatar": "tdesign-miniprogram/avatar/avatar", | ||
"t-avatar-group": "tdesign-miniprogram/avatar-group/avatar-group", | ||
"t-icon": "tdesign-miniprogram/icon/icon", | ||
"custom-top-bar": "./components/custom-top-bar/index", | ||
"t-tabs": "tdesign-miniprogram/tabs/tabs", | ||
"t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", | ||
"t-image": "tdesign-miniprogram/image/image", | ||
"info-card": "./components/info-card/index" | ||
}, | ||
"navigationStyle": "custom" | ||
"usingComponents": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,8 @@ | ||
page { | ||
background: #f5f6f7; | ||
position: relative; | ||
} | ||
|
||
.background { | ||
height: 163px; | ||
background-color: #fff; | ||
background-size: cover; | ||
} | ||
|
||
custom-top-bar { | ||
width: 100%; | ||
position: fixed; | ||
z-index: 99; | ||
top: 0; | ||
} | ||
|
||
.content { | ||
position: absolute; | ||
width: 100%; | ||
margin-top: 5px; | ||
padding-bottom: calc(env(safe-area-inset-bottom) + 112rpx); | ||
} | ||
|
||
.myInfo { | ||
width: 343px; | ||
height: 96px; | ||
border-radius: 12px; | ||
background: #ffffff; | ||
margin: 0 auto 16px auto; | ||
.log-list { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
position: relative; | ||
|
||
.profile { | ||
margin: 16px; | ||
} | ||
|
||
.info { | ||
.username { | ||
color: #000000e6; | ||
font-size: 16px; | ||
font-weight: 600; | ||
font-family: "PingFang SC"; | ||
line-height: 24px; | ||
margin-bottom: 8px; | ||
} | ||
|
||
.tags { | ||
text { | ||
display: inline-block; | ||
height: 24px; | ||
border-radius: 3px; | ||
background: #f3f3f3; | ||
color: #000000e6; | ||
font-size: 12px; | ||
font-weight: 400; | ||
font-family: "PingFang SC"; | ||
text-align: center; | ||
line-height: 24px; | ||
margin-right: 8px; | ||
padding: 0 8px; | ||
} | ||
} | ||
} | ||
|
||
.t-icon { | ||
position: absolute; | ||
right: 16px; | ||
} | ||
flex-direction: column; | ||
padding: 40rpx; | ||
} | ||
.log-item { | ||
margin: 10rpx; | ||
} | ||
|
||
.myAtvs { | ||
width: 343px; | ||
border-radius: 12px; | ||
overflow: hidden; | ||
background: #ffffff; | ||
margin: 0 auto; | ||
|
||
.custom-tabs { | ||
height: 48px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,4 @@ | ||
<!--my/index.wxml--> | ||
<view class="background" style="background-image: url(../../src/imgs/top-bar/topbar-bc.png);"> | ||
<!--logs.wxml--> | ||
<view class="container"> | ||
My Page | ||
</view> | ||
<custom-top-bar></custom-top-bar> | ||
<view class="content" style="top: {{navBarHeight}}px;"> | ||
<view class="myInfo"> | ||
<t-avatar class="profile" image="{{profile}}" size="64px" /> | ||
<view class="info"> | ||
<view class="username">{{username}}</view> | ||
<view class="tags"> | ||
<text wx:for="{{tags}}">{{item}}</text> | ||
</view> | ||
</view> | ||
<t-icon name="edit-1" size="20px" bind:click="onIconTap" /> | ||
</view> | ||
<view class="myAtvs"> | ||
<t-tabs defaultValue="{{0}}" t-class="custom-tabs"> | ||
<t-tab-panel label="待参加" value="0" /> | ||
<t-tab-panel label="已完成" value="1" /> | ||
<t-tab-panel label="全部活动" value="2" /> | ||
</t-tabs> | ||
<info-card wx:for="{{myAtvs}}" info="{{item}}"></info-card> | ||
</view> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ export default function delay(ms = 500) { | |
return new Promise(resolve => { | ||
setTimeout(resolve, ms); | ||
}) | ||
} | ||
} |
Oops, something went wrong.