订单结算修改
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
// 导入全局属性
|
||||
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';
|
||||
let baseUrl = 'http://192.168.1.42'
|
||||
@@ -95,11 +94,6 @@ function commonsProcess(showLoading, httpReqCallback){
|
||||
return Promise.reject(bodyData)
|
||||
}
|
||||
|
||||
// 加密数据
|
||||
if(!bodyData.data && bodyData.encryptData){
|
||||
|
||||
return Promise.resolve({ bizData: sm4DecryptByResData(bodyData.encryptData), code: bodyData.code })
|
||||
}
|
||||
|
||||
// 构造请求成功的响应数据
|
||||
return Promise.resolve({ bizData: bodyData.data, code: bodyData.code })
|
||||
|
||||
@@ -10,9 +10,6 @@
|
||||
// 导入全局属性
|
||||
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';
|
||||
let baseUrl = 'http://101.37.12.135:8080'
|
||||
@@ -99,14 +96,6 @@ function commonsProcess(showLoading, httpReqCallback) {
|
||||
return Promise.reject(bodyData)
|
||||
}
|
||||
|
||||
// 加密数据
|
||||
if (!bodyData.data && bodyData.encryptData) {
|
||||
|
||||
return Promise.resolve({
|
||||
bizData: sm4DecryptByResData(bodyData.encryptData),
|
||||
code: bodyData.code
|
||||
})
|
||||
}
|
||||
|
||||
// 构造请求成功的响应数据
|
||||
return Promise.resolve({
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
// 代课下单
|
||||
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'
|
||||
import { accountUrl, marketUrl } from './prveUrl.js'
|
||||
|
||||
const request = http.request
|
||||
|
||||
@@ -360,10 +355,10 @@ export function $returnOrder(data) {
|
||||
});
|
||||
}
|
||||
|
||||
//获取订单可用优惠券
|
||||
export function $activateByOrderId(data) {
|
||||
//获取用户可用优惠券
|
||||
export function $findCoupon(data) {
|
||||
return request({
|
||||
url: '/api/tbShopCoupon/activateByOrderId',
|
||||
url: marketUrl+'/admin/coupon/findCoupon',
|
||||
method: "get",
|
||||
params: {
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import http from './http.js'
|
||||
const request=http.request
|
||||
import {accountUrl} from './prveUrl.js'
|
||||
|
||||
|
||||
/**
|
||||
@@ -8,7 +9,7 @@ const request=http.request
|
||||
*/
|
||||
export function getTbShopCoupon(data) {
|
||||
return request({
|
||||
url: `/api/tbShopCoupon`,
|
||||
url:accountUrl+ `/admin/coupon/findCoupon`,
|
||||
method: 'get',
|
||||
params: {
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
|
||||
@@ -10,9 +10,6 @@
|
||||
// 导入全局属性
|
||||
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 {
|
||||
@@ -109,18 +106,7 @@ function commonsProcess(showLoading, httpReqCallback) {
|
||||
infoBox.showToast(data.message || '服务器异常')
|
||||
return Promise.reject(bodyData) // 跳转到catch函数
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 加密数据
|
||||
if (!bodyData.data && bodyData.encryptData) {
|
||||
|
||||
return Promise.resolve({
|
||||
bizData: sm4DecryptByResData(bodyData.encryptData),
|
||||
code: bodyData.code
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 构造请求成功的响应数据
|
||||
return Promise.resolve(bodyData)
|
||||
|
||||
|
||||
19
http/yskApi/limitTimeDiscount.js
Normal file
19
http/yskApi/limitTimeDiscount.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import http from './http.js'
|
||||
const request = http.request
|
||||
import {marketUrl} from './prveUrl.js'
|
||||
|
||||
/**
|
||||
* 限时折扣
|
||||
* @returns
|
||||
*/
|
||||
export function limitTimeDiscount(params) {
|
||||
return request({
|
||||
url: marketUrl+`/admin/limitTimeDiscount`,
|
||||
method: 'get',
|
||||
params: {
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
...params
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
19
http/yskApi/market/consumeDiscount.js
Normal file
19
http/yskApi/market/consumeDiscount.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import http from '../http.js'
|
||||
const request = http.request
|
||||
import {marketUrl} from '../prveUrl.js'
|
||||
|
||||
/**
|
||||
* 限时折扣
|
||||
* @returns
|
||||
*/
|
||||
export function getDiscountByUserId(params) {
|
||||
return request({
|
||||
url: marketUrl+`/admin/consumeDiscount/getDiscountByUserId`,
|
||||
method: 'get',
|
||||
params: {
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
...params
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import http from './http.js'
|
||||
const request = http.request
|
||||
import {orderUrl} from './prveUrl.js'
|
||||
|
||||
/**
|
||||
* 查询订单
|
||||
@@ -49,7 +50,7 @@ export function createOrder(data, urlType = 'order') {
|
||||
*/
|
||||
export function tbOrderInfoDetail(id) {
|
||||
return request({
|
||||
url: `/api/tbOrderInfo/${id}`,
|
||||
url: orderUrl+ `/admin/order/historyOrder?orderId=${id}`,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
||||
3
http/yskApi/prveUrl.js
Normal file
3
http/yskApi/prveUrl.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export const marketUrl = '/market'
|
||||
export const accountUrl = '/account'
|
||||
export const orderUrl = '/order'
|
||||
@@ -1,11 +1,7 @@
|
||||
// 用户管理
|
||||
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'
|
||||
import {accountUrl} from './prveUrl.js'
|
||||
|
||||
|
||||
const request=http.request
|
||||
|
||||
@@ -23,7 +19,7 @@ export function getwxacode(data) {
|
||||
*/
|
||||
export function queryAllShopUser(params) {
|
||||
return request({
|
||||
url: `/api/tbShopUser/queryAllShopUser`,
|
||||
url: accountUrl+`/admin/shopUser`,
|
||||
method: "get",
|
||||
params: {
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
@@ -46,3 +42,18 @@ export function queryAllShopInfo(params) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店铺用户详情
|
||||
* @returns
|
||||
*/
|
||||
export function shopUserDetail(params) {
|
||||
return request({
|
||||
url: accountUrl+`/admin/shopUser/detail`,
|
||||
method: "get",
|
||||
params: {
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
...params
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user