绿满眶商城微信小程序-uniapp
xiangpei
7 天以前 8cdb055657aff3167f38b31e41ccfe4b684ba457
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
62
63
64
65
66
67
68
69
70
71
72
73
74
/**
 * 信任登录相关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
    });
}
 
 
/**
 * 小程序静默登录
 * @param params
 */
export function silentLogin(params) {
    return http.request({
        url: 'passport/connect/miniProgram/silent-login',
        method: Method.GET,
        params
    });
}