Ver Fonte

fix: 修复企业小程序订单详情页问题

- 注释"查看详细打卡记录"按钮(临时隐藏)
- 修复返回按钮功能(使用 Taro.navigateBack)
- 修复订单状态标签在移动端换行问题(添加 whitespace-nowrap)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
yourname há 3 semanas atrás
pai
commit
fb5884c14f
1 ficheiros alterados com 9 adições e 7 exclusões
  1. 9 7
      mini/src/pages/yongren/order/detail/index.tsx

+ 9 - 7
mini/src/pages/yongren/order/detail/index.tsx

@@ -325,9 +325,10 @@ const OrderDetail: React.FC = () => {
 
 
 
-  const handleViewCheckinDetails = () => {
-    setShowCheckinCalendar(true)
-  }
+  // 临时注释:查看详细打卡记录功能
+  // const handleViewCheckinDetails = () => {
+  //   setShowCheckinCalendar(true)
+  // }
 
   // 获取打卡日历数据
   const getCheckinCalendarData = () => {
@@ -451,7 +452,7 @@ const OrderDetail: React.FC = () => {
         border={true}
         fixed={true}
         placeholder={true}
-        onClickLeft={() => console.log('返回')}
+        onClickLeft={() => Taro.navigateBack()}
       />
       <ScrollView
         className="h-screen overflow-y-auto px-4 pb-4 pt-0"
@@ -478,7 +479,7 @@ const OrderDetail: React.FC = () => {
               <Text className="text-xl font-bold text-gray-800">{order.name}</Text>
               <Text className="text-sm text-gray-500 mt-1">订单编号: {order.orderNumber}</Text>
             </View>
-            <Text className={`text-xs px-2 py-1 rounded-full ${order.statusClass}`}>
+            <Text className={`text-xs px-2 py-1 rounded-full whitespace-nowrap ${order.statusClass}`}>
               {order.statusLabel}
             </Text>
           </View>
@@ -566,9 +567,10 @@ const OrderDetail: React.FC = () => {
               <Text className="text-lg font-bold text-green-600">100%</Text>
             </View>
           </View>
-          <View className="flex items-center text-blue-500 text-sm" onClick={handleViewCheckinDetails}>
+          {/* 临时注释:查看详细打卡记录按钮 */}
+          {/* <View className="flex items-center text-blue-500 text-sm" onClick={handleViewCheckinDetails}>
             <Text>查看详细打卡记录</Text>
-          </View>
+          </View> */}
         </View>
 
         {/* 关联人才卡片 */}