优化登录体验并更新小程序域名

This commit is contained in:
inman
2026-07-24 16:09:55 +08:00
parent 5567c71298
commit 3207220d1a
7 changed files with 10 additions and 10 deletions

View File

@@ -18,4 +18,4 @@ VITE_MEDIA_PUBLIC_BASE_URL=""
VITE_WECOM_CUSTOMER_SERVICE_URL="https://work.weixin.qq.com/kfid/your-customer-service-link" VITE_WECOM_CUSTOMER_SERVICE_URL="https://work.weixin.qq.com/kfid/your-customer-service-link"
VITE_WECOM_CORP_ID="ww_your_corp_id" VITE_WECOM_CORP_ID="ww_your_corp_id"
# Taro 会将这个地址编译进微信小程序;生产环境请填写已备案并加入 request 合法域名的 HTTPS API 地址 # Taro 会将这个地址编译进微信小程序;生产环境请填写已备案并加入 request 合法域名的 HTTPS API 地址
TARO_APP_API_BASE_URL="https://biz.wanderqtrip.com/api" TARO_APP_API_BASE_URL="https://bizwanderq.nianxx.com/api"

View File

@@ -1,2 +1,2 @@
TARO_APP_API_BASE_URL="https://biz.wanderqtrip.com/api" TARO_APP_API_BASE_URL="https://bizwanderq.nianxx.com/api"
TARO_APP_H5_URL="https://www.example.com" TARO_APP_H5_URL="https://wanderq.nianxx.com"

View File

@@ -21,7 +21,8 @@ MINIAPP_MEMORY_DB=1 npm run dev:api:memory
在根目录环境中设置: 在根目录环境中设置:
```bash ```bash
TARO_APP_API_BASE_URL="https://biz.wanderqtrip.com/api" TARO_APP_API_BASE_URL="https://bizwanderq.nianxx.com/api"
TARO_APP_H5_URL="https://wanderq.nianxx.com"
``` ```
然后执行: 然后执行:

View File

@@ -3,7 +3,7 @@ import { fileURLToPath } from "node:url";
import { defineConfig, type UserConfigExport } from "@tarojs/cli"; import { defineConfig, type UserConfigExport } from "@tarojs/cli";
const appRoot = path.resolve(fileURLToPath(new URL("..", import.meta.url))); const appRoot = path.resolve(fileURLToPath(new URL("..", import.meta.url)));
const DEFAULT_API_BASE_URL = "https://biz.wanderqtrip.com/api"; const DEFAULT_API_BASE_URL = "https://bizwanderq.nianxx.com/api";
class StripWxssWebpackBannersPlugin { class StripWxssWebpackBannersPlugin {
apply(compiler: any) { apply(compiler: any) {

View File

@@ -45,8 +45,7 @@ export default function LoginPage() {
<View className="login-page"> <View className="login-page">
<View className="login-hero"> <View className="login-hero">
<Text className="eyebrow"></Text> <Text className="eyebrow"></Text>
<Text className="login-title"> H5 </Text> <Text className="login-title"></Text>
<Text className="login-note"></Text>
</View> </View>
<Button <Button
className="phone-login-button" className="phone-login-button"
@@ -57,7 +56,7 @@ export default function LoginPage() {
{loading ? "登录中..." : "微信手机号一键登录"} {loading ? "登录中..." : "微信手机号一键登录"}
</Button> </Button>
{message ? <Text className="login-message">{message}</Text> : null} {message ? <Text className="login-message">{message}</Text> : null}
<Text className="login-privacy"></Text> <Text className="login-privacy"></Text>
</View> </View>
); );
} }

View File

@@ -1,6 +1,6 @@
import Taro from "@tarojs/taro"; import Taro from "@tarojs/taro";
const DEFAULT_API_BASE_URL = "https://biz.wanderqtrip.com/api"; const DEFAULT_API_BASE_URL = "https://bizwanderq.nianxx.com/api";
const API_BASE = String(process.env.TARO_APP_API_BASE_URL || DEFAULT_API_BASE_URL).replace(/\/+$/, ""); const API_BASE = String(process.env.TARO_APP_API_BASE_URL || DEFAULT_API_BASE_URL).replace(/\/+$/, "");
const TOKEN_KEY = "wanqu_mini_program_token"; const TOKEN_KEY = "wanqu_mini_program_token";
const LOCAL_FAVORITES_KEY = "wanqu_mini_program_favorites"; const LOCAL_FAVORITES_KEY = "wanqu_mini_program_favorites";

View File

@@ -3866,7 +3866,7 @@ export default function App() {
const changeView = (nextView: AppView) => { const changeView = (nextView: AppView) => {
if (nextView === "mine" && !authUser) { if (nextView === "mine" && !authUser) {
showAuthSheet("进入“我的”前,请先完成微信手机号登录。"); handleLogin();
return; return;
} }
setSelectedProduct(null); setSelectedProduct(null);