Compare commits

...

2 Commits

Author SHA1 Message Date
kk 842defea21 注册成功后保存用户id与手机号
Uni-app H5 Deploy (Prod + Staging) / deploy (release) Successful in 44s
2026-07-11 18:30:16 +08:00
kk d392ff98b7 apiBaseUrl改成https
Uni-app H5 Deploy (Prod + Staging) / deploy (release) Successful in 41s
2026-07-11 18:22:44 +08:00
2 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
*/ */
const prod = { const prod = {
// 业务 API 地址(vms-api // 业务 API 地址(vms-api
apiBaseUrl: 'http://101.200.86.98:4000', apiBaseUrl: 'https://vmsapi.arklinksmart.cn',
// 网关地址(vms-gateway)— 用户授权、短信等接口走网关 // 网关地址(vms-gateway)— 用户授权、短信等接口走网关
apiGatewayUrl: 'https://gateway.arklinksmart.cn', apiGatewayUrl: 'https://gateway.arklinksmart.cn',
+6 -3
View File
@@ -183,15 +183,18 @@ export default {
}); });
const ret = res.data || {}; const ret = res.data || {};
console.log('[register] 注册响应:', JSON.stringify(ret, null, 2));
if (ret.code === 0 && ret.data) { if (ret.code === 0 && ret.data) {
// 保存 token // 保存 token
uni.setStorageSync('token', ret.data.token); uni.setStorageSync('token', ret.data.token);
// 存储 user_info至少有 user_id 就能开门 // 存储 user_info接口返回 user_info.user_id 和 phone
const existing = uni.getStorageSync('user_info') || {}; const existing = uni.getStorageSync('user_info') || {};
const apiUserInfo = ret.data.user_info || {};
const userInfo = { const userInfo = {
user_id: ret.data.user_id || existing.user_id || '', user_id: apiUserInfo.user_id || existing.user_id || '',
phone: this.phone || existing.phone || '', phone: apiUserInfo.phone || this.phone || existing.phone || '',
nickname: existing.nickname || '', nickname: existing.nickname || '',
avatar: existing.avatar || '', avatar: existing.avatar || '',
}; };