349 lines
7.2 KiB
Vue
349 lines
7.2 KiB
Vue
<template>
|
|
<div class="container">
|
|
<!-- <u-modal v-model="show" :content="content"></u-modal> -->
|
|
<model :show="show" @close="show=false" :content="content" />
|
|
<image class="greenbgc" src="https://www.focusnu.com/media/directive/index/greenbgc.png" />
|
|
<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 style="font-size: 30rpx;">监护人信息</view>
|
|
</view>
|
|
|
|
</view>
|
|
<view class="white-content">
|
|
|
|
<view class="content-title" style="margin: 20rpx 0;justify-content: space-between;">
|
|
<view style="display: flex;">
|
|
<view class="shu"></view>
|
|
<view class="content-weight">个人信息</view>
|
|
<image class="shu-img"
|
|
:src="applyStatus? `https://www.focusnu.com/media/directive/index/${statusarray[applyStatus-1]}.png`:``" />
|
|
</view>
|
|
|
|
<view class="small-blue" @click="changeMessage" v-if="!applyStatus">
|
|
修改个人信息
|
|
</view>
|
|
</view>
|
|
<view class="white-message">
|
|
<view>
|
|
<view v-for="(item,index) in nameArray" :key="index" class="one"
|
|
@click="openLook(textArray[index])">
|
|
<view class="one-left">{{item}}</view>
|
|
<view class="one-right">{{textArray[index] ? textArray[index] : "自动获取" }}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view style="display: flex;width: 100%;margin-top: 40rpx;"></view>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import {
|
|
ref,
|
|
reactive
|
|
} from 'vue'
|
|
import {
|
|
onLoad
|
|
} from '@dcloudio/uni-app';
|
|
import {
|
|
base_url
|
|
} from '@/request/index.js';
|
|
import {
|
|
getrel
|
|
} from '@/pages/addjigou/api/addjigou.js';
|
|
import model from "@/compontent/public/model.vue"
|
|
|
|
const show = ref(false);
|
|
const content = ref("");
|
|
|
|
const statusarray = ["loading", "success", "fail"]
|
|
|
|
const nameArray = ["与长者关系","姓名", "电话", "身份证号码", "家庭住址", "工作单位"];
|
|
const textArray = reactive(["","", "", "", "", ""]);
|
|
|
|
|
|
// 本地保存的临时文件路径
|
|
const tempImagePath = ref('')
|
|
|
|
// 拍照并上传
|
|
function getMessage(url) {
|
|
if (!url) {
|
|
return
|
|
}
|
|
uni.previewImage({
|
|
current: url, // 当前显示图片的链接
|
|
urls: [url], // 可以预览的图片列表
|
|
indicator: 'default', // 显示面板指示点,'default'|'number'|'none'
|
|
loop: true, // 是否可循环预览
|
|
longPressActions: {
|
|
itemList: ['保存图片'],
|
|
success: (data) => {
|
|
console.log('长按操作成功', data)
|
|
},
|
|
fail: (err) => {
|
|
console.error('长按操作失败', err)
|
|
}
|
|
}
|
|
})
|
|
}
|
|
|
|
function isAtLeastEightChars(str) {
|
|
return typeof str === 'string' && str.length >= 12;
|
|
}
|
|
const openLook = (res) => {
|
|
if (isAtLeastEightChars(res)) {
|
|
content.value = res;
|
|
show.value = true
|
|
}
|
|
}
|
|
const goBack = () => {
|
|
uni.navigateBack()
|
|
}
|
|
const alldata = ref("");
|
|
const contentred = ref("")
|
|
const applyStatus = ref(false);
|
|
onLoad((options) => {
|
|
if (options.applyStatus) {
|
|
applyStatus.value = options.applyStatus
|
|
}
|
|
alldata.value = JSON.parse(options.element);
|
|
console.log("!!!!!!!!",alldata.value)
|
|
|
|
let data = alldata.value
|
|
if (data.content) {
|
|
contentred.value = data.content
|
|
}
|
|
textArray[0] = data.relationship
|
|
textArray[1] = data.guardianName;
|
|
textArray[2] = data.guardianPhone;
|
|
textArray[3] = data.guardianIdCard;
|
|
textArray[4] = data.guardianHomeAddress;
|
|
textArray[5] = data.guardianWorkUnit;
|
|
})
|
|
const changeMessage = () => {
|
|
if(alldata.value.guardianModifyStatus=='1'){
|
|
openLook("该监护人信息正在审核中,请等待")
|
|
}else{
|
|
alldata.value.name = alldata.value.guardianName;
|
|
alldata.value.tel = alldata.value.guardianPhone;
|
|
alldata.value.idCard = alldata.value.guardianIdCard;
|
|
alldata.value.homeAddress = alldata.value.guardianHomeAddress;
|
|
alldata.value.workUnit = alldata.value.guardianWorkUnit;
|
|
console.log("!!!!!!!!!!!!!!!!!!",alldata.value)
|
|
uni.setStorageSync('allinfo',alldata.value)
|
|
setTimeout(()=>{
|
|
uni.navigateTo({
|
|
url: `/pages/addoldman/IDcard`
|
|
});
|
|
},100)
|
|
|
|
}
|
|
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 100vh;
|
|
width: 100%;
|
|
background-color: #F7F7F7;
|
|
position: relative;
|
|
|
|
.white-content {
|
|
width: 90%;
|
|
margin-left: 5%;
|
|
border-radius: 35rpx;
|
|
|
|
.content-title {
|
|
display: flex;
|
|
align-items: center;
|
|
height: 100rpx;
|
|
position: relative;
|
|
font-weight: 600;
|
|
|
|
.content-weight {
|
|
font-size: 32rpx;
|
|
}
|
|
|
|
.content-img {
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
width: 400rpx;
|
|
height: 100%;
|
|
}
|
|
}
|
|
}
|
|
|
|
.white-photo {
|
|
width: 100%;
|
|
height: 300rpx;
|
|
border-radius: 35rpx;
|
|
background-color: #fff;
|
|
justify-content: space-around;
|
|
align-items: center;
|
|
display: flex;
|
|
|
|
.photo {
|
|
width: 300rpx;
|
|
height: 200rpx;
|
|
}
|
|
}
|
|
|
|
.white-message {
|
|
width: 100%;
|
|
margin-top: 20rpx;
|
|
padding-top: 20rpx;
|
|
padding-bottom: 20rpx;
|
|
margin-bottom: 30rpx;
|
|
border-radius: 35rpx;
|
|
background-color: #fff;
|
|
justify-content: space-around;
|
|
display: flex;
|
|
flex-direction: column;
|
|
|
|
.one {
|
|
width: 90%;
|
|
margin-left: 5%;
|
|
height: 100rpx;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 10rpx;
|
|
|
|
.one-left {
|
|
margin-left: 10rpx;
|
|
font-size: 30rpx;
|
|
// color: red;
|
|
color: black;
|
|
z-index: 1;
|
|
}
|
|
|
|
.one-right {
|
|
margin-right: 10rpx;
|
|
font-size: 30rpx;
|
|
color: #999999;
|
|
overflow: hidden;
|
|
/* 隐藏超出内容 */
|
|
white-space: nowrap;
|
|
/* 不换行 */
|
|
text-overflow: ellipsis;
|
|
max-width: 380rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.photo-left {
|
|
z-index: 1;
|
|
|
|
.photo-weight {
|
|
font-size: 32rpx;
|
|
font-weight: 600;
|
|
color: #333;
|
|
}
|
|
|
|
.photo-font {
|
|
font-size: 28rpx;
|
|
margin-top: 10rpx;
|
|
color: #666;
|
|
}
|
|
|
|
}
|
|
|
|
.gray-font {
|
|
padding: 20rpx 60rpx;
|
|
padding-bottom: 35rpx;
|
|
color: #999999;
|
|
}
|
|
|
|
.title-back {
|
|
margin-top: 100rpx;
|
|
width: 100%;
|
|
height: 100rpx;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.left-father {
|
|
display: flex;
|
|
align-items: center;
|
|
z-index: 1;
|
|
|
|
.back-img {
|
|
width: 45rpx;
|
|
height: 40rpx;
|
|
margin-left: 40rpx;
|
|
margin-right: 15rpx;
|
|
}
|
|
}
|
|
|
|
.shu {
|
|
width: 14rpx;
|
|
height: 36rpx;
|
|
background-color: #0097FF;
|
|
border-radius: 10rpx;
|
|
margin: 3rpx 20rpx 0 30rpx;
|
|
}
|
|
|
|
.line {
|
|
margin: 10rpx 0;
|
|
}
|
|
|
|
.shu-img {
|
|
position: absolute;
|
|
right: 20rpx;
|
|
top: 40%;
|
|
transform: translateY(-40%);
|
|
width: 150rpx;
|
|
height: 130rpx;
|
|
}
|
|
|
|
.greenbgc {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 700rpx;
|
|
}
|
|
|
|
.contentred {
|
|
width: 90%;
|
|
border: dashed 3rpx #FF4B2F;
|
|
border-radius: 15rpx;
|
|
margin: 15rpx 0;
|
|
margin-left: 5%;
|
|
padding: 5rpx;
|
|
|
|
.contentred-bgc {
|
|
background-color: rgb(240, 228, 228);
|
|
border-radius: 15rpx;
|
|
color: red;
|
|
padding: 20rpx;
|
|
padding-bottom: 30rpx;
|
|
|
|
}
|
|
}
|
|
|
|
.small-blue {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
width: 35%;
|
|
height: 70rpx;
|
|
// margin: 0rpx auto;
|
|
// margin-bottom: 80rpx;
|
|
color: #fff;
|
|
background: linear-gradient(to right, #00C9FF, #0076FF);
|
|
border-radius: 30rpx;
|
|
font-size: 30rpx;
|
|
z-index: 9999;
|
|
}
|
|
</style> |