|
@@ -273,7 +273,11 @@ import log from '@/utils/log.js';
|
|
|
import { compare } from '@/utils/location.js';
|
|
|
import uni from '@/utils/uniHooks';
|
|
|
import { initWxJsSdkConfig } from '@/utils/login';
|
|
|
-import { getPlatform } from '@/utils/index';
|
|
|
+import {
|
|
|
+ getAppIdByGroupIdAndMallId,
|
|
|
+ getIsWxh5,
|
|
|
+ getPlatform,
|
|
|
+} from '@/utils/index';
|
|
|
import { Dialog, Toast } from 'vant';
|
|
|
|
|
|
export default {
|
|
@@ -601,9 +605,9 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 创建订单
|
|
|
- async createParkOrder() {
|
|
|
- console.log(603);
|
|
|
- debugger;
|
|
|
+ async createParkOrder({ groupId, mallId, type }) {
|
|
|
+ // console.log(603);
|
|
|
+ // debugger;
|
|
|
try {
|
|
|
uni.showLoading({
|
|
|
title: '加载中',
|
|
@@ -617,9 +621,20 @@ export default {
|
|
|
mobile: this.mobile,
|
|
|
groupId: this.groupId,
|
|
|
createuser: 'sys_miniprogram',
|
|
|
- projectId: uni.getStorageSync('groupId'),
|
|
|
+ // projectId: 'SKC',
|
|
|
// appId: uni.getStorageSync('appid'),
|
|
|
};
|
|
|
+ if (getIsWxh5()) {
|
|
|
+ // 如果是微信公众号环境
|
|
|
+ const { projectId } = getAppIdByGroupIdAndMallId({
|
|
|
+ groupId: uni.getStorageSync('groupId'),
|
|
|
+ mallId: uni.getStorageSync('mallId'),
|
|
|
+ type: 'all',
|
|
|
+ });
|
|
|
+ params.projectId = projectId;
|
|
|
+ params.appId = appId;
|
|
|
+ }
|
|
|
+
|
|
|
this.$md(params);
|
|
|
const res = await this.$request({
|
|
|
url: this.$baseURL + 'api/1.0/park/createParkOrderAndCarFee',
|
|
@@ -628,8 +643,8 @@ export default {
|
|
|
header: JSON.parse(uni.getStorageSync('handleUser')),
|
|
|
});
|
|
|
uni.hideLoading();
|
|
|
- console.log(629, res.data);
|
|
|
- debugger;
|
|
|
+ // console.log(629, res.data);
|
|
|
+ // debugger;
|
|
|
if (res.data.code === 0) {
|
|
|
this.bindflag = res.data.data.bind;
|
|
|
this.parkInfo = res.data.data;
|