!33 修复微信小程序登录openid参数名不一致导致支付报错问题

Merge pull request !33 from 高靖/master
master-vue2
芋道源码 2023-12-27 11:57:49 +00:00 committed by Gitee
commit 27605c4cd1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 83 additions and 78 deletions

View File

@ -30,8 +30,8 @@
</view>
</view>
<block v-if="isUp">
<mobileLogin :isUp="isUp" @close="maskClose" @wechatPhone="wechatPhone"
:social-code="socialCode" :social-state="socialState" />
<mobileLogin :isUp="isUp" @close="maskClose" @wechatPhone="wechatPhone" :social-code="socialCode"
:social-state="socialState" />
</block>
<block v-if="isPhoneBox">
<routinePhone :logoUrl="logoUrl" :isPhoneBox="isPhoneBox" @close="bindPhoneClose" :authKey="authKey">
@ -47,7 +47,9 @@
import mobileLogin from '@/components/login_mobile/index.vue'
import routinePhone from '@/components/login_mobile/routine_phone.vue'
import * as BrokerageAPI from '@/api/trade/brokerage.js'
import { getUserPhone } from '@/api/public';
import {
getUserPhone
} from '@/api/public';
import Routine from '@/libs/routine';
import wechat from "@/libs/wechat";
export default {
@ -86,7 +88,10 @@
window.scrollTo(0, Math.max(scrollHeight - 1, 0));
}, 100);
});
const { code, state } = options;
const {
code,
state
} = options;
this.options = options
// code
this.code = code || ''
@ -194,7 +199,7 @@
'token': data.accessToken
});
// opendId
this.$store.commit("OPENID", data.openId);
this.$store.commit("OPENID", data.openid);
// userId
this.$store.commit("SETUID", data.userId);
this.getUserInfo();