diff --git a/commons/utils/hasPermission.js b/commons/utils/hasPermission.js
index 701c434..b9935e2 100644
--- a/commons/utils/hasPermission.js
+++ b/commons/utils/hasPermission.js
@@ -1,4 +1,3 @@
-import { $hasPermission } from '@/http/yskApi/shop.js'
import infoBox from '@/commons/utils/infoBox.js'
const $PermissionObj = {
diff --git a/commons/utils/unionScan.js b/commons/utils/unionScan.js
index cf04a1e..c3a62cd 100644
--- a/commons/utils/unionScan.js
+++ b/commons/utils/unionScan.js
@@ -6,7 +6,6 @@
* @date 2022/11/22 10:38
*/
-import { $parseQrCodeUrl } from '@/http/apiManager.js'
const model = {
@@ -23,9 +22,9 @@ const model = {
// 解析 码牌
parseQrc: (originQrVal) => {
- return $parseQrCodeUrl(originQrVal).then( ({bizData}) => {
- return model.returnFunc(model.QR_TYPE_QRC, bizData, originQrVal)
- })
+ // return $parseQrCodeUrl(originQrVal).then( ({bizData}) => {
+ // return model.returnFunc(model.QR_TYPE_QRC, bizData, originQrVal)
+ // })
},
diff --git a/commons/utils/versionManage.js b/commons/utils/versionManage.js
index 0f98233..fdb6ec9 100644
--- a/commons/utils/versionManage.js
+++ b/commons/utils/versionManage.js
@@ -1,4 +1,3 @@
-import { $versionDetection } from '@/http/apiManager.js';
import appConfig from '@/config/appConfig.js'
// app更新
@@ -8,38 +7,38 @@ function appPlusUpdate(sign){
plus.runtime.getProperty(plus.runtime.appid, function(inf) {
// 调起接口查询
- $versionDetection({versionNumber: inf.versionCode})
- .then(({ bizData }) => {
+ // $versionDetection({versionNumber: inf.versionCode})
+ // .then(({ bizData }) => {
- //返回data为空或者版本号一致
- if (!bizData || Object.keys(bizData).length == 0 || !bizData.versionSerialNumber || bizData.versionSerialNumber == inf.versionCode) {
- if(sign === 'checked') {
- uni.showToast({
- title: '已是最新版本'
- })
- }
- return false;
- }
- // 是否强制更新
- let isForceUpdate = bizData.forceUpdate == 1
- uni.showModal({
- title: '发现新版本:' + bizData.versionName,
- showCancel: !isForceUpdate ,
- content: bizData.versionDesc,
- confirmText: '立即更新',
- confirmColor: '#108EE9',
- success: function(r) {
- if (r.confirm) {
- downLoad(bizData.downloadUrl);
- }else{
- // 强制更新也需要更新
- if(isForceUpdate){
- downLoad(bizData.downloadUrl);
- }
- }
- }
- });
- });
+ // //返回data为空或者版本号一致
+ // if (!bizData || Object.keys(bizData).length == 0 || !bizData.versionSerialNumber || bizData.versionSerialNumber == inf.versionCode) {
+ // if(sign === 'checked') {
+ // uni.showToast({
+ // title: '已是最新版本'
+ // })
+ // }
+ // return false;
+ // }
+ // // 是否强制更新
+ // let isForceUpdate = bizData.forceUpdate == 1
+ // uni.showModal({
+ // title: '发现新版本:' + bizData.versionName,
+ // showCancel: !isForceUpdate ,
+ // content: bizData.versionDesc,
+ // confirmText: '立即更新',
+ // confirmColor: '#108EE9',
+ // success: function(r) {
+ // if (r.confirm) {
+ // downLoad(bizData.downloadUrl);
+ // }else{
+ // // 强制更新也需要更新
+ // if(isForceUpdate){
+ // downLoad(bizData.downloadUrl);
+ // }
+ // }
+ // }
+ // });
+ // });
});
}
diff --git a/components/my-components/my-popup-table.vue b/components/my-components/my-popup-table.vue
index 68f6dd5..83243fc 100644
--- a/components/my-components/my-popup-table.vue
+++ b/components/my-components/my-popup-table.vue
@@ -80,15 +80,7 @@
-
-
\ No newline at end of file
diff --git a/http/apiManager.js b/http/apiManager.js
deleted file mode 100644
index c5e8c7a..0000000
--- a/http/apiManager.js
+++ /dev/null
@@ -1,624 +0,0 @@
-/**
- * api接口管理, 全部以$开头
- * @author terrfly
- * @site https://www.jeequan.com
- * @date 2021/12/17 09:57
- */
-
-import http from './http.js'
-import appConfig from '@/config/appConfig.js'
-import {
- Base64
-} from 'js-base64'
-import infoBox from '@/commons/utils/infoBox.js'
-
-export const req = {
- list: (uri, params) => {
- return http.req(uri, params, 'GET', false)
- },
-
- add: (uri, data) => {
- return http.req(uri, data, 'POST', false)
- },
-
- getById: (uri, bizId) => {
- return http.req(`${uri}/${bizId}`, {}, 'GET', false)
- },
-
- updateById: (uri, bizId, data) => {
- return http.req(`${uri}/${bizId}`, data, 'PUT', false)
- },
-
- delById: (uri, bizId) => {
- return http.req(`${uri}/${bizId}`, {}, 'DELETE', false)
- },
-}
-
-export const reqLoad = {
- list: (uri, params) => {
- return http.req(uri, params, 'GET')
- },
-
- add: (uri, data) => {
- return http.req(uri, data, 'POST')
- },
-
- getById: (uri, bizId) => {
- return http.req(`${uri}/${bizId}`, {}, 'GET')
- },
-
- updateById: (uri, bizId, data) => {
- return http.req(`${uri}/${bizId}`, data, 'PUT')
- },
-
- delById: (uri, bizId) => {
- return http.req(`${uri}/${bizId}`, {}, 'DELETE')
- },
-
- // 通用 新增 or 更新
- addOrUpdate: (bizId, url, data, showMessage = true) => {
- //包含bizId 请求的是修改接口
- if (bizId) {
- return reqLoad.updateById(url, bizId, data).then((res) => {
- if (showMessage) {
- return infoBox.showSuccessToast('更新成功').then(() => res)
- }
- return Promise.resolve(res)
- })
- } else {
- return reqLoad.add(url, data).then((res) => {
- if (showMessage) {
- return infoBox.showSuccessToast('新增成功').then(() => res)
- }
- return Promise.resolve(res)
- })
- }
- }
-}
-
-/** 上传文件 url **/
-export const API_URL_SINGLE_FILE_UPLOAD = '/api/ossFiles/singleFile'
-
-/** 公告 **/
-export const API_URL_SYS_ARTICLES = '/api/sysArticles'
-
-/** 支付订单列表 */
-export const API_URL_PAY_ORDER_LIST = '/api/payOrder'
-
-/** 退款订单列表 */
-export const API_URL_REFUND_LIST = '/api/refundOrder'
-
-/** 商户应用 */
-export const API_URL_MCH_APP_LIST = '/api/mchApps'
-
-/** 门店列表 */
-export const API_URL_MCH_STORE_LIST = '/api/mchStore'
-
-/** 通知接收人列表 */
-export const API_URL_WXMP_USER_LIST = '/api/wxmp'
-
-/** 进件管理 */
-export const API_URL_MCH_APPLYMENT_LIST = '/api/mchApplyments'
-
-/** 员工管理 */
-export const API_URL_SYS_USER_LIST = '/api/sysUsers'
-
-/** 码牌管理 */
-export const API_URL_SYS_CODE_LIST = '/api/mchQrCodes'
-
-/** 通用设备管理 deviceType 1-喇叭 2-打印机 3-扫码POS 4-智能POS 6-刷脸设备*/
-export const API_URL_SYS_DEVICE_LIST = '/api/store/device'
-
-/** 辅助终端管理*/
-export const API_URL_SYS_TERMINALS = '/api/mchTerminals'
-
-/** 用户绑定门店列表 */
-export const API_URL_USER_BIND_STORE_LIST = '/api/mchStore/userStoreRelas'
-
-/** 商户支付通道列表 */
-export const API_URL_PAY_PASSAGE_LIST = '/api/mch/payPassages'
-/** 广告列表 */
-export const API_URI_PAY_AD_LIST = '/api/advert'
-/** 如意门店操作 */
-export const API_URI_DEV_RUYI = '/api/alipayShop'
-
-/** 会员管理 */
-export const API_URL_MEMBERS = '/api/member'
-
-/** 会员充值记录 */
-export const API_URL_MEMBER_RECHARGE_RECORDS = '/api/member/rechargeRecord'
-
-/** 会员充值规则管理 */
-export const API_URL_MEMBER_RECHARGE_RULES = '/api/member/rechargeRule'
-
-/** 会员账户流水 */
-export const API_URL_MEMBER_ACCOUNT_HISTORY = '/api/member/accountHistory'
-
-//营销红包开始
-
-//红包规则
-export const API_URL_MCH_REF_PACKET_RULE_LIST = '/api/redPacketRule'
-//新增红包规则
-export const API_URL_MCH_REF_PACKET_RULE_ADD = '/api/redPacketRule'
-
-//顾客统计
-export const API_URL_MCH_REF_PACKET_RULE_COUNT = '/api/redPacketUser/count'
-//顾客列表
-export const API_URL_MCH_REF_PACKET_USER_LIST = '/api/redPacketUser'
-//顾客红包
-export const API_URL_MCH_REF_PACKET_INFO_LIST = '/api/redPacketInfo'
-//红包查询规则详情
-export const API_URL_MCH_REF_PACKET_RULE_QUERY = '/api/redPacketRule'
-//红包修改规则
-export const API_URL_MCH_REF_PACKET_RULE_EDIT = '/api/redPacketRule/edit'
-//红包余额变动明细列表
-export const API_URL_MCH_REF_PACKET_CHANGE = '/api/redPacketChange'
-//渠道列表
-export const API_URL_MCH_ISV_LIST = '/api/isvInfo/isvInfoList'
-
-
-
-/* 密码登录 */
-export function $loginByPwd(username, pwd, safetyCode) {
- // 登录类型
- let lt = ''
- // #ifdef APP-PLUS
- lt = Base64.encode('APP')
- // #endif
- // #ifdef H5 || MP-WEIXIN
- lt = Base64.encode('LITE')
- // #endif
-
- let data = {
- ia: Base64.encode(username),
- ip: Base64.encode(pwd),
- mc: safetyCode ? Base64.encode(safetyCode) : null,
- lt: lt,
- }
- return http.req('/api/anon/auth/validate', data, 'POST')
-}
-
-/* 验证码登录 */
-export function $phoneCodeLogin(phone, code) {
- // 登录类型
- let lt = ''
- // #ifdef APP-PLUS
- lt = Base64.encode('APP')
- // #endif
- // #ifdef H5 || MP-WEIXIN
- lt = Base64.encode('LITE')
- // #endif
-
- let data = {
- phone: Base64.encode(phone),
- code: Base64.encode(code),
- lt: lt,
- }
-
- return http.req('/api/anon/auth/phoneCode', data, 'POST')
-}
-
-// 找回密码
-export function $retrieve({
- phone,
- code,
- newPwd
-}) {
- let data = {
- phone: Base64.encode(phone),
- code: Base64.encode(code),
- newPwd: newPwd ? Base64.encode(newPwd) : ''
- }
- return http.req('/api/anon/cipher/retrieve', data, 'POST')
-}
-
-/* 修改密码 */
-export function $modifyPwd({
- originalPwd,
- confirmPwd
-}) {
- let data = {
- originalPwd: Base64.encode(originalPwd),
- confirmPwd: Base64.encode(confirmPwd)
- }
- return http.req("/api/current/modifyPwd", data, "PUT")
-}
-
-/* 注册新商户 */
-export function $mchRegister({
- mchName,
- confirmPwd,
- inviteCode,
- phone,
- code
-}) {
- let data = {
- mchName: mchName, // 用户名称
- confirmPwd: Base64.encode(confirmPwd), // 确认密码
- inviteCode, // 邀请码
- phone: Base64.encode(phone), // 手机号
- code: Base64.encode(code), // 短信验证码
- }
- return http.req('/api/anon/register/mchRegister', data, 'POST')
-}
-
-/* 发送短信验证码 */
-export function $sendSms(data, smsType) {
- return http.req('/api/anon/sms/code', {
- phone: data.phone,
- vercode: data.vercode,
- vercodeToken: data.vercodeToken,
- smsType: smsType
- }, 'POST')
-}
-
-/* 获取个人信息 */
-export function $userInfo(cid1, cid2) {
- return http.req('/api/current/user', {
- cid1,
- cid2
- }, 'GET')
-}
-
-/* 获取公司信息 */
-export function $getSiteInfos() {
- return http.req('/api/anon/siteInfos', {}, 'GET')
-}
-
-// 隐私政策与服务协议
-export function $getTreaty() {
- return http.req('/api/anon/treaty', {}, 'GET')
-}
-
-/* 快捷收银 */
-export function $appPay(storeId, amount, sellerRemark, wayCode, authCode) {
- let data = {
- storeId,
- amount,
- sellerRemark,
- wayCode,
- authCode
- }
-
- // 二维码, 返回结果为 图片地址
- if (wayCode == 'QR_CASHIER') {
- data.payDataType = 'codeImgUrl'
- }
-
- return http.req('/api/pay/app', data, 'POST')
-}
-
-/* 当前商户信息 */
-export function $getMchInfo() {
- return http.req('/api/mainChart', {}, 'GET')
-}
-
-/* 订单打印 */
-export function $payOrderPrint(orderId) {
- return http.req('/api/payOrder/print/' + orderId, {}, 'GET')
-}
-
-/* 订单退款 */
-export function $payOrderRefund(orderId, refundAmount, refundReason, refundPassword) {
- return http.req(
- '/api/payOrder/refunds/' + orderId, {
- refundAmount: refundAmount,
- refundReason: refundReason,
- refundPassword: Base64.encode(refundPassword),
- refundModel: 1
- },
- 'POST'
- )
-}
-// // 首页统计信息
-// export function $indexStatistics (queryDateRange) {
-// return http.req('/api/mainChart/payDayCount', { queryDateRange }, 'GET')
-// }
-
-// 首页统计信息
-export function $indexStatistics(queryDateRange) {
- return http.req('/api/payOrder/count?queryDateRange', {
- queryDateRange
- }, 'GET')
-}
-
-// 统计报表
-export function $getStatInfo(data) {
- return http.req('/api/statistic/total', data, 'GET', false)
-}
-// 统计报表设备 门店 支付方式统计
-export function $getStatistic(data) {
- return http.req('/api/statistic', data, 'GET')
-}
-
-/* 经纬度转换为areacode */
-export function $location2areacode(location) {
- return http.req('/api/mchStore/location2areacode/', {
- location: location
- }, 'GET')
-}
-
-
-/* 获取上传form信息 */
-export function $ossFilesForm(bizType, file) {
- let postData = {
- bizType: bizType,
- sourceFileName: file.name || file.path, // 如果没有name 则使用pach替换
- sourceFileSize: file.size,
- }
-
- return http.req('/api/ossFiles/form', postData, 'POST')
-}
-
-/* 系统设置 */
-// 获取语音播报开关信息
-export function $mchConfig(groupKey) {
- return http.req('/api/mchConfig', {
- groupKey: groupKey
- }, 'GET')
-}
-// 修改语音播报开关信息
-export function $orderConfig(configData, mchNo) {
- console.log('mchNo', mchNo);
- return http.req('/api/mchConfig/orderConfig', {
- configData: configData,
- mchNo: mchNo
- }, 'PUT')
-}
-
-/* 修改个人信息 */
-export function $modifyUser({
- realname,
- avatarUrl
-}) {
- return http.req("/api/current/user", {
- realname,
- avatarUrl
- }, "PUT")
-}
-
-/* 获取密码规则 */
-export function $getPasswordRules() {
- return http.req("/api/anon/cipher/pwdRulesRegexp", "GET")
-}
-
-// 验证是否有密码
-export function $isSipw() {
- return http.req("/api/mchConfig/hasSipwValidate", "GET")
-}
-
-// 验证原支付密码是否正确
-export function $isMchSipw(originalPwd) {
- return http.req("/api/mchConfig/mchSipwValidate", {
- originalPwd: Base64.encode(originalPwd)
- }, "POST")
-}
-
-/* 更新支付密码 */
-export function $updateMchSipw({
- originalPwd,
- confirmPwd
-}) {
- let data = {
- originalPwd: Base64.encode(originalPwd),
- confirmPwd: Base64.encode(confirmPwd)
- }
- return http.req("/api/mchConfig/mchSipw", data, "PUT")
-}
-
-/* 版本检测 */
-export function $versionDetection({
- versionNumber
-}) {
- return http.req("/api/anon/clientVersion/versionInfo", {
- versionNumber: versionNumber
- }, "GET")
-}
-
-/* 查询用户权限 */
-export function $getUserEntRoles(sysUserId) {
- return http.req("/api/sysUsers/userEntRoles/" + sysUserId, {}, "GET")
-}
-
-/* 更新用户权限 */
-export function $updateUserEntRoles(sysUserId, ruleName, state) {
- return http.req("/api/sysUsers/userEntRoles/" + sysUserId, {
- ruleName,
- state
- }, "PUT")
-}
-
-
-/* 根据支付方式查询可配置的支付接口 */
-export function $getAvailablePayInterface(appId, wayCode) {
- return http.req(`/api/mch/payPassages/availablePayInterface/${appId}/${wayCode}`, "GET")
-}
-
-/* 支付方式配置支付接口 */
-export function $wayCodeConfigIfCode(appId, wayCode, ifCode) {
-
- let reqData = {
- appId: appId,
- wayCode: wayCode,
- ifCode: ifCode,
- state: 1
- }
- return http.req(`/api/mch/payPassages/mchPassage`, reqData, "POST")
-}
-/*码牌扫码 二维码解析*/
-export function $parseQrCodeUrl(qrUrl) {
- return http.req('/api/mchQrCodes/parseQrCodeUrl', {
- qrUrl
- }, 'GET')
-}
-/*码牌绑定*/
-export function $bindEmptyQR(qrcInfo) {
- return http.req('/api/mchQrCodes/bindEmptyQR', qrcInfo, 'POST')
-}
-/*解绑码牌*/
-export function $unBindQrc(qrcId) {
- return http.req('/api/mchQrCodes/unbind/' + qrcId, {}, 'POST')
-}
-/*码牌查询受支持的云喇叭设备*/
-export function $getHornList(qrcId) {
- return http.req('/api/mchQrCodes/bindDevice/' + qrcId, 'GET')
-}
-/* 更新默认 */
-export function $updateTrmDefault(trmId, defaultFlag) {
- return http.req('/api/mchTerminals/trmDefaults', {
- trmId,
- defaultFlag
- }, 'PUT')
-}
-
-/* 设备解绑 */
-export function $deviceUnbind(deviceId) {
- return http.req('/api/store/device/unbind/' + deviceId, {}, 'POST')
-}
-
-
-/* 渠道报备列表 */
-export function $terminalChannelBindList(trmId) {
- return http.req('/api/mchTerminals/channelBindInfos/' + trmId, {}, 'GET')
-}
-
-/* 渠道报备 */
-export function $terminalChannelBindSend(trmId, ifCode) {
- return http.req('/api/mchTerminals/channelSendup/' + trmId, {
- ifCode: ifCode,
- state: 1
- }, 'POST')
-}
-
-
-// 扫码登录
-export function $scanCodeLogin(qrcodeNo, qrcodeStatus) {
- return http.req("/api/current/qrcode/login", {
- qrcodeNo,
- qrcodeStatus
- }, "POST")
-}
-
-// 云喇叭 播报测试
-export function $speakTest(devId, amount) {
- return http.req("/api/store/device/speak/" + devId, amount, "POST")
-}
-
-// 云打印 打印测试
-export function $printTest(devId, amount) {
- return http.req(`/api/store/device/print/${devId}`, {
- amount
- }, "POST")
-}
-
-/* 获取百度语音播报token */
-export function $getBaiduToken() {
- return http.req("/api/pushinfo/getBaiduToken", {}, "GET")
-}
-// 获取通知接收人二维码图片
-export function $getWxMpInfo() {
- return http.req("/api/wxmp/getWxmpInfo", {}, "GET")
-}
-
-/* 获取进件通道列表 */
-export function $getAllAllowApplymentIfCodeList() {
- return http.req("/api/payConfig/ifCodes", {
- infoId: 'CURRENT',
- configMode: 'mchApplyment'
- }, "GET")
-}
-/* 查询店长可以绑定的门店 */
-export function $getBindStoreList(params) {
- return http.req('/api/mchStore/bindStoreList', params, "GET")
-}
-
-/* 提交unipush cid */
-export function $pushInfoRegister(data) {
- console.log('push cid', data);
- return http.req("/api/pushinfo/register", data, "POST")
-}
-/* 获取广告接口*/
-export function $adList(params) {
- return http.req('/api/advert/appAdvert', params, 'GET')
-}
-/** 如意Lite 绑定解绑接口 */
-export function $BindLite(data) {
- return http.req('/api/alipayIot/bind/' + data.deviceId, data, "POST")
-}
-
-// 获取支付宝扫码授权
-export function $aliPayQrCodeOrApply(account = '', type = 'queryResult') {
- return http.req(`/api/alipaySpOperation/${type}`, {
- alipayAccount: account
- }, type == 'apply' ? 'POST' : 'GET')
-}
-// 获取支付宝授权信息
-export function $aliAccountInfo() {
- return http.req('/api/alipaySpOperation/authInfo', {}, 'GET')
-}
-
-// 查询蚂蚁店铺状态
-export function $queryAliStore(storeId) {
- return req.getById('/api/alipayShop/createResult', storeId)
-}
-
-
-// 获取上传图片 大小
-export function $getUploadImgSize() {
- return http.req('/api/defaultConfig', {}, "GET")
-}
-
-// 会员调账
-export function $memberManual(params) {
- return http.req('/api/member/manual/' + params.memberId, params, "POST")
-}
-
-//查询或修改会员配置信息
-export function $findOrEditMemberConfig(data, mode = 'GET', uri = '') {
- return http.req('/api/mchConfig' + uri, data, mode)
-}
-/* 会员数据统计 */
-export function $memberInfoCount(params) {
- return http.req('/api/member/count', params, 'GET')
-}
-
-/* 查询商户支付应用 费率参数是否配置 */
-export function $getMchPayPassage(appId, ifCode) {
- return http.req(`/api/payConfig/existPayParams/${appId}/${ifCode}`, {}, 'GET')
-}
-
-/* 获取进件渠道列表 */
-export function $getAllIsvInfoList(ifCode, range = 0) {
- return http.req("/api/isvInfo/isvInfoList", {
- pageNumber: "-1",
- range: range,
- ifCode: ifCode
- }, "GET")
-}
-
-
-// 请求验证码
-export function $isCode() {
- return http.req("/api/anon/auth/vercode", "GET")
-}
-
-export function $pmdfb(data) {
- return http.req("/api/store/device/setMarqueeInfo", data, "POST")
-}
-
-export function $getImgWH(params) {
- return http.req(`/api/store/device/getMarketPoint/${params}`, "GET")
-}
-
-export function $initializeImg(params) {
- return http.req(`/api/store/device/getMarketPic/${params}`, "GET")
-}
-
-export function $uploadImg(data) {
- return http.req(`/api/store/device/setMarketPic`, data, "POST")
-}
-
-/* 获取上传form信息 */
-export function $NewOssFilesForm(data) {
- return http.req("/api/ossFiles/form", data, "POST")
-}
diff --git a/http/yskApi/Instead.js b/http/yskApi/Instead.js
deleted file mode 100644
index a1d7ef7..0000000
--- a/http/yskApi/Instead.js
+++ /dev/null
@@ -1,415 +0,0 @@
-// 代课下单
-import http from './http.js'
-import $API from '@/http/classApi.js'
-import appConfig from '@/config/appConfig.js'
-import {
- Base64
-} from 'js-base64'
-import infoBox from '@/commons/utils/infoBox.js'
-
-const request = http.request
-
-
-//就餐形式,默认堂食后付费
-const useType = 'dine-in-after'
-
-function getUseType() {
- const type = uni.getStorageSync("useType")
- return type ? type : useType
-}
-
-
-/**
- * 获取当前台桌订单信息
- * @returns
- */
-export function getCart(params) {
- return request({
- url: `/api/place/cart`,
- method: "get",
- params:{
- shopId: uni.getStorageSync("shopId"),
- useType: getUseType(),
- ...params
- }
- });
-}
-/**
- * 已上架商品列表
- * @returns
- */
-export function getGoodsLists(params,showLoading=true) {
- return request({
- url: `/api/place/activate`,
- method: "get",
- params:{
- shopId: uni.getStorageSync("shopId"),
- ...params
- },
- showLoading
- });
-}
-
-/**
- * 点单
- * @returns
- */
-export function addCart(data) {
- return request({
- url: `/api/place/addCart`,
- method: "post",
- data:{
- shopId: uni.getStorageSync("shopId"),
- useType: getUseType(),
- ...data
- }
- });
-}
-
-/**
- * 清空购物车/支付订单
- * @returns
- */
-export function $clearCart(data) {
- return request({
- url: `/api/place/clearCart`,
- method: "delete",
- data:{
- shopId: uni.getStorageSync("shopId"),
- useType: getUseType(),
- ...data
- }
- });
-}
-
-/**
- * 删除购物车某个商品
- * @returns
- */
-export function $removeCart(data) {
- return request({
- url: `/api/place/removeCart`,
- method: "delete",
- data:{
- shopId: uni.getStorageSync("shopId"),
- useType: getUseType(),
- ...data
- }
- });
-}
-/**
- * 更新规格
- * @returns
- */
-export function $updateCart(data) {
- return request({
- url: `/api/place/updateCart`,
- method: "put",
- data:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-/**
- * 批量打包
- * @returns
- */
-export function $allPack(data) {
- return request({
- url: `/api/place/pack`,
- method: "put",
- data:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-/**
- * 获取取餐号
- * @returns
- */
-export function $getMasterId(data) {
- return request({
- url: `/api/place/masterId`,
- method: "get",
- params:{
- shopId: uni.getStorageSync("shopId"),
- useType: getUseType(),
- ...data
- }
- });
-}
-/**
- * 支付方式获取
- * @returns
- */
-export function $getPayType(data) {
- return request({
- url: `/api/place/payType`,
- method: "get",
- params:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-/**
- * 创建订单
- * @returns
- */
-export function $createOrder(data) {
- return request({
- url: `/api/place/order`,
- method: "post",
- data:{
- shopId: uni.getStorageSync("shopId"),
- useType: getUseType(),
- ...data
- }
- });
-}
-
-
-/**
- * 挂起订单
- * @returns
- */
-export function $cacheOrder(data) {
- return request({
- url: `/api/place/pending`,
- method: "post",
- data:{
- shopId: uni.getStorageSync("shopId"),
- useType: getUseType(),
- ...data
- }
- });
-}
-
-/**
- * 获取已挂起订单
- * @returns
- */
-export function $getCacheOrder(data) {
- return request({
- url: `/api/place/pending/cart`,
- method: "get",
- params:{
- shopId: uni.getStorageSync("shopId"),
- useType: getUseType(),
- ...data
- }
- });
-}
-
-// 会员点单/取消会员点单
-export function $setUser(data) {
- return request({
- url: `/api/place/updateVip`,
- method: "put",
- data:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-// 删除订单
-export function $delOrder(data) {
- return request({
- url: `/api/place/order`,
- method: "delete",
- data:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-// 支付订单
-export function $payOrder(data) {
- return request({
- url: '/api/place/pay',
- method: "put",
- data:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-//退单
-
-export function $returnCart(data) {
- return request({
- url: '/api/place/returnCart',
- method: "put",
- data:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-// 选择台桌
-export function $choseTable(data) {
- return request({
- url: '/api/place/choseTable',
- method: "put",
- data:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-// 用餐人数
-
-export function $choseCount(data) {
- return request({
- url: '/api/place/choseCount',
- method: "put",
- data:{
- shopId: uni.getStorageSync("shopId"),
- useType: getUseType(),
- ...data
- }
- });
-}
-
-// 批量生成台桌
-export function $fastCreateTable(data) {
- return request({
- url: '/api/tbShopTable/generate',
- method: "post",
- data:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-
-//打印当前台桌订单
-export function $printOrder(data) {
- return request({
- url: '/api/place/printOrder',
- method: "post",
- data:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-//打印当前台桌菜品
-
-export function $printDishes(data) {
- return request({
- url: '/api/place/printDishes',
- method: "post",
- data:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-
-// 就餐模式切换
-export function $changeUseType(data) {
- return request({
- url: '/api/place/choseModel',
- method: "put",
- data:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-
-// 退款
-export function $returnOrder(data) {
- return request({
- url: '/api/place/returnOrder',
- method: "post",
- data:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-
-//获取订单可用优惠券
-export function $activateByOrderId(data) {
- return request({
- url: '/api/tbShopCoupon/activateByOrderId',
- method: "get",
- params:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-
-//会员积分列表
-export function $returnMemberPointsList(data) {
- return request({
- url: '/api/points/memberPoints/page',
- method: "get",
- params:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-
-// 会员积分账户信息
-export function $returnMemberPoints(memberId) {
- return request({
- url: '/api/points/memberPoints/'+memberId,
- method: "get",
- params:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-//002-获取订单可用积分及抵扣金额(支付页面使用)
-export function $calcUsablePoints(data) {
- return request({
- url: '/api/points/memberPoints/calcUsablePoints',
- method: "get",
- params:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-// 003-根据积分计算可抵扣金额
-export function $calcDeDuctionPoints(data) {
- return request({
- url: '/api/points/memberPoints/calcDeductionAmount',
- method: "get",
- params:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-
-//购物车-临时菜添加
-export function $temporaryDishes(data) {
- return request({
- url: '/api/place/temporaryDishes',
- method: "post",
- data:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-//单品改价
-export function $updatePrice(data) {
- return request({
- url: '/api/place/updatePrice',
- method: "put",
- data:{
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
diff --git a/http/yskApi/breakage.js b/http/yskApi/breakage.js
deleted file mode 100644
index a3c6f2e..0000000
--- a/http/yskApi/breakage.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import http from './http.js'
-const request=http.request
-
-
-/**
- * 商品报损
- * @returns
- */
-export function productBreakage(data) {
- return request({
- url: `/api/tbProductStockDetail/frmLoss`,
- method: 'post',
- data:{
- shopId: uni.getStorageSync('shopId'),
- ...data
- }
- })
-}
-
-/**
- * 耗材报损
- * @returns
- */
-export function consumableBreakage(data) {
- return request({
- url: `/api/tbConsInfoFlow/frmLoss`,
- method: 'post',
- data:{
- shopId: uni.getStorageSync('shopId'),
- ...data
- }
- })
-}
diff --git a/http/yskApi/bwc.js b/http/yskApi/bwc.js
deleted file mode 100644
index 6899f16..0000000
--- a/http/yskApi/bwc.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import http from './http.js'
-const request = http.request
-
-
-/**
- * 商品报损
- * @returns
- */
-export function get(params) {
- return request({
- url: `/freeDine`,
- method: 'get',
- params: {
- shopId: uni.getStorageSync('shopId'),
- ...params
- }
- })
-}
-
-/**
- * 耗材报损
- * @returns
- */
-export function edit(data) {
- return request({
- url: `/freeDine`,
- method: 'put',
- params: {
- shopId: uni.getStorageSync('shopId'),
- ...data
- }
- })
-}
\ No newline at end of file
diff --git a/http/yskApi/consumable.js b/http/yskApi/consumable.js
deleted file mode 100644
index ac31a33..0000000
--- a/http/yskApi/consumable.js
+++ /dev/null
@@ -1,232 +0,0 @@
-import http from './http.js'
-const request = http.request
-
-
-/**
- * 查询耗材类型
- * @returns
- */
-export function gettbConsType(params) {
- return request({
- url: '/api/tbConsType',
- method: "get",
- params
- });
-}
-
-/**
- * 新增耗材类型
- * @returns
- */
-export function posttbConsType(data) {
- return request({
- url: '/api/tbConsType',
- method: "post",
- data
- });
-}
-/**
- * 修改耗材类型
- * @returns
- */
-export function puttbConsType(data) {
- return request({
- url: '/api/tbConsType',
- method: "put",
- data
- });
-}
-/**
- * 查询耗材信息
- * @returns
- */
-export function gettbConsInfo(params) {
- // return request({
- // url: '/api/tbConsInfo',
- // method: "get",
- // params
- // });
- return request({
- url: "/api/tbConsInfo",
- method: "get",
- params: {
- ...params,
- shopId: uni.getStorageSync("shopId"),
- }
- });
-}
-
-
-/**
- * 耗材入库
- * @returns
- */
-export function posttbConsInfostockIn(data) {
- return request({
- url: '/api/tbConsInfo/stockIn',
- method: "post",
- data
- });
-}
-/**
- * 修改单位耗材值耗材
- * @returns
- */
-export function postapitbConsInfo(data) {
- return request({
- url: '/api/tbConsInfo',
- method: "put",
- data
- });
-}
-/**
- * 新增耗材信息
- * @returns
- */
-export function posttbConsInfo(data) {
- return request({
- url: '/api/tbConsInfo',
- method: "post",
- data
- });
-}
-
-/**
- * 查询查询耗材规格信息
- * @returns
- */
-export function getviewConSku(params) {
- return request({
- url: '/api/viewConSku',
- method: "get",
- params
- });
-}
-/**
- * 查询查询商品规格
- * @returns
- */
-export function gettbProductSpec(params) {
- return request({
- url: '/api/viewProductSkuShop',
- method: "get",
- params
- });
-}
-/**
- * 新增商品规格耗材信息
- * @returns
- */
-export function posttbProskuCon(data) {
- return request({
- url: '/api/tbProskuCon',
- method: "post",
- data
- });
-}
-/**
- * 新增商品规格耗材信息-修改后
- * @returns
- */
-export function posttbProskuCons(data) {
- return request({
- url: '/api/tbProskuCon',
- method: "post",
- data
- });
-}
-/**
- * 修改商品规格耗材信息状态
- * @returns
- */
-export function puttbProskuCon(data) {
- return request({
- url: '/api/tbProskuCon',
- method: "put",
- data
- });
-}
-// 编辑单位耗材值
-// export function puttbProskuCon(data) {
-// return request({
-// url: '/api/tbProskuCon',
-// method: "put",
-// data
-// });
-// }
-/**
- * 删除商品规格耗材信息状态
- * @returns
- */
-export function deletetbProskuCon(data) {
- return request({
- url: '/api/tbProskuCon',
- method: "delete",
- data
- });
-}
-/**
- * 查询耗材流水信息
- * @returns
- */
-export function gettbConsInfoFlow(params) {
- return request({
- url: '/api/tbConsInfoFlow',
- method: "get",
- params
- });
-}
-/**
- * 分组查询获取耗材流水信息
- */
-// export function viewConInfoFlow(data) {
-// return request({
-// url: "/api/viewConInfoFlow",
-// method: "get",
-// params: {
-// shopId: uni.getStorageSync("shopId"),
-// ...data
-// }
-// });
-// }
-
-/**
- * 查询耗材单位列表
- */
-export function queryTbConUnitInfo(data) {
- return request({
- url: "/api/tbConUnit/queryTbConUnitInfo",
- method: "get",
- params: {
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-
-/**
- * 新增耗材单位
- */
-export function addtbConUnit(data) {
- return request({
- url: '/api/tbConUnit',
- method: "post",
- data: {
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-/**
- * 修改耗材单位
- */
-export function edittbConUnit(data) {
- return request({
- url: '/api/tbConUnit',
- method: "put",
- data: {
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
\ No newline at end of file
diff --git a/http/yskApi/coupon.js b/http/yskApi/coupon.js
deleted file mode 100644
index ae4d4fc..0000000
--- a/http/yskApi/coupon.js
+++ /dev/null
@@ -1,58 +0,0 @@
-import http from './http.js'
-const request=http.request
-
-
-/**
- * 获取优惠券列表
- * @returns
- */
-export function getTbShopCoupon(data) {
- return request({
- url: `/api/tbShopCoupon`,
- method: 'get',
- params: {
- shopId: uni.getStorageSync('shopId'),
- ...data
- }
- })
-}
-
-/**
- * 获取优惠券详情
- * @returns
- */
-export function getTbShopCouponInfo(id) {
- return request({
- url: `/api/tbShopCoupon/${id}`,
- method: 'get',
- params: {
- }
- })
-}
-
-/**
- * 增加优惠券
- * @returns
- */
-export function addTbShopCoupon(data) {
- return request({
- url: `/api/tbShopCoupon`,
- method: 'post',
- params: {
- shopId: uni.getStorageSync('shopId'),
- ...data
- }
- })
-}
-
-/**
- * 删除优惠券
- * @returns
- */
-export function delTbShopCoupon(data) {
- return request({
- url: `/api/tbShopCoupon`,
- method: 'delete',
- params: data
- })
-}
diff --git a/http/yskApi/couponCategory.js b/http/yskApi/couponCategory.js
deleted file mode 100644
index 8f6c451..0000000
--- a/http/yskApi/couponCategory.js
+++ /dev/null
@@ -1,30 +0,0 @@
-import http from './http.js'
-import appConfig from '@/config/appConfig.js'
-import {
- Base64
-} from 'js-base64'
-import infoBox from '@/commons/utils/infoBox.js'
-
-/* 查询团购卷分类 */
-export function $tbCouponCategory(data, mehtod = 'GET') {
- return http.req('/api/tbCouponCategory', {
- ...data,
- shopId: uni.getStorageSync('shopId')
- }, 'GET')
-}
-
-
-export default {
- add: function(data) {
- return $tbCouponCategory(data, 'POST')
- },
- del: function(data) {
- return $tbCouponCategory(data, 'DELETE')
- },
- update: function(data) {
- return $tbCouponCategory(data, 'PUT')
- },
- get: function(data) {
- return $tbCouponCategory(data)
- }
-}
\ No newline at end of file
diff --git a/http/yskApi/credit.js b/http/yskApi/credit.js
deleted file mode 100644
index 17c79d3..0000000
--- a/http/yskApi/credit.js
+++ /dev/null
@@ -1,113 +0,0 @@
-import http from './http.js'
-const request=http.request
-
-
-/**
- * 获取挂账人列表
- * @returns
- */
-export function getCreditBuyerList(data) {
- return request({
- url: `/api/credit/buyer/page`,
- method: 'get',
- data
- })
-}
-
-/**
- * 增加挂账人
- * @returns
- */
-export function addCreditBuyer(data) {
- return request({
- url: '/api/credit/buyer',
- method: 'post',
- params: {
- shopId: uni.getStorageSync('shopId'),
- ...data
- }
- })
-}
-
-/**
- * 编辑挂账人
- * @returns
- */
-export function editCreditBuyer(data) {
- return request({
- url: '/api/credit/buyer',
- method: 'put',
- data
- })
-}
-
-/**
- * 删除挂账人
- * @returns
- */
-export function delCreditBuyer(id) {
- return request({
- url: `/api/credit/buyer/${id}`,
- method: 'delete'
- })
-}
-
-/**
- * 还款
- * @returns
- */
-export function creditRePayment(data) {
- return request({
- url: '/api/credit/buyer/repayment',
- method: 'post',
- data
- })
-}
-
-/**
- * 获取还款记录
- * @returns
- */
-export function creditRePaymentRecord(params) {
- return request({
- url: '/api/credit/payment-record/page',
- method: 'get',
- params
- })
-}
-
-/**
- * 挂账人-查看明细
- * @returns
- */
-export function creditBuyerOrderList(params) {
- return request({
- url: '/api/credit/buyer-order/page',
- method: 'get',
- params
- })
-}
-
-/**
- * 挂账人-查看明细-统计
- * @returns
- */
-export function creditBuyerOrderSummary(params) {
- return request({
- url: '/api/credit/buyer-order/summary',
- method: 'get',
- params
- })
-}
-
-/**
- * 挂账人-查看明细-付款
- * @returns
- */
-export function creditPayment(data) {
- return request({
- url: '/api/credit/buyer-order/pay',
- method: 'post',
- data
- })
-}
diff --git a/http/yskApi/devices.js b/http/yskApi/devices.js
deleted file mode 100644
index 82b1c57..0000000
--- a/http/yskApi/devices.js
+++ /dev/null
@@ -1,66 +0,0 @@
-import http from './http.js'
-const request = http.request
-
-/**
- * 增加打印机
- * @returns
- */
-export function tbPrintMachine(data, method = 'post') {
- return request({
- url: '/api/shop-config/printer',
- method: method,
- data: {
- shopId: uni.getStorageSync('shopId'),
- ...data
- }
- })
-}
-
-/**
- * 打印机列表
- * @returns
- */
-export function tbPrintMachineGet(params) {
- return request({
- url: '/api/shop-config/printer/list',
- method: 'get',
- params: {
- shopId: uni.getStorageSync('shopId'),
- sort: '',
- ...params
- }
- })
-}
-
-// 打印机部分
-export function tbShopCategoryget(params) {
- return request({
- url: '/api/tbShopCategory',
- method: 'get',
- params
- })
-}
-// 修改打印机状态
-export function shopConfigprinter(data) {
- return request({
- url: '/api/shop-config/printer/update-status',
- method: 'post',
- data
- })
-}
-
-// * 打印机详情
-export function printerd(id) {
- return request({
- url: '/api/shop-config/printer/' + id,
- method: 'get',
-
- })
-}
-// 删除
-export function delTableHandle(id) {
- return request({
- url: '/api/shop-config/printer/' + id,
- method: 'DELETE',
- })
-}
\ No newline at end of file
diff --git a/http/yskApi/file.js b/http/yskApi/file.js
deleted file mode 100644
index 8065fcc..0000000
--- a/http/yskApi/file.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import http from './http.js'
-import appConfig from '@/config/appConfig.js'
-import {
- Base64
-} from 'js-base64'
-import infoBox from '@/commons/utils/infoBox.js'
-
-/* 上传图片 */
-export function $uploadFile(file,data) {
- return http.upload('/api/qiNiuContent', data,file)
-}
diff --git a/http/yskApi/goods.js b/http/yskApi/goods.js
deleted file mode 100644
index 9c369bf..0000000
--- a/http/yskApi/goods.js
+++ /dev/null
@@ -1,143 +0,0 @@
-import http from './http.js'
-import $API from '@/http/classApi.js'
-import appConfig from '@/config/appConfig.js'
-import {
- Base64
-} from 'js-base64'
-import infoBox from '@/commons/utils/infoBox.js'
-function objectToUrlParams(obj) {
- let params = [];
- for (let key in obj) {
- if (obj.hasOwnProperty(key)) {
- let value = obj[key];
- let param = encodeURIComponent(key) + '=' + encodeURIComponent(value);
- params.push(param);
- }
- }
- return params.join('&');
-}
-/* 商品列表 */
-export function $tbProduct(data) {
- return http.req('/api/tbProduct', {...data,shopId:uni.getStorageSync('shopId')}, 'GET')
-}
-
-/* 添加商品 */
-export function $addProduct(data) {
- return http.req('/api/tbProduct', {...data,shopId:uni.getStorageSync('shopId')}, 'POST')
-}
-
-/* 删除商品 */
-export function $delProduct(ids) {
- return http.req('/api/tbProduct', ids, 'DELETE')
-}
-
-
-/* 更新商品相关 */
-export function $updateProduct(data) {
- return http.req('/api/tbProduct', {...data,shopId:uni.getStorageSync('shopId')}, 'PUT')
-}
-/* 修改商品排序 */
-export function $upProSort(data) {
- return http.req('/api/tbProduct/upProSort', {...data,shopId:uni.getStorageSync('shopId')}, 'POST')
-}
-/* 商品详情(单个商品) */
-export function $getProductDetail(product,showLoading=true) {
- return http.req('/api/tbProduct/'+product, {shopId:uni.getStorageSync('shopId')}, 'GET',showLoading)
-}
-
-/* 设置热销商品 */
-export function $goodsIsHot(data) {
- return http.req('/api/tbProduct/isHot', {...data,shopId:uni.getStorageSync('shopId')}, 'GET')
-}
-
-
-
-/**
- * 商品分类列表
- */
-export function $tbShopCategory(data) {
- return http.req('/api/tbShopCategory', {...data,shopId:uni.getStorageSync('shopId')}, 'GET')
-}
-/**
- * 商品分类
- */
-export const $productCategory=new $API('/api/tbShopCategory',http.req)
-
-
-/**
- * 更新商品库存状态
- */
-export function $updateProductStatus(data){
- return http.req('/api/stock/productStatus', {...data,shopId:uni.getStorageSync('shopId')}, 'PUT')
-}
-
-/**
- * 库存记录列表
- */
-export function $getProductStockDetail(data){
- return http.req('/api/tbProductStockDetail/stock', {...data,shopId:uni.getStorageSync('shopId')}, 'POST')
-}
-
-/**
- * 库存记录变动数量
- */
-export function $getProductStockDetailSum(data){
- return http.req('/api/tbProductStockDetail/sum', {...data,shopId:uni.getStorageSync('shopId')}, 'GET')
-}
-/**
- * 新增盘点
- */
-export function $addStocktakin(data){
- return http.req('/api/tbProductStocktakin', {...data,shopId:uni.getStorageSync('shopId')}, 'POST')
-}
-/**
- * 盘点记录查询
- */
-export function $getStocktakin(data){
- return http.req('/api/tbProductStocktakin', {...data,shopId:uni.getStorageSync('shopId')}, 'GET')
-}
-
-
-/**
- * 上下架商品
- */
-export function $updateGrounding(data){
- const ajaxData={...data,shopId:uni.getStorageSync('shopId')}
- return http.req('/api/stock/grounding'+`?${objectToUrlParams(ajaxData)}`, ajaxData, 'PUT')
-}
-
-
-
-/* 商品单位列表 */
-export function $tbShopUnit(data) {
- return http.req('/api/tbShopUnit', {...data,shopId:uni.getStorageSync('shopId')}, 'GET')
-}
-
-/* 商品规格 */
-export const $productSpec=new $API('/api/tbProductSpec',http.req)
-
-
-
-// v2 api start
-// 商品列表 后台查询
-export function $tbProductList(data) {
- return http.req('/api/tbProduct/list', {...data,shopId:uni.getStorageSync('shopId')}, 'GET')
-}
-/* 商品列表 V2 */
-export function $tbProductV2(data) {
- return http.req('/api/tbProduct/list/v2', {...data,shopId:uni.getStorageSync('shopId')}, 'post')
-}
-/* 耗材与商品绑定关系 */
-export function $tbProskuConV2(data) {
- return http.req('/api/tbProskuCon/V2', data, 'POST')
-}
-
-/* 修改商品相关(快捷接口) */
-export function $updateProductData(data) {
- return http.req('/api/stock/updateProductData', data, 'POST')
-}
-/* 商品报损 */
-export function $frmLoss(data) {
- return http.req('/api/tbProductStockDetail/frmLoss', {...data,shopId:uni.getStorageSync('shopId')}, 'POST')
-}
-// v2 api end
\ No newline at end of file
diff --git a/http/yskApi/http.js b/http/yskApi/http.js
deleted file mode 100644
index 9d5be61..0000000
--- a/http/yskApi/http.js
+++ /dev/null
@@ -1,243 +0,0 @@
-/**
- * HTTP的封装, 基于uni.request
- * 包括: 通用响应结果的处理 和 业务的增删改查函数
- *
- * @author terrfly
- * @site https://www.jeequan.com
- * @date 2021/12/16 18:35
- */
-
-// 导入全局属性
-import appConfig from '@/config/appConfig.js'
-import storageManage from '@/commons/utils/storageManage.js'
-import {
- sm4DecryptByResData
-} from '@/commons/utils/encryptUtil.js'
-import infoBox from "@/commons/utils/infoBox.js"
-import go from '@/commons/utils/go.js';
-import { reject } from 'lodash';
-
-// 测试服
-let baseUrl = 'https://tapi.cashier.sxczgkj.cn/'
-
-//预发布
-// let baseUrl = 'https://pre-cashieradmin.sxczgkj.cn'
-
-//正式
-// let baseUrl = 'https://cashieradmin.sxczgkj.cn'
-
-// 王伟本地测
-// let baseUrl = '/ww'
-// let baseUrl = 'http://192.168.1.15:8000'
- // 巩
- // let baseUrl = 'http://192.168.1.9:8000'
-// 多少 ms 以内, 不提示loading
-const loadingShowTime = 200
-
-
-function getHeader(){
- const headerObject={}
- headerObject["Authorization"] = storageManage.token()
- return headerObject
-}
-
-// 通用处理逻辑
-function commonsProcess(showLoading, httpReqCallback) {
-
- // 判断是否请求完成(用作 是否loading )
- // 包括: 'ing', 'ingLoading', 'finish'
- let reqState = 'ing'
-
- // 是否已经提示的错误信息
- let isShowErrorToast = false
-
-
- // 请求完成, 需要处理的动作
- let reqFinishFunc = () => {
-
- if (reqState == 'ingLoading') { // 关闭loading弹层
- infoBox.hideLoading()
- }
- reqState = 'finish' // 请求完毕
- }
-
- // 明确显示loading
- if (showLoading) {
- // xx ms内响应完成,不提示loading
- setTimeout(() => {
- if (reqState == 'ing') {
- reqState = 'ingLoading'
- infoBox.showLoading()
- }
- }, loadingShowTime)
- }
-
- return httpReqCallback().then((httpData) => {
- reqFinishFunc(); // 请求完毕的动作
- // 从http响应数据中解构响应数据 [ 响应码、 bodyData ]
- let {
- statusCode,
- data
- } = httpData
- // 避免混淆重新命名
- let bodyData = data
- if (statusCode == 500) {
- isShowErrorToast = true
- return Promise.reject(bodyData) // 跳转到catch函数
- }
- if (statusCode == 401) {
- // storageManage.token(null, true)
- // 提示信息
- isShowErrorToast = true
- // infoBox.showErrorToast('请登录').then(() => {
- // go.to("PAGES_LOGIN", {}, go.GO_TYPE_RELAUNCH)
- // })
- return Promise.reject(bodyData) // 跳转到catch函数
- }
- // http响应码不正确
- if (statusCode != 200 && statusCode != 204 && statusCode != 201) {
- isShowErrorToast = true
- data.message=data.message=='Bad credentials'?'用户名或密码错误':data.message
- infoBox.showToast(data.message || '服务器异常')
- return Promise.reject(bodyData) // 跳转到catch函数
- }
-
- // // 业务响应异常
- // if (bodyData.hasOwnProperty('code') && bodyData.code != 200) {
- // isShowErrorToast = true
- // infoBox.showToast(bodyData.msg)
- // if (bodyData.code == 5005) { // 密码已过期, 直接跳转到更改密码页面
- // uni.reLaunch({
- // url: '/pageUser/setting/updatePwd'
- // })
- // }
- // // if(bodyData.code == 500){ // 密码已过期, 直接跳转到更改密码页面
- // // uni.redirectTo({url: '/pages/login/index'})
- // // }
- // return bodyData
- // // return Promise.reject(bodyData)
- // }
-
- // 加密数据
- if (!bodyData.data && bodyData.encryptData) {
-
- return Promise.resolve({
- bizData: sm4DecryptByResData(bodyData.encryptData),
- code: bodyData.code
- })
- }
-
- // 构造请求成功的响应数据
- return Promise.resolve(bodyData)
-
- }).catch(res => {
- if(res.status==401){
- storageManage.token(null, true)
- infoBox.showErrorToast(res.message||'请登录').then(() => {
- uni.redirectTo({url: '/pages/login/index'})
- reject()
- })
- }
- // if(res.status==400){
- // storageManage.token(null, true)
- // infoBox.showErrorToast('').then(() => {
- // go.to("PAGES_LOGIN", {}, go.GO_TYPE_RELAUNCH)
- // })
- // }
- if(res.status==500){
- infoBox.showErrorToast(res.message||'服务器异常').then(() => {
- })
- }
- // if(res&&res.msg){
- // infoBox.showErrorToast(res.msg)
- // }
- reqFinishFunc(); // 请求完毕的动作
-
- // 如果没有提示错误, 那么此处提示 异常。
- if (!isShowErrorToast) {
- infoBox.showErrorToast(`请求网络异常`)
- }
-
- return Promise.reject(res)
-
- }).finally(() => { // finally 是 then结束后再执行, 此处不适用。 需要在请求完成后立马调用: reqFinishFunc()
-
- });
-
-}
-
-
-// 默认 显示loading(控制 xxs 内 不提示loading )
-function req(uri, data, method = "GET", showLoading = true, extParams = {}) {
- // headerObject[appConfig.tokenKey] = storageManage.token()
- return commonsProcess(showLoading, () => {
- return uni.request(
- Object.assign({
- url: baseUrl + uri,
- data: data,
- method: method,
- header: getHeader()
- }, extParams)
- )
- })
-}
-
-
-// 默认 显示loading(控制 xxs 内 不提示loading )
-function request(args) {
- const {
- url,
- data,
- params,
- method = "GET",
- showLoading = true,
- extParams = {}
- } = args
- let headerObject = {}
- // headerObject[appConfig.tokenKey] = storageManage.token()
- return commonsProcess(showLoading, () => {
- return uni.request(
- Object.assign({
- url: baseUrl + url,
- data: params||data,
- method: method,
- header: getHeader()
- }, extParams)
-
- )
- })
-}
-
-
-
-// 上传
-function upload(uri, data, file, showLoading = true, extParams = {}) {
- // 放置token
- let headerObject = {}
- // headerObject[appConfig.tokenKey] = storageManage.token()
-
- return commonsProcess(showLoading, () => {
- return uni.uploadFile(
- Object.assign({
- url: baseUrl + uri,
- formData: data,
- name: "file",
- filePath: file.path||file.url,
- header: getHeader()
- }, extParams)
- ).then((httpData) => {
- // uni.upload 返回bodyData 的是 string类型。 需要解析。
- httpData.data = JSON.parse(httpData.data)
- return Promise.resolve(httpData)
- }).catch(err=>{
- uni.hideLoading()
- infoBox.showErrorToast(`上传失败`)
- })
- })
-}
-
-export default {
- req: req,
- request,
- upload: upload
-}
\ No newline at end of file
diff --git a/http/yskApi/invoicing.js b/http/yskApi/invoicing.js
deleted file mode 100644
index 314a3a4..0000000
--- a/http/yskApi/invoicing.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import http from './http.js'
-import $API from '@/http/classApi.js'
-import appConfig from '@/config/appConfig.js'
-import {
- Base64
-} from 'js-base64'
-import infoBox from '@/commons/utils/infoBox.js'
-
-/* 操作记录 */
-export function $getStockOperate(data) {
- return http.req('/api/tbProductStockOperate/list', {...data,shopId:uni.getStorageSync('shopId')}, 'POST')
-}
-
diff --git a/http/yskApi/login.js b/http/yskApi/login.js
deleted file mode 100644
index 0791b7a..0000000
--- a/http/yskApi/login.js
+++ /dev/null
@@ -1,44 +0,0 @@
-import http from './http.js'
-const request=http.request
-
-export function login(data) {
- return request({
- url: "/auth/login",
- method: "post",
- data
- });
-}
-
-export function getInfo() {
- return request({
- url: "/auth/info",
- method: "get"
- });
-}
-
-export function getCodeImg(header) {
- return request({
- url: "/auth/code",
- method: "get"
- });
-}
-
-export function logout() {
- return request({
- url: "/auth/logout",
- method: "delete"
- });
-}
-
-/**
- * 个人中心 修改密码
- * @param {*} data
- * @returns
- */
-export function updatePass(data) {
- return request({
- url: "/api/users/updatePass",
- method: "post",
- data
- });
-}
diff --git a/http/yskApi/order.js b/http/yskApi/order.js
deleted file mode 100644
index 764344e..0000000
--- a/http/yskApi/order.js
+++ /dev/null
@@ -1,108 +0,0 @@
-import http from './http.js'
-const request = http.request
-
-/**
- * 查询订单
- * @param {*} data
- * @returns
- */
-export function tbOrderInfoData(data) {
- return request({
- url: "/api/tbOrderInfo/date",
- method: "post",
- data: {
- shopId: uni.getStorageSync('shopId'),
- ...data
- }
- });
-}
-
-/**
- * 导出数据
- * @param {*} data
- * @returns
- */
-export function tbOrderInfoDownload(data) {
- return request({
- url: "/api/tbOrderInfo/download",
- method: "post",
- data: {
- shopId: uni.getStorageSync('shopId'),
- ...data
- },
- responseType: "blob"
- });
-}
-
-/**
- * 通过Id查询订单
- * @param {*} id
- * @returns
- */
-export function tbOrderInfoDetail(id) {
- return request({
- url: `/api/tbOrderInfo/${id}`,
- method: "get"
- });
-}
-
-/**
- * 通过Id查询订单
- * @param {*} createdAt
- * @returns
- */
-export function payCount(createdAt) {
- console.log(createdAt);
- return request({
- url: `/api/tbOrderInfo/payCount`,
- method: "post",
- data: {
- shopId: uni.getStorageSync('shopId'),
- createdAt: createdAt
- }
- });
-}
-
-/**
- * 订单列表
- * @param {*} createdAt
- * @returns
- */
-export function tbGroupOrderInfo(params) {
- return request({
- url: `/api/tbGroupOrderInfo`,
- method: "post",
- data: {
- shopId: uni.getStorageSync('shopId'),
- ...params
- }
- });
-}
-
-/**
- * 退单
- * @param {*} data
- * @returns
- */
-export function returnGpOrder(data) {
- return request({
- url: `/api/tbGroupOrderInfo/returnGpOrder`,
- method: "post",
- data
- });
-}
-
-
-/**
- * 店铺订单支付获取链接
- */
-export function $getOrderPayUrl(data) {
- return request({
- url: `/api/shopPayApi/getOrderPayUrl`,
- method: "get",
- data: {
- shopId: uni.getStorageSync('shopId'),
- ...data
- }
- });
-}
\ No newline at end of file
diff --git a/http/yskApi/pageNotification.js b/http/yskApi/pageNotification.js
deleted file mode 100644
index 9597344..0000000
--- a/http/yskApi/pageNotification.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import http from './http.js'
-const request=http.request
-
-
-/**
- * 获取订阅二维码
- * @returns
- */
-export function getSubQrCode(params) {
- return request({
- url: `/api/msg/subQrCode`,
- method: 'get',
- params: {
- shopId: uni.getStorageSync('shopId'),
- }
- })
-}
diff --git a/http/yskApi/pageWorkControl.js b/http/yskApi/pageWorkControl.js
deleted file mode 100644
index 6f4d115..0000000
--- a/http/yskApi/pageWorkControl.js
+++ /dev/null
@@ -1,29 +0,0 @@
-import http from './http.js'
-const request = http.request
-
-/**
- * 查询交班记录
- * @returns
- */
-export function tbHandover(data) {
- return request({
- url: '/api/tbHandover?' + data,
- method: 'get'
- })
-}
-
-
-/**
- * 提交交班
- * @returns
- */
-export function handoverData(data) {
- return request({
- url: '/api/tbHandover/handoverData',
- method: 'post',
- data: {
- shopId: uni.getStorageSync('shopId'),
- ...data
- }
- })
-}
\ No newline at end of file
diff --git a/http/yskApi/requestAll.js b/http/yskApi/requestAll.js
deleted file mode 100644
index 61487b2..0000000
--- a/http/yskApi/requestAll.js
+++ /dev/null
@@ -1,315 +0,0 @@
-import http from './http.js'
-const request = http.request
-// 销售总会list
-export function summaryTrade(data) {
- return request({
- url: '/api/summary/trade',
- method: 'post',
- data: {
- ...data
- }
- })
-}
-export function tbConsInfoFlowcount(data) {
- return request({
- url: '/api/tbConsInfoFlow/count',
- method: 'post',
- data
- })
-}
-// 供应商列表
-export function tbShopPurveyorTransact(params) {
- return request({
- url: '/api/tbShopPurveyorTransact',
- method: 'get',
- params
- })
-}
-// 添加供应商
-export function tbShopPurveyorpost(data) {
- return request({
- url: `/api/tbShopPurveyor`,
- method: "post",
- data
- });
-}
-// 编辑供应商
-export function tbShopPurveyorput(data) {
- return request({
- url: `/api/tbShopPurveyor`,
- method: "put",
- data
- });
-}
-// 结款记录列表
-export function tbShopPurveyorTransactinfo(data) {
- return request({
- url: '/api/tbShopPurveyorTransact/info',
- method: "post",
- data
- })
-}
-// 付款
-export function tbShopPurveyorpayTransact(data) {
- return request({
- url: '/api/tbShopPurveyorTransact/payTransact',
- method: "post",
- data
- })
-}
-// 账单付款记录
-export function tbShopPurveyorTransacttransactPayInfos(params) {
- return request({
- url: '/api/tbShopPurveyorTransact/transactPayInfos',
- method: 'get',
- params
- })
-}
-// 删除供应商列表
-export function tbShopPurveyordelete(data) {
- return request({
- url: `/api/tbShopPurveyor`,
- method: "delete",
- data
- });
-}
-// 耗材报损
-export function tbConsInfoFlowfrmLoss(data) {
- return request({
- url: '/api/tbConsInfoFlow/frmLoss',
- method: 'post',
- data
- })
-}
-// 销售排行榜
-export function dateProduct(params) {
- return request({
- url: '/api/summary/productSaleDate',
- method: 'get',
- params
- })
-}
-// 是否开启
-export function updateStatus(data) {
- return request({
- url: `/api/tbPlussShopStaff/updateStatus`,
- method: "put",
- data
- });
-}
-// 编辑
-export function tbPlussShopStaffDetail(id) {
- return request({
- url: `/api/tbPlussShopStaff/` + id,
- method: "get"
- });
-}
-// 新增耗材类型
-export function tbConsType(data) {
- return request({
- url: '/api/tbConsType ',
- method: 'post',
- data
- })
-}
-// 编辑耗材类型
-export function tbConsTypeput(data) {
- return request({
- url: '/api/tbConsInfo ',
- method: "put",
- data
- });
-}
-
-// 获取耗材类型列表
-export function tbConsTypeList(params) {
- return request({
- url: '/api/tbConsType',
- method: 'get',
- params
- })
-}
-// 修改耗材类型
-export function edittbConsTypeput(data) {
- return request({
- url: '/api/tbConsType ',
- method: "put",
- data
- });
-}
-// 添加耗材列表
-export function tbConsInfoAddlist(data) {
- return request({
- url: '/api/tbConsInfo ',
- method: 'post',
- data
- })
-}
-// 操作耗材入库
-export function tbConsInfostockInOut(data) {
- return request({
- url: '/api/tbConsInfo/stockInOut ',
- method: 'post',
- data
- })
-}
-// 获取耗材列表
-export function tbConsInfoList(params) {
- return request({
- url: '/api/tbConsInfo',
- method: 'get',
- params
- })
-}
-// 耗材盘点
-export function tbConsInfotbConCheck(data) {
- return request({
- url: '/api/tbConCheck ',
- method: 'post',
- data
- })
-}
-// 获取供应商列表
-export function tbShopPurveyor(params) {
- return request({
- url: '/api/tbShopPurveyor',
- method: 'get',
- params
- })
-}
-// 桌型列表
-export function callTable(params) {
- return request({
- url: '/callTable',
- method: 'get',
- params
- })
-}
-// 排队列表
-export function callTablequeue(params) {
- return request({
- url: '/callTable/queue',
- method: 'get',
- params
- })
-}
-// 取号
-export function callTabletakeNumber(data) {
- return request({
- url: '/callTable/takeNumber',
- method: 'post',
- data: {
- ...data
- }
- })
-}
-// 增减余额
-export function midfiyAccount(data) {
- return request({
- url: '/api/tbShopUser/midfiyAccount',
- method: 'post',
- data: {
- ...data
- }
- })
-}
-// 新增会员
-export function member(data) {
- return request({
- url: '/api/member',
- method: 'post',
- data: {
- ...data
- }
- })
-}
-// 修改会员
-export function tbShopUser(data) {
- return request({
- url: `/api/tbShopUser`,
- method: "put",
- data
- });
-}
-export function callTablecallRecord(params) {
- return request({
- url: '/callTable/callRecord',
- method: 'get',
- params
- })
-}
-export function callTableput(data) {
- return request({
- url: `/callTable/updateState`,
- method: "put",
- data
- });
-}
-// 叫号
-export function callTablecall(data) {
- return request({
- url: `/callTable/call`,
- method: 'post',
- data
- });
-}
-// 获取员工列表
-export function rolesGet(params) {
- return request({
- url: `/api/tbPlussShopStaff`,
- method: "get",
- params
- });
-}
-// 删除员工
-export function shopStaffDelete(data) {
- return request({
- url: `/api/tbPlussShopStaff`,
- method: "delete",
- data
- });
-}
-// 新增员工获取权限
-export function tbShopPermissionList() {
- return request({
- url: `/api/tbShopPermission/list`,
- method: "get"
- });
-}
-
-// 获取角色权限
-export function getroles() {
- return request({
- url: `/api/roles`,
- method: "get"
- });
-}
-export function tbConsTypes() {
- return request({
- url: `/api/tbConsType`,
- method: "get"
- });
-}
-export function tbPlussShopStaff(data) {
- return request({
- url: `/api/tbPlussShopStaff`,
- method: data.id ? "put" : "post",
- data
- });
-}
-// 耗材列表
-export function viewConInfoFlowget(data) {
- return request({
- url: `/api/tbConsInfo/allAndPro`,
- method: 'post',
- data
- });
-}
-// 耗材记录
-export function tbConsInfoFlowstock(data) {
- return request({
- url: `/api/tbConsInfoFlow/stock`,
- method: 'post',
- data
- });
-}
\ No newline at end of file
diff --git a/http/yskApi/shop-user.js b/http/yskApi/shop-user.js
deleted file mode 100644
index 4434d93..0000000
--- a/http/yskApi/shop-user.js
+++ /dev/null
@@ -1,48 +0,0 @@
-// 用户管理
-import http from './http.js'
-import $API from '@/http/classApi.js'
-import appConfig from '@/config/appConfig.js'
-import {
- Base64
-} from 'js-base64'
-import infoBox from '@/commons/utils/infoBox.js'
-
-const request=http.request
-
-// 获取店铺会员二维码
-export function getwxacode(data) {
- return request({
- url: `/shop/storage/getwxacode`,
- method: "post",
- data
- });
-}
-/**
- * 商家用户列表
- * @returns
- */
-export function queryAllShopUser(params) {
- return request({
- url: `/api/tbShopUser/queryAllShopUser`,
- method: "get",
- params: {
- shopId: uni.getStorageSync('shopId'),
- ...params
- }
- });
-}
-/**
- * 查询商家用户概述信息
- * @returns
- */
-export function queryAllShopInfo(params) {
- return request({
- url: `/api/tbShopUser/summary`,
- method: "get",
- params: {
- shopId: uni.getStorageSync('shopId'),
- isVip:1,
- ...params
- }
- });
-}
diff --git a/http/yskApi/shop.js b/http/yskApi/shop.js
deleted file mode 100644
index 9422701..0000000
--- a/http/yskApi/shop.js
+++ /dev/null
@@ -1,735 +0,0 @@
-import http from './http.js'
-const request=http.request
-
-
-/**
- * 获取店铺列表
- * @returns
- */
-export function getShopList(params) {
- return request({
- url: `/api/tbShopInfo`,
- method: 'get',
- params: {
-
- }
- })
-}
-
-/**
- * 获取店铺数据
- * @returns
- */
-export function getShopInfo(params) {
- return request({
- url: `/api/tbShopInfo/${params}`,
- method: 'get',
- params: {
-
- }
- })
-}
-
-/**
- * 更改店铺信息
- * @returns
- */
-export function editShopInfo(data) {
- return request({
- url: `/api/tbShopInfo`,
- method: 'put',
- data:{
- // shopId: uni.getStorageSync('shopId'),
- ...data
- }
- })
-}
-
-
-/**
- * 获取店铺图片
- * @returns
- */
-export function getShopExtend(params) {
- return request({
- url: `/tbShopExtend`,
- method: 'get',
- params:{
- shopId: uni.getStorageSync('shopId'),
- }
- })
-}
-
-/**
- * 获取店铺图片
- * @returns
- */
-export function editShopExtend(data) {
- return request({
- url: `/tbShopExtend`,
- method: 'put',
- data:{
- shopId: uni.getStorageSync('shopId'),
- ...data
- }
- })
-}
-/**
- * 商品列表
- * @returns
- */
-export function tbProduct(params) {
- return request({
- url: "/api/tbProduct",
- method: "get",
- params
- });
-}
-
-/**
- * 删除商品
- * @returns
- */
-export function tbProductDelete(data) {
- return request({
- url: "/api/tbProduct",
- method: "delete",
- data
- });
-}
-
-/**
- * 商品单位列表
- * @returns
- */
-export function tbShopUnit(params) {
- return request({
- url: "/api/tbShopUnit",
- method: "get",
- params
- });
-}
-
-/**
- * 店铺基本配置
- * @returns
- */
-export function tbShopCurrency(shopId) {
- return request({
- url: `/api/tbShopCurrency/${shopId}`,
- method: "get"
- });
-}
-
-/**
- * 修改店铺信息
- * @returns
- */
-export function tbShopCurrencyPut(data) {
- return request({
- url: `/api/tbShopCurrency`,
- method: "put",
- data
- });
-}
-
-/**
- * 新增单位
- * @returns
- */
-export function tbShopUnitPost(data) {
- return request({
- url: `/api/tbShopUnit`,
- method: "post",
- data
- });
-}
-
-/**
- * 更改单位
- * @returns
- */
-export function tbShopUnitPut(data) {
- return request({
- url: `/api/tbShopUnit`,
- method: "put",
- data
- });
-}
-
-/**
- * 删除单位
- * @returns
- */
-export function tbShopUnitDelete(data) {
- return request({
- url: `/api/tbShopUnit`,
- method: "delete",
- data
- });
-}
-
-/**
- * 店铺基本配置
- * @returns
- */
-export function tbShopCurrencyGet(params) {
- return request({
- url: `/api/tbShopUnit`,
- method: "get",
- params:{
- sort:'id',
- shopId: uni.getStorageSync("shopId"),
- ...params,
- }
- });
-}
-
-/**
- * 商品分类列表
- * @returns
- */
-export function tbShopCategoryGet(params) {
- return request({
- url: `/api/tbShopCategory`,
- method: "get",
- params
- });
-}
-
-/**
- * 新增、编辑分类/新增、编辑子分类
- * @returns
- */
-export function tbShopCategoryPost(data, method = "post") {
- return request({
- url: `/api/tbShopCategory`,
- method: method,
- data
- });
-}
-
-/**
- * 删除商品分类
- * @returns
- */
-export function tbShopCategoryDelete(data) {
- return request({
- url: `/api/tbShopCategory`,
- method: "delete",
- data
- });
-}
-
-/**
- * 规格增加
- * @returns
- */
-export function tbProductSpecPost(data) {
- return request({
- url: `/api/tbProductSpec`,
- method: "post",
- data
- });
-}
-
-/**
- * 规格列表
- * @returns
- */
-export function tbProductSpecGet(params) {
- return request({
- url: `/api/tbProductSpec`,
- method: "get",
- params
- });
-}
-
-/**
- * 规格更改
- * @returns
- */
-export function tbProductSpecPut(data) {
- return request({
- url: `/api/tbProductSpec`,
- method: "put",
- data
- });
-}
-
-/**
- * 删除规格
- * @returns
- */
-export function tbProductSpecDelete(data) {
- return request({
- url: `/api/tbProductSpec`,
- method: "DELETE",
- data
- });
-}
-
-/**
- * 新增分组
- * @returns
- */
-export function tbProductGroupPost(data) {
- return request({
- url: `/api/tbProductGroup`,
- method: "post",
- data
- });
-}
-
-/**
- * 更改分组
- * @returns
- */
-export function tbProductGroupPut(data) {
- return request({
- url: `/api/tbProductGroup`,
- method: "PUT",
- data
- });
-}
-
-/**
- * 商品分组列表
- * @returns
- */
-export function tbProductGroupGet(params) {
- return request({
- url: `/api/tbProductGroup`,
- method: "get",
- params
- });
-}
-
-/**
- * 商品列表(根据分组中的商品id)
- * @returns
- */
-export function productListGet(productGroup) {
- return request({
- url: `/api/tbProductGroup/${productGroup}`,
- method: "get"
- });
-}
-
-/**
- * 删除分组
- * @returns
- */
-export function tbProductGroupDelete(data) {
- return request({
- url: `/api/tbProductGroup`,
- method: "DELETE",
- data
- });
-}
-
-/**
- * 添加商品
- * @returns
- */
-export function tbProductPost(data) {
- return request({
- url: `/api/tbProduct`,
- method: "post",
- data
- });
-}
-
-/**
- * 添加商品
- * @returns
- */
-export function tbProductPut(data) {
- return request({
- url: `/api/tbProduct`,
- method: "put",
- data
- });
-}
-
-/**
- * 商品详情(单个商品)
- * product 商品id
- * @returns
- */
-export function tbProductGetDetail(product) {
- return request({
- url: `/api/tbProduct/${product}`,
- method: "get"
- });
-}
-
-/**
- * 店铺列表
- * @returns
- */
-export function tbShopInfo(params) {
- return request({
- url: `/api/tbShopInfo`,
- method: "get",
- params
- });
-}
-
-/**
- * 增加激活码
- * @returns
- */
-export function tbMerchantRegisterPost(data) {
- return request({
- url: `/api/tbMerchantRegister`,
- method: "post",
- data
- });
-}
-
-/**
- * 激活码列表
- * @returns
- */
-export function tbMerchantRegisterList(data) {
- return request({
- url: `/api/tbMerchantRegister/list`,
- method: "post",
- data
- });
-}
-
-/**
- * 增加/编辑店铺
- * @returns
- */
-export function tbShopInfoPost(data, method = "post") {
- return request({
- url: `/api/tbShopInfo`,
- method: method,
- data
- });
-}
-
-/**
- * 详情(配置三方支付)
- * @returns
- */
-export function tbMerchantThirdApply(shopId) {
- return request({
- url: `/api/tbMerchantThirdApply/${shopId}`,
- method: "get"
- });
-}
-
-/**
- * 修改第三方配置
- * @returns
- */
-export function tbMerchantThirdApplyPut(data) {
- return request({
- url: `/api/tbMerchantThirdApply`,
- method: "put",
- data
- });
-}
-
-/**
- * 设置热销商品
- * @returns
- */
-export function tbProductIsHot(params) {
- return request({
- url: `/api/tbProduct/isHot`,
- method: "get",
- params
- });
-}
-
-/**
- * 增加/编辑优惠券
- * @returns
- */
-export function tbMerchantCoupon(data, method = "post") {
- return request({
- url: `/api/tbMerchantCoupon`,
- method: method,
- data
- });
-}
-
-/**
- * 设置热销商品
- * @returns
- */
-export function tbMerchantCouponGet(params) {
- return request({
- url: `/api/tbMerchantCoupon`,
- method: "get",
- params
- });
-}
-
-/**
- * 设置热销商品
- * @returns
- */
-export function geocode(params) {
- return request({
- url: `/api/geocode`,
- method: "get",
- params
- });
-}
-
-/**
- * 新增、修改活动
- * @returns
- */
-export function modityActivate(data) {
- return request({
- url: `/shop/storage/modityActivate`,
- method: "post",
- data
- });
-}
-
-/**
- * 活动列表
- * @returns
- */
-export function findActivate(params) {
- return request({
- url: `/shop/storage/findActivate`,
- method: "get",
- params
- });
-}
-// 获取店铺会员二维码
-export function getwxacode(data) {
- return request({
- url: `/shop/storage/getwxacode`,
- method: "post",
- data
- });
-}
-/**
- * 商家用户列表
- * @returns
- */
-export function queryAllShopUser(params) {
- return request({
- url: `/api/tbShopUser/queryAllShopUser`,
- method: "get",
- params: {
- shopId: uni.getStorageSync("shopId"),
- ...params
- }
- });
-}
-/**
- * 查询商家用户概述信息
- * @returns
- */
-export function queryAllShopInfo(params) {
- return request({
- url: `/api/tbShopUser/summary`,
- method: "get",
- params: {
- shopId: uni.getStorageSync("shopId"),
- ...params
- }
- });
-}
-
-/**
- * 修改商品排序
- * @returns
- */
-export function upProSort(data) {
- return request({
- url: `/api/tbProduct/upProSort`,
- method: "post",
- data
- });
-}
-
-/**
- * 修改分组排序
- * @returns
- */
-export function upGroupSort(data) {
- return request({
- url: `/api/tbProductGroup/upGroupSort`,
- method: "post",
- data
- });
-}
-
-/**
- * 修改分类排序
- * @returns
- */
-export function upCategorySort(data) {
- return request({
- url: `/api/tbShopCategory/upCategorySort`,
- method: "post",
- data
- });
-}
-
-/**
- * 查询店铺充值记录
- * @returns
- */
-export function tbShopUserRecharge(params) {
- return request({
- url: `/api/tbShopUser/recharge`,
- method: "get",
- params: {
- shopId: uni.getStorageSync("shopId"),
- ...params
- }
- });
-}
-
-/**
- * 导出充值记录
- * @returns
- */
-export function downloadTableRecharge(data) {
- return request({
- url: `/api/tbShopUser/recharge/download`,
- method: "post",
- data: {
- shopId: uni.getStorageSync("shopId"),
- ...data
- },
- responseType: "blob"
- });
-}
-
-/**
- * 员工列表
- * @returns
- */
-export function tbPlussShopStaffGet(params) {
- return request({
- url: `/api/tbPlussShopStaff`,
- method: "get",
- params: {
- shopId: uni.getStorageSync("shopId"),
- ...params
- }
- });
-}
-
-/**
- * 角色列表
- * @returns
- */
-export function rolesGet() {
- return request({
- url: `/api/roles`,
- method: "get"
- });
-}
-
-/**
- * 增加员工
- * @returns
- */
-export function tbPlussShopStaff(data) {
- return request({
- url: `/api/tbPlussShopStaff`,
- method: data.id ? "put" : "post",
- data: {
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
-
-/**
- * 通过id获取员工信息
- * @returns
- */
-export function tbPlussShopStaffDetail(id) {
- return request({
- url: `/api/tbPlussShopStaff/${id}`,
- method: "get"
- });
-}
-
-/**
- * 更改员工状态
- * @returns
- */
-export function updateStatus(data) {
- return request({
- url: `/api/tbPlussShopStaff/updateStatus`,
- method: "put",
- data
- });
-}
-
-/**
- * 员工删除
- * @returns
- */
-export function shopStaffDelete(data) {
- return request({
- url: `/api/tbPlussShopStaff`,
- method: "delete",
- data
- });
-}
-
-//增减余额
-export function midfiyAccount(data) {
- return request({
- url: `/api/tbShopUser/midfiyAccount`,
- method: "post",
- data
- });
-}
-// 编辑用户
-export function tbShopUseredit(data) {
- return request({
- url: `/api/tbShopUser`,
- method: "put",
- data
- });
-}
-// 通过活动id获取赠送商品列表
-export function activate(id) {
- return request({
- url: `shop/storage/activate/${id}`,
- method: "get"
- });
-}
-
-// 通过活动id获取赠送商品列表
-export function queryShopUserFlow(params) {
- return request({
- url: `/api/tbShopUser/queryShopUserFlow`,
- method: "get",
- params
- });
-}
-
-//新增
-
-// 查询员工是否拥有权限
-export function $hasPermission(params) {
- return request({
- url: '/api/tbShopPermission/hasPermission',
- method: "get",
- params:{
- userId: uni.getStorageSync("shopUserId"),
- ...params
- }
- });
-}
-
diff --git a/http/yskApi/sku.js b/http/yskApi/sku.js
deleted file mode 100644
index d65e86f..0000000
--- a/http/yskApi/sku.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import http from './http.js'
-import $API from '@/http/classApi.js'
-import appConfig from '@/config/appConfig.js'
-import {
- Base64
-} from 'js-base64'
-import infoBox from '@/commons/utils/infoBox.js'
-
-/* 查询库存 */
-export function $getProductSku(productId) {
- return http.req('/api/stock/sku', {productId,shopId:uni.getStorageSync('shopId')}, 'GET')
-}
-
diff --git a/http/yskApi/table.js b/http/yskApi/table.js
deleted file mode 100644
index 6b4104c..0000000
--- a/http/yskApi/table.js
+++ /dev/null
@@ -1,61 +0,0 @@
-// 桌台管理
-import http from './http.js'
-const request = http.request
-import $API from '@/http/classApi.js'
-import appConfig from '@/config/appConfig.js'
-import {
- Base64
-} from 'js-base64'
-import infoBox from '@/commons/utils/infoBox.js'
-
-/* 台桌区域 */
-export const $tableArea = new $API('/api/tbShopArea', http.req)
-/* 台桌 */
-export const $table = new $API('/api/tbShopTable', http.req)
-/* 绑定 */
-// export const $bind=new $API('/api/tbShopTable/bind',http.req)
-export function $bind(data) {
- return request({
- url: "/api/tbShopTable/bind",
- method: "post",
- data: {
- shopId: uni.getStorageSync('shopId'),
- ...data
- }
- });
-}
-// 转/并桌
-export function tableswitch(data) {
- return request({
- url: '/api/place/switch',
- method: "put",
- data: {
- shopId: uni.getStorageSync('shopId'),
- ...data
- }
- });
-}
-//获取台桌详情状态
-export function $returnTableDetail(data) {
- return request({
- url: '/api/tbShopTable/state',
- method: "get",
- params: {
- shopId: uni.getStorageSync('shopId'),
- ...data
- }
- });
-}
-
-
-// 选择台桌
-export function $choseTable(data) {
- return request({
- url: '/api/place/choseTable',
- method: "put",
- data: {
- shopId: uni.getStorageSync('shopId'),
- ...data
- }
- });
-}
\ No newline at end of file
diff --git a/http/yskApi/user.js b/http/yskApi/user.js
deleted file mode 100644
index 1b46450..0000000
--- a/http/yskApi/user.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import http from './http.js'
-const request=http.request
-/**
- * 用户详情
- * @returns
- */
-export function tbShopInfo(shopId) {
- const _shopId=uni.getStorageSync('shopId')
- return request({
- url: `/api/tbShopInfo/${shopId||_shopId}`,
- method: 'get'
- })
-}
-
-/**
- * 修改店铺信息
- * @returns
- */
-export function tbShopInfoPut(data) {
- return request({
- url: `/api/tbShopInfo`,
- method: 'put',
- data
- })
-}
\ No newline at end of file
diff --git a/http/yskApi/version.js b/http/yskApi/version.js
deleted file mode 100644
index 9929361..0000000
--- a/http/yskApi/version.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import http from './http.js'
-const request=http.request
-
-
-/**
- * 查询所属渠道升级版本
- * @returns
- */
-export function getFindBySource(params) {
- return request({
- url: `/api/tbVersion/findBySource`,
- method: 'get',
- params
- })
-}
diff --git a/pageConsumables/billPayment.vue b/pageConsumables/billPayment.vue
index c61fc9c..cd6766e 100644
--- a/pageConsumables/billPayment.vue
+++ b/pageConsumables/billPayment.vue
@@ -14,14 +14,9 @@
diff --git a/pageConsumables/paymentSettlement.vue b/pageConsumables/paymentSettlement.vue
index 8885e16..146a9fc 100644
--- a/pageConsumables/paymentSettlement.vue
+++ b/pageConsumables/paymentSettlement.vue
@@ -103,19 +103,11 @@