增加商品新列表接口,耗材与商品绑定关系接口
This commit is contained in:
@@ -5,7 +5,17 @@ import {
|
|||||||
Base64
|
Base64
|
||||||
} from 'js-base64'
|
} from 'js-base64'
|
||||||
import infoBox from '@/commons/utils/infoBox.js'
|
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) {
|
export function $tbProduct(data) {
|
||||||
return http.req('/api/tbProduct', {...data,shopId:uni.getStorageSync('shopId')}, 'GET')
|
return http.req('/api/tbProduct', {...data,shopId:uni.getStorageSync('shopId')}, 'GET')
|
||||||
@@ -92,7 +102,8 @@ export function $getStocktakin(data){
|
|||||||
* 上下架商品
|
* 上下架商品
|
||||||
*/
|
*/
|
||||||
export function $updateGrounding(data){
|
export function $updateGrounding(data){
|
||||||
return http.req('/api/stock/grounding', {...data,shopId:uni.getStorageSync('shopId')}, 'PUT')
|
const ajaxData={...data,shopId:uni.getStorageSync('shopId')}
|
||||||
|
return http.req('/api/stock/grounding'+`?${objectToUrlParams(ajaxData)}`, ajaxData, 'PUT')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -107,3 +118,14 @@ export const $productSpec=new $API('/api/tbProductSpec',http.req)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// v2 api start
|
||||||
|
|
||||||
|
/* 商品列表 V2 */
|
||||||
|
export function $tbProductV2(data) {
|
||||||
|
return http.req('/api/tbProduct/list/v2', {...data,shopId:uni.getStorageSync('shopId')}, 'GET')
|
||||||
|
}
|
||||||
|
/* 耗材与商品绑定关系 */
|
||||||
|
export function $tbProskuConV2(data) {
|
||||||
|
return http.req('/api/tbProskuCon/V2', data, 'POST')
|
||||||
|
}
|
||||||
|
// v2 api end
|
||||||
Reference in New Issue
Block a user