Authored by 肖亚东

个人中心UI部分功能提交

... ... @@ -43,7 +43,7 @@
"selectedIconPath": "static/images/community_selected@3x.png"
},
{
"pagePath": "pages/userCenter/userCenter",
"pagePath": "pages/community/community",
"text": "mars",
"iconPath": "static/images/mars@3x.png",
"selectedIconPath": "static/images/mars_selected@3x.png"
... ...
... ... @@ -9,6 +9,6 @@
item-idx="1"
floor-data="{{floorData}}"
url="{{floorData.data.list[0].url}}">
<image class="resource-single-image" src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3267707892,1102223023&fm=26&gp=0.jpg" mode="aspectFill"></image>
<image class="resource-single-image" src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2700915385,2771074487&fm=26&gp=0.jpg" mode="aspectFill"></image>
</anchor>
</view>
\ No newline at end of file
... ...
... ... @@ -17,9 +17,9 @@ Component({
*/
data: {
banner:[
{'src': "http://img11.static.yhbimg.com/yhb-img01/2019/06/27/16/0199e0780ce56fe81f76b26aaa1902c885.jpg?imageView2/{mode}/w/{width}/h/{height}"},
{'src': "http://img11.static.yhbimg.com/yhb-img01/2019/06/27/16/0199e0780ce56fe81f76b26aaa1902c885.jpg?imageView2/{mode}/w/{width}/h/{height}"},
{'src': "http://img11.static.yhbimg.com/yhb-img01/2019/06/27/16/0199e0780ce56fe81f76b26aaa1902c885.jpg?imageView2/{mode}/w/{width}/h/{height}"}
{'src': "http://img11.static.yhbimg.com/yhb-img01/2019/07/08/16/01ebb6ff346dc35b904fd42a5118f2472c.jpg?imageView2/{mode}/w/{width}/h/{height}"},
{'src': "http://img10.static.yhbimg.com/yhb-img01/2019/07/08/16/015af7151eb026ebb776fac720eb227b0d.jpg?imageView2/{mode}/w/{width}/h/{height}"},
{'src': "http://img10.static.yhbimg.com/yhb-img01/2019/07/08/16/01055d8fc10a714574bf5cdcb57017abe0.jpg?imageView2/{mode}/w/{width}/h/{height}"}
],
},
... ...
Component({
properties: {
undoneData: null,
},
data: {
list: ['a', 'b', 'c', 'd', 'e'],
swiperCurrent: 0,
},
methods: {
swiperChange: function (e) {
this.setData({
swiperCurrent: e.detail.current
});
},
rightSlide() {
let swiperCurrent = this.data.swiperCurrent;
swiperCurrent += 1;
if (swiperCurrent < this.data.list.length) {
this.setData({
swiperCurrent
});
}
},
leftSlide() {
let swiperCurrent = this.data.swiperCurrent;
if (swiperCurrent > 0) {
swiperCurrent -= 1;
this.setData({
swiperCurrent
});
}
},
}
});
... ...
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
... ...
<view class="container">
<view class="ticket-number">取票号:19941214</view>
<view class="ticket-content">
<image src="../../../static/images/left_arraw@3x.png" class="left-slide" bindtap="leftSlide"></image>
<swiper class="scroll-box" wx:if="{{list.length > 0}}" bindchange="swiperChange" current="{{swiperCurrent}}">
<block wx:for="{{list}}">
<swiper-item>
<view class="card">
<text>{{item}}</text>
</view>
</swiper-item>
</block>
</swiper>
<image src="../../../static/images/right_arraw@3x.png" class="right-slide" bindtap="rightSlide"></image>
</view>
<view class="ticket-index">{{swiperCurrent+1}}/{{list.length}}</view>
</view>
... ...
.container {
width: 750rpx;
height: 480rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.ticket-number {
font-family: PingFang-SC-Regular;
font-size: 28rpx;
color: #444444;
letter-spacing: 0;
margin-top: 40rpx;
}
.ticket-content {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
height: 300rpx;
margin: 20rpx 0;
}
.left-slide {
width: 56rpx;
height: 56rpx;
margin-left: 30rpx;
}
.right-slide {
width: 56rpx;
height: 56rpx;
margin-right: 30rpx;
}
.ticket-index {
font-family: PingFang-SC-Regular;
font-size: 20rpx;
color: #B0B0B0;
letter-spacing: 0;
text-align: center;
}
.scroll-box{
white-space: nowrap;
width: 300rpx;
height: 300rpx;
}
.card-box{
display: inline-block;
}
.card{
display: flex;
justify-content: center;
align-items: center;
width: 300rpx;
height: 300rpx;
font-size: 40px;
background: lightblue;
}
... ...
Component({
properties: {
undoneData: null,
},
methods: {
tapAllOrders() {
this.triggerEvent('jumpAllOrders');
},
tapButtonAction(e) {
let actionType = e.currentTarget.dataset.actionType;
this.triggerEvent('tapButton', actionType);
},
}
});
... ...
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file
... ...
<view class="container">
<view class="header">
<text class='header-title'>{{undoneData.headerTitle}}</text>
<view wx:if="{{!undoneData.isActivity}}" class="all-orders" bindtap="tapAllOrders">全部订单
<image class="more" src="../../../static/images/more@3x.png"></image>
</view>
</view>
<view class="content">
<text class='undone-tips'>{{undoneData.undoneTips}}</text>
<view class="button-tips" bindtap="tapButtonAction" data-action-type="{{undoneData.actionType}}">{{undoneData.buttonTips}}</view>
</view>
</view>
\ No newline at end of file
... ...
.container {
width: 750rpx;
height: 362rpx;
}
.header {
width: 100%;
height: 100rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.header-title {
font-family: PingFang-SC-Medium;
font-weight: bold;
font-size: 32rpx;
color: #444444;
letter-spacing: 0;
margin-left: 30rpx;
}
.all-orders {
font-family: PingFang-SC-Regular;
font-size: 28rpx;
color: #B0B0B0;
letter-spacing: 0;
}
.more {
width: 14rpx;
height: 21rpx;
margin-right: 30rpx;
}
.content {
display: flex;
flex-direction: column;
align-items: center;
height: 262rpx;
}
.undone-tips {
font-family: PingFang-SC-Medium;
font-weight: bold;
font-size: 40rpx;
color: #D8D8D8;
letter-spacing: 0;
margin-top: 60rpx;
}
.button-tips {
margin-top: 30rpx;
width: 140rpx;
height: 56rpx;
background: #444444;
border-radius: 4rpx;
font-family: PingFang-SC-Regular;
font-size: 24rpx;
color: #FFFFFF;
letter-spacing: 0;
display: flex;
justify-content: center;
align-items: center;
}
\ No newline at end of file
... ...
import { ACTIVITY_HOST, API_HOST } from '../../libs/config';
import { GET, POST } from '../../libs/request';
import { formatTimeByDay } from '../../utils/util';
Page({
data: {
imageArray: [ 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3267707892,1102223023&fm=26&gp=0.jpg', 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3267707892,1102223023&fm=26&gp=0.jpg'],
imageArray: [ 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2700915385,2771074487&fm=26&gp=0.jpg', 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2700915385,2771074487&fm=26&gp=0.jpg'],
newsList: {
page: 0,
limit: 20,
... ...
import jumpToMiniapp from '../../router/jump-to-miniapp';
import wx from '../../utils/wx';
const ACTION_TYPE = {
GOBUY: 0, //去购买
CHECKODER: 1, //查看订单
APPLYACTIVITY: 2 //去报名
};
Page({
data: {
undoneTicket: [{
headerTitle: '我的门票',
undoneTips: '您还没有购票哦',
buttonTips: '去购买',
isActivity: false,
actionType: ACTION_TYPE.GOBUY,
},
{
headerTitle: '我的门票',
undoneTips: '您还有未完成的门票订单',
buttonTips: '查看订单',
isActivity: false,
actionType: ACTION_TYPE.CHECKODER,
}],
notJionActivity: {
headerTitle: '我的活动',
undoneTips: '您还没有报名活动哦',
buttonTips: '去报名',
isActivity: true,
actionType: ACTION_TYPE.APPLYACTIVITY,
}
},
onLoad: function(options) {
//Do some initialize when page load.
... ... @@ -14,6 +43,33 @@ Page({
//Do some when page show.
},
//点击我的二维码
tapMyQRCode() {
},
//跳全部订单
jumpAllOrders() {
jumpToMiniapp({ app: 'yohobuy', page: 'myOrders', data: {index:0} })
},
//按钮事件
tapButton(e) {
let actionType = e.detail;
if (actionType == ACTION_TYPE.GOBUY) {//去购买
jumpToMiniapp({ app: 'yohobuy', page: 'productDetail', data: {productSkn:'51905732'} })
} else if (actionType == ACTION_TYPE.CHECKODER) {//查看订单
jumpToMiniapp({ app: 'yohobuy', page: 'myOrders', data: {index:1} })
} else if (actionType == ACTION_TYPE.APPLYACTIVITY) {//去报名
wx.switchTab({
url: '/pages/schedule/schedule',
})
}
},
onHide: function() {
//Do some when page hide.
... ...
{
"navigationBarTitleText": "我的",
"usingComponents": {}
"usingComponents": {
"undone-view": "/components/user-center/undone-view/index",
"ticket-slide": "/components/user-center/ticket-slide/index"
}
}
\ No newline at end of file
... ...
<view class="container">
<!-- 头部用户信息 -->
<block>
<image class="header-bg" src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2700915385,2771074487&fm=26&gp=0.jpg" mode="aspectFill">
<view class="user-info">
<image class="portrait" src="http://img3.imgtn.bdimg.com/it/u=3677209778,3519789803&fm=26&gp=0.jpg" mode="aspectFill"></image>
<view class="nick-name">不加糖的小饼干</view>
<view class="qrcode-view" bindtap="tapMyQRCode">
<image class="qrcode-icon" src="../../static/images/myQRcode@3x.png"></image>
<view class="qrcode-tips">我的二维码</view>
</view>
</view>
</image>
</block>
<!-- <undone-view undone-data="{{undoneTicket[1]}}" bind:jumpAllOrders="jumpAllOrders" bind:tapButton="tapButton"></undone-view> -->
<ticket-slide></ticket-slide>
<view class="space-view"></view>
<undone-view undone-data="{{notJionActivity}}" isActivity="true" bind:tapButton="tapButton"></undone-view>
</view>
\ No newline at end of file
... ...
.container {
position: relative;
}
.header-bg {
width: 750rpx;
height: 360rpx;
}
.header-bg .user-info {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 360rpx;
display: flex;
flex-direction: column;
align-items: center;
z-index: 99;
}
.user-info .portrait {
width: 120rpx;
height: 120rpx;
border-radius: 120rpx;
margin-top: 60rpx;
}
.user-info .nick-name {
font-family: PingFang-SC-Medium;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
letter-spacing: 0;
margin-top: 30rpx;
}
.user-info .qrcode-view {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20rpx;
}
.user-info .qrcode-view .qrcode-icon {
width: 40rpx;
height: 40rpx;
}
.user-info .qrcode-view .qrcode-tips {
font-family: PingFang-SC-Regular;
font-size: 24rpx;
color: #B0B0B0;
letter-spacing: 0;
margin-left: 6rpx;
}
.space-view {
height: 20rpx;
background-color: #eeeeee;
}
\ No newline at end of file
... ...
... ... @@ -48,7 +48,7 @@
"list": []
},
"miniprogram": {
"current": 4,
"current": 5,
"list": [
{
"id": -1,
... ... @@ -84,6 +84,13 @@
"pathName": "pages/brands/brandDetail",
"query": "brandId=541",
"scene": null
},
{
"id": 5,
"name": "我的",
"pathName": "pages/userCenter/userCenter",
"query": "",
"scene": null
}
]
}
... ...
... ... @@ -6,7 +6,8 @@ const appData = {
appId: 'wx084ab813d88c594b',
page: {
productDetail: 'pages/goodsDetail/goodsDetail',
shopDetail: 'pages/goodsList/brandStore'
shopDetail: 'pages/goodsList/brandStore',
myOrders: 'pages/orders/orders'
}
},
yohobuyLimitChannel: {
... ...