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

save

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