1 |
- require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageA/chat/chat"],{"2f92":function(e,n,t){"use strict";t.r(n);var o=t("f038"),r=t.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(a);n["default"]=r.a},"3b1d":function(e,n,t){"use strict";t.r(n);var o=t("7a06"),r=t("2f92");for(var a in r)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(a);t("9361");var s=t("828b"),i=Object(s["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);n["default"]=i.exports},"7a06":function(e,n,t){"use strict";t.d(n,"b",(function(){return r})),t.d(n,"c",(function(){return a})),t.d(n,"a",(function(){return o}));var o={uNavbar:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-navbar/u-navbar")]).then(t.bind(null,"f3ae"))},uIcon:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-icon/u-icon")]).then(t.bind(null,"b73a"))},kjChat:function(){return Promise.all([t.e("common/vendor"),t.e("components/kj-chat/kj-chat")]).then(t.bind(null,"97d5"))}},r=function(){var e=this,n=e.$createElement,t=(e._self._c,e.__map(e.list,(function(n,t){var o=e.__get_orig(n),r=e.renderTime(n.time);return{$orig:o,m0:r}})));e.$mp.data=Object.assign({},{$root:{l0:t}})},a=[]},9059:function(e,n,t){"use strict";(function(e,n){var o=t("47a9");t("abeb");o(t("3240"));var r=o(t("3b1d"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(r.default)}).call(this,t("3223")["default"],t("df3c")["createPage"])},9361:function(e,n,t){"use strict";var o=t("9edd"),r=t.n(o);r.a},"9edd":function(e,n,t){},f038:function(e,n,t){"use strict";(function(e,o){var r=t("47a9");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=r(t("e7a1")),s=r(t("abf2")),i=t("bab7"),u=t("2bad"),c=e.createInnerAudioContext(),l={data:function(){return{user_other_no:"",user_no:"",user:{},user_other:{},pageSize:20,loadText:"",list:[],renderTime:u.renderTime,playStatus:0,statusheight:""}},onLoad:function(n){this.user=e.getStorageSync("user_info"),console.log("user",this.user),n.user_other&&(this.user_other=JSON.parse(decodeURIComponent(n.user_other))),this.user_other_no=n.user_other_no,console.log(this.user_other_no),e.getStorageSync("user_no")&&(this.user_no=e.getStorageSync("user_no")),a.default.$on("message",this.getdata)},onShow:function(){this.getdata()},methods:{callphone:function(){e.$u.http.get("/api/config",{params:{module:"basic"}}).then((function(n){console.log(n),e.makePhoneCall({phoneNumber:n.service_mobile})})).catch((function(){}))},previewimg:function(n){var t=[];t.push(n),e.previewImage({urls:t,longPressActions:{itemList:["发送给朋友","保存图片","收藏"],success:function(e){console.log("选中了第"+(e.tapIndex+1)+"个按钮,第"+(e.index+1)+"张图片")},fail:function(e){console.log(e.errMsg)}}})},playaudio:function(e){var n=this;c.src=e,console.log(e);o.setInnerAudioOption({obeyMuteSwitch:!1,success:function(e){console.log("开启静音模式下播放音乐的功能")},fail:function(e){console.log(e),console.log("静音设置失败")}});console.log(this.playStatus),0==this.playStatus?(c.play(),c.onPlay((function(){console.log("开始播放"),n.playStatus=1}))):(c.pause(),c.onPause((function(){console.log("暂停播放"),n.playStatus=0}))),c.onError((function(e){console.log("onError",e.errMsg),console.log("onError",e.errCode)})),c.onEnded((function(e){n.playStatus=0}))},return1:function(){e.navigateBack()},getuser:function(){var e=this,n=this;getEmchatUsersData({user_no:this.user_no+","+this.user_other_no}).then((function(t){1==t.code?(e.user=t.data[0],e.user_other=t.data[1]):n.$u.toast(t.msg)}))},getdata:function(){var n=this,t={chatType:"singleChat",type:"channel",to:this.user_other_no},o=new s.default.message.create(t);i.conn.send(o);var r={targetId:this.user_other_no,pageSize:this.pageSize,cursor:-1,chatType:"singleChat",searchDirection:"up"};i.conn.getHistoryMessages(r).then((function(t){console.log("res",t),t.isLast&&(n.loadText="已无更多数据"),n.list=t.messages.reverse(),console.log(n.list),n.$nextTick((function(){e.pageScrollTo({scrollTop:99999})}))})).catch((function(e){console.log("失败",e)}))},toinfo:function(n,t){"pos"==t&&n.ext.order.item_url?e.navigateTo({url:"/pagesB/details?id="+n.ext.order.item_url}):"cand"==t?e.navigateTo({url:"/pagesC/rencai-info?id="+n.ext.order.item_url}):"order"==t&&e.navigateTo({url:"/pagesD/order-detail?id="+n.ext.order.item_url})}}};n.default=l}).call(this,t("df3c")["default"],t("3223")["default"])}},[["9059","common/runtime","common/vendor","pageA/common/vendor"]]]);
|