Browse Source

景点详情评价、购物车接口优化

master
jiazhipeng 8 months ago
parent
commit
3b35d7bd71
  1. 20
      pages/info/sceneProductInfo/index.js

20
pages/info/sceneProductInfo/index.js

@ -224,7 +224,9 @@ Page({
})
// 获取评价列表
commonApi._post("scene/get_comment", {
scene_id: options.id
scene_id: options.id,
offset:0,
limit:5,
}).then(res => {
res.data.list.map(item => {
item.rate = Number(item.rate)
@ -1080,14 +1082,15 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
commonApi.user_post('cart/get_list', {noLogin: true}).then(res => {
if (!wx.getStorageSync('jstrip_token')) {
return;
}
commonApi.user_post('cart/get_count', {noLogin: true}).then(res => {
this.setData({
cartCount: res.data.length //1
cartCount: res.data //1
})
})
if (!wx.getStorageSync('jstrip_token')) {
return;
}
if (this.data.info && this.data.info.id) {
this.drawImg()
//// 获取补贴
@ -1122,11 +1125,6 @@ Page({
// }
//// 获取补贴结束
} else {
console.log(2222);
setTimeout(() => {
// this.onShow()
}, 200)
}
},

Loading…
Cancel
Save