1 |
- require('./common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageA/comment"],{"0c97":function(t,n,e){},"0f40":function(t,n,e){"use strict";e.r(n);var o=e("6290"),i=e("3151");for(var a in i)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(a);e("9968");var c,r=e("f0c5"),u=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,"8f03207e",null,!1,o["a"],c);n["default"]=u.exports},3151:function(t,n,e){"use strict";e.r(n);var o=e("dea3"),i=e.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(a);n["default"]=i.a},"54c7":function(t,n,e){"use strict";(function(t,n){var o=e("4ea4");e("f93b");o(e("66fd"));var i=o(e("0f40"));t.__webpack_require_UNI_MP_PLUGIN__=e,n(i.default)}).call(this,e("bc2e")["default"],e("543d")["createPage"])},6290:function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){return o}));var o={uniRate:function(){return e.e("uni_modules/uni-rate/components/uni-rate/uni-rate").then(e.bind(null,"38fb"))}},i=function(){var t=this,n=t.$createElement,e=(t._self._c,t.commentlist.length),o=e>0?t.__map(t.commentlist,(function(n,e){var o=t.__get_orig(n),i=n.member.nickname.slice(0,1),a=n.member.nickname.slice(-1),c=t.timeSince(n.created_at),r=n.image||n.video?n.image.split(","):null;return{$orig:o,g1:i,g2:a,m0:c,l0:r}})):null;t.$mp.data=Object.assign({},{$root:{g0:e,l1:o}})},a=[]},9968:function(t,n,e){"use strict";var o=e("0c97"),i=e.n(o);i.a},dea3:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e={data:function(){return{merchant_goods_id:"",commentlist:[],rate:"3"}},onLoad:function(t){this.merchant_goods_id=t.id,this.comment()},onshow:function(){},computed:{i18n:function(){return this.$t("index")}},methods:{comment:function(){var n=this;t.$u.http.post("/api/goods/goods_comment",{merchant_goods_id:this.merchant_goods_id,page:1,limit:10}).then((function(t){console.log(t),n.commentlist=t.data})).catch((function(){}))},timeSince:function(t){var n=t,e=1e3,o=60*e,i=60*o,a=24*i,c=30*a,r=12*c,u=(new Date).getTime(),d=new Date(n).getTime(),f=u-d;return f<0?(console.error("输入的时间不能在当前时间之后!"),t):f<o?Math.round(f/e)+"秒前":f<i?Math.round(f/o)+"分钟前":f<a?Math.round(f/i)+"小时前":f<c?Math.round(f/a)+"天前":f<r?Math.round(f/c)+"个月前":dateArr.join("-")}}};n.default=e}).call(this,e("543d")["default"])}},[["54c7","common/runtime","common/vendor"]]]);
|