Feat(店铺):分享功能对接
This commit is contained in:
+1
-1
@@ -226,5 +226,5 @@ export function setTopHotelNew(data) {
|
||||
* @param id 店铺ID int
|
||||
* */
|
||||
export function getHotelShareBackgroundImage(id) {
|
||||
return request.get("/api/hotelMain/shareBackgroundImage/" + id, {}, {login: true})
|
||||
return request.get("/api/hotelMain/shareImage/" + id, {}, {login: true})
|
||||
}
|
||||
|
||||
+13
-11
@@ -473,7 +473,8 @@ export default {
|
||||
],
|
||||
isLoadGoodListoSuccess: false,
|
||||
isLoadInfoListSuccess: false,
|
||||
pageKeyId: ''
|
||||
pageKeyId: '',
|
||||
shareImg: ''
|
||||
}
|
||||
},
|
||||
// 必须在页面加 onPageScroll(e){} ,才能滑动显示背景
|
||||
@@ -538,19 +539,20 @@ export default {
|
||||
this.picColumnWidth = (e.screenWidth - uni.upx2px(92)) / 2 + 'px'
|
||||
}
|
||||
})
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const result = getHotelShareBackgroundImage(this.id)
|
||||
if (result.status === 200) {
|
||||
resolve({
|
||||
title: this.inn.name,
|
||||
path: '/pagesInn/inn/innHome?id=' + this.inn.id,
|
||||
imageUrl: result.data
|
||||
})
|
||||
getHotelShareBackgroundImage(this.id).then(res => {
|
||||
const { success, data } = res
|
||||
if (success) {
|
||||
this.shareImg = data
|
||||
}
|
||||
})
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: this.inn.name,
|
||||
path: '/pagesInn/inn/innHome?id=' + this.inn.id,
|
||||
imageUrl: this.shareImg
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if (!this.isLoad) {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user