微信体验版测试

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> </view>
<view class="bottom"> <view class="bottom">
<image :src="bottomSection.prayerSection.backgroundImg" mode=""></image> <!-- <image :src="bottomSection.prayerSection.backgroundImg" mode=""></image>-->
<view class="rixing"> <!-- <view class="rixing">-->
{{ bottomSection.prayerSection.title }} <!-- {{ bottomSection.prayerSection.title }}-->
</view> <!-- </view>-->
<view class="qifu"> <!-- <view class="qifu">-->
<image :src="bottomSection.prayerSection.prayerButton.icon" mode=""></image> <!-- <image :src="bottomSection.prayerSection.prayerButton.icon" mode=""></image>-->
<view class="zaixian"> <!-- <view class="zaixian">-->
<view class="da"> <!-- <view class="da">-->
{{ bottomSection.prayerSection.prayerButton.title }} <!-- {{ bottomSection.prayerSection.prayerButton.title }}-->
</view> <!-- </view>-->
<view class="xiao"> <!-- <view class="xiao">-->
{{ bottomSection.prayerSection.prayerButton.subtitle }} <!-- {{ bottomSection.prayerSection.prayerButton.subtitle }}-->
</view> <!-- </view>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
</view> </view>
</view> </view>
</view> </view>

View File

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