|
|
|
@ -1,10 +1,10 @@ |
|
|
|
|
|
|
|
import dayjs from 'dayjs' |
|
|
|
|
|
|
|
import licia from 'miniprogram-licia' |
|
|
|
import component from '@/utils/component' |
|
|
|
import component from '@/utils/component' |
|
|
|
import relativeTime from '@/utils/dayjs/relativeTime.js' |
|
|
|
import relativeTime from '@/utils/dayjs/relativeTime.js' |
|
|
|
import page from '@/utils/page' |
|
|
|
import page from '@/utils/page' |
|
|
|
import { request } from '@/utils/request' |
|
|
|
import { request } from '@/utils/request' |
|
|
|
import { parseScene } from './utils/util' |
|
|
|
import { parseScene } from './utils/util' |
|
|
|
const dayjs = require('dayjs') |
|
|
|
|
|
|
|
const licia = require('miniprogram-licia') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
require('/utils/dayjs/day-zh-cn.js') |
|
|
|
require('/utils/dayjs/day-zh-cn.js') |
|
|
|
|
|
|
|
|
|
|
|
@ -16,15 +16,15 @@ App<IAppOption>({ |
|
|
|
// 测试号 wx2b0bb13edf717c1d
|
|
|
|
// 测试号 wx2b0bb13edf717c1d
|
|
|
|
// dev
|
|
|
|
// dev
|
|
|
|
// appid:wxf9ce8010f1ad24aa
|
|
|
|
// appid:wxf9ce8010f1ad24aa
|
|
|
|
// url: 'https://m.xd.hbraas.com',
|
|
|
|
url: 'https://m.xd.hbraas.com', |
|
|
|
// upFileUrl: 'https://m.xd.hbraas.com/',
|
|
|
|
upFileUrl: 'https://m.xd.hbraas.com/', |
|
|
|
// imageUrl: 'https://m.xd.hbraas.com/xd/',
|
|
|
|
imageUrl: 'https://m.xd.hbraas.com/xd/', |
|
|
|
|
|
|
|
|
|
|
|
// pro
|
|
|
|
// pro
|
|
|
|
// appid:wx71ac9c27c3c3e3f4
|
|
|
|
// appid:wx71ac9c27c3c3e3f4
|
|
|
|
url: 'https://m.xd.hbsaas.com', |
|
|
|
// url: 'https://m.xd.hbsaas.com',
|
|
|
|
upFileUrl: 'https://m.xd.hbsaas.com/', |
|
|
|
// upFileUrl: 'https://m.xd.hbsaas.com/',
|
|
|
|
imageUrl: 'https://m.xd.hbsaas.com/api/xd/', |
|
|
|
// imageUrl: 'https://m.xd.hbsaas.com/api/xd/',
|
|
|
|
|
|
|
|
|
|
|
|
loginState: '', |
|
|
|
loginState: '', |
|
|
|
isLogin: 0, |
|
|
|
isLogin: 0, |
|
|
|
@ -114,7 +114,8 @@ App<IAppOption>({ |
|
|
|
onShow(options) { |
|
|
|
onShow(options) { |
|
|
|
if (options.query.scene) { |
|
|
|
if (options.query.scene) { |
|
|
|
this.globalData.scene = parseScene(options.query.scene) |
|
|
|
this.globalData.scene = parseScene(options.query.scene) |
|
|
|
} else if (options.query.proMethodId) { |
|
|
|
} |
|
|
|
|
|
|
|
else if (options.query.proMethodId) { |
|
|
|
this.globalData.scene.proMethodId = options.query.proMethodId |
|
|
|
this.globalData.scene.proMethodId = options.query.proMethodId |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -235,7 +236,7 @@ App<IAppOption>({ |
|
|
|
data: {}, |
|
|
|
data: {}, |
|
|
|
}) as Promise<never> |
|
|
|
}) as Promise<never> |
|
|
|
}, |
|
|
|
}, |
|
|
|
mpBehavior(data: { doctor?: boolean; PageName: string }) { |
|
|
|
mpBehavior(data: { doctor?: boolean, PageName: string }) { |
|
|
|
let url = '?r=zd/mp-behavior/add' |
|
|
|
let url = '?r=zd/mp-behavior/add' |
|
|
|
if (data.doctor) { |
|
|
|
if (data.doctor) { |
|
|
|
url = '?r=zd/doctor/mp-behavior/add' |
|
|
|
url = '?r=zd/doctor/mp-behavior/add' |
|
|
|
@ -267,9 +268,10 @@ App<IAppOption>({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// zd相关函数
|
|
|
|
// zd相关函数
|
|
|
|
zdMpBehavior(data: { PageName: string; doctor?: boolean }) { |
|
|
|
zdMpBehavior(data: { PageName: string, doctor?: boolean }) { |
|
|
|
const { loginType } = this.globalData |
|
|
|
const { loginType } = this.globalData |
|
|
|
if (loginType === 0) return |
|
|
|
if (loginType === 0) |
|
|
|
|
|
|
|
return |
|
|
|
let url = '?r=zd/mp-behavior/add' |
|
|
|
let url = '?r=zd/mp-behavior/add' |
|
|
|
if (data.doctor) { |
|
|
|
if (data.doctor) { |
|
|
|
url = '?r=zd/doctor/mp-behavior/add' |
|
|
|
url = '?r=zd/doctor/mp-behavior/add' |
|
|
|
@ -296,13 +298,15 @@ App<IAppOption>({ |
|
|
|
if (this.zdVerifySys(pub)) { |
|
|
|
if (this.zdVerifySys(pub)) { |
|
|
|
if (this.globalData.loginType === 1) { |
|
|
|
if (this.globalData.loginType === 1) { |
|
|
|
this.zdRegistrationVerification(() => resolve(), loginPage) |
|
|
|
this.zdRegistrationVerification(() => resolve(), loginPage) |
|
|
|
} else { |
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
resolve() |
|
|
|
resolve() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
const unRegFun = (resolve) => { |
|
|
|
const unRegFun = (resolve) => { |
|
|
|
if (!this.zdVerifySys(pub)) return |
|
|
|
if (!this.zdVerifySys(pub)) |
|
|
|
|
|
|
|
return |
|
|
|
resolve() |
|
|
|
resolve() |
|
|
|
} |
|
|
|
} |
|
|
|
return new Promise((resolve: (value?) => void) => { |
|
|
|
return new Promise((resolve: (value?) => void) => { |
|
|
|
@ -360,11 +364,14 @@ App<IAppOption>({ |
|
|
|
let urlKey = '' |
|
|
|
let urlKey = '' |
|
|
|
if (!PatientId) { |
|
|
|
if (!PatientId) { |
|
|
|
urlKey = 'enterInfo' |
|
|
|
urlKey = 'enterInfo' |
|
|
|
} else if (AuditStatus == 0) { |
|
|
|
} |
|
|
|
|
|
|
|
else if (AuditStatus == 0) { |
|
|
|
urlKey = 'noCert' |
|
|
|
urlKey = 'noCert' |
|
|
|
} else if (AuditStatus == 1) { |
|
|
|
} |
|
|
|
|
|
|
|
else if (AuditStatus == 1) { |
|
|
|
urlKey = isFollow ? 'nopending' : 'pending' |
|
|
|
urlKey = isFollow ? 'nopending' : 'pending' |
|
|
|
} else if (AuditStatus == 2) { |
|
|
|
} |
|
|
|
|
|
|
|
else if (AuditStatus == 2) { |
|
|
|
urlKey = 'reject' |
|
|
|
urlKey = 'reject' |
|
|
|
} |
|
|
|
} |
|
|
|
const navUrl = { |
|
|
|
const navUrl = { |
|
|
|
@ -415,7 +422,8 @@ App<IAppOption>({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
return false |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
if (ignorePath.includes(url)) return true |
|
|
|
if (ignorePath.includes(url)) |
|
|
|
|
|
|
|
return true |
|
|
|
|
|
|
|
|
|
|
|
if (loginType === 1) { |
|
|
|
if (loginType === 1) { |
|
|
|
if (url.includes('doctor/pages')) { |
|
|
|
if (url.includes('doctor/pages')) { |
|
|
|
@ -423,14 +431,16 @@ App<IAppOption>({ |
|
|
|
url: '/pages/index/index', |
|
|
|
url: '/pages/index/index', |
|
|
|
}) |
|
|
|
}) |
|
|
|
return false |
|
|
|
return false |
|
|
|
} else { |
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
return true |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (loginType === 2 && !pub) { |
|
|
|
if (loginType === 2 && !pub) { |
|
|
|
if (url.includes('doctor/pages')) { |
|
|
|
if (url.includes('doctor/pages')) { |
|
|
|
return true |
|
|
|
return true |
|
|
|
} else { |
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
const params = Object.entries(options) |
|
|
|
const params = Object.entries(options) |
|
|
|
.map(([key, value]) => `${key}=${value}`) |
|
|
|
.map(([key, value]) => `${key}=${value}`) |
|
|
|
.join('&') |
|
|
|
.join('&') |
|
|
|
@ -455,7 +465,8 @@ App<IAppOption>({ |
|
|
|
url: '/patient/pages/login/index', |
|
|
|
url: '/patient/pages/login/index', |
|
|
|
}) |
|
|
|
}) |
|
|
|
isReject = true |
|
|
|
isReject = true |
|
|
|
} else if (!isNewReg) { |
|
|
|
} |
|
|
|
|
|
|
|
else if (!isNewReg) { |
|
|
|
wx.reLaunch({ |
|
|
|
wx.reLaunch({ |
|
|
|
url: '/patient/pages/enterInfo/index', |
|
|
|
url: '/patient/pages/enterInfo/index', |
|
|
|
}) |
|
|
|
}) |
|
|
|
|