Merge remote-tracking branch 'origin/feature/feature-20250331-h5' into feature/feature-20250331-h5
This commit is contained in:
13
.env.uat
Normal file
13
.env.uat
Normal file
@@ -0,0 +1,13 @@
|
||||
# .env.development
|
||||
VITE_APP_BASEURL=https://yls-api-uat.dctest.digitalyili.com/api/
|
||||
VITE_APP_ENV=uat
|
||||
VITE_APP_CURRENTMODE=uat
|
||||
VITE_APP_BASEOSS=https://diaoyan-files.automark.cc
|
||||
VITE_APP_DELIVERY_BASEURL=https://javaxq.test.automark.cc/
|
||||
VITE_APP_MESSAGE_CENTER=http://gtech-gateway.dcin-test.digitalyili.com/apigtech/message-send-center/
|
||||
VITE_APP_SOCKETURL=wss://yls-api-uat.dctest.digitalyili.com/survey_sync
|
||||
VITE_APP_JSONPURL=https://iam-uat.dctest.digitalyili.com/idp/restful/getIDPToken
|
||||
VITE_APP_YQRURL=https://ocp-uat-ain.digitalyili.com
|
||||
# VITE_APP_BASE_APPURL=https://ycsb-gw-uat.dcin-test.digitalyili.com
|
||||
# VITE_APP_APPKEY=62f495a0f7854e4e46ebbf40
|
||||
# VITE_APP_APPID=m5c66hlce3
|
||||
@@ -6,6 +6,7 @@
|
||||
"scripts": {
|
||||
"dev": "vite --mode development",
|
||||
"build": "run-p type-check \"build-only {@}\" --",
|
||||
"build_uat": "run-s build-only -- --model uat",
|
||||
"preview": "vite preview",
|
||||
"build-only": "vite build",
|
||||
"prepare": "husky",
|
||||
|
||||
@@ -92,22 +92,22 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* @desc 跳转到H5页面
|
||||
* @param {String} h5Url 目标H5链接
|
||||
* @param {String} name 导航头中的标题文案
|
||||
* @param {Boolean} fullscreen 是否全屏显示(隐藏导航头)
|
||||
* @returns {Boolean} 操作是否成功
|
||||
*/
|
||||
navigateToH5(h5Url, name, fullscreen = false) {
|
||||
if (fullscreen) {
|
||||
h5Url = this.appendQueryParam(h5Url, 'fullscreen', 'true');
|
||||
}
|
||||
return this.postMessageToRN({
|
||||
type: 'navigate',
|
||||
url: `authH5?url=${encodeURIComponent(h5Url)}&name=${name}`
|
||||
});
|
||||
},
|
||||
// /**
|
||||
// * @desc 跳转到H5页面
|
||||
// * @param {String} h5Url 目标H5链接
|
||||
// * @param {String} name 导航头中的标题文案
|
||||
// * @param {Boolean} fullscreen 是否全屏显示(隐藏导航头)
|
||||
// * @returns {Boolean} 操作是否成功
|
||||
// */
|
||||
// navigateToH5(h5Url, name, fullscreen = false) {
|
||||
// if (fullscreen) {
|
||||
// h5Url = this.appendQueryParam(h5Url, 'fullscreen', 'true');
|
||||
// }
|
||||
// return this.postMessageToRN({
|
||||
// type: 'navigate',
|
||||
// url: `authH5?url=${encodeURIComponent(h5Url)}&name=${name}`
|
||||
// });
|
||||
// },
|
||||
|
||||
// /**
|
||||
// * @desc 给URL添加查询参数
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
<RouterView />
|
||||
<!-- tabbar -->
|
||||
<van-tabbar v-model="active">
|
||||
<van-tabbar-item v-for="tab in table" :key="tab.title" :name="tab.title" :to="tab.path">
|
||||
<van-tabbar-item v-for="tab in table" :key="tab.title" :name="tab.title" @click="tabPath(tab.path)">
|
||||
<!-- <van-tabbar-item v-for="tab in table" :key="tab.title" :name="tab.title" :to="tab.path"> -->
|
||||
<span>{{ tab.title }}</span>
|
||||
<!-- <template #icon="props"> -->
|
||||
<template #icon>
|
||||
@@ -22,8 +23,12 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { RouterView } from 'vue-router';
|
||||
import { RouterView, useRouter } from 'vue-router';
|
||||
import { ref } from 'vue';
|
||||
import utils from '@/assets/js/common';
|
||||
import { getUserInfo } from '@/api/common/index.js';
|
||||
import { showFailToast } from 'vant';
|
||||
const router = useRouter();
|
||||
|
||||
const active = ref();
|
||||
const table = [
|
||||
@@ -48,6 +53,27 @@ const table = [
|
||||
icon: 'https://files.axshare.com/gsc/DR6075/de/a0/49/dea049d6ad3e4c2c80af44258c6c76d6/images/%E9%A6%96%E9%A1%B5_1/u24.png?pageId=74b3e5b2-848e-4258-8a34-9e220127c8a6'
|
||||
}
|
||||
];
|
||||
function tabPath(path) {
|
||||
if (utils.getParameter('digitalYiliToken')) {
|
||||
const appToken = utils.getParameter('digitalYiliToken');
|
||||
getUserInfo(appToken).then((res) => {
|
||||
if (res.data) {
|
||||
utils.setSessionStorage('userInfo', res.data.data);
|
||||
router.push({
|
||||
path
|
||||
});
|
||||
} else {
|
||||
showFailToast(error.response.data?.message || error.data?.message || error.message || '服务器错误');
|
||||
}
|
||||
}).catch((error) => {
|
||||
showFailToast(error?.response?.data?.message || error?.message || '服务器错误');
|
||||
});
|
||||
} else {
|
||||
router.push({
|
||||
path
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -5,8 +5,8 @@ import axios from 'axios';
|
||||
|
||||
import * as config from '@/config.js';
|
||||
// import {proxyUrl} from config.default
|
||||
const NODE_ENV = import.meta.env.VITE_APP_ENV;
|
||||
const baseURL = NODE_ENV === 'production' ? config.default.proxyUrl : 'http://192.168.8.165:15011/';
|
||||
// const NODE_ENV = import.meta.env.VITE_APP_ENV;
|
||||
const baseURL = config.default.proxyUrl;
|
||||
|
||||
// axios.defaults.withCredentials = true;
|
||||
|
||||
@@ -42,10 +42,10 @@ service.interceptors.request.use(
|
||||
service.interceptors.response.use(
|
||||
(response) => {
|
||||
if (
|
||||
response.status === 200
|
||||
|| response.status === 201
|
||||
|| response.status === 202
|
||||
|| response.status === 204
|
||||
response.status === 200 ||
|
||||
response.status === 201 ||
|
||||
response.status === 202 ||
|
||||
response.status === 204
|
||||
) {
|
||||
if (response.config.method === 'put') {
|
||||
// message.success('保存中...');
|
||||
|
||||
@@ -7,18 +7,20 @@ import utils from '@/assets/js/common';
|
||||
import { getUserInfo } from '@/api/common/index.js';
|
||||
import { showFailToast } from 'vant';
|
||||
const contentShow = ref(false);
|
||||
|
||||
onMounted(async () => {
|
||||
onMounted(async() => {
|
||||
if (utils.getParameter('digitalYiliToken')) {
|
||||
const query = {
|
||||
xToken: utils.getParameter('digitalYiliToken')
|
||||
};
|
||||
getUserInfo(query).then((res) => {
|
||||
const appToken = utils.getParameter('digitalYiliToken');
|
||||
getUserInfo(appToken).then((res) => {
|
||||
if (res.data) {
|
||||
utils.setSessionStorage('userInfo', res.data);
|
||||
contentShow.value = true;
|
||||
utils.setSessionStorage('userInfo', res.data.data);
|
||||
} else {
|
||||
showFailToast(error.data?.message || error.message || '服务器错误');
|
||||
contentShow.value = false;
|
||||
showFailToast(error.response.data?.message || error.data?.message || error.message || '服务器错误');
|
||||
}
|
||||
}).catch((error) => {
|
||||
contentShow.value = false;
|
||||
showFailToast(error?.response?.data?.message || error?.message || '服务器错误');
|
||||
});
|
||||
} else {
|
||||
contentShow.value = true;
|
||||
|
||||
@@ -83,7 +83,7 @@ interface PublishInfo {
|
||||
const publishInfo = ref<PublishInfo>({} as PublishInfo);
|
||||
|
||||
type OperateItem = (typeof operateList)[0];
|
||||
onMounted(async () => {
|
||||
onMounted(async() => {
|
||||
getQrcode('Xxgdr5EN')
|
||||
.then((res) => {
|
||||
if (res.data) {
|
||||
@@ -97,17 +97,17 @@ onMounted(async () => {
|
||||
});
|
||||
const operateBtn = (item: OperateItem) => {
|
||||
switch (item.type) {
|
||||
case 'shareLink':
|
||||
shareLink();
|
||||
break;
|
||||
case 'copyLink':
|
||||
copyLink();
|
||||
break;
|
||||
case 'qrCode':
|
||||
downLoadImg();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case 'shareLink':
|
||||
shareLink();
|
||||
break;
|
||||
case 'copyLink':
|
||||
copyLink();
|
||||
break;
|
||||
case 'qrCode':
|
||||
downLoadImg();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
// 复制链接
|
||||
|
||||
Reference in New Issue
Block a user