修改bug
This commit is contained in:
2
dist/app.js
vendored
2
dist/app.js
vendored
File diff suppressed because one or more lines are too long
2
dist/app.json
vendored
2
dist/app.json
vendored
@@ -1 +1 @@
|
||||
{"pages":["pages/plaza/index","pages/nearby/index","pages/publish/index","pages/messages/index","pages/profile/index","pages/profile-edit/index","pages/pet-edit/index","pages/chat/index","pages/contacts/index"],"window":{"navigationStyle":"custom","backgroundColor":"#14102b","backgroundTextStyle":"dark"},"tabBar":{"custom":true,"color":"#8a7aab","selectedColor":"#d8b4ff","backgroundColor":"#14102b","borderStyle":"black","list":[{"pagePath":"pages/plaza/index","text":"广场"},{"pagePath":"pages/nearby/index","text":"附近"},{"pagePath":"pages/messages/index","text":"消息"},{"pagePath":"pages/profile/index","text":"我的"}]},"permission":{"scope.userLocation":{"desc":"用于发现附近的毛孩子,以及在发布动态时标记位置"}},"requiredPrivateInfos":["chooseLocation","getLocation"],"lazyCodeLoading":"requiredComponents"}
|
||||
{"pages":["pages/plaza/index","pages/nearby/index","pages/publish/index","pages/messages/index","pages/profile/index","pages/profile-edit/index","pages/pet-edit/index","pages/chat/index","pages/contacts/index","pages/my-posts/index","pages/post-detail/index"],"window":{"navigationStyle":"custom","backgroundColor":"#14102b","backgroundTextStyle":"dark"},"tabBar":{"custom":true,"color":"#8a7aab","selectedColor":"#d8b4ff","backgroundColor":"#14102b","borderStyle":"black","list":[{"pagePath":"pages/plaza/index","text":"广场"},{"pagePath":"pages/nearby/index","text":"附近"},{"pagePath":"pages/messages/index","text":"汪友"},{"pagePath":"pages/profile/index","text":"我的"}]},"permission":{"scope.userLocation":{"desc":"用于发现附近的毛孩子,以及在发布动态时标记位置"}},"requiredPrivateInfos":["chooseLocation","getLocation"],"lazyCodeLoading":"requiredComponents"}
|
||||
2
dist/common.js
vendored
2
dist/common.js
vendored
File diff suppressed because one or more lines are too long
2
dist/common.wxss
vendored
2
dist/common.wxss
vendored
File diff suppressed because one or more lines are too long
2
dist/pages/contacts/index.js
vendored
2
dist/pages/contacts/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/pages/messages/index.js
vendored
2
dist/pages/messages/index.js
vendored
@@ -1 +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()}]);
|
||||
"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:"\u627e\u6c6a\u53cb"})]}),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?tab=discover"})},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:"\u6c6a\u53cb"}),(0,f.jsx)(x.A,{placeholder:"\u641c\u7d22\u6c6a\u53cb\u6216\u804a\u5929",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\u9644\u8fd1\u300d\u52a0\u6c6a\u53cb\u5427"}):null]}),(0,f.jsx)(_.A,{active:"messages"})]})}var E={navigationBarTitleText:"\u6c6a\u53cb",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()}]);
|
||||
2
dist/pages/messages/index.json
vendored
2
dist/pages/messages/index.json
vendored
@@ -1 +1 @@
|
||||
{"navigationBarTitleText":"消息","navigationStyle":"custom","disableScroll":true,"usingComponents":{"comp":"../../comp"}}
|
||||
{"navigationBarTitleText":"汪友","navigationStyle":"custom","disableScroll":true,"usingComponents":{"comp":"../../comp"}}
|
||||
1
dist/pages/my-posts/index.js
vendored
Normal file
1
dist/pages/my-posts/index.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[493],{8868:function(s,n,e){var t=e(8870),a=e(1212),c=e(9379),i=e(467),r=e(5544),o=e(6540),l=e(758),u=e.n(l),p=e(118),m=e(374),h=e(3401),d=e(3972),f=e(7896),_=e(4149),v=e(994),y=e(4848);function x(){var s=(0,m.v)(),n=s.statusBarHeight,e=(0,o.useState)([]),t=(0,r.A)(e,2),x=t[0],j=t[1],k=(0,o.useState)(!0),b=(0,r.A)(k,2),A=b[0],w=b[1],N=(0,v.d)(480),S=function(){w(!0),(0,_.hv)().then(j).finally(function(){return w(!1)})};(0,o.useEffect)(function(){S()},[]),(0,l.useDidShow)(S);var g=function(){var s=(0,i.A)((0,a.A)().m(function s(n){var e,t;return(0,a.A)().w(function(s){while(1)switch(s.n){case 0:if(e=x.map(function(s){if(s._id!==n)return s;var e=!s.likedByMe;return e&&N.show(),(0,c.A)((0,c.A)({},s),{},{likedByMe:e,counts:(0,c.A)((0,c.A)({},s.counts),{},{likes:Math.max(0,s.counts.likes+(e?1:-1))})})}),j(e),t=e.find(function(s){return s._id===n}),!t){s.n=1;break}return s.n=1,(0,_.O$)(n,t.likedByMe);case 1:return s.a(2)}},s)}));return function(n){return s.apply(this,arguments)}}();return(0,y.jsxs)(p.Ss,{className:"my-posts",children:[(0,y.jsx)(p.Ss,{className:"my-posts__nav",style:{paddingTop:"".concat(n,"px")},children:(0,y.jsxs)(p.Ss,{className:"my-posts__nav-row",children:[(0,y.jsx)(p.Ss,{className:"my-posts__back",onClick:function(){return u().navigateBack()},children:(0,y.jsx)(h.A,{name:"chev",size:22,className:"my-posts__back-icon"})}),(0,y.jsx)(p.EY,{className:"my-posts__title",children:"\u6211\u7684\u52a8\u6001"}),(0,y.jsx)(p.Ss,{className:"my-posts__nav-spacer"})]})}),(0,y.jsx)(p.BM,{scrollY:!0,className:"my-posts__scroll",enhanced:!0,showScrollbar:!1,children:(0,y.jsxs)(p.Ss,{className:"my-posts__feed",children:[x.map(function(s){return(0,y.jsx)(d.A,{post:s,onLike:g,onOpen:function(s){return u().navigateTo({url:"/pages/post-detail/index?postId=".concat(s)})}},s._id)}),A&&0===x.length?(0,y.jsx)(p.EY,{className:"my-posts__empty",children:"\u52a0\u8f7d\u4e2d\u2026"}):A||0!==x.length?null:(0,y.jsx)(p.EY,{className:"my-posts__empty",children:"\u8fd8\u6ca1\u6709\u53d1\u5e03\u8fc7\u52a8\u6001\uff0c\u53bb\u5e7f\u573a\u70b9 + \u53d1\u5e03\u7b2c\u4e00\u6761\u5427"})]})}),(0,y.jsx)(f.A,{visible:N.visible})]})}var j={},k=(0,t.eU)(x,"pages/my-posts/index",{root:{cn:[]}},j||{});x&&x.behaviors&&(k.behaviors=(k.behaviors||[]).concat(x.behaviors));Page(k)}},function(s){var n=function(n){return s(s.s=n)};s.O(0,[907,96,76],function(){return n(8868)});s.O()}]);
|
||||
1
dist/pages/my-posts/index.json
vendored
Normal file
1
dist/pages/my-posts/index.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"usingComponents":{"comp":"../../comp"}}
|
||||
2
dist/pages/my-posts/index.wxml
vendored
Normal file
2
dist/pages/my-posts/index.wxml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<import src="../../base.wxml"/>
|
||||
<template is="taro_tmpl" data="{{root:root}}" />
|
||||
1
dist/pages/my-posts/index.wxss
vendored
Normal file
1
dist/pages/my-posts/index.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.my-posts{background:#14102b;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100vh}.my-posts__nav{-ms-flex-negative:0;background:#14102b;flex-shrink:0}.my-posts__nav-row{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:100rpx;padding:0 24rpx}.my-posts__back{display:-ms-flexbox;display:flex;height:72rpx;width:72rpx;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;color:#f0e9ff;justify-content:center}.my-posts__back-icon{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.my-posts__title{color:#f0e9ff;-ms-flex:1;flex:1;font:700 32rpx/1 Space Grotesk,Inter,system-ui,sans-serif;text-align:center}.my-posts__nav-spacer{width:72rpx}.my-posts__scroll{-ms-flex:1;flex:1;min-height:0}.my-posts__feed{padding:16rpx 32rpx 64rpx}.my-posts__empty{color:#8a7aab;display:block;font:400 26rpx/1.6 Inter,system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif;padding:96rpx 48rpx;text-align:center}
|
||||
2
dist/pages/nearby/index.js
vendored
2
dist/pages/nearby/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/pages/nearby/index.wxss
vendored
2
dist/pages/nearby/index.wxss
vendored
File diff suppressed because one or more lines are too long
2
dist/pages/plaza/index.js
vendored
2
dist/pages/plaza/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/pages/plaza/index.wxss
vendored
2
dist/pages/plaza/index.wxss
vendored
File diff suppressed because one or more lines are too long
1
dist/pages/post-detail/index.js
vendored
Normal file
1
dist/pages/post-detail/index.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[741],{8680:function(e,t,s){var a=s(8870),n=s(436),c=s(1212),i=s(9379),o=s(467),l=s(5544),r=s(6540),u=s(758),d=s.n(u),m=s(118),p=s(374),h=s(3401),_=s(7745),x=s(3972),v=s(7896),f=s(4149),A=s(994),j=s(4848);function N(){var e=(0,p.v)(),t=e.statusBarHeight,s=e.safeBottom,a=(0,u.useRouter)(),N=a.params.postId||"",k=(0,r.useState)(null),b=(0,l.A)(k,2),S=b[0],w=b[1],y=(0,r.useState)([]),g=(0,l.A)(y,2),B=g[0],E=g[1],Y=(0,r.useState)(!0),M=(0,l.A)(Y,2),T=M[0],C=M[1],I=(0,r.useState)(""),K=(0,l.A)(I,2),O=K[0],U=K[1],z=(0,r.useState)(!1),J=(0,l.A)(z,2),P=J[0],H=J[1],L=(0,A.d)(480),R=function(){N?(C(!0),(0,f.aC)(N).then(function(e){w(e.post),E(e.comments)}).finally(function(){return C(!1)})):C(!1)};(0,r.useEffect)(function(){R()},[N]);var $=function(){var e=(0,o.A)((0,c.A)().m(function e(t){var s,a,n;return(0,c.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(S){e.n=1;break}return e.a(2);case 1:return s=!S.likedByMe,s&&L.show(),a=(0,i.A)((0,i.A)({},S),{},{likedByMe:s,counts:(0,i.A)((0,i.A)({},S.counts),{},{likes:Math.max(0,S.counts.likes+(s?1:-1))})}),w(a),e.p=2,e.n=3,(0,f.O$)(t,s);case 3:n=e.v,w(function(e){return e?(0,i.A)((0,i.A)({},e),{},{likedByMe:n.liked,counts:(0,i.A)((0,i.A)({},e.counts),{},{likes:n.likes})}):e}),e.n=5;break;case 4:e.p=4,e.v,w(S),d().showToast({title:"\u70b9\u8d5e\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5",icon:"none"});case 5:return e.a(2)}},e,null,[[2,4]])}));return function(t){return e.apply(this,arguments)}}(),q=function(){var e=(0,o.A)((0,c.A)().m(function e(){var t,s;return(0,c.A)().w(function(e){while(1)switch(e.p=e.n){case 0:if(t=O.trim(),t&&!P&&S){e.n=1;break}return e.a(2);case 1:return H(!0),U(""),e.p=2,e.n=3,(0,f.SI)(S._id,t);case 3:s=e.v,E(function(e){return[].concat((0,n.A)(e),[{_id:s.commentId,author:{id:"me",name:"\u6211",avatarKey:"gradient-avatar-1"},content:t,timeText:"\u521a\u521a"}])}),w(function(e){return e?(0,i.A)((0,i.A)({},e),{},{counts:(0,i.A)((0,i.A)({},e.counts),{},{comments:s.comments})}):e}),e.n=5;break;case 4:e.p=4,e.v,d().showToast({title:"\u8bc4\u8bba\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5",icon:"none"}),U(t);case 5:return e.p=5,H(!1),e.f(5);case 6:return e.a(2)}},e,null,[[2,4,5,6]])}));return function(){return e.apply(this,arguments)}}();return(0,j.jsxs)(m.Ss,{className:"post-detail",children:[(0,j.jsx)(m.Ss,{className:"post-detail__nav",style:{paddingTop:"".concat(t,"px")},children:(0,j.jsxs)(m.Ss,{className:"post-detail__nav-row",children:[(0,j.jsx)(m.Ss,{className:"post-detail__back",onClick:function(){return d().navigateBack()},children:(0,j.jsx)(h.A,{name:"chev",size:22,className:"post-detail__back-icon"})}),(0,j.jsx)(m.EY,{className:"post-detail__title",children:"\u52a8\u6001\u8be6\u60c5"}),(0,j.jsx)(m.Ss,{className:"post-detail__nav-spacer"})]})}),(0,j.jsxs)(m.BM,{scrollY:!0,className:"post-detail__scroll",enhanced:!0,showScrollbar:!1,children:[S?(0,j.jsx)(m.Ss,{className:"post-detail__post",children:(0,j.jsx)(x.A,{post:S,onLike:$,enableImagePreview:!0})}):null,(0,j.jsxs)(m.Ss,{className:"post-detail__comments",children:[(0,j.jsxs)(m.EY,{className:"post-detail__comments-title",children:["\u8bc4\u8bba",S?" ".concat(S.counts.comments):""]}),T&&!S?(0,j.jsx)(m.EY,{className:"post-detail__empty",children:"\u52a0\u8f7d\u4e2d\u2026"}):0===B.length?(0,j.jsx)(m.EY,{className:"post-detail__empty",children:"\u8fd8\u6ca1\u6709\u8bc4\u8bba\uff0c\u6765\u62a2\u6c99\u53d1\u5427"}):B.map(function(e){return(0,j.jsxs)(m.Ss,{className:"post-detail__comment",children:[(0,j.jsx)(_.A,{avatarKey:e.author.avatarKey,avatarUrl:e.author.avatarUrl,size:"sm"}),(0,j.jsxs)(m.Ss,{className:"post-detail__comment-body",children:[(0,j.jsxs)(m.Ss,{className:"post-detail__comment-head",children:[(0,j.jsx)(m.EY,{className:"post-detail__comment-name",children:e.author.name}),(0,j.jsx)(m.EY,{className:"post-detail__comment-time",children:e.timeText})]}),(0,j.jsx)(m.EY,{className:"post-detail__comment-text",children:e.content})]})]},e._id)})]})]}),(0,j.jsxs)(m.Ss,{className:"post-detail__input-bar",style:{paddingBottom:"".concat(Math.max(12,s),"px")},children:[(0,j.jsx)(m.pd,{className:"post-detail__input",value:O,placeholder:"\u5199\u8bc4\u8bba\u2026",placeholderClass:"post-detail__input-ph",confirmType:"send",onInput:function(e){return U(e.detail.value)},onConfirm:q}),(0,j.jsx)(m.Ss,{className:"post-detail__send ".concat(O.trim()?"":"post-detail__send--disabled"),onClick:q,children:"\u53d1\u9001"})]}),(0,j.jsx)(v.A,{visible:L.visible})]})}var k={},b=(0,a.eU)(N,"pages/post-detail/index",{root:{cn:[]}},k||{});N&&N.behaviors&&(b.behaviors=(b.behaviors||[]).concat(N.behaviors));Page(b)}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[907,96,76],function(){return t(8680)});e.O()}]);
|
||||
1
dist/pages/post-detail/index.json
vendored
Normal file
1
dist/pages/post-detail/index.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"usingComponents":{"comp":"../../comp"}}
|
||||
2
dist/pages/post-detail/index.wxml
vendored
Normal file
2
dist/pages/post-detail/index.wxml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<import src="../../base.wxml"/>
|
||||
<template is="taro_tmpl" data="{{root:root}}" />
|
||||
1
dist/pages/post-detail/index.wxss
vendored
Normal file
1
dist/pages/post-detail/index.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.post-detail{background:#14102b;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100vh}.post-detail__nav{-ms-flex-negative:0;background:#14102b;border-bottom:2rpx solid rgba(216,180,255,.06);flex-shrink:0}.post-detail__nav-row{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:100rpx;padding:0 24rpx}.post-detail__back{display:-ms-flexbox;display:flex;height:72rpx;width:72rpx;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;color:#f0e9ff;justify-content:center}.post-detail__back-icon{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.post-detail__title{color:#f0e9ff;-ms-flex:1;flex:1;font:700 32rpx/1 Space Grotesk,Inter,system-ui,sans-serif;text-align:center}.post-detail__nav-spacer{width:72rpx}.post-detail__scroll{-ms-flex:1;flex:1;min-height:0}.post-detail__post{padding-top:24rpx}.post-detail__comments{padding:8rpx 32rpx 48rpx}.post-detail__comments-title{color:#f0e9ff;display:block;font:700 28rpx/1 Space Grotesk,Inter,system-ui,sans-serif;margin:16rpx 0 24rpx}.post-detail__empty{color:#8a7aab;display:block;font:400 26rpx/1.6 Inter,system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif;padding:72rpx 48rpx;text-align:center}.post-detail__comment{border-top:2rpx solid rgba(216,180,255,.06);display:-ms-flexbox;display:flex;gap:20rpx;padding:24rpx 0}.post-detail__comment-body{-ms-flex:1;flex:1;min-width:0}.post-detail__comment-head{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16rpx}.post-detail__comment-name{color:#f0e9ff;font:600 26rpx/1.2 Inter,system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif}.post-detail__comment-time{color:#8a7aab;font:400 22rpx/1 Inter,system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif}.post-detail__comment-text{color:#f0e9ff;display:block;font:400 28rpx/1.55 Inter,system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif;margin-top:12rpx;word-break:break-word}.post-detail__input-bar{-ms-flex-negative:0;display:-ms-flexbox;display:flex;flex-shrink:0;-ms-flex-align:center;align-items:center;background:#14102b;border-top:2rpx solid rgba(216,180,255,.08);gap:20rpx;padding:20rpx 32rpx 24rpx}.post-detail__input{background:rgba(31,23,66,.68);border:2rpx solid rgba(216,180,255,.1);border-radius:19998rpx;-webkit-box-sizing:border-box;box-sizing:border-box;color:#f0e9ff;-ms-flex:1;flex:1;font:400 28rpx/80rpx Inter,system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif;height:80rpx;padding:0 28rpx}.post-detail__input-ph{color:#8a7aab}.post-detail__send{-ms-flex-negative:0;background:linear-gradient(135deg,#d8b4ff,#ffb3c8);border-radius:19998rpx;color:#2a1d10;flex-shrink:0;font:700 28rpx/80rpx Inter,system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif;height:80rpx;padding:0 36rpx}.post-detail__send--disabled{opacity:.5}
|
||||
2
dist/pages/profile/index.js
vendored
2
dist/pages/profile/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/pages/publish/index.js
vendored
2
dist/pages/publish/index.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user