Browse Source

修复bug

Huanyi 2 tuần trước cách đây
mục cha
commit
1ce7734eac

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "履约守护",
     "appid" : "__UNI__76F5C47",
     "description" : "履约守护",
-    "versionName" : "1.1.0",
-    "versionCode" : 10,
+    "versionName" : "1.1.1",
+    "versionCode" : 11,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 1 - 1
pages/mine/settings/auth/edit/index.vue

@@ -325,7 +325,7 @@ export default {
         uni.showLoading({ title: '提交中...' })
         await updateAuthInfo(submitData)
         uni.hideLoading()
-        uni.showToast({ title: '提交成功,等待审核', icon: 'success', duration: 1500 })
+        uni.showToast({ title: '提交成功,等待审核', icon: 'none', duration: 2000 })
         setTimeout(() => {
           uni.navigateBack({ delta: 1 })
         }, 1500)

+ 32 - 10
pages/orders/index.vue

@@ -59,10 +59,9 @@
                         </view>
                         <!-- 日期网格 -->
                         <view class="cal-body">
-                            <!-- Feb 2026 starts on Sunday (index 0), so no empty padding needed for first row -->
                             <view v-for="(day, idx) in calendarDays" :key="idx" class="cal-day-box"
-                                :class="getDateClass(day)" @click="selectDateItem(day)">
-                                <view class="cal-day-text">{{ day }}</view>
+                                :class="day ? getDateClass(day) : ''" @click="day && selectDateItem(day)">
+                                <view class="cal-day-text" v-if="day">{{ day }}</view>
                             </view>
                         </view>
                     </view>
@@ -159,7 +158,7 @@
                         <button class="btn normal danger" v-if="item.status === 2"
                             @click.stop="handleCancelOrder(item)">取消</button>
                         <button class="btn normal" @click.stop="reportAbnormal(item)">异常上报</button>
-                        <button class="btn primary" @click.stop="mainAction(item)">打卡</button>
+                        <button class="btn primary" @click.stop="mainAction(item)">到达打卡</button>
                     </view>
                 </view>
             </view>
@@ -289,7 +288,8 @@ export default {
             currentTypeFilterIdx: 0,
             activeDropdown: 0,
             hasTimeFilter: false,
-            currentMonth: '2026年2月',
+            currentMonth: '',
+            viewDate: new Date(),
             weekDays: ['日', '一', '二', '三', '四', '五', '六'],
             calendarDays: [],
             selectedDateRange: [],
@@ -636,15 +636,37 @@ export default {
             this.closeDropdown();
         },
         initCalendar() {
+            const year = this.viewDate.getFullYear();
+            const month = this.viewDate.getMonth();
+            this.currentMonth = `${year}年${month + 1}月`;
+
+            // 获取该月第一天是周几 (0-6)
+            const firstDay = new Date(year, month, 1).getDay();
+            // 获取该月有多少天
+            const daysInMonth = new Date(year, month + 1, 0).getDate();
+
             let days = [];
-            for (let i = 1; i <= 28; i++) {
+            // 填充开头的空白
+            for (let i = 0; i < firstDay; i++) {
+                days.push(0);
+            }
+            // 填充真实日期
+            for (let i = 1; i <= daysInMonth; i++) {
                 days.push(i);
             }
             this.calendarDays = days;
-            this.selectedDateRange = [2, 4];
         },
-        prevMonth() { uni.showToast({ title: '上个月', icon: 'none' }); },
-        nextMonth() { uni.showToast({ title: '下个月', icon: 'none' }); },
+        prevMonth() {
+            this.viewDate.setMonth(this.viewDate.getMonth() - 1);
+            // 切换月份时强制重新创建 Date 对象以触发 Vue 响应式(如果需要)或者简单调用 init
+            this.viewDate = new Date(this.viewDate);
+            this.initCalendar();
+        },
+        nextMonth() {
+            this.viewDate.setMonth(this.viewDate.getMonth() + 1);
+            this.viewDate = new Date(this.viewDate);
+            this.initCalendar();
+        },
         selectDateItem(day) {
             if (this.selectedDateRange.length === 2) {
                 this.selectedDateRange = [day];
@@ -662,7 +684,7 @@ export default {
             }
         },
         getDateClass(day) {
-            if (this.selectedDateRange.length === 0) return '';
+            if (!day || this.selectedDateRange.length === 0) return '';
             if (this.selectedDateRange.length === 1) {
                 return day === this.selectedDateRange[0] ? 'is-start' : '';
             }

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
unpackage/cache/wgt/__UNI__76F5C47/app-service.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
unpackage/cache/wgt/__UNI__76F5C47/manifest.json


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
unpackage/cache/wgt/__UNI__76F5C47/pages/mine/settings/auth/edit/index.css


BIN
unpackage/release/apk/__UNI__76F5C47__20260326182638.apk → unpackage/release/apk/__UNI__76F5C47__20260330181001.apk


+ 2 - 2
utils/request.js

@@ -46,7 +46,7 @@ export default function request(options = {}) {
       method: method.toUpperCase(),
       data,
       header: headers,
-	  timeout: 600000,
+      timeout: 600000,
       success: (res) => {
         console.log(res)
         const statusCode = res.statusCode
@@ -91,7 +91,7 @@ export default function request(options = {}) {
         resolve(res.data)
       },
       fail: (err) => {
-        uni.showToast({ title: '网络异常,请稍后重试', icon: 'none' })
+        uni.showToast({ title: '网络异常,请检查网络状态', icon: 'none' })
         reject(err)
       }
     })

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác