Browse Source

2.2.0stash

dev
kola-web 6 days ago
parent
commit
cbcf8c410b
  1. 6
      src/pages/d_patient/index.ts
  2. 2
      src/pages/d_qolDetail/index.scss
  3. 2
      src/pages/home/index.ts
  4. 16
      src/pages/information/index.ts
  5. 39
      src/patient/pages/live/index.ts
  6. 43
      src/patient/pages/repository/index.ts
  7. 10
      src/utils/page.ts

6
src/pages/d_patient/index.ts

@ -205,12 +205,6 @@ Page({ @@ -205,12 +205,6 @@ Page({
url: '/pages/d_taskList/index',
})
},
onShareAppMessage() {
return {
title: '重症肌无力加油站,重拾生活掌控感!',
path: '/pages/d_patient/index',
}
},
handleBack() {
wx.navigateBack()
},

2
src/pages/d_qolDetail/index.scss

@ -248,7 +248,7 @@ page { @@ -248,7 +248,7 @@ page {
&.green {
color: #1ec580;
}
&:not(:last-of-type) {
&:not(:first-of-type) {
color: #211d2e !important;
}
}

2
src/pages/home/index.ts

@ -380,7 +380,7 @@ Page({ @@ -380,7 +380,7 @@ Page({
}
}
return {
imageUrl: `${app.globalData.imageUrl}share.png?t=${this.data.Timestamp}`,
imageUrl: `${getApp().globalData.imageUrl}doctor-share.png?t=${Date.now()}`,
}
},
})

16
src/pages/information/index.ts

@ -22,7 +22,7 @@ Page({ @@ -22,7 +22,7 @@ Page({
},
onShow() {
app.waitLogin({ type: [2] }).then(() => {
app.mpBehavior({ doctor:true, PageName: 'PG_LibraryList' })
app.mpBehavior({ doctor: true, PageName: 'PG_LibraryList' })
this.getList()
})
},
@ -58,13 +58,14 @@ Page({ @@ -58,13 +58,14 @@ Page({
}
},
handleDetail(e) {
app.mpBehavior({ doctor:true, PageName: 'BTN_LibraryListContent' })
app.mpBehavior({ doctor: true, PageName: 'BTN_LibraryListContent' })
const { id, index } = e.currentTarget.dataset
const params = this.data.list[index]
if (params.ContentType === '5' && params.FileList[0]) {
app.oldMpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string })
this.handleFile(params.FileList[0])
} else {
}
else {
wx.navigateTo({
url: `/pages/informationDetail/index?id=${id}`,
})
@ -90,7 +91,8 @@ Page({ @@ -90,7 +91,8 @@ Page({
wx.hideLoading()
},
})
} else {
}
else {
wx.hideLoading()
wx.showToast({
title: '下载文件失败',
@ -109,7 +111,7 @@ Page({ @@ -109,7 +111,7 @@ Page({
},
onShareAppMessage(e) {
if (e.from === 'button') {
app.mpBehavior({ doctor:true, PageName: 'BTN_LibraryListShare' })
app.mpBehavior({ doctor: true, PageName: 'BTN_LibraryListShare' })
const { Title, CoverImgUrl, Id } = e.target.dataset.params
app.oldMpBehavior({ PositionId: '2', OperateType: '3', OperateId: Id })
return {
@ -118,7 +120,9 @@ Page({ @@ -118,7 +120,9 @@ Page({
imageUrl: CoverImgUrl,
}
}
return {}
return {
imageUrl: `${getApp().globalData.imageUrl}doctor-share.png?t=${Date.now()}`,
}
},
})

39
src/patient/pages/live/index.ts

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
import dayjs from 'dayjs'
const app = getApp<IAppOption>()
let live_time: null | number = null
@ -61,7 +62,8 @@ Page({ @@ -61,7 +62,8 @@ Page({
LAT: '',
})
if (e.detail.index == 0) {
} else if (e.detail.index == 1) {
}
else if (e.detail.index == 1) {
}
this.getList()
},
@ -110,29 +112,32 @@ Page({ @@ -110,29 +112,32 @@ Page({
wx.getSetting({
success(res) {
if (
res.authSetting['scope.userFuzzyLocation'] != undefined &&
res.authSetting['scope.userFuzzyLocation'] == true
res.authSetting['scope.userFuzzyLocation'] != undefined
&& res.authSetting['scope.userFuzzyLocation'] == true
) {
//获取当前位置
// 获取当前位置
that.getFuzzyLocation()
} else if (res.authSetting['scope.userFuzzyLocation'] == undefined) {
//获取当前位置
}
else if (res.authSetting['scope.userFuzzyLocation'] == undefined) {
// 获取当前位置
that.getFuzzyLocation()
} else {
}
else {
wx.showModal({
title: '请求授权当前位置',
content: '需要获取您的地理位置,请确认授权',
confirmColor: '#8c75d0',
success(res) {
if (res.cancel) {
//取消授权
// 取消授权
wx.showToast({
title: '拒绝授权',
icon: 'none',
duration: 1000,
})
} else if (res.confirm) {
//确定授权,通过wx.openSetting发起授权请求
}
else if (res.confirm) {
// 确定授权,通过wx.openSetting发起授权请求
wx.openSetting({
success(res) {
if (res.authSetting['scope.userFuzzyLocation'] == true) {
@ -141,9 +146,10 @@ Page({ @@ -141,9 +146,10 @@ Page({
// icon: 'success',
// duration: 1000
// })
//再次授权,调用wx.getLocation的API
// 再次授权,调用wx.getLocation的API
that.getFuzzyLocation()
} else {
}
else {
// wx.showToast({
// title: '授权失败',
// icon: 'none',
@ -158,7 +164,8 @@ Page({ @@ -158,7 +164,8 @@ Page({
}
},
})
} else {
}
else {
that.setData({
LNG: '',
LAT: '',
@ -240,10 +247,4 @@ Page({ @@ -240,10 +247,4 @@ Page({
this.getList(page + 1)
}
},
onShareAppMessage() {
return {
title: '周三大咖说',
path: '/patient/pages/live/index',
}
},
})

43
src/patient/pages/repository/index.ts

@ -384,49 +384,6 @@ Page({ @@ -384,49 +384,6 @@ Page({
}
})
},
onShareAppMessage(e: any) {
if (e.from === 'button') {
const { id, index, type } = e.target.dataset
const { list } = this.data
const { Title, TitlePicLink, ImageUrl } = list[index]
if (type == 'info') {
wx.ajax({
method: 'POST',
url: '?r=zd/pic-text/share',
data: { ContentId: id },
}).then(() => {
this.setData({
[`list[${index}].ShareNum`]: Number(this.data.list[index].ShareNum) + 1,
})
})
return {
title: Title,
path: `/patient/pages/repositoryDetail/index?id=${id}`,
imageUrl: TitlePicLink,
}
} else {
wx.ajax({
method: 'POST',
url: '?r=zd/video/share',
data: { ContentId: id },
}).then(() => {
this.setData({
[`list[${index}].ShareNum`]: Number(this.data.list[index].ShareNum) + 1,
})
})
return {
title: Title,
path: `/patient/pages/repository/index?id=${id}&active=1&title=${Title}`,
imageUrl: ImageUrl,
}
}
} else {
return {
title: '重症肌无力加油站,MG全知道',
path: '/patient/pages/repository/index',
}
}
},
})
export {}

10
src/utils/page.ts

@ -62,17 +62,17 @@ function page(config: WechatMiniprogram.Page.Instance<WechatMiniprogram.IAnyObje @@ -62,17 +62,17 @@ function page(config: WechatMiniprogram.Page.Instance<WechatMiniprogram.IAnyObje
if (isNoShare) {
url = 'pages/start/index'
}
if (url.includes('doctor/pages')) {
if (url.includes('patient/pages')) {
return {
title: 'TED规范化诊治中心',
title: 'TED关爱小助手',
path: url,
imageUrl: `${getApp().globalData.imageUrl}doctor-share.png?t=${Timestamp}`,
imageUrl: `${getApp().globalData.imageUrl}share.png?t=${Timestamp}`,
}
}
return {
title: 'TED关爱小助手',
title: 'TED规范化诊治中心',
path: url,
imageUrl: `${getApp().globalData.imageUrl}share.png?t=${Timestamp}`,
imageUrl: `${getApp().globalData.imageUrl}doctor-share.png?t=${Timestamp}`,
}
}
}

Loading…
Cancel
Save