fix:app嵌套h5
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
"sortablejs": "^1.15.6",
|
"sortablejs": "^1.15.6",
|
||||||
"uuid": "^11.1.0",
|
"uuid": "^11.1.0",
|
||||||
"vant": "^4.9.17",
|
"vant": "^4.9.17",
|
||||||
|
"vconsole": "^3.15.1",
|
||||||
"vite-plugin-vue": "^0.0.1",
|
"vite-plugin-vue": "^0.0.1",
|
||||||
"vue": "^3.4.29",
|
"vue": "^3.4.29",
|
||||||
"vue-router": "^4.3.3",
|
"vue-router": "^4.3.3",
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import appBridge from '@/assets/js/appBridge';
|
|||||||
import utils from '@/assets/js/common';
|
import utils from '@/assets/js/common';
|
||||||
|
|
||||||
onMounted(async() => {
|
onMounted(async() => {
|
||||||
if (utils.getParameter('digitalYiliToken')) {
|
if (utils.getSessionStorage('xToken')) {
|
||||||
// 隐藏/显示 header
|
// 隐藏/显示 header
|
||||||
appBridge.setHeaderShown(false);
|
appBridge.setHeaderShown(true);
|
||||||
// 设置系统状态栏明暗主题
|
// 设置系统状态栏明暗主题
|
||||||
appBridge.setStatusBarStyle('light');
|
appBridge.setStatusBarStyle('light');
|
||||||
// 设置禁止原生返回
|
// 设置禁止原生返回
|
||||||
|
|||||||
@@ -55,10 +55,10 @@ const table = [
|
|||||||
];
|
];
|
||||||
function tabPath(path) {
|
function tabPath(path) {
|
||||||
router.push({
|
router.push({
|
||||||
path
|
path
|
||||||
});
|
});
|
||||||
// if (utils.getParameter('digitalYiliToken')) {
|
// if (utils.getSessionStorage('xToken'))
|
||||||
// const appToken = utils.getParameter('digitalYiliToken');
|
// const appToken = utils.getSessionStorage('xToken')
|
||||||
// getUserInfo(appToken).then((res) => {
|
// getUserInfo(appToken).then((res) => {
|
||||||
// if (res.data) {
|
// if (res.data) {
|
||||||
// utils.setSessionStorage('userInfo', res.data.data);
|
// utils.setSessionStorage('userInfo', res.data.data);
|
||||||
|
|||||||
@@ -4,10 +4,19 @@ import { createApp } from 'vue';
|
|||||||
import { createPinia } from 'pinia';
|
import { createPinia } from 'pinia';
|
||||||
import App from './App.vue';
|
import App from './App.vue';
|
||||||
import router from './router';
|
import router from './router';
|
||||||
|
import utils from '@/assets/js/common';
|
||||||
// 2. 引入组件样式
|
// 2. 引入组件样式
|
||||||
import 'vant/lib/index.css';
|
import 'vant/lib/index.css';
|
||||||
import appBridge from '@/assets/js/appBridge';
|
import appBridge from '@/assets/js/appBridge';
|
||||||
|
import VConsole from 'vconsole';
|
||||||
|
let vconsole;
|
||||||
|
if (import.meta.env.VITE_APP_ENV !== 'production') {
|
||||||
|
vconsole = new VConsole();
|
||||||
|
}
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
|
if (to.query.digitalYiliToken) {
|
||||||
|
utils.setSessionStorage('xToken', to.query.digitalYiliToken);
|
||||||
|
}
|
||||||
appBridge.setTitle(to.meta.title as string);
|
appBridge.setTitle(to.meta.title as string);
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -21,14 +21,14 @@ const { element } = toRefs(props);
|
|||||||
*/
|
*/
|
||||||
const tableInputTypeMapping = (/** regx?: any */) => {
|
const tableInputTypeMapping = (/** regx?: any */) => {
|
||||||
switch (element.value.question_type) {
|
switch (element.value.question_type) {
|
||||||
case 8:
|
case 8:
|
||||||
return 'text';
|
return 'text';
|
||||||
case 9:
|
case 9:
|
||||||
return 'radio';
|
return 'radio';
|
||||||
case 10:
|
case 10:
|
||||||
return 'checkbox';
|
return 'checkbox';
|
||||||
default:
|
default:
|
||||||
return 'radio';
|
return 'radio';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { showFailToast } from 'vant';
|
|||||||
const contentShow = ref(false);
|
const contentShow = ref(false);
|
||||||
onMounted(async() => {
|
onMounted(async() => {
|
||||||
contentShow.value = true;
|
contentShow.value = true;
|
||||||
// if (utils.getParameter('digitalYiliToken')) {
|
// if (utils.getSessionStorage('xToken')){
|
||||||
// const appToken = utils.getParameter('digitalYiliToken');
|
// const appToken = utils.getParameter('digitalYiliToken');
|
||||||
// getUserInfo(appToken).then((res) => {
|
// getUserInfo(appToken).then((res) => {
|
||||||
// if (res.data) {
|
// if (res.data) {
|
||||||
@@ -46,13 +46,13 @@ onMounted(async() => {
|
|||||||
padding: 0 10px 60px;
|
padding: 0 10px 60px;
|
||||||
background: linear-gradient(0deg, #f5f5f5 0%, #f5f5f5 84%, #a5d380 100%);
|
background: linear-gradient(0deg, #f5f5f5 0%, #f5f5f5 84%, #a5d380 100%);
|
||||||
|
|
||||||
& > :first-child {
|
&> :first-child {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
|
||||||
& > div {
|
&>div {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
|
|||||||
@@ -112,8 +112,12 @@ async function openPublishModal() {
|
|||||||
|
|
||||||
function getCode() {
|
function getCode() {
|
||||||
console.log(56, configUrl.proxyUrl);
|
console.log(56, configUrl.proxyUrl);
|
||||||
|
const _idp_session = 'MTE3LjEzLjEyMi4xODQ=|Y2UxNmU4ZGRhYmMyYjQyNDc3Y2NhOWY4Y2I0YTdlNjVkOGVmNWZiYWVkODMzYTQyNGQyMGZiNTczMzJkMzZmZQ==|Mgmh5RuZwDM0b+nFyErOse3lNz8=';
|
||||||
publishInfo.value.img_url = 'https://test-cxp-pubcos.yili.com/uat-yls//survey-api/publish/202503130938138261340.png';
|
publishInfo.value.img_url = 'https://test-cxp-pubcos.yili.com/uat-yls//survey-api/publish/202503130938138261340.png';
|
||||||
publishInfo.value.url = `${configUrl.proxyUrl}publish?sn=${sn && sn != undefined ? sn : ''}`;
|
publishInfo.value.url = `${import.meta.env.VITE_APP_BASEURL}/publish?_idp_session=${_idp_session}&sn=${sn && sn != undefined ? sn : ''}`;
|
||||||
|
console.log(567, import.meta.env, publishInfo.value.url);
|
||||||
|
// https://yls-api-uat.dctest.digitalyili.com/publish?_idp_session=MTE3LjEzLjEyMi4xODQ=|Y2UxNmU4ZGRhYmMyYjQyNDc3Y2NhOWY4Y2I0YTdlNjVkOGVmNWZiYWVkODMzYTQyNGQyMGZiNTczMzJkMzZmZQ==|Mgmh5RuZwDM0b+nFyErOse3lNz8=&sn=
|
||||||
|
// https://ylst-h5-uat.dctest.digitalyili.com/publish?_idp_session=MTE3LjEzLjEyMi4xODQ=|Y2UxNmU4ZGRhYmMyYjQyNDc3Y2NhOWY4Y2I0YTdlNjVkOGVmNWZiYWVkODMzYTQyNGQyMGZiNTczMzJkMzZmZQ==|Mgmh5RuZwDM0b+nFyErOse3lNz8=&sn=
|
||||||
publishInfo.value.download_url = {
|
publishInfo.value.download_url = {
|
||||||
title: '问卷下载',
|
title: '问卷下载',
|
||||||
url: 'https://test-cxp-pubcos.yili.com/uat-yls//survey-api/publish/202503130938138261340.png'
|
url: 'https://test-cxp-pubcos.yili.com/uat-yls//survey-api/publish/202503130938138261340.png'
|
||||||
|
|||||||
Reference in New Issue
Block a user