| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- import axios from 'axios';
- import global from '../Global.js'
- headapi = process.env.NODE_ENV === 'development' ? '/api/' : 'http://video.beswell.com:85/';
- console.log(process.env.NODE_ENV)
- console.log(headapi)
- // 基础方法进行封装
- function getApiBasic(url, postdata) {
- return axios.post(url, postdata).then(function (data) {
- let json = data.data;
- return json
- }, function (response) {
- console.info(response);
- })
- }
- // 调用的api改写成方法
- export function worldDetail(postdata) {
- let url = headapi + 'worldDetail';
- return getApiBasic(url, postdata);
- }
- export function editbasicinfo(postdata) {
- let url = headapi + 'editbasicinfo';
- return getApiBasic(url, postdata);
- }
- export function modPwd(postdata) {
- let url = headapi + 'modPwd';
- return getApiBasic(url, postdata);
- }
- export function logout(postdata) {
- let url = headapi + 'logout';
- return getApiBasic(url, postdata);
- }
- // 调用的api改写成方法
- export function testTable(postdata) {
- let url = headapi + 'v1/Auth/testTable';
- return getApiBasic(url, postdata);
- }
- export function testSelect(postdata) {
- let url = headapi + 'testSelect';
- return getApiBasic(url, postdata);
- }
- export function testPic(postdata) {
- let url = headapi + 'testPic';
- return getApiBasic(url, postdata);
- }
- // 正式接口
- // 获取验证图片
- export function GenVerifyPic(postdata) {
- let url = headapi + 'v1/Auth/GenVerifyPic';
- return getApiBasic(url, postdata);
- }
- // 手机获取验证码
- export function GetPhoneVFCode(postdata) {
- let url = headapi + 'v1/Auth/GetPhoneVFCode';
- return getApiBasic(url, postdata);
- }
- // 用户手机验证码登陆
- export function PhoneSignIn(postdata) {
- let url = headapi + 'v1/Auth/PhoneSignIn';
- return getApiBasic(url, postdata);
- }
- // 查询用户自身信息
- export function UserSelfQuery(postdata) {
- let url = headapi + 'v1/User/UserSelfQuery';
- return getApiBasic(url, postdata);
- }
- // 查询用户是否正在上课接口
- export function GetDuInfoAndUserInfoByUserMd5(postdata) {
- let url = headapi + 'v1/User/GetDuInfoAndUserInfoByUserMd5';
- return getApiBasic(url, postdata);
- }
- // 心率带信息查询和更新
- export function HrSensorsUpdate(postdata) {
- let url = headapi + 'v1/HrSensors/HrSensorsUpdate';
- return getApiBasic(url, postdata);
- }
- // App心率数据上报
- export function AddAppHeartRate(postdata) {
- let url = headapi + 'v1/HrSensors/AddAppHeartRate';
- return getApiBasic(url, postdata);
- }
|