Merge remote-tracking branch 'remotes/origin/master'
# Conflicts: # env/.env.development
This commit is contained in:
commit
56427dbb19
4
env/.env
vendored
4
env/.env
vendored
@ -1,7 +1,9 @@
|
|||||||
VITE_APP_TITLE = '数智产销'
|
VITE_APP_TITLE = '数智产销'
|
||||||
VITE_APP_PORT = 9000
|
VITE_APP_PORT = 9000
|
||||||
|
|
||||||
VITE_UNI_APPID = '__UNI__9F097F0'
|
#VITE_UNI_APPID = '__UNI__9F097F0'
|
||||||
|
#测试APPID
|
||||||
|
VITE_UNI_APPID = '__UNI__1B02D50'
|
||||||
VITE_WX_APPID = 'wx8e287639924edb51'
|
VITE_WX_APPID = 'wx8e287639924edb51'
|
||||||
|
|
||||||
#发布版本号
|
#发布版本号
|
||||||
|
9
env/.env.development
vendored
9
env/.env.development
vendored
@ -4,6 +4,11 @@ NODE_ENV = 'development'
|
|||||||
VITE_DELETE_CONSOLE = false
|
VITE_DELETE_CONSOLE = false
|
||||||
# 是否开启sourcemap
|
# 是否开启sourcemap
|
||||||
VITE_SHOW_SOURCEMAP = true
|
VITE_SHOW_SOURCEMAP = true
|
||||||
VITE_SERVER_BASEURL = 'http://10.75.15.249:8080/jeecg-boot'
|
# 是否启用读取配置文件 min
|
||||||
|
#VITE_WEBAPP = 'D://opt//AppUpdateTest'
|
||||||
|
VITE_WEBAPP = ''
|
||||||
|
#VITE_SERVER_BASEURL = 'http://10.75.15.247:8080/jeecg-boot'
|
||||||
#VITE_SERVER_BASEURL = 'https://36.112.48.190/jeecg-boot'
|
#VITE_SERVER_BASEURL = 'https://36.112.48.190/jeecg-boot'
|
||||||
#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/jeecg-boot'
|
VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/jeecg-boot'
|
||||||
|
#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/wwapi'
|
||||||
|
#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/yjapi'
|
6
env/.env.production
vendored
6
env/.env.production
vendored
@ -4,4 +4,10 @@ NODE_ENV = 'development'
|
|||||||
VITE_DELETE_CONSOLE = true
|
VITE_DELETE_CONSOLE = true
|
||||||
# 是否开启sourcemap
|
# 是否开启sourcemap
|
||||||
VITE_SHOW_SOURCEMAP = false
|
VITE_SHOW_SOURCEMAP = false
|
||||||
|
# 是否启用读取配置文件 min
|
||||||
|
#VITE_WEBAPP = 'D://opt//AppUpdateTest'
|
||||||
|
VITE_WEBAPP = ''
|
||||||
VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/jeecg-boot'
|
VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/jeecg-boot'
|
||||||
|
#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/wwapi'
|
||||||
|
#VITE_SERVER_BASEURL = 'https://szcx.zyyt.sinopec.com/yjapi'
|
||||||
|
#VITE_SERVER_BASEURL = 'http://10.75.15.247:8080/jeecg-boot'
|
@ -17,7 +17,7 @@ export default defineManifestConfig({
|
|||||||
name: VITE_APP_TITLE,
|
name: VITE_APP_TITLE,
|
||||||
appid: VITE_UNI_APPID,
|
appid: VITE_UNI_APPID,
|
||||||
description: '',
|
description: '',
|
||||||
versionName: '2.0.2',
|
versionName: '2.0.0',
|
||||||
versionCode: '20250616',
|
versionCode: '20250616',
|
||||||
transformPx: false,
|
transformPx: false,
|
||||||
locale: VITE_FALLBACK_LOCALE, // 'zh-Hans'
|
locale: VITE_FALLBACK_LOCALE, // 'zh-Hans'
|
||||||
|
@ -26,10 +26,13 @@ export function loginApi(config : LoginParams) {
|
|||||||
* @param
|
* @param
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function upDateAppApi() {
|
export function upDateAppApi(path : string) {
|
||||||
return http({
|
return http({
|
||||||
url: '/sys/common/upDateApp',
|
url: '/sys/common/upDateApp',
|
||||||
method: 'GET'
|
method: 'GET',
|
||||||
|
data: {
|
||||||
|
path
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
src/env.d.ts
vendored
4
src/env.d.ts
vendored
@ -14,7 +14,9 @@ interface ImportMetaEnv {
|
|||||||
/** 服务端口号 */
|
/** 服务端口号 */
|
||||||
readonly VITE_SERVER_PORT: string
|
readonly VITE_SERVER_PORT: string
|
||||||
/** 后台接口地址 */
|
/** 后台接口地址 */
|
||||||
readonly VITE_SERVER_BASEURL: string
|
readonly VITE_WEBAPP: string
|
||||||
|
/** 读取更新配置文件路径 by min */
|
||||||
|
readonly WEBAPP: string
|
||||||
/** H5是否需要代理 */
|
/** H5是否需要代理 */
|
||||||
readonly VITE_APP_PROXY: 'true' | 'false'
|
readonly VITE_APP_PROXY: 'true' | 'false'
|
||||||
/** H5是否需要代理,需要的话有个前缀 */
|
/** H5是否需要代理,需要的话有个前缀 */
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "数智产销",
|
"name": "数智产销",
|
||||||
"appid": "__UNI__9F097F0",
|
"appid": "__UNI__1B02D50",
|
||||||
"description": "",
|
"description": "",
|
||||||
"versionName": "2.0.2",
|
"versionName": "2.0.0",
|
||||||
"versionCode": "20250616",
|
"versionCode": "20250616",
|
||||||
"transformPx": false,
|
"transformPx": false,
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
|
@ -105,9 +105,9 @@
|
|||||||
let pw = Base64.encode(encodeURIComponent(password.value))
|
let pw = Base64.encode(encodeURIComponent(password.value))
|
||||||
loading.value = true
|
loading.value = true
|
||||||
/*生产环境 begin */
|
/*生产环境 begin */
|
||||||
// loginApi({ username: un, password: pw })
|
loginApi({ username: un, password: pw })
|
||||||
/*开发环境 begin */
|
/*开发环境 begin */
|
||||||
loginApi({ username: userName.value, password: password.value, captcha: 'app' })
|
// loginApi({ username: userName.value, password: password.value, captcha: 'app' })
|
||||||
.then((res : any) => {
|
.then((res : any) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
const { result } = res
|
const { result } = res
|
||||||
|
@ -4,6 +4,8 @@ import { isMpWeixin } from './platform'
|
|||||||
import { useAppStore } from '@/store'
|
import { useAppStore } from '@/store'
|
||||||
import { upDateAppApi } from '@/api/system'
|
import { upDateAppApi } from '@/api/system'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const getLastPage = () => {
|
const getLastPage = () => {
|
||||||
// getCurrentPages() 至少有1个元素,所以不再额外判断
|
// getCurrentPages() 至少有1个元素,所以不再额外判断
|
||||||
// const lastPage = getCurrentPages().at(-1)
|
// const lastPage = getCurrentPages().at(-1)
|
||||||
@ -228,7 +230,14 @@ export const useUpdateApp = defineStore('updateApp', () => {
|
|||||||
*/
|
*/
|
||||||
function checkAppUpdate(to = false) {
|
function checkAppUpdate(to = false) {
|
||||||
try {
|
try {
|
||||||
upDateAppApi().then(async (res : any) => {
|
let path = ''
|
||||||
|
let webApp = import.meta.env.VITE_WEBAPP
|
||||||
|
console.log(webApp)
|
||||||
|
if(webApp){//如果是测试环境 ,upDateAppApi 传递参数 by min
|
||||||
|
path = webApp
|
||||||
|
}
|
||||||
|
console.log(path)
|
||||||
|
upDateAppApi(path).then(async (res : any) => {
|
||||||
let {
|
let {
|
||||||
result
|
result
|
||||||
} = res
|
} = res
|
||||||
|
@ -47,6 +47,7 @@ export default ({ command, mode }) => {
|
|||||||
VITE_APP_PROXY,
|
VITE_APP_PROXY,
|
||||||
VITE_APP_PROXY_PREFIX,
|
VITE_APP_PROXY_PREFIX,
|
||||||
VITE_USE_MOCK,
|
VITE_USE_MOCK,
|
||||||
|
WEBAPP
|
||||||
} = env
|
} = env
|
||||||
console.log('环境变量 env -> ', env)
|
console.log('环境变量 env -> ', env)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user