Jelajahi Sumber

新增 突出显示上一次选择日报

王智慧 3 tahun lalu
induk
melakukan
bbb129db47

+ 3 - 0
miniprogram/components/voyageCard/voyageCard.js

@@ -6,6 +6,9 @@ Component({
   properties: {
     item: {
       type: Object
+    },
+    cardStyle:{
+      type:String
     }
   },
 

+ 1 - 1
miniprogram/components/voyageCard/voyageCard.wxml

@@ -1,4 +1,4 @@
-<view class="list">
+<view class="list" style="{{cardStyle}}">
   <view class="df jcsb aic" style="margin-bottom: 30rpx;">
     <view class="df aic">
       <image class="icon" src="../../images/newUI/ship-back.png"></image>

+ 4 - 2
miniprogram/pages/voyageManage/dailyVoyageList/dailyVoyageList.js

@@ -167,6 +167,7 @@ Page({
       id,
       trans
     } = e.currentTarget.dataset
+    wx.setStorageSync('currentDailyId', id)
     let url = ''
     switch (this.data.maintab) {
       case 1: {
@@ -246,11 +247,12 @@ Page({
     this.getList()
   },
   onLoad(option) {
-
+    wx.removeStorageSync('currentDailyId')
   },
   onShow(option) {
     this.setData({
-      loginAccountId: wx.getStorageSync('loginAccountId')
+      loginAccountId: wx.getStorageSync('loginAccountId'),
+      currentDailyId: wx.getStorageSync('currentDailyId')
     })
     this.getList()
   }

+ 1 - 1
miniprogram/pages/voyageManage/dailyVoyageList/dailyVoyageList.wxml

@@ -12,7 +12,7 @@
   <view class="tabsview" bindtap="changeStatus" data-status="{{2}}" data-islab="{{true}}" style="color:{{status==2?'#363F4A':'#9199A3'}};border-bottom:{{status==2?'6rpx solid #0089FD':''}}">提单</view>
 </view>
 <scroll-view bindrefresherrefresh="scrollDownList" refresher-triggered="{{isFreshing}}" refresher-enabled="{{true}}" scroll-y="true" bindscrolltolower="scrollList" style="height:calc(100vh - 140rpx);padding-bottom: 200rpx;">
-  <VoyageCard wx:for="{{list}}" wx:key="index" item="{{item}}" data-id="{{item.id}}" bindtap="goToDetail" data-index="{{index}}" data-medias="{{item.medias}}" data-trans="{{item.transStatusName}}">
+  <VoyageCard wx:for="{{list}}" wx:key="index" item="{{item}}" data-id="{{item.id}}" bindtap="goToDetail" data-index="{{index}}" data-medias="{{item.medias}}" data-trans="{{item.transStatusName}}" cardStyle="{{item.id==currentDailyId?'background:rgba(0,110,200,0.1)':''}}">
     <image mode="aspectFit" style="width: 40rpx;height: 40rpx;" catchtap="call" data-phone="{{item.shipOwnerPhone}}" src="../../../images/newUI/phone.png"></image>
   </VoyageCard>
   <!-- <view bindtap="scrollList" class="bottom-text">{{total==0?'暂无数据':(total>size*currentPage?'点击或滑动加载更多...':'已加载完毕')}}</view> -->