This commit is contained in:
2026-06-18 14:33:50 +08:00
commit 0e43ccec72
248 changed files with 30329 additions and 0 deletions

1
dist/pages/messages/index.js vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[781],{6430:function(e,s,a){var n=a(8870),t=a(1212),r=a(9379),i=a(467),c=a(5544),o=a(6540),l=a(758),u=a.n(l),m=a(118),v=a(7797),d=a(8324),_=a(6503),x=a(7377),h=a(326),p=a(7745),j=a(3401),f=a(4848);function g(e){var s=e.users,a=e.onSelect,n=e.onDiscover;return(0,f.jsx)(m.BM,{scrollX:!0,className:"active-user-row",showScrollbar:!1,children:(0,f.jsxs)(m.Ss,{className:"active-user-row__inner",children:[(0,f.jsxs)(m.Ss,{className:"active-user-row__item",onClick:n,children:[(0,f.jsx)(m.Ss,{className:"active-user-row__avatar-wrap active-user-row__add",children:(0,f.jsx)(j.A,{name:"plus",size:22})}),(0,f.jsx)(m.EY,{className:"active-user-row__name",children:"\u53d1\u73b0"})]}),s.map(function(e){return(0,f.jsxs)(m.Ss,{className:"active-user-row__item",onClick:function(){return null===a||void 0===a?void 0:a(e)},children:[(0,f.jsxs)(m.Ss,{className:"active-user-row__avatar-wrap",children:[(0,f.jsx)(p.A,{avatarKey:e.avatarKey,avatarUrl:e.avatarUrl,size:"lg",label:e.name}),e.live?(0,f.jsx)(m.EY,{className:"active-user-row__live",children:"LIVE"}):null]}),(0,f.jsx)(m.EY,{className:"active-user-row__name",children:e.name})]},e.id)})]})})}var w=g;function N(e){var s=e.conversation,a=e.onClick;return(0,f.jsxs)(m.Ss,{className:"conversation-item",onClick:a,children:[(0,f.jsx)(p.A,{avatarKey:s.avatarKey,avatarUrl:s.avatarUrl,size:"lg",online:s.online,petTag:"single"===s.type?"\ud83d\udc3e":void 0}),(0,f.jsxs)(m.Ss,{className:"conversation-item__main",children:[(0,f.jsxs)(m.Ss,{className:"conversation-item__top",children:[(0,f.jsxs)(m.Ss,{className:"conversation-item__name-row",children:[(0,f.jsx)(m.EY,{className:"conversation-item__name",children:s.title}),s.petName?(0,f.jsx)(m.EY,{className:"conversation-item__pet",children:s.petName}):null]}),(0,f.jsx)(m.EY,{className:"conversation-item__time",children:s.timeText})]}),(0,f.jsxs)(m.Ss,{className:"conversation-item__bottom",children:[(0,f.jsx)(m.EY,{className:"conversation-item__preview",children:s.preview}),s.pinned?(0,f.jsx)(m.Ss,{className:"conversation-item__pin",children:(0,f.jsx)(j.A,{name:"bookmark",size:12})}):s.unreadCount>0?(0,f.jsx)(m.EY,{className:"conversation-item__badge",children:s.unreadCount}):s.muted?(0,f.jsx)(m.Ss,{className:"conversation-item__muted"}):null]})]})]})}var S=N,A=a(9672),b=[{key:"all",label:"\u5168\u90e8"},{key:"unread",label:"\u672a\u8bfb"}];function C(){var e=(0,o.useState)("all"),s=(0,c.A)(e,2),a=s[0],n=s[1],p=(0,o.useState)([]),j=(0,c.A)(p,2),g=j[0],N=j[1],C=(0,o.useState)([]),E=(0,c.A)(C,2),k=E[0],y=E[1],Y=(0,o.useState)(""),U=(0,c.A)(Y,2),T=U[0],I=U[1],L=(0,o.useRef)(!0),z=function(){(0,A.VL)(a).then(function(e){N(e.activeUsers),y(e.conversations)})};(0,o.useEffect)(function(){z()},[a]),(0,l.useDidShow)(function(){L.current?L.current=!1:z()});var K=function(){var e=(0,i.A)((0,t.A)().m(function e(s){return(0,t.A)().w(function(e){while(1)switch(e.n){case 0:y(function(e){return e.map(function(e){return e._id===s._id?(0,r.A)((0,r.A)({},e),{},{unreadCount:0}):e})}),(0,A.vs)(s._id),u().navigateTo({url:"/pages/chat/index?conversationId=".concat(s._id,"&title=").concat(encodeURIComponent(s.title))});case 1:return e.a(2)}},e)}));return function(s){return e.apply(this,arguments)}}(),D=function(e){u().navigateTo({url:"/pages/chat/index?targetUserId=".concat(e.id,"&title=").concat(encodeURIComponent(e.name))})},R=function(){return u().navigateTo({url:"/pages/contacts/index"})},B=T.trim().toLowerCase(),J=B?k.filter(function(e){return e.title.toLowerCase().includes(B)||(e.preview||"").toLowerCase().includes(B)}):k;return(0,f.jsxs)(d.A,{className:"messages-page",children:[(0,f.jsx)(v.A,{title:"\u6d88\u606f"}),(0,f.jsx)(x.A,{placeholder:"\u641c\u7d22\u804a\u5929\u6216\u901a\u77e5",value:T,onInput:I}),(0,f.jsx)(h.A,{items:b,value:a,onChange:n}),B?null:(0,f.jsx)(w,{users:g,onSelect:D,onDiscover:R}),(0,f.jsx)(m.Ss,{className:"messages-page__divider",children:(0,f.jsx)(m.EY,{children:B?"\u641c\u7d22\u7ed3\u679c":"\u6700\u8fd1\u804a\u5929"})}),(0,f.jsxs)(m.Ss,{className:"messages-page__list",children:[J.map(function(e){return(0,f.jsx)(S,{conversation:e,onClick:function(){return K(e)}},e._id)}),0===J.length?(0,f.jsx)(m.EY,{className:"messages-page__empty",children:B?"\u6ca1\u6709\u5339\u914d\u7684\u804a\u5929":"unread"===a?"\u6ca1\u6709\u672a\u8bfb\u6d88\u606f":"\u8fd8\u6ca1\u6709\u804a\u5929\uff0c\u53bb\u300c\u53d1\u73b0\u300d\u627e\u6c6a\u53cb\u804a\u804a\u5427"}):null]}),(0,f.jsx)(_.A,{active:"messages"})]})}var E={navigationBarTitleText:"\u6d88\u606f",navigationStyle:"custom",disableScroll:!0},k=(0,n.eU)(C,"pages/messages/index",{root:{cn:[]}},E||{});C&&C.behaviors&&(k.behaviors=(k.behaviors||[]).concat(C.behaviors));Page(k)}},function(e){var s=function(s){return e(e.s=s)};e.O(0,[907,96,76],function(){return s(6430)});e.O()}]);

