1.修改选择医生的布局

2.时间已经选择的情况下跳转的时候选对应的
main
刘佳宇 1 year ago
parent 3df36aaf21
commit f6b9497095

@ -361,9 +361,13 @@ onShow(() => {
}
});
const toRouter = (url, status) => {
const toRouter = (url, status, index) => {
if (status) {
console.log(index);
yytjInfo.value.nmrIndex = index;
console.log(yytjInfo.value);
uni.setStorageSync("yytjInfoS", yytjInfo.value);
$store.setYytjInfo(yytjInfo.value);
}
uni.navigateTo({
url: url,
@ -618,13 +622,13 @@ const toRouter = (url, status) => {
更改预约人
</button>
</view>
<view
class="text-24rpx text-#040404 mb-30rpx"
@click="toRouter('/pages/main/yytjsj/yytjsj', 1)"
>
<view class="text-24rpx text-#040404 mb-30rpx">
<view
class="mb-20rpx between"
v-for="(val, index) in yytjInfo?.nmr_list"
@click="
toRouter('/pages/main/yytjsj/yytjsj', 1, val.time ? index : 0)
"
:key="index"
v-if="yytjInfo?.nmr_list?.length"
>
@ -638,7 +642,10 @@ const toRouter = (url, status) => {
val.time ? "重新预约" : "预约时间"
}}</text>
</view>
<view class="mb-20rpx between">
<view
class="mb-20rpx between"
@click="toRouter('/pages/main/yytjsj/yytjsj', 1, 0)"
>
<text>体检医生</text>
<text class="text-30rpx">{{
yytjInfo?.doctor_name || "选择医生"

@ -58,8 +58,9 @@ const getnmrList = async () => {
itemsInfo.value = response.data.items_info;
truePrice.value = response.data.true_price;
currentDate.value = getToday(); //huo
console.log(yytjInfo.value, "cfvghbjnkmljhbgvfcgvhbjnk");
if (!yytjInfo.value?.nmr_list?.length) {
yytjInfo.value.nmrIndex = 0;
yytjInfo.value.nmr_list = response.data.nmr_list.map((val) => {
return {
...val,
@ -74,8 +75,9 @@ const getnmrList = async () => {
id: "",
});
}
console.log(yytjInfo.value.nmr_list[0]);
xmmcClick(yytjInfo.value.nmr_list[0], 0);
nmrIndex.value = yytjInfo.value.nmrIndex;
console.log(yytjInfo.value.nmr_list[nmrIndex.value]);
xmmcClick(yytjInfo.value.nmr_list[nmrIndex.value], nmrIndex.value);
uni.hideLoading();
});
};
@ -508,7 +510,7 @@ onShow(() => {
</view>
</view>
</view>
<view class="center mt-20rpx text-#8B8B8B text-24rpx">
<!-- <view class="center mt-20rpx text-#8B8B8B text-24rpx">
<text>体检医生 - </text>
<text
class="ml-10rpx text-#0E0E0E center mr-auto"
@ -517,7 +519,7 @@ onShow(() => {
{{ yytjInfo?.doctor_name || "请选择" }}
<uni-icons type="right" size="14"></uni-icons>
</text>
</view>
</view> -->
</view>
<view
style="box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.04)"
@ -641,6 +643,16 @@ onShow(() => {
{{ item.time }}
</view>
</view>
<view
class="p-20rpx pl-10rpx pr-10rpx rounded-15rpx between"
@click="clickDoctor"
>
<text>体检医生</text>
<text class="ml-10rpx text-#0E0E0E center">
{{ yytjInfo?.doctor_name || "请选择" }}
<uni-icons type="right" size="14"></uni-icons>
</text>
</view>
</view>
</view>
</view>

Loading…
Cancel
Save