作者 韩昌

对接一键登录云函数

... ... @@ -6,7 +6,7 @@
{
"app-plus" :
{
"launchtype" : "local"
"launchtype" : "remote"
},
"default" :
{
... ...
... ... @@ -36,11 +36,11 @@ console.warn(TUICallKit, 'TUICallKit | ok') // 本地日志
uni.$TUICallKit = TUICallKit // 全局引入
// #endif
export default {
onLaunch: function () {
onLaunch: function () {
// this.bindTIMEvent()
// this.login()
},
methods: {}
methods: {}
}
</script>
<style lang="scss">
... ...
... ... @@ -54,7 +54,7 @@
</scroll-view>
</view>
<view class="flexA imBtn">
<view @click="sendPrescriptionState = true">发送处方单</view>
<view @click="sendPrescriptionState = true" v-if="[null, undefined, ''].includes(detailData?.drugId)">发送处方单</view>
<view @click="showPrescriptionDetailState = true">查看处方单</view>
</view>
<TUIChatInput :text="text" :conversationData="conversation" :detailData="detailData"></TUIChatInput>
... ... @@ -63,7 +63,16 @@
<MessageSystem :data="messages" :types="types" />
</view>
<u-popup :show="sendPrescriptionState" @close="sendPrescriptionState = false" mode="bottom" closeIconPos="top-right" closeable round="20">
<SendPrescription :orderId="Event.orderId" @closeSendPrescriptionHandler="sendPrescriptionState = false" :isSend="true" />
<SendPrescription
:orderId="Event.orderId"
@closeSendPrescriptionHandler="
() => {
sendPrescriptionState = false
getDetailHandler()
}
"
:isSend="true"
/>
</u-popup>
<u-modal :show="showPrescriptionDetailState" :title="`处方单详情`" @confirm="showPrescriptionDetailState = false">
<ViewPrescription :orderId="Event.orderId" @click="showPrescriptionDetailState = false" />
... ...
... ... @@ -121,9 +121,9 @@ const TUIConversation = defineComponent({
},
res => {
if (res.code === 0) {
uni.showToast({
title: 'TUICallKit login'
})
// uni.showToast({
// title: 'TUICallKit login'
// })
// uni.$TUICallKit.enableFloatWindow(true) // 开启小浮窗
} else {
console.error(`login failed, error message = ${res.msg}`)
... ...
import { request } from '../utils/http'
import { ApplyAuthType, MessageListParamsType, CommentReceiveType, CommentListParamsType, ChangeUserInfoType, ChangePwdType, EditPhoneType, Prescription_expressType, Add_withdrawType, AddBankCardInfoType, FeedBackParamsType, RecordsInvitePaper, doctorLoginWithPwdType } from '../types'
import { ApplyAuthType, MessageListParamsType, CommentReceiveType, CommentListParamsType, ChangeUserInfoType, ChangePwdType, EditPhoneType, Prescription_expressType, Add_withdrawType, AddBankCardInfoType, FeedBackParamsType, RecordsInvitePaper, doctorLoginWithPwdType, doctorPhoneEasyLoginType } from '../types'
// 公共
export const getDepartment = (data: { keyword: string }) => request({ url: '/consultation/department', method: 'GET', data }) // 获取科室
... ... @@ -11,6 +11,7 @@ export const getFeedtype = () => request({ url: '/veterinary/feedtype', method:
export const updateFeedback = (data: FeedBackParamsType) => request({ url: '/veterinary/feedback', method: 'POST', data }) // 意见反馈
export const getRandomImage = (data: number | string) => request({ url: `/sys/randomImage/${data}`, method: 'GET' }) // 获取图形验证码
export const doctorLoginWithPwd = (data: doctorLoginWithPwdType) => request({ url: '/pet/login/doctorLoginWithPwd', method: 'POST', data }) // 兽医端账号密码登录
export const doctorPhoneEasyLogin = (data: doctorPhoneEasyLoginType) => request({ url: '/pet/login/doctorPhoneEasyLogin', method: 'POST', data }) // 兽医端一键登录
// 首页
export const getStart = () => request({ url: '/veterinary/start', method: 'GET' }) // 开屏页
... ...
... ... @@ -9,10 +9,10 @@
</view>
<view class="infocard Zindex">
<image src="/static/images/imcardbg.png" class="infocard-bg" mode="aspectFill" />
<view class="flexA" style="margin-bottom: 10rpx">
<!-- <view class="flexA" style="margin-bottom: 10rpx">
<image :src="proxy.$h.downFile(props.detailData?.user?.avatar)" class="imtopinfo-avatar" mode="aspectFill" @click="proxy.$h.previewImage(proxy.$h.downFile(props.detailData?.user?.avatar))" />
<view class="imtopinfo-username">{{ props.detailData?.user?.nickname }}</view>
</view>
</view> -->
<view class="flexA" style="margin-bottom: 50rpx">
<!-- <image src="/static/images/v.png" class="infocard-avatar" mode="aspectFill" /> -->
... ... @@ -21,9 +21,10 @@
</view>
<view class="infocard-infoitem Zindex">
<text class="gray">宠物信息:</text>
{{ props.detailData?.petClass || '品种未知' }}/{{ props.detailData?.age || '年龄未知' }}/ {{ proxy.$h.optObjectValue('petSex', props.detailData?.petSex) || '性别未知' }} /{{
proxy.$h.optObjectValue('isSterilization', props.detailData?.isSterilization) || '未知'
}}/{{ props.detailData?.weight + 'kg' || '体重未知' }}
{{ props.detailData?.petClass || '品种未知' }}/{{ props.detailData?.age || '年龄未知' }}/ {{ proxy.$h.optObjectValue('petSex', props.detailData?.petSex) || '性别未知' }} /
{{ proxy.$h.optObjectValue('isSterilization', props.detailData?.isSterilization) || '未知' }}/{{ props.detailData?.weight + 'kg' || '体重未知' }}/{{ proxy.$h.optObjectValue('immuneStatus', props.detailData?.immuneStatus, 4) }}/
{{ proxy.$h.optObjectValue('batheFrequency', props.detailData?.batheFrequency, 2) }}/
{{ proxy.$h.optObjectValue('feedType', props.detailData?.feedType, 1) }}
</view>
<view class="infocard-infoitem Zindex">
<text class="gray">症状类型:</text>
... ... @@ -57,6 +58,9 @@
<view class="text mb24">性别:{{ proxy.$h.optObjectValue('petSex', props.detailData?.petSex) || '性别未知' }}</view>
<view class="text mb24">是否绝育:{{ proxy.$h.optObjectValue('isSterilization', props.detailData?.isSterilization) || '未知' }}</view>
<view class="text mb24">体重:{{ props.detailData?.weight + 'kg' || '体重未知' }}</view>
<view class="text mb24">免疫情况:{{ proxy.$h.optObjectValue('immuneStatus', props.detailData?.immuneStatus, 4) }}</view>
<view class="text mb24">洗澡频率:{{ proxy.$h.optObjectValue('batheFrequency', props.detailData?.batheFrequency, 2) }}</view>
<view class="text mb24">饲料类型:{{ proxy.$h.optObjectValue('feedType', props.detailData?.feedType, 1) }}</view>
<view class="text mb24">
症状类型:
<template v-if="![null, '', undefined].includes(props.detailData?.symptom)">
... ... @@ -67,7 +71,7 @@
<view class="text mb24">
症状照片:
<view class="flexW" v-if="props.detailData?.image?.length">
<image v-for="_ in props.detailData.image?.split(',')" :src="proxy.$h.downFile(_)" class="infocard-itemimg" mode="aspectFill" @click="proxy.$h.previewImage(proxy.$h.downFile(_))" />
<image v-for="_ in props.detailData.image?.split(',')" :src="proxy.$h.downFile(_)" class="infocard-itemimg" mode="aspectFill" @click.stop="proxy.$h.previewImage(proxy.$h.downFile(_))" />
</view>
</view>
</view>
... ...
... ... @@ -42,9 +42,9 @@ function handleSDKReady(event) {
},
res => {
if (res.code === 0) {
uni.showToast({
title: 'TUICallKit login'
})
// uni.showToast({
// title: 'TUICallKit login'
// })
// uni.$TUICallKit.enableFloatWindow(true) // 开启小浮窗
} else {
console.error(`login failed, error message = ${res.msg}`)
... ...
{
"name" : "test_a1.u",
"appid" : "__UNI__7151A65",
"appid" : "__UNI__AB7B27B",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
... ... @@ -60,7 +60,9 @@
"offline" : false
}
},
"oauth" : {}
"oauth" : {
"univerify" : {}
}
}
},
"nativePlugins" : {
... ...
... ... @@ -13,11 +13,18 @@
</text>
</view>
</view>
<u-modal :show="showMessage" :title="`title`">
<view class="slot-content">
<rich-text :nodes="message"></rich-text>
</view>
</u-modal>
</template>
<script setup lang="ts">
import { ref, getCurrentInstance, ComponentPublicInstance } from 'vue'
import { DebounceBy } from '@/utils/debounceBy'
import { doctorPhoneEasyLogin } from '../../../api'
import { doctorPhoneEasyLoginType } from '../../../types'
interface IProps {
loginState: number
... ... @@ -32,17 +39,23 @@ const isConfirmProtocol = ref<Boolean>(false)
const login = DebounceBy(() => (isConfirmProtocol.value ? emit('login', props.loginState) : uni.$u.toast('请先同意协议')), 1500)
const message = ref({})
const showMessage = ref<boolean>(false)
const oneClickLoginHandler = () => {
// uniCloud
// .callFunction({
// name: 'oneclicklogin', // 你的云函数名称
// data: {
// access_token: 'xxx', // 客户端一键登录接口返回的access_token
// openid: 'xxx' // 客户端一键登录接口返回的openid
// access_token: 'bm1mYjQ0MGFkODcwMmU0OWM1YjUzODFhYzY5NmQ0YWYxY3wwNjM1fDN8djJ8M3w0MjYwNzgwM2FkMTUzMmY1YWNkZDUxN2Y1YzIwNTZlZg==', // 客户端一键登录接口返回的access_token
// openid: '100gtc_244041310f9634388fe309834f34e77838' // 客户端一键登录接口返回的openid
// }
// })
// .then(res => {
// console.log(res, 'callFunction res')
// message.value = JSON.stringify(res)
// showMessage.value = true
// // res.result = {
// // code: '',
// // message: ''
... ... @@ -50,81 +63,63 @@ const oneClickLoginHandler = () => {
// })
// .catch(err => {
// console.log(err, 'callFunction err')
// message.value = JSON.stringify(err)
// showMessage.value = true
// // 处理错误
// })
uni.login({
provider: 'univerify',
univerifyStyle: {
fullScreen: false, // 是否全屏显示,默认值: false
backgroundColor: '#ffffff', // 授权页面背景颜色,默认值:#ffffff
backgroundImage: '', // 全屏显示的背景图片,默认值:"" (仅支持本地图片,只有全屏显示时支持)
icon: {
path: 'static/xxx.png', // 自定义显示在授权框中的logo,仅支持本地图片 默认显示App logo
width: '60px', //图标宽度 默认值:60px
height: '60px' //图标高度 默认值:60px
},
closeIcon: {
path: 'static/xxx.png' // 自定义关闭按钮,仅支持本地图片。 HBuilderX3.3.7+版本支持
},
phoneNum: {
color: '#202020' // 手机号文字颜色 默认值:#202020
},
slogan: {
color: '#BBBBBB' // slogan 字体颜色 默认值:#BBBBBB
},
authButton: {
normalColor: '#3479f5', // 授权按钮正常状态背景颜色 默认值:#3479f5
highlightColor: '#2861c5', // 授权按钮按下状态背景颜色 默认值:#2861c5(仅ios支持)
disabledColor: '#73aaf5', // 授权按钮不可点击时背景颜色 默认值:#73aaf5(仅ios支持)
textColor: '#ffffff', // 授权按钮文字颜色 默认值:#ffffff
title: '本机号码一键登录', // 授权按钮文案 默认值:“本机号码一键登录”
borderRadius: '24px' // 授权按钮圆角 默认值:"24px" (按钮高度的一半)
},
fullScreen: true,
otherLoginButton: {
visible: true, // 是否显示其他登录按钮,默认值:true
normalColor: '', // 其他登录按钮正常状态背景颜色 默认值:透明
highlightColor: '', // 其他登录按钮按下状态背景颜色 默认值:透明
textColor: '#656565', // 其他登录按钮文字颜色 默认值:#656565
title: '其他登录方式', // 其他登录方式按钮文字 默认值:“其他登录方式”
borderColor: '', //边框颜色 默认值:透明(仅iOS支持)
borderRadius: '0px' // 其他登录按钮圆角 默认值:"24px" (按钮高度的一半)
},
privacyTerms: {
defaultCheckBoxState: true, // 条款勾选框初始状态 默认值: true
isCenterHint: false, //未勾选服务条款时点击登录按钮的提示是否居中显示 默认值: false (3.7.13+ 版本支持)
uncheckedImage: '', // 可选 条款勾选框未选中状态图片(仅支持本地图片 建议尺寸 24x24px)(3.2.0+ 版本支持)
checkedImage: '', // 可选 条款勾选框选中状态图片(仅支持本地图片 建议尺寸24x24px)(3.2.0+ 版本支持)
checkBoxSize: 12, // 可选 条款勾选框大小
textColor: '#BBBBBB', // 文字颜色 默认值:#BBBBBB
termsColor: '#5496E3', // 协议文字颜色 默认值: #5496E3
prefix: '我已阅读并同意', // 条款前的文案 默认值:“我已阅读并同意”
suffix: '并使用本机号码登录', // 条款后的文案 默认值:“并使用本机号码登录”
privacyItems: [
// 自定义协议条款,最大支持2个,需要同时设置url和title. 否则不生效
{
url: 'https://', // 点击跳转的协议详情页面
title: '用户服务协议' // 协议名称
}
]
},
buttons: {
// 自定义页面下方按钮仅全屏模式生效(3.1.14+ 版本支持)
iconWidth: '45px', // 图标宽度(高度等比例缩放) 默认值:45px
list: [
{
provider: 'apple',
iconPath: '/static/apple.png' // 图标路径仅支持本地图片
},
{
provider: 'weixin',
iconPath: '/static/wechat.png' // 图标路径仅支持本地图片
}
]
visible: false
}
},
success(res) {
async success(res) {
// 登录成功
console.log(res, '成功') // {openid:'登录授权唯一标识',access_token:'接口返回的 token'}
// uniCloud
// .callFunction({
// name: 'oneclicklogin', // 你的云函数名称
// data: {
// access_token: res.authResult.access_token, // 客户端一键登录接口返回的access_token
// openid: res.authResult.openid // 客户端一键登录接口返回的openid
// }
// })
// .then(res => {
// console.log(res, 'callFunction res')
// message.value = JSON.stringify(res)
// showMessage.value = true
// // res.result = {
// // code: '',
// // message: ''
// // }
// })
// .catch(err => {
// console.log(err, 'callFunction err')
// message.value = JSON.stringify(err)
// showMessage.value = true
// // 处理错误
// })
// try {
// const { result } = await doctorPhoneEasyLogin(res.authResult)
// console.log(result, '一键登录')
// uni.setStorageSync('token', result.token)
// uni.setStorageSync('UserInfo', result.userInfo)
// setTimeout(() => {
// uni.$u.toast('登录成功')
// }, 1000)
// uni.reLaunch({ url: '/pages/index/index' })
// } catch (error) {
// console.log(error, '一键登录err')
// uni.$u.toast(error)
// }
},
fail(res) {
// 登录失败
... ... @@ -132,15 +127,16 @@ const oneClickLoginHandler = () => {
console.log(res.errMsg)
}
})
uni.getProvider({
service: 'oauth',
success: function (res) {
console.log(res, '权限') // ['qq', 'univerify']
},
fail: function (err) {
console.log(err, '错误')
}
})
// uni.getProvider({
// service: 'oauth',
// success: function (res) {
// console.log(res, '登录权限') // ['qq', 'univerify']
// // authResult
// },
// fail: function (err) {
// console.log(err, '登录权限错误')
// }
// })
// uni.preLogin({
// provider: 'univerify',
... ...
... ... @@ -22,7 +22,7 @@
</view>
</view>
<view class="flexW">
<view class="mine-userTag flexC" v-for="_ in UserInfo?.career?.split(',')">{{ _ || '空的' }}</view>
<view class="mine-userTag flexC" v-for="_ in UserInfo?.department">{{ _.name || '空的' }}</view>
</view>
</view>
</view>
... ... @@ -93,7 +93,7 @@ import { onLoad, onShow, onPageScroll } from '@dcloudio/uni-app'
import Tabbar from '@/components/Tabbar'
import NavBar from '@/components/NavBar'
import TurnDown from '@/components/TurnDown'
import { getMy, getCareer } from '@/api'
import { getMy, getCareer, getDepartment } from '@/api'
import type { Result, UserInfoType, IndexListType } from '../../types'
const { proxy } = getCurrentInstance() as { proxy: ComponentPublicInstance }
... ... @@ -126,18 +126,24 @@ onShow(async () => {
if (!token) return
const { result }: { result: UserInfoType } = await getMy()
const { result: departmentList }: { result: { records: IndexListType[] } } = await getCareer({ keyword: '' })
const { result: departmentList }: { result: { records: IndexListType[] } } = await getDepartment({ keyword: '' })
![null, undefined, ''].includes(result.career) &&
(result.career = departmentList.records
// ![null, undefined, ''].includes(result.career) &&
// (result.career = departmentList.records
// .flatMap(item => item.list)
// .filter(item => result.career.includes(item.id))
// .map(item => item.name)
// .join())
![null, undefined, ''].includes(result.department) &&
(result.department = departmentList.records
.flatMap(item => item.list)
.filter(item => result.career.includes(item.id))
.map(item => item.name)
.join())
.filter(item => result.department.includes(item.id)))
uni.setStorageSync('UserInfo', result)
UserInfo.value = result
})
onPageScroll(({ scrollTop }) => {
... ...
... ... @@ -57,8 +57,13 @@
<view class="graytext">好评</view>
</view>
</view>
<view class="graytext" style="margin-bottom: 12rpx">差评</view>
<u-count-to :endVal="Number(dataTotal?.bad) || 0" duration="1000" color="#323233" fontSize="22" bold></u-count-to>
<view class="flexA" style="margin-bottom: 44rpx">
<image src="/static/images/badic.png" style="transform: rotateX(0)" class="totalhao" mode="aspectFill" />
<view>
<view class="graytext">差评</view>
<u-count-to :endVal="Number(dataTotal?.bad) || 0" duration="1000" color="#323233" fontSize="22" bold></u-count-to>
</view>
</view>
</up-col>
<up-col span="6">
<view class="charts-box">
... ...
... ... @@ -19,11 +19,10 @@
<view class="messagetext">
<text class="graytext">就诊宠物:</text>
<!-- 蓝猫/2岁/女绝/育/1kg -->
{{ props.item?.petClass || '姓名未知' }}/{{ props.item?.age || '年龄未知' }}/ {{ proxy.$h.optObjectValue('petSex', props.item?.petSex) || '性别未知' }} /{{ proxy.$h.optObjectValue('isSterilization', props.item?.isSterilization) || '是否绝育未知' }}/{{
props.item?.weight + 'kg' || '未知体重'
}}
{{ props.item?.petClass || '姓名未知' }}/{{ props.item?.age || '年龄未知' }}/ {{ proxy.$h.optObjectValue('petSex', props.item?.petSex) || '性别未知' }} /{{ proxy.$h.optObjectValue('isSterilization', props.item?.isSterilization) || '是否绝育未知' }}/
{{ props.item?.weight + 'kg' || '未知体重' }}
</view>
<view class="repeatPay flexC" v-if="props.item?.isAgainInformation === 0">复购</view>
<view class="repeatPay flexC" v-if="props.item?.isAgainInformation === 1">复诊</view>
</view>
<view class="flexA" v-if="!props.isPrescriptionDrug" @click="clickOrderItemHandler">
<view class="messagetext">
... ... @@ -67,12 +66,13 @@
<up-button
type="info"
shape="circle"
v-if="[null, '', undefined].includes(props.item?.expressNo)"
v-if="[null, '', undefined].includes(props.item?.expressNo) && [1, '1', 2, '2'].includes(props.item?.orderState)"
text="上传单号"
throttleTime="1500"
:customStyle="{ width: '170rpx', marginRight: '20rpx' }"
@click="proxy.$h.jumpUrl(`/pages2/order/PrescriptionDetail?id=${props.item.id}&isShowUpload=success`)"
></up-button>
<up-button type="info" shape="circle" text="查看详情" throttleTime="1500" :customStyle="{ width: '170rpx', marginRight: '20rpx' }" @click="clickOrderItemHandler"></up-button>
</view>
</view>
</view>
... ... @@ -131,7 +131,9 @@ const closeSendPrescriptionHandler = () => {
const AcceptHandler = async () => {
await getReceive_diagnosis({ id: props.item.id })
uni.setStorageSync('inUserInfo', props.item?.user)
const { consultationWay, imUserId, id } = props.item
// imlogin(consultationWay, imUserId, id)
... ... @@ -152,7 +154,6 @@ const getEndInformationHandler = async () => {
content: '您确定要结束问诊吗',
success: async function (res: any) {
if (res.confirm) {
console.log('用户点击确定')
try {
await getEndInformation({ id: props.item.id })
emit('fetchOrderListHandler')
... ...
... ... @@ -66,7 +66,7 @@
<view class="text">快递单号</view>
<view class="graytext">
{{ ![null, undefined, ''].includes(PrescriptionDetail?.expressNo as any) ? PrescriptionDetail?.expressNo : '未填写快递号' }}
<text class="text" v-if="![null, undefined, ''].includes(PrescriptionDetail?.expressNo as any)" @click="proxy.$h.copyText('123123')">复制</text>
<text class="text" v-if="![null, undefined, ''].includes(PrescriptionDetail?.expressNo as any)" @click="proxy.$h.copyText(PrescriptionDetail?.expressNo)">复制</text>
</view>
</view>
<view class="flexJ mb24">
... ...
... ... @@ -9,9 +9,10 @@
<image :src="proxy.$h.downFile(detailData?.user?.avatar)" class="symptom-avatar" mode="aspectFill" @click="proxy.$h.previewImage(proxy.$h.downFile(detailData?.user?.avatar))" />
<view>
<view class="flexA" style="margin-bottom: 4rpx">
<view class="symptom-username">{{ detailData?.user?.nickname || '暂无' }}</view>
<view class="symptom-tag flexC">{{ proxy.$h.optObjectValue('consultationWay', detailData?.consultationWay) || '未设置' }}</view>
<view class="symptom-username">{{ detailData?.petName }} / {{ detailData?.user?.nickname || '暂无' }}</view>
</view>
<view class="symptom-tag flexC">{{ proxy.$h.optObjectValue('consultationWay', detailData?.consultationWay) || '未设置' }}</view>
<view class="symptom-cla">
{{ detailData?.petClass || '品种未知' }}/{{ detailData?.age || '年龄未知' }}/ {{ proxy.$h.optObjectValue('petSex', detailData?.petSex) || '性别未知' }} /{{ proxy.$h.optObjectValue('isSterilization', detailData?.isSterilization) || '未知' }}/{{
detailData?.weight + 'kg' || '体重未知'
... ... @@ -27,7 +28,7 @@
</view>
<view>
<view class="symptom-infoitem">宠物体重:{{ detailData?.weight || '未知' || '' }}</view>
<view class="symptom-infoitem">宠物体重:{{ detailData?.weight + 'kg' || '未知' }}</view>
<view class="symptom-infoitem">免疫情况:{{ proxy.$h.optObjectValue('immuneStatus', detailData?.immuneStatus) || '' }}</view>
<view class="symptom-infoitem">喂养方式:{{ proxy.$h.optObjectValue('feedType', detailData?.feedType) || '' }}</view>
<view class="symptom-infoitem">洗澡频次:{{ proxy.$h.optObjectValue('batheFrequency', detailData?.batheFrequency) || '' }}</view>
... ... @@ -58,6 +59,7 @@
</view>
<view style="height: 200rpx"></view>
<view class="fixed-bottom" v-if="[30, '30'].includes(detailData?.orderState)">
<!-- <view> -->
<view class="form-btns">
<up-button type="info" shape="circle" text="返回" throttleTime="1500" @click="proxy.$h.backUrl()" :customStyle="{ width: '196rpx', marginRight: '16rpx' }"></up-button>
<up-button color="#05B8D2" shape="circle" text="接诊" throttleTime="1500" @click="AcceptHandler"></up-button>
... ... @@ -92,6 +94,7 @@ const form = ref({
const AcceptHandler = async () => {
await getReceive_diagnosis({ id: detailData.value?.id as string })
uni.setStorageSync('inUserInfo', detailData.value?.user)
const { imUserId, consultationWay, id } = detailData.value as Consultation_information_detailType
... ... @@ -195,6 +198,7 @@ onLoad((e: EventType) => {
margin-bottom: 18rpx;
}
&-tag {
width: fit-content;
color: #ffffff;
font-size: 24rpx;
font-weight: 700;
... ... @@ -202,6 +206,7 @@ onLoad((e: EventType) => {
padding: 4rpx 14rpx;
border-radius: 24rpx;
background: #05b8d2;
margin: 8rpx 0;
}
&-username {
color: #242424;
... ...
... ... @@ -208,6 +208,11 @@ export interface doctorLoginWithPwdType {
checkKey: string | number
}
export interface doctorPhoneEasyLoginType{
access_token: string
openid: string
}
export interface DiaLogEventType {
conversationName: string | number;
consultationWay: string | number; // 订单类型
... ...
... ... @@ -86,10 +86,7 @@ export interface UserInfoType {
phone: string
hospital: string // 坐诊医院
introduction: string // 个人简介
department: {
id: string
name: string
}[] // 科室
department: any // 科室
career: string // 职称
newMessageNum: number // 未读消息数量
averageResponseTime: number // 平均响应时间
... ...
'use strict';
'use strict'
exports.main = async (event, context) => {
//event为客户端上传的参数
console.log('event : ', event, context, 'context')
const res = await uniCloud.getPhoneNumber({
appid: context.APPID, // 客户端callFunction时携带的AppId信息
provider: 'univerify',
apiKey: '3fbbf2f0cc452b857ee45dde9c3b1f5e', // 在uniCloud控制台开通一键登录服务并获取apiKey
apiSecret: '2bc476e13e6545a9c9389a7631a1a6c0', // 在uniCloud控制台开通一键登录服务并获取apiSecret
access_token: event.access_token,
openid: event.openid
})
// 执行入库等操作,正常情况下不要把完整手机号返回给前端
// return {
// code: 0,
// message: '获取手机号成功'
// }
//返回数据给客户端
return event
};
//event为客户端上传的参数
console.log('event : ', event, context, 'context')
const res = await uniCloud.getPhoneNumber({
appid: context.APPID, // 客户端callFunction时携带的AppId信息
provider: 'univerify',
apiKey: '3fbbf2f0cc452b857ee45dde9c3b1f5e', // 在uniCloud控制台开通一键登录服务并获取apiKey
apiSecret: '2bc476e13e6545a9c9389a7631a1a6c0', // 在uniCloud控制台开通一键登录服务并获取apiSecret
access_token: event.access_token,
openid: event.openid
})
// 执行入库等操作,正常情况下不要把完整手机号返回给前端
// return {
// code: 0,
// message: '获取手机号成功'
// }
//返回数据给客户端
return res
}
... ...