公众号绑定

msb_beta
ch 3 years ago
parent 376030a1a6
commit 4a9887eae8

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-28 16:30:54
* @LastEditors: ch
* @LastEditTime: 2022-05-06 20:58:31
* @LastEditTime: 2022-05-17 19:49:08
* @Description: file content
*/
@ -27,6 +27,13 @@ export const ApiGetAuthUrl = (params) =>
export const ApiGetOpenId = ({code}) =>
ToAsyncAwait(MsbRequest.get(`${AUTH_URL}/wx/mp/getOpenId/${APPID}`, { code }));
/**
* 微信OPENID绑定用户
* @param {*} data
*/
export const ApiPostThirdInfo = (data) =>
ToAsyncAwait(MsbRequestTk.post(`${AUTH_URL}/third/saveThirdInfo`, {...data, appid:APPID}));
/**
* 微信h5支付获取支付URL
* @param {*} data

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 15:36:46
* @LastEditors: ch
* @LastEditTime: 2022-05-16 20:33:11
* @LastEditTime: 2022-05-17 19:50:10
* @Description: file content
-->
<template>
@ -33,6 +33,7 @@
<script>
import { IsPhone,MsbWebSkt, MsbWebSktInit, createUUID } from '@/common/utils';
import { ApiGetCode, ApiPostLogin } from '@/common/api/index';
import { ApiPostThirdInfo } from '@/common/api/base';
import UiButton from '../components/UiButton.vue';
export default {
components: { UiButton },
@ -104,6 +105,14 @@ export default {
}
this.$store.commit('SET_TOKEN',result.token);
this.$store.commit('SET_USER_INFO',result.user);
if(store.state.openId){
ApiPostThirdInfo({
appUserId: store.state.openId,
platformType: 1
});
}
MsbWebSktInit().then(()=>{
MsbWebSkt.send({
data : JSON.stringify({

Loading…
Cancel
Save