123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- import request from "@/utils/request.js";
- import wechat from "@/libs/wechat.js";
- import {
- toLogin,
- checkLogin
- } from '../libs/login';
- export function getWechatConfig() {
- return request.get("wechat/get/public/js/config",{ url: encodeURIComponent(wechat.signLink()) },{ noAuth: true });
- }
- export function wechatAuth(code, spread) {
- var reg=/^[0-9]+.?[0-9]*$/;
- spread = reg.test(spread) ? spread : 0;
- return request.post(
- "login/wechat/public", {code:code,spreadPid:spread},
- { noAuth: true }
- );
- }
- export function loginConfigApi()
- {
- return request.get('login/config', {}, { noAuth : true});
- }
- export function login(data) {
- return request.post("login/wechat/routine", data, { noAuth : true });
- }
- export function getShare() {
- return request.get("share", {}, { noAuth: true });
- }
- export function follow() {
- return request.get("wechat/follow", {}, { noAuth: true });
- }
- export function imageBase64(image) {
- return request.post("qrcode/url/to/base64",image,{ noAuth: true });
- }
- export function copyWords() {
- return request.get("copy_words", {}, { noAuth: true });
- }
- export function getUserPhone(data){
- return request.post('login/wechat/register/binding/phone',data,{noAuth : true});
- }
- export function appAuth(data) {
- return request.post("login/wechat/app/login", data, { noAuth : true });
- }
- export function appleLogin(data) {
- return request.post("login/ios/login", data, { noAuth : true });
- }
- export function iosBinding(data) {
- return request.post("ios/binding/phone", data, { noAuth : true });
- }
- export function addressWxImportApi(data) {
- return request.post("address/wechant/import", data);
- }
- export function liveroomApi(data) {
- return request.get("wechat/liveroom", data, { noAuth : true });
- }
- export function globalConfigApi() {
- return request.get("index/global/config/info", {}, { noAuth : true });
- }
|