微信体验版测试

This commit is contained in:
minimaxagent1 2025-08-02 13:28:50 +08:00
parent d94caddd8b
commit ce6ee8413d
2 changed files with 31 additions and 30 deletions

View File

@ -58,21 +58,21 @@
</view>
</view>
<view class="bottom">
<image :src="bottomSection.prayerSection.backgroundImg" mode=""></image>
<view class="rixing">
{{ bottomSection.prayerSection.title }}
</view>
<view class="qifu">
<image :src="bottomSection.prayerSection.prayerButton.icon" mode=""></image>
<view class="zaixian">
<view class="da">
{{ bottomSection.prayerSection.prayerButton.title }}
</view>
<view class="xiao">
{{ bottomSection.prayerSection.prayerButton.subtitle }}
</view>
</view>
</view>
<!-- <image :src="bottomSection.prayerSection.backgroundImg" mode=""></image>-->
<!-- <view class="rixing">-->
<!-- {{ bottomSection.prayerSection.title }}-->
<!-- </view>-->
<!-- <view class="qifu">-->
<!-- <image :src="bottomSection.prayerSection.prayerButton.icon" mode=""></image>-->
<!-- <view class="zaixian">-->
<!-- <view class="da">-->
<!-- {{ bottomSection.prayerSection.prayerButton.title }}-->
<!-- </view>-->
<!-- <view class="xiao">-->
<!-- {{ bottomSection.prayerSection.prayerButton.subtitle }}-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
</view>
</view>
</view>

View File

@ -3,29 +3,30 @@ import { getTempToken, shouldUseTempToken } from '@/config/dev.js'
// 环境配置
const ENV_CONFIG = {
development: {
develop: { // 开发环境
baseUrl: 'http://192.168.2.7:4501',
loadingText: '努力加载中~',
loadingTime: 800
loadingText: '开发环境加载中~',
},
production: {
trial: { // 体验版
baseUrl: 'https://testlu.chuangtewl.com/prod-api',
loadingText: '努力加载中~',
loadingTime: 800
loadingText: '体验版加载中~',
},
release: { // 正式版
baseUrl: 'https://testlu.chuangtewl.com/prod-api',
loadingText: '加载中~',
}
}
// 获取当前环境配置
const getCurrentConfig = () => {
// 可以通过环境变量或其他方式判断环境
const isDev = process.env.NODE_ENV === 'development' ||
uni.getSystemInfoSync().platform === 'devtools'
console.log('当前环境判断:', {
NODE_ENV: process.env.NODE_ENV,
platform: uni.getSystemInfoSync().platform,
isDev: isDev
})
return isDev ? ENV_CONFIG.development : ENV_CONFIG.production
try {
const { envVersion } = wx.getAccountInfoSync().miniProgram
console.log('当前环境:', envVersion)
return ENV_CONFIG[envVersion] || ENV_CONFIG.release // 默认正式环境
} catch (error) {
console.warn('获取环境失败,默认使用正式环境:', error)
return ENV_CONFIG.release
}
}
const config = getCurrentConfig()