1
dist/pages/messages/index.json vendored Normal file
View File

@@ -0,0 +1 @@
{"navigationBarTitleText":"消息","navigationStyle":"custom","disableScroll":true,"usingComponents":{"comp":"../../comp"}}

2
dist/pages/messages/index.wxml vendored Normal file
View File

@@ -0,0 +1,2 @@
<import src="../../base.wxml"/>
<template is="taro_tmpl" data="{{root:root}}" />

1
dist/pages/messages/index.wxss vendored Normal file
View File

@@ -0,0 +1 @@
.active-user-row{-webkit-box-sizing:border-box;box-sizing:border-box;padding:24rpx 0 16rpx;width:100%}.active-user-row__inner{display:-ms-flexbox;display:flex;gap:24rpx;padding:0 40rpx}.active-user-row__item{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:12rpx}.active-user-row__avatar-wrap{position:relative}.active-user-row__add{border-radius:50%;display:-ms-flexbox;display:flex;height:108rpx;width:108rpx;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;background:rgba(216,180,255,.08);border:2rpx dashed rgba(216,180,255,.35);color:#d8b4ff;justify-content:center}.active-user-row__live{background:-webkit-gradient(linear,left top,right top,from(#d8b4ff),to(#ffb3c8));background:linear-gradient(90deg,#d8b4ff,#ffb3c8);border:3rpx solid #14102b;border-radius:12rpx;bottom:-4rpx;color:#2a1d10;font:700 18rpx/1.2 Inter,system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif;padding:4rpx 12rpx;position:absolute;right:-8rpx}.active-user-row__name{color:#c7b9e0;font:500 22rpx/1.2 Inter,system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif;max-width:120rpx;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:24rpx;padding:24rpx 40rpx;-webkit-transition:background .2s;transition:background .2s}.conversation-item:active{background:rgba(216,180,255,.06)}.conversation-item__main{-ms-flex:1;flex:1;min-width:0}.conversation-item__bottom,.conversation-item__name-row,.conversation-item__top{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.conversation-item__top{-ms-flex-pack:justify;justify-content:space-between}.conversation-item__name-row{gap:8rpx;min-width:0}.conversation-item__name{color:#f0e9ff;font:600 28rpx/1.2 Inter,system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-item__pet{color:#d8b4ff;font:500 22rpx/1 Inter,system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif}.conversation-item__time{color:#8a7aab;font:400 22rpx/1 Inter,system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif}.conversation-item__bottom{-ms-flex-pack:justify;gap:16rpx;justify-content:space-between;margin-top:12rpx}.conversation-item__preview{color:#c7b9e0;-ms-flex:1;flex:1;font:400 24rpx/1.3 Inter,system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-item__badge{background:#ffb3c8;border-radius:18rpx;-webkit-box-sizing:border-box;box-sizing:border-box;color:#2a1d10;font:700 20rpx/36rpx Inter,system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif;height:36rpx;min-width:36rpx;padding:0 12rpx;text-align:center}.conversation-item__muted{background:#8a7aab;border-radius:50%;height:16rpx;opacity:.4;width:16rpx}.conversation-item__pin{color:#ffd9a8}.messages-page__divider{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;color:#8a7aab;font:500 20rpx/1 Space Grotesk,Inter,system-ui,sans-serif;gap:20rpx;letter-spacing:.18em;padding:24rpx 40rpx 12rpx}.messages-page__divider::after{background:rgba(216,180,255,.08);content:"";-ms-flex:1;flex:1;height:2rpx}.messages-page__list{padding-bottom:24rpx}.messages-page__empty{color:#8a7aab;display:block;font:400 26rpx/1.6 Inter,system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif;padding:80rpx 48rpx;text-align:center}