作者 韩昌

gaibug

... ... @@ -82,7 +82,7 @@
</template>
<script lang="ts">
import { defineComponent, watchEffect, reactive, toRefs, onMounted, computed, nextTick, getCurrentInstance, ComponentPublicInstance } from 'vue'
import { defineComponent, defineEmits, watchEffect, reactive, toRefs, onMounted, computed, nextTick, getCurrentInstance, ComponentPublicInstance } from 'vue'
import Face from './message/face.vue'
import AudioMessage from './message/audio.vue'
import store from '../../../../TUICore/store'
... ... @@ -110,7 +110,8 @@ const TUIChatInput = defineComponent({
default: () => ({})
}
},
setup(props) {
emits: ['scrollbottomHandler'],
setup(props, { emit }) {
const { proxy } = getCurrentInstance() as { proxy: ComponentPublicInstance }
const TUIServer: any = uni.$TUIKit.TUIChatServer
... ... @@ -149,6 +150,7 @@ const TUIChatInput = defineComponent({
uni.$TUIKit.TUIChatServer.sendTextMessage(JSON.parse(JSON.stringify(data.inputText)))
}
data.inputText = ' '
emit('scrollbottomHandler')
}
// 处理需要合并的数据
... ...
<template>
<u-sticky>
<u-navbar title="问诊中" :autoBack="true" bgColor="#fff" placeholder safeAreaInsetTop :titleStyle="{ color: '#000' }" leftIconColor="#000"></u-navbar>
<u-navbar :title="navbarTitle" :autoBack="true" bgColor="#fff" placeholder safeAreaInsetTop :titleStyle="{ color: '#000' }" leftIconColor="#000"></u-navbar>
<view class="imtopinfo">
<view class="flexJ">
<view class="flexA">
... ... @@ -43,7 +43,7 @@
<view class="TUI-message-list" @touchstart="handleTouchStart" @click="dialogID = ''">
<!-- 用户信息卡片 -->
<!-- <UserInfoCard :detailData="detailData" /> -->
<view style="height: 280rpx"></view>
<view style="height: 340rpx"></view>
<template v-if="history === 'err'">
<view class="loading-text" v-if="isCompleted">没有更多</view>
<view v-for="(item, index) in messages" :key="item.ID" :id="'view' + item.ID">
... ... @@ -79,7 +79,7 @@
<MessageBubble :data="item">
<MessageText :id="item.flow + '-' + item.ID" v-if="item.chatType === 1" :data="item" :messageData="item" @longpress="handleItem($event, item)"></MessageText>
<MessageImage :id="item.flow + '-' + item.ID" v-if="item.chatType === 2" :data="item.payload" :messageData="item" @longpress="handleItem($event, item)"></MessageImage>
<MessageVideo :id="item.flow + '-' + item.ID" v-if="item.chatType === 3" :data="item.payload" :messageData="item" @longpress="handleItem($event, item)" />
<MessageVideo :id="item.flow + '-' + item.ID" v-if="item.chatType === 3" :data="item" :messageData="item" @longpress="handleItem($event, item)" />
</MessageBubble>
<MessageRevoked v-if="item.isRevoked" :data="item" @edit="handleEdit(item)" />
</view>
... ... @@ -95,7 +95,7 @@
<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>
<TUIChatInput :text="text" :conversationData="conversation" :detailData="detailData" @scrollbottomHandler="scrollbottomHandler"></TUIChatInput>
</template>
</view>
<!-- <view class="TUIChat" v-if="conversationType === 'system'">
... ... @@ -232,7 +232,8 @@ export default defineComponent({
pageSize: 15
},
imUserId: '',
historyList: [] as any
historyList: [] as any,
navbarTitle: ''
})
// 判断当前会话类型:无/系统会话/正常C2C、群聊
... ... @@ -266,6 +267,12 @@ export default defineComponent({
data.Event = options
getDetailHandler()
data.navbarTitle = { err: '问诊中', success: '问诊记录' }[data.history] as string
setTimeout(() => {
data.scrollTop = 10000
}, 1300)
// uni.setNavigationBarTitle({
// // title: options && options.conversationName
// title: '自定义用户名'
... ... @@ -346,6 +353,12 @@ export default defineComponent({
}
})
const scrollbottomHandler = () => {
setTimeout(() => {
data.scrollTop = 10000
}, 500)
}
const imageFormatMap = new Map([
['jpg', 1],
['gif', 2],
... ... @@ -622,7 +635,8 @@ export default defineComponent({
getEndInformationHandler,
computedTotalHandler,
finishCountDownHandler,
getOrder_chatHandler
getOrder_chatHandler,
scrollbottomHandler
}
}
})
... ...
<template>
<view class="flexC" style="margin: 0 auto; flex-direction: column">
<image src="/static/images/empty.png" mode="scaleToFill" />
<view class="flexC">{{ props.text }}</view>
</view>
</template>
<script setup lang="ts">
const props = defineProps({
text: String
})
</script>
<style scoped>
image {
width: 320rpx;
height: 320rpx;
margin-bottom: 32rpx;
}
.flexC {
color: #323233;
font-size: 28rpx;
font-weight: 700;
}
</style>
... ...
<template>
<div class="trundown">
<view class="trundown">
<view class="trundown-bottom">
<view class="shuiyin flexC" v-if="props.isShowSY">宠物问诊</view>
<view class="flexJ zbjz" @click="jumpHandler">
... ... @@ -8,7 +8,7 @@
<u-icon name="arrow-right" color="#10bfd1" size="24"></u-icon>
</view>
</view>
</div>
</view>
</template>
<script setup lang="ts">
... ... @@ -26,7 +26,7 @@ const props = withDefaults(defineProps<IProps>(), {
})
const jumpHandler = () => {
if([20,'20'].includes(props.examineState)) return proxy.$h.jumpUrl(`/pages2/mineinfo/state?state=${props.state}`)
if ([20, '20'].includes(props.examineState)) return proxy.$h.jumpUrl(`/pages2/mineinfo/state?state=${props.state}`)
uni.$u.toast('请先完成认证')
}
... ...
... ... @@ -263,6 +263,12 @@
}
},
{
"path": "money/addAccount",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "datatotal/index",
"style": {
"navigationStyle": "custom"
... ...
<template>
<div class="fillinfo flexCCol">
<view class="fillinfo flexCCol">
<view class="fillinfo-title">完善个人信息</view>
<view class="subtitle">为了更好体验,请尽快完善个人信息</view>
<image src="/static/images/fillinfo.png" class="logo" mode="aspectFill" />
<up-button color="#05B8D2" shape="circle" text="我已准备好,去认证" throttleTime="1500" @click="proxy.$h.jumpUrl(`/pages2/auth/step`), emit('close', false)"></up-button>
<view class="er" @click="emit('close', false)">稍后完善</view>
</div>
</view>
</template>
<script setup lang="ts">
... ...
... ... @@ -20,7 +20,9 @@
/>
<image v-else @click.stop="proxy.$h.previewImage('/static/images/mAvatar.png')" class="index-avatar" src="/static/images/mAvatar.png" mode="aspectFill" />
<view @click="proxy.$h.jumpUrl(`/pages2/mineinfo/info`)">
<view class="index-username ffftext">{{ IndexData?.nickname || '未登录' }}</view>
<view class="index-username ffftext" v-if="[null, undefined, ''].includes(IndexData?.nickname) && LoginState">{{ '未设置用户名' }}</view>
<view class="index-username ffftext" v-if="![null, undefined, ''].includes(IndexData?.nickname) && LoginState">{{ IndexData.nickname }}</view>
<view class="index-username ffftext" v-if="!LoginState && [null, undefined, ''].includes(IndexData?.nickname)">{{ '未登录' }}</view>
<view class="ffftext">在线认证资质</view>
</view>
</view>
... ...
<template>
<view class="login">
<!-- <image class="login-bgimg" src="/static/images/startup.png" mode="aspectFill" /> -->
<view class="login-bgcolor"></view>
<view class="login-positiontopbox">
<image class="login-avatar flexC" :src="proxy.$h.downFile(startimg)" mode="aspectFill"></image>
<view class="login-avatar flexC" mode="aspectFill">
<image :src="proxy.$h.downFile(startimg)" mode="scaleToFill" />
</view>
<view class="login-title flexC">宠研兽医</view>
</view>
</view>
... ... @@ -22,46 +22,30 @@ const { proxy } = getCurrentInstance()
const startUpHandler = async () => {
const { result }: { result: StartType } = await getStart()
if (result === null) return
startimg.value = result.image
}
onShow(startUpHandler())
![null, undefined, ''].includes(result?.image) && (startimg.value = result?.image)
setTimeout(() => {
setTimeout(() => {
if (uni.getStorageSync('token')) {
proxy.$h.relaunchUrl('/pages/index/index')
return
}
proxy.$h.relaunchUrl('/pages/login/login')
}, 3000)
}, 3000)
}
onShow(startUpHandler())
</script>
<style lang="scss" scoped>
page {
background: #05b8d2;
}
.login {
text {
font-size: 26rpx;
}
&-bgcolor {
width: 100vw;
height: 100vh;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: -100;
background: #05b8d2;
}
&-bgimg {
width: 100vw;
height: 100vh;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: -100;
}
&-positiontopbox {
position: fixed;
top: 30%;
... ... @@ -72,6 +56,11 @@ setTimeout(() => {
width: 172rpx;
height: 172rpx;
border-radius: 32rpx;
background: #fff;
image {
width: 100%;
height: 100%;
}
}
&-title {
margin: 36rpx auto 0;
... ...
... ... @@ -16,7 +16,7 @@
</view>
<view class="flexJ" style="margin-top: 28rpx">
<view class="bluetext" @click="emit('editLoginStateHandler', 2)">验证码登录</view>
<view class="bluetext" @click="proxy.$h.jumpUrl(`/pages2/mineinfo/editphone?type=editpassword`)">忘记密码</view>
<view class="bluetext" @click="proxy.$h.jumpUrl(`/pages2/mineinfo/editphone?type=editpassword&disabled=err`)">忘记密码</view>
</view>
</view>
</template>
... ...
... ... @@ -14,7 +14,7 @@
<up-input placeholder="请输入验证码" border="bottom" placeholderClass="placeholderClass" v-model="params.code"></up-input>
</view>
<view class="bluetext" style="margin-top: 28rpx" @click="emit('editLoginStateHandler', 3)">账号密码登录</view>
<view style="font-size: 18rpx; color: red">*未注册用户在登录后自动注册</view>
<view style="font-size: 32rpx; color: red; margin-top: 20rpx">*未注册用户在登录后自动注册</view>
</view>
</template>
... ...
... ... @@ -7,8 +7,6 @@
</view>
<image class="login-avatar flexC" src="/static/images/bg.png" mode="aspectFill"></image>
<image class="login-logo flexC" src="/static/images/logo.png" mode="aspectFill"></image>
<!-- <view class="login-phone flexC">187****5857</view>
<view class="login-remark flexC">认证服务由中国联通服务</view> -->
</template>
<template v-if="loginState === 2">
<PhoneLogin @editLoginStateHandler="(state: number) => loginState = state" ref="phoneLoginRef" />
... ... @@ -17,11 +15,11 @@
<AccountLogin @editLoginStateHandler="(state: number) => loginState = state" ref="accountLoginRef" />
</template>
<template v-if="loginState === 4">
<view>暂无需求</view>
<view></view>
</template>
<ConfirmProtocol @login="loginHandler" :loginState="loginState" ref="confirmProtocolRef" />
<template v-if="loginState === 1 && iosVersion >= 13">
<AppleLogin ref="AppleLoginRef" />
<AppleLogin v-if="false" ref="AppleLoginRef" />
</template>
<view v-if="loginState === 1" class="login-other flexC" @click="loginState = 2">其他登录方式</view>
</view>
... ... @@ -60,9 +58,7 @@ onShow(() => {
if (version >= 13) {
iosVersion.value = version
}
console.log('当前设备为iOS ' + version)
} else {
console.log('当前设备不是iOS')
}
}
})
... ...
... ... @@ -38,12 +38,14 @@
<view class="infomain Zindex">
<view class="infomain-title">您已完成认证</view>
<view style="margin-bottom: 10rpx">{{ UserInfo?.nickname }}</view>
<view style="margin-bottom: 10rpx">
{{ UserInfo?.nickname }}
<!-- <text>{{ UserInfo?.doctorUserType ? `- ${UserInfo?.doctorUserType}` : '' }}</text> -->
</view>
<view class="flexX intrbox" style="margin-bottom: 42rpx">
<view>
{{ UserInfo?.hospitalName }}
<!-- -
<text>{{ UserInfo?.department.join() }}</text> -->
{{ UserInfo?.hospitalName }} &nbsp;
<text v-for="_ in UserInfo?.department">{{ _.name || '空的' }}&nbsp;</text>
</view>
</view>
<view class="flexJA">
... ... @@ -69,7 +71,7 @@
<template #confirmButton>
<view class="flexJ">
<up-button type="info" plain shape="circle" text="暂不修改" throttleTime="1000" :customStyle="{ width: '248rpx', height: '92rpx', color: '#000', border: '2rpx solid #e5e5e5' }" @click="showIsEditAuthState = false"></up-button>
<up-button color="#05B8D2" shape="circle" text="修改信息" throttleTime="1000" :customStyle="{ width: '248rpx', height: '92rpx' }" @click="proxy.$h.jumpUrl(`/pages2/auth/step?type=edit`, () => (showIsEditAuthState = false))"></up-button>
<up-button color="#05B8D2" shape="circle" text="修改信息" throttleTime="1000" :customStyle="{ width: '248rpx', height: '92rpx' }" @click="proxy.$h.jumpUrl(`/pages2/auth/step?type=edit&reapply=success`, () => (showIsEditAuthState = false))"></up-button>
</view>
</template>
</u-modal>
... ... @@ -79,8 +81,8 @@
<script setup lang="ts">
import { ref, getCurrentInstance, ComponentPublicInstance } from 'vue'
import { onLoad, onShow } from '@dcloudio/uni-app'
import { getMy } from '../../api'
import type { UserInfoType } from '../../types'
import { getMy, getDepartment } from '../../api'
import type { UserInfoType, IndexListType } from '../../types'
const { proxy } = getCurrentInstance() as { proxy: ComponentPublicInstance }
interface EventType {
... ... @@ -102,6 +104,15 @@ onLoad((e: EventType) => {
const getUserInfoHandler = async () => {
const { result }: { result: UserInfoType } = await getMy()
const { result: departmentList }: { result: { records: IndexListType[] } } = await getDepartment({ keyword: '' })
result.doctorUserType = result.doctorUserType
?.split(',')
.map(_ => proxy.$h.optData('doctorUserType')[_])
.join(' ')
![null, undefined, ''].includes(result.department) && (result.department = departmentList.records.flatMap(item => item.list).filter(item => result.department.includes(item.id)))
UserInfo.value = result
}
... ...
<template>
<u-navbar title="在线认证" :autoBack="true" bgColor="#40434e" placeholder safeAreaInsetTop :titleStyle="{ color: '#fff' }" leftIconColor="#fff"></u-navbar>
<div class="step">
<view class="step">
<view class="step-top flexJ" v-if="!['detail'].includes(Event?.type as string)">
<view class="flexA">
<view class="step-num flexC" :class="{ numac: step === 1 }">1</view>
... ... @@ -30,13 +30,13 @@
<u-form-item labelWidth="160rpx" label="性别" prop="sex" borderBottom @click="showActionSheepHandler('sex')" ref="name">
<u-input v-model="ShowSelectData.sex" disabled disabledColor="#ffffff" placeholder="请选择性别" border="none" inputAlign="right"></u-input>
<template #right>
<u-icon name="arrow-right"></u-icon>
<u-icon name="arrow-right" v-if="!['detail'].includes(Event?.type as string)"></u-icon>
</template>
</u-form-item>
<view class="grayLine"></view>
<u-form-item labelWidth="160rpx" label="选择种类" prop="category" borderBottom @click="!formDisabled && proxy.$h.jumpUrl(`/pages2/mineinfo/hospitalList?flag=KESHI`)" ref="selectDepartment">
<u-form-item labelWidth="160rpx" label="选择种类" prop="doctorUserType" borderBottom @click="!formDisabled && proxy.$h.jumpUrl(`/pages2/mineinfo/hospitalList?flag=KESHI`)" ref="selectDepartment">
<view class="flexD" style="width: 100%">
<u-checkbox-group v-model="form.category" placement="row" shape="circle">
<u-checkbox-group v-model="form.doctorUserType" placement="row" shape="circle" :disabled="formDisabled">
<u-checkbox activeColor="#05b8d2" name="1" label="猫猫"></u-checkbox>
<u-checkbox activeColor="#05b8d2" name="2" label="狗狗"></u-checkbox>
<u-checkbox activeColor="#05b8d2" name="3" label="异宠"></u-checkbox>
... ... @@ -46,20 +46,20 @@
<u-form-item labelWidth="160rpx" label="选择科室" prop="selectDepartment" borderBottom @click="!formDisabled && proxy.$h.jumpUrl(`/pages2/mineinfo/hospitalList?flag=KESHI`)" ref="selectDepartment">
<u-input v-model="form.selectDepartment" disabled disabledColor="#ffffff" placeholder="请选择科室" border="none" inputAlign="right"></u-input>
<template #right>
<u-icon name="arrow-right"></u-icon>
<u-icon name="arrow-right" v-if="!['detail'].includes(Event?.type as string)"></u-icon>
</template>
</u-form-item>
<!-- <u-form-item labelWidth="160rpx" label="选择职称" prop="career" borderBottom @click="showActionSheepHandler('career')" ref="career"> -->
<u-form-item labelWidth="160rpx" label="选择职称" prop="selectCareer" borderBottom @click="!formDisabled && proxy.$h.jumpUrl(`/pages2/mineinfo/hospitalList?flag=ZHICHENG`)" ref="career">
<u-input v-model="form.selectCareer" disabled disabledColor="#ffffff" placeholder="请选择职称" border="none" inputAlign="right"></u-input>
<template #right>
<u-icon name="arrow-right"></u-icon>
<u-icon name="arrow-right" v-if="!['detail'].includes(Event?.type as string)"></u-icon>
</template>
</u-form-item>
<u-form-item labelWidth="160rpx" label="坐诊医院" prop="selectHospital" borderBottom @click="!formDisabled && proxy.$h.jumpUrl(`/pages2/mineinfo/hospitalList?flag=ZUOZHENYIYUAN`)" ref="career">
<u-input v-model="form.selectHospital" disabled disabledColor="#ffffff" placeholder="请选择医院" border="none" inputAlign="right"></u-input>
<template #right>
<u-icon name="arrow-right"></u-icon>
<u-icon name="arrow-right" v-if="!['detail'].includes(Event?.type as string)"></u-icon>
</template>
</u-form-item>
<view style="font-size: 18rpx; color: red">若为居家办公则选择宠物研究院</view>
... ... @@ -131,7 +131,7 @@
</view>
<u-safe-bottom></u-safe-bottom>
</view>
</div>
</view>
<u-action-sheet :show="showActionSheep" :actions="actions" :title="actionsTitle" @close="showActionSheep = false" @select="selectActionSheepHandler"></u-action-sheet>
</template>
... ... @@ -179,7 +179,7 @@ const form = ref<ApplyAuthType>({
selectDepartment: '',
selectCareer: '',
selectHospital: '',
category: []
doctorUserType: []
})
const actions = ref()
... ... @@ -196,7 +196,7 @@ const rules = ref({
selectDepartment: { type: 'string', required: true, message: '请选择科室', trigger: ['blur', 'change'] },
selectCareer: { type: 'string', required: true, message: '请选择职称', trigger: ['blur', 'change'] },
selectHospital: { type: 'string', required: true, message: '请选坐诊医院', trigger: ['blur', 'change'] },
category: { type: 'array', min: 1, required: true, message: '请选择种类', trigger: ['blur', 'change'] }
doctorUserType: { type: 'array', min: 1, required: true, message: '请选择种类', trigger: ['blur', 'change'] }
})
const formDisabled = ref<boolean>(false) // true 禁用代表回显数据 false 可以填写可以提交
... ... @@ -268,12 +268,15 @@ const uploadFormImgHandler = () =>
const submitAuthHandler = async () => {
if (!form.value.file.length) return uni.$u.toast('请上传资质证明')
await updateRegister({
const data = {
...form.value,
department: typeof form.value.department === 'string' ? form.value.department : JSON.stringify(form.value.department),
career: typeof form.value.career === 'string' ? form.value.career : JSON.stringify(form.value.career),
hospital: typeof form.value.hospital === 'string' ? form.value.hospital : JSON.stringify(form.value.hospital)
})
hospital: typeof form.value.hospital === 'string' ? form.value.hospital : JSON.stringify(form.value.hospital),
doctorUserType: form.value.doctorUserType?.join()
}
await updateRegister(data)
const delta = Event.value?.reapply === 'success' ? 2 : 1
... ... @@ -310,7 +313,8 @@ const getVeterinaryHandler = async () => {
? JSON.parse(result.hospital as string)
.map(item => item.name)
.join()
: result.hospital
: result.hospital,
doctorUserType: result.doctorUserType?.split(',')
}
}
... ...
... ... @@ -17,9 +17,9 @@
<text class="message-text">{{ _.text }}</text>
</view>
</view>
<!-- <view>
<view>
<view class="message-time">{{ _.time }}</view>
</view> -->
</view>
</view>
<view class="flexD">
<u-line margin="30rpx 0" v-if="index !== list.length - 1" length="80%"></u-line>
... ...
... ... @@ -5,6 +5,7 @@
</template>
</u-navbar>
<view class="msglist">
<template v-if="pageList?.records.length">
<view class="msglist-item" v-for="_ in pageList?.records" :key="_.id" @click="jumpUrlHandler(_)">
<view class="flexJ" style="margin-bottom: 28rpx">
<view class="msglist-title">{{ proxy.$h.optObjectValue('MessageType', _?.type) }}</view>
... ... @@ -17,14 +18,18 @@
<u-icon size="20" name="arrow-right" color="#c1c1c1"></u-icon>
</view>
</view>
<view class="msglist-empty flexC">没有更多数据了~</view>
</template>
<template v-else>
<Empty text="暂无通知" />
</template>
</view>
</template>
<script setup lang="ts">
import { ref, getCurrentInstance, ComponentPublicInstance } from 'vue'
import { onLoad, onReachBottom } from '@dcloudio/uni-app'
import Empty from '@/components/Empty.vue'
import { getMsg_list, getis_all_read } from '../../api'
import { MessageListParamsType, PageListType, MessageListType } from '../../types'
... ...
... ... @@ -5,7 +5,7 @@
</u-sticky>
<image src="/static/images/commentBg.png" class="mineCom-bg" mode="aspectFill" />
<div class="mineCom Zindex">
<view class="mineCom Zindex">
<template v-if="pageList.records.length">
<view class="mineCom-item" v-for="_ in pageList?.records" :key="_.id">
<view class="flexJ" style="margin-bottom: 50rpx">
... ... @@ -51,7 +51,7 @@
<view class="mineCom-time">没有更多数据</view>
</view>
</template>
</div>
</view>
</template>
<script setup lang="ts">
... ...
... ... @@ -5,7 +5,7 @@
</view>
<view class="phone-title">{{ Event?.type === 'editpassword' ? '修改密码' : '更换手机号' }}</view>
<view style="margin-bottom: 56rpx">
<up-input placeholder="请输入手机号" border="bottom" placeholderClass="placeholderClass" v-model="phone" disabled disabledColor="#fff">
<up-input placeholder="请输入手机号" border="bottom" placeholderClass="placeholderClass" v-model="phone" :disabled="Event?.disabled === 'err' ? false : true" disabledColor="#fff">
<template #suffix>
<view class="phone-suffix" @click="sendCodeHandler">{{ countdown === 60 ? '获取验证码' : `${countdown}秒后可重新获取` }}</view>
</template>
... ... @@ -34,6 +34,7 @@ import { DebounceBy } from '../../utils/debounceBy'
interface EventType {
type: string
disabled?: string
}
const Event = ref<EventType>()
... ... @@ -96,8 +97,6 @@ const editPhoneHandler = async () => {
uni.$u.toast(error)
}
}
// proxy.$h.jumpUrl(`/pages2/mineinfo/editPasssword`)
}
onLoad((e: EventType) => {
... ...
<template>
<u-navbar title="更改状态" :autoBack="true" bgColor="#fff" placeholder safeAreaInsetTop :titleStyle="{ color: '#000' }" leftIconColor="#000"></u-navbar>
<div class="state">
<view class="state">
<view class="flexJ" style="margin-bottom: 62rpx">
<view v-for="(_, index) in statelist" :key="index" class="stateBtn flexC" :class="{ activeBtn: params.state === _.value }" @click="params.state = _.value">{{ _.title }}</view>
</view>
... ... @@ -57,7 +57,7 @@
<view style="margin-top: 160rpx" v-if="params.state === 0">
<up-button color="#05B8D2" shape="circle" text="提交" throttleTime="1500" @click="submitMineStateHandler(params.state)"></up-button>
</view>
</div>
</view>
<u-datetime-picker :show="showTimePickerState" mode="time" @cancel="showTimePickerState = false" @confirm="confirmSelectTimeHandler"></u-datetime-picker>
</template>
... ...
... ... @@ -2,7 +2,7 @@
<u-navbar title="账户设置" :autoBack="true" bgColor="#fff" placeholder safeAreaInsetTop :titleStyle="{ color: '#000' }" leftIconColor="#000"></u-navbar>
<u-cell-group>
<template v-for="_ in accountList">
<u-cell
<!-- <u-cell
:title="_.title + _.account"
:isLink="true"
@click="
... ... @@ -13,7 +13,8 @@
nameFlag = _.nameFlag
}
"
></u-cell>
></u-cell> -->
<u-cell :title="_.title + _.account" :isLink="true" @click="proxy.$h.jumpUrl(proxy.$h.setObjToUrlParams(_.url, _))"></u-cell>
</template>
</u-cell-group>
<u-modal :show="bindAccountModalState" :title="''" @confirm="bindAccountHandler" @cancel="bindAccountModalState = false" showCancelButton confirmText="确认绑定">
... ... @@ -50,8 +51,8 @@ const bindAccountModalState = ref<boolean>(false)
const bindAccountModalTitle = ref<string>('')
const accountList = ref([
{ account: '', title: '微信账户', nameFlag: 'doctorWXRealName', flag: 'wxUserName' },
{ account: '', title: '支付宝账户', nameFlag: 'doctorRealName', flag: 'aliUserName' }
{ account: '', title: '微信账户', nameFlag: 'doctorWXRealName', url: '/pages2/money/addAccount', flag: 'wxUserName' },
{ account: '', title: '支付宝账户', nameFlag: 'doctorRealName', url: '/pages2/money/addAccount', flag: 'aliUserName' }
])
onShow(() => {
... ...
<template>
<u-navbar title="添加银行卡" :autoBack="true" bgColor="#ffffff" placeholder safeAreaInsetTop :titleStyle="{ color: '#000' }"></u-navbar>
<div class="step">
<view class="step">
<view class="main">
<u-form labelPosition="left" :model="form" :rules="rules" ref="stepForm1">
<view class="grayLine"></view>
... ... @@ -33,7 +33,7 @@
</u-form>
<up-button color="#05B8D2" shape="circle" text="同意协议并添加" throttleTime="1500" :customStyle="{ width: '100%', height: '94rpx', fontWeight: 700 }" @click="confirmAddBankCardHandler"></up-button>
</view>
</div>
</view>
</template>
<script setup lang="ts">
... ...
<template>
<u-navbar title="账户设置" :autoBack="true" bgColor="#fff" placeholder safeAreaInsetTop :titleStyle="{ color: '#000' }" leftIconColor="#000"></u-navbar>
<view class="step">
<view class="main">
<u-form labelPosition="left" :model="form" ref="AddAccountFormRef">
<view class="grayLine"></view>
<u-form-item labelWidth="200rpx" :label="Event.title" :prop="Event.flag" borderBottom>
<u-input :placeholder="`请输入${Event.title}`" border="none" v-model="form[Event.flag]" disabledColor="#ffffff"></u-input>
</u-form-item>
<u-form-item labelWidth="200rpx" :label="`真实姓名`" :prop="Event.nameFlag" borderBottom>
<u-input :placeholder="`请输入真实姓名`" border="none" v-model="form[Event.nameFlag]" disabledColor="#ffffff"></u-input>
</u-form-item>
<u-form-item labelWidth="200rpx" :label="`手机号`" prop="phone" borderBottom>
<u-input :placeholder="`请输入手机号`" border="none" v-model="UserInfo.phone" disabledColor="#ffffff" disabled></u-input>
<view style="color: #06b8d3; font-size: 26rpx" @click="sendCodeHandler">{{ countdown === 60 ? '获取验证码' : `${countdown}秒后可重新获取` }}</view>
</u-form-item>
<u-form-item labelWidth="200rpx" :label="`验证码`" prop="code" borderBottom>
<u-input :placeholder="`请输入验证码`" border="none" v-model="form.code" disabledColor="#ffffff"></u-input>
</u-form-item>
</u-form>
</view>
<up-button color="#05B8D2" shape="circle" text="添加" throttleTime="1500" :customStyle="{ width: '90%', height: '94rpx', marginTop: '32rpx' }" @click="bindAccountHandler"></up-button>
</view>
</template>
<script setup lang="ts">
import { ref, getCurrentInstance, ComponentPublicInstance, nextTick } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import useTimeHandler from '@/hooks/useTimeChange'
import { DebounceBy } from '@/utils/debounceBy'
import { updateBindUserCard, getChangePhonePwdCode } from '../../api'
import { BindUserCardType, AddAccountEventType } from '../../types'
import { AddAccountFormRules } from '@/static/json/rules'
const { proxy } = getCurrentInstance() as { proxy: ComponentPublicInstance }
const [countdown, startCountdown] = useTimeHandler()
const Event = ref<AddAccountEventType>({
account: '',
flag: '',
nameFlag: '',
title: '',
url: ''
})
const AddAccountFormRef = ref()
const UserInfo = ref()
const form = ref<BindUserCardType>({
wxUserName: '',
aliUserName: '',
doctorRealName: '',
doctorWXRealName: ''
})
onLoad(async (e: AddAccountEventType) => {
Event.value = e
UserInfo.value = uni.getStorageSync('UserInfo')
nextTick(() => {
AddAccountFormRef.value.setRules(AddAccountFormRules)
})
})
const clickGetCodeHandler = async () => await getChangePhonePwdCode({ type: 3 })
const sendCodeHandler = DebounceBy(() => startCountdown(clickGetCodeHandler), 2000)
const bindAccountHandler = () =>
AddAccountFormRef.value.validate().then(async () => {
await updateBindUserCard({ [Event.value.flag]: form.value[Event.value.flag].replace(/\s/g, ''), [Event.value.nameFlag]: form.value[Event.value.nameFlag] })
proxy.$h.timeCallBack('绑定成功')
})
</script>
<style lang="scss" scoped>
page {
background: #f6f8fa;
}
.step {
&-top {
background: #fff;
box-sizing: border-box;
padding: 44rpx 24rpx;
margin-bottom: 20rpx;
}
&-num {
width: 36rpx;
height: 36rpx;
box-sizing: border-box;
padding: 2rpx 10rpx;
border-radius: 50%;
background: #cccccc;
color: #ffffff;
font-size: 24rpx;
margin-right: 14rpx;
}
.numac {
background: #05b8d2;
}
&-title {
color: #cccccc;
font-size: 30rpx;
font-weight: 700;
}
.titleac {
color: #05b8d2;
}
&-img {
width: 52rpx;
height: 52rpx;
}
}
.main {
box-sizing: border-box;
padding: 0 32rpx;
background: #fff;
.formSubTitle {
margin-bottom: 46rpx;
color: #666666;
font-size: 24rpx;
}
.fileImg {
position: relative;
.fileimage {
width: 210rpx;
height: 210rpx;
border-radius: 24rpx;
margin-right: 24rpx;
}
.fileimage:nth-child(3n) {
margin-right: 0 !important;
}
.close {
position: absolute;
top: 12rpx;
right: 12rpx;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
}
}
.uploadImg {
box-sizing: border-box;
padding: 68rpx 60rpx 60rpx;
border: 1rpx dashed #cbcbcb;
color: #999999;
font-size: 22rpx;
font-weight: 700;
image {
width: 48rpx;
height: 48rpx;
margin-bottom: 4rpx;
}
}
.formTitle {
color: #323233;
font-size: 30rpx;
font-weight: 700;
box-sizing: border-box;
padding: 30rpx 0;
}
}
</style>
... ...
... ... @@ -101,11 +101,6 @@
:showStep="`err`"
/>
</u-popup>
<div id="u-a-p">
<div>
<div></div>
</div>
</div>
</template>
<script setup lang="ts">
... ...
... ... @@ -5,9 +5,14 @@
</view>
<view class="Prescription">
<view class="Prescription-title flexC" v-if="props.title">{{ props.title }}</view>
<template v-if="!['success'].includes(props.isRenew)">
<!-- <template v-if="!['success'].includes(props.isRenew) && ![null, undefined, ''].includes(PrescriptionDetail?.prescriptionForm)">
<view class="text mb24">问诊病情</view>
<view class="text mb24">{{ PrescriptionDetail?.supplement || '病情描述' }}</view>
<view class="text mb24">{{ PrescriptionDetail?.prescriptionForm || '病情描述' }}</view>
</template> -->
<template v-if="!['success'].includes(props.isRenew) && ![null, undefined, ''].includes(PrescriptionDetail?.supplement) && props.showX">
<view class="text mb24">{{ props.showX ? '续方原因' : '问诊病情' }}</view>
<view class="text mb24">{{ PrescriptionDetail?.supplement || '续方原因' }}</view>
</template>
<template v-if="![null, undefined, ''].includes(PrescriptionDetail?.renewRemark) && ['success'].includes(props.isRenew)">
<view class="text mb24">续方原因</view>
... ... @@ -82,13 +87,15 @@ interface IProps {
showTopState: boolean
showStep?: string
order?: string
showX?: boolean
}
const props = withDefaults(defineProps<IProps>(), {
bg: '#fff',
isRenew: 'err',
showTopState: true,
showStep: 'success',
order: 'xf'
order: 'xf',
showX: false
})
const amount = computed(() => {
... ...
... ... @@ -30,6 +30,7 @@
</view>
<u-line margin="32rpx 0 22rpx 0"></u-line>
<view class="moneytext flexD" v-if="!props.isPrescriptionDrug && !props.isRecord">¥{{ props.item?.award || 0 }}/预计收入</view>
<view v-if="[2, '2'].includes(props.item.renewExamineState as string)" style="font-size: 20rpx">驳回原因:{{ props.item.examineRemark }}</view>
<view class="flexD">
<view class="flexA">
<!-- <up-button type="info" @click="clickOrderItemHandler" plain shape="circle" text="查看" throttleTime="1500" :customStyle="{ width: '170rpx', marginRight: '20rpx', fontWeight: 700 }"></up-button> -->
... ... @@ -60,7 +61,7 @@
</view>
</u-modal>
<u-popup :show="showPrescriptionState" @close="showPrescriptionState = false" mode="bottom" closeIconPos="top-right" closeable round="20">
<Prescription :showTopState="false" :PrescriptionDetail="PrescriptionDetail" :isRenew="isRenew" bg="linear-gradient(188deg, #E0FFF4 5.54%, #FFF 24.89%)" :title="`${props.item.user?.nickName}的处方单`" showStep="err" />
<Prescription :showTopState="false" :PrescriptionDetail="PrescriptionDetail" :isRenew="isRenew" bg="linear-gradient(188deg, #E0FFF4 5.54%, #FFF 24.89%)" :title="`${props.item.user?.nickName}的处方单`" showStep="err" :showX="true" />
</u-popup>
</template>
... ...
... ... @@ -17,6 +17,7 @@
></u-tabs>
</u-sticky>
<view class="order">
<template v-if="orderList.length">
<template v-for="_ in orderList">
<OrderCard
:isPrescriptionDrug="Boolean(orderState)"
... ... @@ -28,6 +29,10 @@
@fetchOrderListHandler="orderStore.getOrderListHandler(true, orderState, subOrderState)"
/>
</template>
</template>
<template v-else>
<Empty :text="Event?.isRecords !== 'success' ? '暂无订单信息' : '暂无问诊记录'" />
</template>
</view>
</template>
... ... @@ -38,6 +43,7 @@ import { storeToRefs } from 'pinia'
import { useOrderStore } from '../../store/order'
import type { SubOrderTabsType } from '@/types'
import OrderCard from './com/OrderCard.vue'
import Empty from '@/components/Empty.vue'
import { imlogin } from '../../hooks/imLogin'
interface EventType {
... ...
<template>
<u-navbar title="续方" :autoBack="true" bgColor="#ffffff" placeholder safeAreaInsetTop :titleStyle="{ color: '#000' }"></u-navbar>
<view class="Renew">
<template v-if="pageList?.records.length">
<template v-for="_ in pageList?.records">
<!-- <template v-for="_ in 2"> -->
<xfCom :isRecord="true" bg="#fff" @confirmSubmitExamineOrderStateHandler="getListHandler(true)" :isPrescriptionDrug="false" :item="_" />
</template>
</template>
<template v-else>
<Empty text="暂无续方订单" />
</template>
</view>
</template>
... ... @@ -15,6 +20,7 @@ import { storeToRefs } from 'pinia'
import { getOrder_renew_list } from '@/api'
import { PageListType, RenewListType } from '../../types'
import xfCom from './com/xfCom.vue'
import Empty from '@/components/Empty.vue'
const { proxy } = getCurrentInstance() as { proxy: ComponentPublicInstance }
... ...
export const AddAccountFormRules = {
wxUserName: { type: 'string', required: true, message: '请填写微信账户', trigger: ['blur', 'change'] },
aliUserName: { type: 'string', required: true, message: '请填写支付宝账户', trigger: ['blur', 'change'] },
doctorRealName: { type: 'string', required: true, message: '请填写真实姓名', trigger: ['blur', 'change'] },
doctorWXRealName: { type: 'string', required: true, message: '请填写真实姓名', trigger: ['blur', 'change'] },
code: { type: 'string', required: true, message: '请填写验证码', trigger: ['blur', 'change'] }
}
... ...
... ... @@ -15,6 +15,7 @@ export interface ApplyAuthType {
selectDepartment?: string
selectCareer?: string
selectHospital?: string
doctorUserType?: string[]
[property: string]: any;
}
... ... @@ -76,6 +77,8 @@ export interface BindUserCardType {
aliUserName?: string
doctorRealName?: string
doctorWXRealName?: string
code?: string
[property: string]: any;
}
// 续方订单审核
... ... @@ -237,3 +240,12 @@ export interface DiaLogEventType {
export interface IcomeEventType {
flag?: string
}
export interface AddAccountEventType {
account: string
flag: string
nameFlag: string
title: string
url: string
[property: string]: any;
}
\ No newline at end of file
... ...
... ... @@ -78,6 +78,7 @@ export interface VeterinaryType {
introduction: string // 个人简介
qualifications: string // 资质证明
hospital?: string
doctorUserType?: string
[property: string]: any;
}
... ... @@ -101,6 +102,7 @@ export interface UserInfoType {
state: number // 接诊状态 0-暂不接诊 1-在线坐诊
amount: number // 可提现金额
hospitalName?: string; // 坐诊医院名称
doctorUserType?: string
[property: string]: any;
}
... ...
... ... @@ -10,7 +10,7 @@ const GlobalData = {
consultationWay: { 10: '快速问诊', 21: '专家图文语音问诊', 22: '专家视频问诊', 23: '专家电话问诊', 'err': '状态码错误' },
isReply: { 0: '否', 1: '是', 'err': '状态码错误' },
paramsOrderState: ['', 20, 30, 40, 50, 50],
orderState: { 10: '待接诊', 20: '待问诊', 30: '问诊中', 40: '问诊结束', 50: '已取消', 'err': '状态码错误' },
orderState: { 10: '待接诊', 20: '待问诊', 30: '问诊中', 40: '问诊结束', 50: '已取消', 60: '已退款', 'err': '状态码错误' },
paramsstate: ['', 0, 1, 2],
state: { 0: '待支付', 1: '待发货', 2: '已发货', 3: '已完成', 4: '已取消', 'err': '状态码错误' },
isSterilization: { 0: '未绝育', 1: '已绝育', 'err': '状态码错误' }, // 是否绝育
... ... @@ -24,7 +24,8 @@ const GlobalData = {
symptom: { 1: '呕吐', 2: '软便拉稀', 3: '皮肤问题', 4: '眼睛问题', 5: '泌尿问题', 6: '绝育', 7: '疫苗', 8: '驱虫', 9: '养护问题', 10: '其他', 'err': '状态码错误' },
renewExamineState: { 0: '待审核', 1: '审核通过', 2: '审核驳回', 6: '审核驳回', 'err': '状态码错误' },
logisticsState: { 0: '待发货', 1: '已发货', 2: '已完成', 3: '已退货', 'err': '暂无' },
account: { 1: '微信', 2: '支付宝', 'err': '状态码错误' }
account: { 1: '微信', 2: '支付宝', 'err': '状态码错误' },
doctorUserType: { '1': '猫猫', '2': '狗狗', '3': '异宠' }
}
export default {
... ...