|
|
@@ -53,9 +53,7 @@
|
|
|
<cwg-match-media :max-width="991">
|
|
|
<view class="mobile-header-bar">
|
|
|
<!-- <view class="fixed"/>-->
|
|
|
-<!-- #ifndef APP-PLUS -->
|
|
|
<LoginHeaderGroup text-color="#fff" :icon-color="isDark ? '#fff' : '#97A1C0'" />
|
|
|
- <!-- #endif -->
|
|
|
</view>
|
|
|
</cwg-match-media>
|
|
|
<view class="account">
|
|
|
@@ -254,6 +252,7 @@
|
|
|
<cwg-icon name="chat" color="#fff" />
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <cwg-global-popup/>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
import { ref, watch, onMounted, computed } from 'vue'
|
|
|
@@ -280,9 +279,12 @@ import LoginHeaderGroup from './components/LoginHeaderGroup.vue'
|
|
|
import LiveChatService from '@/utils/liveChat.js'
|
|
|
import { useWindowWidth } from '@/composables/useWindowWidth'
|
|
|
import { openLocalPdf } from '@/utils/pdf.js'
|
|
|
+import { usePopup } from '@/hooks/usePopup'
|
|
|
+
|
|
|
const windowWidth = useWindowWidth(300)
|
|
|
const isMobile = computed(() => windowWidth.value <= 991)
|
|
|
const router = useRouter()
|
|
|
+
|
|
|
const { t } = useI18n()
|
|
|
const { Code } = Config
|
|
|
const userStore = useUserStore()
|
|
|
@@ -293,6 +295,8 @@ const tabs = computed(() => [
|
|
|
{ text: t('signin.tabs1'), value: 1, },
|
|
|
{ text: t('signin.tabs2'), value: 2, },
|
|
|
])
|
|
|
+
|
|
|
+const { confirm } = usePopup()
|
|
|
const activeTab = ref(1)
|
|
|
|
|
|
// ========== 注册表单相关 ==========
|
|
|
@@ -431,15 +435,11 @@ const isAgeValid = computed(() => {
|
|
|
|
|
|
const checkAge = () => {
|
|
|
if (formData.value.birthDate && !isAgeValid.value) {
|
|
|
- uni.showModal({
|
|
|
+ confirm({
|
|
|
title: t('Msg.SystemPrompt'),
|
|
|
content: t('signup.ageRestriction'),
|
|
|
showCancel: false,
|
|
|
confirmText: t('Btn.Confirm'),
|
|
|
- success: function (res) {
|
|
|
- if (res.confirm) {
|
|
|
- }
|
|
|
- },
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
@@ -608,15 +608,26 @@ const register = async () => {
|
|
|
{ headers: { 'X-System': xSystemValue } },
|
|
|
)
|
|
|
if (resData.code == 200) {
|
|
|
- showToast(t('Msg.registerSuc'))
|
|
|
+ showToast(t('Msg.registerSuc'),'success')
|
|
|
registLogin()
|
|
|
} else {
|
|
|
- showToast(resData.msg)
|
|
|
+ confirm({
|
|
|
+ title: t('Msg.SystemPrompt'),
|
|
|
+ content: resData.msg,
|
|
|
+ showCancel: false,
|
|
|
+ confirmText: t('Btn.Confirm'),
|
|
|
+ })
|
|
|
+ // showToast(resData.msg,'error')
|
|
|
}
|
|
|
|
|
|
}).catch(err => {
|
|
|
console.log('表单错误信息:', err)
|
|
|
- showToast(err.msg)
|
|
|
+ confirm({
|
|
|
+ title: t('Msg.SystemPrompt'),
|
|
|
+ content: err.msg,
|
|
|
+ showCancel: false,
|
|
|
+ confirmText: t('Btn.Confirm'),
|
|
|
+ })
|
|
|
return false
|
|
|
})
|
|
|
}
|