diff --git a/pages/cart/cart2/cart2.wxss b/pages/cart/cart2/cart2.wxss index f1710ad..972ae94 100644 --- a/pages/cart/cart2/cart2.wxss +++ b/pages/cart/cart2/cart2.wxss @@ -201,7 +201,9 @@ .btn-wrap { height: 100rpx; width: 100%; background-color: #fff; - position: fixed; bottom: 0;left: 0 + position: fixed; bottom: 0;left: 0; + border-top:1rpx solid #dee + } .tips-btn { diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 163eec6..6efcfa0 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -377,7 +377,8 @@ Page({ goods_id: gid, pageSize: 3, parent_id: 0, - page:1 + page:1, + is_show:1, }, }).then(res => { fir_com=res.data.data.pageData; @@ -1343,6 +1344,7 @@ Page({ parent_id: 0, goods_id: th.data.gid, commenttype: tp, + is_show:1, } if(getApp().globalData.userInfo){ req_where.userId=getApp().globalData.userInfo.user_id; diff --git a/pages/user/comment/comment.js b/pages/user/comment/comment.js index 476d974..388e94e 100644 --- a/pages/user/comment/comment.js +++ b/pages/user/comment/comment.js @@ -10,6 +10,7 @@ var t = function(t) { s = require("../../../utils/util.js"), oo = e.globalData, os = e.globalData.setting; +var regeneratorRuntime = require('../../../utils/runtime.js'); Page({ data: { @@ -30,9 +31,12 @@ Page({ comments: null, currentPage: 1, isloaded: 0, + order_id:0, }, onLoad: function(t) { var e = void 0 === t.status ? this.data.activeStatus : t.status; + this.data.order_id=t.order_id; + a.init(this, "", "comments"), this.requestComments(e); }, onShow: function() { @@ -52,16 +56,26 @@ Page({ this.setData({ activeStatus: t }); + + if(e.data.order_id) n+="&order_id="+e.data.order_id; + if (t == 2) { a.request(n, function(t) { e.data.currentPage++; var da = th.data.comments; - da.forEach(function(em, ind) { + da.forEach( function(em, ind) { - if (em.img != undefined && em.img != null && ut.isString(em.img)) - da[ind].img = ut.unserialize(em.img); - var str = da[ind].weapp_img; - if (str != "" && ut.isString(str)) da[ind].weapp_img = JSON.parse(str); + getApp().request.promiseGet("/api/weshop/comment/pageComment", { + data:{ store_id: os.stoid, goods_id: em.goods_id, + pageSize: 3, parent_id: em.comment_id, page:1} + }).then(res=>{ + if(res.data.data && res.data.data.pageData && res.data.data.pageData.length>0) + da[ind].replay_list=res.data.data.pageData; + }) + + if (em.img != undefined && em.img != null && ut.isString(em.img)) da[ind].img = ut.unserialize(em.img); + var str = da[ind].weapp_img; + if (str != "" && ut.isString(str)) da[ind].weapp_img = JSON.parse(str); }) @@ -81,14 +95,22 @@ Page({ e.data.currentPage++; var da = th.data.comments; - da.forEach(function(em, ind) { + da.forEach( function(em, ind) { + + + getApp().request.promiseGet("/api/weshop/comment/pageComment", { + data:{ store_id: os.stoid, goods_id: em.goods_id, + pageSize: 3, parent_id: em.comment_id, page:1} + }).then(res=>{ + if(res.data.data && res.data.data.pageData && res.data.data.pageData.length>0) + da[ind].replay_list=res.data.data.pageData; + }) if (em.img != undefined && em.img != null && ut.isString(em.img)) da[ind].img = ut.unserialize(em.img); var str = da[ind].weapp_img; if (str != "" && ut.isString(str)) da[ind].weapp_img = JSON.parse(str); - }); th.setData({ @@ -107,6 +129,7 @@ Page({ }, onReachBottom: function() { + if(a.data.goodsLoadFinishFlag) return false; a.canloadMore() && this.requestComments(this.data.activeStatus); }, diff --git a/pages/user/comment/comment.wxml b/pages/user/comment/comment.wxml index 40f97e2..479efb0 100644 --- a/pages/user/comment/comment.wxml +++ b/pages/user/comment/comment.wxml @@ -75,6 +75,17 @@ + + + + + 店家回复: + + {{r_item.content}} + + + + {{item.comment_addtime}} diff --git a/pages/user/comment/comment.wxss b/pages/user/comment/comment.wxss index a35e598..4eccce0 100644 --- a/pages/user/comment/comment.wxss +++ b/pages/user/comment/comment.wxss @@ -183,4 +183,6 @@ .comment_addtime{ height: 50rpx; } -.title_width{ width: 146rpx; text-align:center } \ No newline at end of file +.title_width{ width: 146rpx; text-align:center } +.shop-font{ color: rgb(153, 153, 153);} +.reply{ margin-top: 10rpx} \ No newline at end of file