user.js 874 字节
const http = uni.$u.http
// 用户登录
export const userLogin = (data, config= {}) => http.post('/login', data, config)

// 商家注册
/* data参数
{
  "username":  用户名
  "password":  密码
  "businessName": 商家名称
  "businessLicenseNo": 统一社会信用代码
  "gymName": 球馆名称
  "contacts": 联系人
  "contactsPhone": 联系人电话
  "province": 省
  "city": 市
  "county": 县
  "address": 地址
  "gymPicture" 球馆图片
}
*/
export const userReg = ({ username, password, businessName, businessLicenseNo, gymName, contacts, contactsPhone, province, city, county, address, gymPicture }) => {
	return request({
		url: '/register',
		method: 'post',
		data: {
			username,
			password,
			businessName,
			businessLicenseNo,
			gymName,
			contacts,
			contactsPhone,
			province,
			city,
			county,
			address,
			gymPicture
		}
	})
}