service.js 4.6 KB

1
  1. require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageA/service/service"],{"277f":function(e,n,t){"use strict";t.r(n);var o=t("434f"),r=t("c5ad");for(var a in r)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(a);t("c8a7");var i,u=t("f0c5"),s=Object(u["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],i);n["default"]=s.exports},"2bce":function(e,n,t){"use strict";(function(e,o){var r=t("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=r(t("b823")),i=r(t("01d0")),u=t("970c"),s=t("fbb8"),c=e.createInnerAudioContext(),l={data:function(){return{user_other_no:"13523652365",user_no:"",user:{},user_other:{},pageSize:20,loadText:"",list:[],renderTime:s.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))),e.getStorageSync("user_no")&&(this.user_no=e.getStorageSync("user_no")),a.default.$on("message",this.getdata)},onShow:function(){this.getdata()},computed:{i18n:function(){return this.$t("index")}},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 i.default.message.create(t);u.conn.send(o);var r={targetId:this.user_other_no,pageSize:this.pageSize,cursor:-1,chatType:"singleChat",searchDirection:"up"};u.conn.getHistoryMessages(r).then((function(t){console.log("res",t),t.isLast&&(n.loadText=n.i18n.Nofurtherdata),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("543d")["default"],t("bc2e")["default"])},"434f":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,"b6bd"))},uIcon:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-icon/u-icon")]).then(t.bind(null,"01eb"))},kjChat:function(){return Promise.all([t.e("common/vendor"),t.e("components/kj-chat/kj-chat")]).then(t.bind(null,"2452"))}},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),a=n.from==e.user_other_no&&"audio"==n.type?n.length:null,i=n.from==e.user_other_no&&"audio"==n.type?n.length:null;return{$orig:o,m0:r,g0:a,g1:i}})));e.$mp.data=Object.assign({},{$root:{l0:t}})},a=[]},ad23:function(e,n,t){"use strict";(function(e,n){var o=t("4ea4");t("f93b");o(t("66fd"));var r=o(t("277f"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(r.default)}).call(this,t("bc2e")["default"],t("543d")["createPage"])},c5ad:function(e,n,t){"use strict";t.r(n);var o=t("2bce"),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},c8a7:function(e,n,t){"use strict";var o=t("df3c"),r=t.n(o);r.a},df3c:function(e,n,t){}},[["ad23","common/runtime","common/vendor","pageA/common/vendor"]]]);