pages-comment-index.854cfd3d.js 6.8 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-comment-index"],{"14ab":function(t,e,a){var n=a("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-186e7982]{padding:%?30?%;box-sizing:border-box;border-bottom:%?1?% solid #f7f7f7;background:#fff}.item-head[data-v-186e7982]{display:flex;align-items:center}.item-head .user-info[data-v-186e7982]{margin-right:%?15?%;display:flex;align-items:center}.item-head .user-info .user-avatar[data-v-186e7982]{margin-right:%?15?%}.item-head .user-info .user-name[data-v-186e7982]{color:#999}.item-content[data-v-186e7982]{font-size:%?30?%;color:#333;margin:%?16?% 0}.images-list[data-v-186e7982]::after{clear:both;content:" ";display:table}.images-list .image-preview[data-v-186e7982]{float:left;margin-bottom:%?15?%;margin-right:%?15?%}.images-list .image-preview[data-v-186e7982]:nth-child(3n+0){margin-right:0}.images-list .image-preview .image[data-v-186e7982]{display:block;width:%?220?%;height:%?220?%}.goods-props[data-v-186e7982]{font-size:%?24?%;color:#999}.goods-props .goods-props-item[data-v-186e7982]{float:left}.goods-props .goods-props-item .group-name[data-v-186e7982]{margin-right:%?6?%}',""]),t.exports=e},4434:function(t,e,a){"use strict";var n=a("e326"),i=a.n(n);i.a},"4a17":function(t,e,a){"use strict";var n=a("dbce"),i=a("4ea4");a("d81d"),a("d3b7"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=i(a("dc05")),r=i(a("f8d1")),o=i(a("5af8")),c=a("57c6"),u=n(a("7dbb")),l=15,d=[{name:"全部",scoreType:-1},{name:"好评",scoreType:10},{name:"中评",scoreType:20},{name:"差评",scoreType:30}],f={components:{MescrollBody:s.default,AvatarImage:o.default},mixins:[r.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:l},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 a=t.data.length,n=t.data.total;e.mescroll.endBySize(a,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(a,n){u.list(e.goodsId,{scoreType:e.getScoreType(),page:t},{load:!1}).then((function(n){var i=n.data.list;e.list.data=(0,c.getMoreListData)(i,e.list,t),a(i)}))}))},getScoreType:function(){return this.tabs[this.curTab].scoreType},getTotal:function(){var t=this;u.total(t.goodsId).then((function(e){var a=e.data.total;t.getTabs(a)}))},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,c.getEmptyPaginateObj)(),setTimeout((function(){t.mescroll.resetUpScroll()}),120)},onPreviewImages:function(t,e){var a=this,n=a.list.data[t].images,i=n.map((function(t){return t.image_url}));uni.previewImage({current:i[e],urls:i})}}};e.default=f},"4a90":function(t,e,a){"use strict";a.r(e);var n=a("dfeb"),i=a("bf95");for(var s in i)"default"!==s&&function(t){a.d(e,t,(function(){return i[t]}))}(s);a("4434");var r,o=a("f0c5"),c=Object(o["a"])(i["default"],n["b"],n["c"],!1,null,"186e7982",null,!1,n["a"],r);e["default"]=c.exports},bf95:function(t,e,a){"use strict";a.r(e);var n=a("4a17"),i=a.n(n);for(var s in n)"default"!==s&&function(t){a.d(e,t,(function(){return n[t]}))}(s);e["default"]=i.a},dfeb:function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return s})),a.d(e,"a",(function(){return n}));var n={uTabs:a("4d81").default,uRate:a("406d").default},i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("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)}}},[a("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)}}}),a("v-uni-view",{staticClass:"comment-list"},t._l(t.list.data,(function(e,n){return a("v-uni-view",{key:n,staticClass:"comment-item"},[a("v-uni-view",{staticClass:"item-head"},[a("v-uni-view",{staticClass:"user-info"},[a("avatar-image",{staticClass:"user-avatar",attrs:{url:e.user.avatar_url,width:50}}),a("v-uni-text",{staticClass:"user-name f-26"},[t._v(t._s(e.user.nick_name))])],1),a("u-rate",{attrs:{"active-color":"#f4a213",current:t.rates[e.score],disabled:!0}}),a("v-uni-view",{staticClass:"flex-box f-22 col-9 t-r"},[t._v(t._s(e.create_time))])],1),a("v-uni-view",{staticClass:"item-content m-top20"},[a("v-uni-text",{staticClass:"f-26"},[t._v(t._s(e.content))])],1),e.images.length?a("v-uni-view",{staticClass:"images-list clearfix"},t._l(e.images,(function(e,i){return a("v-uni-view",{key:i,staticClass:"image-preview"},[a("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,i)}}})],1)})),1):t._e(),a("v-uni-view",{staticClass:"goods-props clearfix"},t._l(e.orderGoods.goods_props,(function(e,n){return a("v-uni-view",{key:n,staticClass:"goods-props-item"},[a("v-uni-text",{staticClass:"group-name"},[t._v(t._s(e.group.name)+":")]),a("v-uni-text",[t._v(t._s(e.value.name)+";")])],1)})),1)],1)})),1)],1)},s=[]},e326:function(t,e,a){var n=a("14ab");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=a("4f06").default;i("43fac606",n,!0,{sourceMap:!1,shadowMode:!1})}}]);