<wxs src="../../../utils/format.wxs" module="format" />
<view class="container">
  <view class="top"> 
  <view class="profile-info" bindtap="goLogin">
    <image class="avatar" src="{{userInfo.avatarUrl}}"></image>
    <view class="info">
      <text class="name" style="margin-top:0rpx">{{userInfo.nickName}}</text>
      <text class="cert">{{userInfo.mobile}}</text>
      <button  wx:if="{{userInfo.avatarUrl=='/static/images/my.png'}}"   bindtap="getUserProfile"  class="plus">完善信息</button>  
    </view>   
  </view>  
</view> 
<view class="row" wx:for="{{list}}" wx:key="id">
  <view class="title">
    <view class="left">工单号:{{item.bookNo}}</view>
    <view class="right">时间:{{item.createTime}}</view>
  </view>
  <view class="content" wx:for="{{item.items}}" wx:for-item='detail' wx:key='*this'>
    <view class="category">服务项:{{detail.categoryName}}</view>
    <view class="device">
      {{detail.deviceName}}
      <span wx:if="{{detail.positionName}}">(</span> 
      <span>{{detail.positionName}}</span> 
      <span wx:if="{{detail.positionName}}">)</span> 
    </view>
    
    <view class="problem">
      <view class="item" wx:for="{{detail.problemsName}}" wx:for-item='problem'  wx:key='*this'>{{problem}}</view> 
    </view> 
    <view class="problem">
      <image class="img" src="{{pic}}" wx:for="{{detail.picUrls}}" wx:for-item='pic'  wx:key='*this'/>   
    </view> 

  </view>

  <view class="edit-pre"  data-bookno="{{item.bookNo}}" bindtap="editPre" wx:if="{{format.substrDate(item.createTime)==today}}">编辑</view>
 
</view>
  

</view>