Skip to content

Commit

Permalink
【功能】小程序我的页面和订单详情页面
Browse files Browse the repository at this point in the history
  • Loading branch information
l00251692 committed Jul 17, 2018
1 parent e58491e commit 004fa4f
Show file tree
Hide file tree
Showing 15 changed files with 432 additions and 408 deletions.
2 changes: 1 addition & 1 deletion client/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"pages/order/pay",
"pages/login/login",
"pages/mine/mine",
"pages/order/myOrder",
"pages/order/detail",
"pages/logs/logs"
],
"window":{
Expand Down
2 changes: 1 addition & 1 deletion client/pages/addInfo/addInfo.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<view class="reporter-user reporter-detail-item">
<text class="reporter-detail-name">详细信息</text>
<view class="reporter-detail-input">
<input type="text" value="{{adDetail}}" name="adDetail" placeholder="请填写门牌号等详细信息(可选)" />
<input type="text" value="{{adDetail}}" name="adDetail" placeholder="(可选)请填写门牌号等详细信息" />
</view>
</view>
</view>
Expand Down
78 changes: 47 additions & 31 deletions client/pages/mine/mine.wxml
Original file line number Diff line number Diff line change
@@ -1,43 +1,59 @@

<!--pages/mine/mine.wxml-->
<view class="header">
<view class="onlogin">
<button bindgetuserinfo="onLogin" open-type="getUserInfo" class="userbutton">
<image class="avatar" src="{{loginInfo ? userInfo.avatarUrl: '/images/default-image.png'}}"></image>
</button>

</view>
<view>
{{loginInfo ? userInfo.nickName : '未登录'}}
</view>
</view>
<view wx:if="{{loginInfo}}" class="weui-cells">
<navigator url="/pages/service/service?registType={{registType}}" wx:if="{{phone != null}}" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__bd">我要接单</view>
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</navigator>
<navigator url="/pages/login/login?phone={{phone}}" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__bd">绑定手机号</view>
<view class="weui-cell__ft weui-cell__ft_in-access">{{phone}}</view>
</navigator>
<navigator url="/pages/wallet/wallet?ballance={{ballance}}" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__bd">我的钱包</view>
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</navigator>
<navigator url="/pages/order/myOrder?ballance={{ballance}}" class="weui-cell weui-cell_access" hover-class="weui-cell_active">
<view class="weui-cell__bd">行程记录</view>
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
</navigator>
</view>
<view wx:if="{{loginInfo}}" class="weui-cells">
<view data-phone="18261149716" bindtap="onPhoneTap" class="weui-cell weui-cell_access">
<view class="weui-cell__bd">热线</view>
<view class="weui-cell__ft weui-cell__ft_in-access">18261149716</view>

<text class="service-process-title">申请记录</text>
<!-- <block wx:for="{{list}}" wx:key="wx_djh"> -->
<block >
<view class="process review-process">
<view class="process-hd">
<image class="review-process-icon" src="../../images/order/order_accepted.png"></image>
<view class="order-number-name">
<text>患者订单标题</text>
</view>
<view class="process-state">
<text class="process-state-name process-state-accepted">已提交</text>
</view>
</view>
<view class="process-bd">
<view class="process-item">
<view class="process-item-bd">
<text class="process-item-name">患者姓名</text>
</view>
<view class="process-item-ft">
<text class="process-item-info">阿里朗</text>
</view>
</view>
<view class="process-item">
<view class="process-item-bd">
<text class="process-item-name">创建时间</text>
</view>
<view class="process-item-ft">
<text class="process-item-info">2018-06-12 12:23:12</text>
</view>
</view>
<view class="process-item">
<view class="process-item-bd">
<text class="process-item-name">订单编号</text>
</view>
<view class="process-item-ft">
<text class="process-item-info">20180612012234122324</text>
</view>
</view>
</view>
<navigator url="/pages/order/detail?id=20180612012234122324">
<view class="service-detail-open">
<text>详情</text>
</view>
</navigator>
</view>
<view class="weui-cell weui-cell_access">
<view class="weui-cell__bd">客服留言</view>
<button class="cs_button" open-type="contact">
<image class="cs_image" src="/images/concat.png"></image>
</button>
</view>
</view>
</block>
120 changes: 84 additions & 36 deletions client/pages/mine/mine.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -33,45 +33,93 @@
background-color: #fff;
}

.zan-badge {
position: relative;
}
.zan-badge__count {
position: absolute;
top: 1rpx;
left: 6em;
height: 1.6em;
min-width: 1.6em;
line-height: 1.6;
padding: 0 .4em;
font-size: 10px;
font-family: tahoma;
border-radius: .8em;
background: #FF4444;
color: #fff;
text-align: center;
white-space: nowrap;
transform: translateX(50%);
transform-origin: -10% center;
z-index: 10;
box-shadow: 0 0 0 1px #fff;
box-sizing: border-box;
.service-process-title{
color: #888;
margin-top: 40rpx;
margin-left: 20rpx;
line-height: 80rpx;
}

.cs_button {
background-color: #fff;
border: 0px;
position: fixed;
right:12rpx;
margin-bottom:12rpx;
margin-top:12rpx;
.process{
display: flex;
flex-direction: column;
background-color: #fff;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
margin-bottom: 20rpx;
}
.process-hd{
display: flex;
align-items: center;
height: 100rpx;
font-size: 11pt;
margin-left: 30rpx;
border-bottom: 1px solid #eee;
}
.review-process-icon{
flex-shrink: 0;
width: 45rpx;
height: 45rpx;
margin-right: 15rpx;
}
.order-number-name{
flex: 1 1 auto;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.process-state{
flex: 0 0 100rpx;
display: flex;
align-items: center;
justify-content: flex-end;
padding-right: 30rpx;
font-weight: bold;
}
.process-state-waited{
color: #ffcb63;
}
.process-state-accepted{
color: #73b4ef;
}
.process-state-dispatched{
color: #e78ab0;
}
.process-state-finished{
color: #9f8bea;
}
.process-state-refused{
color: #999;
}
.process-bd{
padding: 10rpx 30rpx;
}
.process-item{
display: flex;
justify-content: space-between;
margin: 16rpx 5rpx;
}
.process-item-bd{
display:flex;
}

.cs_button:after {
border: 0px;
.process-item-name{
font:11pt;
opacity: .5;
}

.cs_image {
width: 60rpx;
height: 60rpx;
.process-item-info{
font:11pt;
opacity: .5;
}
.process-item-ft{
display: flex;
}
.service-detail-open{
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding: 25rpx;
border-top: 1px solid #eee;
color: #7acfa6;
}
7 changes: 0 additions & 7 deletions client/pages/order/constant.js

This file was deleted.

68 changes: 68 additions & 0 deletions client/pages/order/detail.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// pages/order/detail.js
Page({

/**
* 页面的初始数据
*/
data: {
state: [{ status: '已完成', name: '受理', type: 'finished', list: { '受理人': '六六六', "受理部门": "哈哈哈部门" } }, { status: '已完成', name: '审核', type: 'finished', list: { "审核人": "七七七" } }, { status: '已完成', name: '申请', type: 'finished', list: { '申请人': '六六六', "审核人": "七七七" } }],


},

/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {

},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {

},

/**
* 生命周期函数--监听页面显示
*/
onShow: function () {

},

/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {

}
})
1 change: 1 addition & 0 deletions client/pages/order/detail.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading

0 comments on commit 004fa4f

Please sign in to comment.