1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-chat-user"],{"028a":function(t,e,i){"use strict";i.r(e);var n=i("6520"),a=i.n(n);for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a},"0d13":function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,'@-webkit-keyframes grace-rotate360-data-v-2142c383{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}100%{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes grace-rotate360-data-v-2142c383{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}100%{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.grace-loading[data-v-2142c383]{display:-webkit-box;display:-webkit-flex;display:flex;width:100%;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;padding:%?16?% 0;padding-bottom:%?36?%;line-height:%?40?%;color:#888}.grace-loading uni-text[data-v-2142c383]{margin-left:%?12?%}.grace-loading-icon[data-v-2142c383]{width:%?40?%;height:%?40?%;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;line-height:%?40?%;font-size:%?30?%;text-align:center;font-family:grace-iconfont;-webkit-animation:grace-rotate360-data-v-2142c383 1.2s infinite linear;animation:grace-rotate360-data-v-2142c383 1.2s infinite linear}.grace-loading-icon[data-v-2142c383]:before{content:"\\e9db"}',""]),t.exports=e},3528:function(t,e,i){"use strict";i.r(e);var n=i("ec2a"),a=i("9441");for(var o in a)"default"!==o&&function(t){i.d(e,t,(function(){return a[t]}))}(o);i("a448");var c,r=i("f0c5"),s=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"14ffd1f2",null,!1,n["a"],c);e["default"]=s.exports},"60c2":function(t,e,i){var n=i("8b20");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("4f06").default;a("3007f194",n,!0,{sourceMap:!1,shadowMode:!1})},"60db":function(t,e,i){"use strict";i("ac1f"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={data:function(){return{InputBottom:0,uid:0,msg:"",fetch:{chat:[],bgcolor:"",title:"聊天"},loadingType:1,bottomState:!1,pic:[],notice:"",noticeShow:!1}},onLoad:function(t){this.uid=t.uid,this.fetch.title=t.title,this.Dever.config.code=t.code,this.im(),this.getInfo(1)},onHide:function(){},onPageScroll:function(t){0==t.scrollTop&&2!=this.loadingType&&(this.bottomState=!1,this.loadingType=1,this.getInfo(2))},onReachBottom:function(){this.bottomState=!0},methods:{InputFocus:function(t){this.InputBottom=t.detail.height},InputBlur:function(t){this.InputBottom=0},im:function(){var t=this;this.Dever.im("chat",!1,(function(e){"init"==e.type?t.Dever.post("app/community/?l=chat.init",{code:t.Dever.config.code,client_id:e.client_id,uid:t.uid,noloading:1}):"ping"==e.type||"msg"==e.type&&t.add(e,2)}))},getInfo:function(t){var e=this;2!=e.loadingType&&this.Dever.page([t,"chat"],this,"app/community/?l=chat.getList",{code:this.Dever.config.code,uid:this.uid,noloading:1,concat:-1},(function(i){if(i.chat)for(var n in i.chat)i.chat[n].pic&&e.pic.push(i.chat[n].pic);0==e.Dever.pageData.status?e.loadingType=2:e.loadingType=3,1==t&&e.bottom()}))},send:function(t){var e=this,i={};i.code=this.Dever.config.code,i.uid=this.uid,i.noloading=1,t?i.pic=t:i.msg=this.msg,e.Dever.post("app/community/?l=chat.send",i,(function(t){e.msg="",e.add(t.msg,1)}))},add:function(t,e){t.pic&&this.pic.push(t.pic),this.fetch.chat.push(t),1==e||this.bottomState?this.bottom():(this.notice="你有新的消息",this.noticeShow=!0)},noticeClick:function(){this.noticeShow=!1,this.bottom()},upload:function(){var t=this;this.Dever.upload("pic",1,(function(e,i){t.send(i)}))},bottom:function(){var t=this;setTimeout((function(){var e=uni.createSelectorQuery();e.select(".cu-chat").boundingClientRect(),e.exec((function(e){var i=e[0].height+e[0].bottom;t.bottomState=!0,uni.pageScrollTo({scrollTop:i,duration:50})}))}))}}};e.default=n},6520:function(t,e,i){"use strict";i("a9e3"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={props:{loadingType:{type:Number,default:0},loadingText:{type:Array,default:function(){return["上拉加载更多","正在努力加载","已经加载全部数据","",""]}},iconColor:{type:String,default:"#888888"},textColor:{type:String,default:"#888888"}}};e.default=n},"665e":function(t,e,i){"use strict";var n,a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.loadingType<4?i("v-uni-view",{staticClass:"grace-loading grace-ellipsis"},[1===t.loadingType?i("v-uni-view",{staticClass:"grace-loading-icon",style:{color:t.iconColor}}):t._e(),i("v-uni-text",{style:{color:t.textColor}},[t._v(t._s(t.loadingText[t.loadingType]))])],1):t._e()},o=[];i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}))},"677b":function(t,e,i){"use strict";var n=i("cfc7"),a=i.n(n);a.a},8879:function(t,e,i){"use strict";i("a9e3"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={props:{msg:{type:String,default:""},color:{type:String,default:"#008CFF"},width:{type:Number,default:300},bottom:{type:Number,default:80},show:{type:Boolean,default:!0}},methods:{tapme:function(){this.$emit("tapme")}}};e.default=n},"89ef":function(t,e,i){"use strict";var n={graceLoading:i("9bd8").default,graceFixedMsg:i("3528").default},a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",[i("cu-custom",{attrs:{bgColor:t.fetch.bgcolor,isBack:!0}},[i("template",{attrs:{slot:"backText"},slot:"backText"},[t._v("返回")]),i("template",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.fetch.title))])],2),i("v-uni-view",{staticClass:"cu-chat"},[i("graceLoading",{attrs:{loadingType:t.loadingType}}),t._l(t.fetch.chat,(function(e,n){return[e.self?i("v-uni-view",{key:n+"_0",staticClass:"cu-item self"},[i("v-uni-view",{staticClass:"main"},[e.text?i("v-uni-view",{staticClass:"content bg-green shadow"},[i("v-uni-text",[t._v(t._s(e.text))])],1):t._e(),e.pic?i("v-uni-view",[i("v-uni-image",{staticClass:"radius chat-pic",attrs:{src:e.pic,mode:"widthFix"},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.Dever.viewPic(t.pic,e.pic)}}})],1):t._e()],1),i("v-uni-view",{staticClass:"cu-avatar radius",style:{backgroundImage:"url("+t.fetch.user[e.uid].avatar+")"},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.Dever.viewPic([t.fetch.user[e.uid].avatar],t.fetch.user[e.uid].avatar)}}}),i("v-uni-view",{staticClass:"date"},[t._v(t._s(e.date))])],1):t._e(),e.self?t._e():i("v-uni-view",{key:n+"_1",staticClass:"cu-item"},[i("v-uni-view",{staticClass:"cu-avatar radius",style:{backgroundImage:"url("+t.fetch.user[e.uid].avatar+")"},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.Dever.viewPic([t.fetch.user[e.uid].avatar],t.fetch.user[e.uid].avatar)}}}),i("v-uni-view",{staticClass:"main"},[e.text?i("v-uni-view",{staticClass:"content shadow"},[i("v-uni-text",[t._v(t._s(e.text))])],1):t._e(),e.pic?i("v-uni-view",[i("v-uni-image",{staticClass:"radius chat-pic",attrs:{src:e.pic,mode:"widthFix"},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.Dever.viewPic(t.pic,e.pic)}}})],1):t._e()],1),i("v-uni-view",{staticClass:"date"},[t._v(t._s(e.date))])],1)]}))],2),i("v-uni-view",{staticClass:"cu-bar foot input",style:[{bottom:t.InputBottom+"px"}]},[i("v-uni-view",{staticClass:"action",staticStyle:{display:"none"}},[i("v-uni-text",{staticClass:"cuIcon-sound text-grey"})],1),i("v-uni-view",{staticClass:"action",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.upload.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"cuIcon-picfill text-grey"})],1),i("v-uni-input",{staticClass:"solid-bottom",attrs:{"adjust-position":!1,focus:!1,maxlength:"300","cursor-spacing":"10"},on:{focus:function(e){arguments[0]=e=t.$handleEvent(e),t.InputFocus.apply(void 0,arguments)},blur:function(e){arguments[0]=e=t.$handleEvent(e),t.InputBlur.apply(void 0,arguments)}},model:{value:t.msg,callback:function(e){t.msg=e},expression:"msg"}}),i("v-uni-view",{staticClass:"action",staticStyle:{display:"none"}},[i("v-uni-text",{staticClass:"cuIcon-emojifill text-grey"})],1),i("v-uni-button",{staticClass:"cu-btn bg-green shadow",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.send()}}},[t._v("发送")])],1),t.noticeShow?i("graceFixedMsg",{attrs:{msg:t.notice,width:280,bottom:120},on:{tapme:function(e){arguments[0]=e=t.$handleEvent(e),t.noticeClick.apply(void 0,arguments)}}}):t._e()],1)},o=[];i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}))},"8b20":function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,'.grace-fixed-msg[data-v-14ffd1f2]{width:%?300?%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;padding:%?18?% %?20?%;border-radius:%?50?%;background:#fff;box-shadow:0 0 %?16?% #d5d6d8;position:fixed;bottom:%?60?%;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);z-index:9999}.grace-fixed-msg-icon[data-v-14ffd1f2]{width:%?36?%;height:%?36?%;line-height:%?36?%;font-size:%?30?%;color:#3688ff;-webkit-flex-shrink:0;flex-shrink:0;opacity:.6;text-align:center}.msg-icon[data-v-14ffd1f2]:before{content:"\\e666"}.grace-fixed-msg-text[data-v-14ffd1f2]{width:%?500?%;line-height:%?36?%;font-size:%?28?%;color:#008cff;height:%?36?%;text-align:center;overflow:hidden}',""]),t.exports=e},9441:function(t,e,i){"use strict";i.r(e);var n=i("8879"),a=i.n(n);for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a},"96b7":function(t,e,i){"use strict";i.r(e);var n=i("60db"),a=i.n(n);for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a},9854:function(t,e,i){"use strict";var n=i("df25"),a=i.n(n);a.a},"9bd8":function(t,e,i){"use strict";i.r(e);var n=i("665e"),a=i("028a");for(var o in a)"default"!==o&&function(t){i.d(e,t,(function(){return a[t]}))}(o);i("677b");var c,r=i("f0c5"),s=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"2142c383",null,!1,n["a"],c);e["default"]=s.exports},a448:function(t,e,i){"use strict";var n=i("60c2"),a=i.n(n);a.a},b063:function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,"uni-page-body[data-v-72920dd2]{padding-bottom:%?100?%}.chat-pic[data-v-72920dd2]{width:%?150?%}",""]),t.exports=e},cfc7:function(t,e,i){var n=i("0d13");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("4f06").default;a("89108a14",n,!0,{sourceMap:!1,shadowMode:!1})},dbb0:function(t,e,i){"use strict";i.r(e);var n=i("89ef"),a=i("96b7");for(var o in a)"default"!==o&&function(t){i.d(e,t,(function(){return a[t]}))}(o);i("9854");var c,r=i("f0c5"),s=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"72920dd2",null,!1,n["a"],c);e["default"]=s.exports},df25:function(t,e,i){var n=i("b063");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("4f06").default;a("fd2ef92e",n,!0,{sourceMap:!1,shadowMode:!1})},ec2a:function(t,e,i){"use strict";var n,a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.show?i("v-uni-view",{staticClass:"grace-fixed-msg",style:{width:t.width+"rpx",bottom:t.bottom+"rpx"},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.tapme.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"grace-fixed-msg-icon grace-icons msg-icon",style:{color:t.color}}),i("v-uni-text",{staticClass:"grace-fixed-msg-text",style:{color:t.color}},[t._v(t._s(t.msg))]),i("v-uni-text",{staticClass:"grace-fixed-msg-icon grace-icons icon-arrow-right",style:{color:t.color}})],1):t._e()},o=[];i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}))}}]);
|