1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-comment-index"],{"06ca":function(t,e,n){"use strict";n.r(e);var i=n("fcaf"),a=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=a.a},"0c49":function(t,e,n){"use strict";n.r(e);var i=n("de2e"),a=n("06ca");for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(s);n("cdfd");var o=n("828b"),r=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"671bcb72",null,!1,i["a"],void 0);e["default"]=r.exports},2586:function(t,e,n){"use strict";n.r(e);var i=n("7b6c"),a=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=a.a},"307d":function(t,e,n){"use strict";n.r(e);var i=n("dd41"),a=n("75d3");for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(s);n("5a41");var o=n("828b"),r=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"306ccf1a",null,!1,i["a"],void 0);e["default"]=r.exports},"53b2":function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.total=e.listRows=e.list=void 0;var a=i(n("9b1b")),s=i(n("3318")),o={list:"comment/list",listRows:"comment/listRows",total:"comment/total"};e.list=function(t,e,n){return s.default.get(o.list,(0,a.default)((0,a.default)({},e),{},{goodsId:t}),n)};e.listRows=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;return s.default.get(o.listRows,{goodsId:t,limit:e})};e.total=function(t){return s.default.get(o.total,{goodsId:t})}},5406:function(t,e,n){var i=n("5800");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("967d").default;a("672ae5a1",i,!0,{sourceMap:!1,shadowMode:!1})},"573a":function(t,e,n){var i=n("91e8");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("967d").default;a("5a1eaf4b",i,!0,{sourceMap:!1,shadowMode:!1})},5800:function(t,e,n){var i=n("c86c");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */\n/* 引入uView全局scss变量文件 */.avatar-image .image[data-v-306ccf1a]{display:block;width:%?60?%;height:%?60?%;border-radius:50%;border-style:solid}',""]),t.exports=e},"5a41":function(t,e,n){"use strict";var i=n("5406"),a=n.n(i);a.a},7307:function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("64aa");var i={props:{url:{type:String,default:""},width:{type:Number,default:90},borderWidth:{type:Number,default:0},borderColor:{type:String,default:"#000000"}},data:function(){return{}},methods:{}};e.default=i},"75d3":function(t,e,n){"use strict";n.r(e);var i=n("7307"),a=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=a.a},"7b6c":function(t,e,n){"use strict";n("6a54");var i=n("3639").default,a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("bf0f"),n("fd3c");var s=a(n("292a")),o=a(n("bd05")),r=a(n("307d")),c=n("d45e"),u=i(n("53b2")),d=[{name:"全部",scoreType:-1},{name:"好评",scoreType:10},{name:"中评",scoreType:20},{name:"差评",scoreType:30}],l={components:{MescrollBody:s.default,AvatarImage:r.default},mixins:[o.default],data:function(){return{goodsId:null,curTab:0,list:(0,c.getEmptyPaginateObj)(),total:{all:0,negative:0,praise:0,review:0},rates:{10:5,20:3,30:1},tabs:d,upOption:{auto:!0,page:{size:15},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 n=t.data.length,i=t.data.total;e.mescroll.endBySize(n,i)})).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(n,i){u.list(e.goodsId,{scoreType:e.getScoreType(),page:t},{load:!1}).then((function(i){var a=i.data.list;e.list.data=(0,c.getMoreListData)(a,e.list,t),n(a)}))}))},getScoreType:function(){return this.tabs[this.curTab].scoreType},getTotal:function(){var t=this;u.total(t.goodsId).then((function(e){var n=e.data.total;t.getTabs(n)}))},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){this.curTab=t,this.onRefreshList()},onRefreshList:function(){var t=this;this.list=(0,c.getEmptyPaginateObj)(),setTimeout((function(){t.mescroll.resetUpScroll()}),120)},onPreviewImages:function(t,e){var n=this.list.data[t].images,i=n.map((function(t){return t.image_url}));uni.previewImage({current:i[e],urls:i})}}};e.default=l},"8bbd":function(t,e,n){"use strict";var i=n("9d84"),a=n.n(i);a.a},"91e8":function(t,e,n){var i=n("c86c");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */\n/* 引入uView全局scss变量文件 */.u-rate[data-v-671bcb72]{display:-webkit-inline-flex;display:inline-flex;align-items:center;margin:0;padding:0}.u-icon[data-v-671bcb72]{box-sizing:border-box}',""]),t.exports=e},"98bc":function(t,e,n){var i=n("c86c");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */\n/* 引入uView全局scss变量文件 */.comment-item[data-v-398e1d95]{padding:%?30?%;box-sizing:border-box;border-bottom:%?1?% solid #f7f7f7;background:#fff}.item-head[data-v-398e1d95]{display:flex;align-items:center}.item-head .user-info[data-v-398e1d95]{margin-right:%?15?%;display:flex;align-items:center}.item-head .user-info .user-avatar[data-v-398e1d95]{margin-right:%?15?%}.item-head .user-info .user-name[data-v-398e1d95]{color:#999}.item-content[data-v-398e1d95]{font-size:%?30?%;color:#333;margin:%?16?% 0}.images-list[data-v-398e1d95]::after{clear:both;content:" ";display:table}.images-list .image-preview[data-v-398e1d95]{float:left;margin-bottom:%?15?%;margin-right:%?15?%}.images-list .image-preview[data-v-398e1d95]:nth-child(3n+0){margin-right:0}.images-list .image-preview .image[data-v-398e1d95]{display:block;width:%?220?%;height:%?220?%}.goods-props[data-v-398e1d95]{font-size:%?24?%;color:#999}.goods-props .goods-props-item[data-v-398e1d95]{float:left}.goods-props .goods-props-item .group-name[data-v-398e1d95]{margin-right:%?6?%}',""]),t.exports=e},"9d84":function(t,e,n){var i=n("98bc");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("967d").default;a("29830f0c",i,!0,{sourceMap:!1,shadowMode:!1})},b8b9:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return i}));var i={uTabs:n("d87a").default,uRate:n("0c49").default},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("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)}}},[n("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)}}}),n("v-uni-view",{staticClass:"comment-list"},t._l(t.list.data,(function(e,i){return n("v-uni-view",{key:i,staticClass:"comment-item"},[n("v-uni-view",{staticClass:"item-head"},[n("v-uni-view",{staticClass:"user-info"},[n("avatar-image",{staticClass:"user-avatar",attrs:{url:e.user.avatar_url,width:50}}),n("v-uni-text",{staticClass:"user-name f-26"},[t._v(t._s(e.user.nick_name))])],1),n("u-rate",{attrs:{"active-color":"#f4a213",current:t.rates[e.score],disabled:!0}}),n("v-uni-view",{staticClass:"flex-box f-22 col-9 t-r"},[t._v(t._s(e.create_time))])],1),n("v-uni-view",{staticClass:"item-content m-top20"},[n("v-uni-text",{staticClass:"f-26"},[t._v(t._s(e.content))])],1),e.images.length?n("v-uni-view",{staticClass:"images-list clearfix"},t._l(e.images,(function(e,a){return n("v-uni-view",{key:a,staticClass:"image-preview"},[n("v-uni-image",{staticClass:"image",attrs:{mode:"aspectFill",src:e.image_url},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onPreviewImages(i,a)}}})],1)})),1):t._e(),n("v-uni-view",{staticClass:"goods-props clearfix"},t._l(e.orderGoods.goods_props,(function(e,i){return n("v-uni-view",{key:i,staticClass:"goods-props-item"},[n("v-uni-text",{staticClass:"group-name"},[t._v(t._s(e.group.name)+":")]),n("v-uni-text",[t._v(t._s(e.value.name)+";")])],1)})),1)],1)})),1)],1)},s=[]},cbe3:function(t,e,n){"use strict";n.r(e);var i=n("b8b9"),a=n("2586");for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(s);n("8bbd");var o=n("828b"),r=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"398e1d95",null,!1,i["a"],void 0);e["default"]=r.exports},cdfd:function(t,e,n){"use strict";var i=n("573a"),a=n.n(i);a.a},dd41:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this.$createElement,e=this._self._c||t;return e("v-uni-view",{staticClass:"avatar-image"},[e("v-uni-image",{staticClass:"image",style:{width:this.width+"rpx",height:this.width+"rpx",borderWidth:this.borderWidth+"rpx",borderColor:this.borderColor},attrs:{src:this.url?this.url:"/static/default-avatar.png"}})],1)},a=[]},de2e:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return i}));var i={uIcon:n("65b8").default},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("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,i){return n("v-uni-view",{key:i,staticClass:"u-star-wrap",class:[t.elClass]},[n("u-icon",{attrs:{name:t.activeIndex>i?t.elActiveIcon:t.inactiveIcon,color:t.activeIndex>i?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(i),percent:t.decimal,"inactive-color":t.inactiveColor},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.click(i+1,e)}}})],1)})),1)},s=[]},fcaf:function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("64aa"),n("e966");var i={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 n=0;n<t.count;n++)t.starWidthArr[n]=(n+1)*t.starWidth}))},touchMove:function(t){if(!this.disabled&&t.changedTouches[0]){var e=t.changedTouches[0].pageX,n=e-this.starBoxLeft;n<=0&&(this.activeIndex=0);var i=Math.ceil(n/this.starWidth);this.activeIndex=i>this.count?this.count:i,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=i}}]); |