fix:问题修复
This commit is contained in:
parent
f97c59c7c0
commit
402f60beba
@ -146,7 +146,6 @@ function viewSummary() {
|
||||
}
|
||||
|
||||
.doctor-title {
|
||||
margin-left: 10rpx;
|
||||
color: #999;
|
||||
|
||||
// 长辈模式样式
|
||||
|
||||
@ -9,7 +9,13 @@
|
||||
confirm-type="send"
|
||||
@confirm="send"
|
||||
/>
|
||||
<view v-if="showSend" class="send-button" :class="{ 'send-button--elder': elderMode }" @click="send">发送</view>
|
||||
<view
|
||||
v-if="showSend"
|
||||
class="send-button"
|
||||
:class="{ 'send-button--elder': elderMode }"
|
||||
@touchstart.stop.prevent="sendByTouchStart"
|
||||
@click.stop="sendByClick"
|
||||
>发送</view>
|
||||
<image
|
||||
v-else
|
||||
class="more-tool"
|
||||
@ -83,6 +89,7 @@ onUnmounted(() => {
|
||||
const emits = defineEmits(["sendMessage", "sendImage"]);
|
||||
const showTool = ref(false);
|
||||
const txt = ref("");
|
||||
const lastTouchSendAt = ref(0);
|
||||
const showSend = computed(() => txt.value.trim() !== "");
|
||||
|
||||
function send() {
|
||||
@ -93,6 +100,17 @@ function send() {
|
||||
}
|
||||
}
|
||||
|
||||
function sendByTouchStart() {
|
||||
lastTouchSendAt.value = Date.now();
|
||||
send();
|
||||
}
|
||||
|
||||
function sendByClick() {
|
||||
// 触摸设备通常会在 touchstart 后合成 click,避免同一操作重复发送。
|
||||
if (Date.now() - lastTouchSendAt.value < 500) return;
|
||||
send();
|
||||
}
|
||||
|
||||
function chooseImage(source) {
|
||||
emits("sendImage", source);
|
||||
showTool.value = false;
|
||||
|
||||
@ -91,7 +91,13 @@
|
||||
<text>已在实体医疗机构确诊的疾病</text>
|
||||
</view>
|
||||
<view class="disease-list">
|
||||
<view v-for="disease in order.diseases" :key="disease" class="disease-item">{{ disease }}</view>
|
||||
<view v-for="(disease, index) in order.diseases" :key="disease" class="disease-item">
|
||||
<text>{{ disease }}</text>
|
||||
<view class="disease-remove" :class="{ 'disease-remove--elder': elderMode }"
|
||||
@click.stop="removeDisease(index)">
|
||||
<uni-icons type="closeempty" :color="themeColor" :size="elderMode ? 22 : 16" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="disease-add" @click="toAddDisease()">+ 添加</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -272,6 +278,11 @@ function onDiseaseSelected(disease) {
|
||||
}
|
||||
}
|
||||
|
||||
function removeDisease(index) {
|
||||
if (!Array.isArray(order.value.diseases)) return;
|
||||
order.value.diseases.splice(index, 1);
|
||||
}
|
||||
|
||||
async function checkStock() {
|
||||
loading('获取药品信息...')
|
||||
const { success, message, data } = await checkOnlineDrugInfoStock({
|
||||
@ -628,6 +639,26 @@ onMounted(() => {
|
||||
color: $theme-brown-primary;
|
||||
}
|
||||
|
||||
.disease-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 8rpx;
|
||||
}
|
||||
|
||||
.disease-remove {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
|
||||
.disease-remove--elder {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
}
|
||||
|
||||
.drug-spec--error {
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
@ -56,8 +56,7 @@
|
||||
</view>
|
||||
</full-page>
|
||||
|
||||
<store-popup :drugStore="drugStore" :visible="visible" @confirm="confirmStoreInfo()"
|
||||
@close="visible = false" />
|
||||
<store-popup :drugStore="drugStore" :visible="visible" @confirm="confirmStoreInfo()" @close="visible = false" />
|
||||
<confirm-popup title="提示" content="您是否半年内在医院就诊过?" cancelText="否" confirmText="是" :visible="confirmVisible"
|
||||
@confirm="handleConfirmYes" @cancel="handleConfirmNo" @close="confirmVisible = false" />
|
||||
</template>
|
||||
@ -66,9 +65,7 @@
|
||||
import { ref, onUnmounted } from "vue";
|
||||
import { onLoad, onHide } from "@dcloudio/uni-app";
|
||||
import useUser from "@/hooks/useUser";
|
||||
import { autoAddHlwPatient } from '@/utils/api'
|
||||
import ybPlugin from "@/utils/insurance-plugin";
|
||||
|
||||
import { autoAddHlwPatient, isDoctorOnline } from '@/utils/api'
|
||||
import fullPage from "@/components/full-page.vue";
|
||||
import confirmPopup from "./confirm-popup.vue";
|
||||
import storePopup from "./store-popup.vue";
|
||||
@ -109,7 +106,7 @@ const menuList = [
|
||||
},
|
||||
];
|
||||
|
||||
const { userInfo, logined, login, loginout, getAuthCode, drugStore, getStore, storeId } = useUser();
|
||||
const { userInfo, logined, login, loginout, drugStore, getStore, storeId } = useUser();
|
||||
const statusBarHeight = ref(20);
|
||||
const count = ref({ rxUnpay: 0 });
|
||||
const confirmVisible = ref(false);
|
||||
@ -136,6 +133,7 @@ async function checkLogin() {
|
||||
|
||||
async function handleMainMenuClick(item) {
|
||||
await checkLogin();
|
||||
await checkCanBuy()
|
||||
await autoAddPatient();
|
||||
feeType.value = item.key;
|
||||
confirmVisible.value = true;
|
||||
@ -150,6 +148,7 @@ async function handleConfirmYes() {
|
||||
cleanupConfirmPromise();
|
||||
}
|
||||
}
|
||||
|
||||
function confirmStoreInfo() {
|
||||
visible.value = false
|
||||
confirmAuth();
|
||||
@ -167,10 +166,13 @@ function cleanupConfirmPromise() {
|
||||
confirmResolve.value = null;
|
||||
confirmReject.value = null;
|
||||
}
|
||||
|
||||
async function ybAuth() {
|
||||
const authCode = await getAuthCode("nhsamp");
|
||||
const psnToken = await ybPlugin.getArchiveToken(authCode);
|
||||
async function checkCanBuy() {
|
||||
const res = await isDoctorOnline()
|
||||
if (res.data === true) {
|
||||
return
|
||||
}
|
||||
toast('很抱歉!互联网问诊医生因线下门诊等原因暂时不在线!请稍后再试!')
|
||||
return Promise.reject('no online doctor')
|
||||
}
|
||||
|
||||
async function gotoPage(item) {
|
||||
@ -196,7 +198,6 @@ onLoad((opts) => {
|
||||
}
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
statusBarHeight.value = systemInfo.statusBarHeight || 20;
|
||||
// ybPlugin.init()
|
||||
});
|
||||
|
||||
onHide(() => {
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
</view>
|
||||
<view class="card_footer info-row-end" :class="{ 'card_footer--elder': elderMode }">
|
||||
<view :class="{ 'footer-type--elder': elderMode }">
|
||||
{{ item.consultType == 'onlineMedicinePurchase' ? "在线配药" : "在线复诊" }}
|
||||
{{ item.feeType == 'YB' ? "医保处方" : "自费处方" }}
|
||||
</view>
|
||||
<view v-if="item.showFooter" class="footer-item">
|
||||
<view v-if="item.showRefund" class="import-btn" :class="{ 'import-btn--elder': elderMode }"
|
||||
@ -100,10 +100,10 @@ const list = ref([]);
|
||||
const more = ref(false);
|
||||
const loading = ref(false);
|
||||
// 定义状态栏的选项
|
||||
const tabs = ["全部", "待支付", "处理中", "已结束", "已取消"];
|
||||
const tabs = ["全部", "处理中", "已结束", "已取消"];
|
||||
const tabFilters = [
|
||||
{},
|
||||
{ payStatus: "pending", orderStatus: "pending" },
|
||||
// { payStatus: "pending", orderStatus: "pending" },
|
||||
{
|
||||
payStatus: "success",
|
||||
orderStatuses: ["pending", "processing", "completed"],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user