修改地址及推送内容
This commit is contained in:
@@ -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'
|
||||||
|
|
||||||
|
|||||||
@@ -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'
|
||||||
29
src/App.vue
29
src/App.vue
@@ -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
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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,7 +281,13 @@ const submitForm = () => {
|
|||||||
let deviceId = res3.data;
|
let deviceId = res3.data;
|
||||||
// showAlert("读取成功=>"+deviceId);
|
// showAlert("读取成功=>"+deviceId);
|
||||||
param.uniqCode = deviceId;
|
param.uniqCode = deviceId;
|
||||||
|
|
||||||
|
uni.getPushClientId({
|
||||||
|
success: (res) => {
|
||||||
|
let push_clientid = res.cid
|
||||||
|
console.log('客户端推送标识:', push_clientid);
|
||||||
console.log("param=>",param)
|
console.log("param=>",param)
|
||||||
|
// showAlert("客户端推送标识=>"+push_clientid);
|
||||||
login(param).then(res=>{
|
login(param).then(res=>{
|
||||||
userStore.login(res);
|
userStore.login(res);
|
||||||
uni.switchTab({ url: '/pages/home/home' })
|
uni.switchTab({ url: '/pages/home/home' })
|
||||||
@@ -289,6 +295,11 @@ const submitForm = () => {
|
|||||||
}).finally(()=>{
|
}).finally(()=>{
|
||||||
btnLoading.value = false;
|
btnLoading.value = false;
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// showAlert('读取失败:'+res3.msg)
|
// showAlert('读取失败:'+res3.msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user