From 6aea8c70da125353dee9bddb765d447f4ecce9b5 Mon Sep 17 00:00:00 2001 From: chenkainan Date: Sat, 6 Aug 2022 15:13:15 +0800 Subject: [PATCH 01/19] =?UTF-8?q?=E5=BC=95=E5=85=A5=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app.json b/app.json index fbacb66..01f9bfb 100644 --- a/app.json +++ b/app.json @@ -180,6 +180,12 @@ "pages/user/address/add/index", "pages/user/linkman/index" ], + "plugins": { + "live-player-plugin": { + "version": "1.3.0", + "provider": "wx2b03c6e691cd7370" + } + }, "requiredPrivateInfos": [ "getLocation", "choosePoi", From 613a4cb1255d27c78ec36b3a6d5905f09a1ae90d Mon Sep 17 00:00:00 2001 From: chenkainan Date: Sat, 6 Aug 2022 15:20:56 +0800 Subject: [PATCH 02/19] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- app.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index aff7f56..01c4712 100644 --- a/app.js +++ b/app.js @@ -22,7 +22,7 @@ App({ unique_key: "wechatxcx" }).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest30?true:false; + data.isTest = data.isTest31?true:false; this.globalData.configJson = data }) diff --git a/app.json b/app.json index b4201fa..79c9fa4 100644 --- a/app.json +++ b/app.json @@ -183,7 +183,7 @@ ], "plugins": { "live-player-plugin": { - "version": "1.3.0", + "version": "1.3.5", "provider": "wx2b03c6e691cd7370" } }, From 7b83fcd5810772fd0a80434573b63b8576d77f85 Mon Sep 17 00:00:00 2001 From: chenkainan Date: Tue, 9 Aug 2022 14:33:48 +0800 Subject: [PATCH 03/19] =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 01c4712..2481395 100644 --- a/app.js +++ b/app.js @@ -22,7 +22,7 @@ App({ unique_key: "wechatxcx" }).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest31?true:false; + data.isTest = data.isTest32?true:false; this.globalData.configJson = data }) From 67439d436673054d46c77039e416621bec680533 Mon Sep 17 00:00:00 2001 From: chenkainan Date: Tue, 9 Aug 2022 21:44:44 +0800 Subject: [PATCH 04/19] =?UTF-8?q?=E4=B8=8B=E5=8D=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 4 ++-- pages/info/postProductInfo/index.js | 2 +- pages/order/postOrder/index.js | 3 ++- pages/order/scene/index.js | 7 ++++--- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app.js b/app.js index 2481395..49f1454 100644 --- a/app.js +++ b/app.js @@ -22,7 +22,7 @@ App({ unique_key: "wechatxcx" }).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest32?true:false; + data.isTest = data.isTest33?true:false; this.globalData.configJson = data }) @@ -146,7 +146,7 @@ App({ ticketProduct:[], index: 0, createDate: null, - list: [], + list: null, productPrice: 0, ticketPrice: 0, productState:{ diff --git a/pages/info/postProductInfo/index.js b/pages/info/postProductInfo/index.js index 303fc76..d02337c 100644 --- a/pages/info/postProductInfo/index.js +++ b/pages/info/postProductInfo/index.js @@ -243,7 +243,7 @@ Page({ }) }, order: function () { - app.globalData.postProduct = [] + app.globalData.postProduct = null app.globalData.list = [] if (this.data.skuFlag == 'order') { util.pagePoint({ diff --git a/pages/order/postOrder/index.js b/pages/order/postOrder/index.js index cb20054..6dcbca9 100644 --- a/pages/order/postOrder/index.js +++ b/pages/order/postOrder/index.js @@ -164,7 +164,8 @@ Page({ if (app.globalData.category_id) { data.category_id = app.globalData.category_id; } - if(!app.globalData.list){ + console.log(app.globalData.list) + if(!app.globalData.list || app.globalData.list.length == 0){ commonApi.user_post("order/create", { data: JSON.stringify(data) }).then(res => { diff --git a/pages/order/scene/index.js b/pages/order/scene/index.js index 34f21b9..6d7572d 100644 --- a/pages/order/scene/index.js +++ b/pages/order/scene/index.js @@ -115,7 +115,7 @@ Page({ icon: 'none' }) } - if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1) { + if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && !this.data.flag) { this.couponCom.setNullCoupon() } app.globalData.couponInfo = null; @@ -251,7 +251,8 @@ Page({ } app.globalData.list[app.globalData.index] = this.data.product app.globalData.ticketPrice += (this.data.singlePrice * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0))/100; - if(app.globalData.list.length > app.globalData.index + 1){ + console.log(app.globalData.list,app.globalData.list.length) + if(app.globalData.list && app.globalData.list.length > app.globalData.index + 1){ if(app.globalData.createDate){ app.globalData.createDate.product_list.push(data.product_list[0]) }else{ @@ -265,7 +266,7 @@ Page({ return }else{ console.log(app.globalData.list.length,app.globalData.postProduct) - if(app.globalData.list.length > 1 || app.globalData.postProduct.length>0){ + if(app.globalData.list && app.globalData.list.length > 1 || app.globalData.postProduct.length>0){ if(app.globalData.createDate){ app.globalData.createDate.product_list.push(data.product_list[0]) } From 1a066ba8924de8a3655f853ad4ac97e6a1e39aa9 Mon Sep 17 00:00:00 2001 From: chenkainan Date: Wed, 10 Aug 2022 13:48:43 +0800 Subject: [PATCH 05/19] =?UTF-8?q?=E5=9C=BA=E9=A6=86=E9=A2=84=E7=BA=A6?= =?UTF-8?q?=E4=B8=8B=E5=8D=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- pages/order/scene/index.js | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app.js b/app.js index 49f1454..50ebb63 100644 --- a/app.js +++ b/app.js @@ -22,7 +22,7 @@ App({ unique_key: "wechatxcx" }).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest33?true:false; + data.isTest = data.isTest34?true:false; this.globalData.configJson = data }) diff --git a/pages/order/scene/index.js b/pages/order/scene/index.js index 6d7572d..3263c0c 100644 --- a/pages/order/scene/index.js +++ b/pages/order/scene/index.js @@ -34,7 +34,6 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - console.log(app.globalData.product) this.setData({ type: options.type, kjId: app.globalData.kjId, @@ -249,9 +248,10 @@ Page({ postData.team_name = this.data.groupName postData.type = 1; } - app.globalData.list[app.globalData.index] = this.data.product + if(app.globalData.list){ + app.globalData.list[app.globalData.index] = this.data.product + } app.globalData.ticketPrice += (this.data.singlePrice * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0))/100; - console.log(app.globalData.list,app.globalData.list.length) if(app.globalData.list && app.globalData.list.length > app.globalData.index + 1){ if(app.globalData.createDate){ app.globalData.createDate.product_list.push(data.product_list[0]) @@ -265,7 +265,6 @@ Page({ }) return }else{ - console.log(app.globalData.list.length,app.globalData.postProduct) if(app.globalData.list && app.globalData.list.length > 1 || app.globalData.postProduct.length>0){ if(app.globalData.createDate){ app.globalData.createDate.product_list.push(data.product_list[0]) @@ -348,11 +347,9 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { - console.log(this.data.flag); - if(app.globalData.list.length != 0){ + if(app.globalData.list && app.globalData.list.length != 0){ app.globalData.product = app.globalData.list[app.globalData.index] } - console.log(app.globalData.product) if (!this.data.isLogin) { commonApi.user_post("token/check").then(res => { if (res.code == 1) { @@ -370,7 +367,6 @@ Page({ commonApi.user_post("product/getProductAllowancePrice", { product_code: this.data.product.product.product_code }).then(resTwo => { - console.log(resTwo) if (resTwo && resTwo.code == 1) { this.setData({ allowance_data: resTwo.data From ae5b6c843aae06fa487b5dbdb37f213e004d1e93 Mon Sep 17 00:00:00 2001 From: caichunsheng Date: Wed, 10 Aug 2022 14:03:08 +0800 Subject: [PATCH 06/19] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=B9=BF=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.js | 242 ++++++++++++++++++++++++++++++++--------- pages/index/index.wxml | 31 +++++- pages/index/index.wxss | 53 +++++++++ 3 files changed, 273 insertions(+), 53 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index bfadf57..1dca489 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -33,14 +33,45 @@ Page({ otherPlat: null, activeBannerIndex: 0, smBannerIndex: 0, - indexSeason: {} + indexSeason: {}, + startList: [], // 启动页广告 + alertSwipeList: [], //弹窗广告 + showAdv: false, //弹窗开关 + showFullAdv: true, //全屏广告开关 + time: 5 //全屏广告剩余时间 }, onLoad: function (options) { + //全屏广告 + wx.hideTabBar() //这里隐藏了底部导航栏 + commonApi._post("adv/getAdv", { + position: 2, + type_id: 5 + }).then(res => { + if (res.data.length > 0) { + let timer = setInterval(() => { + this.setData({ + time: this.data.time - 1 + }) + if (this.data.time == 0) { + timer = null + this.setData({ + showFullAdv: false + }) + if (!this.data.alertSwipeList>0) + wx.showTabBar() //倒计时结束清楚定时器显示导航栏 + } + }, 1000) + this.setData({ + startList: res.data || [] + }) + } + }) if (options.from) { app.globalData.from = options.from; } - let systemInfo = wx.getSystemInfoSync(), rect = wx.getMenuButtonBoundingClientRect(); + let systemInfo = wx.getSystemInfoSync(), + rect = wx.getMenuButtonBoundingClientRect(); let height = (rect.top - systemInfo.statusBarHeight) * 2 + rect.height; wx.getLocation({ type: 'gcj02', @@ -147,6 +178,39 @@ Page({ xiaobanner: res.data || [] }) }) + //弹窗广告 + commonApi._post("adv/getAdv", { + position: 3, + type_id: 5 + }).then(res => { + if (res.data.length > 0) { + this.setData({ + alertSwipeList: res.data || [], + showAdv: true + }) + } + }) + + }, + //关闭弹窗广告 + closeAdv: function () { + this.setData({ + showAdv: false + }) + wx.showTabBar({ + animation: true, + }) + }, + //关闭全屏广告 + closeFullAdv:function(){ + this.setData({ + showFullAdv:false + }) + if (!this.data.alertSwipeList.length>0) { + wx.showTabBar({ + animation: true, + }) + } }, getWeather: function () { commonApi._post('pbservice/Ztfw/getWeather').then(res => { @@ -156,8 +220,7 @@ Page({ }) }) }, - saleDetail: function () { - }, + saleDetail: function () {}, getTwoProduct: function () { // 获取首页限时特惠 commonApi._post('act/fast_sale_now', { @@ -209,17 +272,18 @@ Page({ }) }, getFourProduct: function () { - let item = this.data.indexHot[this.data.hotIndex], service = "product/get_product_by_tag", data = { - tag_id: item.id, - offset: 0, - limit: 4, - sort: 'weight', - order: 'desc' - }; + let item = this.data.indexHot[this.data.hotIndex], + service = "product/get_product_by_tag", + data = { + tag_id: item.id, + offset: 0, + limit: 4, + sort: 'weight', + order: 'desc' + }; if (item.type == 'scene') { service = "scene/get_scene_by_tag"; - } - else if (item.type == 'movie') { + } else if (item.type == 'movie') { service = "Cinema/getHotMovieList"; data = { page: 1, @@ -238,8 +302,7 @@ Page({ wx.navigateTo({ url: '/pages/list/movieticket/list/info/index?id=' + item.third_id + '&title=' + item.title, }) - } - else { + } else { util.gotoDetail(item) } }, @@ -248,9 +311,11 @@ Page({ util.gotoDetail(item) }, gotoPath: function (e) { - console.log(e) + console.log(e) if (e.currentTarget.dataset.event) { - this.pagePoint({ event: e.currentTarget.dataset.event }, 1) + this.pagePoint({ + event: e.currentTarget.dataset.event + }, 1) } if (e.currentTarget.dataset.title == '书香借阅') { wx.navigateToMiniProgram({ @@ -258,7 +323,7 @@ Page({ path: 'pages/home/home' }) return; - }else if (e.currentTarget.dataset.title == '12348') { + } else if (e.currentTarget.dataset.title == '12348') { wx.navigateToMiniProgram({ appId: 'wxcdfd45c001466ba3', path: 'pages/index/index' @@ -280,7 +345,9 @@ Page({ }, gotoUrl: function (e) { if (e.currentTarget.dataset.event) { - this.pagePoint({ event: e.currentTarget.dataset.event }, 1) + this.pagePoint({ + event: e.currentTarget.dataset.event + }, 1) } let url = e.currentTarget.dataset.url; app.globalData.weburl = url; @@ -289,7 +356,8 @@ Page({ }) }, gotoMini: function (e) { - let appid = e.currentTarget.dataset.appid, path = e.currentTarget.dataset.path + let appid = e.currentTarget.dataset.appid, + path = e.currentTarget.dataset.path wx.navigateToMiniProgram({ appId: appid, path: path @@ -334,8 +402,7 @@ Page({ res.data.map(item => { if (item.ext.display_tags) { item.ext.display_tags = item.ext.display_tags.split(",").splice(0, 2) - } - else { + } else { item.ext.display_tags = [] } }) @@ -366,8 +433,7 @@ Page({ wx.navigateTo({ url: '/pages/info/strategyInfo/index?id=' + item.s_id, }) - } - else { + } else { util.gotoDetail(item.ext); } }, @@ -407,24 +473,22 @@ Page({ wx.navigateTo({ url: "/pages/pbService/web/index" }) - } - else { + } else { let page = item.tdata.split("/"); page = page[page.length - 1].split("?") console.log(page[0]) let url = this.data.urltopage[page[0]]; if (url && url.indexOf('map') != -1) { - let types = ['', 'scenic', 'venue', 'post', 'restaurant', 'relic', 'tenscenic', 'cinema', 'academes'], type = page[1] ? page[1].split("=") : []; + let types = ['', 'scenic', 'venue', 'post', 'restaurant', 'relic', 'tenscenic', 'cinema', 'academes'], + type = page[1] ? page[1].split("=") : []; wx.reLaunch({ url: url + "?type=" + (type[1] ? types.findIndex(t => t == type[1]) : null) }) - } - else if (url) { + } else if (url) { wx.navigateTo({ url: url, }) - } - else { + } else { app.globalData.weburl = item.tdata; wx.navigateTo({ url: "/pages/pbService/web/index" @@ -439,8 +503,7 @@ Page({ let weburl = item.tdata.page if (weburl.indexOf('?') != -1) { weburl += '&authCode=' + res.data; - } - else { + } else { weburl += '?authCode=' + res.data } wx.navigateToMiniProgram({ @@ -453,8 +516,7 @@ Page({ path: item.tdata.page }) }) - } - else { + } else { wx.navigateToMiniProgram({ appId: item.tdata.appid, path: item.tdata.page @@ -476,19 +538,16 @@ Page({ appId: info[0], path: info[1] }) - } - else if (item.href.indexOf('map/index') != -1) { + } else if (item.href.indexOf('map/index') != -1) { wx.reLaunch({ url: item.href }) - } - else { + } else { wx.navigateTo({ url: item.href, }) } - } - else if (item.action == "web") { + } else if (item.action == "web") { app.globalData.weburl = item.href; wx.navigateTo({ url: "/pages/pbService/web/index", @@ -541,6 +600,92 @@ Page({ } }) }, + bannerJumpNew(item) { + let that = this + item = item.currentTarget.dataset.item + console.log(item); + + if (item.tdata == '') return + that.pagePoint({ + event: "banner_click", + type: 'banner' + }, 1) + switch (item.jump_type) { + case 0: + break; + case 1: + util.gotoDetail(item.product_model) + break; + case 2: + if (item.front_model && item.front_model.mini) { + wx.navigateTo({ + url: "/" + item.front_model.mini + }) + } + break; + case 3: + if ((item.tdata.indexOf('http://') != -1 || item.tdata.indexOf('https://') != -1) && item.tdata.indexOf('m.cloud.sz-trip.com') == -1) { + // 外部h5 + console.log(item.tdata) + app.globalData.weburl = item.tdata; + wx.navigateTo({ + url: "/pages/pbService/web/index" + }) + } else { + let page = item.tdata.split("/"); + page = page[page.length - 1].split("?") + console.log(page[0]) + let url = this.data.urltopage[page[0]]; + if (url && url.indexOf('map') != -1) { + let types = ['', 'scenic', 'venue', 'post', 'restaurant', 'relic', 'tenscenic', 'cinema', 'academes'], + type = page[1] ? page[1].split("=") : []; + wx.reLaunch({ + url: url + "?type=" + (type[1] ? types.findIndex(t => t == type[1]) : null) + }) + } else if (url) { + wx.navigateTo({ + url: url, + }) + } else { + app.globalData.weburl = item.tdata; + wx.navigateTo({ + url: "/pages/pbService/web/index" + }) + } + } + break; + case 4: + if (item.tdata.appid == 'wxe5ca0f71e918e352' && wx.getStorageSync('jstrip_userid')) { + // 如果是苏心游的小程序 直接把authCode带过去 + userApi.user_post("user/getJumpThirdAppCode", {}).then(res => { + let weburl = item.tdata.page + if (weburl.indexOf('?') != -1) { + weburl += '&authCode=' + res.data; + } else { + weburl += '?authCode=' + res.data + } + wx.navigateToMiniProgram({ + appId: item.tdata.appid, + path: weburl + }) + }).catch(err => { + wx.navigateToMiniProgram({ + appId: item.tdata.appid, + path: item.tdata.page + }) + }) + } else { + wx.navigateToMiniProgram({ + appId: item.tdata.appid, + path: item.tdata.page + }) + } + break; + default: + break; + } + return + }, onReady: function () { if (app.globalData.configJson) { this.setData({ @@ -551,8 +696,7 @@ Page({ }) console.log(app.globalData.configJson) this.getFourProduct() - } - else { + } else { setTimeout(() => { this.onReady() }, 300) @@ -565,14 +709,12 @@ Page({ wx.navigateTo({ url: "/pages/pbService/web/index" }) - } - else if (item.type == 'mini') { + } else if (item.type == 'mini') { wx.navigateToMiniProgram({ appId: item.appid, path: item.path }) - } - else if (item.type == 'page') { + } else if (item.type == 'page') { wx.navigateTo({ url: item.page, }) @@ -582,7 +724,9 @@ Page({ util.pagePoint(e, type) }, onShow: function () { - this.pagePoint({ event: 'home_view' }, 1) + this.pagePoint({ + event: 'home_view' + }, 1) }, /** @@ -591,4 +735,4 @@ Page({ onShareAppMessage: function () { } -}) +}) \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml index b56ae75..81de7b7 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -20,7 +20,7 @@ 搜索想要的旅游产品或服务 - + @@ -197,8 +197,8 @@ - - 文博会 + + 云上文博会 @@ -411,4 +411,27 @@ - \ No newline at end of file + + + + + + + + + + + + + + + +跳过 {{time}} + + + + + + + + diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 0472f6f..a70741b 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -669,4 +669,57 @@ width: 20rpx; height: 7rpx; border-radius: 3rpx; +} +/* 弹窗广告 */ +.zzc{ + background: gray; + position: fixed; + left: 0px; + top: 0px; + width:100%; + height: 100%; + z-index: 998; + filter: alpha(opacity=80); + opacity: 0.8 !important; +} +.alertavd{ + width: 500rpx; + height: 500rpx; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-250rpx,-150rpx); + z-index: 999; + +} +.alertsp{ + width: 100%; + height: 100%; + z-index: 1000; +} +.fullavd{ + position: fixed; + left: 0px; + top: 0px; + width:100%; + height: 100%; + z-index: 1001; + background-color: #fff; +} +.fullsp{ + width: 100%; + height: 100%; +} +.time{ + width: 150rpx; + height: 60rpx; + background-color: #999999; + color: #fff; + position: absolute; + right: 20rpx; + top: 200rpx; + border-radius:6rpx ; + text-align: center; + line-height: 60rpx; + z-index: 1002; } \ No newline at end of file From 4ba2846de1720cbcac30b0963a86191a482edd27 Mon Sep 17 00:00:00 2001 From: caichunsheng Date: Wed, 10 Aug 2022 14:15:18 +0800 Subject: [PATCH 07/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=B9=E7=AA=97bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.js | 12 +++++++++--- pages/index/index.wxml | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index 1dca489..8f91c1f 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -38,7 +38,8 @@ Page({ alertSwipeList: [], //弹窗广告 showAdv: false, //弹窗开关 showFullAdv: true, //全屏广告开关 - time: 5 //全屏广告剩余时间 + time: 5, //全屏广告剩余时间 + showTime:false, }, onLoad: function (options) { //全屏广告 @@ -48,6 +49,9 @@ Page({ type_id: 5 }).then(res => { if (res.data.length > 0) { + this.setData({ + showTime:true + }) let timer = setInterval(() => { this.setData({ time: this.data.time - 1 @@ -65,6 +69,10 @@ Page({ this.setData({ startList: res.data || [] }) + }else{ + this.setData({ + showFullAdv: false + }) } }) if (options.from) { @@ -603,8 +611,6 @@ Page({ bannerJumpNew(item) { let that = this item = item.currentTarget.dataset.item - console.log(item); - if (item.tdata == '') return that.pagePoint({ event: "banner_click", diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 81de7b7..71e01c4 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -426,7 +426,7 @@ -跳过 {{time}} +跳过 {{time}} From 73b5974c2bf8dd64f066e38d767f878e06baeabe Mon Sep 17 00:00:00 2001 From: caichunsheng Date: Wed, 10 Aug 2022 15:27:29 +0800 Subject: [PATCH 08/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=B9=BF=E5=91=8Abug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/index/index.js b/pages/index/index.js index 8f91c1f..84ba5eb 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -196,6 +196,10 @@ Page({ alertSwipeList: res.data || [], showAdv: true }) + }else{ + wx.showTabBar({ + animation: true, + }) } }) From 1a1a3eb33c742ad06f1a5285432bd17e6e3f134d Mon Sep 17 00:00:00 2001 From: chenkainan Date: Fri, 12 Aug 2022 13:34:05 +0800 Subject: [PATCH 09/19] =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 50ebb63..8cf9030 100644 --- a/app.js +++ b/app.js @@ -22,7 +22,7 @@ App({ unique_key: "wechatxcx" }).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest34?true:false; + data.isTest = data.isTest36?true:false; this.globalData.configJson = data }) From e337f1433eff38c757d3f088246ff1a5ed3b9e20 Mon Sep 17 00:00:00 2001 From: caichunsheng Date: Fri, 12 Aug 2022 17:36:09 +0800 Subject: [PATCH 10/19] =?UTF-8?q?=E8=AF=84=E8=AE=BA=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=9B=BE=E7=89=87=EF=BC=8C=E5=8C=BF=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/order/comment/index.js | 195 +++++++++++++++++++++++++++------ pages/order/comment/index.wxml | 17 ++- pages/order/comment/index.wxss | 72 +++++++++++- pages/user/cartlist/list.wxml | 3 +- 4 files changed, 249 insertions(+), 38 deletions(-) diff --git a/pages/order/comment/index.js b/pages/order/comment/index.js index 44b07d1..9286452 100644 --- a/pages/order/comment/index.js +++ b/pages/order/comment/index.js @@ -6,93 +6,220 @@ Page({ * 页面的初始数据 */ data: { - info:null + info: null, + imgs: [], + upImgs:[], + checked:false, + rate:0 }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - commonApi.user_post("order/query",{ - order_id:options.id - }).then(res=>{ + commonApi.user_post("order/query", { + order_id: options.id + }).then(res => { let list = []; - res.data.order_product_list.map(item=>{ + res.data.order_product_list.map(item => { item.star = 5; item.content = ""; - if(item.state=='WAIT_COMMENT'){ + if (item.state == 'WAIT_COMMENT') { list.push(item); } }) - if(list.length==0){ + if (list.length == 0) { wx.showToast({ title: '该订单没有待评价产品', - icon:'none' + icon: 'none' }) - setTimeout(()=>{ + setTimeout(() => { wx.navigateBack() - },1000) + }, 1000) return; } res.data.order_product_list = list; this.setData({ - info:res.data + info: res.data }) }) }, - changeStar:function(e){ + changeStar: function (e) { console.log(e) wx.showLoading({ title: '加载中' }) - let index = e.currentTarget.dataset.index,star = e.currentTarget.dataset.star; + let index = e.currentTarget.dataset.index, + star = e.currentTarget.dataset.star; let info = this.data.info; - info.order_product_list[index].star = Number(star)+1; + info.order_product_list[index].star = Number(star) + 1; this.setData({ - info:info - }) - wx.hideLoading({ + info: info, + rate:info.order_product_list[index].star }) + console.log(info); + wx.hideLoading({}) }, - changeContent:function(e){ + changeContent: function (e) { console.log(e) - let index = e.currentTarget.dataset.index,info = this.data.info; + let index = e.currentTarget.dataset.index, + info = this.data.info; info.order_product_list[index].content = e.detail.value; this.setData({ - info:info + info: info }) }, - submit:function(){ - let info = this.data.info,flag = true,ajax=[] - info.order_product_list.map(item=>{ - if(!item.content) { + submit: function () { + let info = this.data.info, + flag = true, + ajax = [] + info.order_product_list.map(item => { + if (!item.content) { wx.showToast({ title: '请输入评价内容', - icon:'none' + icon: 'none' }) flag = false; } - ajax.push(commonApi.user_post("product/product_comment",{ - product_id:item.product_id, - content:item.content, - order_id:this.data.id + console.log(item); + ajax.push(commonApi.user_post("product/product_comment", { + product_id: item.product_id, + content: item.content, + order_id: item.order_id, + integer:this.data.rate, + img_list:this.data.upImgs.join(','), + is_anonymous:this.data.checked?1:0 })) }) - if(!flag) return; - Promise.all(ajax).then(res=>{ + if (!flag) return; + Promise.all(ajax).then(res => { console.log(res) let flag = false; - res.map(item=>{ - if(item.code==1){ + res.map(item => { + if (item.code == 1) { flag = true } }) - if(flag){ + if (flag) { wx.navigateBack() } }) }, + //图片上传 + // 上传图片 + chooseImg: function (e) { + console.log(e); + var that = this; + var imgs = this.data.imgs; + if (imgs.length >= 8) { + wx.showToast({ + title: '最多上传八张图片哦..', + icon: 'none' + }) + return false; + } + wx.chooseImage({ + // count: 1, // 默认9 + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 + success: function (res) { + // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 + let size = res.tempFiles[0].size + const temp = res.tempFilePaths[0] + if (size > 1024 * 1024 * 20) { + wx.showToast({ + title: '图片最大支持20M..', + icon: 'none' + }) + return + } else if (temp.substr(temp.length - 4, 4) == '.gif') { + wx.showToast({ + title: '图片格式错误', + icon: 'none' + }) + return; + } + var tempFilePaths = res.tempFilePaths; + var imgs = that.data.imgs; + wx.uploadFile({ + url: 'https://test.api.cloud.sz-trip.com/api/pbservice.other/upload', //这里是上传的服务器地址 + filePath: tempFilePaths[0], + name: 'file', + header: { + token: wx.getStorageSync('jstrip_token'), + }, + success(res) { + + var res = JSON.parse(res.data); + if (res.code!=1) { + wx.showToast({ + title: res.msg, + icon: 'none' + }) + return + } + let img = res.data.url; + let arr = that.data.upImgs + arr.push(img) + that.setData({ + upImgs:arr + }) + console.log(that.data.upImgs); + for (var i = 0; i < tempFilePaths.length; i++) { + if (imgs.length >= 9) { + that.setData({ + imgs: imgs + }); + return false; + } else { + imgs.push(tempFilePaths[i]); + } + } + // console.log(imgs); + that.setData({ + imgs: imgs + }); + console.log(that.data.imgs); + const data = res.data + } + }) + + } + }); + }, + // 删除图片 + deleteImg: function (e) { + let imgs = this.data.imgs; + let index = e.currentTarget.dataset.index; + let upimg = this.data.upImgs + imgs.splice(index, 1); + upimg.splice(index,1) + this.setData({ + imgs: imgs, + upImgs:upimg + }); + + }, + // 预览图片 + previewImg: function (e) { + //获取当前图片的下标 + var index = e.currentTarget.dataset.index; + //所有图片 + var imgs = this.data.imgs; + wx.previewImage({ + //当前显示图片 + current: imgs[index], + //所有图片 + urls: imgs + }) + }, + checkboxChange:function(){ + this.setData({ + checked:!this.data.checked + }) + console.log(this.data.checked); + }, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/order/comment/index.wxml b/pages/order/comment/index.wxml index 271c5d6..646d050 100644 --- a/pages/order/comment/index.wxml +++ b/pages/order/comment/index.wxml @@ -1,7 +1,7 @@ - + {{item.product_title}} @@ -18,6 +18,21 @@ + + + + + + + + 上传图片 + + + + + 提交 \ No newline at end of file diff --git a/pages/order/comment/index.wxss b/pages/order/comment/index.wxss index dc717b2..ffdcc18 100644 --- a/pages/order/comment/index.wxss +++ b/pages/order/comment/index.wxss @@ -1,7 +1,11 @@ /* pages/order/comment/index.wxss */ +page{ + background-color: #FBF8FB; +} .product-box { - margin: 0 30rpx; + padding: 0 30rpx 10rpx 30rpx; font-size: 28rpx; + background-color: #fff; } .product-top { display: flex; @@ -56,6 +60,7 @@ .product-box textarea { display: block; width: 100%; + height: 210rpx; } .btn { width: 360rpx; @@ -70,4 +75,67 @@ bottom: 40rpx; left: 50%; margin-left: -180rpx; -} \ No newline at end of file +} + +/* 图片 */ +.three{ + margin-top: 27rpx; +} +.weui-uploader{ + margin: 16rpx 0; +} +.tp_add{ + width: 152rpx; + height: 152rpx; + border-radius: 10rpx; + opacity: 1; + border: 2rpx dashed #999999; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + font-size: 22rpx; + color: #BCBCBC; +} + +.pics { + float:left; + position:relative; + margin-right:15px; + margin-bottom:15px; + } + .pics image{ + width: 152rpx; + height: 152rpx; + } + .delete-btn{ + width: 20rpx; + height: 20rpx; + position: absolute; + top: -15rpx; + right: -5rpx; + } + .weui-uploader{ + padding: 10rpx 0; + } + .prd{ + border-bottom: 1px solid #CCCCCC; + } + .checkbox{ + margin: 16rpx 20rpx; + color: #BCBCBC; + } + checkbox .wx-checkbox-input { + width: 30rpx; + height: 30rpx; + border-radius: 50%; + } + + checkbox .wx-checkbox-input.wx-checkbox-input-checked { + border-color: #18d6ff; + background-color: #18d6ff; + } + + checkbox .wx-checkbox-input.wx-checkbox-input-checked::before { + color:#fff; + } diff --git a/pages/user/cartlist/list.wxml b/pages/user/cartlist/list.wxml index cc7a05c..2123667 100644 --- a/pages/user/cartlist/list.wxml +++ b/pages/user/cartlist/list.wxml @@ -31,7 +31,8 @@ 合计: - ¥{{allPrice/100}} + ¥{{allPrice/100}} + 不含运费 去下单 From d81786bbd08547317be9b8192c3782f59eed0352 Mon Sep 17 00:00:00 2001 From: caichunsheng Date: Wed, 17 Aug 2022 10:56:15 +0800 Subject: [PATCH 11/19] =?UTF-8?q?=E6=96=87=E5=8C=96=E9=85=8D=E9=80=81?= =?UTF-8?q?=E5=BC=80=E5=90=AF=EF=BC=8C=E7=94=A8=E6=88=B7=E9=9A=90=E7=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 6 +- pages/list/activitynew/index.wxml | 4 +- pages/pbService/index.wxml | 4 + pages/user/personalInfo/index.js | 228 +++++++++++++++++++++++++++++ pages/user/personalInfo/index.json | 5 + pages/user/personalInfo/index.wxml | 37 +++++ pages/user/personalInfo/index.wxss | 73 +++++++++ pages/user/service/list/index.js | 1 - pages/user/service/list/index.wxml | 3 +- pages/user/service/list/index.wxss | 4 +- pages/user/user.wxml | 15 ++ pages/user/userPrivacy/index.js | 71 +++++++++ pages/user/userPrivacy/index.json | 5 + pages/user/userPrivacy/index.wxml | 11 ++ pages/user/userPrivacy/index.wxss | 9 ++ 15 files changed, 469 insertions(+), 7 deletions(-) create mode 100644 pages/user/personalInfo/index.js create mode 100644 pages/user/personalInfo/index.json create mode 100644 pages/user/personalInfo/index.wxml create mode 100644 pages/user/personalInfo/index.wxss create mode 100644 pages/user/userPrivacy/index.js create mode 100644 pages/user/userPrivacy/index.json create mode 100644 pages/user/userPrivacy/index.wxml create mode 100644 pages/user/userPrivacy/index.wxss diff --git a/app.json b/app.json index 79c9fa4..23d26ac 100644 --- a/app.json +++ b/app.json @@ -179,7 +179,11 @@ "pages/order/orderList/index", "pages/user/linkman/add/index", "pages/user/address/add/index", - "pages/user/linkman/index" + "pages/user/linkman/index", + "pages/user/userPrivacy/index", + "pages/user/personalInfo/index" + + ], "plugins": { "live-player-plugin": { diff --git a/pages/list/activitynew/index.wxml b/pages/list/activitynew/index.wxml index 5c4c8b1..e74532c 100644 --- a/pages/list/activitynew/index.wxml +++ b/pages/list/activitynew/index.wxml @@ -27,10 +27,10 @@ 演出 - + 电影 diff --git a/pages/pbService/index.wxml b/pages/pbService/index.wxml index 827a635..43464b2 100644 --- a/pages/pbService/index.wxml +++ b/pages/pbService/index.wxml @@ -38,6 +38,10 @@ 12348 + + + 文化配送 + + + + + {{ title }} + + + {{ item.title }} + {{ item.des }} + > + + + + + + {{ item.title }} + + 使用目的 + {{ item.purpose }} + + + 使用场景 + {{ item.usage_scenarios }} + + + 收集情况 + {{ item.collect }} + + + + 信息内容 + {{item.information}} + + + + + \ No newline at end of file diff --git a/pages/user/personalInfo/index.wxss b/pages/user/personalInfo/index.wxss new file mode 100644 index 0000000..d10001b --- /dev/null +++ b/pages/user/personalInfo/index.wxss @@ -0,0 +1,73 @@ +page{ + background-color: rgb(242,242,242); + +} +.info{ + font-size: .6rem; + padding: 1.4rem .6rem 0 .6rem; +} +.title-header{ + background-color:#fff !important; + +} +.title-box{ + background-color:transparent !important; +} +.title { + color: #000; + + font-size: .8rem; + margin: .4rem 0; +} + +.item { + background: #fff; + font-size: .7rem; + padding: .8rem .8rem .4rem .8rem; + margin-top: .6rem; + position: relative; + border-radius: .6rem; + min-height: 4rem; +} + +.item-info { + color: #666; + margin: .4rem 0 .2rem 0; +} + +.item-icon { + position: absolute; + right: .2rem; + top: 50%; + font-family: cursive; + transform: translate(-.2rem, -.2rem); +} + +.info-content { + font-size: .7rem; + +} + +.info-list { + background: #fff; + font-size: .7rem; + padding: .2rem .8rem .4rem .8rem; + margin-top: .6rem; + border-radius: .6rem; + min-height: 4rem; +} + +.info-column { + display: flex; + align-items: flex-start; + margin-top: .4rem; +} + +.column-title { + color: #666; + white-space: nowrap; + margin-right: .2rem; +} +.green { + color: #0B898E; +} \ No newline at end of file diff --git a/pages/user/service/list/index.js b/pages/user/service/list/index.js index 8ee49b6..c5a6465 100644 --- a/pages/user/service/list/index.js +++ b/pages/user/service/list/index.js @@ -86,7 +86,6 @@ Page({ }) }) }, - /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/user/service/list/index.wxml b/pages/user/service/list/index.wxml index 10726a0..a398457 100644 --- a/pages/user/service/list/index.wxml +++ b/pages/user/service/list/index.wxml @@ -9,4 +9,5 @@ {{item.question_name}} -没找到想要的答案?一键呼唤人工客服 \ No newline at end of file + + diff --git a/pages/user/service/list/index.wxss b/pages/user/service/list/index.wxss index b81cefe..2775f59 100644 --- a/pages/user/service/list/index.wxss +++ b/pages/user/service/list/index.wxss @@ -47,8 +47,8 @@ } .more-btn { text-align: center; - width: 520rpx; - line-height: 60rpx; + width: 550rpx !important; + /* line-height: 60rpx; */ background: rgba(11, 137, 142, 0); border: 1rpx solid #D8D8D8; border-radius: 30rpx; diff --git a/pages/user/user.wxml b/pages/user/user.wxml index d808d7c..3e3cabb 100644 --- a/pages/user/user.wxml +++ b/pages/user/user.wxml @@ -88,5 +88,20 @@ 收货地址 + + + + 用户协议 + + + 隐私政策 + + + 个人信息收集清单 + + + 第三方共享信息清单 + + \ No newline at end of file diff --git a/pages/user/userPrivacy/index.js b/pages/user/userPrivacy/index.js new file mode 100644 index 0000000..8412a7d --- /dev/null +++ b/pages/user/userPrivacy/index.js @@ -0,0 +1,71 @@ +// pages/user/address/index.js +import user from "../../../utils/https/user.js" +import commonApi from "../../../utils/https/common" +import util from "../../../utils/util.js" +let app = getApp() +Page({ + + /** + * 页面的初始数据 + */ + data: { + id:null, + info:"", + title:"", + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + id:options.id + }) + this.getInfo() + }, + getInfo:function(){ + commonApi._post("pbservice/Other/getDictionary", { id: this.data.id }).then(res => { + console.log(res); + res=res.data + this.setData({ + info:res[0].content, + title:res[0].type_name + }) + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + } +}) \ No newline at end of file diff --git a/pages/user/userPrivacy/index.json b/pages/user/userPrivacy/index.json new file mode 100644 index 0000000..27b6d1f --- /dev/null +++ b/pages/user/userPrivacy/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "title-header": "/pages/component/TitleHeader" + } +} \ No newline at end of file diff --git a/pages/user/userPrivacy/index.wxml b/pages/user/userPrivacy/index.wxml new file mode 100644 index 0000000..2a73447 --- /dev/null +++ b/pages/user/userPrivacy/index.wxml @@ -0,0 +1,11 @@ + + + + {{title}} + + + {{info}} + + + + \ No newline at end of file diff --git a/pages/user/userPrivacy/index.wxss b/pages/user/userPrivacy/index.wxss new file mode 100644 index 0000000..99f3367 --- /dev/null +++ b/pages/user/userPrivacy/index.wxss @@ -0,0 +1,9 @@ +.title{ + padding: 10rpx 20rpx 0rpx 20rpx; + font-size: 28rpx; +} +.text{ + padding: 10rpx 20rpx 0rpx 20rpx; + font-size: 24rpx; + +} \ No newline at end of file From 878221292f10c90704db04f838f1a14b761236ca Mon Sep 17 00:00:00 2001 From: caichunsheng Date: Thu, 18 Aug 2022 17:01:30 +0800 Subject: [PATCH 12/19] =?UTF-8?q?=E6=96=87=E5=8C=96=E9=85=8D=E9=80=81=20?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E6=98=BE=E7=A4=BA=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.js | 11 ++-- pages/index/index.wxml | 7 ++- pages/info/hotelProductInfo/index.js | 11 ++++ pages/info/hotelProductInfo/index.wxml | 5 +- pages/info/hotelProductInfo/index.wxss | 6 ++ pages/info/postProductInfo/index.js | 11 ++++ pages/info/postProductInfo/index.wxml | 5 +- pages/info/postProductInfo/index.wxss | 6 ++ pages/info/sceneProductInfo/index.js | 13 +++- pages/info/sceneProductInfo/index.wxml | 5 +- pages/info/sceneProductInfo/index.wxss | 9 ++- pages/list/comments/index.js | 23 ++++++- pages/list/comments/index.wxml | 6 +- pages/list/comments/index.wxss | 8 ++- pages/order/comment/index.js | 85 ++++++++++++-------------- pages/pbService/index.wxml | 4 +- 16 files changed, 153 insertions(+), 62 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index 84ba5eb..26d0fec 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -52,7 +52,7 @@ Page({ this.setData({ showTime:true }) - let timer = setInterval(() => { + var timer = setInterval(() => { this.setData({ time: this.data.time - 1 }) @@ -61,8 +61,10 @@ Page({ this.setData({ showFullAdv: false }) - if (!this.data.alertSwipeList>0) - wx.showTabBar() //倒计时结束清楚定时器显示导航栏 + if (this.data.alertSwipeList.length==0) { + wx.showTabBar() //倒计时结束清楚定时器显示导航栏 + } + } }, 1000) @@ -196,7 +198,7 @@ Page({ alertSwipeList: res.data || [], showAdv: true }) - }else{ + }else if(!this.data.showFullAdv){ wx.showTabBar({ animation: true, }) @@ -613,6 +615,7 @@ Page({ }) }, bannerJumpNew(item) { + let that = this item = item.currentTarget.dataset.item if (item.tdata == '') return diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 71e01c4..0341df0 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -24,7 +24,7 @@ - + @@ -220,6 +220,11 @@ 书香借阅 + + + 文化配送 + diff --git a/pages/info/hotelProductInfo/index.js b/pages/info/hotelProductInfo/index.js index eb4c6eb..15b2229 100644 --- a/pages/info/hotelProductInfo/index.js +++ b/pages/info/hotelProductInfo/index.js @@ -218,6 +218,17 @@ Page({ comment: res.data.list, commentTotal: res.data.total }) + let arr = this.data.comment + arr.map((item)=>{ + if (item.img_list) { + item.img_list = item.img_list.split(',') + }else{ + item.img_list=[] + } + }) + this.setData({ + comment:arr + }) }) }, like: function () { diff --git a/pages/info/hotelProductInfo/index.wxml b/pages/info/hotelProductInfo/index.wxml index 5460744..2198ff8 100644 --- a/pages/info/hotelProductInfo/index.wxml +++ b/pages/info/hotelProductInfo/index.wxml @@ -105,12 +105,15 @@ - {{item.user.nickname}} + {{item.nickname}} {{item.create_time}} {{item.content}} + + + 查看全部点评 diff --git a/pages/info/hotelProductInfo/index.wxss b/pages/info/hotelProductInfo/index.wxss index d1ded8a..a8840ba 100644 --- a/pages/info/hotelProductInfo/index.wxss +++ b/pages/info/hotelProductInfo/index.wxss @@ -550,4 +550,10 @@ page { font-size: 31rpx; font-weight: 500; margin-top: 50rpx; +} +.imgs{ + width: 200rpx; + height: 200rpx; + margin: 10rpx; + border-radius: 8rpx; } \ No newline at end of file diff --git a/pages/info/postProductInfo/index.js b/pages/info/postProductInfo/index.js index d02337c..0f20584 100644 --- a/pages/info/postProductInfo/index.js +++ b/pages/info/postProductInfo/index.js @@ -92,6 +92,17 @@ Page({ comment: res.data.list, commentTotal: res.data.total }) + let arr = this.data.comment + arr.map((item)=>{ + if (item.img_list) { + item.img_list = item.img_list.split(',') + }else{ + item.img_list=[] + } + }) + this.setData({ + comment:arr + }) }) }, diff --git a/pages/info/postProductInfo/index.wxml b/pages/info/postProductInfo/index.wxml index 7166da8..9b30638 100644 --- a/pages/info/postProductInfo/index.wxml +++ b/pages/info/postProductInfo/index.wxml @@ -66,13 +66,16 @@ - {{item.user.nickname}} + {{item.nickname}} {{item.create_time}} {{item.content}} + + + 查看全部点评 diff --git a/pages/info/postProductInfo/index.wxss b/pages/info/postProductInfo/index.wxss index bf4277a..655e60e 100644 --- a/pages/info/postProductInfo/index.wxss +++ b/pages/info/postProductInfo/index.wxss @@ -806,4 +806,10 @@ page { .mask-allowance .mask-content .rule-title { text-align: center; margin-bottom: 20rpx; +} +.imgs{ + width: 200rpx; + height: 200rpx; + margin: 10rpx; + border-radius: 8rpx; } \ No newline at end of file diff --git a/pages/info/sceneProductInfo/index.js b/pages/info/sceneProductInfo/index.js index c3c5a2d..242627f 100644 --- a/pages/info/sceneProductInfo/index.js +++ b/pages/info/sceneProductInfo/index.js @@ -96,6 +96,7 @@ Page({ this.setData({ info: res.data }) + console.log(this.data.info); util.pagePoint({ event: 'scene_view', param: { type: res.data.type, id: res.data.id } }, 1) this.BroswerRecord() }) @@ -130,7 +131,17 @@ Page({ comment: res.data.list.splice(0, 3), commentTotal: res.data.total }) - console.log(res) + let arr = this.data.comment + arr.map((item)=>{ + if (item.img_list) { + item.img_list = item.img_list.split(',') + }else{ + item.img_list=[] + } + }) + this.setData({ + comment:arr + }) }) }, changeAllowance: function () { diff --git a/pages/info/sceneProductInfo/index.wxml b/pages/info/sceneProductInfo/index.wxml index a2d5f8d..48758d2 100644 --- a/pages/info/sceneProductInfo/index.wxml +++ b/pages/info/sceneProductInfo/index.wxml @@ -167,13 +167,16 @@ - {{item.user.nickname}} + {{item.nickname}} {{item.create_time}} {{item.content}} + + + 查看全部点评 diff --git a/pages/info/sceneProductInfo/index.wxss b/pages/info/sceneProductInfo/index.wxss index bac3e07..dd66fa4 100644 --- a/pages/info/sceneProductInfo/index.wxss +++ b/pages/info/sceneProductInfo/index.wxss @@ -259,7 +259,7 @@ page { } .comment-content { - margin-left: 72rpx; + margin-left:10rpx; margin-top: 36rpx; font-size: 28rpx; color: #000; @@ -272,6 +272,7 @@ page { color: #999; font-size: 27rpx; font-weight: 500; + margin-bottom:60rpx ; } .more-comment-btn .iconfont { @@ -795,4 +796,10 @@ page { height: 80rpx; left: 650rpx; border-radius: 50%; +} +.imgs{ + width: 200rpx; + height: 200rpx; + margin: 10rpx; + border-radius: 8rpx; } \ No newline at end of file diff --git a/pages/list/comments/index.js b/pages/list/comments/index.js index c8b156d..580e115 100644 --- a/pages/list/comments/index.js +++ b/pages/list/comments/index.js @@ -45,9 +45,30 @@ Page({ total:res.data.total, list:list.concat(res.data.list) }) + let arr = this.data.list + arr.map((item)=>{ + if (item.img_list) { + item.img_list = item.img_list.split(',') + }else{ + item.img_list=[] + } + }) + this.setData({ + list:arr + }) + }) + }, + imgsc:function(e){ + console.log(e); + var src = e.currentTarget.dataset.img;//获取data-src + var imgList = e.currentTarget.dataset.list;//获取data-list + console.log(src) + //图片预览 + wx.previewImage({ + current: src, // 当前显示图片的http链接 + urls: imgList // 需要预览的图片http链接列表 }) }, - /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/list/comments/index.wxml b/pages/list/comments/index.wxml index 1d3db29..a452885 100644 --- a/pages/list/comments/index.wxml +++ b/pages/list/comments/index.wxml @@ -5,11 +5,15 @@ - {{item.user.nickname}} + {{item.nickname}} {{item.create_time}} {{item.content}} + + + + diff --git a/pages/list/comments/index.wxss b/pages/list/comments/index.wxss index 042b432..c2e2f7d 100644 --- a/pages/list/comments/index.wxss +++ b/pages/list/comments/index.wxss @@ -37,11 +37,17 @@ margin-top: 4rpx; } .comment-detail { - margin-left: 87rpx; + margin-left: 10rpx; font-size: 29rpx; color: #000; margin-top: 25rpx; } .comment-item:last-child { border-bottom: none; +} +.imgs{ + width: 200rpx; + height: 200rpx; + margin: 10rpx; + border-radius: 8rpx; } \ No newline at end of file diff --git a/pages/order/comment/index.js b/pages/order/comment/index.js index 9286452..2b65471 100644 --- a/pages/order/comment/index.js +++ b/pages/order/comment/index.js @@ -45,7 +45,6 @@ Page({ }) }, changeStar: function (e) { - console.log(e) wx.showLoading({ title: '加载中' }) @@ -57,11 +56,9 @@ Page({ info: info, rate:info.order_product_list[index].star }) - console.log(info); wx.hideLoading({}) }, changeContent: function (e) { - console.log(e) let index = e.currentTarget.dataset.index, info = this.data.info; info.order_product_list[index].content = e.detail.value; @@ -81,7 +78,6 @@ Page({ }) flag = false; } - console.log(item); ajax.push(commonApi.user_post("product/product_comment", { product_id: item.product_id, content: item.content, @@ -93,7 +89,6 @@ Page({ }) if (!flag) return; Promise.all(ajax).then(res => { - console.log(res) let flag = false; res.map(item => { if (item.code == 1) { @@ -109,12 +104,11 @@ Page({ //图片上传 // 上传图片 chooseImg: function (e) { - console.log(e); var that = this; var imgs = this.data.imgs; - if (imgs.length >= 8) { + if (imgs.length >= 9) { wx.showToast({ - title: '最多上传八张图片哦..', + title: '最多上传九张图片哦..', icon: 'none' }) return false; @@ -142,48 +136,46 @@ Page({ } var tempFilePaths = res.tempFilePaths; var imgs = that.data.imgs; - wx.uploadFile({ - url: 'https://test.api.cloud.sz-trip.com/api/pbservice.other/upload', //这里是上传的服务器地址 - filePath: tempFilePaths[0], - name: 'file', - header: { - token: wx.getStorageSync('jstrip_token'), - }, - success(res) { + console.log(imgs); + wx.showLoading({ + title: '上传中', + }) - var res = JSON.parse(res.data); - if (res.code!=1) { - wx.showToast({ - title: res.msg, - icon: 'none' - }) - return - } - let img = res.data.url; - let arr = that.data.upImgs - arr.push(img) - that.setData({ - upImgs:arr - }) - console.log(that.data.upImgs); - for (var i = 0; i < tempFilePaths.length; i++) { - if (imgs.length >= 9) { - that.setData({ - imgs: imgs - }); - return false; - } else { - imgs.push(tempFilePaths[i]); + for (let i = 0; i < tempFilePaths.length; i++) { + wx.uploadFile({ + url: 'https://test.api.cloud.sz-trip.com/api/pbservice.other/upload', //这里是上传的服务器地址 + filePath: tempFilePaths[i], + name: 'file', + header: { + token: wx.getStorageSync('jstrip_token'), + }, + success(res) { + wx.hideLoading() + var res = JSON.parse(res.data); + if (res.code!=1) { + wx.showToast({ + title: res.msg, + icon: 'none' + }) + return } + let img = res.data.url; + let arr = that.data.upImgs + arr.push(img) + that.setData({ + upImgs:arr + }) + imgs.push(tempFilePaths[i]); + that.setData({ + imgs: imgs + }); } - // console.log(imgs); - that.setData({ - imgs: imgs - }); - console.log(that.data.imgs); - const data = res.data + }) + if (that.data,imgs.length+i==8) { + return } - }) + } + } }); @@ -218,7 +210,6 @@ Page({ this.setData({ checked:!this.data.checked }) - console.log(this.data.checked); }, /** * 生命周期函数--监听页面初次渲染完成 diff --git a/pages/pbService/index.wxml b/pages/pbService/index.wxml index 43464b2..1940aff 100644 --- a/pages/pbService/index.wxml +++ b/pages/pbService/index.wxml @@ -38,10 +38,10 @@ 12348 - + Date: Sat, 20 Aug 2022 15:01:39 +0800 Subject: [PATCH 13/19] =?UTF-8?q?=E8=AF=84=E8=AE=BA=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/info/hotelProductInfo/index.wxml | 13 ++++- pages/info/hotelProductInfo/index.wxss | 24 ++++++++ pages/info/postProductInfo/index.wxml | 13 ++++- pages/info/postProductInfo/index.wxss | 24 ++++++++ pages/info/sceneProductInfo/index.js | 4 +- pages/info/sceneProductInfo/index.wxml | 74 ++++++++++++------------- pages/info/sceneProductInfo/index.wxss | 26 ++++++++- pages/list/comments/index.js | 20 +++++-- pages/order/comment/index.js | 3 +- pages/order/comment/index.wxss | 8 +++ pages/user/order/list.wxml | 2 +- pages/user/order/postOrderInfo/index.js | 7 ++- 12 files changed, 162 insertions(+), 56 deletions(-) diff --git a/pages/info/hotelProductInfo/index.wxml b/pages/info/hotelProductInfo/index.wxml index 2198ff8..02b3b4f 100644 --- a/pages/info/hotelProductInfo/index.wxml +++ b/pages/info/hotelProductInfo/index.wxml @@ -101,7 +101,7 @@ 这里空空如也,快去点评吧! - + @@ -112,8 +112,15 @@ {{item.content}} - - + + + + + 共{{item.img_list.length}}张 + 查看全部 + + + 查看全部点评 diff --git a/pages/info/hotelProductInfo/index.wxss b/pages/info/hotelProductInfo/index.wxss index a8840ba..cbec603 100644 --- a/pages/info/hotelProductInfo/index.wxss +++ b/pages/info/hotelProductInfo/index.wxss @@ -556,4 +556,28 @@ page { height: 200rpx; margin: 10rpx; border-radius: 8rpx; +} +.img-box{ + display: inline-block; + position: relative; +} +.all{ + color: #fff; + position:absolute; + bottom: 17rpx; + right: 10rpx; + width: 200rpx; + height: 200rpx; + border-radius: 8rpx; + background-color: rgba(0, 0, 0, .5); +} +.all view{ + text-align: center; +} +.all view:first-child{ + font-size: 45rpx; + margin-top: 40rpx; +} +.all view:last-child{ + margin-top: 10rpx; } \ No newline at end of file diff --git a/pages/info/postProductInfo/index.wxml b/pages/info/postProductInfo/index.wxml index 9b30638..686cd76 100644 --- a/pages/info/postProductInfo/index.wxml +++ b/pages/info/postProductInfo/index.wxml @@ -62,7 +62,7 @@ 这里空空如也,快去点评吧! - + @@ -74,8 +74,15 @@ {{item.content}} - - + + + + + 共{{item.img_list.length}}张 + 查看全部 + + + 查看全部点评 diff --git a/pages/info/postProductInfo/index.wxss b/pages/info/postProductInfo/index.wxss index 655e60e..7f8a890 100644 --- a/pages/info/postProductInfo/index.wxss +++ b/pages/info/postProductInfo/index.wxss @@ -812,4 +812,28 @@ page { height: 200rpx; margin: 10rpx; border-radius: 8rpx; +} +.img-box{ + display: inline-block; + position: relative; +} +.all{ + color: #fff; + position:absolute; + bottom: 17rpx; + right: 10rpx; + width: 200rpx; + height: 200rpx; + border-radius: 8rpx; + background-color: rgba(0, 0, 0, .5); +} +.all view{ + text-align: center; +} +.all view:first-child{ + font-size: 45rpx; + margin-top: 40rpx; +} +.all view:last-child{ + margin-top: 10rpx; } \ No newline at end of file diff --git a/pages/info/sceneProductInfo/index.js b/pages/info/sceneProductInfo/index.js index 242627f..95fced5 100644 --- a/pages/info/sceneProductInfo/index.js +++ b/pages/info/sceneProductInfo/index.js @@ -134,7 +134,9 @@ Page({ let arr = this.data.comment arr.map((item)=>{ if (item.img_list) { - item.img_list = item.img_list.split(',') + let arr = item.img_list.split(',') + item.img_list = arr + }else{ item.img_list=[] } diff --git a/pages/info/sceneProductInfo/index.wxml b/pages/info/sceneProductInfo/index.wxml index 48758d2..4ddb5b9 100644 --- a/pages/info/sceneProductInfo/index.wxml +++ b/pages/info/sceneProductInfo/index.wxml @@ -3,14 +3,12 @@ - + - + @@ -26,16 +24,13 @@ 开园时间:{{info.open_time}} - 优待政策 | 景点介绍 + 优待政策 | 景点介绍 地址:{{info.address}} - {{info.garden_flag_text}} + {{info.garden_flag_text}} @@ -64,24 +59,23 @@ - - - 客服 - - - - 收藏 - - - - 加入购物车 - 立即预订 - 该商品已下架 - + + + 客服 + + + + 收藏 + + + + 加入购物车 + 立即预订 + 该商品已下架 + - + {{cartCount}} @@ -100,8 +94,7 @@ - {{item.sku_name}} + {{item.sku_name}} 数量 @@ -111,7 +104,7 @@ - {{skuFlag=='cart'?'确认':'立即购买'}} + {{skuFlag=='cart'?'确认':'立即购买'}} 该商品已下架 @@ -132,8 +125,7 @@ - + {{item.question_name}} @@ -155,28 +147,33 @@ - 游客点评{{info.rate}}分 + 游客点评{{info.rate}}分 共{{commentTotal}}条 这里空空如也,快去点评吧! - + {{item.nickname}} - + {{item.create_time}} {{item.content}} - - + + + + + 共{{item.img_list.length}}张 + 查看全部 + + + 查看全部点评 @@ -202,8 +199,7 @@ - + diff --git a/pages/info/sceneProductInfo/index.wxss b/pages/info/sceneProductInfo/index.wxss index dd66fa4..ccf0343 100644 --- a/pages/info/sceneProductInfo/index.wxss +++ b/pages/info/sceneProductInfo/index.wxss @@ -780,7 +780,6 @@ page { right: -2rpx; top: -5rpx; } - .headimg { position: fixed; z-index: 3; @@ -789,7 +788,6 @@ page { height: 180rpx; top: 0; } - .headimg.active { transition: left .6s linear, top .6s cubic-bezier(0.5, -0.5, 1, 1), width .6s ease, height .6s ease; width: 80rpx; @@ -802,4 +800,28 @@ page { height: 200rpx; margin: 10rpx; border-radius: 8rpx; +} +.img-box{ + display: inline-block; + position: relative; +} +.all{ + color: #fff; + position:absolute; + bottom: 17rpx; + right: 10rpx; + width: 200rpx; + height: 200rpx; + border-radius: 8rpx; + background-color: rgba(0, 0, 0, .5); +} +.all view{ + text-align: center; +} +.all view:first-child{ + font-size: 45rpx; + margin-top: 40rpx; +} +.all view:last-child{ + margin-top: 10rpx; } \ No newline at end of file diff --git a/pages/list/comments/index.js b/pages/list/comments/index.js index 580e115..de1df8f 100644 --- a/pages/list/comments/index.js +++ b/pages/list/comments/index.js @@ -9,7 +9,8 @@ Page({ productid:null, sceneid:null, list:[], - total:1 + total:1, + index:null, }, /** @@ -22,8 +23,10 @@ Page({ }) } else if(options.sceneid){ + console.log(options.index); this.setData({ - sceneid:options.sceneid + sceneid:options.sceneid, + index:options.index, }) } this.getList() @@ -53,9 +56,16 @@ Page({ item.img_list=[] } }) - this.setData({ - list:arr - }) + if (this.data.index) { + this.setData({ + list:arr.splice(this.data.index,1) + }) + }else{ + this.setData({ + list:arr + }) + } + }) }, imgsc:function(e){ diff --git a/pages/order/comment/index.js b/pages/order/comment/index.js index 2b65471..7ce057a 100644 --- a/pages/order/comment/index.js +++ b/pages/order/comment/index.js @@ -84,7 +84,8 @@ Page({ order_id: item.order_id, integer:this.data.rate, img_list:this.data.upImgs.join(','), - is_anonymous:this.data.checked?1:0 + is_anonymous:this.data.checked?1:0, + sku_id:item.sku_id })) }) if (!flag) return; diff --git a/pages/order/comment/index.wxss b/pages/order/comment/index.wxss index ffdcc18..df3f7b3 100644 --- a/pages/order/comment/index.wxss +++ b/pages/order/comment/index.wxss @@ -21,11 +21,19 @@ page{ flex: 1; width: 100%; margin: 0 30rpx; + height: 120rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + } .product-title { font-size: 32rpx; color: #000; } +.sku-name{ + margin-bottom:12rpx ; +} .product-price { flex-shrink: 0; text-align: right; diff --git a/pages/user/order/list.wxml b/pages/user/order/list.wxml index 679be59..d1c53d1 100644 --- a/pages/user/order/list.wxml +++ b/pages/user/order/list.wxml @@ -41,7 +41,7 @@ 行程规划 再次购买 - 立即评价 + 取消预订 取消预订 退款详情 diff --git a/pages/user/order/postOrderInfo/index.js b/pages/user/order/postOrderInfo/index.js index 40fca77..3f28c4e 100644 --- a/pages/user/order/postOrderInfo/index.js +++ b/pages/user/order/postOrderInfo/index.js @@ -160,7 +160,12 @@ Page({ return; }) }, - + gotoComment:function(e){ + let id = e.currentTarget.dataset.id; + wx.navigateTo({ + url: '/pages/order/comment/index?id='+id, + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ From 5c3e14f8f12b6988e7ece15327fd07ad3d2689d5 Mon Sep 17 00:00:00 2001 From: caichunsheng Date: Sat, 20 Aug 2022 16:54:38 +0800 Subject: [PATCH 14/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/user/personalInfo/index.wxss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/user/personalInfo/index.wxss b/pages/user/personalInfo/index.wxss index d10001b..df0b01a 100644 --- a/pages/user/personalInfo/index.wxss +++ b/pages/user/personalInfo/index.wxss @@ -70,4 +70,8 @@ page{ } .green { color: #0B898E; +} +.column-info{ + overflow:auto; + width: 100%; } \ No newline at end of file From 4056d31418990a568ca75e0984393fa1724f6040 Mon Sep 17 00:00:00 2001 From: caichunsheng Date: Sat, 20 Aug 2022 17:33:03 +0800 Subject: [PATCH 15/19] =?UTF-8?q?=E8=AF=84=E4=BB=B7=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/order/comment/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/order/comment/index.js b/pages/order/comment/index.js index 7ce057a..5fa253d 100644 --- a/pages/order/comment/index.js +++ b/pages/order/comment/index.js @@ -82,7 +82,7 @@ Page({ product_id: item.product_id, content: item.content, order_id: item.order_id, - integer:this.data.rate, + rate:this.data.rate, img_list:this.data.upImgs.join(','), is_anonymous:this.data.checked?1:0, sku_id:item.sku_id From b897c0f4fa27e8036275aaf7cd7d8643a521a8c2 Mon Sep 17 00:00:00 2001 From: caichunsheng Date: Mon, 22 Aug 2022 15:39:13 +0800 Subject: [PATCH 16/19] =?UTF-8?q?=E8=AF=84=E8=AE=BA=E7=BB=86=E8=8A=82?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.wxml | 2 +- pages/info/hotelProductInfo/index.js | 2 +- pages/info/hotelProductInfo/index.wxml | 2 ++ pages/info/hotelProductInfo/index.wxss | 6 ++++++ pages/info/postProductInfo/index.js | 2 +- pages/info/postProductInfo/index.wxml | 3 ++- pages/info/postProductInfo/index.wxss | 6 ++++++ pages/info/sceneProductInfo/index.js | 2 +- pages/info/sceneProductInfo/index.wxml | 6 ++++-- pages/info/sceneProductInfo/index.wxss | 12 +++++++++++- pages/list/comments/index.js | 1 + pages/list/comments/index.wxml | 6 ++++++ pages/list/comments/index.wxss | 21 +++++++++++++++++++++ 13 files changed, 63 insertions(+), 8 deletions(-) diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 0341df0..963ea03 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -220,7 +220,7 @@ 书香借阅 - 文化配送 diff --git a/pages/info/hotelProductInfo/index.js b/pages/info/hotelProductInfo/index.js index 15b2229..b42b444 100644 --- a/pages/info/hotelProductInfo/index.js +++ b/pages/info/hotelProductInfo/index.js @@ -215,7 +215,7 @@ Page({ item.rate = Number(item.rate) }) this.setData({ - comment: res.data.list, + comment: res.data.list.splice(0, 2), commentTotal: res.data.total }) let arr = this.data.comment diff --git a/pages/info/hotelProductInfo/index.wxml b/pages/info/hotelProductInfo/index.wxml index 02b3b4f..298959e 100644 --- a/pages/info/hotelProductInfo/index.wxml +++ b/pages/info/hotelProductInfo/index.wxml @@ -121,6 +121,8 @@ + {{item.sku_name}} + 查看全部点评 diff --git a/pages/info/hotelProductInfo/index.wxss b/pages/info/hotelProductInfo/index.wxss index cbec603..4dfc461 100644 --- a/pages/info/hotelProductInfo/index.wxss +++ b/pages/info/hotelProductInfo/index.wxss @@ -580,4 +580,10 @@ page { } .all view:last-child{ margin-top: 10rpx; +} +.sku{ + margin-left: 10rpx; + color: #666; + font-size: 24rpx; + margin-top: 8rpx; } \ No newline at end of file diff --git a/pages/info/postProductInfo/index.js b/pages/info/postProductInfo/index.js index 0f20584..e12939f 100644 --- a/pages/info/postProductInfo/index.js +++ b/pages/info/postProductInfo/index.js @@ -89,7 +89,7 @@ Page({ item.rate = Number(item.rate) }) this.setData({ - comment: res.data.list, + comment: res.data.list.splice(0, 2), commentTotal: res.data.total }) let arr = this.data.comment diff --git a/pages/info/postProductInfo/index.wxml b/pages/info/postProductInfo/index.wxml index 686cd76..f7cc4bb 100644 --- a/pages/info/postProductInfo/index.wxml +++ b/pages/info/postProductInfo/index.wxml @@ -70,7 +70,7 @@ - {{item.create_time}} + {{item.content}} @@ -83,6 +83,7 @@ + {{item.sku_name}} 查看全部点评 diff --git a/pages/info/postProductInfo/index.wxss b/pages/info/postProductInfo/index.wxss index 7f8a890..ef9c716 100644 --- a/pages/info/postProductInfo/index.wxss +++ b/pages/info/postProductInfo/index.wxss @@ -836,4 +836,10 @@ page { } .all view:last-child{ margin-top: 10rpx; +} +.sku{ + margin-left: 10rpx; + color: #666; + font-size: 24rpx; + margin-top: 8rpx; } \ No newline at end of file diff --git a/pages/info/sceneProductInfo/index.js b/pages/info/sceneProductInfo/index.js index 95fced5..41e4c81 100644 --- a/pages/info/sceneProductInfo/index.js +++ b/pages/info/sceneProductInfo/index.js @@ -128,7 +128,7 @@ Page({ item.rate = Number(item.rate) }) this.setData({ - comment: res.data.list.splice(0, 3), + comment: res.data.list.splice(0, 2), commentTotal: res.data.total }) let arr = this.data.comment diff --git a/pages/info/sceneProductInfo/index.wxml b/pages/info/sceneProductInfo/index.wxml index 4ddb5b9..0d5438e 100644 --- a/pages/info/sceneProductInfo/index.wxml +++ b/pages/info/sceneProductInfo/index.wxml @@ -148,7 +148,8 @@ 游客点评{{info.rate}}分 - 共{{commentTotal}}条 + 共{{commentTotal}}条 > + 这里空空如也,快去点评吧! @@ -161,7 +162,7 @@ {{item.nickname}} - {{item.create_time}} + {{item.content}} @@ -174,6 +175,7 @@ + {{item.sku_name}} 查看全部点评 diff --git a/pages/info/sceneProductInfo/index.wxss b/pages/info/sceneProductInfo/index.wxss index ccf0343..e90e3f3 100644 --- a/pages/info/sceneProductInfo/index.wxss +++ b/pages/info/sceneProductInfo/index.wxss @@ -252,6 +252,7 @@ page { .product-comment-top .comment-info .iconfont { color: #D62828; font-size: 22rpx; + margin-top: 6rpx; } .product-comment-top .comment-info .iconfont text { @@ -285,6 +286,7 @@ page { color: #999999; font-size: 27rpx; font-weight: 400; + font-family: PingFang SC !important; } .ask-list .ask-item:nth-child(1) { @@ -819,9 +821,17 @@ page { text-align: center; } .all view:first-child{ - font-size: 45rpx; + font-size: 40rpx; margin-top: 40rpx; } .all view:last-child{ margin-top: 10rpx; + font-size: 30rpx; + +} +.sku{ + margin-left: 10rpx; + color: #666; + font-size: 24rpx; + margin-top: 8rpx; } \ No newline at end of file diff --git a/pages/list/comments/index.js b/pages/list/comments/index.js index de1df8f..d769cad 100644 --- a/pages/list/comments/index.js +++ b/pages/list/comments/index.js @@ -50,6 +50,7 @@ Page({ }) let arr = this.data.list arr.map((item)=>{ + item.rate = Number(item.rate) if (item.img_list) { item.img_list = item.img_list.split(',') }else{ diff --git a/pages/list/comments/index.wxml b/pages/list/comments/index.wxml index a452885..23c31fb 100644 --- a/pages/list/comments/index.wxml +++ b/pages/list/comments/index.wxml @@ -5,9 +5,15 @@ + {{item.nickname}} {{item.create_time}} + + + {{item.sku_name}} + + {{item.content}} diff --git a/pages/list/comments/index.wxss b/pages/list/comments/index.wxss index c2e2f7d..5300d8a 100644 --- a/pages/list/comments/index.wxss +++ b/pages/list/comments/index.wxss @@ -30,6 +30,7 @@ flex: 1; font-size: 27rpx; color: #333; + } .author-time { color: #999999; @@ -50,4 +51,24 @@ height: 200rpx; margin: 10rpx; border-radius: 8rpx; +} +.iconfont { + color: #D62828; + font-size: 22rpx; + line-height: 30rpx; +} +.top{ + display: flex; + justify-content: space-between; +} +.bot{ + margin-top: 10rpx; + display: flex; + justify-content: left; + align-self: center; +} +.sku{ + color: #666; + margin-left:20rpx ; + font-size: 24rpx; } \ No newline at end of file From ab9e2d645e49f54ed4b268d084eb6ef7761a8623 Mon Sep 17 00:00:00 2001 From: caichunsheng Date: Wed, 24 Aug 2022 09:51:12 +0800 Subject: [PATCH 17/19] =?UTF-8?q?=E4=BA=BA=E5=B7=A5=E5=AE=A2=E6=9C=8D?= =?UTF-8?q?=E6=94=B9=E5=8A=A8=EF=BC=8C=E8=AF=84=E4=BB=B7=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.js | 1 + pages/info/hotelProductInfo/index.wxml | 3 +- pages/info/hotelProductInfo/index.wxss | 2 +- pages/info/postProductInfo/index.js | 2 + pages/info/postProductInfo/index.wxml | 3 +- pages/info/postProductInfo/index.wxss | 2 +- pages/list/comments/index.js | 1 + pages/user/service/list/index.js | 29 +++++++- pages/user/service/list/index.wxml | 26 ++++++- pages/user/service/list/index.wxss | 93 +++++++++++++++++++++++++- utils/https.js | 2 + 11 files changed, 156 insertions(+), 8 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index 26d0fec..99a187c 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -740,6 +740,7 @@ Page({ this.pagePoint({ event: 'home_view' }, 1) + this.data.time!=5?wx.showTabBar():1 }, /** diff --git a/pages/info/hotelProductInfo/index.wxml b/pages/info/hotelProductInfo/index.wxml index 298959e..0090c6d 100644 --- a/pages/info/hotelProductInfo/index.wxml +++ b/pages/info/hotelProductInfo/index.wxml @@ -95,7 +95,8 @@ 游客点评{{info.rate}}分 - 共{{commentTotal}}条 + 共{{commentTotal}}条 > + 这里空空如也,快去点评吧! diff --git a/pages/info/hotelProductInfo/index.wxss b/pages/info/hotelProductInfo/index.wxss index 4dfc461..403c9e7 100644 --- a/pages/info/hotelProductInfo/index.wxss +++ b/pages/info/hotelProductInfo/index.wxss @@ -269,7 +269,7 @@ page { margin-right: 6rpx; } .comment-content { - margin-left: 72rpx; + margin-left: 12rpx; margin-top: 36rpx; font-size: 28rpx; color: #000; diff --git a/pages/info/postProductInfo/index.js b/pages/info/postProductInfo/index.js index e12939f..b2dfec6 100644 --- a/pages/info/postProductInfo/index.js +++ b/pages/info/postProductInfo/index.js @@ -87,6 +87,8 @@ Page({ }).then(res => { res.data.list.map(item => { item.rate = Number(item.rate) + item.create_time = item.create_time.substring(0,10) + }) this.setData({ comment: res.data.list.splice(0, 2), diff --git a/pages/info/postProductInfo/index.wxml b/pages/info/postProductInfo/index.wxml index f7cc4bb..5a21294 100644 --- a/pages/info/postProductInfo/index.wxml +++ b/pages/info/postProductInfo/index.wxml @@ -56,7 +56,8 @@ 游客点评{{info.rate}}分 - 共{{commentTotal}}条 + 共{{commentTotal}}条 > + 这里空空如也,快去点评吧! diff --git a/pages/info/postProductInfo/index.wxss b/pages/info/postProductInfo/index.wxss index ef9c716..ec28d92 100644 --- a/pages/info/postProductInfo/index.wxss +++ b/pages/info/postProductInfo/index.wxss @@ -312,7 +312,7 @@ page { } .comment-content { - margin-left: 72rpx; + margin-left: 13rpx; margin-top: 36rpx; font-size: 28rpx; color: #000; diff --git a/pages/list/comments/index.js b/pages/list/comments/index.js index d769cad..d93a608 100644 --- a/pages/list/comments/index.js +++ b/pages/list/comments/index.js @@ -51,6 +51,7 @@ Page({ let arr = this.data.list arr.map((item)=>{ item.rate = Number(item.rate) + item.create_time = item.create_time.substring(0,10) if (item.img_list) { item.img_list = item.img_list.split(',') }else{ diff --git a/pages/user/service/list/index.js b/pages/user/service/list/index.js index c5a6465..51b8f3d 100644 --- a/pages/user/service/list/index.js +++ b/pages/user/service/list/index.js @@ -12,7 +12,11 @@ Page({ list:[], total:1, page_no:1, - keyword:"" + keyword:"", + showModal: false, + // 成功 + ses:true, + }, /** @@ -86,6 +90,29 @@ Page({ }) }) }, + showDialogBtn: function () { + this.setData({ + showModal: true + }) + }, + hideModal: function () { + this.setData({ + showModal: false + }); + }, + onCancel: function () { + this.hideModal(); + }, + onConfirm: function (e) { + console.log(e.currentTarget.dataset.name); + this.hideModal(); + }, + phoneCall:function(){ + console.log(1111); + wx.makePhoneCall({ + phoneNumber: '0512-66555111', + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/user/service/list/index.wxml b/pages/user/service/list/index.wxml index a398457..4b548a6 100644 --- a/pages/user/service/list/index.wxml +++ b/pages/user/service/list/index.wxml @@ -10,4 +10,28 @@ - + +没找到想要的答案?一键呼唤人工客服 + + + + + 即将跳转人工在线客服 + 客服服务时间:08:30-17:30 +如遇紧急情况可拨打 0512-66555111 + + 取消 + + + + \ No newline at end of file diff --git a/pages/user/service/list/index.wxss b/pages/user/service/list/index.wxss index 2775f59..5bcc390 100644 --- a/pages/user/service/list/index.wxss +++ b/pages/user/service/list/index.wxss @@ -48,14 +48,103 @@ .more-btn { text-align: center; width: 550rpx !important; - /* line-height: 60rpx; */ + line-height: 60rpx; background: rgba(11, 137, 142, 0); border: 1rpx solid #D8D8D8; border-radius: 30rpx; margin: 30rpx auto; font-size: 26rpx; font-weight: 500; + } .more-btn text { color: #0B898E; -} \ No newline at end of file +} + /**index.wxss**/ + .show-btn { + margin-top: 100rpx; + color: #22cc22; + } + + .modal-mask { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + background: #000; + opacity: 0.5; + overflow: hidden; + z-index: 9000; + color: #fff; + } + + .modal-dialog { + width: 540rpx; + overflow: hidden; + position: fixed; + top: 46%; + left: 0; + z-index: 9999; + background: #f9f9f9; + margin: -180rpx 105rpx; + border-radius: 8px; + } + + .modal-title { + padding-top: 30rpx; + padding-bottom: 30rpx; + font-size: 14px; + color: #030303; + text-align: center; + } + + .modal-img { + width: 40px; + height: 40px; + margin: 0 auto; + margin-top: 20rpx; + } + + + .modal-footer { + display: flex; + flex-direction: row; + height: 86rpx; + border-top: 1px solid #dedede; + font-size: 34rpx; + line-height: 86rpx; + } + + .btn-cancel { + width: 50%; + color: #8f8f8f; + background-color: #f2f2f2; + text-align: center; + border-right: 1px solid #dedede; + } + + .btn-confirm { + width: 50%; + color: #8f8f8f; + background-color: #f2f2f2; + text-align: center; + } + + .btn-confirms { + width: 100%; + background-color: #f2f2f2; + color: rgb(91,198,72); + text-align: center; + font-weight: normal !important; + } + .btn-confirms.two { + color: #8f8f8f; +} + .modal-info{ + line-height: 70rpx; + font-size: 30rpx; + } + .green{ + color: #22cc22; + } \ No newline at end of file diff --git a/utils/https.js b/utils/https.js index 953d1df..94f1b48 100644 --- a/utils/https.js +++ b/utils/https.js @@ -8,6 +8,8 @@ if (env == 'develop1') { baseUrl = "https://test.api.cloud.sz-trip.com/api/" } else { baseUrl = "https://api.cloud.sz-trip.com/api/"; + baseUrl = "https://test.api.cloud.sz-trip.com/api/" + } const orders = ['', 'weight', 'distance', 'sale_number', 'sale_price', 'price']; //封装GET请求 From 3a371b22588c9b57e47c2e5107ff761d66f3f8f8 Mon Sep 17 00:00:00 2001 From: caichunsheng Date: Wed, 24 Aug 2022 09:56:59 +0800 Subject: [PATCH 18/19] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/https.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/utils/https.js b/utils/https.js index 94f1b48..953d1df 100644 --- a/utils/https.js +++ b/utils/https.js @@ -8,8 +8,6 @@ if (env == 'develop1') { baseUrl = "https://test.api.cloud.sz-trip.com/api/" } else { baseUrl = "https://api.cloud.sz-trip.com/api/"; - baseUrl = "https://test.api.cloud.sz-trip.com/api/" - } const orders = ['', 'weight', 'distance', 'sale_number', 'sale_price', 'price']; //封装GET请求 From 57d59081d35cff748e602df20543712036fee7f8 Mon Sep 17 00:00:00 2001 From: caichunsheng Date: Wed, 24 Aug 2022 15:00:25 +0800 Subject: [PATCH 19/19] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A7=84=E6=A0=BC?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/info/hotelProductInfo/index.wxml | 3 +-- pages/info/postProductInfo/index.wxml | 2 +- pages/info/sceneProductInfo/index.wxml | 2 +- pages/list/comments/index.js | 13 +++++++------ pages/list/comments/index.wxml | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pages/info/hotelProductInfo/index.wxml b/pages/info/hotelProductInfo/index.wxml index 0090c6d..92fe16a 100644 --- a/pages/info/hotelProductInfo/index.wxml +++ b/pages/info/hotelProductInfo/index.wxml @@ -122,8 +122,7 @@ - {{item.sku_name}} - + {{item.sku_name}} 查看全部点评 diff --git a/pages/info/postProductInfo/index.wxml b/pages/info/postProductInfo/index.wxml index 5a21294..7d06781 100644 --- a/pages/info/postProductInfo/index.wxml +++ b/pages/info/postProductInfo/index.wxml @@ -84,7 +84,7 @@ - {{item.sku_name}} + {{item.sku_name}} 查看全部点评 diff --git a/pages/info/sceneProductInfo/index.wxml b/pages/info/sceneProductInfo/index.wxml index 0d5438e..4ff2b60 100644 --- a/pages/info/sceneProductInfo/index.wxml +++ b/pages/info/sceneProductInfo/index.wxml @@ -175,7 +175,7 @@ - {{item.sku_name}} + {{item.sku_name}} 查看全部点评 diff --git a/pages/list/comments/index.js b/pages/list/comments/index.js index d93a608..9a8cced 100644 --- a/pages/list/comments/index.js +++ b/pages/list/comments/index.js @@ -44,11 +44,11 @@ Page({ } commonApi._post(service,data).then(res=>{ console.log(res) - this.setData({ - total:res.data.total, - list:list.concat(res.data.list) - }) - let arr = this.data.list + // this.setData({ + // total:res.data.total, + // list:list.concat(res.data.list) + // }) + let arr = res.data.list arr.map((item)=>{ item.rate = Number(item.rate) item.create_time = item.create_time.substring(0,10) @@ -64,7 +64,8 @@ Page({ }) }else{ this.setData({ - list:arr + total:res.data.total, + list:list.concat(arr) }) } diff --git a/pages/list/comments/index.wxml b/pages/list/comments/index.wxml index 23c31fb..2df031d 100644 --- a/pages/list/comments/index.wxml +++ b/pages/list/comments/index.wxml @@ -11,7 +11,7 @@ - {{item.sku_name}} + {{item.sku_name}}