Browse Source

no message

feature/v1.1.0
xpz2018 7 years ago
parent
commit
17f51e8dc2
4 changed files with 34 additions and 15 deletions
  1. 8
      components/actionsheet/index.wxss
  2. 8
      pages/order/order.js
  3. 12
      pages/order/order.wxml
  4. 21
      pages/order/order.wxss

8
components/actionsheet/index.wxss

@ -97,11 +97,11 @@
height: 20rpx;
line-height: 20rpx;
color: #333;
font-size: 16px;
font-size: 14px;
}
.icon-classname {
width: 80rpx;
height: 80rpx;
margin-top: 48rpx;
width: 90rpx;
height: 90rpx;
margin-top: 56rpx;
}

8
pages/order/order.js

@ -180,9 +180,9 @@ Page({
url: '../login/login'
})
}else{
wx.switchTab({
url: '../jz/jz'
})
wx.navigateBack({
delta: 1
});
}
},
onLoad: function () {
@ -206,6 +206,7 @@ Page({
dataType: 'json',
responseType: 'text',
success: function (res) {
console.log(res)
var data = res.data;
var status = data.code;
if (status != 0) {
@ -235,7 +236,6 @@ Page({
userInfo: app.globalData.userInfo,
hasUserInfo: true
})
console.log(app.globalData.userInfo);
} else if (this.data.canIUse) {
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
// 所以此处加入 callback 以防止这种情况

12
pages/order/order.wxml

@ -1,5 +1,5 @@
<view wx:if="{{sessionId}}">
<view wx:if="{{items!=[]}}">
<view wx:if="{{items!=[] && items.length > 0}}">
<view wx:for-items="{{items}}" wx:key="goodsNo">
<view class='box'>
<text class='time'>{{item.createAtStr}}</text>
@ -32,12 +32,10 @@
</view>
</view>
<view wx:else>
<view class='user-msg'>
<view class="userinfo">
<view class='loginText'>亲,您还没有下单呢!</view>
<button class='loginBtn' bindtap='goLogin'>立即下单</button>
</view>
</view>
<view class="empty-layout">
<image class="icon-empty" src="../../images/空.png" />
<text class="text-empty">亲,您还没有下单呢!</text>
</view>
</view>
</view>
<view wx:else>

21
pages/order/order.wxss

@ -120,4 +120,25 @@ button::after{
line-height: 60rpx;
width: 34%;
margin: 0 auto;
}
.empty-layout {
width: 100%;
height: 100%;
padding-top: 50%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.icon-empty {
width: 80px;
height: 80px;
vertical-align: top;
margin-bottom: 40px;
}
.text-empty {
font-size: 15px;
float: left;
}
Loading…
Cancel
Save