|
@@ -4,6 +4,7 @@ import LoginDom from '@/components/Login/Login.vue';
|
|
|
import { mapState } from 'vuex';
|
|
|
import { initWxJsSdkConfig } from '@/utils/login';
|
|
|
import { getPlatform } from '@/utils/index';
|
|
|
+import { wxToLoginCallback } from '@/utils';
|
|
|
|
|
|
const app = {
|
|
|
globalData: {
|
|
@@ -117,6 +118,19 @@ export default {
|
|
|
if (platform === 'micromessenger') {
|
|
|
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.getParkInfo();
|
|
@@ -377,6 +391,15 @@ export default {
|
|
|
},
|
|
|
// 缴费记录
|
|
|
doRouter: function () {
|
|
|
+ window?.toWXSendMsg({
|
|
|
+ type: 'uni_func',
|
|
|
+ funcName: 'setStorageSync',
|
|
|
+ options: {
|
|
|
+ key: 'noLoginParkingFeeWebViewPath',
|
|
|
+ value: ''
|
|
|
+ },
|
|
|
+ });
|
|
|
+ uni.setStorageSync('loadData', '');
|
|
|
if (this.$store.state.isLogin === '3') {
|
|
|
this.$router.push({ path: 'login' });
|
|
|
return;
|
|
@@ -385,6 +408,15 @@ export default {
|
|
|
},
|
|
|
// 车牌管理
|
|
|
doRouter2: function () {
|
|
|
+ window?.toWXSendMsg({
|
|
|
+ type: 'uni_func',
|
|
|
+ funcName: 'setStorageSync',
|
|
|
+ options: {
|
|
|
+ key: 'noLoginParkingFeeWebViewPath',
|
|
|
+ value: ''
|
|
|
+ },
|
|
|
+ });
|
|
|
+ uni.setStorageSync('loadData', '');
|
|
|
if (this.$store.state.isLogin === '3') {
|
|
|
this.$router.push({ path: 'login' });
|
|
|
return;
|
|
@@ -394,6 +426,15 @@ export default {
|
|
|
},
|
|
|
//停车发票
|
|
|
doRouter1: function () {
|
|
|
+ window?.toWXSendMsg({
|
|
|
+ type: 'uni_func',
|
|
|
+ funcName: 'setStorageSync',
|
|
|
+ options: {
|
|
|
+ key: 'noLoginParkingFeeWebViewPath',
|
|
|
+ value: ''
|
|
|
+ },
|
|
|
+ });
|
|
|
+ uni.setStorageSync('loadData', '');
|
|
|
if (this.$store.state.isLogin === '3') {
|
|
|
this.$router.push({ path: 'login' });
|
|
|
return;
|
|
@@ -413,6 +454,15 @@ export default {
|
|
|
},
|
|
|
//停车券兑换
|
|
|
doRouter3: function () {
|
|
|
+ window?.toWXSendMsg({
|
|
|
+ type: 'uni_func',
|
|
|
+ funcName: 'setStorageSync',
|
|
|
+ options: {
|
|
|
+ key: 'noLoginParkingFeeWebViewPath',
|
|
|
+ value: ''
|
|
|
+ },
|
|
|
+ });
|
|
|
+ uni.setStorageSync('loadData', '');
|
|
|
window.toWXSendMsg({
|
|
|
type: 'toPage',
|
|
|
options: {
|
|
@@ -442,8 +492,8 @@ export default {
|
|
|
// 无牌车闸机扫码
|
|
|
async scanCarCode() {
|
|
|
try {
|
|
|
- this.qrCodesRule('e41d4d9dd5534f4aa3de88326a2e6f85')
|
|
|
- return
|
|
|
+ // this.qrCodesRule('e41d4d9dd5534f4aa3de88326a2e6f85')
|
|
|
+ // return
|
|
|
const runScanFn = (res) => {
|
|
|
if (res.scanType == 'QR_CODE' && res.scanType) {
|
|
|
console.log(res.result);
|