comment.js 2.4 KB

1
  1. require('./common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageA/comment"],{"1dd3":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return a}));var a={uniRate:function(){return n.e("uni_modules/uni-rate/components/uni-rate/uni-rate").then(n.bind(null,"6351"))}},i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.__map(t.commentlist,(function(e,n){var a=t.__get_orig(e),i=e.member.nickname.slice(0,1),o=e.member.nickname.slice(-1),r=t.timeSince(e.created_at),u=e.image.split(",");return{$orig:a,g0:i,g1:o,m0:r,l0:u}})));t.$mp.data=Object.assign({},{$root:{l1:n}})},o=[]},"25e3":function(t,e,n){"use strict";n.r(e);var a=n("1dd3"),i=n("5868");for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n("daaf");var r=n("828b"),u=Object(r["a"])(i["default"],a["b"],a["c"],!1,null,"1b3911bd",null,!1,a["a"],void 0);e["default"]=u.exports},"50e1":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={data:function(){return{merchant_goods_id:"",commentlist:[],rate:""}},onLoad:function(t){this.merchant_goods_id=t.id,this.comment()},computed:{i18n:function(){return this.$t("index")}},methods:{comment:function(){var e=this;t.$u.http.post("/api/goods/goods_comment",{merchant_goods_id:this.merchant_goods_id,page:1,limit:2}).then((function(t){e.commentlist=t.data,e.total=t.total})).catch((function(){}))},timeSince:function(t){var e=t,n=864e5,a=(new Date).getTime(),i=new Date(e).getTime(),o=a-i;return o<0?(console.error("输入的时间不能在当前时间之后!"),t):o<6e4?Math.round(o/1e3)+"秒前":o<36e5?Math.round(o/6e4)+"分钟前":o<n?Math.round(o/36e5)+"小时前":o<2592e6?Math.round(o/n)+"天前":o<31104e6?Math.round(o/2592e6)+"个月前":dateArr.join("-")}}};e.default=n}).call(this,n("df3c")["default"])},5868:function(t,e,n){"use strict";n.r(e);var a=n("50e1"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=i.a},"5b61":function(t,e,n){"use strict";(function(t,e){var a=n("47a9");n("abeb");a(n("3240"));var i=a(n("25e3"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},daaf:function(t,e,n){"use strict";var a=n("f23a"),i=n.n(a);i.a},f23a:function(t,e,n){}},[["5b61","common/runtime","common/vendor"]]]);