Przeglądaj źródła

首页行事历

xiaohaizhao 3 miesięcy temu
rodzic
commit
1ca1c8e443

+ 2 - 1
pages/tabbar/home/index.json

@@ -1,6 +1,7 @@
 {
     "usingComponents": {
-        "van-notice-bar": "@vant/weapp/notice-bar/index"
+        "van-notice-bar": "@vant/weapp/notice-bar/index",
+        "waitToBeDone":"./waitToBeDone"
     },
     "navigationStyle": "custom"
 }

+ 1 - 0
pages/tabbar/home/index.wxml

@@ -35,4 +35,5 @@
         </view>
     </block>
 </view>
+<waitToBeDone />
 <view style="height: 160rpx;" />

+ 42 - 0
pages/tabbar/home/waitToBeDone/index.js

@@ -0,0 +1,42 @@
+Component({
+    properties: {
+
+    },
+    data: {
+        tasks: [{
+                id: 1,
+                title: '参加扬州大学附属医院产品推介会',
+                date: '2025-12-15'
+            },
+            {
+                id: 2,
+                title: '跟台上海天伦医院手术3场',
+                date: '2025-12-15'
+            }
+        ],
+        records: [{
+                id: 1,
+                title: '参加扬州大学附属医院产品推介会',
+                date: '2025-12-15'
+            },
+            {
+                id: 2,
+                title: '跟台上海天伦医院手术3场',
+                date: '2025-12-15'
+            }
+        ],
+    },
+    methods: {
+        handleCalendarLoad(e) {
+            console.log("加载", e)
+            // 1. 拿到今日日期 把年月记录到data中
+            // 2. 获取当月数据给日期打标记
+            // 3. 获取当日数据
+        },
+        handleCalendarDateChange(e) {
+            console.log("切换日期", e)
+            // 1. 获取当日数据
+            // 2. 判断选中日的年月是否与data中的相同;不相同获取当月数据打标记
+        }
+    }
+})

+ 6 - 0
pages/tabbar/home/waitToBeDone/index.json

@@ -0,0 +1,6 @@
+{
+    "component": true,
+    "usingComponents": {
+        "calendar": "/components/wx-calendar/index"
+    }
+}

+ 33 - 0
pages/tabbar/home/waitToBeDone/index.scss

@@ -0,0 +1,33 @@
+.section {
+	margin: 20rpx;
+	background-color: white;
+	border-radius: 10rpx;
+	padding: 20rpx;
+	box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
+
+	.section-title {
+		font-size: 32rpx;
+		color: #333;
+		margin-bottom: 10rpx;
+	}
+
+	.section-date {
+		font-size: 28rpx;
+		color: #999;
+		margin-bottom: 10rpx;
+	}
+}
+
+.task-item,
+.record-item {
+	margin-bottom: 15rpx;
+	padding: 15rpx;
+	border-left: 5rpx solid #ff3b30;
+	background-color: #fff8f8;
+	border-radius: 6rpx;
+}
+
+.record-item {
+	border-left-color: #007AFF;
+	background-color: #f0f8ff;
+}

+ 22 - 0
pages/tabbar/home/waitToBeDone/index.wxml

@@ -0,0 +1,22 @@
+<view class="">
+	<calendar id="calendar" _vibrate='{{false}}' view='week' bindload="handleCalendarLoad" binddatechange="handleCalendarDateChange">
+		<!-- 任务列表 -->
+		<view class="section">
+			<view class="section-title">任务</view>
+			<view class="section-date">{{ selectedDate }}</view>
+			<view wx:for="{{ tasks }}" wx:key="id" class="task-item">
+				<text class="task-text">{{ item.title }}</text>
+			</view>
+		</view>
+
+		<!-- 跟进记录 -->
+		<view class="section">
+			<view class="section-title">跟进记录</view>
+			<view class="section-date">{{ selectedDate }}</view>
+			<view wx:for="{{ records }}" wx:key="id" class="record-item">
+				<text class="record-text">{{ item.title }}</text>
+			</view>
+		</view>
+
+	</calendar>
+</view>

+ 9 - 2
project.private.config.json

@@ -10,12 +10,19 @@
     "condition": {
         "miniprogram": {
             "list": [
+                {
+                    "name": "首页",
+                    "pathName": "pages/tabbar/home/index",
+                    "query": "",
+                    "scene": null,
+                    "launchMode": "default"
+                },
                 {
                     "name": "prsx/select/docter/index",
                     "pathName": "prsx/select/docter/index",
                     "query": "params=%7B%22content%22%3A%7B%22sa_customersid%22%3A6737%2C%22pageNumber%22%3A1%2C%22pageSize%22%3A20%2C%22where%22%3A%7B%22condition%22%3A%22%22%7D%7D%2C%22id%22%3A2025102310134602%7D&radio=true&result=%5B%22%22%5D&value=%5B%22%22%2C%5B%22%22%5D%5D",
-                    "scene": null,
-                    "launchMode": "default"
+                    "launchMode": "default",
+                    "scene": null
                 },
                 {
                     "name": "prsx/dealer/Salesperson/insert",