import http from '@/utils/http'
import config from './config'

export default {
	//获取自己果树数据
	getBySampleId(data) {
		return http.get('mini/z_farm_buy/getBySampleId', data)
	},
	// 获取能量记录
	getEnergyRecords(data) {
		return http.get(`mini/z_farm_buy/getEnergyRecords/${data.page}/${data.limit}`, data)
	},
	//获取果树海报
	getPoster(data) {
		return http.get('mini/z_farm_buy/getPoster', data)
	},
	//随机抽取指定数量话术
	randomPick(data) {
		return http.get('mini/buy_clockin_text_lib/random_pick', data)
	},
	//打卡
	clockin(data) {
		return http.post('mini/z_farm_buy/clockin', data)
	},
	//获取订阅模板
	getSubscribeTemplate(data) {
		return http.get('mini/z_farm_buy/getSubscribeTemplate', data)
	},
	//添加订阅
	addSubscribe(data) {
		return http.get('mini/z_farm_buy/addSubscribe', data)
	},
	//修改树名称
	updateTreeName(data) {
		return http.get('mini/z_farm_buy/updateTreeName', data)
	},
	//签到
	sign(data) {
		return http.post('mini/buy_sign_in/sign', data)
	},
	//规则
	ruleList(data) {
		return http.get('mini/buy_sign_in/ruleList', data)
	},
	//图片日期，用于判断
	findHasImagesDate(data) {
		return http.get('mini/image/findHasImagesDate', data)
	},
	//图片列表
	treeImageList(data) {
		return http.post('mini/lz_tree_image/treeImageList', data)
	},
	//品类查询所有
	categoryList() {
		return http.get('mini/bur_category/list')
	},
	//排行榜分页查询
	rankingList(data) {
		return http.get('mini/z_farm_buy/rankingList',data)
	},
	//通过品类查询当前树
	getLightTree(data) {
		return http.get('mini/z_farm_buy/getLightTree',data)
	},
	//根据样点ID查询日记列表
	getSampleDiary(data) {
		return http.get(`site/z_sample_diary/page?key=${config.MINI_KEY}`,data)
	},
}