pages-home-goodsdetail-GoodsEvaluation.0abc7763.js 18 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-home-goodsdetail-GoodsEvaluation"],{"098f":function(e,t,a){var i=a("24fb");t=i(!1),t.push([e.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/* 文章场景相关 */.scroll-view-wrapper[data-v-235d56ad]{display:flex;flex-direction:column}.scroll-view[data-v-235d56ad]{flex:1}.ui-evaluation .ui-evaluation-header[data-v-235d56ad]{background:#fff}.ui-evaluation .ui-evaluation-header .flex-header[data-v-235d56ad]{width:auto;display:flex;display:-webkit-flex;display:-moz-flex;flex-basis:100%;justify-content:space-around;align-content:center;align-items:center;height:2.2rem}.ui-evaluation .ui-evaluation-header .flex-header .div[data-v-235d56ad]{color:#a2a6ad;font-size:.7rem;height:1.2rem;border:.5px solid #eee;padding:0 .45rem;line-height:1.2rem;text-align:center;border-radius:1.2rem}.ui-evaluation .ui-evaluation-header .flex-header .div.active[data-v-235d56ad]{color:#fb2630;border:.5px solid #fb2630}.ui-evaluation .ui-evaluation-body[data-v-235d56ad]{padding:0 .75rem;background:#fff;box-sizing:border-box}.ui-evaluation .ui-evaluation-body .list[data-v-235d56ad]{padding:.75rem 0;border-bottom:.5px dashed #eee;color:#333;font-size:.7rem}.ui-evaluation .ui-evaluation-body .list .item[data-v-235d56ad]{overflow:hidden;padding-bottom:.75rem;display:flex;justify-content:space-between;align-content:center;align-items:center}.ui-evaluation .ui-evaluation-body .list .item .avatar[data-v-235d56ad]{width:2rem;height:2rem;border-radius:50%;margin-right:.3rem}.ui-evaluation .ui-evaluation-body .list .item .span[data-v-235d56ad]:first-child{display:flex;justify-content:space-around;align-content:center;align-items:center}.ui-evaluation .ui-evaluation-body .list .item .span:first-child .span[data-v-235d56ad]{margin-left:.75rem;color:#fff;font-size:.6rem}.ui-evaluation .ui-evaluation-body .list .item .span[data-v-235d56ad]:last-child{color:#999;font-size:.6rem}.ui-evaluation .ui-evaluation-body .list .item .span.good-review[data-v-235d56ad]{background:#fc2e39;width:1.8rem;height:.8rem;text-align:center;background-size:cover;line-height:.8rem;border-radius:.4rem}.ui-evaluation .ui-evaluation-body .list .item .span.medium-review[data-v-235d56ad]{background:#fb2630;width:1.8rem;height:.8rem;text-align:center;background-size:cover;line-height:.8rem;border-radius:.4rem}.ui-evaluation .ui-evaluation-body .list .item .span.bad-review[data-v-235d56ad]{background:#c3c3c3;width:1.8rem;height:.8rem;text-align:center;background-size:cover;line-height:.8rem;border-radius:.4rem}.ui-evaluation .ui-evaluation-body .list .p[data-v-235d56ad]{padding:0;margin:0;flex-basis:100%;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.ui-evaluation .ui-evaluation-body .list .explain[data-v-235d56ad]{color:orange}.ui-evaluation .list-empty[data-v-235d56ad]{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);text-align:center}.ui-evaluation .list-empty .empty-icon[data-v-235d56ad]{font-size:3rem;padding:1rem 0;color:#999}.ui-evaluation .list-empty .img[data-v-235d56ad]{width:2.75rem}.ui-evaluation .list-empty .p[data-v-235d56ad]{color:#7c7f88;font-size:.7rem;padding:0;margin:0;font-weight:400}.ui-evaluation .geval-image-list[data-v-235d56ad]{overflow:hidden;margin-top:1rem}.ui-evaluation .geval-image-list .geval-image-item[data-v-235d56ad]{width:33.33%;height:0;padding-bottom:33.33%;float:left;position:relative}.ui-evaluation .geval-image-list .geval-image-item .image-wrapper[data-v-235d56ad]{position:absolute;left:0;right:.1rem;top:0;bottom:.1rem}.ui-evaluation .geval-image-list .geval-image-item .image-wrapper .image[data-v-235d56ad]{width:100%;height:100%}',""]),e.exports=t},1845:function(e,t,a){"use strict";a.r(t);var i=a("1c6b"),n=a("b89a");for(var s in n)["default"].indexOf(s)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(s);a("5c4b");var r=a("f0c5"),o=Object(r["a"])(n["default"],i["b"],i["c"],!1,null,"235d56ad",null,!1,i["a"],void 0);t["default"]=o.exports},"1a2e":function(e,t,a){"use strict";a("7a82");var i=a("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(a("5530")),s=a("26cb"),r=a("de79"),o={name:"HomeBase",data:function(){return{page:"",cartNumber:0}},props:{show:{type:Boolean,default:!0}},computed:(0,n.default)((0,n.default)({},(0,s.mapState)({isOnline:function(e){return e.member.isOnline}})),{},{getCarCount:function(){return this.cartNumber>0&&this.cartNumber<100?this.cartNumber:this.cartNumber>=100?"99+":void 0}}),mounted:function(){var e=getCurrentPages(),t=e[e.length-1];this.page={route:t.route,options:t.options},this.page.options&&this.page.options.inviter_id&&this.memberInviterId({inviterId:this.page.options.inviter_id}),this.getCartCount()},methods:(0,n.default)((0,n.default)({},(0,s.mapMutations)({memberInviterId:"memberInviterId"})),{},{getCartCount:function(){var e=this;this.isOnline&&(0,r.cartQuantity)().then((function(t){t&&(e.cartNumber=t.result.cart_count)}))}})};t.default=o},"1c6b":function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return s})),a.d(t,"a",(function(){return i}));var i={pageMeta:a("6d42").default,uniNavBar:a("7bfb").default,uniPopup:a("3ae3").default},n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",[a("page-meta",{attrs:{"root-font-size":e.fontSize+"px"}}),a("home-base",{attrs:{show:!1}},[a("v-uni-view",{staticClass:"scroll-view-wrapper div container",staticStyle:{position:"absolute",top:"0",right:"0",left:"0",bottom:"0"}},[a("v-uni-view",{staticClass:"div common-header-wrap"},[a("v-uni-view",{staticClass:"status-holder"}),a("v-uni-view",{style:"height:"+e.navHeight+"px"}),a("v-uni-view",{staticClass:"common-header-holder"}),a("v-uni-view",{staticClass:"common-header-fixed"},[a("title-header"),a("uni-nav-bar",{staticClass:"common-header",attrs:{title:"商品评价","left-icon":"back"},on:{clickLeft:function(t){arguments[0]=t=e.$handleEvent(t),e.goBack()}}})],1)],1),a("v-uni-view",{staticClass:"scroll-view-wrapper div ui-evaluation",staticStyle:{height:"100%"}},[a("v-uni-view",{staticClass:"div ui-evaluation-header"},[a("v-uni-view",{staticClass:"div flex-header"},e._l(e.staticData,(function(t,i){return a("v-uni-view",{key:t.id,staticClass:"div",class:{active:e.currentTag==t.value},on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.changeTab(t.value,t.grade)}}},[e._v(e._s(t.name))])})),1)],1),a("v-uni-view",{staticClass:"scroll-view div",staticStyle:{position:"relative"}},[a("v-uni-scroll-view",{staticClass:"div ui-evaluation-body",staticStyle:{position:"absolute",top:"0",right:"0",left:"0",bottom:"0"},attrs:{"scroll-y":"true"},on:{scrolltolower:function(t){arguments[0]=t=e.$handleEvent(t),e.loadMore.apply(void 0,arguments)}}},e._l(e.reviewList,(function(t,i){return e.reviewList.length>0?a("v-uni-view",{key:i,staticClass:"div list"},[a("v-uni-view",{staticClass:"div item"},[a("v-uni-view",{staticClass:"span"},[a("v-uni-image",{staticClass:"img avatar",attrs:{mode:"aspectFit",src:t.member_avatar}}),e._v(e._s(t.geval_isanonymous?"匿名":t.geval_frommembername)),a("v-uni-view",{staticClass:"span",class:{"good-review":t.geval_scores>3,"medium-review":t.geval_scores>1,"bad-review":1==t.geval_scores}},[e._v(e._s(e.getGrade(t.geval_scores)))])],1),a("v-uni-text",{staticClass:"span"},[e._v(e._s(e.getTime(t.geval_addtime)))])],1),t.geval_content?a("v-uni-view",{staticClass:"p"},[e._v(e._s(t.geval_content))]):e._e(),t.geval_content?e._e():a("v-uni-view",{staticClass:"p"},[e._v("无评价信息")]),t.geval_explain?a("v-uni-view",{staticClass:"p explain"},[e._v("掌柜回复:"+e._s(t.geval_explain))]):e._e(),t.geval_image&&t.geval_image.length?a("v-uni-view",{staticClass:"div geval-image-list"},e._l(t.geval_image,(function(t,i){return a("v-uni-view",{key:i,staticClass:"div geval-image-item"},[a("v-uni-view",{staticClass:"div image-wrapper"},[a("v-uni-image",{staticClass:"img image",attrs:{mode:"aspectFit",src:t},on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.openImage(t)}}})],1)],1)})),1):e._e()],1):e._e()})),1),e.reviewList.length<=0?a("v-uni-view",{staticClass:"div list-empty"},[a("v-uni-view",{staticClass:"div iconfont empty-icon"},[e._v("")]),a("v-uni-view",{staticClass:"p"},[e._v("本商品暂无评价")])],1):e._e()],1),a("uni-popup",{ref:"isshow",staticClass:"popup"},[a("v-uni-image",{staticClass:"img",style:e.getBannerStyle,attrs:{mode:"aspectFit",src:e.showimage},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.hidePopup("isshow")}}})],1)],1)],1)],1)],1)},s=[]},2382:function(e,t,a){var i=a("24fb");t=i(!1),t.push([e.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/* 文章场景相关 */.status-holder[data-v-cb006efa]{background-color:#fff}.home-base[data-v-cb006efa]{display:flex;flex-direction:column}.content[data-v-cb006efa]{flex:1}.item-wrap[data-v-cb006efa]{position:relative}.image[data-v-cb006efa]{width:1rem;height:1rem;display:block;margin-left:auto;margin-right:auto;margin-top:.2rem;margin-bottom:.2rem}.icon[data-v-cb006efa]{position:absolute;right:.8rem;top:.2rem;font-size:.5rem;line-height:.7rem;width:.9rem;height:.7rem;background:#ef3338;border-radius:1rem;text-align:center;color:#fff}',""]),e.exports=t},"24f2":function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return n})),a.d(t,"a",(function(){}));var i=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"div home-base"},[i("v-uni-view",{staticClass:"status-holder"}),i("v-uni-view",{staticClass:"content"},[e._t("default")],2),e.show?i("v-uni-view",{staticClass:"div common-footer-wrap"},[i("v-uni-view",{staticClass:"common-footer"},[i("v-uni-view",{staticClass:"item-wrap",class:{active:"pages/home/index/Index"==e.page.route}},[i("v-uni-navigator",{staticClass:"item",attrs:{url:"/pages/home/index/Index","open-type":"reLaunch"}},["pages/home/index/Index"==e.page.route?i("v-uni-image",{staticClass:"img image",attrs:{mode:"aspectFit",src:a("0207")}}):i("v-uni-image",{staticClass:"img image",attrs:{mode:"aspectFit",src:a("241a")}}),i("v-uni-text",{staticClass:"span text"},[e._v("首页")])],1)],1),i("v-uni-view",{staticClass:"item-wrap",class:{active:"pages/home/goodsclass/Goodsclass"==e.page.route}},[i("v-uni-navigator",{staticClass:"item",attrs:{url:"/pages/home/goodsclass/Goodsclass"}},["pages/home/goodsclass/Goodsclass"==e.page.route?i("v-uni-image",{staticClass:"img image",attrs:{mode:"aspectFit",src:a("79bf")}}):i("v-uni-image",{staticClass:"img image",attrs:{mode:"aspectFit",src:a("d86e")}}),i("v-uni-text",{staticClass:"span text"},[e._v("分类")])],1)],1),i("v-uni-view",{staticClass:"item-wrap",class:{active:"pages/home/search/Search"==e.page.route}},[i("v-uni-navigator",{staticClass:"item",attrs:{url:"/pages/home/search/Search"}},["pages/home/search/Search"==e.page.route?i("v-uni-image",{staticClass:"img image",attrs:{mode:"aspectFit",src:a("492b")}}):i("v-uni-image",{staticClass:"img image",attrs:{mode:"aspectFit",src:a("1702")}}),i("v-uni-text",{staticClass:"span text"},[e._v("搜索")])],1)],1),i("v-uni-view",{staticClass:"item-wrap",class:{active:"pages/member/cart/Cart"==e.page.route}},[i("v-uni-navigator",{staticClass:"item",attrs:{url:"/pages/member/cart/Cart"}},["pages/member/cart/Cart"==e.page.route?i("v-uni-image",{staticClass:"img image",attrs:{mode:"aspectFit",src:a("62a8")}}):i("v-uni-image",{staticClass:"img image",attrs:{mode:"aspectFit",src:a("8559")}}),i("v-uni-text",{staticClass:"span text"},[e._v("购物车")]),e.cartNumber>0?i("v-uni-text",{staticClass:"span icon"},[e._v(e._s(e.getCarCount))]):e._e()],1)],1),i("v-uni-view",{staticClass:"item-wrap",class:{active:"pages/member/index/Index"==e.page.route}},[i("v-uni-navigator",{staticClass:"item",attrs:{url:"/pages/member/index/Index","open-type":"reLaunch"}},["pages/member/index/Index"==e.page.route?i("v-uni-image",{staticClass:"img image",attrs:{mode:"aspectFit",src:a("857e")}}):i("v-uni-image",{staticClass:"img image",attrs:{mode:"aspectFit",src:a("e31d")}}),i("v-uni-text",{staticClass:"span text"},[e._v("我的")])],1)],1)],1)],1):e._e()],1)},n=[]},"3d3d":function(e,t,a){"use strict";a.r(t);var i=a("24f2"),n=a("ee69");for(var s in n)["default"].indexOf(s)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(s);a("9697");var r=a("f0c5"),o=Object(r["a"])(n["default"],i["b"],i["c"],!1,null,"cb006efa",null,!1,i["a"],void 0);t["default"]=o.exports},"4d1a":function(e,t,a){"use strict";a("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.header=t.evaluation=void 0;t.header=[{name:"商品",id:0,isActive:!1},{name:"详情",id:1,isActive:!1},{name:"评价",id:2,isActive:!1}];t.evaluation=[{name:"全部",id:1,isActive:!1,value:"total",grade:0},{name:"好评",id:2,isActive:!1,value:"good",grade:1},{name:"中评",id:3,isActive:!1,value:"medium",grade:2},{name:"差评",id:4,isActive:!1,value:"bad",grade:3}]},"5c4b":function(e,t,a){"use strict";var i=a("ea98"),n=a.n(i);n.a},"786c":function(e,t,a){"use strict";a("7a82");var i=a("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a("99af");var n=a("0b9f"),s=i(a("cce0")),r=i(a("3d3d")),o=(a("26cb"),i(a("79b8"))),u=a("4d1a"),d=a("ea56"),l={data:function(){return{navHeight:0,screenWidth:0,showimage:"",staticData:u.evaluation,id:0,currentTag:"total",grade:0,subTotal:{},reviewList:[],page:0,loading:!1,hasmore:!0}},components:{TitleHeader:s.default,HomeBase:r.default,EmptyRecord:o.default},onLoad:function(e){this.id=e.goods_id,this.loadMore()},computed:{fontSize:function(){return(0,n.getFontSize)()},getBannerStyle:function(){var e=uni.getSystemInfoSync(),t=e.windowWidth,a=e.windowHeight,i=t,n=a;return"width:"+i+"px;height:"+n+"px"}},mounted:function(){this.screenWidth=uni.getSystemInfoSync().screenWidth},methods:{goBack:function(){uni.navigateBack({delta:1})},showPopup:function(e){this.$refs[e].open()},hidePopup:function(e){this.$refs[e].close()},openImage:function(e){this.showimage=e,this.isshow=!0},loadMore:function(){this.loading||(this.loading=!0,this.hasmore&&(this.page=++this.page,this.getReviewList(!0)))},getReviewList:function(e){var t=this;(0,d.getReviewList)(this.id,this.grade,10,this.page).then((function(a){t.loading=!1,a&&(t.reviewList=e?t.reviewList.concat(a.result.goods_eval_list):a.result.goods_eval_list,t.hasmore=a.result.hasmore)}))},changeTab:function(e,t){this.currentTag=e,this.grade=t,this.getReviewList(!1)},getGrade:function(e){return 1==e?"差评":e>3?"好评":"中评"},getTime:function(e){var t=new Date(1e3*e),a=t.getFullYear(),i=t.getMonth()+1,n=t.getDate();return a+"-"+i+"-"+n}}};t.default=l},"79b8":function(e,t,a){"use strict";a.r(t);var i=a("bba65"),n=a("8909");for(var s in n)["default"].indexOf(s)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(s);var r=a("f0c5"),o=Object(r["a"])(n["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);t["default"]=o.exports},8909:function(e,t,a){"use strict";a.r(t);var i=a("a2ce"),n=a.n(i);for(var s in i)["default"].indexOf(s)<0&&function(e){a.d(t,e,(function(){return i[e]}))}(s);t["default"]=n.a},9697:function(e,t,a){"use strict";var i=a("fe46"),n=a.n(i);n.a},a2ce:function(e,t,a){"use strict";a("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={name:"EmptyRecord",data:function(){return{}},props:{},methods:{}}},b89a:function(e,t,a){"use strict";a.r(t);var i=a("786c"),n=a.n(i);for(var s in i)["default"].indexOf(s)<0&&function(e){a.d(t,e,(function(){return i[e]}))}(s);t["default"]=n.a},bba65:function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return n})),a.d(t,"a",(function(){}));var i=function(){var e=this.$createElement,t=this._self._c||e;return t("v-uni-view",{staticClass:"div common-empty-record"},[t("v-uni-text",{staticClass:"i iconfont"},[this._v("")]),t("v-uni-view",{staticClass:"p"},[this._v("没有找到相关记录")])],1)},n=[]},ea98:function(e,t,a){var i=a("098f");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var n=a("4f06").default;n("66b4701a",i,!0,{sourceMap:!1,shadowMode:!1})},ee69:function(e,t,a){"use strict";a.r(t);var i=a("1a2e"),n=a.n(i);for(var s in i)["default"].indexOf(s)<0&&function(e){a.d(t,e,(function(){return i[e]}))}(s);t["default"]=n.a},fe46:function(e,t,a){var i=a("2382");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var n=a("4f06").default;n("c0a246c6",i,!0,{sourceMap:!1,shadowMode:!1})}}]);