fix: app嵌套h5提示语

This commit is contained in:
liu.huiying@ebiz-digits.com
2025-03-14 17:15:37 +08:00
parent 753805b555
commit 8a2e54bf93
4 changed files with 41 additions and 27 deletions

View File

@@ -11,7 +11,7 @@ onMounted(async() => {
// 设置系统状态栏明暗主题
appBridge.setStatusBarStyle('light');
// 设置禁止原生返回
// appBridge.takeOverAndroidBack();
appBridge.takeOverAndroidBack();
}
});
</script>

View File

@@ -31,3 +31,18 @@
}
}
}
.van-toast {
background-color: rgba(50, 50, 51, 0.9) !important;
color: white !important;
padding: 10px 16px !important;
border-radius: 5px !important;
font-size: 14px !important;
&--success {
background-color: rgba(0, 0, 0, 0.7) !important;
}
&--fail {
background-color: rgba(0, 0, 0, 0.7) !important;
}
}

View File

@@ -10,7 +10,6 @@ export default {
jsonpUrl: import.meta.env.VITE_APP_JSONPURL,
jqrUrl: import.meta.env.VITE_APP_YQRURL,
currentMode: import.meta.env.VITE_APP_CURRENTMODE,
proxyDomain: import.meta.env.VITE_APP_BASEDOMAIM || ''
// appKey: import.meta.env.VITE_APP_APPKEY,
// appId: import.meta.env.VITE_APP_APPID
};

View File

@@ -5,11 +5,9 @@
<!-- <van-cell-group v-if="status === 1" inset style="padding-top: 15px"> -->
<van-cell-group inset style="padding-top: 15px">
<div>
<img
width="100%"
<img width="100%"
src="https://files.axshare.com/gsc/DR6075/44/1a/03/441a03a8b1004755a7a392b311acf97f/images/%E6%8A%95%E6%94%BE/u14.jpg?pageId=2f9ba10c-92b8-4c9b-b40b-04e65a0b4333"
alt=""
/>
alt="" />
</div>
<div class="qrcode">
<img :src="publishInfo.img_url" alt="" width="100px" height="100px" />
@@ -44,7 +42,7 @@
<script setup lang="ts">
import { useRoute } from 'vue-router';
import { onMounted, reactive, ref, watch } from 'vue';
import { showFailToast, showSuccessToast } from 'vant';
import { showFailToast, showToast } from 'vant';
import utils from '@/assets/js/common';
import appBridge from '@/assets/js/appBridge';
import { getQrcode } from '@/api/publish';
@@ -125,7 +123,7 @@ function getCode() {
}
})
.catch((error) => {
// showFailToast(error.data?.message || error.message || '服务器错误');
showFailToast(error.data?.message || error.message || '服务器错误');
});
}
// function fetchInfo() {
@@ -169,7 +167,7 @@ function copyLink() {
input.select();
document.execCommand('Copy');
document.body.removeChild(input);
showSuccessToast('复制成功');
showToast('复制成功');
}
// 分享链接
function shareLink () {
@@ -190,7 +188,9 @@ function shareLink() {
function downLoadImg () {
const { title, url } = publishInfo.value.download_url;
if (utils.getSessionStorage('xToken')) {
appBridge.save2Album(url, () => {});
appBridge.save2Album(url, () => {
showToast('二维码已成功保存到相册');
});
} else {
const link = document.createElement('a');
link.href = url;