java-mall-app/unpackage/dist/build/mp-weixin/im/chat/emotion/index.js
2024-11-01 16:35:40 +08:00

11 lines
6.0 KiB
JavaScript

require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["im/chat/emotion/index"],{7978:function(t,i,e){"use strict";var s=e("b17d"),n=e.n(s);n.a},a64f:function(t,i,e){"use strict";e.r(i);var s=e("f422"),n=e("e874");for(var o in n)["default"].indexOf(o)<0&&function(t){e.d(i,t,(function(){return n[t]}))}(o);e("7978");var h=e("828b"),r=Object(h["a"])(n["default"],s["b"],s["c"],!1,null,"f3fb7ad2",null,!1,s["a"],void 0);i["default"]=r.exports},b17d:function(t,i,e){},e004:function(t,i,e){"use strict";(function(t){var s=e("47a9");Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var n=s(e("5f53")),o=0;t.getSystemInfo({success:function(t){o=t.windowWidth}});var h={props:{},data:function(){return{scrollTop:0,old:{scrollTop:0},emojiWidth:8*o,emojiMarginLeft:-o,transition:"transform 0 ease-in 0",toastShow:!1,toastText:"",beginX:0,beforeList:[{}],nextList:[{}],nowX:0,endX:0,activeEmojiTab:1,activeIndex:1,groupSize:n.default.imgArr.length,groupIndex:1,items:n.default.imgArr,pointItemList:0}},created:function(){this.emojiWidth=o*(this.items[this.groupIndex].emojiList.length+2),this.emojiMarginLeft=-o*this.activeIndex,this.pointItemList=this.items[this.groupIndex].emojiList.length,this.beforeList=this.items[this.groupIndex-1].emojiList[this.items[this.groupIndex-1].emojiList.length-1],this.nextList=this.items[this.groupIndex+1].emojiList[0]},onLoad:function(){var i=t.getSystemInfoSync();this.style.pageHeight=i.windowHeight,this.style.contentViewHeight=i.windowHeight-t.getSystemInfoSync().screenWidth/750*100},methods:{selectTab:function(t,i){this.activeIndex=t,this.groupIndex=i,this.activeEmojiTab=i,this.emojiWidth=o*(this.items[this.groupIndex].emojiList.length+2),this.emojiMarginLeft=-o*this.activeIndex,this.beforeList=this.items[this.groupIndex-1].emojiList[this.items[this.groupIndex-1].emojiList.length-1],this.nextList=this.items[this.groupIndex+1].emojiList[0],this.pointItemList=this.items[this.groupIndex].emojiList.length},addEmojiPackage:function(){this.toast("添加表情包")},settingEmoji:function(){this.toast("设置表情")},scroll:function(t){this.old.scrollTop=t.detail.scrollTop},goTop:function(i){this.scrollTop=this.old.scrollTop,this.$nextTick((function(){this.scrollTop=0})),t.showToast({icon:"none",title:"纵向滚动 scrollTop 值已被修改为 0"})},gtouchstart:function(t){this.beginX=t.touches[0].clientX},gtouchmove:function(t){this.nowX=t.changedTouches[0].clientX,this.slice()},gtouchend:function(t){this.endX=t.changedTouches[0].clientX,this.judgeMove()},judgeMove:function(){var t=this.endX-this.beginX;if(t>=3*o/5)if(this.activeIndex--,this.activeIndex<=0){this.groupIndex--;this.groupIndex<=0?(this.groupIndex=1,this.pointItemList=this.items[1].emojiList.length,this.activeIndex=1):(this.pointItemList=this.items[this.groupIndex].emojiList.length,this.activeIndex=this.items[this.groupIndex].emojiList.length,this.selectTab(this.activeIndex,this.groupIndex)),this.beforeList=this.items[this.groupIndex-1].emojiList[this.items[this.groupIndex-1].emojiList.length-1],this.nextList=this.items[this.groupIndex+1].emojiList[0],this.emojiWidth=o*(this.items[this.groupIndex].emojiList.length+2),this.emojiMarginLeft=-o*this.activeIndex}else this.emojiWidth=o*(this.items[this.groupIndex].emojiList.length+2),this.emojiMarginLeft=-o*this.activeIndex;else if(t<=3*-o/5)if(++this.activeIndex,this.activeIndex>this.items[this.groupIndex].emojiList.length){++this.groupIndex;this.groupIndex>this.groupSize-2?(this.groupIndex=this.groupSize-2,this.pointItemList=this.items[this.groupIndex].emojiList.length,this.activeIndex=this.items[this.groupIndex].emojiList.length):(this.pointItemList=this.items[this.groupIndex].emojiList.length,this.activeIndex=1,this.selectTab(1,this.groupIndex)),this.beforeList=this.items[this.groupIndex-1].emojiList[this.items[this.groupIndex-1].emojiList.length-1],this.nextList=this.items[this.groupIndex+1].emojiList[0],this.emojiWidth=o*(this.items[this.groupIndex].emojiList.length+2),this.emojiMarginLeft=-o*this.activeIndex}else this.emojiWidth=o*(this.items[this.groupIndex].emojiList.length+2),this.emojiMarginLeft=-o*this.activeIndex;else this.reset()},slice:function(){var t=this.nowX-this.beginX;this.emojiWidth=o*(this.items[this.groupIndex].emojiList.length+2),this.emojiMarginLeft=-o*this.activeIndex+t},reset:function(){this.emojiWidth=o*(this.items[this.groupIndex].emojiList.length+2),this.emojiMarginLeft=-o*this.activeIndex},imgClick:function(t,i,e,s){this.$emit("addEmoji",{emojiPath:i.emojiPath,minEmoji:i.minEmoji,emojiItem:e,groupIndex:s})},toast:function(t){var i=this;t.length>0&&(i.toastText=t,i.toastShow=!0,setTimeout((function(){i.toastShow=!1,i.toastText=""}),1500))}}};i.default=h}).call(this,e("df3c")["default"])},e874:function(t,i,e){"use strict";e.r(i);var s=e("e004"),n=e.n(s);for(var o in s)["default"].indexOf(o)<0&&function(t){e.d(i,t,(function(){return s[t]}))}(o);i["default"]=n.a},f422:function(t,i,e){"use strict";e.d(i,"b",(function(){return s})),e.d(i,"c",(function(){return n})),e.d(i,"a",(function(){}));var s=function(){var t=this,i=t.$createElement,e=(t._self._c,t.__map(t.beforeList,(function(i,e){var s=t.__get_orig(i),n=""!=i.url?t.items[t.groupIndex-1].minEmoji&&e===t.beforeList.length-1:null;return{$orig:s,g0:n}}))),s=t.__map(t.items[t.groupIndex].emojiList,(function(i,e){var s=t.__get_orig(i),n=t.__map(i,(function(e,s){var n=t.__get_orig(e),o=t.items[t.groupIndex].minEmoji&&s===i.length-1;return{$orig:n,g1:o}}));return{$orig:s,l1:n}})),n=t.__map(t.nextList,(function(i,e){var s=t.__get_orig(i),n=""!=i.url?t.items[t.groupIndex+1].minEmoji&&e===t.nextList.length-1:null;return{$orig:s,g2:n}}));t.$mp.data=Object.assign({},{$root:{l0:e,l2:s,l3:n,l4:null}})},n=[]}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'im/chat/emotion/index-create-component',
{
'im/chat/emotion/index-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('df3c')['createComponent'](__webpack_require__("a64f"))
})
},
[['im/chat/emotion/index-create-component']]
]);