|
|
|
@ -63,7 +63,8 @@ |
|
|
|
sendBtnDisabled |
|
|
|
sendBtnDisabled |
|
|
|
? `${time}秒后重发` |
|
|
|
? `${time}秒后重发` |
|
|
|
: "发送验证码" |
|
|
|
: "发送验证码" |
|
|
|
}}</van-button |
|
|
|
}} |
|
|
|
|
|
|
|
</van-button |
|
|
|
> |
|
|
|
> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
@ -175,7 +176,8 @@ |
|
|
|
> |
|
|
|
> |
|
|
|
<van-button block @click="handleSaveDraft">存稿</van-button> |
|
|
|
<van-button block @click="handleSaveDraft">存稿</van-button> |
|
|
|
<van-button block type="primary" @click="handleSave" |
|
|
|
<van-button block type="primary" @click="handleSave" |
|
|
|
>提交</van-button |
|
|
|
>提交 |
|
|
|
|
|
|
|
</van-button |
|
|
|
> |
|
|
|
> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</van-form> |
|
|
|
</van-form> |
|
|
|
@ -262,6 +264,7 @@ if (!wxStore.signInitFlag) { |
|
|
|
|
|
|
|
|
|
|
|
const mail = ref({}); |
|
|
|
const mail = ref({}); |
|
|
|
initMail(); |
|
|
|
initMail(); |
|
|
|
|
|
|
|
|
|
|
|
function initMail() { |
|
|
|
function initMail() { |
|
|
|
mail.value = { |
|
|
|
mail.value = { |
|
|
|
contactName: userStore.user.realName, |
|
|
|
contactName: userStore.user.realName, |
|
|
|
@ -379,6 +382,7 @@ let timer; |
|
|
|
let recorder; |
|
|
|
let recorder; |
|
|
|
const recordTime = ref(59); |
|
|
|
const recordTime = ref(59); |
|
|
|
const showCountdown = ref(false); |
|
|
|
const showCountdown = ref(false); |
|
|
|
|
|
|
|
|
|
|
|
function handleVoiceShow() { |
|
|
|
function handleVoiceShow() { |
|
|
|
navigator.mediaDevices |
|
|
|
navigator.mediaDevices |
|
|
|
.getUserMedia({audio: true}) |
|
|
|
.getUserMedia({audio: true}) |
|
|
|
@ -386,10 +390,14 @@ function handleVoiceShow() { |
|
|
|
showCountdown.value = false; |
|
|
|
showCountdown.value = false; |
|
|
|
voiceShow.value = true; |
|
|
|
voiceShow.value = true; |
|
|
|
// 触发振动 |
|
|
|
// 触发振动 |
|
|
|
|
|
|
|
if ('vibrate' in navigator) { |
|
|
|
navigator.vibrate([100]); |
|
|
|
navigator.vibrate([100]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
speechText.value = ""; |
|
|
|
speechText.value = ""; |
|
|
|
// 开始录音 |
|
|
|
// 开始录音 |
|
|
|
recorder = startRecorder(() => {}, speechText); |
|
|
|
recorder = startRecorder(() => { |
|
|
|
|
|
|
|
}, speechText); |
|
|
|
recordTime.value = 59; |
|
|
|
recordTime.value = 59; |
|
|
|
timer = setInterval(() => { |
|
|
|
timer = setInterval(() => { |
|
|
|
recordTime.value -= 1; |
|
|
|
recordTime.value -= 1; |
|
|
|
@ -403,12 +411,14 @@ function handleVoiceShow() { |
|
|
|
}, 1000); |
|
|
|
}, 1000); |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(function (err) { |
|
|
|
.catch(function (err) { |
|
|
|
|
|
|
|
console.log(err) |
|
|
|
showToast("未启用麦克风权限,请刷新重试"); |
|
|
|
showToast("未启用麦克风权限,请刷新重试"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const cancleBtnRef = ref(); |
|
|
|
const cancleBtnRef = ref(); |
|
|
|
const successBtnRef = ref(); |
|
|
|
const successBtnRef = ref(); |
|
|
|
|
|
|
|
|
|
|
|
function handleCanleTalk() { |
|
|
|
function handleCanleTalk() { |
|
|
|
cancleBtnRef.value.style.backgroundColor = "#d15454"; |
|
|
|
cancleBtnRef.value.style.backgroundColor = "#d15454"; |
|
|
|
recorder?.stop(); |
|
|
|
recorder?.stop(); |
|
|
|
@ -429,6 +439,7 @@ function handleSuccenssTalk() { |
|
|
|
|
|
|
|
|
|
|
|
const sendBtnDisabled = ref(false); |
|
|
|
const sendBtnDisabled = ref(false); |
|
|
|
let time = ref(30); |
|
|
|
let time = ref(30); |
|
|
|
|
|
|
|
|
|
|
|
function smsSendCode() { |
|
|
|
function smsSendCode() { |
|
|
|
formRef.value.validate("contactPhone").then(() => { |
|
|
|
formRef.value.validate("contactPhone").then(() => { |
|
|
|
sendBtnDisabled.value = true; |
|
|
|
sendBtnDisabled.value = true; |
|
|
|
@ -449,6 +460,7 @@ function smsSendCode() { |
|
|
|
|
|
|
|
|
|
|
|
const showImgPreview = ref(false); |
|
|
|
const showImgPreview = ref(false); |
|
|
|
const imgFilepath = ref(""); |
|
|
|
const imgFilepath = ref(""); |
|
|
|
|
|
|
|
|
|
|
|
function handleShowImgPreview(filepath) { |
|
|
|
function handleShowImgPreview(filepath) { |
|
|
|
imgFilepath.value = filepath; |
|
|
|
imgFilepath.value = filepath; |
|
|
|
showImgPreview.value = true; |
|
|
|
showImgPreview.value = true; |
|
|
|
@ -495,6 +507,7 @@ function validatorContent() { |
|
|
|
top: 3px; |
|
|
|
top: 3px; |
|
|
|
right: var(--van-cell-horizontal-padding); |
|
|
|
right: var(--van-cell-horizontal-padding); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.upload-btn { |
|
|
|
.upload-btn { |
|
|
|
width: 108px; |
|
|
|
width: 108px; |
|
|
|
height: 108px; |
|
|
|
height: 108px; |
|
|
|
@ -502,18 +515,22 @@ function validatorContent() { |
|
|
|
border: 1px solid var(--primary-color); |
|
|
|
border: 1px solid var(--primary-color); |
|
|
|
color: var(--primary-color); |
|
|
|
color: var(--primary-color); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.attachments { |
|
|
|
.attachments { |
|
|
|
margin-top: 10px; |
|
|
|
margin-top: 10px; |
|
|
|
display: grid; |
|
|
|
display: grid; |
|
|
|
grid-template-columns: 1fr 1fr 1fr; |
|
|
|
grid-template-columns: 1fr 1fr 1fr; |
|
|
|
grid-gap: 10px; |
|
|
|
grid-gap: 10px; |
|
|
|
|
|
|
|
|
|
|
|
img { |
|
|
|
img { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
height: 108px; |
|
|
|
height: 108px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.file { |
|
|
|
.file { |
|
|
|
background-color: #f3faff; |
|
|
|
background-color: #f3faff; |
|
|
|
height: 108px; |
|
|
|
height: 108px; |
|
|
|
|
|
|
|
|
|
|
|
.name { |
|
|
|
.name { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
max-width: 108px; |
|
|
|
max-width: 108px; |
|
|
|
@ -524,8 +541,10 @@ function validatorContent() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.van-popup { |
|
|
|
.van-popup { |
|
|
|
user-select: none; |
|
|
|
user-select: none; |
|
|
|
|
|
|
|
|
|
|
|
header { |
|
|
|
header { |
|
|
|
font-size: 16px; |
|
|
|
font-size: 16px; |
|
|
|
font-family: PingFangSC-Medium; |
|
|
|
font-family: PingFangSC-Medium; |
|
|
|
@ -533,16 +552,19 @@ function validatorContent() { |
|
|
|
margin: 20px; |
|
|
|
margin: 20px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.send-btn { |
|
|
|
.send-btn { |
|
|
|
position: absolute; |
|
|
|
position: absolute; |
|
|
|
top: -4px; |
|
|
|
top: -4px; |
|
|
|
right: 0; |
|
|
|
right: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.record-btn { |
|
|
|
.record-btn { |
|
|
|
&[active="true"] { |
|
|
|
&[active="true"] { |
|
|
|
animation: scaleIn 1.2s ease-out infinite; |
|
|
|
animation: scaleIn 1.2s ease-out infinite; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@keyframes scaleIn { |
|
|
|
@keyframes scaleIn { |
|
|
|
0% { |
|
|
|
0% { |
|
|
|
transform: scale(1, 1); |
|
|
|
transform: scale(1, 1); |
|
|
|
@ -563,12 +585,14 @@ function validatorContent() { |
|
|
|
bottom: 0; |
|
|
|
bottom: 0; |
|
|
|
z-index: 2; |
|
|
|
z-index: 2; |
|
|
|
background-color: var(--van-overlay-background); |
|
|
|
background-color: var(--van-overlay-background); |
|
|
|
|
|
|
|
|
|
|
|
.recording-container { |
|
|
|
.recording-container { |
|
|
|
position: fixed; |
|
|
|
position: fixed; |
|
|
|
left: 0; |
|
|
|
left: 0; |
|
|
|
right: 0; |
|
|
|
right: 0; |
|
|
|
bottom: 0; |
|
|
|
bottom: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.text { |
|
|
|
.text { |
|
|
|
min-height: 60px; |
|
|
|
min-height: 60px; |
|
|
|
background-color: var(--primary-color); |
|
|
|
background-color: var(--primary-color); |
|
|
|
@ -578,6 +602,7 @@ function validatorContent() { |
|
|
|
padding: var(--van-padding-md); |
|
|
|
padding: var(--van-padding-md); |
|
|
|
margin-bottom: 60px; |
|
|
|
margin-bottom: 60px; |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|
|
|
|
|
|
|
|
|
textarea { |
|
|
|
textarea { |
|
|
|
border: none; |
|
|
|
border: none; |
|
|
|
background-color: inherit; |
|
|
|
background-color: inherit; |
|
|
|
@ -587,12 +612,14 @@ function validatorContent() { |
|
|
|
max-height: calc(90vh - 280px); |
|
|
|
max-height: calc(90vh - 280px); |
|
|
|
font-size: 16px; |
|
|
|
font-size: 16px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
img { |
|
|
|
img { |
|
|
|
position: absolute; |
|
|
|
position: absolute; |
|
|
|
bottom: -13px; |
|
|
|
bottom: -13px; |
|
|
|
right: 6px; |
|
|
|
right: 6px; |
|
|
|
width: 50px; |
|
|
|
width: 50px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.countdown { |
|
|
|
.countdown { |
|
|
|
position: absolute; |
|
|
|
position: absolute; |
|
|
|
bottom: 4px; |
|
|
|
bottom: 4px; |
|
|
|
@ -600,9 +627,11 @@ function validatorContent() { |
|
|
|
color: #bbb; |
|
|
|
color: #bbb; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.tools { |
|
|
|
.tools { |
|
|
|
padding: 30px; |
|
|
|
padding: 30px; |
|
|
|
margin-bottom: 10vh; |
|
|
|
margin-bottom: 10vh; |
|
|
|
|
|
|
|
|
|
|
|
button { |
|
|
|
button { |
|
|
|
background-color: #3a3a3a; |
|
|
|
background-color: #3a3a3a; |
|
|
|
height: 100px; |
|
|
|
height: 100px; |
|
|
|
@ -610,25 +639,30 @@ function validatorContent() { |
|
|
|
border-radius: 50%; |
|
|
|
border-radius: 50%; |
|
|
|
border: none; |
|
|
|
border: none; |
|
|
|
color: #ccc; |
|
|
|
color: #ccc; |
|
|
|
|
|
|
|
|
|
|
|
&:hover { |
|
|
|
&:hover { |
|
|
|
background-color: #ddd; |
|
|
|
background-color: #ddd; |
|
|
|
color: #777; |
|
|
|
color: #777; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&.cancel { |
|
|
|
&.cancel { |
|
|
|
background-color: transparent; |
|
|
|
background-color: transparent; |
|
|
|
color: #fff; |
|
|
|
color: #fff; |
|
|
|
|
|
|
|
|
|
|
|
&:hover { |
|
|
|
&:hover { |
|
|
|
background-color: #d15454; |
|
|
|
background-color: #d15454; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.recording { |
|
|
|
.recording { |
|
|
|
height: 16vh; |
|
|
|
height: 16vh; |
|
|
|
margin-top: 60px; |
|
|
|
margin-top: 60px; |
|
|
|
background: linear-gradient(#a4a4a4, #fff); |
|
|
|
background: linear-gradient(#a4a4a4, #fff); |
|
|
|
color: #ccc; |
|
|
|
color: #ccc; |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|
|
|
|
|
|
|
|
|
&::before { |
|
|
|
&::before { |
|
|
|
display: block; |
|
|
|
display: block; |
|
|
|
content: ""; |
|
|
|
content: ""; |
|
|
|
@ -645,6 +679,7 @@ function validatorContent() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.file-item { |
|
|
|
.file-item { |
|
|
|
a { |
|
|
|
a { |
|
|
|
position: absolute; |
|
|
|
position: absolute; |
|
|
|
|