|
@@ -3,7 +3,7 @@
|
|
|
<van-nav-bar title="自然人开票" />
|
|
<van-nav-bar title="自然人开票" />
|
|
|
|
|
|
|
|
<div class="login-content">
|
|
<div class="login-content">
|
|
|
- <div class="text">xxx你好,欢迎您参加医疗峰会项目,请登录系统开具发票</div>
|
|
|
|
|
|
|
+ <div class="text">欢迎您参加{{ pubName }},请登录系统开具发票。</div>
|
|
|
|
|
|
|
|
<div class="bold-text">已注册电子税务局</div>
|
|
<div class="bold-text">已注册电子税务局</div>
|
|
|
|
|
|
|
@@ -61,10 +61,10 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { ref, reactive, onMounted } from 'vue'
|
|
|
|
|
|
|
+import { ref, reactive, onBeforeMount } from 'vue'
|
|
|
import { useRouter, useRoute } from 'vue-router'
|
|
import { useRouter, useRoute } from 'vue-router'
|
|
|
import { showFailToast, showSuccessToast, showToast } from 'vant'
|
|
import { showFailToast, showSuccessToast, showToast } from 'vant'
|
|
|
-import { sendEtsSmsApi, loginEtssmsApi } from '@/services/modules/login'
|
|
|
|
|
|
|
+import { getPubNameApi, sendEtsSmsApi, loginEtssmsApi } from '@/services/modules/login'
|
|
|
import type { SendTtsSmsRequest, LoginEtssmsRequest } from '@/services/modules/login/type.d'
|
|
import type { SendTtsSmsRequest, LoginEtssmsRequest } from '@/services/modules/login/type.d'
|
|
|
import { useUserStore } from '@/stores/modules/user'
|
|
import { useUserStore } from '@/stores/modules/user'
|
|
|
|
|
|
|
@@ -80,7 +80,7 @@ const formData = reactive<LoginEtssmsRequest>({
|
|
|
|
|
|
|
|
const sendEtsSms = reactive<SendTtsSmsRequest>({
|
|
const sendEtsSms = reactive<SendTtsSmsRequest>({
|
|
|
mobile: '',
|
|
mobile: '',
|
|
|
- pushRecordId: '2',
|
|
|
|
|
|
|
+ pushRecordId: '',
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
/* 限制手机号只能输入数字,最多 30 位 */
|
|
/* 限制手机号只能输入数字,最多 30 位 */
|
|
@@ -112,6 +112,8 @@ const sendCode = async () => {
|
|
|
if (res.code === 0 && res.data) {
|
|
if (res.code === 0 && res.data) {
|
|
|
showSuccessToast('发送成功')
|
|
showSuccessToast('发送成功')
|
|
|
startCountDown()
|
|
startCountDown()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ showFailToast(res.data.msg)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -151,6 +153,16 @@ const login = async () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 项目名称
|
|
|
|
|
+const pubName = ref('')
|
|
|
|
|
+const getPubName = async () => {
|
|
|
|
|
+ const res = await getPubNameApi({
|
|
|
|
|
+ pushRecordId: sendEtsSms.pushRecordId,
|
|
|
|
|
+ })
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ pubName.value = res.data.projectName
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
/* 协议跳转 */
|
|
/* 协议跳转 */
|
|
|
const toAgreement = (type: string) => {
|
|
const toAgreement = (type: string) => {
|
|
|
router.push({
|
|
router.push({
|
|
@@ -159,11 +171,12 @@ const toAgreement = (type: string) => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-onMounted(() => {
|
|
|
|
|
|
|
+onBeforeMount(() => {
|
|
|
const pushRecordId = route?.query.pushRecordId || ''
|
|
const pushRecordId = route?.query.pushRecordId || ''
|
|
|
if (pushRecordId) {
|
|
if (pushRecordId) {
|
|
|
sendEtsSms.pushRecordId = pushRecordId as string
|
|
sendEtsSms.pushRecordId = pushRecordId as string
|
|
|
userStore.setPushRecordId(pushRecordId as string)
|
|
userStore.setPushRecordId(pushRecordId as string)
|
|
|
|
|
+ getPubName()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|