|
@@ -119,19 +119,34 @@ export default {
|
|
|
await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
|
|
|
}
|
|
|
const member = uni.getStorageSync('member');
|
|
|
- console.log(4141, member);
|
|
|
+ // 如果用户未登录的话,返回之后,重新获取数据用户的基础数据
|
|
|
if (!member && !uni.getStorageSync('isLogin') && window?.toWXSendMsg) {
|
|
|
wxToLoginCallback('parkingFee', (options) => {
|
|
|
- uni.setStorageSync('isLogin', 'isLogin');
|
|
|
- // console.log(126, options);
|
|
|
- // if (options?.noLoginParkingFeeWebView === 'fail') {
|
|
|
- // this.loadData();
|
|
|
- // } else {
|
|
|
- // this.$router.back(-1);
|
|
|
- // }
|
|
|
+ if(!this.openid) {
|
|
|
+ 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(( ) => {
|
|
|
+ this.getParkInfo();
|
|
|
+ this.$store.commit('SET_IS_INIT', true);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.getParkInfo();
|
|
|
+ }
|
|
|
});
|
|
|
+ // return
|
|
|
}
|
|
|
-
|
|
|
+ console.log(136, this.openid);
|
|
|
if (this.openid) {
|
|
|
this.getParkInfo();
|
|
|
this.showSq = false;
|
|
@@ -181,7 +196,10 @@ export default {
|
|
|
title: '加载中',
|
|
|
});
|
|
|
try {
|
|
|
- const res = await parkingLots('8aaa82ea804d07cd0180516ff03b0008'); // TODO: 临时写死
|
|
|
+ console.log('加载车场信息', this.$store.state.lbsId);
|
|
|
+ // const res = await parkingLots('8aaa82ea804d07cd0180516ff03b0008'); // TODO: 临时写死
|
|
|
+ const res = await parkingLots(this.$store.state.lbsId); // TODO: 临时写死
|
|
|
+ console.log(res);
|
|
|
let reg = /[;;]/g;
|
|
|
this.description = res.description.replace(reg, '\r\n').replace(/\r\n/g, '<br/>');
|
|
|
const carList = uni.getStorageSync('carList');
|