system-page-my-comment-index.bc775db6.js 21 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["system-page-my-comment-index"],{"00d7":function(t,e,i){"use strict";i.r(e);var n=i("ff5a"),o=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=o.a},"08e3":function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为Tuniao UI的集成样式文件,为scss预处理器,其中包含了一些"tn-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * Tuniao UI自定义的css类名和scss变量,均以"tn-"开头,不会造成冲突,请放心使用 \n */.store-appraise[data-v-056762e2]{position:relative;width:100%\n /* 商家评分信息 start */\n /* 商家评分信息 end */\n /* 用户评论 start */\n /* 用户评论 end */}.store-appraise .store-info[data-v-056762e2]{padding:%?40?% %?30?%;border-bottom:%?16?% solid #e6e6e6}.store-appraise .store-info .store-score[data-v-056762e2]{font-size:%?54?%;font-weight:500}.store-appraise .store-info .taste-score .value[data-v-056762e2],\n.store-appraise .store-info .package-score .value[data-v-056762e2],\n.store-appraise .store-info .delivery-score .value[data-v-056762e2]{font-size:%?32?%;font-weight:700}.store-appraise .store-info .delivery-score[data-v-056762e2]{position:relative}.store-appraise .store-info .delivery-score[data-v-056762e2]::before{content:"";position:absolute;left:%?-40?%;top:50%;width:%?1?%;height:80%;background-color:#e6e6e6;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.store-appraise .comments[data-v-056762e2]{padding:%?30?%}.store-appraise .comments .comment[data-v-056762e2]{padding:%?30?% %?0?%;position:relative}.store-appraise .comments .comment .delete-btn[data-v-056762e2]{position:absolute;right:0;top:0;font-size:%?24?%;background-color:#ff6519;color:#fff;width:%?60?%;border-radius:0 0 0 %?15?%;display:flex;justify-content:center}.store-appraise .comments .comment .avatar[data-v-056762e2]{width:%?80?%;height:%?80?%;border-radius:50%}.store-appraise .comments .comment .info[data-v-056762e2]{margin-top:%?6?%}.store-appraise .comments .comment .info .nickname[data-v-056762e2]{font-weight:500}.store-appraise .comments .comment .info .addtime[data-v-056762e2]{font-size:%?24?%}.store-appraise .comments .comment .comment-images[data-v-056762e2]{width:100%;position:relative}.store-appraise .comments .comment .comment-reply[data-v-056762e2]{margin-top:%?20?%;width:100%;border-radius:%?15?%;padding:%?20?%;font-size:%?24?%}.store-appraise .comments .comment .comment-reply .reply-title[data-v-056762e2]{font-weight:700}.store-appraise .comments .comment .comment-reply .reply-content[data-v-056762e2]{margin-top:%?4?%}',""]),t.exports=e},"0c2b":function(t,e,i){"use strict";i.r(e);var n=i("f2b9"),o=i("00d7");for(var a in o)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return o[t]}))}(a);i("42dd");var r=i("828b"),s=Object(r["a"])(o["default"],n["b"],n["c"],!1,null,"687316f3",null,!1,n["a"],void 0);e["default"]=s.exports},"23c8":function(t,e,i){var n=i("08e3");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=i("967d").default;o("19b2f3f9",n,!0,{sourceMap:!1,shadowMode:!1})},"42dd":function(t,e,i){"use strict";var n=i("afa5"),o=i.n(n);o.a},"5c2e":function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("4626"),i("5ac7");var n={options:{virtualHost:!0},props:{icon:{type:String,default:""},tips:{type:String,default:""}},computed:{isImage:function(){return!!this.icon&&this.icon.includes("http")}}};e.default=n},"6a55":function(t,e,i){"use strict";i.r(e);var n=i("fbdc"),o=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=o.a},"6d8d":function(t,e,i){"use strict";i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){return n}));var n={tnLazyLoad:i("b461").default,tnRate:i("0c2b").default},o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("custom-page",{attrs:{"custom-navbar":!0,"navbar-title":"我的评价",leftSlot:!0}},[i("v-uni-view",{staticClass:"store-appraise tn-safe-area-inset-bottom--lg"},[i("v-uni-view",{staticClass:"comments"},[t.comment.length>0?t._l(t.comment,(function(e,n){return i("v-uni-view",{key:n,staticClass:"comment tn-border-bottom tn-border-gray--light"},[i("v-uni-view",{staticClass:"delete-btn tn-flex-row-center",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.deleteComment(e.id)}}},[t._v("删除")]),i("v-uni-view",{staticClass:"top-info tn-flex"},[i("v-uni-view",{staticClass:"avatar tn-border-gray--light"},[i("tn-lazy-load",{attrs:{src:e.storeInfo.logo}})],1),i("v-uni-view",{staticClass:"info tn-margin-left-xs"},[i("v-uni-view",{staticClass:"nickname"},[t._v(t._s(e.storeInfo.title))]),i("v-uni-view",{staticClass:"addtime tn-color-gray"},[t._v(t._s(e.addtime))])],1)],1),i("v-uni-view",{staticClass:"comment-score tn-margin-top-xs",staticStyle:{color:"#ff6519"}},[i("tn-rate",{attrs:{disabled:!0,size:28,"active-color":t.themeBgColor,gutter:0},model:{value:e.scores,callback:function(i){t.$set(e,"scores",i)},expression:"item.scores"}})],1),e.note?i("v-uni-view",{staticClass:"comment-content tn-margin-top"},[t._v(t._s(e.note))]):t._e(),e.images&&e.images.length>0?i("v-uni-view",{staticClass:"comment-images tn-margin-top-xs"},[i("image-group",{attrs:{data:e.images}})],1):t._e(),e.reply.reply?i("v-uni-view",{staticClass:"comment-reply tn-bg-gray--light tn-color-gray--dark"},[i("v-uni-view",{staticClass:"reply-title"},[t._v("商家回复("+t._s(e.reply.time)+")")]),i("v-uni-view",{staticClass:"reply-content"},[t._v(t._s(e.reply.reply))])],1):t._e()],1)})):t._e(),0===t.comment.length&&t.isLoadAll?i("empty",{attrs:{tips:"暂无评论",icon:"empty-message"}}):t._e()],2)],1)],1)},a=[]},"78b4":function(t,e,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.searchRecordApi=e.postTuangouquanReceive=e.postTuangouquanList=e.postTuangouquanDetail=e.postStoreCouponApi=e.postStoreCollectApi=e.myStoreApi=e.joinStoreVipApi=e.isShopBusinessApi=e.getStoreVipInfoApi=e.getStoreTangshiGoodsListApi=e.getStoreShoppingCartDataApi=e.getStoreInfoApi=e.getStoreGoodsListApi=e.getStoreCommentListApi=e.getOrderDinnerStoreListApi=e.getOrderDinnerStoreIdApi=e.getMyCommentListApi=e.getIsBrandStoreApi=e.getFaviateBrandStoreListApi=e.getCodeInfoByCodeApi=e.getClassChild=e.getCategorys=e.getBrandStoreListApi=e.getBrandMasterApi=e.getBrandGoodsApi=e.getBrandApi=e.delCommentApi=void 0,i("5c47"),i("af8f");var o=n(i("7653"));e.getStoreInfoApi=function(t){var e=t.sid,i=t.table_id,n=t.storeCode,a=t.brand;return o.default.get("api/user.store.store/index",{sid:e,table_id:i,storeCode:n,brand:a})};e.getStoreVipInfoApi=function(t){return o.default.get("api/user.store.store/storeVip",t)};e.joinStoreVipApi=function(t){return o.default.post("api/user.store.store/joinStoreVip",t)};e.getStoreGoodsListApi=function(t){var e=t.sid,i=t.search,n=t.orderId,a=t.cid,r=t.child_id,s=t.page,c=t.is_api_shop,u=t.storeCode,d=t.api_brand,l=t.order_type,f=t.encrypted_data,p=t.write_off_type,h=t.is_promotion,v=t.goodsC,m=t.chrid,g=t.is_takeout;return o.default.get("api/user.store.goods/goods",{sid:e,child_id:r||"",search:i||"",order_id:n||"",cid:a||"",page:s||1,is_api_shop:c||"",storeCode:u||"",api_brand:d||"",order_type:l||"",encrypted_data:f||"",write_off_type:p||"",is_promotion:h||-1,goodsC:v,chrid:m||"",is_takeout:g>=0?g:-1})};e.getStoreShoppingCartDataApi=function(t){var e=t.sid,i=t.tableId,n=t.encrypted_data,a=t.is_takeout;return o.default.get("api/user.store.goods/cartIndex",{sid:e,table_id:i||"",encrypted_data:n||"",is_takeout:a>=0?a:-1})};e.getStoreCommentListApi=function(t){var e=t.sid,i=t.type,n=t.note,a=t.page,r=t.pSize;return o.default.get("api/user.store.store/comment",{sid:e,type:i||"",note:n||0,page:a,psize:r})};e.getMyCommentListApi=function(t){var e=t.page,i=t.pSize;return o.default.get("api/user.store.store/myComment",{page:e,psize:i})};e.delCommentApi=function(t){return o.default.post("api/user.store.store/delComment",t)};e.getStoreTangshiGoodsListApi=function(t){var e=t.sid,i=t.search,n=t.tableId,a=t.clear;return o.default.get("api/user.store.table/goods",{sid:e,search:i||"",table_id:n,clear:a||!1})};e.postStoreCouponApi=function(t){var e=t.sid;return o.default.post("api/user.channel.coupon/receive",{sid:e})};e.postStoreCollectApi=function(t){var e=t.sid,i=t.type,n=t.storeCode;return o.default.get("api/user.member.favorite/operate",{sid:e,type:i,storeCode:n})};e.getCategorys=function(t){var e=t.template_id;return o.default.get("api/user.store.goods/plugin_categorys",{template_id:e})};e.getClassChild=function(t){var e=t.cid;return o.default.get("api/user.store.goods/plugin_goods",{cid:e})};e.getOrderDinnerStoreListApi=function(t){return o.default.get("api/user.store.store/getOrderDinnerStoreList",t)};e.getOrderDinnerStoreIdApi=function(t){return o.default.get("api/user.store.store/getOrderDinnerStoreId",t)};e.getBrandApi=function(t){return o.default.get("api/user.store.store/getBrand?sid="+t)};e.getCodeInfoByCodeApi=function(t){return o.default.get("api/user.store.store/getCodeInfo?code="+t,{})};e.searchRecordApi=function(t){return o.default.post("api/user.tuangouquan.write_off/searchRecords",t)};e.getIsBrandStoreApi=function(t){return o.default.get("api/user.store.store/getIsBrandStore?sid="+t)};e.getBrandStoreListApi=function(t){return o.default.post("api/user.store.store/getBrandStoreList",t)};e.getFaviateBrandStoreListApi=function(t){return o.default.get("api/user.store.store/getFaviateBrandStoreList",t)};e.getBrandMasterApi=function(t){return o.default.get("api/user.appointment.index/index?sid="+t)};e.getBrandGoodsApi=function(t){return o.default.get("api/user.appointment.index/goods?sid="+t)};e.myStoreApi=function(){return o.default.get("api/user.store.store/myStore")};e.postTuangouquanList=function(t){return o.default.post("api/user.tuangouquan.index/index",t)};e.postTuangouquanReceive=function(t){return o.default.post("api/user.tuangouquan.index/receive",t)};e.postTuangouquanDetail=function(t){return o.default.post("api/user.tuangouquan.index/detail",t)};e.isShopBusinessApi=function(t){return o.default.get("api/user.store.store/isShopBusiness?sid="+t)}},"87a3":function(t,e,i){"use strict";var n=i("23c8"),o=i.n(n);o.a},"9cae":function(t,e,i){var n=i("cc53");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=i("967d").default;o("74ddcd86",n,!0,{sourceMap:!1,shadowMode:!1})},a524:function(t,e,i){"use strict";i.r(e);var n=i("6d8d"),o=i("6a55");for(var a in o)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return o[t]}))}(a);i("87a3");var r=i("828b"),s=Object(r["a"])(o["default"],n["b"],n["c"],!1,null,"056762e2",null,!1,n["a"],void 0);e["default"]=s.exports},a71b:function(t,e,i){"use strict";i.r(e);var n=i("ec01"),o=i("dc1c");for(var a in o)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return o[t]}))}(a);i("de1c");var r=i("828b"),s=Object(r["a"])(o["default"],n["b"],n["c"],!1,null,"6cf0f295",null,!1,n["a"],void 0);e["default"]=s.exports},afa5:function(t,e,i){var n=i("e9ea");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=i("967d").default;o("2626d00e",n,!0,{sourceMap:!1,shadowMode:!1})},cc53:function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为Tuniao UI的集成样式文件,为scss预处理器,其中包含了一些"tn-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * Tuniao UI自定义的css类名和scss变量,均以"tn-"开头,不会造成冲突,请放心使用 \n */.empty[data-v-6cf0f295]{position:relative;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:%?60?% %?0?%}.empty__icon .icon-icon[data-v-6cf0f295]{font-size:%?180?%;line-height:1;color:#f3f2f7}.empty__icon .icon-image[data-v-6cf0f295]{width:%?180?%;height:%?180?%}.empty__tips[data-v-6cf0f295]{color:#aaa;font-size:%?32?%;margin-top:%?20?%}.empty__custom[data-v-6cf0f295]{margin-top:%?24?%}',""]),t.exports=e},dc1c:function(t,e,i){"use strict";i.r(e);var n=i("5c2e"),o=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=o.a},dc1f:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={data:function(){return{}},computed:{themeBgColor:function(){return this.$isTheme()?"--theme-general-color":this.vuex_themeBgColor||""},themeOpacityBgColor:function(){return this.vuex_themeBgColor?"".concat(this.vuex_themeBgColor,"7F"):""},themeFontColor:function(){return this.$isTheme()?"--general-color-text":this.vuex_themeFontColor||""},themeBtnStyle:function(){var t={};return this.vuex_themeBgColor&&(t.backgroundColor=this.vuex_themeBgColor),this.vuex_themeFontColor&&(t.color=this.vuex_themeFontColor),this.$isTheme()&&(t.backgroundColor="var(--theme-general-color)",t.color="--general-color-text"),t},themeLineBtnStyle:function(){var t={};return this.vuex_themeBgColor&&(t.border="1rpx solid ".concat(this.vuex_themeBgColor),t.color=this.vuex_themeBgColor),this.$isTheme()&&(t.border="1rpx solid var(--theme-general-color)",t.color="var(--theme-general-color)"),t}}}},de1c:function(t,e,i){"use strict";var n=i("9cae"),o=i.n(n);o.a},e9ea:function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 下方引入的为Tuniao UI的集成样式文件,为scss预处理器,其中包含了一些"tn-"开头的自定义变量\n * 使用的时候,请将下面的一行复制到您的uniapp项目根目录的uni.scss中即可\n * Tuniao UI自定义的css类名和scss变量,均以"tn-"开头,不会造成冲突,请放心使用 \n */.tn-rate[data-v-687316f3]{display:inline-flex;align-items:center;margin:0;padding:0}.tn-rate__wrap__icon[data-v-687316f3]{position:relative;box-sizing:border-box}.tn-rate__wrap__icon--half[data-v-687316f3]{position:absolute;top:0;left:0;display:inline-block;overflow:hidden;width:50%}',""]),t.exports=e},ec01:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"empty"},[i("v-uni-view",{staticClass:"empty__icon"},[t.isImage?i("v-uni-view",{staticClass:"icon-image"},[i("v-uni-image",{staticClass:"image",attrs:{src:t.icon,mode:"aspectFill"}})],1):t._e(),i("v-uni-view",{staticClass:"icon-icon"},[i("v-uni-text",{class:["tn-icon-"+t.icon]})],1)],1),t.tips?i("v-uni-view",{staticClass:"empty__tips"},[t._v(t._s(t.tips))]):t._e(),i("v-uni-view",{staticClass:"empty__custom"},[t._t("default")],2)],1)},o=[]},f2b9:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"tn-rate-class tn-rate",attrs:{id:t.elId},on:{touchmove:function(e){e.stopPropagation(),e.preventDefault(),arguments[0]=e=t.$handleEvent(e),t.touchMove.apply(void 0,arguments)}}},t._l(t.count,(function(e,n){return i("v-uni-view",{key:n,staticClass:"tn-rate__wrap",class:[t.elClass]},[i("v-uni-view",{staticClass:"tn-rate__wrap__icon",class:["tn-icon-"+((t.allowHalf&&t.halfIcon?t.activeIndex>n+1:t.activeIndex>n)?t.elActionIcon:t.elInactionIcon)],style:[t.iconStyle(n)],on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.click(n+1,e)}}},[t.showHalfIcon(n)?i("v-uni-view",{staticClass:"tn-rate__wrap__icon--half",class:["tn-icon-"+t.elActionIcon],style:[t.halfIconStyle]}):t._e()],1)],1)})),1)},o=[]},fbdc:function(t,e,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("64aa"),i("c223"),i("fd3c");var o=n(i("dc1f")),a=n(i("c433")),r=n(i("a71b")),s=i("815c"),c=i("78b4"),u={props:{sid:{type:[String,Number],default:""}},components:{ImageGroup:a.default,Empty:r.default},mixins:[o.default],data:function(){return{storeInfo:{storeScore:5,goodsScore:5,packageScore:5,deliveryScore:100},comment:[],currentPage:1,pageSize:20,isLoadAll:!1}},created:function(){this.getStoreCommentData()},methods:{getStoreCommentData:function(){var t=this;(0,c.getMyCommentListApi)({sid:this.sid,page:this.currentPage,pSize:this.pageSize}).then((function(e){var i=e.comments;t.comment=t.comment.concat(i.map((function(t){return{id:t.id,avatar:t.avatar,nickname:t.mobile,scores:t.scores.length,addtime:t.addtime,note:(null===t||void 0===t?void 0:t.note)||"",images:(null===t||void 0===t?void 0:t.thumbs)||[],reply:{reply:(null===t||void 0===t?void 0:t.reply)||"",time:(null===t||void 0===t?void 0:t.replytime)||""},storeInfo:t.storeInfo}}))),i.length<t.pageSize&&(t.isLoadAll=!0)})).catch((function(e){console.error("[showcase-appraise]获取店铺评论列表失败",e),t.storeInfo.storeScore=5,t.storeInfo.goodsScore=5,t.storeInfo.packageScore=5,t.storeInfo.deliveryScore=100,t.comment=[],t.isLoadAll=!0}))},loadMoreCommentData:function(){this.isLoadAll||(this.currentPage++,this.getStoreCommentData())},deleteComment:function(t){var e=this;uni.showModal({title:"提示",content:"确定删除该评论吗?",success:function(i){i.confirm&&(console.log("用户点击确定"),(0,c.delCommentApi)({id:t}).then((function(){e.currentPage=1,e.comment=[],e.getStoreCommentData()})).catch((function(t){console.error("[showcase-appraise]删除评论失败",t)})))}})},formatPrice:s.formatPrice}};e.default=u},ff5a:function(t,e,i){"use strict";i("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("64aa");var n={name:"tn-rate",props:{value:{type:Number,default:0},count:{type:Number,default:5},minCount:{type:Number,default:0},disabled:{type:Boolean,default:!1},allowHalf:{type:Boolean,default:!1},size:{type:Number,default:32},activeIcon:{type:String,default:"star-fill"},inactiveIcon:{type:String,default:"star"},activeColor:{type:String,default:"#01BEFF"},inactiveColor:{type:String,default:"#AAAAAA"},gutter:{type:Number,default:10},colors:{type:Array,default:function(){return[]}},icons:{type:Array,default:function(){return[]}}},computed:{showHalfIcon:function(t){var e=this;return function(t){return e.allowHalf&&Math.ceil(e.activeIndex)===t+1&&e.halfIcon}},elActionIcon:function(){var t=this.icons.length;if(t&&t<=this.count){var e=Math.round(Math.ceil(this.activeIndex)/Math.round(this.count/t));return e<1?this.icons[0]:e>t?this.icons[t-1]:this.icons[e-1]}return this.activeIcon},elInactionIcon:function(){var t=this.icons.length;if(t&&t<=this.count){var e=Math.round(Math.ceil(this.activeIndex)/Math.round(this.count/t));return e<1?this.icons[0]:e>t?this.icons[t-1]:this.icons[e-1]}return this.inactiveIcon},elActionColor:function(){var t=this.colors.length;if(t&&t<=this.count){var e=Math.round(Math.ceil(this.activeIndex)/Math.round(this.count/t));return e<1?this.colors[0]:e>t?this.colors[t-1]:this.colors[e-1]}return this.activeColor},iconStyle:function(){var t=this;return function(e){var i={};return i.fontSize=t.$tn.string.getLengthUnitValue(t.size),i.padding="0 ".concat(t.$tn.string.getLengthUnitValue(t.gutter/2)),t.allowHalf&&t.halfIcon?i.color=t.activeIndex>e+1?t.elActionColor:t.inactiveColor:i.color=t.activeIndex>e?t.elActionColor:t.inactiveColor,i}},halfIconStyle:function(){var t={};return t.fontSize=this.$tn.string.getLengthUnitValue(this.size),t.padding="0 ".concat(this.$tn.string.getLengthUnitValue(this.gutter/2)),t.color=this.elActionColor,t}},data:function(){return{elId:this.$tn.uuid(),elClass:this.$tn.uuid(),starBoxLeft:0,activeIndex:this.value,starWidth:0,starWidthArr:[],halfIcon:!1}},watch:{value:function(t){this.activeIndex=t,this.allowHalf&&t%1===.5?this.halfIcon=!0:this.halfIcon=!1},size:function(){var t=this;this.$nextTick((function(){t.getElRectById(),t.getElRectByClass()}))}},mounted:function(){this.getElRectById(),this.getElRectByClass(),console.log("aaaaaaa",this.value),this.halfIcon=this.value%1===.5},methods:{getElRectById:function(){var t=this;this._tGetRect("#"+this.elId).then((function(e){t.starBoxLeft=e.left}))},getElRectByClass:function(){var t=this;this._tGetRect("."+this.elClass).then((function(e){t.starWidth=e.width;for(var i=0;i<t.count;i++)t.starWidthArr[i]=(i+1)*t.starWidth}))},touchMove:function(t){if(!this.disabled&&t.changedTouches[0]){var e=t.changedTouches[0].pageX,i=e-this.starBoxLeft;i<=0&&(this.activeIndex=0);var n=Math.ceil(i/this.starWidth);if(this.allowHalf){var o=this.starWidthArr[n-1]-this.starWidth/2;i<o?(this.halfIcon=!0,n-=.5):this.halfIcon=!1}this.activeIndex=n>this.count?this.count:n,this.activeIndex<this.minCount&&(this.activeIndex=this.minCount),this.emitEvent()}},click:function(t,e){if(!this.disabled){if(this.allowHalf){if(!e.changedTouches[0])return;var i=e.changedTouches[0].pageX,n=i-this.starBoxLeft,o=this.starWidthArr[t-1]-this.starWidth/2;this.halfIcon=n<o}1==t?this.allowHalf&&this.allowHalf?.5===this.activeIndex&&this.halfIcon||1===this.activeIndex&&!this.halfIcon?this.activeIndex=0:this.activeIndex=this.halfIcon?.5:1:1==this.activeIndex?this.activeIndex=0:this.activeIndex=1:this.activeIndex=this.allowHalf&&this.halfIcon?t-.5:t,this.activeIndex<this.minCount&&(this.activeIndex=this.minCount),this.emitEvent()}},emitEvent:function(){this.$emit("change",this.activeIndex),this.$emit("input",this.activeIndex)}}};e.default=n}}]);