Pārlūkot izejas kodu

新增 日期bar组件

王智慧 3 gadi atpakaļ
vecāks
revīzija
88b429d997

+ 2 - 1
miniprogram/app.json

@@ -68,7 +68,8 @@
   "useExtendedLib": {},
   "usingComponents": {
     "RemotePicker": "/components/remotePicker/remotePicker",
-    "NewPicker": "/components/newPicker/newPicker"
+    "NewPicker": "/components/newPicker/newPicker",
+    "DateBar": "/components/dateBar/dateBar"
   },
   "sitemapLocation": "sitemap.json",
   "style": "v2"

+ 23 - 0
miniprogram/components/dateBar/dateBar.js

@@ -0,0 +1,23 @@
+// components/dateBar/dateBar.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    timer: new Date().toJSON().substring(0, 10)
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+
+  }
+})

+ 4 - 0
miniprogram/components/dateBar/dateBar.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 3 - 0
miniprogram/components/dateBar/dateBar.wxml

@@ -0,0 +1,3 @@
+<view class="timer" style=" width: 100vw;height: 80rpx;background: #0089FD;font-size: 28rpx;font-family: PingFangSC-Medium, PingFang SC;font-weight: 500;color: #FFFFFF;line-height: 80rpx;text-align: center;margin-bottom: 32rpx;">
+  今日日期: {{timer}}
+</view>

+ 0 - 0
miniprogram/components/dateBar/dateBar.wxss


+ 0 - 1
miniprogram/pages/shipOwnerManage/shipOwnerList/shipOwnerList.js

@@ -10,7 +10,6 @@ Page({
     shipOwnerList: [],
     term: '',
     currentLetter: '',
-    timer: new Date().toJSON().substring(0, 10)
   },
   async getShipOwnerList(type) {
     if (!wx.getStorageSync('loginAccountId')) {

+ 1 - 3
miniprogram/pages/shipOwnerManage/shipOwnerList/shipOwnerList.wxml

@@ -1,6 +1,4 @@
-<view class="timer">
-  今日日期: {{ timer}}
-</view>
+<DateBar></DateBar>
 <view class="df aic func">
   <view class="search df aic">
     <input model:value="{{term}}" confirm-type="search" bindconfirm="getShipOwnerList" type="text" placeholder="搜索船东" placeholder-class="placeholder" />

+ 7 - 0
project.private.config.json

@@ -36,6 +36,13 @@
           "query": "",
           "launchMode": "default",
           "scene": null
+        },
+        {
+          "name": "",
+          "pathName": "pages/index/declarePort/voyageList",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
         }
       ]
     }