2024-08-07 10:31:42 +08:00
|
|
|
|
import request from '@/sheep/request';
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
// 微信相关
|
|
|
|
|
wechat: {
|
|
|
|
|
// 小程序订阅消息
|
2024-09-18 17:33:25 +08:00
|
|
|
|
// subscribeTemplate: (params) =>
|
|
|
|
|
// request({
|
|
|
|
|
// url: 'third/wechat/subscribeTemplate',
|
|
|
|
|
// method: 'GET',
|
|
|
|
|
// params: {
|
|
|
|
|
// platform: 'miniProgram',
|
|
|
|
|
// },
|
|
|
|
|
// custom: {
|
|
|
|
|
// showError: false,
|
|
|
|
|
// showLoading: false,
|
|
|
|
|
// },
|
|
|
|
|
// }),
|
2024-08-07 10:31:42 +08:00
|
|
|
|
|
|
|
|
|
// 获取微信小程序码
|
|
|
|
|
// TODO @puhui999:这个接口,挪到 /Users/yunai/Java/yudao-mall-uniapp/sheep/api/member/social.js
|
|
|
|
|
getWxacode: async (path, query) => {
|
|
|
|
|
return await request({
|
|
|
|
|
url: '/member/social-user/wxa-qrcode',
|
|
|
|
|
method: 'POST',
|
|
|
|
|
data: {
|
|
|
|
|
scene: query,
|
|
|
|
|
path,
|
|
|
|
|
checkPath: false, // TODO 开发环境暂不检查 path 是否存在
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 苹果相关
|
|
|
|
|
apple: {
|
|
|
|
|
// 第三方登录
|
|
|
|
|
login: (data) =>
|
|
|
|
|
request({
|
|
|
|
|
url: 'third/apple/login',
|
|
|
|
|
method: 'POST',
|
|
|
|
|
data,
|
|
|
|
|
custom: {
|
|
|
|
|
showSuccess: true,
|
|
|
|
|
loadingMsg: '登陆中',
|
|
|
|
|
},
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
};
|