From c65446594ae39dc158f406bc8b5453ee19ab9863 Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Tue, 8 Jul 2025 14:18:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E8=AE=BA=E6=94=B9=E7=89=88=EF=BC=8C?= =?UTF-8?q?=E9=99=90=E6=97=B6=E7=89=B9=E6=83=A0=E9=9A=90=E8=97=8F=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- pages/index/index.js | 7 +- pages/index/index.wxml | 7 +- pages/info/postProductInfo/index.js | 10 ++ pages/info/postProductInfo/index.wxml | 150 ++++++++++++++------------ pages/info/postProductInfo/index.wxss | 74 ++++++++++--- pages/info/sceneProductInfo/index.js | 2 +- pages/order/components/date/index.js | 2 +- pages/search/list/index.wxml | 2 +- utils/https.js | 10 +- 10 files changed, 169 insertions(+), 97 deletions(-) diff --git a/app.js b/app.js index 20a8a96..5cf47f2 100644 --- a/app.js +++ b/app.js @@ -38,7 +38,7 @@ App({ // 获取前端配置文件 commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest123? true : false; + data.isTest = data.isTest126? true : false; data.indexSeason = null this.globalData.configJson = data }).then(() => { diff --git a/pages/index/index.js b/pages/index/index.js index ee475ca..d3b5d42 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -896,10 +896,11 @@ Page({ }, gotoDetail: function(e) { let item = e.currentTarget.dataset.item; - // commonApi._post("repurchase/repurchase/recordClick", {product_id:item.product_id}) - item.id = item.type=='post'?item.product_id:item.scene_id + commonApi._post("repurchase/repurchase/recordClick", {product_id:item.product_id}) + // item.id = item.type=='post'?item.product_id:item.scene_id if (item.pagePoint) { this.newPagePoint(item.pagePoint) } - util.gotoDetail(item); + // util.gotoDetail(item); + util.gotoDetail(item.goods); }, diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 8e70eab..a303546 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -85,8 +85,11 @@ - - + + + + + diff --git a/pages/info/postProductInfo/index.js b/pages/info/postProductInfo/index.js index 9ce4482..f320a6e 100644 --- a/pages/info/postProductInfo/index.js +++ b/pages/info/postProductInfo/index.js @@ -722,6 +722,16 @@ Page({ address:info.scene_address }) }, + + viewImg:function(e){ + let item = e.currentTarget.dataset.item; + if (item.img_list.length>0) { + wx.previewImage({ + urls: item.img_list + }) + } + }, + /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/info/postProductInfo/index.wxml b/pages/info/postProductInfo/index.wxml index a777f95..7f02116 100644 --- a/pages/info/postProductInfo/index.wxml +++ b/pages/info/postProductInfo/index.wxml @@ -75,82 +75,96 @@ + + + + + 买家评价 + {{info.rate}}分 + 暂无评价 - - - 产品特色 - 费用说明 - 预定须知 - 产品推荐 - - - - 产品特色 - - - - 费用说明 - - - - 预订须知 - - - - - 游客点评{{info.rate}}分 - 共{{commentTotal}}条 > - - - - 这里空空如也,快去点评吧! - - - - - - - {{item.nickname}} - - - + + 共{{commentTotal}}条 > + - {{item.content}} - - - - - - 共{{item.img_list.length}}张 - 查看全部 + + + + + + + + {{item.nickname}} + + + + {{item.content}} + + + + + +{{item.img_list.length}} + + + - - - {{item.sku_name}} - - - 查看全部点评 + + + + - - - - - - - - + + + + 产品特色 + 费用说明 + 预定须知 + 产品推荐 - - {{item.title}} - - {{item.price/100}} - + + + 产品特色 + + + + 费用说明 + + + + 预订须知 + - - - + + + + + + + + + + + {{item.title}} + + {{item.price/100}} + + + + + + diff --git a/pages/info/postProductInfo/index.wxss b/pages/info/postProductInfo/index.wxss index 0748daf..ff73fe6 100644 --- a/pages/info/postProductInfo/index.wxss +++ b/pages/info/postProductInfo/index.wxss @@ -234,6 +234,19 @@ page { background: #f2f2f2; padding: 20rpx; } +.comment-box{ + background: #fff; + padding: 0 20rpx; + margin: 20rpx 0; + width: 100%; + box-sizing: border-box; +} +.comment-box .no-comment{ + font-weight: 500; + font-size: 30rpx; + color: #999999; + padding-left: 18rpx; +} .box-top { line-height: 95rpx; @@ -284,30 +297,40 @@ page { /* margin: 0 20rpx; */ border-bottom: 1rpx solid #ccc; /* padding: 33rpx 0; */ - padding: 33rpx 20rpx; + padding: 28rpx 20rpx; background: #fff; } +.product-comment:last-of-type{ + border-bottom: none; +} .product-comment-top { display: flex; justify-content: space-between; color: #999999; - align-items: center; + align-items: flex-start; font-size: 24rpx; } -.product-comment-top image { +.product-comment-top .avator-img { flex-shrink: 0; width: 57rpx; height: 57rpx; border-radius: 50%; } - +.product-comment-top .comment-container{ + flex: 1; + width: 10rpx; + padding: 0 45rpx 0 15rpx; +} .product-comment-top .comment-info { - flex: 1; - margin: 0 15rpx; - color: #666; - font-size: 21rpx; + width: 100%; + height: 57rpx; + font-weight: bold; + font-size: 24rpx; + color: #666666; + display: flex; + align-items: center; } .product-comment-top .comment-info .iconfont { @@ -320,10 +343,11 @@ page { } .comment-content { - margin-left: 13rpx; - margin-top: 36rpx; - font-size: 28rpx; - color: #000; + width: 100%; + padding-top: 12rpx; + font-size: 28rpx; + color: #000; + font-weight: 500; } .more-comment-btn { @@ -824,14 +848,30 @@ page { margin-bottom: 20rpx; } .imgs{ - width: 200rpx; - height: 200rpx; - margin: 10rpx; - border-radius: 8rpx; + width: 133rpx; + height: 133rpx; + border-radius: 13rpx; } .img-box{ - display: inline-block; + width: 133rpx; +height: 133rpx; position: relative; + overflow: hidden; +} +.img-box .more-img{ + height: 37rpx; + line-height: 37rpx; + background: #000; + border-radius: 13rpx 0rpx 13rpx 0rpx; + box-sizing: border-box; + padding: 0 5rpx; + font-weight: 500; + font-size: 23rpx; + color: #FFFFFF; + position: absolute; + bottom: 0; + right: 0; + opacity: 0.8; } .all{ color: #fff; diff --git a/pages/info/sceneProductInfo/index.js b/pages/info/sceneProductInfo/index.js index ad3822d..3841d77 100644 --- a/pages/info/sceneProductInfo/index.js +++ b/pages/info/sceneProductInfo/index.js @@ -422,7 +422,7 @@ Page({ num: this.data.productNum }).then(res => { if (res.code == 1) { - commonApi.user_post('cart/get_list', {}).then(res => { + commonApi.user_post('cart/get_list', {noLogin: true}).then(res => { this.setData({ cartCount: res.data.length //5 }) diff --git a/pages/order/components/date/index.js b/pages/order/components/date/index.js index 4e8ad5e..24ad21b 100644 --- a/pages/order/components/date/index.js +++ b/pages/order/components/date/index.js @@ -67,7 +67,7 @@ Component({ } let todayTimes = new Date(today.replace(/-/g,'/')).getTime() commonApi.user_post("token/check").then(res => { - if (res.code == 1) { + if (res&&res.code == 1) { // 获取价格日历 commonApi.user_post("product/product_date_price", { start_date: today, diff --git a/pages/search/list/index.wxml b/pages/search/list/index.wxml index 5c718ec..16daf9a 100644 --- a/pages/search/list/index.wxml +++ b/pages/search/list/index.wxml @@ -32,7 +32,7 @@ - {{item.title}} + {{item.title}} {{item}} diff --git a/utils/https.js b/utils/https.js index e01baf2..4ecfe51 100644 --- a/utils/https.js +++ b/utils/https.js @@ -173,6 +173,10 @@ function user_post_new(url, data = {}, type) { // 判断是否登录 // 没有登录就跳转到登录页面 if (!token) { + if (data.noLogin) { + resolved(); + return false; + } wx.hideLoading(); // 去登陆 console.log("去登陆去登陆去登陆去登陆去登陆去登陆去登陆") @@ -330,9 +334,9 @@ const checkLogin = () => { appData = getApp() } console.log(appData,page.route) - if(page.route !="pages/user/user"&& appData.globalData.configJson&&appData.globalData.configJson.isTest) { - return - } + // if(page.route !="pages/user/user"&& appData.globalData.configJson&&appData.globalData.configJson.isTest) { + // return + // } if (page.route!='pages/login/index' && canToLogin) {