소스 검색

更新 二次分享

wzh 3 년 전
부모
커밋
f1053dd331

+ 1 - 3
miniprogram/app.json

@@ -5,7 +5,6 @@
     "pages/me/me",
     "pages/login/login",
     "pages/voyages/detail/detail",
-    "pages/share/sharePage",
     "pages/sharePage/sharePage"
   ],
   "window": {
@@ -16,8 +15,7 @@
     "navigationBarTextStyle": "black"
   },
   "tabBar": {
-    "list": [
-      {
+    "list": [{
         "pagePath": "pages/index/index",
         "text": "首页",
         "iconPath": "images/tabBar/index.png",

+ 0 - 44
miniprogram/pages/share/sharePage.js

@@ -1,44 +0,0 @@
-// pages/share/sharePage.js
-import {
-  postApi
-} from "../../apis/api"
-Page({
-  data: {
-    markers: [{
-      id: 999,
-      latitude: '',
-      longitude: '',
-      iconPath: "https://6875-huihenduo-2gx127w7f837b584-1255802371.tcb.qcloud.la/miniapp-static/red-circle.png?sign=6d208881376358fb4111aa6d7f1a7846&t=1647934972",
-      height: 20,
-      width: 20
-    }],
-    latitude: 31.891992,
-    longitude: 120.551369,
-  },
-
-  async getVoyageDetail(voyageId) {
-    let res = await postApi("/voyage/share", {
-      voyageId
-    })
-    // res.data.result.transInfos.forEach(item => {
-    //   item.createTime = this.subTimeStr(item.createTime)
-    // })
-    // res.data.result.loadingInfos.forEach(item => {
-    //   item.createTime = this.subTimeStr(item.createTime)
-    // })
-    this.setData({
-      ...res.data.result
-    })
-
-  },
-
-  subTimeStr(str) {
-    if (!str || typeof str != "string") return;
-    let index = str.indexOf(" ");
-    return str.substring(0, index);
-  },
-
-  onLoad(options) {
-    this.getVoyageDetail(options.id)
-  },
-})

+ 0 - 3
miniprogram/pages/share/sharePage.json

@@ -1,3 +0,0 @@
-{
-  "usingComponents": {}
-}

+ 0 - 68
miniprogram/pages/share/sharePage.wxml

@@ -1,68 +0,0 @@
-<map scale="8" latitude="{{latitude}}" longitude="{{longitude}}" markers="{{markers}}" style="width: 100%;height: 400rpx;" name="map"></map>
-<view class="card">
-  <view style="padding: 10rpx 0;border-bottom: 4rpx solid #ddd;">{{shipName}}</view>
-  <view>
-    <view class="df aic mt30 fz28 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 mt30 fz28 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 style="position: relative;">
-  <scroll-view class="card" scroll-y="true" style="height:calc(100vh - 730rpx);position: relative;z-index: 20;" lower-threshold="50">
-    <view class="{{['df','mb20','mb50']}}" style="position: relative;z-index: 2;">
-      <view class="{{['mr30','title-circle']}}" style="background: green;"></view>
-      <view class="text">
-        <view class="card-title">卸货港</view>
-        <view class="in-text df">
-          <view style="width: 250rpx;margin-right: 30rpx;">沙市</view>
-          <view>预计到港时间{{expectedArrivalTime}}</view>
-        </view>
-      </view>
-    </view>
-    <view class="{{['df','mb20',index==transInfos.length-1?'mb50':'']}}" style="position: relative;z-index: 2;" wx:for="{{transInfos}}" wx:key="index">
-      <view class="{{['mr30',index==0?'title-circle transInfos':'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 class="{{['df','mb20',index==loadingInfos.length-1?'mb50':'']}}" 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 class="{{['df','mb20','mb50']}}" 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>
-  </scroll-view>
-  <view class="long-line"></view>
-
-</view>

+ 0 - 69
miniprogram/pages/share/sharePage.wxss

@@ -1,69 +0,0 @@
-page {
-  box-sizing: border-box;
-}
-
-.item {
-  padding: 0 20rpx;
-  width: 50%;
-}
-
-.item>view {
-  width: 90rpx;
-  text-align: justify;
-  text-align-last: justify;
-  margin-right: 16rpx;
-}
-
-.card {
-  padding: 20rpx 30rpx;
-  border: 2rpx solid #ddd;
-  width: 95%;
-  margin: 20rpx auto;
-  border-radius: 20rpx;
-  box-shadow: 3rpx 1rpx 5px #ddd;
-}
-
-.circle {
-  width: 20rpx;
-  height: 20rpx;
-  border-radius: 50%;
-  background: #999;
-  position: relative;
-  left: 4rpx;
-  margin-right: 38rpx;
-  z-index: 20;
-}
-
-.title-circle {
-  width: 28rpx;
-  height: 28rpx;
-  border-radius: 50%;
-  background: #999;
-  position: relative;
-  z-index: 20;
-}
-
-
-.in-text {
-  font-size: 22rpx;
-  color: #666;
-}
-
-.long-line {
-  border: 2rpx solid #ddd;
-  height: calc(100vh - 780rpx);
-  position: absolute;
-  left: 62rpx;
-  top: 24rpx;
-  z-index: 0;
-}
-
-.card-title {
-  font-size: 26rpx;
-  margin-bottom: 8rpx;
-  line-height: 30rpx;
-}
-
-.transInfos {
-  background: rgb(197, 56, 56);
-}

+ 1 - 1
miniprogram/pages/sharePage/sharePage.js

@@ -247,7 +247,7 @@ Page({
     let id = wx.getStorageSync('voyageDetailId')
     return {
       title: '真实 实时 精准',
-      path: `/pages/share/sharePage?id=${id}`
+      path: `/pages/sharePage/sharePage?id=${id}`
     }
   },