|
@@ -122,7 +122,7 @@ export default {
|
|
// 如果用户未登录的话,返回之后,重新获取数据用户的基础数据
|
|
// 如果用户未登录的话,返回之后,重新获取数据用户的基础数据
|
|
if (!member && !uni.getStorageSync('isLogin') && window?.toWXSendMsg) {
|
|
if (!member && !uni.getStorageSync('isLogin') && window?.toWXSendMsg) {
|
|
wxToLoginCallback('parkingFee', (options) => {
|
|
wxToLoginCallback('parkingFee', (options) => {
|
|
- if(!this.openid) {
|
|
|
|
|
|
+ /*if(!this.openid) {
|
|
this.$store.commit('SET_IS_INIT', false);
|
|
this.$store.commit('SET_IS_INIT', false);
|
|
// 请求 projectId
|
|
// 请求 projectId
|
|
window.toWXSendMsg({
|
|
window.toWXSendMsg({
|
|
@@ -144,7 +144,25 @@ export default {
|
|
} else {
|
|
} else {
|
|
requestInit();
|
|
requestInit();
|
|
this.getParkInfo();
|
|
this.getParkInfo();
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
+ this.$store.commit('SET_IS_INIT', false);
|
|
|
|
+ // 请求 projectId
|
|
|
|
+ window.toWXSendMsg({
|
|
|
|
+ type: 'getProjectId',
|
|
|
|
+ options: {},
|
|
|
|
+ });
|
|
|
|
+ window.subscribe('projectId', (newOptions) => {
|
|
|
|
+ this.$store.dispatch('baseInit', {
|
|
|
|
+ options: newOptions,
|
|
|
|
+ callback: () => {
|
|
|
|
+ this.$nextTick(( ) => {
|
|
|
|
+ requestInit();
|
|
|
|
+ this.getParkInfo();
|
|
|
|
+ this.$store.commit('SET_IS_INIT', true);
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ });
|
|
});
|
|
});
|
|
// return
|
|
// return
|
|
}
|
|
}
|