修改地址及推送内容

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

View File

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