作者 韩昌

改bug 测试unipush2.0

... ... @@ -4,22 +4,19 @@
"version" : "0.0",
"configurations" : [
{
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
"app-plus" : {
"launchtype" : "local"
},
"default" : {
"launchtype" : "local"
},
"mp-weixin" : {
"launchtype" : "local"
},
"type" : "uniCloud"
},
{
"playground" : "custom",
"playground" : "standard",
"type" : "uni-app:app-android"
}
]
... ...
... ... @@ -8,8 +8,8 @@ const aegis = new Aegis({
uni.$aegis = aegis
const config = {
userID: uni.getStorageSync('ImUserId'), //User ID
SDKAppID: 1600011657, //
secretKey: '84d45490e24855304c8ccf7dfa0c4385ea2e3343c0fe50b7805d45933d5efdce' //
SDKAppID: 1600011657, //
secretKey: '84d45490e24855304c8ccf7dfa0c4385ea2e3343c0fe50b7805d45933d5efdce' //
}
const userSig = genTestUserSig(config).userSig
uni.$chat_SDKAppID = config.SDKAppID
... ...
<template>
<u-sticky>
<u-navbar title="问诊中" :autoBack="true" bgColor="#fff" placeholder safeAreaInsetTop :titleStyle="{ color: '#000' }" leftIconColor="#000"></u-navbar>
<view class="imtopinfo flexJ">
<view class="flexA">
<image :src="proxy.$h.downFile(detailData?.doctor?.avatar)" @click="proxy.$h.previewImage(proxy.$h.downFile(detailData?.doctor?.avatar))" class="imtopinfo-avatar" mode="aspectFill" />
<view class="imtopinfo-username">{{ detailData?.doctor?.nickname }}</view>
<u-count-down :time="countdownTime * 1000" format="HH:mm:ss" @finish="finishCountDownHandler"></u-count-down>
<view class="graytext">后结束问诊</view>
<view class="imtopinfo">
<view class="flexJ">
<view class="flexA">
<image :src="proxy.$h.downFile(detailData?.doctor?.avatar)" @click="proxy.$h.previewImage(proxy.$h.downFile(detailData?.doctor?.avatar))" class="imtopinfo-avatar" mode="aspectFill" />
<view class="imtopinfo-username">{{ detailData?.doctor?.nickname }}</view>
<u-count-down :time="countdownTime * 1000" format="HH:mm:ss" @finish="finishCountDownHandler"></u-count-down>
<view class="graytext">后结束问诊</view>
</view>
<!-- <view class="righttext">已结束</view> -->
<up-button type="info" shape="circle" text="结束问诊" throttleTime="1500" @click="getEndInformationHandler" :customStyle="{ width: '146rpx', height: '66rpx', marginRight: '0rpx' }"></up-button>
</view>
<view class="infocard" style="padding: 0; width: 100%">
<view class="flexJ">
<view>
<view class="flexA" style="margin-bottom: 20rpx">
<view class="infocard-username">问诊信息</view>
<view class="blueTag1">{{ proxy.$h.optObjectValue('consultationWay', detailData.consultationWay) || '未设置' }}</view>
</view>
<view class="infocard-infoitem Zindex">
<text class="gray">宠物信息:</text>
{{ detailData?.petName }}/{{ detailData?.petClass || '品种未知' }}/{{ detailData?.age || '年龄未知' }}/ {{ proxy.$h.optObjectValue('petSex', detailData?.petSex) || '性别未知' }}
</view>
</view>
<up-button color="#05B8D2" shape="circle" text="查看详情" throttleTime="1500" plain @click="showUserCardDetailState = true" :customStyle="{ width: '146rpx', height: '66rpx', marginRight: '0rpx' }"></up-button>
</view>
</view>
<!-- <view class="righttext">已结束</view> -->
<up-button type="info" shape="circle" text="结束问诊" throttleTime="1500" @click="getEndInformationHandler" :customStyle="{ width: '146rpx', height: '66rpx', marginRight: '0rpx' }"></up-button>
</view>
</u-sticky>
<!-- #ifdef MP-WEIXIN -->
... ... @@ -22,7 +39,8 @@
<scroll-view class="TUIChat-main" scroll-y="true" :scroll-with-animation="true" :refresher-triggered="triggered" :refresher-enabled="true" @refresherrefresh="handleRefresher" :scroll-top="scrollTop">
<view class="TUI-message-list" @touchstart="handleTouchStart" @click="dialogID = ''">
<!-- 用户信息卡片 -->
<UserInfoCard :detailData="detailData" />
<!-- <UserInfoCard :detailData="detailData" /> -->
<view style="height: 240rpx"></view>
<view class="loading-text" v-if="isCompleted">没有更多</view>
<view v-for="(item, index) in messages" :key="item.ID" :id="'view' + item.ID">
<view class="time-container" v-if="item.showTime">{{ caculateTimeago(item.time * 1000) }}</view>
... ... @@ -78,6 +96,32 @@
<u-modal :show="showPrescriptionDetailState" :title="`处方单详情`" @confirm="showPrescriptionDetailState = false">
<ViewPrescription :orderId="Event.orderId" @click="showPrescriptionDetailState = false" />
</u-modal>
<u-modal :show="showUserCardDetailState" :title="``" :showConfirmButton="false" closeOnClickOverlay @close="showUserCardDetailState = false">
<view class="slot-content" @click="showUserCardDetailState = false">
<view class="text mb24">问诊类型:{{ proxy.$h.optObjectValue('consultationWay', detailData.consultationWay) || '未设置' }}</view>
<view class="text mb24">宠物品种:{{ detailData?.petClass }}</view>
<view class="text mb24">年龄:{{ detailData?.age }}</view>
<view class="text mb24">性别:{{ proxy.$h.optObjectValue('petSex', detailData?.petSex) || '性别未知' }}</view>
<view class="text mb24">是否绝育:{{ proxy.$h.optObjectValue('isSterilization', detailData?.isSterilization) || '未知' }}</view>
<view class="text mb24">体重:{{ detailData?.weight ? detailData?.weight + 'kg' : '体重未知' }}</view>
<view class="text mb24">免疫情况:{{ proxy.$h.optObjectValue('immuneStatus', detailData?.immuneStatus, 4) }}</view>
<view class="text mb24">洗澡频率:{{ proxy.$h.optObjectValue('batheFrequency', detailData?.batheFrequency, 2) }}</view>
<view class="text mb24">饲料类型:{{ proxy.$h.optObjectValue('feedType', detailData?.feedType, 1) }}</view>
<view class="text mb24">
症状类型:
<template v-if="![null, '', undefined].includes(detailData?.symptom)">
<template v-for="(_, index) in detailData?.symptom.split(',')">{{ proxy.$h.optObjectValue('symptom', _) || '' }}{{ index !== (detailData?.symptom.split(',').length as number) - 1 ? ',' : '' }}</template>
</template>
</view>
<view class="text mb24">症状描述: {{ detailData.supplement }}</view>
<view class="text mb24">
症状照片:
<view class="flexW" v-if="detailData?.image?.length">
<image v-for="_ in detailData.image?.split(',')" :src="proxy.$h.downFile(_)" class="infocard-itemimg" mode="aspectFill" @click.stop="proxy.$h.previewImage(proxy.$h.downFile(_))" />
</view>
</view>
</view>
</u-modal>
</template>
<script lang="ts">
... ... @@ -158,7 +202,8 @@ export default defineComponent({
Event: {} as DiaLogEventType,
detailData: {} as Consultation_information_detailType,
countdownTime: 300,
end: false
end: false,
showUserCardDetailState: false
})
// 判断当前会话类型:无/系统会话/正常C2C、群聊
... ... @@ -480,4 +525,36 @@ page {
margin-bottom: 46rpx;
}
@import '../styles/TUIChat.scss';
.mb24 {
margin-bottom: 24rpx;
}
.text {
color: #323233;
font-size: 28rpx;
font-weight: 700;
}
.blacktext {
color: #323233;
font-size: 30rpx;
font-weight: 700;
}
.graytext {
color: #999999;
font-size: 24rpx;
font-weight: 700;
}
.list {
width: 460rpx;
box-sizing: border-box;
padding: 34rpx 28rpx;
background: #f8f8fa;
margin-bottom: 32rpx;
}
.zmimg {
width: 210rpx;
height: 210rpx;
border-radius: 24rpx;
margin-right: 16rpx;
}
</style>
... ...
... ... @@ -7,27 +7,27 @@
padding-top: 8px;
display: flex;
flex-direction: column;
position: fixed;
right: 0;
left: 0;
bottom: 0;
background: #F4F5F7;
position: fixed;
right: 0;
left: 0;
bottom: 0;
background: #f4f5f7;
.more-btn {
position: absolute;
top: 70px;
right: 0;
width: 50px;
height: 30px;
line-height: 30px;
background-color: rgba(0,0,0,0.5);
color: #ffffff;
font-size: 10px;
border-top-left-radius:20px;
border-bottom-left-radius: 20px;
padding-left: 15px;
z-index: 9999;
}
&-header {
position: absolute;
top: 70px;
right: 0;
width: 50px;
height: 30px;
line-height: 30px;
background-color: rgba(0, 0, 0, 0.5);
color: #ffffff;
font-size: 10px;
border-top-left-radius: 20px;
border-bottom-left-radius: 20px;
padding-left: 15px;
z-index: 9999;
}
&-header {
padding: 20px;
display: flex;
justify-content: space-between;
... ... @@ -41,7 +41,7 @@
line-height: 24px;
}
}
.TUIChat-setting{
.TUIChat-setting {
position: absolute;
background: #ffffff;
right: 0;
... ... @@ -49,26 +49,26 @@
z-index: 2;
top: 40px;
}
&-container {
flex: 1;
width: 100%;
overflow-y: scroll;
}
&-container {
flex: 1;
width: 100%;
overflow-y: scroll;
}
&-main {
height: 100%;
position: relative;
width: 100%;
width: 100%;
}
&-footer {
min-height: 60px;
position: fixed;
right: 0;
left: 0;
bottom: 0;
position: fixed;
right: 0;
left: 0;
bottom: 0;
display: flex;
flex-direction: column;
border-top: 1px solid #F4F5F9;
background-color: aliceblue;
border-top: 1px solid #f4f5f9;
background-color: aliceblue;
.input {
flex: 1;
position: relative;
... ... @@ -83,7 +83,7 @@
background: no-repeat;
&:focus {
outline: none;
border: none;
border: none;
}
}
p {
... ... @@ -94,13 +94,13 @@
position: absolute;
bottom: 20px;
right: 20px;
background: #006EFF;
background: #006eff;
padding: 8px 20px;
border-radius: 4px;
border: none;
font-weight: 400;
font-size: 14px;
color: #FFFFFF;
color: #ffffff;
letter-spacing: 0;
text-align: center;
line-height: 20px;
... ... @@ -117,41 +117,41 @@
position: absolute;
width: 100%;
height: 100%;
background: #FBFBFB;
background: #fbfbfb;
}
}
}
.TUI-message-list {
overflow: hidden;
// min-width: 600px;
/* #ifdef H5 */
margin-top: 60px; // H5
/* #endif */
.message-more {
/* #ifdef H5 */
margin-top: 60px; // H5
/* #endif */
.message-more {
text-align: center;
color: #999999;
cursor: pointer;
}
.loading-text {
text-align: center;
font-size: 14px;
line-height: 28px;
}
.loading-icon {
width: 22px;
height: 22px;
display: block;
margin: 5px auto 0;
}
.loading-text {
text-align: center;
font-size: 14px;
line-height: 28px;
}
.loading-icon {
width: 22px;
height: 22px;
display: block;
margin: 5px auto 0;
}
li {
display: flex;
position: relative;
padding:0 20px 30px;
padding: 0 20px 30px;
.message-label {
max-width: 50px;
}
}
.right{
.right {
flex-direction: row-reverse;
justify-content: flex-start;
}
... ... @@ -162,20 +162,20 @@
z-index: 5;
width: 120px;
height: 60px;
background: #FFFFFF;
top: -70px;
border-radius: 5px;
right: 0;
box-shadow: 0 0 10px 0 rgba(0,0,0,0.21);
background: #ffffff;
top: -70px;
border-radius: 5px;
right: 0;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.21);
&-item {
p {
padding: 4px 16px;
font-weight: 400;
font-size: 12px;
color: #4F4F4F;
color: #4f4f4f;
line-height: 17px;
&:hover {
background: rgba(0,110,255,0.10);
background: rgba(0, 110, 255, 0.1);
}
}
}
... ... @@ -192,7 +192,7 @@
padding: 0;
width: 100%;
height: 100%;
background: rgba( #000000, 0.3);
background: rgba(#000000, 0.3);
display: flex;
justify-content: flex-end;
.userInfo-main {
... ... @@ -264,11 +264,11 @@
height: 100vh;
top: 0;
left: 0;
background: rgba( #000000, 0.3);
background: rgba(#000000, 0.3);
header {
display: flex;
justify-content: flex-end;
background: rgba(0,0,0,0.49);
background: rgba(0, 0, 0, 0.49);
position: absolute;
width: 100%;
box-sizing: border-box;
... ... @@ -284,7 +284,7 @@
border: none;
font-weight: 400;
font-size: 14px;
color: #FFFFFF;
color: #ffffff;
letter-spacing: 0;
text-align: center;
line-height: 20px;
... ... @@ -293,30 +293,30 @@
color: #666666;
}
&-default {
background: #006EFF;
border: 1px solid #006EFF;
background: #006eff;
border: 1px solid #006eff;
}
&:disabled {
opacity: 0.3;
}
}
.time-container {
text-align: center;
font-size: 12px;
color: #BBBBBB;
font-family: PingFangSC-Regular;
font-weight: 400;
color: #BBBBBB;
letter-spacing: 0;
text-align: center;
height: 33rpx;
margin: 10px;
text-align: center;
font-size: 12px;
color: #bbbbbb;
font-family: PingFangSC-Regular;
font-weight: 400;
color: #bbbbbb;
letter-spacing: 0;
text-align: center;
height: 33rpx;
margin: 10px;
}
.toggleMask {
&::before {
position: fixed;
z-index: 1;
content: "";
content: '';
width: 100vw;
height: 100vh;
top: 0;
... ... @@ -325,75 +325,73 @@
}
}
.main1{
.main1 {
max-height: 65vh;
overflow: auto;
box-sizing: border-box;
padding: 40rpx 32rpx;
&-title{
&-title {
color: #323233;
font-size: 30rpx;
font-weight: 700;
margin-bottom: 24rpx;
}
.formSubTitle {
margin-bottom: 46rpx;
color: #666666;
font-size: 24rpx;
}
.fileImg {
position: relative;
.fileimage {
width: 210rpx;
height: 210rpx;
border-radius: 24rpx;
margin-right: 24rpx;
margin-bottom: 46rpx;
color: #666666;
font-size: 24rpx;
}
.fileimage:nth-child(3n) {
margin-right: 0 !important;
.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%;
}
}
.close {
position: absolute;
top: 12rpx;
right: 12rpx;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
.uploadImg {
box-sizing: border-box;
padding: 68rpx 60rpx 60rpx;
border-radius: 24rpx;
border: 2rpx dashed #cbcbcb;
color: #999999;
font-size: 22rpx;
font-weight: 700;
image {
width: 48rpx;
height: 48rpx;
margin-bottom: 4rpx;
}
}
}
.uploadImg {
box-sizing: border-box;
padding: 68rpx 60rpx 60rpx;
border-radius: 24rpx;
border: 2rpx 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;
margin-top: -40rpx;
}
}
.formTitle {
color: #323233;
font-size: 30rpx;
font-weight: 700;
box-sizing: border-box;
padding: 30rpx 0;
margin-top: -40rpx;
.remark {
box-sizing: border-box;
padding: 32rpx;
font-size: 26rpx;
color: #666666;
}
}
.remark {
box-sizing: border-box;
padding: 32rpx;
font-size: 26rpx;
color: #666666;
}
}
.grayinput {
width: 308rpx;
box-sizing: border-box;
... ... @@ -435,7 +433,7 @@ border: 2rpx dashed #CBCBCB;
}
}
.imtopinfo {
background: #fff;
background: linear-gradient(180deg, #e1fbff 7.34%, #fff 26.76%);
box-sizing: border-box;
padding: 20rpx 24rpx;
.righttext {
... ... @@ -460,3 +458,59 @@ border: 2rpx dashed #CBCBCB;
margin-right: 16rpx;
}
}
.infocard {
margin: 0 auto;
box-sizing: border-box;
padding: 28rpx 24rpx 38rpx;
width: 94%;
background: #fff;
border-radius: 0 0 24rpx 24rpx;
position: relative;
&-itemimg {
width: 120rpx;
height: 120rpx;
margin-right: 12rpx;
border-radius: 12rpx;
}
&-infoitem {
margin-bottom: 16rpx;
color: #323233;
font-size: 26rpx;
font-weight: 700;
align-items: flex-start;
.gray {
color: #666666;
font-size: 26rpx;
font-weight: 700;
}
}
.blueTag1 {
padding: 2rpx 12rpx;
box-sizing: border-box;
border-radius: 8rpx;
border: 1rpx solid #05b8d2;
color: #05b8d2;
font-size: 22rpx;
font-weight: 700;
}
&-bg {
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 448rpx;
}
&-avatar {
width: 92rpx;
height: 92rpx;
margin-right: 16rpx;
border-radius: 50%;
}
&-username {
color: #323233;
font-size: 30rpx;
font-weight: 700;
margin-right: 16rpx;
}
}
... ...
... ... @@ -102,7 +102,7 @@
</up-col>
</up-row>
</view>
<button @click="viewtoken">666</button>
<!-- <button @click="viewtoken">666</button> -->
<view class="index-numCard">
<view class="flexJ" style="margin-bottom: 46rpx">
... ... @@ -197,23 +197,57 @@ function viewtoken() {
// showCancel: true,
// success: ({ confirm, cancel }) => {}
// })
// #ifdef APP-PLUS
// 获取cid信息
uni.getPushClientId({
success: res => {
console.log(res)
console.log(res.cid)
uniCloud
.callFunction({
name: 'push', // 你的云函数名称
data: {
title: '测试一下',
alias: res.cid,
content: '测试内容',
payload: {
text: '体验一下uni-push2.0'
}
}
})
.then(res => {
console.log(res, 'callFunction res')
})
.catch(err => {
console.log(err, 'callFunction err')
// 处理错误
})
}
})
// 监听消息推送
uni.onPushMessage(res => {
console.log(res)
console.log('收到推送消息', res)
const { data } = res
// 创建通知栏消息,并监听到推送时显示
if (res.type === 'receive') {
uni.createPushMessage({
title: data.payload.title,
content: data.payload.content,
payload: data.payload,
// sound: "system",
cover: false
})
} else if (res.type === 'click') {
// click 点击状态栏的消息时,进行跳转页面
console.log(res)
uni.navigateTo({
url: '/pages2/order/index?orderState=0&subOrderState=1'
})
}
})
uniCloud
.callFunction({
name: 'push', // 你的云函数名称
data: {
title: '接口都是结案率'
}
})
.then(res => {
console.log(res, 'callFunction res')
})
.catch(err => {
console.log(err, 'callFunction err')
// 处理错误
})
// uni.onPushMessage(pushMessageCallback)
// #endif
}
const getIndexDataHandler = async () => {
... ... @@ -239,7 +273,7 @@ const getIndexDataHandler = async () => {
const { result: PJ }: { result: getPingJiaRemarkType } = await getPingJiaRemark()
evaluateContent.value = ![null, undefined].includes(PJ.content) ? PJ.content : '<div style="font-size: 14px; color: #666666">暂无评价</div>'
evaluateContent.value = ![null, undefined, ''].includes(PJ.content) ? PJ.content : '<div style="font-size: 14px; color: #666666">暂无评价</div>'
}
const clickAuthHandler = () => proxy.$h.jumpUrl(authState.value === 0 ? `/pages2/auth/step` : `/pages2/auth/audit?authState=${authState.value}&title=${authState.value === 20 ? '认证成功' : ''}&examineStateFailReason=${IndexData.value?.examineStateFailReason}`)
... ...
<template>
<u-navbar title="处方详情" :autoBack="true" bgColor="#0cb9d3" placeholder safeAreaInsetTop :titleStyle="{ color: '#ffffff00' }" leftIconColor="#fff" leftIcon="close"></u-navbar>
<Prescription :PrescriptionDetail="PrescriptionDetail" :isRenew="Event.isRenew" />
<Prescription :PrescriptionDetail="PrescriptionDetail" :isRenew="Event.isRenew" :order="Event.order" />
<!-- 录入快递单号 待发货 -->
<view class="fixed-bottom" v-if="[null, undefined, ''].includes(PrescriptionDetail?.expressNo as string)&&[1,'1',2,'2'].includes(PrescriptionDetail?.formOrderState)">
<view class="form-btns">
... ... @@ -35,6 +35,7 @@ interface EventType {
isShowUpload?: string
isRenew?: string
orderRenewId?: string
order?: string
}
const { proxy } = getCurrentInstance() as { proxy: ComponentPublicInstance }
... ...
... ... @@ -21,7 +21,7 @@
<!-- 蓝猫/2岁/女绝/育/1kg -->
{{ props.item?.petName || '姓名未知' }}/{{ 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?.weight ? props.item?.weight + 'kg' : '未知体重' }}
</view>
<view class="repeatPay flexC" v-if="props.item?.isAgainInformation === 1">复诊</view>
<view class="repeatPay flexC" v-if="props.item?.isAgain === 1">续方</view>
... ... @@ -76,7 +76,7 @@
text="上传单号"
throttleTime="1500"
:customStyle="{ width: '170rpx', marginRight: '20rpx' }"
@click="proxy.$h.jumpUrl(`/pages2/order/PrescriptionDetail?id=${props.item.id}&isShowUpload=success&orderRenewId=${props.item.orderRenewId}&isRenew=${props.item?.isAgain == 1 ? 'success' : 'err'}`)"
@click="proxy.$h.jumpUrl(`/pages2/order/PrescriptionDetail?id=${props.item.id}&isShowUpload=success&orderRenewId=${props.item.orderRenewId}&isRenew=${props.item?.isAgain == 1 ? 'success' : 'err'}&order=Prescription`)"
></up-button>
<up-button type="info" shape="circle" text="查看详情" throttleTime="1500" :customStyle="{ width: '170rpx', marginRight: '20rpx' }" @click="clickOrderItemHandler"></up-button>
</view>
... ... @@ -191,7 +191,9 @@ const clickOrderItemHandler = () => {
const orderRenewId = props.item?.orderRenewId
const url = { 0: `/pages2/order/symptomDetail?id=${props.item.id}`, 1: `/pages2/order/PrescriptionDetail?id=${props.item.id}&orderRenewId=${orderRenewId}&isRenew=${isAgain}` }
const order = 'Prescription'
const url = { 0: `/pages2/order/symptomDetail?id=${props.item.id}`, 1: `/pages2/order/PrescriptionDetail?id=${props.item.id}&orderRenewId=${orderRenewId}&isRenew=${isAgain}&order=${order}` }
proxy.$h.jumpUrl(url[orderState.value])
}
... ...
<template>
<view class="flexA topbg" v-if="props.showTopState">
<image src="/static/images/pic.png" mode="scaleToFill" />
{{ props.isRenew }}
<view>{{ proxy.$h.optObjectValue(props.isRenew === 'success' ? 'renewExamineState' : 'state', PrescriptionDetail?.state) }}</view>
<view>{{ proxy.$h.optObjectValue(props.order === 'Prescription' ? 'state' : 'renewExamineState', props.order === 'Prescription' ? PrescriptionDetail?.formOrderState : PrescriptionDetail?.state) }}</view>
</view>
<view class="Prescription">
<view class="Prescription-title flexC" v-if="props.title">{{ props.title }}</view>
... ... @@ -39,46 +38,30 @@
<view class="text">总金额</view>
<view class="blacktext">¥{{ amount }}</view>
</view>
<!-- 待支付 待发货 -->
<template v-if="false">
<!-- <view class="flexJ mb24">
<view class="text">运费</view>
<view class="blacktext">¥00.00</view>
</view> -->
<view class="flexJ mb24">
<view class="text">复诊时间</view>
<view class="graytext">{{ PrescriptionDetail?.createTime }}</view>
</view>
<view class="flexJ mb24">
<view class="text">开具时间</view>
<view class="graytext">{{ PrescriptionDetail?.prescriptionFormDate }}</view>
</view>
</template>
<!-- 已发货 -->
<template v-if="true">
<!-- <view class="flexJ mb24">
<!-- <view class="flexJ mb24">
<view class="text">运费</view>
<view class="blacktext">¥0</view>
</view> -->
<view class="flexJ mb24">
<view class="text">复诊时间</view>
<view class="graytext">{{ PrescriptionDetail?.createTime }}</view>
</view>
<view class="flexJ mb24">
<view class="text">开具时间</view>
<view class="graytext">{{ PrescriptionDetail?.prescriptionFormDate }}</view>
</view>
<template v-if="props.showStep !== 'err' && ![0, '0', 4, '4'].includes(PrescriptionDetail?.formOrderState)">
<view class="flexJ mb24">
<view class="text">复诊时间</view>
<view class="graytext">{{ PrescriptionDetail?.createTime }}</view>
</view>
<view class="flexJ mb24">
<view class="text">开具时间</view>
<view class="graytext">{{ PrescriptionDetail?.prescriptionFormDate }}</view>
</view>
<view class="flexJ mb24" v-if="props.showStep !== 'err'">
<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(PrescriptionDetail?.expressNo)">复制</text>
</view>
</view>
<view class="flexJ mb24" v-if="props.showStep !== 'err'">
<view class="flexJ mb24">
<view class="text">物流状态</view>
<view class="graytext">{{ proxy.$h.optObjectValue('logisticsState', props.PrescriptionDetail?.state) }}</view>
<view class="graytext">{{ proxy.$h.optObjectValue('state', props.PrescriptionDetail?.formOrderState) }}</view>
</view>
</template>
</view>
... ... @@ -96,12 +79,14 @@ interface IProps {
isRenew: string
showTopState: boolean
showStep?: string
order?: string
}
const props = withDefaults(defineProps<IProps>(), {
bg: '#fff',
isRenew: 'err',
showTopState: true,
showStep: 'success'
showStep: 'success',
order: 'xf'
})
const amount = computed(() => {
... ...
... ... @@ -18,9 +18,9 @@
<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.petName || '未知姓名' }}/{{ props.item?.age || '未知' }}/ {{ proxy.$h.optObjectValue('petSex', props.item?.petSex) || '未知' }} /
{{ proxy.$h.optObjectValue('isSterilization', props.item?.isSterilization) || '未知' }}/
{{ props.item?.weight ? props.item?.weight + 'kg' : '体重未知' }}
</view>
<!-- <view class="repeatPay flexC" v-if="props.item?.isAgain === 1">复购</view> -->
</view>
... ... @@ -32,7 +32,7 @@
<view class="moneytext flexD" v-if="!props.isPrescriptionDrug && !props.isRecord">¥{{ props.item?.award || 0 }}/预计收入</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>
<!-- <up-button type="info" @click="clickOrderItemHandler" plain shape="circle" text="查看" throttleTime="1500" :customStyle="{ width: '170rpx', marginRight: '20rpx', fontWeight: 700 }"></up-button> -->
<up-button
v-if="['0', 0].includes(props.item?.renewExamineState as number)"
color="#05B8D2"
... ... @@ -158,9 +158,9 @@ const confirmSubmitExamineHandler = async () => {
}
const clickOrderItemHandler = () => {
const renewExamineState = props.item?.renewExamineState as string | number
const isRenew = [0, '0', 2, '2'].includes(renewExamineState) ? 'err' : 'success'
proxy.$h.jumpUrl(`/pages2/order/PrescriptionDetail?isRenew=success&orderRenewId=${props.item?.orderRenewId}`)
// const renewExamineState = props.item?.renewExamineState as string | number
// const isRenew = [0, '0', 2, '2'].includes(renewExamineState) ? 'err' : 'success'
// proxy.$h.jumpUrl(`/pages2/order/PrescriptionDetail?isRenew=success&orderRenewId=${props.item?.orderRenewId}`)
}
</script>
... ...
... ... @@ -15,7 +15,7 @@
<view class="symptom-cla">
{{ detailData?.petName }} /{{ detailData?.petClass || '品种未知' }}/{{ detailData?.age || '年龄未知' }}/ {{ proxy.$h.optObjectValue('petSex', detailData?.petSex) || '性别未知' }} /
{{ proxy.$h.optObjectValue('isSterilization', detailData?.isSterilization) || '未知' }}/{{ detailData?.weight + 'kg' || '体重未知' }}
{{ proxy.$h.optObjectValue('isSterilization', detailData?.isSterilization) || '未知' }}/{{ detailData?.weight ? detailData?.weight + 'kg' : '体重未知' }}
</view>
<view class="symptom-graytext">{{ detailData?.time || '' }}</view>
</view>
... ... @@ -27,7 +27,6 @@
</view>
<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>
... ... @@ -57,8 +56,8 @@
</view> -->
</view>
<view style="height: 200rpx"></view>
<view class="fixed-bottom" v-if="[30, '30', 20, '20'].includes(detailData?.orderState)">
<!-- <view> -->
<!-- <view class="fixed-bottom" v-if="[30, '30', 20, '20'].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="[20, '20'].includes(detailData?.orderState) ? '接诊' : '继续接诊'" throttleTime="1500" @click="AcceptHandler"></up-button>
... ...
'use strict'
// 简单的使用示例
'use strict';
const uniPush = uniCloud.getPushManager({appId:"__UNI__AB7B27B"}) //注意这里需要传入你的应用appId
exports.main = async (event, context) => {
//event为客户端上传的参数
let params = event.queryStringParameters
console.log('event : ', event, context, 'context', params, 'event.queryStringParameters')
const ret = await uniPush.sendMessage({
title: '测试一下'
})
//返回数据给客户端
return ret
}
console.log(event, '云函数event')
const data = event
return await uniPush.sendMessage({
"getui_alias": data.alias, // 使用别名推送
"title": data.title,
"content": data.content,
// "force_notification": true, // 服务端推送
// "request_id": event.requestId, // 请求唯一标识号
"payload": data.payload,
"badge": 0
})
}
\ No newline at end of file
... ...
... ... @@ -2,6 +2,7 @@
"name": "push",
"dependencies": {},
"extensions": {
"uni-cloud-push": {},
"uni-cloud-jql": {}
}
}
\ No newline at end of file
... ...
'use strict';
exports.main = async (event, context) => {
//event为客户端上传的参数
console.log('event : ', event)
//返回数据给客户端
return event
};
{
"name": "testa",
"dependencies": {},
"extensions": {
"uni-cloud-jql": {}
}
}
\ No newline at end of file