|
|
|
@ -251,6 +251,7 @@ const options = ref({ |
|
|
|
info: true |
|
|
|
info: true |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 判断是否是APP |
|
|
|
const openApp = () => { |
|
|
|
const openApp = () => { |
|
|
|
const ua = navigator.userAgent; |
|
|
|
const ua = navigator.userAgent; |
|
|
|
const isIOS = /iPhone|iPad|iPod/i.test(ua); |
|
|
|
const isIOS = /iPhone|iPad|iPod/i.test(ua); |
|
|
|
@ -270,13 +271,17 @@ const openApp = () => { |
|
|
|
const imgurl = ref('') |
|
|
|
const imgurl = ref('') |
|
|
|
const imgBgUrl = ref('') |
|
|
|
const imgBgUrl = ref('') |
|
|
|
const remaining = ref(0) |
|
|
|
const remaining = ref(0) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 跳转设计图集 |
|
|
|
function goToRecord() { |
|
|
|
function goToRecord() { |
|
|
|
router.push('/badge/record') |
|
|
|
router.push('/badge/record') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 跳转我的订单 |
|
|
|
function goToMyOrder() { |
|
|
|
function goToMyOrder() { |
|
|
|
router.push('/badge/myOrder') |
|
|
|
router.push('/badge/myOrder') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取兑换数量 |
|
|
|
const sizeList = ref([]) |
|
|
|
const sizeList = ref([]) |
|
|
|
const getSizeList = () => { |
|
|
|
const getSizeList = () => { |
|
|
|
badgeApi.getOrderPrice({}).then((res: any) => { |
|
|
|
badgeApi.getOrderPrice({}).then((res: any) => { |
|
|
|
@ -290,6 +295,7 @@ const getSizeList = () => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取首页显示的数量和类型 |
|
|
|
const orderStat = ref({}) |
|
|
|
const orderStat = ref({}) |
|
|
|
const prodId = ref(7) |
|
|
|
const prodId = ref(7) |
|
|
|
const prop = ref('') |
|
|
|
const prop = ref('') |
|
|
|
@ -304,6 +310,7 @@ const getOrderStat = () => { |
|
|
|
|
|
|
|
|
|
|
|
const isLoading = ref(false) |
|
|
|
const isLoading = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 生成图片 |
|
|
|
function goToPreview() { |
|
|
|
function goToPreview() { |
|
|
|
if (isLoading.value) { |
|
|
|
if (isLoading.value) { |
|
|
|
return |
|
|
|
return |
|
|
|
@ -324,6 +331,8 @@ function goToPreview() { |
|
|
|
getPid() |
|
|
|
getPid() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 一次性体验链接 |
|
|
|
const trialPhone = async () => { |
|
|
|
const trialPhone = async () => { |
|
|
|
if (!mobile.value) { |
|
|
|
if (!mobile.value) { |
|
|
|
showToast('请输入手机号'); |
|
|
|
showToast('请输入手机号'); |
|
|
|
@ -432,6 +441,7 @@ const getUploadUrl = () => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 人脸识别上传 |
|
|
|
const sendFaceToOss = async (src: string, url: string, path: string) => { |
|
|
|
const sendFaceToOss = async (src: string, url: string, path: string) => { |
|
|
|
try { |
|
|
|
try { |
|
|
|
const response = await fetch(url, { |
|
|
|
const response = await fetch(url, { |
|
|
|
@ -577,6 +587,7 @@ const sendToOss = async (src: string, url: string) => { |
|
|
|
console.log("uploadImage----err", err) |
|
|
|
console.log("uploadImage----err", err) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 创建日志 |
|
|
|
const createLog = () => { |
|
|
|
const createLog = () => { |
|
|
|
const params = { |
|
|
|
const params = { |
|
|
|
pid: pid.value, |
|
|
|
pid: pid.value, |
|
|
|
@ -612,6 +623,7 @@ const createLog = () => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取首页图片上传指南图片 |
|
|
|
const sundryList = ref([]) |
|
|
|
const sundryList = ref([]) |
|
|
|
const getSundryList = () => { |
|
|
|
const getSundryList = () => { |
|
|
|
badgeApi.getSundryList({ |
|
|
|
badgeApi.getSundryList({ |
|
|
|
@ -631,6 +643,7 @@ const getSundryList = () => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 判断是否是一次性体验链接 |
|
|
|
const trialCode = ref(false) |
|
|
|
const trialCode = ref(false) |
|
|
|
const trialCodeValue = ref('') |
|
|
|
const trialCodeValue = ref('') |
|
|
|
const getTrialCode = () => { |
|
|
|
const getTrialCode = () => { |
|
|
|
@ -643,6 +656,8 @@ const getTrialCode = () => { |
|
|
|
getSizeList() |
|
|
|
getSizeList() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 手机号输入框 |
|
|
|
const mobile = ref('') |
|
|
|
const mobile = ref('') |
|
|
|
const userId = ref('') |
|
|
|
const userId = ref('') |
|
|
|
const onBlur = async () => { |
|
|
|
const onBlur = async () => { |
|
|
|
|