123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280 |
- import ajax from "../utils/request.js";
- import requestOrther from "../utils/requestOrther.js";
- /**
- * 商品列表
- * @returns {AjaxPromise}
- */
- export function goodsList(data) {
- return ajax({
- url: "/goods/list",
- method: "get",
- data,
- });
- }
- /**
- * 排队列表
- * @returns {AjaxPromise}
- */
- export function orderList(data) {
- return ajax({
- url: "/orders/queue",
- method: "get",
- data,
- });
- }
- /**
- * 预约
- * @returns {AjaxPromise}
- */
- export function apply(data) {
- return ajax({
- url: "/orders/add-app",
- method: "post",
- data,
- });
- }
- export function applyreal(data) {
- return ajax({
- url: "/orders/add-house",
- method: "post",
- data,
- });
- }
- /**
- * 取消预约
- * @returns {AjaxPromise}
- */
- export function cancel(data) {
- return ajax({
- url: "/orders/cancel",
- method: "get",
- data,
- });
- }
- /**
- * 取消预约
- * @returns {AjaxPromise}
- */
- export function advance(data) {
- return ajax({
- url: "/orders/to-house",
- method: "get",
- data,
- });
- }
- /**
- * 跳过
- * @returns {AjaxPromise}
- */
- export function skip(data) {
- return ajax({
- url: "/orders/skip",
- method: "GET",
- data,
- });
- }
- /**
- * 下一个
- * @returns {AjaxPromise}
- */
- export function nextone(data) {
- return ajax({
- url: "/orders/finish",
- method: "GET",
- data,
- });
- }
- /**
- * 预约时段
- * @returns {AjaxPromise}
- */
- export function applyrang(data) {
- return ajax({
- url: "/time-segment/list",
- method: "GET",
- data,
- });
- }
- /**
- * 获取app用户名
- * @returns {AjaxPromise}
- */
- export function getAPPUser(data, header) {
- return requestOrther({
- url: "/seeyon/thirdpartyController.do",
- method: "GET",
- header,
- data,
- });
- }
- /**
- * 获取apptoken
- * @returns {AjaxPromise}
- */
- export function getAPPToken(urldata) {
- return requestOrther({
- url: "/seeyon/rest/token/" + urldata,
- method: "GET",
- });
- }
- /**
- * 获取app登录人员信息
- * @returns {AjaxPromise}
- */
- export function getAPPUserDetail(data) {
- return requestOrther({
- url: "/seeyon/rest/orgMember",
- method: "GET",
- data,
- });
- }
- /**
- * 获取当前打烊规则
- * @returns {AjaxPromise}
- */
- export function getRule(data) {
- return ajax({
- url: "/stop-rule/list",
- method: "POST",
- data,
- });
- }
- /**
- * 更新当前打烊规则
- * @returns {AjaxPromise}
- */
- export function upRule(data) {
- return ajax({
- url: "/stop-rule/edit",
- method: "POST",
- data,
- });
- }
- /**
- * 菜单列表
- * @returns {AjaxPromise}
- */
- export function menulist(data) {
- return ajax({
- urlType: "menuURL",
- url: "/menu/recently",
- method: "GET",
- data,
- });
- }
- export function jsonDataRanking(data) {
- return ajax({
- urlType: "dataJSON",
- url: `/data/oa-rank/${data.url}.json`,
- method: "GET",
- data: data.data || undefined,
- });
- }
- export function infoDate() {
- return ajax({
- urlType: "dataJSON",
- url: `/data/oa-rank/info.json`,
- method: "GET",
- });
- }
- export function getCoffeeGoods(data) {
- return ajax({
- urlType: "coffee",
- url: `/getGoods?${data || ""}`,
- method: "GET",
- });
- }
- export function getCoffeeTypes() {
- return ajax({
- urlType: "coffee",
- url: `/getTypes`,
- method: "GET",
- });
- }
- export function getAddrees(data) {
- return ajax({
- urlType: "coffee",
- url: `/addressList?phone=${data.phone}`,
- method: "GET",
- });
- }
- export function getAddreesOne() {
- return ajax({
- urlType: "coffee",
- url: `/addressOne`,
- method: "GET",
- });
- }
- export function pushOrder(data) {
- return ajax({
- urlType: "coffee",
- url: `/pushOrder`,
- method: "POST",
- data,
- });
- }
- export function pushAddress(data) {
- return ajax({
- urlType: "coffee",
- url: `/addressPush`,
- method: "POST",
- data,
- });
- }
- export function editAddress(data) {
- return ajax({
- urlType: "coffee",
- url: `/addressEdit`,
- method: "POST",
- data,
- });
- }
- export function deleteAddress(data) {
- return ajax({
- urlType: "coffee",
- url: `/addressDetele`,
- method: "DELETE",
- data,
- });
- }
- export function listOrder(data) {
- const { page, size } = data;
- return ajax({
- urlType: "coffee",
- url: `/listOrder?page=${page}&size=${size}`,
- method: "GET",
- });
- }
- export function jsonZhou(data) {
- return ajax({
- urlType: "cxzx",
- url: `/zhoubao/data/${data.start}-${data.end}ctmt.json`,
- method: "GET",
- });
- }
- export default {};
|