提交 287b01fc 编写于 作者: 张敬贤's avatar 张敬贤

save

上级 b47ee046
...@@ -29,6 +29,11 @@ const routerConfig = [ ...@@ -29,6 +29,11 @@ const routerConfig = [
name: 'appoint', name: 'appoint',
component: () => import('@/views/appoint/index.vue'), component: () => import('@/views/appoint/index.vue'),
}, },
{
path: '/appoint-details',
name: 'appointDetails',
component: () => import('@/views/appointDetails/index.vue'),
},
]; ];
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
class="detail-top-info" class="detail-top-info"
:class="detailInfo.status == 5 ? 'grey' : ''" :class="detailInfo.status == 5 ? 'grey' : ''"
> >
<image <img
class="detail-top-img" class="detail-top-img"
:src=" :src="
detailInfo.status == 5 detailInfo.status == 5
? 'https://files.yunqueyi.com/image/png/common/20221229163136934.png' ? 'https://files.yunqueyi.com/image/png/common/20221229163136934.png'
: 'https://files.yunqueyi.com/image/png/common/20220816120131913.png' : 'https://files.yunqueyi.com/image/png/common/20220816120131913.png'
" "
/> >
<div class="detail-top-time"> <div class="detail-top-time">
{{ detailInfo.appointmentTimeStr || "--" }} {{ detailInfo.appointmentTimeStr || "--" }}
</div> </div>
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
class="detail-top-address-navigation" class="detail-top-address-navigation"
@click="navigation" @click="navigation"
> >
<image <img
class="navigation-img" class="navigation-img"
src="https://files.yunqueyi.com/image/png/common/20221220105602921.png" src="https://files.yunqueyi.com/image/png/common/20221220105602921.png"
/> >
<div class="navigation-text"> <div class="navigation-text">
导航 导航
</div> </div>
...@@ -100,21 +100,18 @@ ...@@ -100,21 +100,18 @@
</div> </div>
</div> </div>
<div <div
v-if="detailInfo.status == 1"
class="detail-btn" class="detail-btn"
@click="bindingCode" @click="bindingCode"
> >
绑定采样条形码 绑定采样条形码
</div> </div>
<div <!-- <div
v-if="detailInfo.status == 2 || detailInfo.status == 3"
class="detail-btn" class="detail-btn"
@click="checkDetail" @click="checkDetail"
> >
查看详情 查看详情
</div> </div> -->
<div <div
v-if="detailInfo.status == 1 || detailInfo.status == 5"
class="detail-btn btn-empty" class="detail-btn btn-empty"
@click="reAppoint" @click="reAppoint"
> >
...@@ -129,10 +126,7 @@ ...@@ -129,10 +126,7 @@
</template> </template>
<script> <script>
import { getDetailByUnionId } from './api';
import { mapActions, mapGetters } from 'vuex'; import { mapActions, mapGetters } from 'vuex';
import { baseUrl } from '@/service/getBaseUrl';
let that;
export default { export default {
data() { data() {
return { return {
...@@ -151,100 +145,47 @@ export default { ...@@ -151,100 +145,47 @@ export default {
computed: { computed: {
...mapGetters(['hasAccount']), ...mapGetters(['hasAccount']),
}, },
onLoad(opt) {
console.log('--onLoad', opt); onShow() {
if (opt && opt.userId) {
uni.setStorageSync('userId_mx', opt.userId);
}
},
onShow(opt) {
console.log('--onShow', opt);
const userId_mx = uni.getStorageSync('userId_mx');
const unionId = uni.getStorageSync('unionId');
const nickname = uni.getStorageSync('nickName');
const mobile = uni.getStorageSync('mobile');
console.log('---userId_mx----', opt, userId_mx);
console.log('---mobile----', mobile);
console.log('---nickName----', nickname);
console.log('---unionId----', unionId);
that = this;
if (unionId && nickname && mobile) {
console.log('login');
this.getDetailByUnionId();
this.validateShow();
} else {
uni.navigateTo({
url: `/pages/login?redirectUrl=pagesUserCenter/insurance/insurance-detection-detail&isTabBar=${false}&isBack=1`,
});
}
}, },
methods: { methods: {
...mapActions(['setDetectionData', 'setAccountStatus', 'setPatientData', 'setRecordID']), ...mapActions(['setDetectionData', 'setAccountStatus', 'setPatientData', 'setRecordID']),
getDetailByUnionId() { // getDetailByUnionId() {
getDetailByUnionId((res) => { // getDetailByUnionId((res) => {
console.log('getDetailByUnionId--', res); // console.log('getDetailByUnionId--', res);
if (res.code === '000000') { // if (res.code === '000000') {
this.detailInfo = res.data; // this.detailInfo = res.data;
const detectionServiceRecord = res.data.detectionServiceRecord; // const detectionServiceRecord = res.data.detectionServiceRecord;
this.setDetectionData({ // this.setDetectionData({
checkList: false, // checkList: false,
projectId: detectionServiceRecord.businessCategoryId, // projectId: detectionServiceRecord.businessCategoryId,
...detectionServiceRecord, // ...detectionServiceRecord,
}); // });
this.setRecordID(detectionServiceRecord.id); // this.setRecordID(detectionServiceRecord.id);
this.setPatientData({ patientId: detectionServiceRecord.patientId }); // this.setPatientData({ patientId: detectionServiceRecord.patientId });
} // }
}); // });
}, // },
// 导航 // 导航
navigation() { navigation() {
const addressInfo = {
address: this.detailInfo.hospitalAddress,
latitude: this.detailInfo.latitude,
longitude: this.detailInfo.longitude,
name: this.detailInfo.hospitalName,
};
uni.openLocation(addressInfo);
}, },
checkDetail() { checkDetail() {
if (this.detailInfo.detectionServiceRecord) {
uni.navigateTo({
url: `/pages/health/detection-detail/index?id=${this.detailInfo.detectionServiceRecord.id}&status=${this.detailInfo.status}`,
});
}
}, },
reAppoint() { reAppoint() {
console.log('-reAppoint');
if (this.detailInfo.detectionServiceRecord) {
uni.navigateTo({
url: `/pagesUserCenter/insurance/insurance-detection-appoint?goodsId=${this.detailInfo.detectionServiceRecord.goodsId}&detectName=${this.detailInfo.detectName}`,
});
}
}, },
bindingCode() { bindingCode() {
if (this.detailInfo.detectionServiceRecord) {
uni.navigateTo({
url: `/pages/health/binding-code/index?id=${this.detailInfo.detectionServiceRecord.id}`,
});
}
}, },
// 复制快递单号 // 复制快递单号
copyNum() { copyNum() {
console.log(this.detailInfo.recordNo); console.log(this.detailInfo.recordNo);
uni.setClipboardData({
data: this.detailInfo.recordNo,
success: function () {
console.log('success');
// that.$toast("复制成功");
},
fail: function () {
that.$toast('复制失败');
},
});
}, },
validateShow() { validateShow() {
const unionId = uni.getStorageSync('unionId');
this.setAccountStatus({ baseUrl, unionId });
}, },
}, },
}; };
...@@ -256,43 +197,43 @@ export default { ...@@ -256,43 +197,43 @@ export default {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
box-sizing: border-box; box-sizing: border-box;
padding: 26rpx 24rpx; padding: 13px 12px;
background: #f5f6f8; background: #f5f6f8;
padding-bottom: 240rpx; padding-bottom: 120px;
.detail-top { .detail-top {
padding: 30rpx; padding: 15px;
background: #ffffff; background: #ffffff;
border-radius: 15px; border-radius: 15px;
margin-bottom: 20rpx; margin-bottom: 10px;
} }
.detail-top-info { .detail-top-info {
position: relative; position: relative;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding-left: 52rpx; padding-left: 26px;
margin-bottom: 26rpx; margin-bottom: 13px;
.detail-top-img { .detail-top-img {
position: absolute; position: absolute;
width: 42rpx; width: 21px;
height: 42rpx; height: 21px;
left: 0; left: 0;
top: 4rpx; top: 2px;
} }
.detail-top-time { .detail-top-time {
height: 50rpx; height: 25px;
font-size: 36rpx; font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #000000; color: #000000;
line-height: 50rpx; line-height: 25px;
} }
.detail-top-status { .detail-top-status {
height: 50rpx; height: 25px;
font-size: 36rpx; font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #04bda4; color: #04bda4;
line-height: 50rpx; line-height: 25px;
} }
} }
.grey { .grey {
...@@ -307,85 +248,84 @@ export default { ...@@ -307,85 +248,84 @@ export default {
position: relative; position: relative;
background: linear-gradient(117deg, #f6fffc 0%, #effefb 100%); background: linear-gradient(117deg, #f6fffc 0%, #effefb 100%);
border-radius: 11px; border-radius: 11px;
padding: 29rpx 105rpx 37rpx 24rpx; padding: 15px 52px 18px 12px;
.detail-top-address-name { .detail-top-address-name {
height: 42rpx; height:21px;
width: 513rpx; width: 257px;
font-size: 28rpx; font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #212121; color: #212121;
line-height: 42rpx; line-height: 21px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.detail-top-address-info { .detail-top-address-info {
height: 33rpx; height: 16px;
font-size: 24rpx; font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #9f9f9f; color: #9f9f9f;
line-height: 33rpx; line-height: 16px;
} }
.detail-top-address-navigation { .detail-top-address-navigation {
position: absolute; position: absolute;
top: 27rpx; top: 13px;
right: 12px;
right: 24rpx;
.navigation-img { .navigation-img {
width: 56rpx; width: 28px;
height: 56rpx; height: 28px;
margin-bottom: 8rpx; margin-bottom: 4px;
} }
.navigation-text { .navigation-text {
height: 24rpx; height: 12px;
font-size: 24rpx; font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #212121; color: #212121;
line-height: 24rpx; line-height: 12px;
} }
} }
} }
.detail-bottom { .detail-bottom {
background: #ffffff; background: #ffffff;
width: 100%; width: calc(100% - 30px);
border-radius: 15px; border-radius: 15px;
padding: 30rpx 30rpx 2rpx 30rpx; padding: 15px 15px 1px 15px;
margin-bottom: 134rpx; margin-bottom: 67px;
.detail-bottom-item { .detail-bottom-item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
height: 40rpx; height: 20px;
margin-bottom: 28rpx; margin-bottom: 14px;
.title { .title {
height: 40rpx; height: 20px;
font-size: 28rpx; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
line-height: 40rpx; line-height: 20px;
} }
.value { .value {
height: 40rpx; height: 20px;
font-size: 28rpx; font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #212121; color: #212121;
line-height: 40rpx; line-height: 20px;
.value-copy { .value-copy {
margin-left: 8rpx; margin-left: 4px;
color: #1677fe; color: #1677fe;
} }
} }
} }
.tips { .tips {
font-size: 28rpx; font-size: 14px;
background: #f9fafb; background: #f9fafb;
border-radius: 22rpx; border-radius: 11px;
padding: 10rpx 30rpx; padding: 5px 15px;
margin-bottom: 28rpx; margin-bottom: 14px;
.tip-org { .tip-org {
color: #ff720c; color: #ff720c;
} }
...@@ -396,29 +336,29 @@ export default { ...@@ -396,29 +336,29 @@ export default {
} }
} }
.detail-btn { .detail-btn {
width: 690rpx; width: 345px;
height: 80rpx; height: 40px;
background: #00bda5; background: #00bda5;
border-radius: 50rpx; border-radius: 25px;
margin: 0 auto; margin: 0 auto;
font-size: 32rpx; font-size: 16px;
font-weight: 800; font-weight: 800;
color: #ffffff; color: #ffffff;
text-align: center; text-align: center;
line-height: 80rpx; line-height: 40px;
margin-top: 20rpx; margin-top: 10px;
} }
.btn-empty { .btn-empty {
color: #00bda5; color: #00bda5;
background: transparent; background: transparent;
border: 1rpx solid #00bda5; border: 1px solid #00bda5;
} }
.detail-fixed-account { .detail-fixed-account {
position: absolute; position: absolute;
height: 168rpx; height: 84px;
bottom: 32rpx; bottom: 16px;
left: 32rpx; left: 16px;
right: 32rpx; right: 16px;
} }
} }
</style> </style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册