feat: 邮件弹窗优化+上传面部头像优化
This commit is contained in:
@@ -313,6 +313,7 @@
|
||||
<button class="next-btn" @click="openEmailDialog">发送到邮件</button>
|
||||
</view>
|
||||
|
||||
<!--
|
||||
<view class="m-dialog" v-if="dialog.visible">
|
||||
<div class="m-dialog-main">
|
||||
<div class="email">
|
||||
@@ -326,7 +327,7 @@
|
||||
|
||||
<button class="btn" @click="sendEmail">发送</button>
|
||||
</div>
|
||||
</view>
|
||||
</view> -->
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -887,16 +888,14 @@
|
||||
visible: false,
|
||||
});
|
||||
|
||||
const openEmailDialog = () => {
|
||||
|
||||
const openEmailDialog = async () => {
|
||||
console.log('openEmailDialog: ');
|
||||
const emailVal = window.prompt('请输入邮箱')
|
||||
|
||||
dialog.value.visible = true;
|
||||
};
|
||||
|
||||
const sendEmail = async () => {
|
||||
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
||||
|
||||
if (!emailRegex.test(email.value)) {
|
||||
if (!emailRegex.test(emailVal)) {
|
||||
uni.showToast({ title: '请输入正确的邮箱', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
@@ -904,7 +903,7 @@
|
||||
const res = await sendMail({
|
||||
timeout: 100 * 1000,
|
||||
pageUrl: window.location.href,
|
||||
email: email.value,
|
||||
email: emailVal
|
||||
});
|
||||
|
||||
if (res.data.code == 0) {
|
||||
@@ -913,6 +912,8 @@
|
||||
|
||||
uni.showToast({ title: '已经进入发送队列,稍后请查收邮件', icon: 'none' });
|
||||
}
|
||||
|
||||
// dialog.value.visible = true;
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user