修改地址及推送内容

This commit is contained in:
xuli3099
2025-09-04 14:34:00 +08:00
parent 45b0117f5f
commit 426ac9171d
4 changed files with 38 additions and 28 deletions

View File

@@ -1,12 +1,12 @@
#调用后台地址 #调用后台地址
# 公司 # 公司
VITE_APP_BASE_URL = 'http://118.186.13.120:31302' # VITE_APP_BASE_URL = 'http://118.186.13.120:31302'
# VITE_APP_BASE_URL = "http://192.168.236.71:31302" # VITE_APP_BASE_URL = "http://192.168.236.71:31302"
# VITE_APP_BASE_URL = "http://123.57.20.168:3000" # VITE_APP_BASE_URL = "http://123.57.20.168:3000"
# 友晟外网 # 友晟外网
# VITE_APP_BASE_URL = 'https://app-test.718yousheng.com' VITE_APP_BASE_URL = 'https://app-test.718yousheng.com/app'
# 友晟内网 # 友晟内网
# VITE_APP_BASE_URL = 'https://appi-test.718yousheng.com' # VITE_APP_BASE_URL = 'https://appi-test.718yousheng.com/app'

View File

@@ -6,6 +6,6 @@
# VITE_APP_BASE_URL = "http://123.57.20.168:3000" # VITE_APP_BASE_URL = "http://123.57.20.168:3000"
# 友晟外网 # 友晟外网
VITE_APP_BASE_URL = 'https://app-test.718yousheng.com' VITE_APP_BASE_URL = 'https://app-test.718yousheng.com/app'
# 友晟内网 # 友晟内网
# VITE_APP_BASE_URL = 'https://appi-test.718yousheng.com' # VITE_APP_BASE_URL = 'https://appi-test.718yousheng.com/app'

View File

@@ -15,24 +15,23 @@ onLaunch((opt) => {
console.log("APP onLaunch") console.log("APP onLaunch")
// #ifdef APP-PLUS // #ifdef APP-PLUS
uni.getPushClientId({ // uni.getPushClientId({
success: (res) => { // success: (res) => {
let push_clientid = res.cid // let push_clientid = res.cid
console.log('客户端推送标识:', push_clientid); // console.log('客户端推送标识:', push_clientid);
}, // },
fail(err) { // fail(err) {
console.log(err) // console.log(err)
} // }
}) // })
uni.onPushMessage(res => { uni.onPushMessage(res => {
console.log("收到推送消息:", res) //监听推送消息 console.log("收到推送消息:", res) //监听推送消息
showAlert(JSON.stringify(res)) showAlert(JSON.stringify(res))
uni.createPushMessage({ // uni.createPushMessage({
title: res.data.title, // title: res.data.title,
content: res.data.content, // content: res.data.content,
payload: res.data.payload // payload: res.data.payload
}) // })
}) })
// #endif // #endif
}) })

View File

@@ -266,7 +266,7 @@ const submitForm = () => {
//h5测试用 内网-sn123456 //h5测试用 内网-sn123456
//公司外网 'd5aa6eaf-fff7-4009-bf7e-60e4b3dc4f40' //公司外网 'd5aa6eaf-fff7-4009-bf7e-60e4b3dc4f40'
//友晟外网 'b97527c8-2ad4-493c-a01c-5f9d0aabaff2' //友晟外网 'b97527c8-2ad4-493c-a01c-5f9d0aabaff2'
param.uniqCode = 'd5aa6eaf-fff7-4009-bf7e-60e4b3dc4f40'; param.uniqCode = 'b97527c8-2ad4-493c-a01c-5f9d0aabaff2';
let res = await login(param); let res = await login(param);
userStore.login(res); userStore.login(res);
uni.switchTab({ url: '/pages/home/home' }) uni.switchTab({ url: '/pages/home/home' })
@@ -281,13 +281,24 @@ const submitForm = () => {
let deviceId = res3.data; let deviceId = res3.data;
// showAlert("读取成功=>"+deviceId); // showAlert("读取成功=>"+deviceId);
param.uniqCode = deviceId; param.uniqCode = deviceId;
console.log("param=>",param)
login(param).then(res=>{ uni.getPushClientId({
userStore.login(res); success: (res) => {
uni.switchTab({ url: '/pages/home/home' }) let push_clientid = res.cid
btnLoading.value = false; console.log('客户端推送标识:', push_clientid);
}).finally(()=>{ console.log("param=>",param)
btnLoading.value = false; // showAlert("客户端推送标识=>"+push_clientid);
login(param).then(res=>{
userStore.login(res);
uni.switchTab({ url: '/pages/home/home' })
btnLoading.value = false;
}).finally(()=>{
btnLoading.value = false;
})
},
fail(err) {
console.log(err)
}
}) })
} else { } else {