 import requestWhite from '../utils/requestWhite.js';
import Qs from 'qs';
import request from '../utils/request.js';


export function findByOpenId(data) {
	var url='/mobile/regUser/findByOpenId';
	return requestWhite({
		method: 'get',
		data: data,
		url: url
	})
}


export function quickRegistration(data) {
	var url='/mobile/regUser/quickRegistration';
	return requestWhite({
		method: 'post',
		data: data,
		url: url
	})
}


 export function registerGuest(data) {
 	var url='/mobile/regUser/registerGuest';
 	return requestWhite({
 		method: 'post',
 		data: data,
 		url: url
 	})
 }
 export function validateGuestCode(data) {
 	var url='/mobile/regUser/validateGuestCode ';
 	return requestWhite({
 		method: 'post',
 		data: data,
 		url: url
 	})
 }



 export function findNoLTextConfigure(data) {
 	var url='/mobile/dataDictionary/findNoLTextConfigure';
 	return requestWhite({
 		method: 'post',
 		data: data,
 		url: url
 	})
 }


export function validateCode(data) {
	 
	return requestWhite({
		method: 'post',
		data:data ,
		url: '/mobile/regUser/validateCode'
	})
} 

export function getVerifyCode(tel) {
	 
	return requestWhite({
		method: 'post',
		data:{
			telephone:tel
		} ,
		url: '/mobile/regUser/getVerifyCode'
	})
} 

export function passwordLogin(data) {
	 
	 var url=""
	 if(data.form=="job"){
	 	url='/mobile/jobUserApi/passwordLogin';
	 }else if(data.form=="hr"){
	 	url='/mobile/sysUserApi/passwordLogin';
	 }else{
	 	return 
	 }
	 
	return requestWhite({
		method: 'post',
		data:data ,
		url: url
	})
} 

// cardId 赠送卡ID
// effectiveValue 有效时限 字典值
// body 唯一描述(哪吒限时赠送折扣卡)
export function giveCard(data) {
	var url='/mobile/regUserCard/receiveCardByNZ';
	return request({
		method: 'get',
		data: data,
		url: url
	})
}