소스 검색

更新 获取手机号登录按钮组件;更新 接口参数

wzh 3 년 전
부모
커밋
ebdc479b13

+ 2 - 15
miniprogram/components/getPhoneButton/getPhoneButton.js

@@ -35,21 +35,7 @@ Component({
             openId: wx.getStorageSync('openId'),
             phone
           })
-          if (res.data.status == 0) {
-            let data = res.data.result
-            Object.keys(data).forEach(function (key) {
-              wx.setStorageSync(key, data[key])
-            })
-            wx.switchTab({
-              url: '/pages/index/index',
-            })
-
-          } else {
-            wx.showToast({
-              icon: "none",
-              title: res.data.msg
-            })
-          }
+          this.triggerEvent('loginEvent', res)
         } else {
           wx.showToast({
             title: '请授权以登录',
@@ -57,6 +43,7 @@ Component({
           })
         }
       } catch (error) {
+        console.log(error)
         wxSetSessionKey()
         wx.showToast({
           icon: "none",

+ 3 - 1
miniprogram/components/voyages/voyages.js

@@ -76,7 +76,9 @@ Component({
         term: this.data.term,
         status: this.data.status,
         currentPage: this.data.currentPage,
-        size: this.data.size
+        size: this.data.size,
+        isClient: wx.getStorageSync('isClient'),
+
       })
       this.setData({
         currentPage: this.data.currentPage,

+ 4 - 1
miniprogram/pages/index/index.js

@@ -9,8 +9,10 @@ Page({
     indexInfo: {},
   },
   async getIndexInfo() {
+    if (wx.getStorageSync('isClient')) return
     let res = await postApi('/voyage/index', {
-      cargoOwnerId: wx.getStorageSync('cargoOwnerId')
+      cargoOwnerId: wx.getStorageSync('cargoOwnerId'),
+      isClient: wx.getStorageSync('isClient'),
     })
     this.setData({
       indexInfo: res.data.result
@@ -23,6 +25,7 @@ Page({
     wx.removeStorageSync('voyageDetailId')
   },
   onShow() {
+    if (wx.getStorageSync('isClient')) return
     if (wx.getStorageSync('voyageDetailId')) return
     wx.removeStorageSync('voyageDetailId')
     let cargoOwnerId = wx.getStorageSync('cargoOwnerId')

+ 27 - 0
miniprogram/pages/me/me.js

@@ -13,6 +13,33 @@ Page({
   },
   async getCargoOwnerInfo() {
 
+  },
+  loginEvent(e) {
+    let res = e.detail
+    console.log(res)
+    if (res.data.status == 0) {
+      let data = res.data.result
+      if (!data.isClient) {
+        Object.keys(data).forEach(function (key) {
+          wx.setStorageSync(key, data[key])
+        })
+        wx.switchTab({
+          url: '/pages/index/index',
+        })
+      } else {
+        wx.showToast({
+          icon: "none",
+          title: '暂无权限'
+        })
+      }
+
+
+    } else {
+      wx.showToast({
+        icon: "none",
+        title: res.data.msg
+      })
+    }
   },
   onShow() {
     let cargoOwnerCompany = wx.getStorageSync('cargoOwnerCompany')

+ 1 - 1
miniprogram/pages/me/me.wxml

@@ -22,7 +22,7 @@
   <view style="margin-top: 100rpx;font-size: 50rpx;color: #333;text-align: center;">汇很多运输管家先行版
   </view>
   <view class="df jcc" style="position:absolute;bottom: 15vh;width: 100%;">
-    <PhoneButton type="primary">登录</PhoneButton>
+    <PhoneButton type="primary" bindloginEvent="loginEvent">登录</PhoneButton>
   </view>
   <!-- <button bindtap="goExp">去体验</button> -->
 </block>

+ 46 - 8
miniprogram/pages/sharePage/sharePage.js

@@ -4,6 +4,7 @@ import {
 } from "../../apis/api"
 Page({
   data: {
+    isLogin: false,
     id: '',
     tab: 2,
     shipDischargeCurrentPage: 1,
@@ -42,6 +43,8 @@ Page({
   async getVoyageDetail() {
     let res = await postApi("/voyage/detail", {
       voyageId: this.data.id,
+      isClient: wx.getStorageSync('isClient'),
+      loginAccountId: wx.getStorageSync('loginAccountId'),
     })
 
     let {
@@ -116,7 +119,9 @@ Page({
     let res = await postApi("/voyage/getCarLoadRecordList", {
       voyageId: this.data.id,
       size: this.data.pageSize,
-      currentPage: this.data.truckLoadCurrentPage
+      currentPage: this.data.truckLoadCurrentPage,
+      isClient: wx.getStorageSync('isClient'),
+      loginAccountId: wx.getStorageSync('loginAccountId')
     })
     this.setData({
       truckLoadCurrentPage: this.data.truckLoadCurrentPage,
@@ -160,7 +165,9 @@ Page({
     let res = await postApi("/voyage/getDischargeList", {
       voyageId: this.data.id,
       size: this.data.pageSize,
-      currentPage: this.data.shipDischargeCurrentPage
+      currentPage: this.data.shipDischargeCurrentPage,
+      isClient: wx.getStorageSync('isClient'),
+      loginAccountId: wx.getStorageSync('loginAccountId')
     })
     this.setData({
       shipDischargeCurrentPage: this.data.shipDischargeCurrentPage,
@@ -255,15 +262,39 @@ Page({
     }
   },
 
-  async getNewDetail(voyageId) {
+  async getNewDetail() {
     let res = await postApi("/voyage/share", {
-      voyageId
+      voyageId: this.data.id,
+      isClient: wx.getStorageSync('isClient'),
+      loginAccountId: wx.getStorageSync('loginAccountId'),
     })
     this.setData({
       ...res.data.result
     })
   },
 
+  loginEvent(e) {
+    let res = e.detail
+    if (res.data.status == 0) {
+      let data = res.data.result
+      Object.keys(data).forEach(function (key) {
+        wx.setStorageSync(key, data[key])
+      })
+      this.setData({
+        isLogin: true
+      })
+      this.getNewDetail()
+      this.getVoyageDetail()
+      this.getCarLoadRecordList()
+      this.getDischargeList()
+    } else {
+      wx.showToast({
+        icon: "none",
+        title: res.data.msg
+      })
+    }
+  },
+
 
   onLoad(options) {
     let {
@@ -273,9 +304,16 @@ Page({
     this.setData({
       id
     })
-    this.getNewDetail(id)
-    this.getVoyageDetail()
-    this.getCarLoadRecordList()
-    this.getDischargeList()
+    let loginAccountId = wx.getStorageSync('loginAccountId')
+    if (loginAccountId) {
+      this.setData({
+        isLogin: true
+      })
+      this.getNewDetail()
+      this.getVoyageDetail()
+      this.getCarLoadRecordList()
+      this.getDischargeList()
+    }
+
   },
 })

+ 3 - 1
miniprogram/pages/sharePage/sharePage.json

@@ -1,3 +1,5 @@
 {
-  "usingComponents": {}
+  "usingComponents": {
+    "PhoneButton": "/components/getPhoneButton/getPhoneButton"
+  }
 }

+ 130 - 120
miniprogram/pages/sharePage/sharePage.wxml

@@ -1,143 +1,153 @@
-<map enable-zoom="{{false}}" enable-scroll="{{false}}" markers="{{markers}}" include-points="{{points}}" style="width: 100%;height: 400rpx;" name="map"></map>
-<view class="df aic jcsb p20" style="border-bottom: 1px solid #999;border-top: 1px solid #999;">
-  <view class="tabsview" bindtap="changeTab" data-tab="{{2}}" style="color:{{tab==2?'#0d8fcc':''}};border-bottom:{{tab==2?'2rpx solid #0d8fcc':''}}">航次信息</view>
-  <view class="tabsview" bindtap="changeTab" data-tab="{{3}}" style="color:{{tab==3?'#0d8fcc':''}};border-bottom:{{tab==3?'2rpx solid #0d8fcc':''}}">单据信息</view>
-  <view class="tabsview" bindtap="changeTab" data-tab="{{4}}" style="color:{{tab==4?'#0d8fcc':''}};border-bottom:{{tab==4?'2rpx solid #0d8fcc':''}}">卸货信息</view>
-  <view class="tabsview" bindtap="changeTab" data-tab="{{5}}" style="color:{{tab==5?'#0d8fcc':''}};border-bottom:{{tab==5?'2rpx solid #0d8fcc':''}}">航次照片</view>
-</view>
-<view class="type2" wx:if="{{tab==2}}">
-  <view class="card">
-    <view style="padding: 10rpx 0;border-bottom: 4rpx solid #ddd;">{{shipName}}</view>
-    <view>
-      <view class="df aic mt20 fz24 c3">
-        <view class="df item">
-          <view>装货港</view> <text class="mr20">:</text> {{loadPort}}
-        </view>
-        <view class="df item">
-          <view>卸货港</view> <text class="mr20">:</text> {{discPort}}
-        </view>
-      </view>
-      <view class="df aic mt10 fz24 c3">
-        <view class="df item">
-          <view>货种</view> <text class="mr20">:</text> {{cargo}}
+<block wx:if="{{isLogin}}">
+  <map enable-zoom="{{false}}" enable-scroll="{{false}}" markers="{{markers}}" include-points="{{points}}" style="width: 100%;height: 400rpx;" name="map"></map>
+  <view class="df aic jcsb p20" style="border-bottom: 1px solid #999;border-top: 1px solid #999;">
+    <view class="tabsview" bindtap="changeTab" data-tab="{{2}}" style="color:{{tab==2?'#0d8fcc':''}};border-bottom:{{tab==2?'2rpx solid #0d8fcc':''}}">航次信息</view>
+    <view class="tabsview" bindtap="changeTab" data-tab="{{3}}" style="color:{{tab==3?'#0d8fcc':''}};border-bottom:{{tab==3?'2rpx solid #0d8fcc':''}}">单据信息</view>
+    <view class="tabsview" bindtap="changeTab" data-tab="{{4}}" style="color:{{tab==4?'#0d8fcc':''}};border-bottom:{{tab==4?'2rpx solid #0d8fcc':''}}">卸货信息</view>
+    <view class="tabsview" bindtap="changeTab" data-tab="{{5}}" style="color:{{tab==5?'#0d8fcc':''}};border-bottom:{{tab==5?'2rpx solid #0d8fcc':''}}">航次照片</view>
+  </view>
+  <view class="type2" wx:if="{{tab==2}}">
+    <view class="card">
+      <view style="padding: 10rpx 0;border-bottom: 4rpx solid #ddd;">{{shipName}}</view>
+      <view>
+        <view class="df aic mt20 fz24 c3">
+          <view class="df item">
+            <view>装货港</view> <text class="mr20">:</text> {{loadPort}}
+          </view>
+          <view class="df item">
+            <view>卸货港</view> <text class="mr20">:</text> {{discPort}}
+          </view>
         </view>
-        <view class="df item">
-          <view>吨位</view> <text class="mr20">:</text> {{tons}}
+        <view class="df aic mt10 fz24 c3">
+          <view class="df item">
+            <view>货种</view> <text class="mr20">:</text> {{cargo}}
+          </view>
+          <view class="df item">
+            <view>吨位</view> <text class="mr20">:</text> {{tons}}
+          </view>
         </view>
       </view>
     </view>
-  </view>
-  <view style="position: relative;">
-    <scroll-view class="card" scroll-y="true" style="height:calc(100vh - 760rpx);position: relative;z-index: 20;" lower-threshold="50">
-      <view class="{{['df','mb20','mb40']}}" style="position: relative;z-index: 2;">
-        <view class="{{['mr30','title-circle']}}" style="background: green;"></view>
-        <view class="text">
-          <view class="in-text df">
-            <view class="card-title" style="color:#000;width: 250rpx;margin-right: 30rpx;">卸货港</view>
-            <view class="card-title" style="color: #000;">{{arrivalDiscPortTime?"实际到港时间":"预计到港时间"}}</view>
-          </view>
-          <view class="in-text df">
-            <view style="width: 250rpx;margin-right: 30rpx;">{{discPort}}</view>
-            <view>{{arrivalDiscPortTime||expectedArrivalTime}}</view>
+    <view style="position: relative;">
+      <scroll-view class="card" scroll-y="true" style="height:calc(100vh - 760rpx);position: relative;z-index: 20;" lower-threshold="50">
+        <view class="{{['df','mb20','mb40']}}" style="position: relative;z-index: 2;">
+          <view class="{{['mr30','title-circle']}}" style="background: green;"></view>
+          <view class="text">
+            <view class="in-text df">
+              <view class="card-title" style="color:#000;width: 250rpx;margin-right: 30rpx;">卸货港</view>
+              <view class="card-title" style="color: #000;">{{arrivalDiscPortTime?"实际到港时间":"预计到港时间"}}</view>
+            </view>
+            <view class="in-text df">
+              <view style="width: 250rpx;margin-right: 30rpx;">{{discPort}}</view>
+              <view>{{arrivalDiscPortTime||expectedArrivalTime}}</view>
+            </view>
           </view>
         </view>
-      </view>
-      <view class="{{['df','mb20',index==transInfos.length-1?'mb40':'']}}" style="position: relative;z-index: 2;" wx:for="{{transInfos}}" wx:key="index">
-        <view class="{{['mr30',index==0?'title-circle transInfos':'circle',arrivalDiscPortTime?'greyback':'']}}"></view>
-        <view class="text">
-          <view wx:if="{{index==0}}" class="card-title">运输中</view>
-          <view class="in-text df">
-            <view style="width: 250rpx;margin-right: 30rpx;">{{item.createTime}}</view>
-            <view>{{item.province}}/{{item.city}}/{{item.district}}</view>
+        <view class="{{['df','mb20',index==transInfos.length-1?'mb40':'']}}" style="position: relative;z-index: 2;" wx:for="{{transInfos}}" wx:key="index">
+          <view class="{{['mr30',index==0?'title-circle transInfos':'circle',arrivalDiscPortTime?'greyback':'']}}"></view>
+          <view class="text">
+            <view wx:if="{{index==0}}" class="card-title">运输中</view>
+            <view class="in-text df">
+              <view style="width: 250rpx;margin-right: 30rpx;">{{item.createTime}}</view>
+              <view>{{item.province}}/{{item.city}}/{{item.district}}</view>
+            </view>
           </view>
         </view>
-      </view>
-      <view class="{{['df','mb20',index==loadingInfos.length-1?'mb40':'']}}" style="position: relative;z-index: 2;" wx:for="{{loadingInfos}}" wx:key="index">
-        <view class="{{['mr30',index==0?'title-circle':'circle']}}"></view>
-        <view class="text">
-          <view wx:if="{{index==0}}" class="card-title">装货中</view>
-          <view class="in-text df">
-            <view style="width: 250rpx;margin-right: 30rpx;">{{item.createTime}}</view>
-            <view>{{item.province}}/{{item.city}}/{{item.district}}</view>
+        <view class="{{['df','mb20',index==loadingInfos.length-1?'mb40':'']}}" style="position: relative;z-index: 2;" wx:for="{{loadingInfos}}" wx:key="index">
+          <view class="{{['mr30',index==0?'title-circle':'circle']}}"></view>
+          <view class="text">
+            <view wx:if="{{index==0}}" class="card-title">装货中</view>
+            <view class="in-text df">
+              <view style="width: 250rpx;margin-right: 30rpx;">{{item.createTime}}</view>
+              <view>{{item.province}}/{{item.city}}/{{item.district}}</view>
+            </view>
           </view>
         </view>
-      </view>
-      <view class="{{['df','mb20','mb40']}}" style="position: relative;z-index: 2;">
-        <view class="{{['mr30','title-circle']}}"></view>
-        <view class="text">
-          <view class="card-title">开航</view>
-          <view class="in-text df">
-            <view style="width: 250rpx;margin-right: 30rpx;">{{setSailTime}}</view>
-            <view></view>
+        <view class="{{['df','mb20','mb40']}}" style="position: relative;z-index: 2;">
+          <view class="{{['mr30','title-circle']}}"></view>
+          <view class="text">
+            <view class="card-title">开航</view>
+            <view class="in-text df">
+              <view style="width: 250rpx;margin-right: 30rpx;">{{setSailTime}}</view>
+              <view></view>
+            </view>
           </view>
         </view>
-      </view>
-    </scroll-view>
-    <view class="long-line"></view>
+      </scroll-view>
+      <view class="long-line"></view>
+    </view>
   </view>
-</view>
-<scroll-view wx:else scroll-y="true" style="height:calc(100vh - 494rpx);padding: 30rpx 50rpx;font-size: 28rpx;color:#222" lower-threshold="50" bindscrolltolower="test">
+  <scroll-view wx:else scroll-y="true" style="height:calc(100vh - 494rpx);padding: 30rpx 50rpx;font-size: 28rpx;color:#222" lower-threshold="50" bindscrolltolower="test">
 
 
-  <view wx:if="{{tab==3}}">
-    <view>保险单</view>
-    <view wx:for="{{policys}}" wx:key="index" style="text-align: center;">
-      <image data-src="{{item.viewUrl}}" bindtap="previewImage" src="{{item.viewUrl}}" style="width: 60%;height: 240rpx;" mode="aspectFit"></image>
-      <view wx:if="{{policys.length&&policys.length!=1}}" class="mt10 mb10" style="border-bottom: 2rpx solid #eee;"></view>
-    </view>
-    <view class="mt30 mb30" style="border-bottom: 2rpx solid #ccc;"></view>
-    <view>运单</view>
-    <view wx:for="{{waybills}}" wx:key="index" style="text-align: center;">
-      <image data-src="{{item.viewUrl}}" bindtap="previewImage" src="{{item.viewUrl}}" style="width: 60%;height: 240rpx;" mode="aspectFit"></image>
-      <view wx:if="{{waybills.length&&waybills.length!=1}}" class="mt10 mb10" style="border-bottom: 2rpx solid #eee;"></view>
-    </view>
-  </view>
-  <view wx:if="{{tab==4}}">
-    <view class="df aic jcsb pb20" style="border-bottom: 2rpx solid #ddd;">
-      <view bindtap="changeInfoType" data-type="ship" style="color:{{infoType=='ship'?'#0d8fcc':''}};border-bottom:{{infoType=='ship'?'2rpx solid #0d8fcc':''}}">船舶卸货记录</view>
-      <view bindtap="changeInfoType" data-type="truck" style="color:{{infoType=='truck'?'#0d8fcc':''}};border-bottom:{{infoType=='truck'?'2rpx solid #0d8fcc':''}}">汽车装货记录</view>
-    </view>
-    <view class="ship-discharge-list" wx:if="{{infoType=='ship'}}">
-      <view class="df aic jcsb mb20 mt10 fz22">
-        <view>卸货时间</view>
-        <view>卸货吨位</view>
-        <view>卸货件数</view>
-        <view>磅单</view>
+    <view wx:if="{{tab==3}}">
+      <view>保险单</view>
+      <view wx:for="{{policys}}" wx:key="index" style="text-align: center;">
+        <image data-src="{{item.viewUrl}}" bindtap="previewImage" src="{{item.viewUrl}}" style="width: 60%;height: 240rpx;" mode="aspectFit"></image>
+        <view wx:if="{{policys.length&&policys.length!=1}}" class="mt10 mb10" style="border-bottom: 2rpx solid #eee;"></view>
       </view>
-      <view wx:for="{{shipDischargeList}}" wx:key="index" class="df aic jcsb mb20 fz22">
-        <view>{{item.dischargeTime}}</view>
-        <view>{{item.dischargeTons||''}}</view>
-        <view>{{item.dischargePieces||''}}</view>
-        <view wx:if="{{item.files&&item.files.length}}" bindtap="previewImage" data-src="{{item.files[0].viewUrl}}" data-files="{{item.files}}">查看</view>
-        <view wx:else>暂无</view>
+      <view class="mt30 mb30" style="border-bottom: 2rpx solid #ccc;"></view>
+      <view>运单</view>
+      <view wx:for="{{waybills}}" wx:key="index" style="text-align: center;">
+        <image data-src="{{item.viewUrl}}" bindtap="previewImage" src="{{item.viewUrl}}" style="width: 60%;height: 240rpx;" mode="aspectFit"></image>
+        <view wx:if="{{waybills.length&&waybills.length!=1}}" class="mt10 mb10" style="border-bottom: 2rpx solid #eee;"></view>
       </view>
-      <view bindtap="scrollShip" class="bottom-text">{{shipDischargeTotal==0?'暂无数据':(shipDischargeTotal>pageSize*shipDischargeCurrentPage?'点击或滑动加载更多...':'已加载完毕')}}</view>
     </view>
-    <view class="truck-load-list" wx:if="{{infoType=='truck'}}">
-      <view class="df aic jcsb mb20 mt10 fz22">
-        <view>车号</view>
-        <view>毛重</view>
-        <view>皮重</view>
-        <view>净重</view>
-        <view>称重时间</view>
-        <view>单据</view>
+    <view wx:if="{{tab==4}}">
+      <view class="df aic jcsb pb20" style="border-bottom: 2rpx solid #ddd;">
+        <view bindtap="changeInfoType" data-type="ship" style="color:{{infoType=='ship'?'#0d8fcc':''}};border-bottom:{{infoType=='ship'?'2rpx solid #0d8fcc':''}}">船舶卸货记录</view>
+        <view bindtap="changeInfoType" data-type="truck" style="color:{{infoType=='truck'?'#0d8fcc':''}};border-bottom:{{infoType=='truck'?'2rpx solid #0d8fcc':''}}">汽车装货记录</view>
       </view>
-      <view wx:for="{{truckLoadList}}" wx:key="index" class="df aic jcsb mb20 fz22">
-        <view>{{item.carNum}}</view>
-        <view>{{item.grossWeight}}</view>
-        <view>{{item.tare}}</view>
-        <view>{{item.netWeight}}</view>
-        <view>{{item.weighTime}}</view>
-        <view wx:if="{{item.file}}" bindtap="previewImage" data-src="{{item.file.viewUrl}}">查看</view>
-        <view wx:else>暂无</view>
+      <view class="ship-discharge-list" wx:if="{{infoType=='ship'}}">
+        <view class="df aic jcsb mb20 mt10 fz22">
+          <view>卸货时间</view>
+          <view>卸货吨位</view>
+          <view>卸货件数</view>
+          <view>磅单</view>
+        </view>
+        <view wx:for="{{shipDischargeList}}" wx:key="index" class="df aic jcsb mb20 fz22">
+          <view>{{item.dischargeTime}}</view>
+          <view>{{item.dischargeTons||''}}</view>
+          <view>{{item.dischargePieces||''}}</view>
+          <view wx:if="{{item.files&&item.files.length}}" bindtap="previewImage" data-src="{{item.files[0].viewUrl}}" data-files="{{item.files}}">查看</view>
+          <view wx:else>暂无</view>
+        </view>
+        <view bindtap="scrollShip" class="bottom-text">{{shipDischargeTotal==0?'暂无数据':(shipDischargeTotal>pageSize*shipDischargeCurrentPage?'点击或滑动加载更多...':'已加载完毕')}}</view>
+      </view>
+      <view class="truck-load-list" wx:if="{{infoType=='truck'}}">
+        <view class="df aic jcsb mb20 mt10 fz22">
+          <view>车号</view>
+          <view>毛重</view>
+          <view>皮重</view>
+          <view>净重</view>
+          <view>称重时间</view>
+          <view>单据</view>
+        </view>
+        <view wx:for="{{truckLoadList}}" wx:key="index" class="df aic jcsb mb20 fz22">
+          <view>{{item.carNum}}</view>
+          <view>{{item.grossWeight}}</view>
+          <view>{{item.tare}}</view>
+          <view>{{item.netWeight}}</view>
+          <view>{{item.weighTime}}</view>
+          <view wx:if="{{item.file}}" bindtap="previewImage" data-src="{{item.file.viewUrl}}">查看</view>
+          <view wx:else>暂无</view>
+        </view>
+        <view bindtap="scrollTruck" class="bottom-text">{{truckLoadTotal==0?'暂无数据':(truckLoadTotal>pageSize*truckLoadCurrentPage?'点击或滑动加载更多...':'已加载完毕')}}</view>
       </view>
-      <view bindtap="scrollTruck" class="bottom-text">{{truckLoadTotal==0?'暂无数据':(truckLoadTotal>pageSize*truckLoadCurrentPage?'点击或滑动加载更多...':'已加载完毕')}}</view>
     </view>
-  </view>
-  <view wx:if="{{tab==5}}">
-    <view wx:for="{{medias}}" wx:key="index" style="margin-bottom:50rpx;">
-      <view style="color: #0c81b8;padding-bottom: 10rpx;margin-bottom: 20rpx; border-bottom: 4rpx dashed rgb(197, 194, 194);">{{item.createTime}}</view>
-      <image data-src="{{item.viewUrl}}" bindtap="previewImage" src="{{item.viewUrl}}" style="width: 90%;" mode="aspectFit"></image>
+    <view wx:if="{{tab==5}}">
+      <view wx:for="{{medias}}" wx:key="index" style="margin-bottom:50rpx;">
+        <view style="color: #0c81b8;padding-bottom: 10rpx;margin-bottom: 20rpx; border-bottom: 4rpx dashed rgb(197, 194, 194);">{{item.createTime}}</view>
+        <image data-src="{{item.viewUrl}}" bindtap="previewImage" src="{{item.viewUrl}}" style="width: 90%;" mode="aspectFit"></image>
+      </view>
     </view>
+  </scroll-view>
+</block>
+<block wx:else>
+  <image style="margin:0 auto;display:block;width: 400rpx;margin-top: 10vh;height: 140rpx;" mode="aspectFit" src="https://6875-huihenduo-2gx127w7f837b584-1255802371.tcb.qcloud.la/miniapp-static/%E6%B1%87%E5%BE%88%E5%A4%9Alogo-%E5%B7%A6%E5%8F%B3.png?sign=fcd18f89de727b0193395cd2d44a730a&t=1647417257"></image>
+  <view style="margin-top: 100rpx;font-size: 50rpx;color: #333;text-align: center;">汇很多运输管家先行版
+  </view>
+  <view class="df jcc" style="position:absolute;bottom: 15vh;width: 100%;">
+    <PhoneButton type="primary" bindloginEvent="loginEvent">登录以查看分享</PhoneButton>
   </view>
-</scroll-view>
+</block>

+ 8 - 2
miniprogram/pages/voyages/detail/detail.js

@@ -42,6 +42,8 @@ Page({
   async getVoyageDetail() {
     let res = await postApi("/voyage/detail", {
       voyageId: this.data.id,
+      isClient: wx.getStorageSync('isClient'),
+      loginAccountId: wx.getStorageSync('loginAccountId'),
     })
 
     let {
@@ -118,7 +120,9 @@ Page({
     let res = await postApi("/voyage/getCarLoadRecordList", {
       voyageId: this.data.id,
       size: this.data.pageSize,
-      currentPage: this.data.truckLoadCurrentPage
+      currentPage: this.data.truckLoadCurrentPage,
+      isClient: wx.getStorageSync('isClient'),
+      loginAccountId: wx.getStorageSync('loginAccountId')
     })
     this.setData({
       truckLoadCurrentPage: this.data.truckLoadCurrentPage,
@@ -162,7 +166,9 @@ Page({
     let res = await postApi("/voyage/getDischargeList", {
       voyageId: this.data.id,
       size: this.data.pageSize,
-      currentPage: this.data.shipDischargeCurrentPage
+      currentPage: this.data.shipDischargeCurrentPage,
+      isClient: wx.getStorageSync('isClient'),
+      loginAccountId: wx.getStorageSync('loginAccountId')
     })
     this.setData({
       shipDischargeCurrentPage: this.data.shipDischargeCurrentPage,

+ 2 - 1
miniprogram/pages/voyages/voyages.js

@@ -4,10 +4,11 @@ Page({
   data: {
 
   },
-  onLoad(){
+  onLoad() {
     wx.removeStorageSync('voyageDetailId')
   },
   onShow: function (options) {
+    if (wx.getStorageSync('isClient')) return
     if (wx.getStorageSync('voyageDetailId')) return
     wx.removeStorageSync('voyageDetailId')
     const child = this.selectComponent('.voyages');

+ 0 - 1
project.private.config.json

@@ -47,7 +47,6 @@
     "lazyloadPlaceholderEnable": false,
     "preloadBackgroundData": false,
     "autoAudits": false,
-    "useMultiFrameRuntime": true,
     "showShadowRootInWxmlPanel": true,
     "useStaticServer": true,
     "showES6CompileOption": false,