import request from '@/apis/utils/requestWhite'
 

export function saveLoginRecord(data) {
 	return request({
 		method: 'post',
 		data: data,
 		url: '/mobile/user/saveLoginRecord'
 	})
}

//根据code换取openid
export function getDataByCode(code) {
	return request({
		url: '/wechat/findUserInfo/' + code,
		data: {},
		method: 'get',
	})
}

//根据code换取openid
export function findAppletUserInfo(code) {
	return request({
		url: '/wechat/findAppletUserInfo/' + code,
		data: {},
		method: 'get',
	})
}


export function findUserPhoneNumber(code) {
	return request({
		url: '/wechat/findUserPhoneNumber/' + code,
		data: {},
		method: 'get',
	})
}

export function findByOpenId(data) {
	return request({
		url: '/mobile/user/findByOpenId',
		data: data,
		method: 'get',
	})
}


export function findValueByName(data) {
	return request({
		url: '/mobile/dictionary/findValueByName',
		data: data,
		method: 'post',
	})
}

export function findListByCatalogName(data) {
	return request({
		url: '/mobile/dictionary/findListByCatalogName',
		data: data,
		method: 'post',
	})
}


//根据code换取openid
export function decryptData(data) {
	return request({
		url: '/wechat/decryptData/',
		data: data,
		method: 'post',
	})
}

export function newsList(data) {
 	return request({
 		method: 'post',
 		data: data,
 		url: '/mobile/news/newsList'
 	})
}

export function bannerList(data) {
	var url='/mobile/banner/bannerList';
	return request({
		method: 'post',
		data: data,
		url: url
	})
}