|
|
@ -132,7 +132,8 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad(o) { |
|
|
|
onLoad(o) { |
|
|
|
let info = uni.getStorageSync("getInfo"); |
|
|
|
console.log(o.info) |
|
|
|
|
|
|
|
let info = o.info ? JSON.parse(o.info) : uni.getStorageSync("getInfo"); |
|
|
|
if (info.content) { |
|
|
|
if (info.content) { |
|
|
|
info.content = info.content.replace(/<img src=/g, '<img style="width: 100%; display:block" src=') |
|
|
|
info.content = info.content.replace(/<img src=/g, '<img style="width: 100%; display:block" src=') |
|
|
|
console.log(info.content) |
|
|
|
console.log(info.content) |
|
|
@ -141,7 +142,7 @@ |
|
|
|
this.type = o.type; |
|
|
|
this.type = o.type; |
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
title: o.type == 1 ? "服务详情" : '旧物回收' |
|
|
|
title: o.type == 1 ? "服务详情" : '旧物回收' |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
onShow() { |
|
|
|
if (uni.getStorageSync("userInfo").user_id) { |
|
|
|
if (uni.getStorageSync("userInfo").user_id) { |
|
|
@ -156,6 +157,34 @@ |
|
|
|
uni.removeStorageSync("yuyueTime") |
|
|
|
uni.removeStorageSync("yuyueTime") |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 分享当前页面 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
onShareAppMessage() { |
|
|
|
|
|
|
|
const app = this |
|
|
|
|
|
|
|
// 构建页面参数 |
|
|
|
|
|
|
|
uni.setStorageSync("getInfo", app.info) |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
title: app.type == 2 ? app.info.recovery_name : app.info.server_name, |
|
|
|
|
|
|
|
imageUrl: app.type == 2 ? app.info.recovery_image : app.info.server_image, |
|
|
|
|
|
|
|
path: '/pages/news/recycling/detail?type=' + app.type + '&info=' + JSON.stringify(app.info), |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 分享到朋友圈 |
|
|
|
|
|
|
|
* 本接口为 Beta 版本,暂只在 Android 平台支持,详见分享到朋友圈 (Beta) |
|
|
|
|
|
|
|
* https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share-timeline.html |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
onShareTimeline() { |
|
|
|
|
|
|
|
const app = this |
|
|
|
|
|
|
|
uni.setStorageSync("getInfo", app.info) |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
title: app.type == 2 ? app.info.recovery_name : app.info.server_name, |
|
|
|
|
|
|
|
imageUrl: app.type == 2 ? app.info.recovery_image : app.info.server_image, |
|
|
|
|
|
|
|
path: '/pages/news/recycling/detail?type=' + app.type + '&info=' + JSON.stringify(app.info), |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 获取预售规则 |
|
|
|
// 获取预售规则 |
|
|
|
getCarouselList(type) { |
|
|
|
getCarouselList(type) { |
|
|
@ -164,7 +193,7 @@ |
|
|
|
type: 'recycling_services' |
|
|
|
type: 'recycling_services' |
|
|
|
}) |
|
|
|
}) |
|
|
|
.then(result => { |
|
|
|
.then(result => { |
|
|
|
let content = result.data.detail?result.data.detail.content:''; |
|
|
|
let content = result.data.detail ? result.data.detail.content : ''; |
|
|
|
if (content) { |
|
|
|
if (content) { |
|
|
|
content = content.replace(/style=""/g, '').replace(/<img src=/g, |
|
|
|
content = content.replace(/style=""/g, '').replace(/<img src=/g, |
|
|
|
'<img style="width: 100%; display:block" src=') |
|
|
|
'<img style="width: 100%; display:block" src=') |
|
|
@ -272,6 +301,7 @@ |
|
|
|
overflow: hidden; |
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
|
|
|
|
padding-bottom: 30rpx; |
|
|
|
padding-bottom: 30rpx; |
|
|
|
|
|
|
|
|
|
|
|
&-hd { |
|
|
|
&-hd { |
|
|
|
padding: 30rpx 60rpx; |
|
|
|
padding: 30rpx 60rpx; |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|