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