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({
url: '/pages/d_taskList/index', url: '/pages/d_taskList/index',
}) })
}, },
onShareAppMessage() {
return {
title: '重症肌无力加油站,重拾生活掌控感!',
path: '/pages/d_patient/index',
}
},
handleBack() { handleBack() {
wx.navigateBack() wx.navigateBack()
}, },

2
src/pages/d_qolDetail/index.scss

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

2
src/pages/home/index.ts

@ -380,7 +380,7 @@ Page({
} }
} }
return { 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({
}, },
onShow() { onShow() {
app.waitLogin({ type: [2] }).then(() => { app.waitLogin({ type: [2] }).then(() => {
app.mpBehavior({ doctor:true, PageName: 'PG_LibraryList' }) app.mpBehavior({ doctor: true, PageName: 'PG_LibraryList' })
this.getList() this.getList()
}) })
}, },
@ -58,13 +58,14 @@ Page({
} }
}, },
handleDetail(e) { handleDetail(e) {
app.mpBehavior({ doctor:true, PageName: 'BTN_LibraryListContent' }) app.mpBehavior({ doctor: true, PageName: 'BTN_LibraryListContent' })
const { id, index } = e.currentTarget.dataset const { id, index } = e.currentTarget.dataset
const params = this.data.list[index] const params = this.data.list[index]
if (params.ContentType === '5' && params.FileList[0]) { if (params.ContentType === '5' && params.FileList[0]) {
app.oldMpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string }) app.oldMpBehavior({ PositionId: '1', OperateType: '1', OperateId: id as string })
this.handleFile(params.FileList[0]) this.handleFile(params.FileList[0])
} else { }
else {
wx.navigateTo({ wx.navigateTo({
url: `/pages/informationDetail/index?id=${id}`, url: `/pages/informationDetail/index?id=${id}`,
}) })
@ -90,7 +91,8 @@ Page({
wx.hideLoading() wx.hideLoading()
}, },
}) })
} else { }
else {
wx.hideLoading() wx.hideLoading()
wx.showToast({ wx.showToast({
title: '下载文件失败', title: '下载文件失败',
@ -109,7 +111,7 @@ Page({
}, },
onShareAppMessage(e) { onShareAppMessage(e) {
if (e.from === 'button') { 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 const { Title, CoverImgUrl, Id } = e.target.dataset.params
app.oldMpBehavior({ PositionId: '2', OperateType: '3', OperateId: Id }) app.oldMpBehavior({ PositionId: '2', OperateType: '3', OperateId: Id })
return { return {
@ -118,7 +120,9 @@ Page({
imageUrl: CoverImgUrl, 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 @@
import dayjs from 'dayjs' import dayjs from 'dayjs'
const app = getApp<IAppOption>() const app = getApp<IAppOption>()
let live_time: null | number = null let live_time: null | number = null
@ -61,7 +62,8 @@ Page({
LAT: '', LAT: '',
}) })
if (e.detail.index == 0) { if (e.detail.index == 0) {
} else if (e.detail.index == 1) { }
else if (e.detail.index == 1) {
} }
this.getList() this.getList()
}, },
@ -110,29 +112,32 @@ Page({
wx.getSetting({ wx.getSetting({
success(res) { success(res) {
if ( if (
res.authSetting['scope.userFuzzyLocation'] != undefined && res.authSetting['scope.userFuzzyLocation'] != undefined
res.authSetting['scope.userFuzzyLocation'] == true && res.authSetting['scope.userFuzzyLocation'] == true
) { ) {
//获取当前位置 // 获取当前位置
that.getFuzzyLocation() that.getFuzzyLocation()
} else if (res.authSetting['scope.userFuzzyLocation'] == undefined) { }
//获取当前位置 else if (res.authSetting['scope.userFuzzyLocation'] == undefined) {
// 获取当前位置
that.getFuzzyLocation() that.getFuzzyLocation()
} else { }
else {
wx.showModal({ wx.showModal({
title: '请求授权当前位置', title: '请求授权当前位置',
content: '需要获取您的地理位置,请确认授权', content: '需要获取您的地理位置,请确认授权',
confirmColor: '#8c75d0', confirmColor: '#8c75d0',
success(res) { success(res) {
if (res.cancel) { if (res.cancel) {
//取消授权 // 取消授权
wx.showToast({ wx.showToast({
title: '拒绝授权', title: '拒绝授权',
icon: 'none', icon: 'none',
duration: 1000, duration: 1000,
}) })
} else if (res.confirm) { }
//确定授权,通过wx.openSetting发起授权请求 else if (res.confirm) {
// 确定授权,通过wx.openSetting发起授权请求
wx.openSetting({ wx.openSetting({
success(res) { success(res) {
if (res.authSetting['scope.userFuzzyLocation'] == true) { if (res.authSetting['scope.userFuzzyLocation'] == true) {
@ -141,9 +146,10 @@ Page({
// icon: 'success', // icon: 'success',
// duration: 1000 // duration: 1000
// }) // })
//再次授权,调用wx.getLocation的API // 再次授权,调用wx.getLocation的API
that.getFuzzyLocation() that.getFuzzyLocation()
} else { }
else {
// wx.showToast({ // wx.showToast({
// title: '授权失败', // title: '授权失败',
// icon: 'none', // icon: 'none',
@ -158,7 +164,8 @@ Page({
} }
}, },
}) })
} else { }
else {
that.setData({ that.setData({
LNG: '', LNG: '',
LAT: '', LAT: '',
@ -240,10 +247,4 @@ Page({
this.getList(page + 1) this.getList(page + 1)
} }
}, },
onShareAppMessage() {
return {
title: '周三大咖说',
path: '/patient/pages/live/index',
}
},
}) })

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

@ -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 {} export {}

10
src/utils/page.ts

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

Loading…
Cancel
Save