绿满眶商城微信小程序-uniapp
xiangpei
2025-05-09 c3e6cdbb29580e77444541c7953aca33581a4267
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/**
 * 信任登录相关API
 */
 
import {
    http,
    Method
} from '@/utils/request.js';
const request = http.request;
 
 
/**
 * web 第三方登录
 * @param {Object} code
 */
export function webConnect(code) {
    return http.request({
        url: `passport/connect/connect/login/web/${code}`,
        method: Method.GET,
        needToken: true,
        header: {
            "clientType": "H5"
        }
    });
}
export function openIdLogin(params, clientType) {
    return http.request({
        url: `passport/connect/connect/app/login`,
        method: Method.POST,
        needToken: true,
        data: params,
        header: {
            "clientType": clientType
        }
    });
}
 
/**
 * 第三方登录成功 回调接口
 */
export function loginCallback(state) {
    return http.request({
        url: `passport/connect/connect/result?state=${state}`,
        method: Method.GET,
        needToken: false
    });
}
 
 
 
/**
 * 小程序自动登录
 * @param params
 */
export function mpAutoLogin(params) {
    return http.request({
        url: 'passport/connect/miniProgram/auto-login',
        method: Method.GET,
        params
    });
}