hldy_xcx/pages/oldmanindex/saoyisaothen.vue

344 lines
7.4 KiB
Vue

<template>
<div class="container">
<!-- <view class="title-back">
<view class="left-father" @click="goBack">
<image class="back-img" src="https://www.focusnu.com/media/directive/index/left.png" />
</view>
</view> -->
<view class="title-back" :style="{height:`${uni.getStorageSync('moveHeight')+40}px`}">
<view class="left-father" @click="uni.navigateBack()">
<image class="back-img" src="https://www.focusnu.com/media/directive/index/left.png" />
<!-- <view style="font-size: 30rpx;">机构加盟</view> -->
</view>
</view>
<view :style="{height:`${uni.getStorageSync('moveHeight') + 40}px`}"></view>
<view class="hldy">
{{ item.nuName }}
</view>
<view class="vbox">
<image src="https://www.focusnu.com/media/xcx/xcx3.png" mode="aspectFill"></image>
</view>
<view class="lias">
<view>
<text>区域编码</text>
<view>{{ item.nuId }}</view>
<image src="https://www.focusnu.com/media/xcx/xcx4.png" mode="aspectFill"></image>
</view>
<view>
<text>区域属性</text>
<view>{{ item.orgPropertyType }}</view>
<image src="https://www.focusnu.com/media/xcx/xcx2.png" mode="aspectFill"></image>
</view>
<view>
<text>机构名称</text>
<view>{{ item.departName }}</view>
<image src="https://www.focusnu.com/media/xcx/xcx1.png" mode="aspectFill"></image>
</view>
</view>
<view class="btn">
<view :class="item.nuCanUse==0?'':'xx'">
<text v-if="item.nuCanUse==0" @click="goToPay">绑定护理单元</text>
<text v-else>{{ item.msg }}</text>
</view>
<view @click="jumpSaoyisao">重新扫码</view>
</view>
<!-- <view class="white-content">
<view class="white-title">
NUID:{{ item.nuId }}
</view>
<view class="white-second">
{{ item.departName }}
</view>
<view class="white-center">
{{ item.nuName }}
<image class="center-img" src="https://www.focusnu.com/media/directive/index/sheying.png" />
</view>
<view style="display: flex;width: 85%;position: absolute;bottom: 0rpx;">
<view class="finish-button" v-if="item.nuCanUse==0" @click="goToPay">
绑定护理单元
</view>
<view class="white-button" v-else>
</view>
</view>
</view> -->
<!-- <view style="width: 100%;display: flex;justify-content: flex-end;">
<view class="back-right" @click="jumpSaoyisao">
重新扫码
</view>
</view> -->
</div>
</template>
<script setup>
import {
ref,
reactive
} from 'vue'
import {
onLoad,
onShow
} from '@dcloudio/uni-app';
import {
getOrgNuId
} from './api.js'
function isAtLeastTenChars(str) {
return typeof str === "string" && str.length >= 10;
}
async function jumpSaoyisao() {
// uni.navigateTo({
// url: "/pages/oldmanindex/saoyisao"
// })
const res = await uni.scanCode();
// console.log("res",res.result)
if (isAtLeastTenChars(res.result)) {
// console.log("res1111",res.result)
getOrgNuId(res.result).then(res0 => {
if (res0.result) {
// console.log("<><><",res0.result)
item.value = res0.result
} else {
uni.showToast({
title: '扫描的二维码有误',
icon: 'none', // 不显示对勾图标
duration: 2000
});
}
})
} else {
uni.showToast({
title: '扫描的二维码有误',
icon: 'none', // 不显示对勾图标
duration: 2000
});
}
}
const item = ref({});
onLoad((options) => {
item.value = JSON.parse(options.element)
// console.log("AAAA",JSON.parse(options.element))
})
const goToPay = () => {
uni.setStorageSync('payaccount', item.value);
uni.navigateTo({
url: '/pages/oldmanindex/protocol'
})
}
</script>
<style lang="scss" scoped>
.btn{
width: 100%;
padding: 0 65rpx;
display: flex;
justify-content: space-between;
view{
width: 100%;
height: 91rpx;
background: linear-gradient(-90deg, #288DFD, #21A4FA);
border-radius: 45rpx;
border: 1px solid #9BD2FF;
font-weight: 400;
font-size: 35rpx;
color: #FFFFFF;
display: flex;
justify-content: center;
align-items: center;
margin: 0 25rpx;
padding: 0 15rpx;
white-space: nowrap;
}
.xx{
background: linear-gradient(to bottom, #f3f3f5, #dee4e9);
border: 1px solid #dee4e9;
color: #666;
}
}
.lias{
width: 100%;
padding: 20rpx 67rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
>view{
display: flex;
flex-direction: column;
justify-content: space-around;
padding: 25rpx;
position: relative;
z-index: 2;
margin-top: 20rpx;
text{
font-weight: 400;
font-size: 28rpx;
color: #222222;
}
>view{
font-weight: bold;
font-size: 35rpx;
color: #222222;
}
&:nth-child(1),&:nth-child(2){
width: 297rpx;
height: 179rpx;
background: #e7f1ff;
border-radius: 30rpx;
position: relative;
}
&:nth-child(3){
width: 100%;
height: 154rpx;
background: #e7f1ff;
border-radius: 30rpx;
position: relative;
}
image{
width: 185rpx;
height: 100%;
position: absolute;
right: 0;
top: 0;
z-index: -1;
}
}
}
.vbox{
width: 550rpx;
height: 550rpx;
margin: 25rpx auto;
image{
width: 100%;
height: 100%;
}
}
.hldy{
font-weight: bold;
font-size: 44rpx;
color: #222222;
width: 100%;
text-align: center;
margin-top: 20rpx;
}
.container {
display: flex;
flex-direction: column;
min-height: 100vh;
width: 100%;
background-color: #F7F7F7;
position: relative;
.title-back {
background-color: #F7F7F7;
width: 100%;
height: 70rpx;
display: flex;
justify-content: space-between;
align-items: flex-end;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #cbd1d2;
position: fixed;
top: 0;
left: 0;
z-index: 9999;
}
.left-father {
display: flex;
align-items: center;
.back-img {
width: 45rpx;
height: 40rpx;
margin-left: 40rpx;
margin-right: 15rpx;
}
}
.white-content {
width: 94%;
margin-left: 3%;
height: 450rpx;
border-radius: 50rpx;
background-color: #fff;
position: relative;
padding: 50rpx;
margin-top: 30rpx;
.white-title {
font-size: 32rpx;
}
.white-second {
font-size: 28rpx;
color: #999999;
margin-top: 10rpx;
}
.white-center {
margin-top: 50rpx;
font-size: 35rpx;
display: flex;
justify-content: center;
align-items: center;
font-weight: 600;
.center-img {
width: 45rpx;
height: 35rpx;
margin-left: 20rpx;
}
}
}
}
.finish-button {
display: flex;
justify-content: center;
align-items: center;
width: 60%;
height: 90rpx;
margin: 0rpx auto;
margin-bottom: 50rpx;
margin-top: 20rpx;
background: linear-gradient(to bottom, #e7f4ff, #c5e5ff);
border: 2rpx solid #9AD1FF;
color: #007CFF;
border-radius: 35rpx;
font-size: 33rpx;
}
.back-right {
display: flex;
justify-content: center;
align-items: center;
width: 25%;
height: 80rpx;
margin-right: 50rpx;
// margin: 0rpx auto;
// margin-bottom: 50rpx;
margin-top: 50rpx;
background: linear-gradient(to bottom, #e7f4ff, #c5e5ff);
border: 2rpx solid #9AD1FF;
color: #007CFF;
border-radius: 30rpx;
font-size: 33rpx;
}
.white-button {
display: flex;
justify-content: center;
align-items: center;
width: 60%;
height: 90rpx;
margin: 0rpx auto;
margin-bottom: 50rpx;
margin-top: 20rpx;
background: linear-gradient(to bottom, #f3f3f5, #dee4e9);
border-radius: 35rpx;
font-size: 33rpx;
}
</style>