| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-comment-index"],{1224:function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return n}));var n={uIcon:i("c3aa").default},a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"u-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:"u-star-wrap",class:[t.elClass]},[i("u-icon",{attrs:{name:t.activeIndex>n?t.elActiveIcon:t.inactiveIcon,color:t.activeIndex>n?t.elActiveColor:t.inactiveColor,"custom-style":{fontSize:t.size+"rpx",padding:"0 "+t.gutter/2+"rpx"},"custom-prefix":t.customPrefix,"show-decimal-icon":t.showDecimalIcon(n),percent:t.decimal,"inactive-color":t.inactiveColor},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.click(n+1,e)}}})],1)})),1)},r=[]},2812:function(t,e,i){var n=i("cccc");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("4f06").default;a("06a850c5",n,!0,{sourceMap:!1,shadowMode:!1})},"406d":function(t,e,i){"use strict";i.r(e);var n=i("1224"),a=i("fb4b");for(var r in a)"default"!==r&&function(t){i.d(e,t,(function(){return a[t]}))}(r);i("d986");var s,o=i("f0c5"),c=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"0bf62930",null,!1,n["a"],s);e["default"]=c.exports},"4a17":function(t,e,i){"use strict";var n=i("dbce"),a=i("4ea4");i("d81d"),i("d3b7"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(i("dc05")),s=a(i("f8d1")),o=i("57c6"),c=n(i("7dbb")),u=15,l=[{name:"全部",scoreType:-1},{name:"好评",scoreType:10},{name:"中评",scoreType:20},{name:"差评",scoreType:30}],d={components:{MescrollBody:r.default},mixins:[s.default],data:function(){return{goodsId:null,curTab:0,list:(0,o.getEmptyPaginateObj)(),total:{all:0,negative:0,praise:0,review:0},rates:{10:5,20:3,30:1},tabs:l,upOption:{auto:!0,page:{size:u},noMoreSize:4,empty:{tip:"亲,暂无相关商品评价"}}}},onLoad:function(t){this.goodsId=t.goodsId,this.getTotal()},methods:{upCallback:function(t){var e=this;e.getCommentList(t.num).then((function(t){var i=t.data.length,n=t.data.total;e.mescroll.endBySize(i,n)})).catch((function(){return e.mescroll.endErr()}))},getCommentList:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this;return new Promise((function(i,n){c.list(e.goodsId,{scoreType:e.getScoreType(),page:t},{load:!1}).then((function(n){var a=n.data.list;e.list.data=(0,o.getMoreListData)(a,e.list,t),i(a)}))}))},getScoreType:function(){return this.tabs[this.curTab].scoreType},getTotal:function(){var t=this;c.total(t.goodsId).then((function(e){var i=e.data.total;t.getTabs(i)}))},getTabs:function(t){var e=this.tabs;e[0].name="全部(".concat(t.all,")"),e[1].name="好评(".concat(t.praise,")"),e[2].name="中评(".concat(t.review,")"),e[3].name="差评(".concat(t.negative,")")},onChangeTab:function(t){var e=this;e.curTab=t,e.onRefreshList()},onRefreshList:function(){var t=this;this.list=(0,o.getEmptyPaginateObj)(),setTimeout((function(){t.mescroll.resetUpScroll()}),120)},onPreviewImages:function(t,e){var i=this,n=i.list.data[t].images,a=n.map((function(t){return t.image_url}));uni.previewImage({current:a[e],urls:a})}}};e.default=d},"4a90":function(t,e,i){"use strict";i.r(e);var n=i("90d6"),a=i("bf95");for(var r in a)"default"!==r&&function(t){i.d(e,t,(function(){return a[t]}))}(r);i("efd4");var s,o=i("f0c5"),c=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"0138708c",null,!1,n["a"],s);e["default"]=c.exports},"7dbb":function(t,e,i){"use strict";var n=i("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.total=e.listRows=e.list=void 0;var a=n(i("5530")),r=n(i("2827")),s={list:"comment/list",listRows:"comment/listRows",total:"comment/total"},o=function(t,e,i){return r.default.get(s.list,(0,a.default)((0,a.default)({},e),{},{goodsId:t}),i)};e.list=o;var c=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;return r.default.get(s.listRows,{goodsId:t,limit:e})};e.listRows=c;var u=function(t){return r.default.get(s.total,{goodsId:t})};e.total=u},"7eed":function(t,e,i){"use strict";i("a9e3"),i("e25e"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"u-rate",props:{value:{type:[Number,String],default:-1},count:{type:[Number,String],default:5},current:{type:[Number,String],default:0},disabled:{type:Boolean,default:!1},size:{type:[Number,String],default:32},inactiveColor:{type:String,default:"#b2b2b2"},activeColor:{type:String,default:"#FA3534"},gutter:{type:[Number,String],default:10},minCount:{type:[Number,String],default:0},allowHalf:{type:Boolean,default:!1},activeIcon:{type:String,default:"star-fill"},inactiveIcon:{type:String,default:"star"},customPrefix:{type:String,default:"uicon"},colors:{type:Array,default:function(){return[]}},icons:{type:Array,default:function(){return[]}}},data:function(){return{elId:this.$u.guid(),elClass:this.$u.guid(),starBoxLeft:0,activeIndex:-1!=this.value?this.value:this.current,starWidth:0,starWidthArr:[]}},watch:{current:function(t){this.activeIndex=t},value:function(t){this.activeIndex=t}},computed:{decimal:function(){return this.disabled?100*this.activeIndex%100:this.allowHalf?50:void 0},elActiveIcon:function(){var t=this.icons.length;if(t&&t<=this.count){var e=Math.round(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},elActiveColor:function(){var t=this.colors.length;if(t&&t<=this.count){var e=Math.round(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}},methods:{getElRectById:function(){var t=this;this.$u.getRect("#"+this.elId).then((function(e){t.starBoxLeft=e.left}))},getElRectByClass:function(){var t=this;this.$u.getRect("."+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);this.activeIndex=n>this.count?this.count:n,this.activeIndex<this.minCount&&(this.activeIndex=this.minCount),this.emitEvent()}},click:function(t,e){this.disabled||(this.allowHalf,1==t?1==this.activeIndex?this.activeIndex=0:this.activeIndex=1:this.activeIndex=t,this.activeIndex<this.minCount&&(this.activeIndex=this.minCount),this.emitEvent())},emitEvent:function(){this.$emit("change",this.activeIndex),-1!=this.value&&this.$emit("input",this.activeIndex)},showDecimalIcon:function(t){return this.disabled&&parseInt(this.activeIndex)===t}},mounted:function(){this.getElRectById(),this.getElRectByClass()}};e.default=n},"90d6":function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return n}));var n={uTabs:i("4d81").default,uRate:i("406d").default},a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("mescroll-body",{ref:"mescrollRef",attrs:{sticky:!0,down:{use:!1},up:t.upOption},on:{init:function(e){arguments[0]=e=t.$handleEvent(e),t.mescrollInit.apply(void 0,arguments)},up:function(e){arguments[0]=e=t.$handleEvent(e),t.upCallback.apply(void 0,arguments)}}},[i("u-tabs",{attrs:{list:t.tabs,"is-scroll":!1,current:t.curTab,"active-color":"#FA2209",duration:.2},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.onChangeTab.apply(void 0,arguments)}}}),i("v-uni-view",{staticClass:"comment-list"},t._l(t.list.data,(function(e,n){return i("v-uni-view",{key:n,staticClass:"comment-item"},[i("v-uni-view",{staticClass:"item-head"},[i("v-uni-view",{staticClass:"user-info"},[i("v-uni-image",{staticClass:"user-avatar",attrs:{mode:"aspectFill",src:e.user.avatar_url}}),i("v-uni-text",{staticClass:"user-name f-26"},[t._v(t._s(e.user.nick_name))])],1),i("u-rate",{attrs:{"active-color":"#f4a213",current:t.rates[e.score],disabled:!0}}),i("v-uni-view",{staticClass:"flex-box f-22 col-9 t-r"},[t._v(t._s(e.create_time))])],1),i("v-uni-view",{staticClass:"item-content m-top20"},[i("v-uni-text",{staticClass:"f-26"},[t._v(t._s(e.content))])],1),e.images.length?i("v-uni-view",{staticClass:"images-list clearfix"},t._l(e.images,(function(e,a){return i("v-uni-view",{key:a,staticClass:"image-preview"},[i("v-uni-image",{staticClass:"image",attrs:{mode:"aspectFill",src:e.image_url},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onPreviewImages(n,a)}}})],1)})),1):t._e(),i("v-uni-view",{staticClass:"goods-props clearfix"},t._l(e.orderGoods.goods_props,(function(e,n){return i("v-uni-view",{key:n,staticClass:"goods-props-item"},[i("v-uni-text",{staticClass:"group-name"},[t._v(t._s(e.group.name)+":")]),i("v-uni-text",[t._v(t._s(e.value.name)+";")])],1)})),1)],1)})),1)],1)},r=[]},a693:function(t,e,i){var n=i("c185");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("4f06").default;a("daceb132",n,!0,{sourceMap:!1,shadowMode:!1})},bf95:function(t,e,i){"use strict";i.r(e);var n=i("4a17"),a=i.n(n);for(var r in n)"default"!==r&&function(t){i.d(e,t,(function(){return n[t]}))}(r);e["default"]=a.a},c185:function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */\r\n/* 引入uView全局scss变量文件 */.u-rate[data-v-0bf62930]{display:-webkit-inline-flex;display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:0;padding:0}.u-icon[data-v-0bf62930]{-webkit-box-sizing:border-box;box-sizing:border-box}',""]),t.exports=e},cccc:function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */\r\n/* 引入uView全局scss变量文件 */.comment-item[data-v-0138708c]{padding:%?30?%;-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom:%?1?% solid #f7f7f7;background:#fff}.item-head[data-v-0138708c]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.item-head .user-info[data-v-0138708c]{margin-right:%?15?%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.item-head .user-info .user-avatar[data-v-0138708c]{width:%?50?%;height:%?50?%;-webkit-border-radius:50%;border-radius:50%;margin-right:%?15?%}.item-head .user-info .user-name[data-v-0138708c]{color:#999}.item-content[data-v-0138708c]{font-size:%?30?%;color:#333;margin:%?16?% 0}.images-list[data-v-0138708c]::after{clear:both;content:" ";display:table}.images-list .image-preview[data-v-0138708c]{float:left;margin-bottom:%?15?%;margin-right:%?15?%}.images-list .image-preview[data-v-0138708c]:nth-child(3n+0){margin-right:0}.images-list .image-preview .image[data-v-0138708c]{display:block;width:%?220?%;height:%?220?%}.goods-props[data-v-0138708c]{font-size:%?24?%;color:#999}.goods-props .goods-props-item[data-v-0138708c]{float:left}.goods-props .goods-props-item .group-name[data-v-0138708c]{margin-right:%?6?%}',""]),t.exports=e},d986:function(t,e,i){"use strict";var n=i("a693"),a=i.n(n);a.a},efd4:function(t,e,i){"use strict";var n=i("2812"),a=i.n(n);a.a},fb4b:function(t,e,i){"use strict";i.r(e);var n=i("7eed"),a=i.n(n);for(var r in n)"default"!==r&&function(t){i.d(e,t,(function(){return n[t]}))}(r);e["default"]=a.a}}]);
|