Jacob
2026-10-12 a7e7b324f32b7d0769adf596a622bcc0d81ed6d0
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
import request from "@/utils/request.js";
import wechat from "@/libs/wechat.js";
import {
   checkLogin
} from '../libs/login';
/**
 * 获取微信公众号js配置
 * @returns {*}
 */
export function getWechatConfig() {
  return request.get("wechat/config",{ url: encodeURIComponent(wechat.signLink()) },{ noAuth: true });
}
 
/**
 * 获取微信sdk配置
 * @returns {*}
 */
export function wechatAuth(code, spread) {
   var reg=/^[0-9]+.?[0-9]*$/; //判断字符串是否为数字 ,判断正整数用/^[1-9]+[0-9]*]*$/
   spread = reg.test(spread) ? spread : 0;
  return request.get(
    "wechat/authorize/login?code=" + code + "&spread_spid=" + spread, {},
    { noAuth: true }
  );
}
 
/**
 * 获取登录授权login
 * 
*/
export function getLogo()
{
   // wechat/get_logo
  return request.get('wechat/getLogo', {}, { noAuth : true});
}
 
/**
 * 小程序用户登录
 * @param data object 小程序用户登录信息
 */
export function login(code,data) {
  return request.post("wechat/authorize/program/login?code="+code, data, { noAuth : true });
}
 
/**
 * 小程序用户登录
 * @param data object 小程序用户登录信息
 */
export function thirdLogin(data) {
  return request.post("wechat/thirdTokenLogin", data, { noAuth : true });
}
export function thirdUpdate(data) {
  return request.post("wechat/thirdTokenUpdate", data, { noAuth : true });
}
/**
 * 分享
 * @returns {*}
 */
export function getShare() {
  return request.get("share", {}, { noAuth: true });
}
 
/**
 * 获取关注海报
 * @returns {*}
 */
export function follow() {
  return request.get("wechat/follow", {}, { noAuth: true });
}
 
/**
 * 获取图片base64
 * @retins {*}
 * */
export function imageBase64(image) {
  return request.post("qrcode/base64",image,{ noAuth: true },1);
}
 
/**
 * 自动复制口令功能
 * @returns {*}
 */
export function copyWords() {
  return request.get("copy_words", {}, { noAuth: true });
}
 
/**
 * 首页 获取客服地址
 * @returns {*}
 */
export function kefuConfig() {
  return request.get("config", {}, { noAuth: true });
}
 
/**
 * 微信(公众号,小程序)解密手机号
 * @param {Object} data
 */
export function decryptPhone(data){
   return request.post('wechat/register/decrypt/phone',data,{noAuth : true});
}
/**
 * 微信(公众号,小程序)绑定手机号
 * @param {Object} data
 */
export function bindUserPhone(data){
   return request.post('wechat/register/binding/phone',data,{noAuth : true});
}
 
/**
 * APP微信登录
 * @param {Object} data
 */
export function appAuth(data) {
   return request.post("wechat/authorize/app/login", data, { noAuth : true });
}
 
/**
 * 苹果登录
 * @param {Object} data
 */
export function appleLogin(data) {
   return request.post("ios/login", data, { noAuth : true });
}
 
 
/**
 * 苹果绑定手机号
 * @param {Object} data
 */
export function iosBinding(data) {
   return request.post("ios/binding/phone", data, { noAuth : true });
}