微信小程序,手机号校验
This commit is contained in:
parent
2294266983
commit
64fbf91182
|
|
@ -232,7 +232,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function isValid11DigitNumber(val) {
|
function isValid11DigitNumber(val) {
|
||||||
return /^(\d{11})$/.test(val);
|
// return /^(\d{11})$/.test(val);
|
||||||
|
return /^1[3-9]\d{9}$/.test(val);
|
||||||
}
|
}
|
||||||
const ukey = ref(
|
const ukey = ref(
|
||||||
`${uni.getStorageSync('openid') || ''}jgbg${String(Date.now()).slice(-5)}${String(Math.floor(Math.random() * 900) + 100)}`
|
`${uni.getStorageSync('openid') || ''}jgbg${String(Date.now()).slice(-5)}${String(Math.floor(Math.random() * 900) + 100)}`
|
||||||
|
|
@ -333,7 +334,7 @@
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.result == '未做变更'? `当前无变更,无需提交` : res.message,
|
title: res.result == '未做变更' ? `当前无变更,无需提交` : res.message,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -474,6 +475,7 @@
|
||||||
form.orgLeaderPhone = data.orgLeaderPhone;
|
form.orgLeaderPhone = data.orgLeaderPhone;
|
||||||
form.orgPropertyType = data.orgPropertyType;
|
form.orgPropertyType = data.orgPropertyType;
|
||||||
form.orgBuildingArea = data.orgBuildingArea;
|
form.orgBuildingArea = data.orgBuildingArea;
|
||||||
|
console.log("111",form)
|
||||||
} else if (uni.getStorageSync('baddata')) {
|
} else if (uni.getStorageSync('baddata')) {
|
||||||
let data = uni.getStorageSync('baddata');
|
let data = uni.getStorageSync('baddata');
|
||||||
if (data.orgProvince_dictText) {
|
if (data.orgProvince_dictText) {
|
||||||
|
|
@ -488,6 +490,10 @@
|
||||||
form.orgLeaderPhone = data.orgLeaderPhone;
|
form.orgLeaderPhone = data.orgLeaderPhone;
|
||||||
form.orgPropertyType = data.orgPropertyType;
|
form.orgPropertyType = data.orgPropertyType;
|
||||||
form.orgBuildingArea = data.orgBuildingArea;
|
form.orgBuildingArea = data.orgBuildingArea;
|
||||||
|
console.log("222",form)
|
||||||
|
}else{
|
||||||
|
|
||||||
|
form.orgLeaderPhone = uni.getStorageSync('tel');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,28 @@
|
||||||
<view class="shu"></view>
|
<view class="shu"></view>
|
||||||
<view class="content-weight">监护人基本信息</view>
|
<view class="content-weight">监护人基本信息</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="white-photo" @click="selectphoto()">
|
||||||
|
<view class="photo-left">
|
||||||
|
<view class="photo-weight">监护人人像面</view>
|
||||||
|
<view class="photo-font">请上传身份证人像面</view>
|
||||||
|
</view>
|
||||||
|
<view style="position: relative;">
|
||||||
|
<image class="photo"
|
||||||
|
:src="specialImge ? `${media_base_url}${specialImge}` : `https://www.focusnu.com/media/directive/index/IDfront.png`" />
|
||||||
|
<image style="width: 100%;height: 100%;top: 0;left: 0;z-index: 1;position: absolute;"
|
||||||
|
:src="specialImge ? `` : `https://www.focusnu.com/media/directive/index/bian.png`" />
|
||||||
|
<image v-if="!specialImge"
|
||||||
|
style="position: absolute;top: 50%;left: 50%;width: 70rpx;height: 60rpx;transform: translate(-50%,-50%);"
|
||||||
|
src="https://www.focusnu.com/media/directive/index/takephoto.png" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
<view class="white-message">
|
<view class="white-message">
|
||||||
<view>
|
<view>
|
||||||
<view class="one">
|
<!-- <view class="one">
|
||||||
<view class="one-left">与长者关系</view>
|
<view class="one-left">与长者关系</view>
|
||||||
<input class="one-right" maxlength="10" placeholder="请输入与长者关系" v-model="form.relationship" />
|
<input class="one-right" maxlength="10" placeholder="请输入与长者关系" v-model="form.relationship" />
|
||||||
</view>
|
</view> -->
|
||||||
<view class="one">
|
<view class="one">
|
||||||
<view class="one-left">姓名</view>
|
<view class="one-left">姓名</view>
|
||||||
<input class="one-right" maxlength="5" placeholder="请输入姓名" v-model="form.name" />
|
<input class="one-right" maxlength="5" placeholder="请输入姓名" v-model="form.name" />
|
||||||
|
|
@ -55,6 +71,7 @@
|
||||||
提交
|
提交
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<u-action-sheet :list="bottomlist" @click="photoclick" v-model="bottomshow"></u-action-sheet>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -68,7 +85,8 @@
|
||||||
onShow
|
onShow
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
import {
|
import {
|
||||||
base_url
|
base_url,
|
||||||
|
media_base_url
|
||||||
} from '@/request/index.js';
|
} from '@/request/index.js';
|
||||||
import {
|
import {
|
||||||
savePayer,
|
savePayer,
|
||||||
|
|
@ -78,6 +96,8 @@
|
||||||
getMessage
|
getMessage
|
||||||
} from '@/api/loginApi.js'
|
} from '@/api/loginApi.js'
|
||||||
|
|
||||||
|
const bottomshow = ref(false);
|
||||||
|
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
name: "",
|
name: "",
|
||||||
tel: "",
|
tel: "",
|
||||||
|
|
@ -90,25 +110,83 @@
|
||||||
openId: uni.getStorageSync('openid'),
|
openId: uni.getStorageSync('openid'),
|
||||||
relationship: ""
|
relationship: ""
|
||||||
})
|
})
|
||||||
|
const bottomlist = [{
|
||||||
|
text: '拍摄图片',
|
||||||
|
fontSize: 40
|
||||||
|
}, {
|
||||||
|
text: '图片预览',
|
||||||
|
fontSize: 40
|
||||||
|
}]
|
||||||
|
|
||||||
function isValid11DigitNumber(val) {
|
function isValid11DigitNumber(val) {
|
||||||
return /^(\d{11})$/.test(val);
|
// return /^(\d{11})$/.test(val);
|
||||||
|
return /^1[3-9]\d{9}$/.test(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isValid18DigitNumber(val) {
|
function isValid18DigitNumber(val) {
|
||||||
return /^(\d{18})$/.test(val);
|
return /^(\d{18})$/.test(val);
|
||||||
}
|
}
|
||||||
|
const photoclick = (element) => {
|
||||||
|
if (element) {
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [specialImgeshow.value], // 必填,所有要预览的图片地址数组
|
||||||
|
current: specialImgeshow.value, // 可选,当前显示图片的地址,默认是 urls[0]
|
||||||
|
indicator: 'default', // 可选,指示器样式,H5/App 有效,值为 'default'(圆点)或 'number'(数字)
|
||||||
|
longPressActions: { // 可选,仅 App 支持,长按图片时弹出的操作项
|
||||||
|
itemList: ['保存图片到相册'],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
angetMessage()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
const specialImge = ref("")
|
||||||
|
const uping = ref(true)
|
||||||
|
const selectphoto = () => {
|
||||||
|
// console.log("0000",bottomshow.value)
|
||||||
|
if (!uping.value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (specialImge.value) {
|
||||||
|
|
||||||
|
bottomshow.value = true;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
angetMessage()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 拍照并上传
|
||||||
|
function angetMessage() {
|
||||||
|
// 使用 UniApp 的 API 调用摄像头
|
||||||
|
uni.chooseImage({
|
||||||
|
count: 1,
|
||||||
|
sourceType: ['album', 'camera'],
|
||||||
|
success: chooseRes => {
|
||||||
|
// tempImagePath.value = chooseRes.tempFilePaths[0]
|
||||||
|
// 拍照成功后,调用上传函数
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/compontent/public/camera?url=${chooseRes.tempFilePaths[0]}&type=0`
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: err => {
|
||||||
|
console.error('拍照失败:', err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
const ukey = ref(
|
const ukey = ref(
|
||||||
`${uni.getStorageSync('openid') || ''}jhbg${String(Date.now()).slice(-5)}${String(Math.floor(Math.random() * 900) + 100)}`
|
`${uni.getStorageSync('openid') || ''}jhbg${String(Date.now()).slice(-5)}${String(Math.floor(Math.random() * 900) + 100)}`
|
||||||
)
|
)
|
||||||
const next = () => {
|
const next = () => {
|
||||||
|
|
||||||
if (!form.relationship) {
|
// if (!form.relationship) {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: '请填写与长者关系',
|
// title: '请填写与长者关系',
|
||||||
icon: 'error'
|
// icon: 'error'
|
||||||
})
|
// })
|
||||||
} else if (!form.name) {
|
// } else
|
||||||
|
if (!form.name) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请填写姓名',
|
title: '请填写姓名',
|
||||||
icon: 'error'
|
icon: 'error'
|
||||||
|
|
@ -154,6 +232,7 @@
|
||||||
data.guardianHomeAddress = form.homeAddress
|
data.guardianHomeAddress = form.homeAddress
|
||||||
data.guardianWorkUnit = form.workUnit
|
data.guardianWorkUnit = form.workUnit
|
||||||
data.relationship = form.relationship
|
data.relationship = form.relationship
|
||||||
|
data.guardianIdCardPositive = specialImge.value
|
||||||
data.modifyType = "jhr"
|
data.modifyType = "jhr"
|
||||||
const urlpost = `${base_url}/api/elderInfo/updateElderInfo?ukey=${ukey.value}`;
|
const urlpost = `${base_url}/api/elderInfo/updateElderInfo?ukey=${ukey.value}`;
|
||||||
uni.request({
|
uni.request({
|
||||||
|
|
@ -200,6 +279,7 @@
|
||||||
data.guardianHomeAddress = form.homeAddress
|
data.guardianHomeAddress = form.homeAddress
|
||||||
data.guardianWorkUnit = form.workUnit
|
data.guardianWorkUnit = form.workUnit
|
||||||
data.relationship = form.relationship
|
data.relationship = form.relationship
|
||||||
|
data.guardianIdCardPositive = specialImge.value
|
||||||
const urlpost = `${base_url}/api/elderInfo/addElder?ukey=${ukey.value}`;
|
const urlpost = `${base_url}/api/elderInfo/addElder?ukey=${ukey.value}`;
|
||||||
uni.request({
|
uni.request({
|
||||||
url: urlpost,
|
url: urlpost,
|
||||||
|
|
@ -301,7 +381,7 @@
|
||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
|
const specialImgeshow = ref("")
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
if (uni.getStorageSync('allinfo').name) {
|
if (uni.getStorageSync('allinfo').name) {
|
||||||
let data = uni.getStorageSync('allinfo');
|
let data = uni.getStorageSync('allinfo');
|
||||||
|
|
@ -321,10 +401,90 @@
|
||||||
keys.forEach(key => {
|
keys.forEach(key => {
|
||||||
form[key] = data[key] || ""
|
form[key] = data[key] || ""
|
||||||
})
|
})
|
||||||
|
specialImge.value = data.guardianIdCardPositive
|
||||||
|
specialImgeshow.value = media_base_url + data.guardianIdCardPositive
|
||||||
console.log("????", uni.getStorageSync('allinfo'))
|
console.log("????", uni.getStorageSync('allinfo'))
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
// 上传图片到服务器
|
||||||
|
function uploadImage(filePath) {
|
||||||
|
uping.value = false;
|
||||||
|
uni.showLoading()
|
||||||
|
uni.uploadFile({
|
||||||
|
url: `${base_url}/api/ocr/idCard`, // 替换为您的POST接口地址
|
||||||
|
filePath,
|
||||||
|
name: 'file', // 后端接收时的字段名
|
||||||
|
header: {
|
||||||
|
'X-Access-Token': uni.getStorageSync('token') || '',
|
||||||
|
},
|
||||||
|
formData: {},
|
||||||
|
success: uploadRes => {
|
||||||
|
if (!JSON.parse(uploadRes.data).success) {
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.showToast({
|
||||||
|
title: '识别失败',
|
||||||
|
icon: 'error',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
uping.value = true;
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.face) {
|
||||||
|
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.face.data;
|
||||||
|
specialImgeshow.value = filePath;
|
||||||
|
form.name = father.name;
|
||||||
|
form.idCard = father.idNumber;
|
||||||
|
form.homeAddress = father.address
|
||||||
|
savephoto(filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
fail: err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '上传出错',
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
uni.hideLoading()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const savephoto = (filePath, type) => {
|
||||||
|
uni.uploadFile({
|
||||||
|
url: `${base_url}/sys/common/upload`, // 替换为您的POST接口地址
|
||||||
|
filePath,
|
||||||
|
name: 'file', // 后端接收时的字段名
|
||||||
|
header: {
|
||||||
|
'X-Access-Token': uni.getStorageSync('token') || '',
|
||||||
|
},
|
||||||
|
formData: {
|
||||||
|
biz: `temp`
|
||||||
|
},
|
||||||
|
success: uploadRes => {
|
||||||
|
specialImge.value = JSON.parse(uploadRes.data).message
|
||||||
|
uni.hideLoading()
|
||||||
|
|
||||||
|
uping.value = true;
|
||||||
|
},
|
||||||
|
fail: err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: '上传出错',
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
uni.hideLoading()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
onShow(() => {
|
||||||
|
const img = uni.getStorageSync('imgkey0')
|
||||||
|
if (img) {
|
||||||
|
uploadImage(img)
|
||||||
|
uni.removeStorageSync('imgkey0')
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
@ -466,4 +626,32 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 700rpx;
|
height: 700rpx;
|
||||||
}
|
}
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.photo-left {
|
||||||
|
.photo-weight {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo-font {
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -31,6 +31,20 @@
|
||||||
修改监护人信息
|
修改监护人信息
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="white-photo" @click="getMessage(headImge0)">
|
||||||
|
<view class="photo-left">
|
||||||
|
<view class="photo-weight">监护人人像面</view>
|
||||||
|
<!-- <view class="photo-font">请上传营业执照</view> -->
|
||||||
|
</view>
|
||||||
|
<view style="position: relative;">
|
||||||
|
<image class="photo"
|
||||||
|
:src="headImge0 ? headImge0 : `https://www.focusnu.com/media/directive/index/zhizhao.png`" />
|
||||||
|
<image v-if="!headImge0"
|
||||||
|
style="position: absolute;top: 50%;left: 50%;width: 70rpx;height: 60rpx;transform: translate(-50%,-50%);"
|
||||||
|
src="https://www.focusnu.com/media/directive/index/takephoto.png" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
<view class="white-message">
|
<view class="white-message">
|
||||||
<view>
|
<view>
|
||||||
<view v-for="(item,index) in nameArray" :key="index" class="one"
|
<view v-for="(item,index) in nameArray" :key="index" class="one"
|
||||||
|
|
@ -57,7 +71,7 @@
|
||||||
onLoad
|
onLoad
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
import {
|
import {
|
||||||
base_url
|
media_base_url
|
||||||
} from '@/request/index.js';
|
} from '@/request/index.js';
|
||||||
import {
|
import {
|
||||||
getrel
|
getrel
|
||||||
|
|
@ -66,11 +80,12 @@
|
||||||
|
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
const content = ref("");
|
const content = ref("");
|
||||||
|
const headImge0 = ref("");
|
||||||
|
|
||||||
const statusarray = ["loading", "success", "fail"]
|
const statusarray = ["loading", "success", "fail"]
|
||||||
|
|
||||||
const nameArray = ["与长者关系", "姓名", "电话", "身份证号码", "家庭住址", "工作单位"];
|
const nameArray = [ "姓名", "电话", "身份证号码", "家庭住址", "工作单位"];
|
||||||
const textArray = reactive(["", "", "", "", "", ""]);
|
const textArray = reactive(["", "", "", "", ""]);
|
||||||
|
|
||||||
|
|
||||||
// 本地保存的临时文件路径
|
// 本地保存的临时文件路径
|
||||||
|
|
@ -124,12 +139,13 @@
|
||||||
if (data.content) {
|
if (data.content) {
|
||||||
contentred.value = data.content
|
contentred.value = data.content
|
||||||
}
|
}
|
||||||
textArray[0] = data.relationship
|
// textArray[0] = data.relationship
|
||||||
textArray[1] = data.guardianName;
|
textArray[0] = data.guardianName;
|
||||||
textArray[2] = data.guardianPhone;
|
textArray[1] = data.guardianPhone;
|
||||||
textArray[3] = data.guardianIdCard;
|
textArray[2] = data.guardianIdCard;
|
||||||
textArray[4] = data.guardianHomeAddress;
|
textArray[3] = data.guardianHomeAddress;
|
||||||
textArray[5] = data.guardianWorkUnit;
|
textArray[4] = data.guardianWorkUnit;
|
||||||
|
headImge0.value = `${media_base_url}${data.guardianIdCardPositive}`;
|
||||||
})
|
})
|
||||||
const changeMessage = () => {
|
const changeMessage = () => {
|
||||||
if (alldata.value.guardianModifyStatus == '1') {
|
if (alldata.value.guardianModifyStatus == '1') {
|
||||||
|
|
|
||||||
|
|
@ -19,23 +19,40 @@
|
||||||
<view class="shu"></view>
|
<view class="shu"></view>
|
||||||
<view class="content-weight">监护人信息</view>
|
<view class="content-weight">监护人信息</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="white-photo" @click="selectphoto(2)">
|
||||||
|
<view class="photo-left">
|
||||||
|
<view class="photo-weight">监护人人像面</view>
|
||||||
|
<view class="photo-font">请上传身份证人像面</view>
|
||||||
|
</view>
|
||||||
|
<view style="position: relative;">
|
||||||
|
<image class="photo"
|
||||||
|
:src="specialImge ? `${media_base_url}${specialImge}` : `https://www.focusnu.com/media/directive/index/IDfront.png`" />
|
||||||
|
<image style="width: 100%;height: 100%;top: 0;left: 0;z-index: 1;position: absolute;"
|
||||||
|
:src="specialImge ? `` : `https://www.focusnu.com/media/directive/index/bian.png`" />
|
||||||
|
<image v-if="!specialImge"
|
||||||
|
style="position: absolute;top: 50%;left: 50%;width: 70rpx;height: 60rpx;transform: translate(-50%,-50%);"
|
||||||
|
src="https://www.focusnu.com/media/directive/index/takephoto.png" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<!-- margin重叠问题 -->
|
||||||
|
<view style="height: 10rpx;"></view>
|
||||||
|
|
||||||
<view class="white-message">
|
<view class="white-message">
|
||||||
<view>
|
<view>
|
||||||
<view class="one">
|
|
||||||
<view class="one-left">与长者关系</view>
|
|
||||||
<input class="one-right" maxlength="10" placeholder="请输入与长者关系" v-model="guanxi" />
|
|
||||||
</view>
|
|
||||||
<view class="one">
|
<view class="one">
|
||||||
<view class="one-left">监护人姓名</view>
|
<view class="one-left">监护人姓名</view>
|
||||||
<input class="one-right" maxlength="5" placeholder="请输入监护人姓名" v-model="form.name" />
|
<input class="one-right" disabled maxlength="5" placeholder="请输入监护人姓名" v-model="form.name" />
|
||||||
</view>
|
</view>
|
||||||
<view class="one">
|
<view class="one">
|
||||||
<view class="one-left">监护人电话</view>
|
<view class="one-left">监护人电话</view>
|
||||||
<input class="one-right" type="number" maxlength="11" placeholder="请输入监护人电话" v-model="form.tel" />
|
<input class="one-right" type="number" maxlength="11" placeholder="请输入监护人电话"
|
||||||
|
v-model="form.tel" />
|
||||||
</view>
|
</view>
|
||||||
<view class="one">
|
<view class="one">
|
||||||
<view class="one-left">身份证号</view>
|
<view class="one-left">身份证号</view>
|
||||||
<input class="one-right" maxlength="18" placeholder="请输入身份证号" v-model="form.idCard" />
|
<input class="one-right" disabled maxlength="18" placeholder="请输入身份证号" v-model="form.idCard" />
|
||||||
</view>
|
</view>
|
||||||
<view class="one">
|
<view class="one">
|
||||||
<view class="one-left">家庭住址</view>
|
<view class="one-left">家庭住址</view>
|
||||||
|
|
@ -196,8 +213,8 @@
|
||||||
const photoclick = (element) => {
|
const photoclick = (element) => {
|
||||||
if (element) {
|
if (element) {
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
urls: [headImge.value, backImge.value], // 必填,所有要预览的图片地址数组
|
urls: [headImge.value, backImge.value,specialImgeshow.value], // 必填,所有要预览的图片地址数组
|
||||||
current: targetphoto.value ? backImge.value : headImge.value, // 可选,当前显示图片的地址,默认是 urls[0]
|
current: targetphoto.value ? (targetphoto.value==1?backImge.value:specialImgeshow.value) : headImge.value, // 可选,当前显示图片的地址,默认是 urls[0]
|
||||||
indicator: 'default', // 可选,指示器样式,H5/App 有效,值为 'default'(圆点)或 'number'(数字)
|
indicator: 'default', // 可选,指示器样式,H5/App 有效,值为 'default'(圆点)或 'number'(数字)
|
||||||
longPressActions: { // 可选,仅 App 支持,长按图片时弹出的操作项
|
longPressActions: { // 可选,仅 App 支持,长按图片时弹出的操作项
|
||||||
itemList: ['保存图片到相册'],
|
itemList: ['保存图片到相册'],
|
||||||
|
|
@ -212,16 +229,36 @@
|
||||||
const tempImagePath = ref('')
|
const tempImagePath = ref('')
|
||||||
|
|
||||||
const targetphoto = ref(0)
|
const targetphoto = ref(0)
|
||||||
|
const isspecial = ref(false);
|
||||||
const selectphoto = (number) => {
|
const selectphoto = (number) => {
|
||||||
if (!uping.value) {
|
if (!uping.value) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (backImge.value && headImge.value) {
|
// specialImge
|
||||||
targetphoto.value = number
|
targetphoto.value = number
|
||||||
|
if (!number){
|
||||||
|
if(headImge.value){
|
||||||
|
|
||||||
bottomshow.value = true;
|
bottomshow.value = true;
|
||||||
} else {
|
}else{
|
||||||
getMessage()
|
getMessage()
|
||||||
}
|
}
|
||||||
|
}else if(number==1){
|
||||||
|
if(backImge.value){
|
||||||
|
|
||||||
|
bottomshow.value = true;
|
||||||
|
}else{
|
||||||
|
getMessage()
|
||||||
|
}
|
||||||
|
}else if(number == 2){
|
||||||
|
if(specialImge.value){
|
||||||
|
|
||||||
|
bottomshow.value = true;
|
||||||
|
}else{
|
||||||
|
isspecial.value = true;
|
||||||
|
getMessage()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 拍照并上传
|
// 拍照并上传
|
||||||
|
|
@ -242,7 +279,8 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const specialImge = ref("");
|
||||||
|
const specialImgeshow = ref("");
|
||||||
const headImge = ref("");
|
const headImge = ref("");
|
||||||
const backImge = ref("");
|
const backImge = ref("");
|
||||||
// 日期转换
|
// 日期转换
|
||||||
|
|
@ -286,7 +324,23 @@
|
||||||
uping.value = true;
|
uping.value = true;
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if(isspecial.value || targetphoto.value == 2){
|
||||||
|
if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.face) {
|
||||||
|
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.face.data;
|
||||||
|
// textArray[0] = father.name;
|
||||||
|
// textArray[1] = father.sex;
|
||||||
|
// textArray[2] = father.idNumber;
|
||||||
|
// textArray[3] = father.ethnicity;
|
||||||
|
// textArray[4] = father.birthDate;
|
||||||
|
// textArray[5] = father.address;
|
||||||
|
specialImgeshow.value = filePath;
|
||||||
|
form.name = father.name;
|
||||||
|
form.idCard = father.idNumber;
|
||||||
|
form.homeAddress = father.address
|
||||||
|
savephoto(filePath, 2);
|
||||||
|
}
|
||||||
|
isspecial.value = false
|
||||||
|
}else{
|
||||||
if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.face) {
|
if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.face) {
|
||||||
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.face.data;
|
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.face.data;
|
||||||
textArray[0] = father.name;
|
textArray[0] = father.name;
|
||||||
|
|
@ -312,6 +366,8 @@
|
||||||
})
|
})
|
||||||
uping.value = true;
|
uping.value = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
fail: err => {
|
fail: err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -337,8 +393,10 @@
|
||||||
success: uploadRes => {
|
success: uploadRes => {
|
||||||
if (!type) {
|
if (!type) {
|
||||||
fontphoto.value = JSON.parse(uploadRes.data).message
|
fontphoto.value = JSON.parse(uploadRes.data).message
|
||||||
} else {
|
} else if(type==1) {
|
||||||
endphoto.value = JSON.parse(uploadRes.data).message
|
endphoto.value = JSON.parse(uploadRes.data).message
|
||||||
|
} else if(type==2){
|
||||||
|
specialImge.value = JSON.parse(uploadRes.data).message
|
||||||
}
|
}
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
if (JSON.parse(uploadRes.data).code == 401) {
|
if (JSON.parse(uploadRes.data).code == 401) {
|
||||||
|
|
@ -355,8 +413,10 @@
|
||||||
success: uploadRes => {
|
success: uploadRes => {
|
||||||
if (!type) {
|
if (!type) {
|
||||||
fontphoto.value = JSON.parse(uploadRes.data).message
|
fontphoto.value = JSON.parse(uploadRes.data).message
|
||||||
} else {
|
} else if(type==1) {
|
||||||
endphoto.value = JSON.parse(uploadRes.data).message
|
endphoto.value = JSON.parse(uploadRes.data).message
|
||||||
|
} else if(type==2){
|
||||||
|
specialImge.value = JSON.parse(uploadRes.data).message
|
||||||
}
|
}
|
||||||
uping.value = true;
|
uping.value = true;
|
||||||
},
|
},
|
||||||
|
|
@ -392,7 +452,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function isValid11DigitNumber(val) {
|
function isValid11DigitNumber(val) {
|
||||||
return /^(\d{11})$/.test(val);
|
// return /^(\d{11})$/.test(val);
|
||||||
|
return /^1[3-9]\d{9}$/.test(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isValid18DigitNumber(val) {
|
function isValid18DigitNumber(val) {
|
||||||
|
|
@ -402,6 +463,13 @@
|
||||||
`${uni.getStorageSync('openid') || ''}lrbg${String(Date.now()).slice(-5)}${String(Math.floor(Math.random() * 900) + 100)}`
|
`${uni.getStorageSync('openid') || ''}lrbg${String(Date.now()).slice(-5)}${String(Math.floor(Math.random() * 900) + 100)}`
|
||||||
)
|
)
|
||||||
const next = () => {
|
const next = () => {
|
||||||
|
if (!specialImge.value) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请上传监护人身份证正面',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
if (!fontphoto.value) {
|
if (!fontphoto.value) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请上传身份证正面',
|
title: '请上传身份证正面',
|
||||||
|
|
@ -417,13 +485,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canshow.value) {
|
if (canshow.value) {
|
||||||
if (!guanxi.value) {
|
// if (!guanxi.value) {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: '请填写与长者关系',
|
// title: '请填写与长者关系',
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
})
|
// })
|
||||||
return
|
// return
|
||||||
} else if (!form.name) {
|
// } else
|
||||||
|
if (!form.name) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请填写监护人姓名',
|
title: '请填写监护人姓名',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
|
|
@ -486,6 +555,7 @@
|
||||||
data.nuId = uni.getStorageSync('oldman').nuId
|
data.nuId = uni.getStorageSync('oldman').nuId
|
||||||
data.idCardPositive = fontphoto.value
|
data.idCardPositive = fontphoto.value
|
||||||
data.idCardNegative = endphoto.value
|
data.idCardNegative = endphoto.value
|
||||||
|
data.guardianIdCardPositive = specialImge.value
|
||||||
data.name = textArray[0]
|
data.name = textArray[0]
|
||||||
data.sex = textArray[1]
|
data.sex = textArray[1]
|
||||||
data.idCard = textArray[2]
|
data.idCard = textArray[2]
|
||||||
|
|
@ -521,6 +591,7 @@
|
||||||
data.modifyType = "zz"
|
data.modifyType = "zz"
|
||||||
|
|
||||||
// console.log("?????", data)
|
// console.log("?????", data)
|
||||||
|
// return
|
||||||
if (id.value) {
|
if (id.value) {
|
||||||
data.id = id.value
|
data.id = id.value
|
||||||
const urlpost = `${payurl.value}/api/elderInfo/updateElderInfo?ukey=${ukey.value}`;
|
const urlpost = `${payurl.value}/api/elderInfo/updateElderInfo?ukey=${ukey.value}`;
|
||||||
|
|
@ -693,13 +764,14 @@
|
||||||
canshow.value = false;
|
canshow.value = false;
|
||||||
fontphoto.value = data.idCardPositive
|
fontphoto.value = data.idCardPositive
|
||||||
endphoto.value = data.idCardNegative
|
endphoto.value = data.idCardNegative
|
||||||
|
specialImge.value = data.guardianIdCardPositive
|
||||||
// console.log("???????????", fontphoto.value, endphoto.value)
|
// console.log("???????????", fontphoto.value, endphoto.value)
|
||||||
textArray[0] = data.name
|
textArray[0] = data.name
|
||||||
textArray[1] = data.sex
|
textArray[1] = data.sex
|
||||||
textArray[2] = data.idCard
|
textArray[2] = data.idCard
|
||||||
textArray[3] = data.national
|
textArray[3] = data.national
|
||||||
|
|
||||||
console.log("????", data.dateOfBirth)
|
// console.log("????", data.dateOfBirth)
|
||||||
textArray[4] = data.dateOfBirth
|
textArray[4] = data.dateOfBirth
|
||||||
textArray[5] = data.houseAddress
|
textArray[5] = data.houseAddress
|
||||||
textArray[6] = data.issuingAuthority
|
textArray[6] = data.issuingAuthority
|
||||||
|
|
@ -723,6 +795,8 @@
|
||||||
// textArray[7] = formatRange(textArray[7])
|
// textArray[7] = formatRange(textArray[7])
|
||||||
// console.log("aaaaaaaaaaaaaaaaaa",textArray[7])
|
// console.log("aaaaaaaaaaaaaaaaaa",textArray[7])
|
||||||
// ischange.value = true;
|
// ischange.value = true;
|
||||||
|
} else {
|
||||||
|
form.tel = uni.getStorageSync('tel')
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -33,17 +33,18 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="white-content">
|
<view class="white-content">
|
||||||
|
|
||||||
<view class="white-photo" @click="getMessage(`${media_base_url}${fontphoto}`)">
|
<view class="white-photo" @click="getMessage(`${media_base_url}${specialImge}`)">
|
||||||
<view class="photo-left">
|
<view class="photo-left">
|
||||||
<view class="photo-weight">人像面</view>
|
<view class="photo-weight">人像面</view>
|
||||||
<view class="photo-font">请上传身份证人像面</view>
|
<view class="photo-font">请上传身份证人像面</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="position: relative;">
|
<view style="position: relative;">
|
||||||
<image class="photo"
|
<image class="photo"
|
||||||
:src="fontphoto ? `${media_base_url}${fontphoto}` : `https://www.focusnu.com/media/directive/index/IDcard.png`" />
|
:src="specialImge ? `${media_base_url}${specialImge}` : `https://www.focusnu.com/media/directive/index/IDcard.png`" />
|
||||||
<image v-if="!fontphoto"
|
<image v-if="!specialImge"
|
||||||
style="position: absolute;top: 50%;left: 50%;width: 70rpx;height: 60rpx;transform: translate(-50%,-50%);"
|
style="position: absolute;top: 50%;left: 50%;width: 70rpx;height: 60rpx;transform: translate(-50%,-50%);"
|
||||||
src="https://www.focusnu.com/media/directive/index/takephoto.png" />
|
src="https://www.focusnu.com/media/directive/index/takephoto.png" />
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -193,6 +194,7 @@
|
||||||
textArray[7] = `${data.startTime}-${swapLongTerm(data.endTime)}`;
|
textArray[7] = `${data.startTime}-${swapLongTerm(data.endTime)}`;
|
||||||
fontphoto.value = data.idCardPositive
|
fontphoto.value = data.idCardPositive
|
||||||
endphoto.value = data.idCardNegative
|
endphoto.value = data.idCardNegative
|
||||||
|
specialImge.value = data.guardianIdCardPositive
|
||||||
})
|
})
|
||||||
const changeMessage = () => {
|
const changeMessage = () => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
<view class="white-message">
|
<view class="white-message">
|
||||||
<view>
|
<view>
|
||||||
<view v-for="(item,index) in nameArray1" :key="index" class="one"
|
<view v-for="(item,index) in nameArray1" :key="index" class="one"
|
||||||
@click="openLook(textArray[index])">
|
@click="openLook(textArray1[index])">
|
||||||
<view class="one-left">{{item}}</view>
|
<view class="one-left">{{item}}</view>
|
||||||
<view class="one-right">{{textArray1[index] ? textArray1[index] : "自动获取" }}</view>
|
<view class="one-right">{{textArray1[index] ? textArray1[index] : "自动获取" }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -374,7 +374,7 @@
|
||||||
|
|
||||||
})
|
})
|
||||||
const changeMessage = () => {
|
const changeMessage = () => {
|
||||||
console.log("????", alldata.value)
|
// console.log("????", alldata.value)
|
||||||
if (alldata.value.modifyState == '1') {
|
if (alldata.value.modifyState == '1') {
|
||||||
openLook("该信息正在审核中,请等待")
|
openLook("该信息正在审核中,请等待")
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -249,10 +249,18 @@
|
||||||
`${uni.getStorageSync('openid') || ''}ygbg${String(Date.now()).slice(-5)}${String(Math.floor(Math.random() * 900) + 100)}`
|
`${uni.getStorageSync('openid') || ''}ygbg${String(Date.now()).slice(-5)}${String(Math.floor(Math.random() * 900) + 100)}`
|
||||||
)
|
)
|
||||||
const next = () => {
|
const next = () => {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: "999999999999999999",
|
||||||
|
// icon: 'error'
|
||||||
|
// })
|
||||||
if (!uping.value) {
|
if (!uping.value) {
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// uni.showToast({
|
||||||
|
// title: "888888888888",
|
||||||
|
// icon: 'error'
|
||||||
|
// })
|
||||||
let data = uni.getStorageSync('backhuancun');
|
let data = uni.getStorageSync('backhuancun');
|
||||||
data.healthZmPath = imgArray[0]
|
data.healthZmPath = imgArray[0]
|
||||||
data.healthFmPath = imgArray[1]
|
data.healthFmPath = imgArray[1]
|
||||||
|
|
@ -264,8 +272,22 @@
|
||||||
// data.endTime = swapLongTerm(data.endTime);
|
// data.endTime = swapLongTerm(data.endTime);
|
||||||
data.orgCode = uni.getStorageSync('changeyuangongorgCode')
|
data.orgCode = uni.getStorageSync('changeyuangongorgCode')
|
||||||
|
|
||||||
|
// uni.showToast({
|
||||||
|
// title: "888888888888",
|
||||||
|
// icon: 'error'
|
||||||
|
// })
|
||||||
|
console.log("AAAA",data,ukey.value)
|
||||||
changemessage(data, ukey.value).then(res => {
|
changemessage(data, ukey.value).then(res => {
|
||||||
|
console.log("BBBB",res)
|
||||||
|
// uni.showToast({
|
||||||
|
// title: res,
|
||||||
|
// // icon: 'error'
|
||||||
|
// })
|
||||||
|
// uni.showToast({
|
||||||
|
// title: res.result,
|
||||||
|
// // icon: 'error'
|
||||||
|
// })
|
||||||
|
// return
|
||||||
if (res.result == '重复提交') {
|
if (res.result == '重复提交') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: `重复提交`,
|
title: `重复提交`,
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,8 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
function isValid11DigitNumber(val) {
|
function isValid11DigitNumber(val) {
|
||||||
return /^(\d{11})$/.test(val);
|
// return /^(\d{11})$/.test(val);
|
||||||
|
return /^1[3-9]\d{9}$/.test(val);
|
||||||
}
|
}
|
||||||
const next = () => {
|
const next = () => {
|
||||||
if (!form.maritalStatus) {
|
if (!form.maritalStatus) {
|
||||||
|
|
@ -327,7 +328,14 @@
|
||||||
title: '请填写户口性质',
|
title: '请填写户口性质',
|
||||||
icon: 'error'
|
icon: 'error'
|
||||||
})
|
})
|
||||||
} else {
|
}
|
||||||
|
else if (!form.currentAddress) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请填写现住址',
|
||||||
|
icon: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else {
|
||||||
const data = form
|
const data = form
|
||||||
const merged2 = {
|
const merged2 = {
|
||||||
...uni.getStorageSync('backhuancun'),
|
...uni.getStorageSync('backhuancun'),
|
||||||
|
|
@ -374,6 +382,7 @@
|
||||||
form.showweight = form.weight + 'kg';
|
form.showweight = form.weight + 'kg';
|
||||||
} else {
|
} else {
|
||||||
uni.setStorageSync("isstaffchange", false)
|
uni.setStorageSync("isstaffchange", false)
|
||||||
|
form.tel = uni.getStorageSync('tel')
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// 全局请求封装
|
// 全局请求封装
|
||||||
// export const base_url = 'http://192.168.2.26:8081/opeapi'
|
// export const base_url = 'http://192.168.2.22:8081/opeapi'
|
||||||
export const base_url = 'https://www.focusnu.com/opeapi'
|
export const base_url = 'https://www.focusnu.com/opeapi'
|
||||||
|
|
||||||
export const media_base_url = 'https://www.focusnu.com/media/upFiles/'
|
export const media_base_url = 'https://www.focusnu.com/media/upFiles/'
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -7050,9 +7050,9 @@ function isConsoleWritable() {
|
||||||
return isWritable;
|
return isWritable;
|
||||||
}
|
}
|
||||||
function initRuntimeSocketService() {
|
function initRuntimeSocketService() {
|
||||||
const hosts = "192.168.2.27,127.0.0.1";
|
const hosts = "127.0.0.1";
|
||||||
const port = "8090";
|
const port = "8090";
|
||||||
const id = "mp-weixin_s7P1yM";
|
const id = "mp-weixin_ZPQFk3";
|
||||||
const lazy = typeof swan !== "undefined";
|
const lazy = typeof swan !== "undefined";
|
||||||
let restoreError = lazy ? () => {
|
let restoreError = lazy ? () => {
|
||||||
} : initOnError();
|
} : initOnError();
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ const _sfc_main = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function isValid11DigitNumber(val) {
|
function isValid11DigitNumber(val) {
|
||||||
return /^(\d{11})$/.test(val);
|
return /^1[3-9]\d{9}$/.test(val);
|
||||||
}
|
}
|
||||||
const ukey = common_vendor.ref(
|
const ukey = common_vendor.ref(
|
||||||
`${common_vendor.index.getStorageSync("openid") || ""}jgbg${String(Date.now()).slice(-5)}${String(Math.floor(Math.random() * 900) + 100)}`
|
`${common_vendor.index.getStorageSync("openid") || ""}jgbg${String(Date.now()).slice(-5)}${String(Math.floor(Math.random() * 900) + 100)}`
|
||||||
|
|
@ -165,7 +165,7 @@ const _sfc_main = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
common_vendor.index.__f__("error", "at pages/addjigou/where.vue:326", "订阅接口调用失败:", err);
|
common_vendor.index.__f__("error", "at pages/addjigou/where.vue:327", "订阅接口调用失败:", err);
|
||||||
common_vendor.index.showToast({
|
common_vendor.index.showToast({
|
||||||
title: "订阅失败",
|
title: "订阅失败",
|
||||||
icon: "none"
|
icon: "none"
|
||||||
|
|
@ -235,7 +235,7 @@ const _sfc_main = {
|
||||||
common_vendor.onShow(() => {
|
common_vendor.onShow(() => {
|
||||||
const data = common_vendor.index.getStorageSync("dingwei");
|
const data = common_vendor.index.getStorageSync("dingwei");
|
||||||
if (data) {
|
if (data) {
|
||||||
common_vendor.index.__f__("log", "at pages/addjigou/where.vue:410", "data", data);
|
common_vendor.index.__f__("log", "at pages/addjigou/where.vue:411", "data", data);
|
||||||
jigouweizhi.value = data.name;
|
jigouweizhi.value = data.name;
|
||||||
form.orgAddress = data.name;
|
form.orgAddress = data.name;
|
||||||
form.orgCoordinateLo = data.lng;
|
form.orgCoordinateLo = data.lng;
|
||||||
|
|
@ -291,6 +291,7 @@ const _sfc_main = {
|
||||||
form.orgLeaderPhone = data.orgLeaderPhone;
|
form.orgLeaderPhone = data.orgLeaderPhone;
|
||||||
form.orgPropertyType = data.orgPropertyType;
|
form.orgPropertyType = data.orgPropertyType;
|
||||||
form.orgBuildingArea = data.orgBuildingArea;
|
form.orgBuildingArea = data.orgBuildingArea;
|
||||||
|
common_vendor.index.__f__("log", "at pages/addjigou/where.vue:478", "111", form);
|
||||||
} else if (common_vendor.index.getStorageSync("baddata")) {
|
} else if (common_vendor.index.getStorageSync("baddata")) {
|
||||||
let data = common_vendor.index.getStorageSync("baddata");
|
let data = common_vendor.index.getStorageSync("baddata");
|
||||||
if (data.orgProvince_dictText) {
|
if (data.orgProvince_dictText) {
|
||||||
|
|
@ -304,6 +305,9 @@ const _sfc_main = {
|
||||||
form.orgLeaderPhone = data.orgLeaderPhone;
|
form.orgLeaderPhone = data.orgLeaderPhone;
|
||||||
form.orgPropertyType = data.orgPropertyType;
|
form.orgPropertyType = data.orgPropertyType;
|
||||||
form.orgBuildingArea = data.orgBuildingArea;
|
form.orgBuildingArea = data.orgBuildingArea;
|
||||||
|
common_vendor.index.__f__("log", "at pages/addjigou/where.vue:493", "222", form);
|
||||||
|
} else {
|
||||||
|
form.orgLeaderPhone = common_vendor.index.getStorageSync("tel");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return (_ctx, _cache) => {
|
return (_ctx, _cache) => {
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,18 @@
|
||||||
const common_vendor = require("../../common/vendor.js");
|
const common_vendor = require("../../common/vendor.js");
|
||||||
const request_index = require("../../request/index.js");
|
const request_index = require("../../request/index.js");
|
||||||
const api_loginApi = require("../../api/loginApi.js");
|
const api_loginApi = require("../../api/loginApi.js");
|
||||||
|
if (!Array) {
|
||||||
|
const _easycom_u_action_sheet2 = common_vendor.resolveComponent("u-action-sheet");
|
||||||
|
_easycom_u_action_sheet2();
|
||||||
|
}
|
||||||
|
const _easycom_u_action_sheet = () => "../../uni_modules/vk-uview-ui/components/u-action-sheet/u-action-sheet.js";
|
||||||
|
if (!Math) {
|
||||||
|
_easycom_u_action_sheet();
|
||||||
|
}
|
||||||
const _sfc_main = {
|
const _sfc_main = {
|
||||||
__name: "IDcard",
|
__name: "IDcard",
|
||||||
setup(__props) {
|
setup(__props) {
|
||||||
|
const bottomshow = common_vendor.ref(false);
|
||||||
const form = common_vendor.reactive({
|
const form = common_vendor.reactive({
|
||||||
name: "",
|
name: "",
|
||||||
tel: "",
|
tel: "",
|
||||||
|
|
@ -17,22 +26,68 @@ const _sfc_main = {
|
||||||
openId: common_vendor.index.getStorageSync("openid"),
|
openId: common_vendor.index.getStorageSync("openid"),
|
||||||
relationship: ""
|
relationship: ""
|
||||||
});
|
});
|
||||||
|
const bottomlist = [{
|
||||||
|
text: "拍摄图片",
|
||||||
|
fontSize: 40
|
||||||
|
}, {
|
||||||
|
text: "图片预览",
|
||||||
|
fontSize: 40
|
||||||
|
}];
|
||||||
function isValid11DigitNumber(val) {
|
function isValid11DigitNumber(val) {
|
||||||
return /^(\d{11})$/.test(val);
|
return /^1[3-9]\d{9}$/.test(val);
|
||||||
}
|
}
|
||||||
function isValid18DigitNumber(val) {
|
function isValid18DigitNumber(val) {
|
||||||
return /^(\d{18})$/.test(val);
|
return /^(\d{18})$/.test(val);
|
||||||
}
|
}
|
||||||
|
const photoclick = (element) => {
|
||||||
|
if (element) {
|
||||||
|
common_vendor.index.previewImage({
|
||||||
|
urls: [specialImgeshow.value],
|
||||||
|
// 必填,所有要预览的图片地址数组
|
||||||
|
current: specialImgeshow.value,
|
||||||
|
// 可选,当前显示图片的地址,默认是 urls[0]
|
||||||
|
indicator: "default",
|
||||||
|
// 可选,指示器样式,H5/App 有效,值为 'default'(圆点)或 'number'(数字)
|
||||||
|
longPressActions: {
|
||||||
|
// 可选,仅 App 支持,长按图片时弹出的操作项
|
||||||
|
itemList: ["保存图片到相册"]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
angetMessage();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const specialImge = common_vendor.ref("");
|
||||||
|
const uping = common_vendor.ref(true);
|
||||||
|
const selectphoto = () => {
|
||||||
|
if (!uping.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (specialImge.value) {
|
||||||
|
bottomshow.value = true;
|
||||||
|
} else {
|
||||||
|
angetMessage();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
function angetMessage() {
|
||||||
|
common_vendor.index.chooseImage({
|
||||||
|
count: 1,
|
||||||
|
sourceType: ["album", "camera"],
|
||||||
|
success: (chooseRes) => {
|
||||||
|
common_vendor.index.navigateTo({
|
||||||
|
url: `/compontent/public/camera?url=${chooseRes.tempFilePaths[0]}&type=0`
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
common_vendor.index.__f__("error", "at pages/addoldman/IDcard.vue:174", "拍照失败:", err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
const ukey = common_vendor.ref(
|
const ukey = common_vendor.ref(
|
||||||
`${common_vendor.index.getStorageSync("openid") || ""}jhbg${String(Date.now()).slice(-5)}${String(Math.floor(Math.random() * 900) + 100)}`
|
`${common_vendor.index.getStorageSync("openid") || ""}jhbg${String(Date.now()).slice(-5)}${String(Math.floor(Math.random() * 900) + 100)}`
|
||||||
);
|
);
|
||||||
const next = () => {
|
const next = () => {
|
||||||
if (!form.relationship) {
|
if (!form.name) {
|
||||||
common_vendor.index.showToast({
|
|
||||||
title: "请填写与长者关系",
|
|
||||||
icon: "error"
|
|
||||||
});
|
|
||||||
} else if (!form.name) {
|
|
||||||
common_vendor.index.showToast({
|
common_vendor.index.showToast({
|
||||||
title: "请填写姓名",
|
title: "请填写姓名",
|
||||||
icon: "error"
|
icon: "error"
|
||||||
|
|
@ -78,6 +133,7 @@ const _sfc_main = {
|
||||||
data.guardianHomeAddress = form.homeAddress;
|
data.guardianHomeAddress = form.homeAddress;
|
||||||
data.guardianWorkUnit = form.workUnit;
|
data.guardianWorkUnit = form.workUnit;
|
||||||
data.relationship = form.relationship;
|
data.relationship = form.relationship;
|
||||||
|
data.guardianIdCardPositive = specialImge.value;
|
||||||
data.modifyType = "jhr";
|
data.modifyType = "jhr";
|
||||||
const urlpost = `${request_index.base_url}/api/elderInfo/updateElderInfo?ukey=${ukey.value}`;
|
const urlpost = `${request_index.base_url}/api/elderInfo/updateElderInfo?ukey=${ukey.value}`;
|
||||||
common_vendor.index.request({
|
common_vendor.index.request({
|
||||||
|
|
@ -113,7 +169,7 @@ const _sfc_main = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: (e) => {
|
fail: (e) => {
|
||||||
common_vendor.index.__f__("log", "at pages/addoldman/IDcard.vue:192", "????", e);
|
common_vendor.index.__f__("log", "at pages/addoldman/IDcard.vue:271", "????", e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -124,6 +180,7 @@ const _sfc_main = {
|
||||||
data.guardianHomeAddress = form.homeAddress;
|
data.guardianHomeAddress = form.homeAddress;
|
||||||
data.guardianWorkUnit = form.workUnit;
|
data.guardianWorkUnit = form.workUnit;
|
||||||
data.relationship = form.relationship;
|
data.relationship = form.relationship;
|
||||||
|
data.guardianIdCardPositive = specialImge.value;
|
||||||
const urlpost = `${request_index.base_url}/api/elderInfo/addElder?ukey=${ukey.value}`;
|
const urlpost = `${request_index.base_url}/api/elderInfo/addElder?ukey=${ukey.value}`;
|
||||||
common_vendor.index.request({
|
common_vendor.index.request({
|
||||||
url: urlpost,
|
url: urlpost,
|
||||||
|
|
@ -172,6 +229,7 @@ const _sfc_main = {
|
||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
common_vendor.index.navigateBack();
|
common_vendor.index.navigateBack();
|
||||||
};
|
};
|
||||||
|
const specialImgeshow = common_vendor.ref("");
|
||||||
common_vendor.onLoad(() => {
|
common_vendor.onLoad(() => {
|
||||||
if (common_vendor.index.getStorageSync("allinfo").name) {
|
if (common_vendor.index.getStorageSync("allinfo").name) {
|
||||||
let data = common_vendor.index.getStorageSync("allinfo");
|
let data = common_vendor.index.getStorageSync("allinfo");
|
||||||
|
|
@ -190,28 +248,115 @@ const _sfc_main = {
|
||||||
keys.forEach((key) => {
|
keys.forEach((key) => {
|
||||||
form[key] = data[key] || "";
|
form[key] = data[key] || "";
|
||||||
});
|
});
|
||||||
common_vendor.index.__f__("log", "at pages/addoldman/IDcard.vue:324", "????", common_vendor.index.getStorageSync("allinfo"));
|
specialImge.value = data.guardianIdCardPositive;
|
||||||
|
specialImgeshow.value = request_index.media_base_url + data.guardianIdCardPositive;
|
||||||
|
common_vendor.index.__f__("log", "at pages/addoldman/IDcard.vue:406", "????", common_vendor.index.getStorageSync("allinfo"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function uploadImage(filePath) {
|
||||||
|
uping.value = false;
|
||||||
|
common_vendor.index.showLoading();
|
||||||
|
common_vendor.index.uploadFile({
|
||||||
|
url: `${request_index.base_url}/api/ocr/idCard`,
|
||||||
|
// 替换为您的POST接口地址
|
||||||
|
filePath,
|
||||||
|
name: "file",
|
||||||
|
// 后端接收时的字段名
|
||||||
|
header: {
|
||||||
|
"X-Access-Token": common_vendor.index.getStorageSync("token") || ""
|
||||||
|
},
|
||||||
|
formData: {},
|
||||||
|
success: (uploadRes) => {
|
||||||
|
if (!JSON.parse(uploadRes.data).success) {
|
||||||
|
common_vendor.index.hideLoading();
|
||||||
|
common_vendor.index.showToast({
|
||||||
|
title: "识别失败",
|
||||||
|
icon: "error",
|
||||||
|
duration: 2e3
|
||||||
|
});
|
||||||
|
uping.value = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.face) {
|
||||||
|
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.face.data;
|
||||||
|
specialImgeshow.value = filePath;
|
||||||
|
form.name = father.name;
|
||||||
|
form.idCard = father.idNumber;
|
||||||
|
form.homeAddress = father.address;
|
||||||
|
savephoto(filePath);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
common_vendor.index.showToast({
|
||||||
|
title: "上传出错",
|
||||||
|
icon: "error"
|
||||||
|
});
|
||||||
|
common_vendor.index.hideLoading();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const savephoto = (filePath, type) => {
|
||||||
|
common_vendor.index.uploadFile({
|
||||||
|
url: `${request_index.base_url}/sys/common/upload`,
|
||||||
|
// 替换为您的POST接口地址
|
||||||
|
filePath,
|
||||||
|
name: "file",
|
||||||
|
// 后端接收时的字段名
|
||||||
|
header: {
|
||||||
|
"X-Access-Token": common_vendor.index.getStorageSync("token") || ""
|
||||||
|
},
|
||||||
|
formData: {
|
||||||
|
biz: `temp`
|
||||||
|
},
|
||||||
|
success: (uploadRes) => {
|
||||||
|
specialImge.value = JSON.parse(uploadRes.data).message;
|
||||||
|
common_vendor.index.hideLoading();
|
||||||
|
uping.value = true;
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
common_vendor.index.showToast({
|
||||||
|
title: "上传出错",
|
||||||
|
icon: "error"
|
||||||
|
});
|
||||||
|
common_vendor.index.hideLoading();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
common_vendor.onShow(() => {
|
||||||
|
const img = common_vendor.index.getStorageSync("imgkey0");
|
||||||
|
if (img) {
|
||||||
|
uploadImage(img);
|
||||||
|
common_vendor.index.removeStorageSync("imgkey0");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return (_ctx, _cache) => {
|
return (_ctx, _cache) => {
|
||||||
return {
|
return common_vendor.e({
|
||||||
a: common_vendor.o(goBack),
|
a: common_vendor.o(goBack),
|
||||||
b: `${common_vendor.index.getStorageSync("moveHeight") + 40}px`,
|
b: `${common_vendor.index.getStorageSync("moveHeight") + 40}px`,
|
||||||
c: `${common_vendor.index.getStorageSync("moveHeight") + 40}px`,
|
c: `${common_vendor.index.getStorageSync("moveHeight") + 40}px`,
|
||||||
d: form.relationship,
|
d: specialImge.value ? `${common_vendor.unref(request_index.media_base_url)}${specialImge.value}` : `https://www.focusnu.com/media/directive/index/IDfront.png`,
|
||||||
e: common_vendor.o(($event) => form.relationship = $event.detail.value),
|
e: specialImge.value ? `` : `https://www.focusnu.com/media/directive/index/bian.png`,
|
||||||
f: form.name,
|
f: !specialImge.value
|
||||||
g: common_vendor.o(($event) => form.name = $event.detail.value),
|
}, !specialImge.value ? {} : {}, {
|
||||||
h: form.tel,
|
g: common_vendor.o(($event) => selectphoto()),
|
||||||
i: common_vendor.o(($event) => form.tel = $event.detail.value),
|
h: form.name,
|
||||||
j: form.idCard,
|
i: common_vendor.o(($event) => form.name = $event.detail.value),
|
||||||
k: common_vendor.o(($event) => form.idCard = $event.detail.value),
|
j: form.tel,
|
||||||
l: form.homeAddress,
|
k: common_vendor.o(($event) => form.tel = $event.detail.value),
|
||||||
m: common_vendor.o(($event) => form.homeAddress = $event.detail.value),
|
l: form.idCard,
|
||||||
n: form.workUnit,
|
m: common_vendor.o(($event) => form.idCard = $event.detail.value),
|
||||||
o: common_vendor.o(($event) => form.workUnit = $event.detail.value),
|
n: form.homeAddress,
|
||||||
p: common_vendor.o(next)
|
o: common_vendor.o(($event) => form.homeAddress = $event.detail.value),
|
||||||
};
|
p: form.workUnit,
|
||||||
|
q: common_vendor.o(($event) => form.workUnit = $event.detail.value),
|
||||||
|
r: common_vendor.o(next),
|
||||||
|
s: common_vendor.o(photoclick),
|
||||||
|
t: common_vendor.o(($event) => bottomshow.value = $event),
|
||||||
|
v: common_vendor.p({
|
||||||
|
list: bottomlist,
|
||||||
|
modelValue: bottomshow.value
|
||||||
|
})
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
"navigationBarTitleText": "长者信息采集",
|
"navigationBarTitleText": "长者信息采集",
|
||||||
"usingComponents": {}
|
"usingComponents": {
|
||||||
|
"u-action-sheet": "../../uni_modules/vk-uview-ui/components/u-action-sheet/u-action-sheet"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1 +1 @@
|
||||||
<view class="container data-v-5fcb8e22"><image class="greenbgc data-v-5fcb8e22" src="https://www.focusnu.com/media/directive/index/greenbgc.png"/><view class="title-back data-v-5fcb8e22" style="{{'height:' + b}}"><view class="left-father data-v-5fcb8e22" bindtap="{{a}}"><image class="back-img data-v-5fcb8e22" src="https://www.focusnu.com/media/directive/index/left.png"/><view class="data-v-5fcb8e22" style="font-size:30rpx">监护人信息</view></view></view><view class="data-v-5fcb8e22" style="{{'height:' + c}}"></view><view class="white-content data-v-5fcb8e22"><view class="content-title data-v-5fcb8e22"><view class="shu data-v-5fcb8e22"></view><view class="content-weight data-v-5fcb8e22">监护人基本信息</view></view><view class="white-message data-v-5fcb8e22"><view class="data-v-5fcb8e22"><view class="one data-v-5fcb8e22"><view class="one-left data-v-5fcb8e22">与长者关系</view><input class="one-right data-v-5fcb8e22" maxlength="10" placeholder="请输入与长者关系" value="{{d}}" bindinput="{{e}}"/></view><view class="one data-v-5fcb8e22"><view class="one-left data-v-5fcb8e22">姓名</view><input class="one-right data-v-5fcb8e22" maxlength="5" placeholder="请输入姓名" value="{{f}}" bindinput="{{g}}"/></view><view class="one data-v-5fcb8e22"><view class="one-left data-v-5fcb8e22">电话</view><input class="one-right data-v-5fcb8e22" type="number" maxlength="11" placeholder="请输入电话" value="{{h}}" bindinput="{{i}}"/></view><view class="one data-v-5fcb8e22"><view class="one-left data-v-5fcb8e22">身份证号</view><input class="one-right data-v-5fcb8e22" type="number" maxlength="18" placeholder="请输入身份证号" value="{{j}}" bindinput="{{k}}"/></view><view class="one data-v-5fcb8e22"><view class="one-left data-v-5fcb8e22">家庭住址</view><input class="one-right data-v-5fcb8e22" maxlength="30" placeholder="请输入家庭住址" value="{{l}}" bindinput="{{m}}"/></view><view class="one data-v-5fcb8e22"><view class="one-left data-v-5fcb8e22">工作单位</view><input class="one-right data-v-5fcb8e22" maxlength="40" placeholder="请输入工作单位" value="{{n}}" bindinput="{{o}}"/></view></view></view></view><view class="data-v-5fcb8e22" style="display:flex;width:100%;position:fixed;bottom:20rpx;left:0"><view class="finish-button data-v-5fcb8e22" bindtap="{{p}}"> 提交 </view></view></view>
|
<view class="container data-v-5fcb8e22"><image class="greenbgc data-v-5fcb8e22" src="https://www.focusnu.com/media/directive/index/greenbgc.png"/><view class="title-back data-v-5fcb8e22" style="{{'height:' + b}}"><view class="left-father data-v-5fcb8e22" bindtap="{{a}}"><image class="back-img data-v-5fcb8e22" src="https://www.focusnu.com/media/directive/index/left.png"/><view class="data-v-5fcb8e22" style="font-size:30rpx">监护人信息</view></view></view><view class="data-v-5fcb8e22" style="{{'height:' + c}}"></view><view class="white-content data-v-5fcb8e22"><view class="content-title data-v-5fcb8e22"><view class="shu data-v-5fcb8e22"></view><view class="content-weight data-v-5fcb8e22">监护人基本信息</view></view><view class="white-photo data-v-5fcb8e22" bindtap="{{g}}"><view class="photo-left data-v-5fcb8e22"><view class="photo-weight data-v-5fcb8e22">监护人人像面</view><view class="photo-font data-v-5fcb8e22">请上传身份证人像面</view></view><view class="data-v-5fcb8e22" style="position:relative"><image class="photo data-v-5fcb8e22" src="{{d}}"/><image class="data-v-5fcb8e22" style="width:100%;height:100%;top:0;left:0;z-index:1;position:absolute" src="{{e}}"/><image wx:if="{{f}}" class="data-v-5fcb8e22" style="position:absolute;top:50%;left:50%;width:70rpx;height:60rpx;transform:translate(-50%,-50%)" src="https://www.focusnu.com/media/directive/index/takephoto.png"/></view></view><view class="white-message data-v-5fcb8e22"><view class="data-v-5fcb8e22"><view class="one data-v-5fcb8e22"><view class="one-left data-v-5fcb8e22">姓名</view><input class="one-right data-v-5fcb8e22" maxlength="5" placeholder="请输入姓名" value="{{h}}" bindinput="{{i}}"/></view><view class="one data-v-5fcb8e22"><view class="one-left data-v-5fcb8e22">电话</view><input class="one-right data-v-5fcb8e22" type="number" maxlength="11" placeholder="请输入电话" value="{{j}}" bindinput="{{k}}"/></view><view class="one data-v-5fcb8e22"><view class="one-left data-v-5fcb8e22">身份证号</view><input class="one-right data-v-5fcb8e22" type="number" maxlength="18" placeholder="请输入身份证号" value="{{l}}" bindinput="{{m}}"/></view><view class="one data-v-5fcb8e22"><view class="one-left data-v-5fcb8e22">家庭住址</view><input class="one-right data-v-5fcb8e22" maxlength="30" placeholder="请输入家庭住址" value="{{n}}" bindinput="{{o}}"/></view><view class="one data-v-5fcb8e22"><view class="one-left data-v-5fcb8e22">工作单位</view><input class="one-right data-v-5fcb8e22" maxlength="40" placeholder="请输入工作单位" value="{{p}}" bindinput="{{q}}"/></view></view></view></view><view class="data-v-5fcb8e22" style="display:flex;width:100%;position:fixed;bottom:20rpx;left:0"><view class="finish-button data-v-5fcb8e22" bindtap="{{r}}"> 提交 </view></view><u-action-sheet wx:if="{{v}}" class="data-v-5fcb8e22" bindclick="{{s}}" u-i="5fcb8e22-0" bind:__l="__l" bindupdateModelValue="{{t}}" u-p="{{v}}"></u-action-sheet></view>
|
||||||
|
|
@ -144,3 +144,26 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 700rpx;
|
height: 700rpx;
|
||||||
}
|
}
|
||||||
|
.white-photo.data-v-5fcb8e22 {
|
||||||
|
width: 100%;
|
||||||
|
height: 300rpx;
|
||||||
|
border-radius: 35rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.white-photo .photo.data-v-5fcb8e22 {
|
||||||
|
width: 300rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
}
|
||||||
|
.photo-left .photo-weight.data-v-5fcb8e22 {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.photo-left .photo-font.data-v-5fcb8e22 {
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
const common_vendor = require("../../common/vendor.js");
|
const common_vendor = require("../../common/vendor.js");
|
||||||
|
const request_index = require("../../request/index.js");
|
||||||
if (!Math) {
|
if (!Math) {
|
||||||
model();
|
model();
|
||||||
}
|
}
|
||||||
|
|
@ -9,10 +10,35 @@ const _sfc_main = {
|
||||||
setup(__props) {
|
setup(__props) {
|
||||||
const show = common_vendor.ref(false);
|
const show = common_vendor.ref(false);
|
||||||
const content = common_vendor.ref("");
|
const content = common_vendor.ref("");
|
||||||
|
const headImge0 = common_vendor.ref("");
|
||||||
const statusarray = ["loading", "success", "fail"];
|
const statusarray = ["loading", "success", "fail"];
|
||||||
const nameArray = ["与长者关系", "姓名", "电话", "身份证号码", "家庭住址", "工作单位"];
|
const nameArray = ["姓名", "电话", "身份证号码", "家庭住址", "工作单位"];
|
||||||
const textArray = common_vendor.reactive(["", "", "", "", "", ""]);
|
const textArray = common_vendor.reactive(["", "", "", "", ""]);
|
||||||
common_vendor.ref("");
|
common_vendor.ref("");
|
||||||
|
function getMessage(url) {
|
||||||
|
if (!url) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
common_vendor.index.previewImage({
|
||||||
|
current: url,
|
||||||
|
// 当前显示图片的链接
|
||||||
|
urls: [url],
|
||||||
|
// 可以预览的图片列表
|
||||||
|
indicator: "default",
|
||||||
|
// 显示面板指示点,'default'|'number'|'none'
|
||||||
|
loop: true,
|
||||||
|
// 是否可循环预览
|
||||||
|
longPressActions: {
|
||||||
|
itemList: ["保存图片"],
|
||||||
|
success: (data) => {
|
||||||
|
common_vendor.index.__f__("log", "at pages/addoldman/jianhurenall.vue:107", "长按操作成功", data);
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
common_vendor.index.__f__("error", "at pages/addoldman/jianhurenall.vue:110", "长按操作失败", err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
function isAtLeastEightChars(str) {
|
function isAtLeastEightChars(str) {
|
||||||
return typeof str === "string" && str.length >= 12;
|
return typeof str === "string" && str.length >= 12;
|
||||||
}
|
}
|
||||||
|
|
@ -37,12 +63,12 @@ const _sfc_main = {
|
||||||
if (data.content) {
|
if (data.content) {
|
||||||
contentred.value = data.content;
|
contentred.value = data.content;
|
||||||
}
|
}
|
||||||
textArray[0] = data.relationship;
|
textArray[0] = data.guardianName;
|
||||||
textArray[1] = data.guardianName;
|
textArray[1] = data.guardianPhone;
|
||||||
textArray[2] = data.guardianPhone;
|
textArray[2] = data.guardianIdCard;
|
||||||
textArray[3] = data.guardianIdCard;
|
textArray[3] = data.guardianHomeAddress;
|
||||||
textArray[4] = data.guardianHomeAddress;
|
textArray[4] = data.guardianWorkUnit;
|
||||||
textArray[5] = data.guardianWorkUnit;
|
headImge0.value = `${request_index.media_base_url}${data.guardianIdCardPositive}`;
|
||||||
});
|
});
|
||||||
const changeMessage = () => {
|
const changeMessage = () => {
|
||||||
if (alldata.value.guardianModifyStatus == "1") {
|
if (alldata.value.guardianModifyStatus == "1") {
|
||||||
|
|
@ -76,7 +102,11 @@ const _sfc_main = {
|
||||||
}, !applyStatus.value ? {
|
}, !applyStatus.value ? {
|
||||||
h: common_vendor.o(changeMessage)
|
h: common_vendor.o(changeMessage)
|
||||||
} : {}, {
|
} : {}, {
|
||||||
i: common_vendor.f(nameArray, (item, index, i0) => {
|
i: headImge0.value ? headImge0.value : `https://www.focusnu.com/media/directive/index/zhizhao.png`,
|
||||||
|
j: !headImge0.value
|
||||||
|
}, !headImge0.value ? {} : {}, {
|
||||||
|
k: common_vendor.o(($event) => getMessage(headImge0.value)),
|
||||||
|
l: common_vendor.f(nameArray, (item, index, i0) => {
|
||||||
return {
|
return {
|
||||||
a: common_vendor.t(item),
|
a: common_vendor.t(item),
|
||||||
b: common_vendor.t(textArray[index] ? textArray[index] : "自动获取"),
|
b: common_vendor.t(textArray[index] ? textArray[index] : "自动获取"),
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
<view class="container data-v-b2e00674"><model wx:if="{{b}}" class="data-v-b2e00674" bindclose="{{a}}" u-i="b2e00674-0" bind:__l="__l" u-p="{{b}}"/><image class="greenbgc data-v-b2e00674" src="https://www.focusnu.com/media/directive/index/greenbgc.png"/><view class="title-back data-v-b2e00674" style="{{'height:' + d}}"><view class="left-father data-v-b2e00674" bindtap="{{c}}"><image class="back-img data-v-b2e00674" src="https://www.focusnu.com/media/directive/index/left.png"/><view class="data-v-b2e00674" style="font-size:30rpx">监护人信息</view></view></view><view class="data-v-b2e00674" style="{{'height:' + e}}"></view><view class="white-content data-v-b2e00674"><view class="content-title data-v-b2e00674" style="margin:20rpx 0;justify-content:space-between"><view class="data-v-b2e00674" style="display:flex"><view class="shu data-v-b2e00674"></view><view class="content-weight data-v-b2e00674" style="margin-top:-2rpx">监护人基本信息</view><image class="shu-img data-v-b2e00674" src="{{f}}"/></view><view wx:if="{{g}}" class="small-blue data-v-b2e00674" bindtap="{{h}}"> 修改监护人信息 </view></view><view class="white-message data-v-b2e00674"><view class="data-v-b2e00674"><view wx:for="{{i}}" wx:for-item="item" wx:key="c" class="one data-v-b2e00674" bindtap="{{item.d}}"><view class="one-left data-v-b2e00674">{{item.a}}</view><view class="one-right data-v-b2e00674">{{item.b}}</view></view></view></view></view><view class="data-v-b2e00674" style="display:flex;width:100%;margin-top:40rpx"></view></view>
|
<view class="container data-v-b2e00674"><model wx:if="{{b}}" class="data-v-b2e00674" bindclose="{{a}}" u-i="b2e00674-0" bind:__l="__l" u-p="{{b}}"/><image class="greenbgc data-v-b2e00674" src="https://www.focusnu.com/media/directive/index/greenbgc.png"/><view class="title-back data-v-b2e00674" style="{{'height:' + d}}"><view class="left-father data-v-b2e00674" bindtap="{{c}}"><image class="back-img data-v-b2e00674" src="https://www.focusnu.com/media/directive/index/left.png"/><view class="data-v-b2e00674" style="font-size:30rpx">监护人信息</view></view></view><view class="data-v-b2e00674" style="{{'height:' + e}}"></view><view class="white-content data-v-b2e00674"><view class="content-title data-v-b2e00674" style="margin:20rpx 0;justify-content:space-between"><view class="data-v-b2e00674" style="display:flex"><view class="shu data-v-b2e00674"></view><view class="content-weight data-v-b2e00674" style="margin-top:-2rpx">监护人基本信息</view><image class="shu-img data-v-b2e00674" src="{{f}}"/></view><view wx:if="{{g}}" class="small-blue data-v-b2e00674" bindtap="{{h}}"> 修改监护人信息 </view></view><view class="white-photo data-v-b2e00674" bindtap="{{k}}"><view class="photo-left data-v-b2e00674"><view class="photo-weight data-v-b2e00674">监护人人像面</view></view><view class="data-v-b2e00674" style="position:relative"><image class="photo data-v-b2e00674" src="{{i}}"/><image wx:if="{{j}}" class="data-v-b2e00674" style="position:absolute;top:50%;left:50%;width:70rpx;height:60rpx;transform:translate(-50%,-50%)" src="https://www.focusnu.com/media/directive/index/takephoto.png"/></view></view><view class="white-message data-v-b2e00674"><view class="data-v-b2e00674"><view wx:for="{{l}}" wx:for-item="item" wx:key="c" class="one data-v-b2e00674" bindtap="{{item.d}}"><view class="one-left data-v-b2e00674">{{item.a}}</view><view class="one-right data-v-b2e00674">{{item.b}}</view></view></view></view></view><view class="data-v-b2e00674" style="display:flex;width:100%;margin-top:40rpx"></view></view>
|
||||||
|
|
@ -41,9 +41,9 @@ const _sfc_main = {
|
||||||
const photoclick = (element) => {
|
const photoclick = (element) => {
|
||||||
if (element) {
|
if (element) {
|
||||||
common_vendor.index.previewImage({
|
common_vendor.index.previewImage({
|
||||||
urls: [headImge.value, backImge.value],
|
urls: [headImge.value, backImge.value, specialImgeshow.value],
|
||||||
// 必填,所有要预览的图片地址数组
|
// 必填,所有要预览的图片地址数组
|
||||||
current: targetphoto.value ? backImge.value : headImge.value,
|
current: targetphoto.value ? targetphoto.value == 1 ? backImge.value : specialImgeshow.value : headImge.value,
|
||||||
// 可选,当前显示图片的地址,默认是 urls[0]
|
// 可选,当前显示图片的地址,默认是 urls[0]
|
||||||
indicator: "default",
|
indicator: "default",
|
||||||
// 可选,指示器样式,H5/App 有效,值为 'default'(圆点)或 'number'(数字)
|
// 可选,指示器样式,H5/App 有效,值为 'default'(圆点)或 'number'(数字)
|
||||||
|
|
@ -58,16 +58,32 @@ const _sfc_main = {
|
||||||
};
|
};
|
||||||
const tempImagePath = common_vendor.ref("");
|
const tempImagePath = common_vendor.ref("");
|
||||||
const targetphoto = common_vendor.ref(0);
|
const targetphoto = common_vendor.ref(0);
|
||||||
|
const isspecial = common_vendor.ref(false);
|
||||||
const selectphoto = (number) => {
|
const selectphoto = (number) => {
|
||||||
if (!uping.value) {
|
if (!uping.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (backImge.value && headImge.value) {
|
|
||||||
targetphoto.value = number;
|
targetphoto.value = number;
|
||||||
|
if (!number) {
|
||||||
|
if (headImge.value) {
|
||||||
bottomshow.value = true;
|
bottomshow.value = true;
|
||||||
} else {
|
} else {
|
||||||
getMessage();
|
getMessage();
|
||||||
}
|
}
|
||||||
|
} else if (number == 1) {
|
||||||
|
if (backImge.value) {
|
||||||
|
bottomshow.value = true;
|
||||||
|
} else {
|
||||||
|
getMessage();
|
||||||
|
}
|
||||||
|
} else if (number == 2) {
|
||||||
|
if (specialImge.value) {
|
||||||
|
bottomshow.value = true;
|
||||||
|
} else {
|
||||||
|
isspecial.value = true;
|
||||||
|
getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
function getMessage() {
|
function getMessage() {
|
||||||
common_vendor.index.chooseImage({
|
common_vendor.index.chooseImage({
|
||||||
|
|
@ -80,10 +96,12 @@ const _sfc_main = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
common_vendor.index.__f__("error", "at pages/addoldman/oldIDcard.vue:241", "拍照失败:", err);
|
common_vendor.index.__f__("error", "at pages/addoldman/oldIDcard.vue:278", "拍照失败:", err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
const specialImge = common_vendor.ref("");
|
||||||
|
const specialImgeshow = common_vendor.ref("");
|
||||||
const headImge = common_vendor.ref("");
|
const headImge = common_vendor.ref("");
|
||||||
const backImge = common_vendor.ref("");
|
const backImge = common_vendor.ref("");
|
||||||
function uploadImage(filePath) {
|
function uploadImage(filePath) {
|
||||||
|
|
@ -110,6 +128,17 @@ const _sfc_main = {
|
||||||
uping.value = true;
|
uping.value = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (isspecial.value || targetphoto.value == 2) {
|
||||||
|
if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.face) {
|
||||||
|
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.face.data;
|
||||||
|
specialImgeshow.value = filePath;
|
||||||
|
form.name = father.name;
|
||||||
|
form.idCard = father.idNumber;
|
||||||
|
form.homeAddress = father.address;
|
||||||
|
savephoto(filePath, 2);
|
||||||
|
}
|
||||||
|
isspecial.value = false;
|
||||||
|
} else {
|
||||||
if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.face) {
|
if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.face) {
|
||||||
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.face.data;
|
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.face.data;
|
||||||
textArray[0] = father.name;
|
textArray[0] = father.name;
|
||||||
|
|
@ -135,6 +164,7 @@ const _sfc_main = {
|
||||||
});
|
});
|
||||||
uping.value = true;
|
uping.value = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
common_vendor.index.showToast({
|
common_vendor.index.showToast({
|
||||||
|
|
@ -162,8 +192,10 @@ const _sfc_main = {
|
||||||
success: (uploadRes) => {
|
success: (uploadRes) => {
|
||||||
if (!type) {
|
if (!type) {
|
||||||
fontphoto.value = JSON.parse(uploadRes.data).message;
|
fontphoto.value = JSON.parse(uploadRes.data).message;
|
||||||
} else {
|
} else if (type == 1) {
|
||||||
endphoto.value = JSON.parse(uploadRes.data).message;
|
endphoto.value = JSON.parse(uploadRes.data).message;
|
||||||
|
} else if (type == 2) {
|
||||||
|
specialImge.value = JSON.parse(uploadRes.data).message;
|
||||||
}
|
}
|
||||||
common_vendor.index.hideLoading();
|
common_vendor.index.hideLoading();
|
||||||
if (JSON.parse(uploadRes.data).code == 401) {
|
if (JSON.parse(uploadRes.data).code == 401) {
|
||||||
|
|
@ -182,8 +214,10 @@ const _sfc_main = {
|
||||||
success: (uploadRes2) => {
|
success: (uploadRes2) => {
|
||||||
if (!type) {
|
if (!type) {
|
||||||
fontphoto.value = JSON.parse(uploadRes2.data).message;
|
fontphoto.value = JSON.parse(uploadRes2.data).message;
|
||||||
} else {
|
} else if (type == 1) {
|
||||||
endphoto.value = JSON.parse(uploadRes2.data).message;
|
endphoto.value = JSON.parse(uploadRes2.data).message;
|
||||||
|
} else if (type == 2) {
|
||||||
|
specialImge.value = JSON.parse(uploadRes2.data).message;
|
||||||
}
|
}
|
||||||
uping.value = true;
|
uping.value = true;
|
||||||
},
|
},
|
||||||
|
|
@ -217,7 +251,7 @@ const _sfc_main = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function isValid11DigitNumber(val) {
|
function isValid11DigitNumber(val) {
|
||||||
return /^(\d{11})$/.test(val);
|
return /^1[3-9]\d{9}$/.test(val);
|
||||||
}
|
}
|
||||||
function isValid18DigitNumber(val) {
|
function isValid18DigitNumber(val) {
|
||||||
return /^(\d{18})$/.test(val);
|
return /^(\d{18})$/.test(val);
|
||||||
|
|
@ -226,6 +260,13 @@ const _sfc_main = {
|
||||||
`${common_vendor.index.getStorageSync("openid") || ""}lrbg${String(Date.now()).slice(-5)}${String(Math.floor(Math.random() * 900) + 100)}`
|
`${common_vendor.index.getStorageSync("openid") || ""}lrbg${String(Date.now()).slice(-5)}${String(Math.floor(Math.random() * 900) + 100)}`
|
||||||
);
|
);
|
||||||
const next = () => {
|
const next = () => {
|
||||||
|
if (!specialImge.value) {
|
||||||
|
common_vendor.index.showToast({
|
||||||
|
title: "请上传监护人身份证正面",
|
||||||
|
icon: "none"
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!fontphoto.value) {
|
if (!fontphoto.value) {
|
||||||
common_vendor.index.showToast({
|
common_vendor.index.showToast({
|
||||||
title: "请上传身份证正面",
|
title: "请上传身份证正面",
|
||||||
|
|
@ -240,13 +281,7 @@ const _sfc_main = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (canshow.value) {
|
if (canshow.value) {
|
||||||
if (!guanxi.value) {
|
if (!form.name) {
|
||||||
common_vendor.index.showToast({
|
|
||||||
title: "请填写与长者关系",
|
|
||||||
icon: "none"
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
} else if (!form.name) {
|
|
||||||
common_vendor.index.showToast({
|
common_vendor.index.showToast({
|
||||||
title: "请填写监护人姓名",
|
title: "请填写监护人姓名",
|
||||||
icon: "none"
|
icon: "none"
|
||||||
|
|
@ -304,6 +339,7 @@ const _sfc_main = {
|
||||||
data.nuId = common_vendor.index.getStorageSync("oldman").nuId;
|
data.nuId = common_vendor.index.getStorageSync("oldman").nuId;
|
||||||
data.idCardPositive = fontphoto.value;
|
data.idCardPositive = fontphoto.value;
|
||||||
data.idCardNegative = endphoto.value;
|
data.idCardNegative = endphoto.value;
|
||||||
|
data.guardianIdCardPositive = specialImge.value;
|
||||||
data.name = textArray[0];
|
data.name = textArray[0];
|
||||||
data.sex = textArray[1];
|
data.sex = textArray[1];
|
||||||
data.idCard = textArray[2];
|
data.idCard = textArray[2];
|
||||||
|
|
@ -358,7 +394,7 @@ const _sfc_main = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
fail: (e) => {
|
fail: (e) => {
|
||||||
common_vendor.index.__f__("log", "at pages/addoldman/oldIDcard.vue:559", "????", e);
|
common_vendor.index.__f__("log", "at pages/addoldman/oldIDcard.vue:630", "????", e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -437,11 +473,11 @@ const _sfc_main = {
|
||||||
canshow.value = false;
|
canshow.value = false;
|
||||||
fontphoto.value = data.idCardPositive;
|
fontphoto.value = data.idCardPositive;
|
||||||
endphoto.value = data.idCardNegative;
|
endphoto.value = data.idCardNegative;
|
||||||
|
specialImge.value = data.guardianIdCardPositive;
|
||||||
textArray[0] = data.name;
|
textArray[0] = data.name;
|
||||||
textArray[1] = data.sex;
|
textArray[1] = data.sex;
|
||||||
textArray[2] = data.idCard;
|
textArray[2] = data.idCard;
|
||||||
textArray[3] = data.national;
|
textArray[3] = data.national;
|
||||||
common_vendor.index.__f__("log", "at pages/addoldman/oldIDcard.vue:702", "????", data.dateOfBirth);
|
|
||||||
textArray[4] = data.dateOfBirth;
|
textArray[4] = data.dateOfBirth;
|
||||||
textArray[5] = data.houseAddress;
|
textArray[5] = data.houseAddress;
|
||||||
textArray[6] = data.issuingAuthority;
|
textArray[6] = data.issuingAuthority;
|
||||||
|
|
@ -450,6 +486,8 @@ const _sfc_main = {
|
||||||
data.endTime = data.endTime;
|
data.endTime = data.endTime;
|
||||||
id.value = data.id;
|
id.value = data.id;
|
||||||
textArray[7] = `${data.startTime}-${compontent_public_long.swapLongTerm(data.endTime)}`;
|
textArray[7] = `${data.startTime}-${compontent_public_long.swapLongTerm(data.endTime)}`;
|
||||||
|
} else {
|
||||||
|
form.tel = common_vendor.index.getStorageSync("tel");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
common_vendor.onShow(() => {
|
common_vendor.onShow(() => {
|
||||||
|
|
@ -470,31 +508,34 @@ const _sfc_main = {
|
||||||
d: `${common_vendor.index.getStorageSync("moveHeight") + 40}px`,
|
d: `${common_vendor.index.getStorageSync("moveHeight") + 40}px`,
|
||||||
e: `${common_vendor.index.getStorageSync("moveHeight") + 30}px`,
|
e: `${common_vendor.index.getStorageSync("moveHeight") + 30}px`,
|
||||||
f: canshow.value
|
f: canshow.value
|
||||||
}, canshow.value ? {
|
}, canshow.value ? common_vendor.e({
|
||||||
g: guanxi.value,
|
g: specialImge.value ? `${common_vendor.unref(request_index.media_base_url)}${specialImge.value}` : `https://www.focusnu.com/media/directive/index/IDfront.png`,
|
||||||
h: common_vendor.o(($event) => guanxi.value = $event.detail.value),
|
h: specialImge.value ? `` : `https://www.focusnu.com/media/directive/index/bian.png`,
|
||||||
i: form.name,
|
i: !specialImge.value
|
||||||
j: common_vendor.o(($event) => form.name = $event.detail.value),
|
}, !specialImge.value ? {} : {}, {
|
||||||
k: form.tel,
|
j: common_vendor.o(($event) => selectphoto(2)),
|
||||||
l: common_vendor.o(($event) => form.tel = $event.detail.value),
|
k: form.name,
|
||||||
m: form.idCard,
|
l: common_vendor.o(($event) => form.name = $event.detail.value),
|
||||||
n: common_vendor.o(($event) => form.idCard = $event.detail.value),
|
m: form.tel,
|
||||||
o: form.homeAddress,
|
n: common_vendor.o(($event) => form.tel = $event.detail.value),
|
||||||
p: common_vendor.o(($event) => form.homeAddress = $event.detail.value),
|
o: form.idCard,
|
||||||
q: form.workUnit,
|
p: common_vendor.o(($event) => form.idCard = $event.detail.value),
|
||||||
r: common_vendor.o(($event) => form.workUnit = $event.detail.value)
|
q: form.homeAddress,
|
||||||
} : {}, {
|
r: common_vendor.o(($event) => form.homeAddress = $event.detail.value),
|
||||||
s: fontphoto.value ? `${common_vendor.unref(request_index.media_base_url)}${fontphoto.value}` : `https://www.focusnu.com/media/directive/index/IDfront.png`,
|
s: form.workUnit,
|
||||||
t: fontphoto.value ? `` : `https://www.focusnu.com/media/directive/index/bian.png`,
|
t: common_vendor.o(($event) => form.workUnit = $event.detail.value)
|
||||||
v: !fontphoto.value
|
}) : {}, {
|
||||||
|
v: fontphoto.value ? `${common_vendor.unref(request_index.media_base_url)}${fontphoto.value}` : `https://www.focusnu.com/media/directive/index/IDfront.png`,
|
||||||
|
w: fontphoto.value ? `` : `https://www.focusnu.com/media/directive/index/bian.png`,
|
||||||
|
x: !fontphoto.value
|
||||||
}, !fontphoto.value ? {} : {}, {
|
}, !fontphoto.value ? {} : {}, {
|
||||||
w: common_vendor.o(($event) => selectphoto(0)),
|
y: common_vendor.o(($event) => selectphoto(0)),
|
||||||
x: endphoto.value ? `${common_vendor.unref(request_index.media_base_url)}${endphoto.value}` : `https://www.focusnu.com/media/directive/index/IDend.png`,
|
z: endphoto.value ? `${common_vendor.unref(request_index.media_base_url)}${endphoto.value}` : `https://www.focusnu.com/media/directive/index/IDend.png`,
|
||||||
y: endphoto.value ? `` : `https://www.focusnu.com/media/directive/index/bian.png`,
|
A: endphoto.value ? `` : `https://www.focusnu.com/media/directive/index/bian.png`,
|
||||||
z: !endphoto.value
|
B: !endphoto.value
|
||||||
}, !endphoto.value ? {} : {}, {
|
}, !endphoto.value ? {} : {}, {
|
||||||
A: common_vendor.o(($event) => selectphoto(1)),
|
C: common_vendor.o(($event) => selectphoto(1)),
|
||||||
B: common_vendor.f(nameArray, (item, index, i0) => {
|
D: common_vendor.f(nameArray, (item, index, i0) => {
|
||||||
return {
|
return {
|
||||||
a: common_vendor.t(item),
|
a: common_vendor.t(item),
|
||||||
b: common_vendor.t(textArray[index] ? textArray[index] : "自动获取"),
|
b: common_vendor.t(textArray[index] ? textArray[index] : "自动获取"),
|
||||||
|
|
@ -502,10 +543,10 @@ const _sfc_main = {
|
||||||
d: common_vendor.o(($event) => openLook(textArray[index]), index)
|
d: common_vendor.o(($event) => openLook(textArray[index]), index)
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
C: common_vendor.o(next),
|
E: common_vendor.o(next),
|
||||||
D: common_vendor.o(photoclick),
|
F: common_vendor.o(photoclick),
|
||||||
E: common_vendor.o(($event) => bottomshow.value = $event),
|
G: common_vendor.o(($event) => bottomshow.value = $event),
|
||||||
F: common_vendor.p({
|
H: common_vendor.p({
|
||||||
list: bottomlist,
|
list: bottomlist,
|
||||||
modelValue: bottomshow.value
|
modelValue: bottomshow.value
|
||||||
})
|
})
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -42,10 +42,10 @@ const _sfc_main = {
|
||||||
longPressActions: {
|
longPressActions: {
|
||||||
itemList: ["保存图片"],
|
itemList: ["保存图片"],
|
||||||
success: (data) => {
|
success: (data) => {
|
||||||
common_vendor.index.__f__("log", "at pages/addoldman/oldmanall.vue:152", "长按操作成功", data);
|
common_vendor.index.__f__("log", "at pages/addoldman/oldmanall.vue:153", "长按操作成功", data);
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
common_vendor.index.__f__("error", "at pages/addoldman/oldmanall.vue:155", "长按操作失败", err);
|
common_vendor.index.__f__("error", "at pages/addoldman/oldmanall.vue:156", "长按操作失败", err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -84,6 +84,7 @@ const _sfc_main = {
|
||||||
textArray[7] = `${data.startTime}-${compontent_public_long.swapLongTerm(data.endTime)}`;
|
textArray[7] = `${data.startTime}-${compontent_public_long.swapLongTerm(data.endTime)}`;
|
||||||
fontphoto.value = data.idCardPositive;
|
fontphoto.value = data.idCardPositive;
|
||||||
endphoto.value = data.idCardNegative;
|
endphoto.value = data.idCardNegative;
|
||||||
|
specialImge.value = data.guardianIdCardPositive;
|
||||||
});
|
});
|
||||||
const changeMessage = () => {
|
const changeMessage = () => {
|
||||||
if (alldata.value.elderModifyStatus == "1") {
|
if (alldata.value.elderModifyStatus == "1") {
|
||||||
|
|
@ -118,10 +119,10 @@ const _sfc_main = {
|
||||||
}, !applyStatus.value ? {
|
}, !applyStatus.value ? {
|
||||||
h: common_vendor.o(changeMessage)
|
h: common_vendor.o(changeMessage)
|
||||||
} : {}, {
|
} : {}, {
|
||||||
i: fontphoto.value ? `${common_vendor.unref(request_index.media_base_url)}${fontphoto.value}` : `https://www.focusnu.com/media/directive/index/IDcard.png`,
|
i: _ctx.specialImge ? `${common_vendor.unref(request_index.media_base_url)}${_ctx.specialImge}` : `https://www.focusnu.com/media/directive/index/IDcard.png`,
|
||||||
j: !fontphoto.value
|
j: !_ctx.specialImge
|
||||||
}, !fontphoto.value ? {} : {}, {
|
}, !_ctx.specialImge ? {} : {}, {
|
||||||
k: common_vendor.o(($event) => getMessage(`${common_vendor.unref(request_index.media_base_url)}${fontphoto.value}`)),
|
k: common_vendor.o(($event) => getMessage(`${common_vendor.unref(request_index.media_base_url)}${_ctx.specialImge}`)),
|
||||||
l: endphoto.value ? `${common_vendor.unref(request_index.media_base_url)}${endphoto.value}` : `https://www.focusnu.com/media/directive/index/backIDcard.png`,
|
l: endphoto.value ? `${common_vendor.unref(request_index.media_base_url)}${endphoto.value}` : `https://www.focusnu.com/media/directive/index/backIDcard.png`,
|
||||||
m: !endphoto.value
|
m: !endphoto.value
|
||||||
}, !endphoto.value ? {} : {}, {
|
}, !endphoto.value ? {} : {}, {
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,6 @@ const _sfc_main = {
|
||||||
textArray1[3] = Number(textArray1[3]) + "kg";
|
textArray1[3] = Number(textArray1[3]) + "kg";
|
||||||
});
|
});
|
||||||
const changeMessage = () => {
|
const changeMessage = () => {
|
||||||
common_vendor.index.__f__("log", "at pages/addstaff/all.vue:377", "????", alldata.value);
|
|
||||||
if (alldata.value.modifyState == "1") {
|
if (alldata.value.modifyState == "1") {
|
||||||
openLook("该信息正在审核中,请等待");
|
openLook("该信息正在审核中,请等待");
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -146,7 +145,7 @@ const _sfc_main = {
|
||||||
a: common_vendor.t(item),
|
a: common_vendor.t(item),
|
||||||
b: common_vendor.t(textArray1[index] ? textArray1[index] : "自动获取"),
|
b: common_vendor.t(textArray1[index] ? textArray1[index] : "自动获取"),
|
||||||
c: index,
|
c: index,
|
||||||
d: common_vendor.o(($event) => openLook(textArray[index]), index)
|
d: common_vendor.o(($event) => openLook(textArray1[index]), index)
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
j: common_vendor.s(!applyStatus.value ? {
|
j: common_vendor.s(!applyStatus.value ? {
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,9 @@ const _sfc_main = {
|
||||||
data.endTime = compontent_public_long.swapLongTerm(data.endTime);
|
data.endTime = compontent_public_long.swapLongTerm(data.endTime);
|
||||||
}
|
}
|
||||||
data.orgCode = common_vendor.index.getStorageSync("changeyuangongorgCode");
|
data.orgCode = common_vendor.index.getStorageSync("changeyuangongorgCode");
|
||||||
|
common_vendor.index.__f__("log", "at pages/addstaff/healthcertificate.vue:279", "AAAA", data, ukey.value);
|
||||||
pages_addstaff_api_addjigou.changemessage(data, ukey.value).then((res) => {
|
pages_addstaff_api_addjigou.changemessage(data, ukey.value).then((res) => {
|
||||||
|
common_vendor.index.__f__("log", "at pages/addstaff/healthcertificate.vue:281", "BBBB", res);
|
||||||
if (res.result == "重复提交") {
|
if (res.result == "重复提交") {
|
||||||
common_vendor.index.showToast({
|
common_vendor.index.showToast({
|
||||||
title: `重复提交`,
|
title: `重复提交`,
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ const _sfc_main = {
|
||||||
openId: common_vendor.index.getStorageSync("openid")
|
openId: common_vendor.index.getStorageSync("openid")
|
||||||
});
|
});
|
||||||
function isValid11DigitNumber(val) {
|
function isValid11DigitNumber(val) {
|
||||||
return /^(\d{11})$/.test(val);
|
return /^1[3-9]\d{9}$/.test(val);
|
||||||
}
|
}
|
||||||
const next = () => {
|
const next = () => {
|
||||||
if (!form.maritalStatus) {
|
if (!form.maritalStatus) {
|
||||||
|
|
@ -195,6 +195,11 @@ const _sfc_main = {
|
||||||
title: "请填写户口性质",
|
title: "请填写户口性质",
|
||||||
icon: "error"
|
icon: "error"
|
||||||
});
|
});
|
||||||
|
} else if (!form.currentAddress) {
|
||||||
|
common_vendor.index.showToast({
|
||||||
|
title: "请填写现住址",
|
||||||
|
icon: "error"
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
const data = form;
|
const data = form;
|
||||||
const merged2 = {
|
const merged2 = {
|
||||||
|
|
@ -236,6 +241,7 @@ const _sfc_main = {
|
||||||
form.showweight = form.weight + "kg";
|
form.showweight = form.weight + "kg";
|
||||||
} else {
|
} else {
|
||||||
common_vendor.index.setStorageSync("isstaffchange", false);
|
common_vendor.index.setStorageSync("isstaffchange", false);
|
||||||
|
form.tel = common_vendor.index.getStorageSync("tel");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return (_ctx, _cache) => {
|
return (_ctx, _cache) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue