Browse Source

fix: 资金流水列宽调整 & 客服浮标非工作时间确认后直接拉起会话

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
skyline 3 ngày trước cách đây
mục cha
commit
c7c5a43e68

+ 2 - 2
admin-web/src/views/admin/finance/wallet-flow.vue

@@ -272,7 +272,7 @@ const state = reactive({
       {label: '用户ID', prop: 'userId', width: 120, resizable: true, fixed: 'left'},
       {label: '用户手机号', prop: 'mobilePhone', width: 140, resizable: true, fixed: 'left'},
       {label: '交易类型', prop: 'type', width: 100, resizable: true},
-      {label: '订单号', prop: 'orderNo', width: 200, resizable: true},
+      {label: '订单号', prop: 'orderNo', width: 240, resizable: true},
       {label: '金额', prop: 'amount', width: 110, resizable: true},
       {label: '赠款金额', prop: 'grantsAmount', width: 110, resizable: true},
       {label: '手续费', prop: 'commission', width: 100, resizable: true},
@@ -282,7 +282,7 @@ const state = reactive({
       {label: '交易后赠款', prop: 'afterGrantsBalance', width: 120, resizable: true},
       {label: '交易时间', prop: 'transactionTime', width: 170, resizable: true, fixed: 'right'},
       {label: '状态', prop: 'status', width: 100, resizable: true},
-      {label: '备注', prop: 'remark', minWidth: 150, resizable: true},
+      {label: '备注', prop: 'remark', width: 100, resizable: true},
     ],
   },
 })

+ 17 - 17
car-wash-mp/src/components/custom-service/index.vue

@@ -12,14 +12,7 @@
       <view class="cs-button">
         <uv-icon name="kefu-ermai" color="#FFFFFF" size="24"></uv-icon>
       </view>
-      <button
-        v-if="showContactBtn"
-        class="contact-btn"
-        open-type="contact"
-        @contact="handleContact"
-        send-message-title="YesWash洗车客服"
-      />
-      <view v-else class="contact-btn contact-interceptor" @click.stop="handleIntercept" />
+      <view class="contact-btn" @click.stop="handleContactClick" />
     </movable-view>
   </movable-area>
 </template>
@@ -50,7 +43,6 @@ try {
 } catch {}
 
 const snapPos = ref({ x: dragX, y: dragY })
-const showContactBtn = ref(isInServiceHours())
 let windowInfo: any = null
 
 function getWindowInfo() {
@@ -77,7 +69,21 @@ function onTouchEnd() {
   uni.setStorageSync(POS_KEY, { x: snapX, y: snapY })
 }
 
-const handleIntercept = () => {
+const openCustomerService = () => {
+  // #ifdef MP-WEIXIN
+  wx.openCustomerServiceConversation({
+    sessionFrom: '',
+    showMessageCard: true,
+    sendMessageTitle: 'YesWash洗车客服'
+  })
+  // #endif
+}
+
+const handleContactClick = () => {
+  if (isInServiceHours()) {
+    openCustomerService()
+    return
+  }
   uni.showModal({
     title: '客服提示',
     content: '客服在线时间 9:30~21:30,当前留言可能会延迟回复',
@@ -85,13 +91,11 @@ const handleIntercept = () => {
     confirmText: '继续留言',
     success: (res) => {
       if (res.confirm) {
-        showContactBtn.value = true
+        openCustomerService()
       }
     }
   })
 }
-
-const handleContact = () => {}
 </script>
 
 <style scoped lang="scss">
@@ -142,8 +146,4 @@ const handleContact = () => {}
   padding: 0;
   margin: 0;
 }
-
-.contact-interceptor {
-  opacity: 0;
-}
 </style>