Browse Source

兼容四张效果图

lzm_web
Linzm 6 months ago
parent
commit
bf18def79a
  1. 15
      src/views/badge/index.vue
  2. 2
      src/views/badge/preview.vue

15
src/views/badge/index.vue

@ -251,6 +251,7 @@ const options = ref({ @@ -251,6 +251,7 @@ const options = ref({
info: true
})
// APP
const openApp = () => {
const ua = navigator.userAgent;
const isIOS = /iPhone|iPad|iPod/i.test(ua);
@ -270,13 +271,17 @@ const openApp = () => { @@ -270,13 +271,17 @@ const openApp = () => {
const imgurl = ref('')
const imgBgUrl = ref('')
const remaining = ref(0)
//
function goToRecord() {
router.push('/badge/record')
}
//
function goToMyOrder() {
router.push('/badge/myOrder')
}
//
const sizeList = ref([])
const getSizeList = () => {
badgeApi.getOrderPrice({}).then((res: any) => {
@ -290,6 +295,7 @@ const getSizeList = () => { @@ -290,6 +295,7 @@ const getSizeList = () => {
})
}
//
const orderStat = ref({})
const prodId = ref(7)
const prop = ref('')
@ -304,6 +310,7 @@ const getOrderStat = () => { @@ -304,6 +310,7 @@ const getOrderStat = () => {
const isLoading = ref(false)
//
function goToPreview() {
if (isLoading.value) {
return
@ -324,6 +331,8 @@ function goToPreview() { @@ -324,6 +331,8 @@ function goToPreview() {
getPid()
}
}
//
const trialPhone = async () => {
if (!mobile.value) {
showToast('请输入手机号');
@ -432,6 +441,7 @@ const getUploadUrl = () => { @@ -432,6 +441,7 @@ const getUploadUrl = () => {
})
}
//
const sendFaceToOss = async (src: string, url: string, path: string) => {
try {
const response = await fetch(url, {
@ -577,6 +587,7 @@ const sendToOss = async (src: string, url: string) => { @@ -577,6 +587,7 @@ const sendToOss = async (src: string, url: string) => {
console.log("uploadImage----err", err)
}
}
//
const createLog = () => {
const params = {
pid: pid.value,
@ -612,6 +623,7 @@ const createLog = () => { @@ -612,6 +623,7 @@ const createLog = () => {
})
}
//
const sundryList = ref([])
const getSundryList = () => {
badgeApi.getSundryList({
@ -631,6 +643,7 @@ const getSundryList = () => { @@ -631,6 +643,7 @@ const getSundryList = () => {
})
}
//
const trialCode = ref(false)
const trialCodeValue = ref('')
const getTrialCode = () => {
@ -643,6 +656,8 @@ const getTrialCode = () => { @@ -643,6 +656,8 @@ const getTrialCode = () => {
getSizeList()
}
}
//
const mobile = ref('')
const userId = ref('')
const onBlur = async () => {

2
src/views/badge/preview.vue

@ -36,6 +36,7 @@ @@ -36,6 +36,7 @@
</div>
<div class="shape-text" :style="shapeTextStyle" v-if="shapeText">{{shapeText}}</div>
</div>
</div>
<div class="image-list-box" v-if="imageList.length > 1">
<div class="image-list-item" v-for="item in imageList" :key="item.key">
<img v-if="item.status == 1" class="image-list-item-img" :class="{ imgActive: item.key == imgKey }" :src="item.origin_url" alt="" @click="changeImage(item)">
@ -47,7 +48,6 @@ @@ -47,7 +48,6 @@
</div>
</div>
</div>
</div>
<div class="info-section">
<div class="info-item">
<div class="info-title">{{ prodId == 7 ? '人物立体徽章' : '宠物立体徽章' }}</div>

Loading…
Cancel
Save