修改了很多页面的bug,对头像进行了压缩
6
App.vue
|
|
@ -1,13 +1,13 @@
|
|||
<script>
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
console.log('App Launch')
|
||||
// console.log('App Launch')
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
// console.log('App Show')
|
||||
},
|
||||
onHide: function() {
|
||||
console.log('App Hide')
|
||||
// console.log('App Hide')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
<template>
|
||||
<view class="captcha-container" id="container">
|
||||
<view class="font-title">请通过滑块验证</view>
|
||||
<view class="captcha-image" style="position: relative; width: 100%; height: 400rpx; overflow: hidden;">
|
||||
<image :src="bgImage" class="bg-image" mode="widthFix" @load="init" />
|
||||
<view class="overlay" :style="{ width: containerWidth + 'px', height: containerHeight + 'px' }">
|
||||
<view
|
||||
class="hole"
|
||||
:style="{
|
||||
<view class="captcha-container" id="container">
|
||||
<view class="font-title">请通过滑块验证</view>
|
||||
<view class="captcha-image" style="position: relative; width: 100%; height: 400rpx; overflow: hidden;">
|
||||
<image :src="bgImage" class="bg-image" mode="widthFix" @load="init" />
|
||||
<view class="overlay" :style="{ width: containerWidth + 'px', height: containerHeight + 'px' }">
|
||||
<view class="hole" :style="{
|
||||
top: originY + 'px',
|
||||
left: originX + 'px',
|
||||
width: pieceSize + 'px',
|
||||
|
|
@ -14,12 +12,9 @@
|
|||
clipPath: clipPath,
|
||||
transform: 'translate(-50%, -50%)',
|
||||
backgroundColor: 'rgba(0,0,0,0.6)'
|
||||
}"
|
||||
></view>
|
||||
}"></view>
|
||||
|
||||
<view
|
||||
class="piece"
|
||||
:style="{
|
||||
<view class="piece" :style="{
|
||||
top: originY + 'px',
|
||||
left: offsetX + 'px',
|
||||
width: pieceSize + 'px',
|
||||
|
|
@ -29,74 +24,71 @@
|
|||
backgroundPosition: `-${originX}px -${originY}px`,
|
||||
clipPath: clipPath,
|
||||
transform: 'translate(-50%, -50%)'
|
||||
}"
|
||||
></view>
|
||||
</view>
|
||||
</view>
|
||||
}"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="slider-bar">
|
||||
<view class="slider-bar-font">向右拖动滑块填充拼图</view>
|
||||
<view
|
||||
class="slider-button"
|
||||
ref="btn"
|
||||
@touchstart="onStart"
|
||||
@touchmove="onMove"
|
||||
@touchend="onEnd"
|
||||
:style="{ left: offsetX + 'px', maxWidth: (containerWidth - pieceSize) + 'px' }"
|
||||
>
|
||||
<image
|
||||
src="https://www.focusnu.com/media/directive/login/right.png"
|
||||
style="width: 50rpx; height: 50rpx;"
|
||||
mode="widthFix"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="slider-bar">
|
||||
<view class="slider-bar-font">向右拖动滑块填充拼图</view>
|
||||
<view class="slider-button" ref="btn" @touchstart="onStart" @touchmove="onMove" @touchend="onEnd"
|
||||
:style="{ left: offsetX + 'px', maxWidth: (containerWidth - pieceSize) + 'px' }">
|
||||
<image src="https://www.focusnu.com/media/directive/login/right.png"
|
||||
style="width: 50rpx; height: 50rpx;" mode="widthFix" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, nextTick, getCurrentInstance,watch } from 'vue'
|
||||
const props = defineProps({
|
||||
show: {
|
||||
type: Boolean,
|
||||
required: false
|
||||
}
|
||||
})
|
||||
watch(
|
||||
() => props.show,
|
||||
() => {
|
||||
if (props.show == true) {
|
||||
let images = [
|
||||
'https://www.focusnu.com/media/directive/login/0.png',
|
||||
'https://www.focusnu.com/media/directive/login/1.png',
|
||||
'https://www.focusnu.com/media/directive/login/2.png',
|
||||
// 'https://www.focusnu.com/media/directive/login/3.png'
|
||||
]
|
||||
bgImage.value = images[Math.floor(Math.random() * images.length)]
|
||||
}
|
||||
}
|
||||
)
|
||||
const emit = defineEmits(['success'])
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
nextTick,
|
||||
getCurrentInstance,
|
||||
watch
|
||||
} from 'vue'
|
||||
// const props = defineProps({
|
||||
// show: {
|
||||
// type: Boolean,
|
||||
// required: false
|
||||
// }
|
||||
// })
|
||||
// watch(
|
||||
// () => props.show,
|
||||
// () => {
|
||||
// if (props.show == true) {
|
||||
// let images = [
|
||||
// 'https://www.focusnu.com/media/directive/login/0.png',
|
||||
// 'https://www.focusnu.com/media/directive/login/1.png',
|
||||
// 'https://www.focusnu.com/media/directive/login/2.png',
|
||||
// // 'https://www.focusnu.com/media/directive/login/3.png'
|
||||
// ]
|
||||
// bgImage.value = images[Math.floor(Math.random() * images.length)]
|
||||
// console.log("????",bgImage.value)
|
||||
// }
|
||||
// }
|
||||
// )
|
||||
const emit = defineEmits(['success'])
|
||||
|
||||
const pieceSize = 50 // 直接使用像素值
|
||||
const tolerance = 20
|
||||
const pieceSize = 50 // 直接使用像素值
|
||||
const tolerance = 20
|
||||
|
||||
const containerWidth = ref(0)
|
||||
const containerHeight = ref(0)
|
||||
const containerWidth = ref(0)
|
||||
const containerHeight = ref(0)
|
||||
|
||||
const originX = ref(0)
|
||||
const originY = ref(0)
|
||||
const offsetX = ref(0)
|
||||
const dragging = ref(false)
|
||||
const startX = ref(0)
|
||||
const originX = ref(0)
|
||||
const originY = ref(0)
|
||||
const offsetX = ref(0)
|
||||
const dragging = ref(false)
|
||||
const startX = ref(0)
|
||||
|
||||
const bgImage = ref('')
|
||||
const bgImage = ref('')
|
||||
|
||||
const instance = getCurrentInstance()
|
||||
const instance = getCurrentInstance()
|
||||
|
||||
function getPuzzlePiecePath(size) {
|
||||
const s = size
|
||||
return `
|
||||
function getPuzzlePiecePath(size) {
|
||||
const s = size
|
||||
return `
|
||||
M${10} 0
|
||||
h${s / 3 - 10}
|
||||
a${10} ${10} 0 0 1 0 ${20}
|
||||
|
|
@ -115,165 +107,170 @@ function getPuzzlePiecePath(size) {
|
|||
h-${s / 3 - 10}
|
||||
z
|
||||
`
|
||||
}
|
||||
}
|
||||
|
||||
const clipPath = `path('${getPuzzlePiecePath(pieceSize)}')`
|
||||
const clipPath = `path('${getPuzzlePiecePath(pieceSize)}')`
|
||||
|
||||
function init() {
|
||||
nextTick(() => {
|
||||
if (!instance) {
|
||||
console.error('无法获取组件实例')
|
||||
return
|
||||
}
|
||||
uni.createSelectorQuery()
|
||||
.in(instance.proxy)
|
||||
.select('.bg-image')
|
||||
.boundingClientRect(data => {
|
||||
if (!data) {
|
||||
console.error('无法获取图片尺寸')
|
||||
return
|
||||
}
|
||||
containerWidth.value = data.width
|
||||
containerHeight.value = data.height
|
||||
function init() {
|
||||
nextTick(() => {
|
||||
if (!instance) {
|
||||
console.error('无法获取组件实例')
|
||||
return
|
||||
}
|
||||
uni.createSelectorQuery()
|
||||
.in(instance.proxy)
|
||||
.select('.bg-image')
|
||||
.boundingClientRect(data => {
|
||||
if (!data) {
|
||||
console.error('无法获取图片尺寸')
|
||||
return
|
||||
}
|
||||
containerWidth.value = data.width
|
||||
containerHeight.value = data.height
|
||||
|
||||
originX.value = Math.random() * 0.8 * (containerWidth.value - pieceSize) + pieceSize / 2
|
||||
originX.value = Math.max(pieceSize / 2, Math.min(originX.value, containerWidth.value - pieceSize / 2))
|
||||
originY.value = containerHeight.value / 2
|
||||
offsetX.value = 0
|
||||
})
|
||||
.exec()
|
||||
})
|
||||
}
|
||||
originX.value = Math.random() * 0.8 * (containerWidth.value - pieceSize) + pieceSize / 2
|
||||
originX.value = Math.max(pieceSize / 2, Math.min(originX.value, containerWidth.value -
|
||||
pieceSize / 2))
|
||||
originY.value = containerHeight.value / 2
|
||||
offsetX.value = 0
|
||||
})
|
||||
.exec()
|
||||
})
|
||||
}
|
||||
|
||||
function onStart(e) {
|
||||
dragging.value = true
|
||||
startX.value = e.touches[0].clientX
|
||||
}
|
||||
function onStart(e) {
|
||||
dragging.value = true
|
||||
startX.value = e.touches[0].clientX
|
||||
}
|
||||
|
||||
function onMove(e) {
|
||||
if (!dragging.value) return
|
||||
const clientX = e.touches[0].clientX
|
||||
let dx = clientX - startX.value
|
||||
dx = Math.max(0, Math.min(dx, containerWidth.value - pieceSize))
|
||||
offsetX.value = dx
|
||||
}
|
||||
function onMove(e) {
|
||||
if (!dragging.value) return
|
||||
const clientX = e.touches[0].clientX
|
||||
let dx = clientX - startX.value
|
||||
dx = Math.max(0, Math.min(dx, containerWidth.value - pieceSize))
|
||||
offsetX.value = dx
|
||||
}
|
||||
|
||||
function onEnd() {
|
||||
dragging.value = false
|
||||
if (Math.abs(offsetX.value - originX.value) < tolerance) {
|
||||
uni.showToast({
|
||||
title: '验证成功',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
emit('success')
|
||||
} else {
|
||||
offsetX.value= 0
|
||||
uni.showToast({
|
||||
title: '验证失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
}
|
||||
function onEnd() {
|
||||
dragging.value = false
|
||||
if (Math.abs(offsetX.value - originX.value) < tolerance) {
|
||||
uni.showToast({
|
||||
title: '验证成功',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
emit('success')
|
||||
} else {
|
||||
offsetX.value = 0
|
||||
uni.showToast({
|
||||
title: '验证失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
// console.log('加载图片:', bgImage.value)
|
||||
})
|
||||
onMounted(() => {
|
||||
let images = [
|
||||
'https://www.focusnu.com/media/directive/login/0.png',
|
||||
'https://www.focusnu.com/media/directive/login/1.png',
|
||||
'https://www.focusnu.com/media/directive/login/2.png',
|
||||
]
|
||||
bgImage.value = images[Math.floor(Math.random() * images.length)]
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.captcha-container {
|
||||
user-select: none;
|
||||
background-color: #fff;
|
||||
width: 600rpx;
|
||||
height: 700rpx;
|
||||
margin: 0 auto;
|
||||
border-radius: 30rpx;
|
||||
overflow: hidden;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
.captcha-container {
|
||||
user-select: none;
|
||||
background-color: #fff;
|
||||
width: 600rpx;
|
||||
height: 700rpx;
|
||||
margin: 0 auto;
|
||||
border-radius: 30rpx;
|
||||
overflow: hidden;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.captcha-image {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.captcha-image {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.bg-image {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.bg-image {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 100;
|
||||
pointer-events: none;
|
||||
}
|
||||
.overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 100;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.hole,
|
||||
.piece {
|
||||
position: absolute;
|
||||
z-index: 101;
|
||||
box-shadow: 0 0 6rpx rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
.hole,
|
||||
.piece {
|
||||
position: absolute;
|
||||
z-index: 101;
|
||||
box-shadow: 0 0 6rpx rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.hole {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.hole {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.piece {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
cursor: grab;
|
||||
}
|
||||
.piece {
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.slider-bar {
|
||||
position: relative;
|
||||
height: 100rpx;
|
||||
margin-top: 0rpx;
|
||||
background: rgb(245, 246, 252);
|
||||
width: 540rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.slider-bar {
|
||||
position: relative;
|
||||
height: 100rpx;
|
||||
margin-top: 0rpx;
|
||||
background: rgb(245, 246, 252);
|
||||
width: 540rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.slider-bar-font {
|
||||
color: rgb(169, 169, 171);
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
.slider-bar-font {
|
||||
color: rgb(169, 169, 171);
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.slider-button {
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
left: 0;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
background: #fff;
|
||||
box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.2);
|
||||
user-select: none;
|
||||
border-radius: 10rpx;
|
||||
border: 3rpx solid rgb(139, 218, 202);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.slider-button {
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
left: 0;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
background: #fff;
|
||||
box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.2);
|
||||
user-select: none;
|
||||
border-radius: 10rpx;
|
||||
border: 3rpx solid rgb(139, 218, 202);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.font-title {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100rpx;
|
||||
font-size: 35rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.font-title {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100rpx;
|
||||
font-size: 35rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -89,9 +89,9 @@
|
|||
onShow
|
||||
} from '@dcloudio/uni-app';
|
||||
import {
|
||||
media_base_url,
|
||||
base_url
|
||||
} from '@/request/index.js';
|
||||
media_base_url,
|
||||
base_url
|
||||
} from '@/request/index.js';
|
||||
import {
|
||||
swapLongTerm
|
||||
} from '@/compontent/public/long.js'
|
||||
|
|
@ -128,7 +128,7 @@
|
|||
}
|
||||
}
|
||||
const photoclick = (element) => {
|
||||
if (element==2) {
|
||||
if (element == 2) {
|
||||
uni.previewImage({
|
||||
urls: [headImge.value, backImge.value], // 必填,所有要预览的图片地址数组
|
||||
current: targetphoto.value ? backImge.value : headImge.value, // 可选,当前显示图片的地址,默认是 urls[0]
|
||||
|
|
@ -234,7 +234,7 @@
|
|||
},
|
||||
formData: {},
|
||||
success: uploadRes => {
|
||||
console.log("token", uni.getStorageSync('token'))
|
||||
// console.log("token", uni.getStorageSync('token'))
|
||||
if (!JSON.parse(uploadRes.data).success) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
|
|
@ -259,7 +259,7 @@
|
|||
} else if (JSON.parse(JSON.parse(uploadRes.data).result.data).data.back)
|
||||
|
||||
{
|
||||
|
||||
|
||||
let father = JSON.parse(JSON.parse(uploadRes.data).result.data).data.back.data;
|
||||
// console.log(father)
|
||||
// textArray[6] = father.issueAuthority;
|
||||
|
|
@ -267,19 +267,19 @@
|
|||
// backImge.value = filePath;
|
||||
// savephoto(filePath, 1);
|
||||
let regex = /[\u4E00-\u9FA5\uF900-\uFA2D]{1,}/;
|
||||
console.log(regex.test(father.validPeriod))
|
||||
if(!regex.test(father.validPeriod)){
|
||||
console.log(regex.test(father.validPeriod))
|
||||
if (!regex.test(father.validPeriod)) {
|
||||
textArray[6] = father.issueAuthority;
|
||||
textArray[7] = father.validPeriod;
|
||||
backImge.value = filePath;
|
||||
savephoto(filePath, 1);
|
||||
}else{
|
||||
if(father.validPeriod.indexOf('长期')>-1){
|
||||
} else {
|
||||
if (father.validPeriod.indexOf('长期') > -1) {
|
||||
textArray[6] = father.issueAuthority;
|
||||
textArray[7] = father.validPeriod;
|
||||
backImge.value = filePath;
|
||||
savephoto(filePath, 1);
|
||||
}else{
|
||||
} else {
|
||||
textArray[7] = "";
|
||||
uni.showToast({
|
||||
title: '识别失败',
|
||||
|
|
@ -317,7 +317,7 @@
|
|||
const yyyy = now.getFullYear();
|
||||
const mm = String(now.getMonth() + 1).padStart(2, '0'); // 补0
|
||||
let path = '';
|
||||
|
||||
|
||||
switch ('jg') {
|
||||
case 'jg': // 机构
|
||||
path = `${yyyy}/${mm}/jgxx/jg`;
|
||||
|
|
@ -400,6 +400,7 @@
|
|||
show.value = true
|
||||
}
|
||||
}
|
||||
|
||||
function isValid18DigitNumber(val) {
|
||||
return /^(\d{18})$/.test(val);
|
||||
}
|
||||
|
|
@ -417,12 +418,12 @@
|
|||
})
|
||||
return
|
||||
}
|
||||
if(!isValid18DigitNumber(textArray[2])) {
|
||||
uni.showToast({
|
||||
title: '身份证号格式错误',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
if (!isValid18DigitNumber(textArray[2])) {
|
||||
uni.showToast({
|
||||
title: '身份证号格式错误',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
const allNonEmpty = textArray.every(item => {
|
||||
// 如果想忽略前后空格,可用 item.trim() !== ''
|
||||
return item !== '';
|
||||
|
|
@ -463,16 +464,18 @@
|
|||
}
|
||||
const alldata = ref({})
|
||||
onLoad((e) => {
|
||||
|
||||
if(e.element){
|
||||
let data = JSON.parse(e.element);
|
||||
if(e.element){
|
||||
if (e.element) {
|
||||
alldata.value = JSON.parse(e.element);
|
||||
uni.setStorageSync('baddata',alldata.value)
|
||||
uni.setStorageSync('backhuancun',alldata.value)
|
||||
uni.setStorageSync('tel',alldata.value.tel)
|
||||
}else{
|
||||
data = uni.getStorageSync('baddata')
|
||||
uni.setStorageSync('baddata', alldata.value)
|
||||
uni.setStorageSync('backhuancun', alldata.value)
|
||||
uni.setStorageSync('tel', alldata.value.tel)
|
||||
} else {
|
||||
data = uni.getStorageSync('baddata')
|
||||
}
|
||||
if(!data){
|
||||
if (!data) {
|
||||
return
|
||||
}
|
||||
textArray[0] = data.name;
|
||||
|
|
@ -487,7 +490,8 @@
|
|||
backImge.value = `${media_base_url}${data.cardFmPath}`;
|
||||
fontphoto.value = data.cardZmPath
|
||||
endphoto.value = data.cardFmPath
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
onShow(() => {
|
||||
const img = uni.getStorageSync('imgkey0')
|
||||
|
|
@ -609,7 +613,7 @@
|
|||
|
||||
.photo-font {
|
||||
font-size: 28rpx;
|
||||
margin-top: 10rpx;
|
||||
margin-top: 10rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
|
|
@ -675,18 +679,20 @@
|
|||
.line {
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
.contentred{
|
||||
|
||||
.contentred {
|
||||
width: 90%;
|
||||
border-radius: 15rpx;
|
||||
margin: 15rpx 0;
|
||||
margin-left: 5%;
|
||||
padding: 5rpx;
|
||||
.contentred-bgc{
|
||||
|
||||
.contentred-bgc {
|
||||
border-radius: 15rpx;
|
||||
color: red;
|
||||
padding: 20rpx;
|
||||
padding-bottom: 30rpx;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -363,7 +363,7 @@
|
|||
data.orgBuildingArea = form.orgBuildingArea
|
||||
data.izSkipRepetVali = izSkipRepetVali.value
|
||||
data.headPath = form.headPath;
|
||||
|
||||
// console.log("看看",data.headPath)
|
||||
// if (data.id === null) {
|
||||
// data.status = `4`
|
||||
// } else {
|
||||
|
|
@ -614,7 +614,7 @@
|
|||
success: uploadRes => {
|
||||
let data = JSON.parse(uploadRes.data)
|
||||
form.headPath = data.message;
|
||||
console.log(form.headPath,1111111111111111111)
|
||||
// console.log(form.headPath,1111111111111111111)
|
||||
uping.value = true;
|
||||
uni.hideLoading()
|
||||
},
|
||||
|
|
@ -659,7 +659,7 @@
|
|||
form.orgLeaderPhone = data.orgLeaderPhone;
|
||||
form.orgPropertyType = data.orgPropertyType;
|
||||
form.orgBuildingArea = data.orgBuildingArea;
|
||||
// form.headPath = data.headPath;
|
||||
form.headPath = data.headPath;
|
||||
form.sex = data.sex;
|
||||
if(data.headPath&&data.headPath.indexOf('https')>-1){
|
||||
form.value = data.headPath ;
|
||||
|
|
@ -682,7 +682,7 @@
|
|||
form.orgLeaderPhone = data.orgLeaderPhone;
|
||||
form.orgPropertyType = data.orgPropertyType;
|
||||
form.orgBuildingArea = data.orgBuildingArea;
|
||||
// form.headPath = data.headPath;
|
||||
form.headPath = data.headPath;
|
||||
form.sex = data.sex;
|
||||
if(data.headPath&&data.headPath.indexOf('https')>-1){
|
||||
form.value = data.headPath ;
|
||||
|
|
|
|||
|
|
@ -453,6 +453,7 @@
|
|||
orgCode: uni.getStorageSync('nostaffmessage')
|
||||
}
|
||||
Apply(data).then((data) => {
|
||||
console.log("不好使?",data)
|
||||
if (data.success) {
|
||||
uni.requestSubscribeMessage({
|
||||
// 这里填后台申请好的 templateId 数组
|
||||
|
|
|
|||
|
|
@ -31,13 +31,14 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="white-message">
|
||||
<view>
|
||||
<view class="one" style="justify-content: space-between;position: relative;" @click="selectphoto(4)">
|
||||
<view class="one" style="justify-content: space-between;position: relative;"
|
||||
@click="selectphoto(4)">
|
||||
<view class="one-left">头像<text style="font-size: 25rpx;">(选填)</text></view>
|
||||
<image class="photo" style="width: 80rpx;height: 80rpx;border-radius: 50%;border: 1px solid #d8d8d8;"
|
||||
:src="headPath ? `${media_base_url}${headPath}` :
|
||||
<image class="photo"
|
||||
style="width: 80rpx;height: 80rpx;border-radius: 50%;border: 1px solid #d8d8d8;" :src="headPath ? `${media_base_url}${headPath}` :
|
||||
(sex=='女'?'https://www.focusnu.com/media/directive/index/nv.png':
|
||||
'https://www.focusnu.com/media/directive/index/nan.png'
|
||||
)" />
|
||||
|
|
@ -47,7 +48,8 @@
|
|||
<view class="one-left">婚否</view>
|
||||
<input disabled style="cursor: not-allowed;pointer-events: none; " class="one-right" type="text"
|
||||
placeholder="请选择婚否" v-model="form.maritalStatus" />
|
||||
<image class="one-left-imge" src="https://www.focusnu.com/media/directive/index/canread.png" v-if="form.maritalStatus"/>
|
||||
<image class="one-left-imge" src="https://www.focusnu.com/media/directive/index/canread.png"
|
||||
v-if="form.maritalStatus" />
|
||||
<!-- <image class="triangle-down" src="https://www.focusnu.com/media/directive/login/xia.png" /> -->
|
||||
</view>
|
||||
|
||||
|
|
@ -84,7 +86,8 @@
|
|||
<view class="one-left">健康状况</view>
|
||||
<input disabled style="cursor: not-allowed;pointer-events: none;" class="one-right" type="text"
|
||||
placeholder="请选择健康状况" v-model="form.healthStatus" />
|
||||
<image class="one-left-imge" src="https://www.focusnu.com/media/directive/index/canread.png" v-if="form.healthStatus"/>
|
||||
<image class="one-left-imge" src="https://www.focusnu.com/media/directive/index/canread.png"
|
||||
v-if="form.healthStatus" />
|
||||
<!-- <image class="triangle-down" src="https://www.focusnu.com/media/directive/login/xia.png" /> -->
|
||||
</view>
|
||||
|
||||
|
|
@ -95,7 +98,8 @@
|
|||
<view class="one-left">政治面貌</view>
|
||||
<input disabled style="cursor: not-allowed;pointer-events: none;" class="one-right" type="text"
|
||||
placeholder="请选择政治面貌" v-model="form.politicalAppearance" />
|
||||
<image class="one-left-imge" src="https://www.focusnu.com/media/directive/index/canread.png" v-if="form.politicalAppearance"/>
|
||||
<image class="one-left-imge" src="https://www.focusnu.com/media/directive/index/canread.png"
|
||||
v-if="form.politicalAppearance" />
|
||||
<!-- <image class="triangle-down" src="https://www.focusnu.com/media/directive/login/xia.png" /> -->
|
||||
</view>
|
||||
|
||||
|
|
@ -104,7 +108,8 @@
|
|||
|
||||
<view class="one">
|
||||
<view class="one-left">紧急联系人</view>
|
||||
<input class="one-right" :maxlength="jjlxrmax" placeholder="请输入紧急联系人" @focus="jjlxrmax = 50" @blur="jjlxrmax = 8" v-model="form.contactName" />
|
||||
<input class="one-right" :maxlength="jjlxrmax" placeholder="请输入紧急联系人" @focus="jjlxrmax = 50"
|
||||
@blur="jjlxrmax = 8" v-model="form.contactName" />
|
||||
<image class="one-left-imge" src="https://www.focusnu.com/media/directive/index/canread.png" />
|
||||
</view>
|
||||
<view class="one">
|
||||
|
|
@ -123,7 +128,8 @@
|
|||
<view class="one-left">户口性质</view>
|
||||
<input disabled style="cursor: not-allowed;pointer-events: none;" class="one-right" type="text"
|
||||
placeholder="请选择户口性质" v-model="form.hukouType" />
|
||||
<image class="one-left-imge" src="https://www.focusnu.com/media/directive/index/canread.png" v-if="form.hukouType"/>
|
||||
<image class="one-left-imge" src="https://www.focusnu.com/media/directive/index/canread.png"
|
||||
v-if="form.hukouType" />
|
||||
<!-- <image class="triangle-down" src="https://www.focusnu.com/media/directive/login/xia.png" /> -->
|
||||
</view>
|
||||
<view class="one">
|
||||
|
|
@ -144,7 +150,7 @@
|
|||
下一步
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<u-action-sheet :list="bottomlist" @click="photoclick" v-model="bottomshow" borderRadius="20"></u-action-sheet>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -223,7 +229,7 @@
|
|||
)
|
||||
onShow(() => {
|
||||
const img = uni.getStorageSync('imgkey0')
|
||||
console.log(img,1111111111111)
|
||||
console.log(img, 1111111111111)
|
||||
if (img) {
|
||||
// uploadImage(img)
|
||||
savephoto(img)
|
||||
|
|
@ -243,6 +249,7 @@
|
|||
}
|
||||
}
|
||||
const tempImagePath = ref('')
|
||||
|
||||
function getMessage() {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
|
|
@ -252,7 +259,7 @@
|
|||
uni.navigateTo({
|
||||
url: `/compontent/public/camera?url=${chooseRes.tempFilePaths[0]}&type=0&size=1&height=1500&width=1500`
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
fail: err => {
|
||||
console.error('拍照失败:', err)
|
||||
|
|
@ -260,7 +267,7 @@
|
|||
})
|
||||
}
|
||||
const photoclick = (element) => {
|
||||
if (element==2) {
|
||||
if (element == 2) {
|
||||
uni.previewImage({
|
||||
urls: [`${media_base_url}${headPath.value}`], // 必填,所有要预览的图片地址数组
|
||||
// current: headImge.value, // 可选,当前显示图片的地址,默认是 urls[0]
|
||||
|
|
@ -288,51 +295,88 @@
|
|||
const uping = ref(true);
|
||||
const savephoto = (filePath) => {
|
||||
uping.value = false;
|
||||
// category: 'jg' | 'yg' | 'zz' | 'jhr'
|
||||
|
||||
const now = new Date();
|
||||
const yyyy = now.getFullYear();
|
||||
const mm = String(now.getMonth() + 1).padStart(2, '0'); // 补0
|
||||
const mm = String(now.getMonth() + 1).padStart(2, '0');
|
||||
|
||||
let path = '';
|
||||
|
||||
switch ('yg') {
|
||||
case 'jg': // 机构
|
||||
const type = 'yg'; // 这里别写死,后面换成你的真实类型
|
||||
|
||||
switch (type) {
|
||||
case 'jg':
|
||||
path = `${yyyy}/${mm}/jgxx/jg`;
|
||||
break;
|
||||
case 'yg': // 员工
|
||||
case 'yg':
|
||||
path = `${yyyy}/${mm}/ygxx/yg`;
|
||||
break;
|
||||
case 'zz': // 长者
|
||||
case 'zz':
|
||||
path = `${yyyy}/${mm}/zzxx/zz`;
|
||||
break;
|
||||
case 'jhr': // 监护人
|
||||
case 'jhr':
|
||||
path = `${yyyy}/${mm}/zzxx/jhr`;
|
||||
break;
|
||||
default:
|
||||
path = `${yyyy}/${mm}/temp`;
|
||||
}
|
||||
console.log(filePath)
|
||||
uni.uploadFile({
|
||||
url: `${base_url}/sys/common/upload`, // 替换为您的POST接口地址
|
||||
filePath,
|
||||
name: 'file', // 后端接收时的字段名
|
||||
header: {
|
||||
'X-Access-Token': uni.getStorageSync('token') || '',
|
||||
|
||||
uni.compressImage({
|
||||
src: filePath,
|
||||
quality: 70, // 大致相当于压缩 30%,不是严格百分比
|
||||
success: (compressRes) => {
|
||||
uni.uploadFile({
|
||||
url: `${base_url}/sys/common/upload`,
|
||||
filePath: compressRes.tempFilePath,
|
||||
name: 'file',
|
||||
header: {
|
||||
'X-Access-Token': uni.getStorageSync('token') || '',
|
||||
},
|
||||
formData: {
|
||||
biz: path
|
||||
},
|
||||
success: uploadRes => {
|
||||
headPath.value = JSON.parse(uploadRes.data).message
|
||||
uping.value = true
|
||||
uni.hideLoading()
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '上传出错',
|
||||
icon: 'none'
|
||||
})
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
},
|
||||
formData: {
|
||||
biz: path
|
||||
},
|
||||
success: uploadRes => {
|
||||
headPath.value = JSON.parse(uploadRes.data).message
|
||||
console.log(headPath.value,JSON.parse(uploadRes.data))
|
||||
uping.value = true;
|
||||
uni.hideLoading()
|
||||
},
|
||||
fail: err => {
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '上传出错',
|
||||
title: '压缩失败,直接上传原图',
|
||||
icon: 'none'
|
||||
})
|
||||
uni.hideLoading()
|
||||
|
||||
uni.uploadFile({
|
||||
url: `${base_url}/sys/common/upload`,
|
||||
filePath,
|
||||
name: 'file',
|
||||
header: {
|
||||
'X-Access-Token': uni.getStorageSync('token') || '',
|
||||
},
|
||||
formData: {
|
||||
biz: path
|
||||
},
|
||||
success: uploadRes => {
|
||||
headPath.value = JSON.parse(uploadRes.data).message
|
||||
uping.value = true
|
||||
uni.hideLoading()
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '上传出错',
|
||||
icon: 'none'
|
||||
})
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -609,6 +653,7 @@
|
|||
border-radius: 35rpx;
|
||||
font-size: 33rpx;
|
||||
}
|
||||
|
||||
.back-button {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
|
@ -621,6 +666,7 @@
|
|||
border-radius: 37rpx;
|
||||
font-size: 33rpx;
|
||||
}
|
||||
|
||||
.title-back {
|
||||
background-color: #F7F7F7;
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<view class="login-container">
|
||||
<exit :show="exitshow" @close="exitshow=false" />
|
||||
<image class="bgc-imge" src="https://www.focusnu.com/media/directive/index/mine/bgc.png" />
|
||||
<view class="ball">
|
||||
<view class="ball" @click="houmen">
|
||||
<image class="ball-imge" src="https://www.focusnu.com/media/directive/index/jg_xcx.png" />
|
||||
</view>
|
||||
<!-- <view class="upfont">
|
||||
|
|
@ -99,6 +99,11 @@
|
|||
break;
|
||||
}
|
||||
}
|
||||
const houmen = () => {
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/login/index`
|
||||
// })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
<!-- <image class="back-imge" src="https://www.focusnu.com/media/directive/login/back.png" @click="goback" /> -->
|
||||
<image class="title-imge" src="https://www.focusnu.com/media/directive/login/icon.png" />
|
||||
<image class="photo-imge" src="https://www.focusnu.com/media/directive/login/bgc.png" />
|
||||
<view class="under-container" >
|
||||
<view class="under-container">
|
||||
<view class="under-container-title">
|
||||
<view class="under-container-input">
|
||||
<view class="input-left">+86 </view>
|
||||
<input type="number" style="width: 600rpx;font-size: 33rpx;height: 200rpx;" maxlength="11"
|
||||
placeholder="请输入手机号" @input="isRight" @keyboardheightchange="keyboardheightchange" />
|
||||
placeholder="请输入手机号" @input="isRight" @keyboardheightchange="keyboardheightchange" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="button-blue" v-if="canClick" @click="jumpto">
|
||||
|
|
@ -82,12 +82,37 @@
|
|||
}
|
||||
|
||||
}
|
||||
const keyboardheightchange = (e)=>{
|
||||
const keyboardheightchange = (e) => {
|
||||
console.log(e.detail.height)
|
||||
}
|
||||
const goback = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
// 滑块图片预加载
|
||||
const images = [
|
||||
'https://www.focusnu.com/media/directive/login/0.png',
|
||||
'https://www.focusnu.com/media/directive/login/1.png',
|
||||
'https://www.focusnu.com/media/directive/login/2.png'
|
||||
]
|
||||
|
||||
function preloadImages(list = []) {
|
||||
return Promise.all(
|
||||
list.map(src => {
|
||||
return new Promise((resolve) => {
|
||||
uni.getImageInfo({
|
||||
src,
|
||||
success: () => resolve(true),
|
||||
fail: () => resolve(false)
|
||||
})
|
||||
})
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await preloadImages(images)
|
||||
// console.log('预加载完成')
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<model :show="show" @close="show=false" :content="content" />
|
||||
<view class="index-up" v-if="workArray.length">
|
||||
<image class="index-up-img" src="https://www.focusnu.com/media/directive/index/pouplebgc.png"
|
||||
<image class="index-up-img" src="https://www.focusnu.com/media/directive/index/specibluebgc.png"
|
||||
mode="widthFix" lazy-load="false" />
|
||||
</view>
|
||||
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@
|
|||
})
|
||||
}
|
||||
|
||||
const buttonArray = ref(["物料信息", "完结单", "敬请期待"])
|
||||
const buttonArray = ref(["物料管理", "完结单", "敬请期待"])
|
||||
const statusarray = ["loading", "success", "fail"]
|
||||
const which = ref(0);
|
||||
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@
|
|||
<view class="qit">
|
||||
<text>单价</text>
|
||||
<view>
|
||||
<input type="text" v-model="stringShow" disabled maxlength="6">
|
||||
<input type="text" v-model="stringShow" disabled maxlength="7">
|
||||
</view>
|
||||
</view>
|
||||
<view class="botrn" style="position: relative;">
|
||||
|
|
@ -553,7 +553,7 @@
|
|||
stringShow.value = stringShow.value.slice(0, -1)
|
||||
return
|
||||
}
|
||||
if (stringShow.value.length > 10) { return }
|
||||
if (stringShow.value.length > 6) { return }
|
||||
let a = stringShow.value.indexOf('.')
|
||||
if (item == "." && stringShow.value.length == 0) {
|
||||
return
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |