优化登录体验并更新小程序域名
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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"
|
||||||
```
|
```
|
||||||
|
|
||||||
然后执行:
|
然后执行:
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -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>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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";
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user