|
|
@@ -55,20 +55,18 @@ Page({
|
|
|
/**
|
|
|
* 用户点击右上角分享
|
|
|
*/
|
|
|
- onShareAppMessage(res) {
|
|
|
- if (res.from === "button") {
|
|
|
- const title = res.target.dataset.title || "海员培训学校通知";
|
|
|
- return {
|
|
|
- title: title,
|
|
|
- path: "/pages/school/school",
|
|
|
- };
|
|
|
- }
|
|
|
+ share(e) {
|
|
|
+ this.setData({
|
|
|
+ shareNoticeId: e.currentTarget.dataset.id,
|
|
|
+ shareNoticeTitle: e.currentTarget.dataset.title,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onShareAppMessage() {
|
|
|
return {
|
|
|
- title: "海员培训学校通知",
|
|
|
- path: "/pages/school/school",
|
|
|
+ title: this.data.shareNoticeTitle,
|
|
|
+ path: `/pages/school/sharePage/sharePage?noticeId=${this.data.shareNoticeId}`,
|
|
|
};
|
|
|
},
|
|
|
-
|
|
|
makePhoneCall(e) {
|
|
|
const phone = e.currentTarget.dataset.phone;
|
|
|
if (phone) {
|