| | |
| | | // WEB_INVOKE_APPSERVICE |
| | | function messageFun(e) { |
| | | if (e.data.type === "WEB_INVOKE_APPSERVICE") { |
| | | if (e.data.data.arg.type === "tokenExpired") { |
| | | return uni.reLaunch({ |
| | | url: "/pages/login/index", |
| | | }); |
| | | const {type,data} = e.data.data.arg |
| | | if (type === "tokenExpired") { |
| | | return uni.reLaunch({url: "/pages/login/index"}); |
| | | }else if(type === "wxOpenLocation"){ |
| | | return wx.openLocation({ |
| | | latitude: data.latitude, |
| | | longitude: data.longitude, |
| | | name: data.name, |
| | | address: data.name, |
| | | scale: 18 |
| | | }) |
| | | }else{ |
| | | emit("webMessage", e.data.data.arg); |
| | | } |
| | | emit("webMessage", e.data.data.arg); |
| | | } |
| | | } |
| | | |