comment.js 3.5 KB

12
  1. require('./common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageA/comment"],{352:function(n,e,t){"use strict";(function(n,e){var o=t(4);t(26);o(t(25));var r=o(t(353));n.__webpack_require_UNI_MP_PLUGIN__=t,e(r.default)}).call(this,t(1)["default"],t(2)["createPage"])},353:function(n,e,t){"use strict";t.r(e);var o=t(354),r=t(356);for(var i in r)["default"].indexOf(i)<0&&function(n){t.d(e,n,(function(){return r[n]}))}(i);t(358);var c,u=t(45),a=Object(u["default"])(r["default"],o["render"],o["staticRenderFns"],!1,null,"48be0d78",null,!1,o["components"],c);a.options.__file="pageA/comment.vue",e["default"]=a.exports},354:function(n,e,t){"use strict";t.r(e);var o=t(355);t.d(e,"render",(function(){return o["render"]})),t.d(e,"staticRenderFns",(function(){return o["staticRenderFns"]})),t.d(e,"recyclableRender",(function(){return o["recyclableRender"]})),t.d(e,"components",(function(){return o["components"]}))},355:function(n,e,t){"use strict";var o;t.r(e),t.d(e,"render",(function(){return r})),t.d(e,"staticRenderFns",(function(){return c})),t.d(e,"recyclableRender",(function(){return i})),t.d(e,"components",(function(){return o}));try{o={uniRate:function(){return t.e("uni_modules/uni-rate/components/uni-rate/uni-rate").then(t.bind(null,1021))}}}catch(u){if(-1===u.message.indexOf("Cannot find module")||-1===u.message.indexOf(".vue"))throw u;console.error(u.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var r=function(){var n=this,e=n.$createElement,t=(n._self._c,n.commentlist.length),o=t>0?n.__map(n.commentlist,(function(e,t){var o=n.__get_orig(e),r=e.member.nickname.slice(0,1),i=e.member.nickname.slice(-1),c=n.timeSince(e.created_at),u=e.video?e.video.split(","):null,a=e.image?e.image.split(","):null;return{$orig:o,g1:r,g2:i,m0:c,l0:u,l1:a}})):null;n.$mp.data=Object.assign({},{$root:{g0:t,l2:o}})},i=!1,c=[];r._withStripped=!0},356:function(n,e,t){"use strict";t.r(e);var o=t(357),r=t.n(o);for(var i in o)["default"].indexOf(i)<0&&function(n){t.d(e,n,(function(){return o[n]}))}(i);e["default"]=r.a},357:function(n,e,t){"use strict";(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={data:function(){return{merchant_goods_id:"",commentlist:[],rate:"3"}},onLoad:function(n){this.merchant_goods_id=n.id,this.comment()},onshow:function(){},computed:{i18n:function(){return this.$t("index")}},methods:{comment:function(){var e=this;n.$u.http.post("/api/goods/goods_comment",{merchant_goods_id:this.merchant_goods_id,page:1,limit:10}).then((function(n){console.log(n),e.commentlist=n.data})).catch((function(){}))},timeSince:function(n){var e=n,t=1e3,o=60*t,r=60*o,i=24*r,c=30*i,u=12*c,a=(new Date).getTime(),d=new Date(e).getTime(),s=a-d;return s<0?(console.error("输入的时间不能在当前时间之后!"),n):s<o?Math.round(s/t)+"秒前":s<r?Math.round(s/o)+"分钟前":s<i?Math.round(s/r)+"小时前":s<c?Math.round(s/i)+"天前":s<u?Math.round(s/c)+"个月前":dateArr.join("-")}}};e.default=t}).call(this,t(2)["default"])},358:function(n,e,t){"use strict";t.r(e);var o=t(359),r=t.n(o);for(var i in o)["default"].indexOf(i)<0&&function(n){t.d(e,n,(function(){return o[n]}))}(i);e["default"]=r.a},359:function(n,e,t){}},[[352,"common/runtime","common/vendor"]]]);
  2. //# sourceMappingURL=../../.sourcemap/mp-weixin/pageA/comment.js.map