From 77702b3d2453c0ed0001a32f843b80c668d744c7 Mon Sep 17 00:00:00 2001 From: "DESKTOP-RQ919RC\\Pc" <1300399510@qq.com> Date: Thu, 10 Apr 2025 19:01:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E8=AF=A6=E6=83=85=E9=A1=B5=E5=88=86?= =?UTF-8?q?=E4=BA=ABtitle=E6=92=A4=E5=9B=9E=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=B1=82=E6=88=BF=E6=BA=90=E5=88=86=E4=BA=AB=E7=9A=84title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 8 ++----- .../brandApartmentDetail.js | 19 +++++++-------- .../brandApartmentList/brandApartmentList.js | 9 ++++---- pages/show/show.js | 23 ++++++++++++------- 4 files changed, 30 insertions(+), 29 deletions(-) diff --git a/app.js b/app.js index e94d28d..c35f7e2 100644 --- a/app.js +++ b/app.js @@ -112,12 +112,8 @@ App({ this.globalData.options = options; __.initial(this) - if (wx.getEnterOptionsSync().query && wx.getEnterOptionsSync().query.scancode_time) { - this.globalData.scancode_time = wx.getEnterOptionsSync().query.scancode_time - } - if (wx.getUserProfile) { - this.globalData.canIUseGetUserProfile = true; - } + if (wx.getEnterOptionsSync().query && wx.getEnterOptionsSync().query.scancode_time) this.globalData.scancode_time = wx.getEnterOptionsSync().query.scancode_time + if (wx.getUserProfile) this.globalData.canIUseGetUserProfile = true; try { diff --git a/pages/brandApartmentDetail/brandApartmentDetail.js b/pages/brandApartmentDetail/brandApartmentDetail.js index c32348d..c96c606 100644 --- a/pages/brandApartmentDetail/brandApartmentDetail.js +++ b/pages/brandApartmentDetail/brandApartmentDetail.js @@ -174,15 +174,13 @@ Page({ // 来自页面内转发按钮 if (res.from === 'button') var types = res.from === 'button' ? 'share_btn' : 'show'; - // let that = this; - // var title = that.data.data.title; - // if (that.data.data.isquarantine) title = this.data.listTab.quarantineLists + '-' + that.data.data.title - - let title = `中国香港 > ${ this.data.data.address }` + let that = this; + var title = that.data.data.title; + if (that.data.data.isquarantine) title = this.data.listTab.quarantineLists + '-' + that.data.data.title return { title, - // imageUrl: that.data.data.thumbnail, + imageUrl: that.data.data.thumbnail, success: function (res) { miucms.share(app, types) }, @@ -190,14 +188,13 @@ Page({ }, onShareTimeline() { - // let that = this; - // var title = that.data.data.title; - // if (that.data.data.isquarantine) title = this.data.listTab.quarantineLists + '-' + that.data.data.title - let title = `中国香港 > ${ this.data.data.address }` + let that = this; + var title = that.data.data.title; + if (that.data.data.isquarantine) title = this.data.listTab.quarantineLists + '-' + that.data.data.title return { title, - // imageUrl: that.data.data.thumbnail, + imageUrl: that.data.data.thumbnail, } }, diff --git a/pages/brandApartmentList/brandApartmentList.js b/pages/brandApartmentList/brandApartmentList.js index a3558d4..fa58c7a 100644 --- a/pages/brandApartmentList/brandApartmentList.js +++ b/pages/brandApartmentList/brandApartmentList.js @@ -282,12 +282,12 @@ Page({ getTitle() { let path = `/pages/brandApartmentList/brandApartmentList?school=${this.data.school}&brands=${this.data.brands.value}&roomtype=${this.data.roomtype.value}&roomlistings=${this.data.roomlistings.value}&money=${this.data.money.rent_min}~${this.data.money.rent_max}`; let title = this.data.school ? `${ this.data.topTitle }-${this.data.schoolObj[this.data.school]}附近公寓` : this.data.info.subject; - let imageUrl = this.data.info.share_img + // let imageUrl = this.data.info.share_img return { path, title, - imageUrl, + // imageUrl, } }, @@ -298,9 +298,10 @@ Page({ // 来自页面内转发按钮 if (res.from === 'button') var types = res.from === 'button' ? 'share_btn' : 'show'; let ress = this.getTitle() + console.log("res", ress); return { title: ress.title, - imageUrl: ress.imageUrl, + // imageUrl: ress.imageUrl, path: ress.path, success: function (res) { miucms.share(app, types) @@ -313,7 +314,7 @@ Page({ let res = this.getTitle() return { title: res.title, - imageUrl: res.imageUrl, + // imageUrl: res.imageUrl, path: res.path, } }, diff --git a/pages/show/show.js b/pages/show/show.js index 32b3df3..da6b1f6 100644 --- a/pages/show/show.js +++ b/pages/show/show.js @@ -234,25 +234,32 @@ Page({ console.log("res", that.data.info.share_img); const info = this.data.info - let title = `中国香港 > ${ info.locationList[0].head } > ${ info.locationList[0].end }` - if (info.address) title += ' > ' + info.address + // let title = `中国香港 > ${ info.locationList[0].head } > ${ info.locationList[0].end }` + // if (info.address) title += ' > ' + info.address + + let title = that.data.info.subject + let imageUrl = "" + if (info['intermediary'] == 6) title = "香港租房 | 共5000+实时香港房源,甄选优质学生公寓" + else imageUrl = that.data.info.share_img return { - // title: that.data.info.subject, title, - // imageUrl: that.data.info.share_img, + imageUrl, success: function (res) { miucms.share(app, types) }, } }, onShareTimeline() { - let title = `中国香港 > ${ info.locationList[0].head } > ${ info.locationList[0].end }` - if (info.address) title += ' > ' + info.address - + // let title = `中国香港 > ${ info.locationList[0].head } > ${ info.locationList[0].end }` + // if (info.address) title += ' > ' + info.address + let title = that.data.info.subject + let imageUrl = "" + if (info['intermediary'] == 6) title = "香港租房 | 共5000+实时香港房源,甄选优质学生公寓" + else imageUrl = that.data.info.share_img return { // title: this.data.info.subject, title, - // imageUrl: this.data.info.share_img, + imageUrl, } }, get_content: function () {