|
|
@@ -1,40 +1,48 @@
|
|
|
-import https from '@/plugins/luch-request_0.0.7/request'
|
|
|
+import https from "@/plugins/luch-request_0.0.7/request";
|
|
|
|
|
|
-export const getOptions = param => https.get('/apihkds/api/option/getOptions', param)
|
|
|
+export const getOptions = param =>
|
|
|
+ https.get("/apihkds/api/option/getOptions", param);
|
|
|
|
|
|
// 图片上传
|
|
|
-export const uploadPic = data => https.post('/upload/save-img', data)
|
|
|
+export const uploadPic = data => https.post("/upload/save-img", data);
|
|
|
|
|
|
// M 端商家信息
|
|
|
-export const getMerchantInfo = param => https.get('/merchant/get-info', param)
|
|
|
+export const getMerchantInfo = param => https.get("/merchant/get-info", param);
|
|
|
|
|
|
// M 端用户信息
|
|
|
-export const getShopUserApi = param => https.get('/user/my-profile', param)
|
|
|
+export const getShopUserApi = param => https.get("/user/my-profile", param);
|
|
|
|
|
|
// 商户信息
|
|
|
-export const getUserApi = param => https.get('/merchant/detail', param)
|
|
|
+export const getUserApi = param => https.get("/merchant/detail", param);
|
|
|
|
|
|
// 员工信息
|
|
|
-export const getStaffApi = param => https.get('/admin/login-detail', param)
|
|
|
+export const getStaffApi = param => https.get("/admin/login-detail", param);
|
|
|
|
|
|
// 常用链接 b
|
|
|
-export const commonUrl = param => https.get('/merchant/common-url', param)
|
|
|
+export const commonUrl = param => https.get("/merchant/common-url", param);
|
|
|
|
|
|
// 常用链接 b
|
|
|
-export const getFestList = param => https.get('/fest/list', param)
|
|
|
+export const getFestList = param => https.get("/fest/list", param);
|
|
|
|
|
|
// 商家的门店 m
|
|
|
-export const getShop = param => https.get('/shop/detail', param)
|
|
|
+export const getShop = param => https.get("/shop/detail", param);
|
|
|
|
|
|
// 获取验证码 m
|
|
|
-export const sendSms = param => https.get('/inform-user/send-sms', param)
|
|
|
+export const sendSms = param => https.get("/inform-user/send-sms", param);
|
|
|
|
|
|
// 地图查询 m b s w
|
|
|
-export const suggestion = param => https.get('/map/suggestion', param)
|
|
|
+export const suggestion = param => https.get("/map/suggestion", param);
|
|
|
|
|
|
// 微信分享 m b
|
|
|
-export const wxShare = data => https.post('/wx-share/get-params', data)
|
|
|
+export const wxShare = data => https.post("/wx-share/get-params", data);
|
|
|
// 获取所有门店
|
|
|
-export const shopAll = data => https.get('/shop/all', data)
|
|
|
+export const shopAll = data => https.get("/shop/all", data);
|
|
|
// 切换门店
|
|
|
-export const toggleShop = data => https.post('/shop/toggle-shop', data)
|
|
|
+export const toggleShop = data => https.post("/shop/toggle-shop", data);
|
|
|
+
|
|
|
+//socket链接初始化
|
|
|
+export const initSocket = async clientId => {
|
|
|
+ const st = uni.getStorageSync("token");
|
|
|
+
|
|
|
+ return https.post(`/ws/bind?token=${st}`, { clientId: clientId });
|
|
|
+};
|