接口问题修改
parent
c130597e95
commit
a97ed0c3f6
9
im/.env
9
im/.env
|
@ -3,9 +3,8 @@ VUE_APP_PREVIEW=false
|
|||
VUE_APP_API_BASE_URL=https://im-api.pickmall.cn
|
||||
VUE_APP_WEB_SOCKET_URL=wss://im-api.pickmall.cn/lili/webSocket
|
||||
VUE_APP_COMMON=https://common-api.pickmall.cn
|
||||
VUE_APP_BUYER=https://buyer-api.pickmall.cn
|
||||
VUE_APP_SELLER=https://seller-api.pickmall.cn
|
||||
VUE_APP_WEBSITE_NAME="LiLi IM"
|
||||
VUE_APP_PC_ORDER_URL=https://pc-b2b2c.pickmall.cn/
|
||||
VUE_APP_PC_STORE_ORDER_URL=https://store-b2b2c.pickmall.cn/
|
||||
VUE_APP_PC_STORE_ORDER=https://store-b2b2c.pickmall.cn/
|
||||
VUE_APP_PC_USER_ORDER=https://pc-b2b2c.pickmall.cn
|
||||
VUE_APP_PC_STORE_GOODS=https://store-b2b2c.pickmall.cn/
|
||||
VUE_APP_PC_URL=https://pc-b2b2c.pickmall.cn/
|
||||
VUE_APP_PC_STORE=https://store-b2b2c.pickmall.cn/
|
|
@ -3,9 +3,8 @@ VUE_APP_PREVIEW=false
|
|||
VUE_APP_API_BASE_URL=https://im-api.pickmall.cn
|
||||
VUE_APP_WEB_SOCKET_URL=wss://im-api.pickmall.cn/lili/webSocket
|
||||
VUE_APP_COMMON=https://common-api.pickmall.cn
|
||||
VUE_APP_BUYER=https://buyer-api.pickmall.cn
|
||||
VUE_APP_SELLER=https://seller-api.pickmall.cn
|
||||
VUE_APP_WEBSITE_NAME="LiLi IM"
|
||||
VUE_APP_PC_ORDER_URL=https://pc-b2b2c.pickmall.cn/
|
||||
VUE_APP_PC_STORE_ORDER_URL=https://store-b2b2c.pickmall.cn/
|
||||
VUE_APP_PC_STORE_ORDER=https://store-b2b2c.pickmall.cn/
|
||||
VUE_APP_PC_USER_ORDER=https://pc-b2b2c.pickmall.cn
|
||||
VUE_APP_PC_STORE_GOODS=https://store-b2b2c.pickmall.cn/
|
||||
VUE_APP_PC_URL=https://pc-b2b2c.pickmall.cn/
|
||||
VUE_APP_PC_STORE=https://store-b2b2c.pickmall.cn/
|
|
@ -1,30 +1,47 @@
|
|||
import { get } from "@/utils/request";
|
||||
import config from "@/config/config";
|
||||
|
||||
// 获取用户相关设置信息
|
||||
export const ServeGetUserSetting = () => {
|
||||
return get("/im/user");
|
||||
return get(`${config.BASE_BUYER}/buyer/passport/member`);
|
||||
};
|
||||
|
||||
// 获取店铺相关设置信息
|
||||
export const ServeGetStoreSetting = () => {
|
||||
return get("/im/user/store");
|
||||
return get(`${config.BASE_SELLER}/store/member/user`);
|
||||
};
|
||||
|
||||
// 获取用户相关设置信息
|
||||
export const ServeGetUserDetail = (memberId) => {
|
||||
return get(`/im/user/${memberId}`);
|
||||
return get(`${config.BASE_SELLER}/store/passport/member/${memberId}`);
|
||||
};
|
||||
|
||||
// 获取店铺相关设置信息
|
||||
export const ServeGetStoreDetail = (storeId) => {
|
||||
return get(`/im/user/store/${storeId}`);
|
||||
return get(`${config.BASE_BUYER}/buyer/store/store/store/${storeId}`);
|
||||
};
|
||||
|
||||
// 获取店铺相关设置信息
|
||||
// 获取用户历史足迹
|
||||
export const ServeGetFootPrint = (params) => {
|
||||
return get(`/im/user/history`,params);
|
||||
return get(`${config.BASE_BUYER}/buyer/member/footprint`,params);
|
||||
};
|
||||
// 获取订单列表信息
|
||||
|
||||
// 商家获取用户历史足迹
|
||||
export const ServeStoreGetFootPrint = (params) => {
|
||||
return get(`${config.BASE_SELLER}/store/member/footprint`,params);
|
||||
};
|
||||
|
||||
// 获取用户订单列表信息
|
||||
export const ServeGetOrderPrint = (params) => {
|
||||
return get(`/im/orders/orders`,params);
|
||||
return get(`${config.BASE_BUYER}/buyer/order/order`,params);
|
||||
};
|
||||
|
||||
// 商家获取用户订单列表信息
|
||||
export const ServeStoreGetOrderPrint = (params) => {
|
||||
return get(`${config.BASE_SELLER}/store/order/order`,params);
|
||||
};
|
||||
|
||||
// 获取商品信息
|
||||
export const ServeGetGoodsDetail = (data) => {
|
||||
return get(`${config.BASE_BUYER}/buyer/goods/goods/sku/${data.goodsId}/${data.skuId}`);
|
||||
};
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
|
||||
<script>
|
||||
import { Tabs, TabPane } from 'element-ui'
|
||||
import { ServeGetStoreDetail, ServeGetUserDetail, ServeGetFootPrint, ServeGetOrderPrint } from '@/api/user'
|
||||
import { ServeGetGoodsDetail } from '@/api/goods'
|
||||
import { ServeGetStoreDetail, ServeGetUserDetail, ServeGetFootPrint, ServeGetOrderPrint, ServeGetGoodsDetail, ServeStoreGetFootPrint,ServeStoreGetOrderPrint } from '@/api/user'
|
||||
import StoreDetail from "@/components/chat/panel/template/storeDetail.vue";
|
||||
import FootPrint from "@/components/chat/panel/template/footPrint.vue";
|
||||
import GoodsLink from "@/components/chat/panel/template/goodsLink.vue";
|
||||
|
@ -103,46 +102,70 @@ export default {
|
|||
})
|
||||
},
|
||||
getGoodsDetail () {
|
||||
ServeGetGoodsDetail(this.goodsParams).then(res => {
|
||||
if (res.success) {
|
||||
this.goodsDetail = res.result.data
|
||||
}
|
||||
})
|
||||
if(this.toUser.storeFlag){
|
||||
ServeGetGoodsDetail(this.goodsParams).then(res => {
|
||||
if (res.success) {
|
||||
this.goodsDetail = res.result.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
getFootPrint () {
|
||||
getFootPrint() {
|
||||
if (this.toUser.storeFlag) {
|
||||
this.footPrintParams.memberId = this.id
|
||||
this.footPrintParams.storeId = this.toUser.userId
|
||||
ServeGetFootPrint(this.footPrintParams).then(res => {
|
||||
res.result.records.forEach((item, index) => {
|
||||
if (localStorage.getItem(item.goodsId)) {
|
||||
item.btnHide = 0
|
||||
} else {
|
||||
item.btnHide = 1
|
||||
}
|
||||
if (item.goodsId === this.goodsParams.goodsId) {
|
||||
res.result.records.splice(index, 1)
|
||||
}
|
||||
});
|
||||
this.footPrintList.push(...res.result.records)
|
||||
})
|
||||
|
||||
// 订单列表
|
||||
ServeGetOrderPrint(this.footPrintParams).then((res) => {
|
||||
if (res.code == 200) {
|
||||
res.result.records.forEach((item) => {
|
||||
this.orderPrintList.push({
|
||||
...item,
|
||||
btnHide: 1
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.footPrintParams.memberId = this.toUser.userId
|
||||
this.footPrintParams.storeId = this.id
|
||||
}
|
||||
ServeGetFootPrint(this.footPrintParams).then(res => {
|
||||
res.result.records.forEach((item, index) => {
|
||||
if (localStorage.getItem(item.goodsId)) {
|
||||
item.btnHide = 0
|
||||
} else {
|
||||
item.btnHide = 1
|
||||
}
|
||||
if (item.goodsId === this.goodsParams.goodsId) {
|
||||
res.result.records.splice(index, 1)
|
||||
}
|
||||
});
|
||||
this.footPrintList.push(...res.result.records)
|
||||
})
|
||||
// 订单列表
|
||||
ServeGetOrderPrint(this.footPrintParams).then((res) => {
|
||||
if (res.code == 200) {
|
||||
res.result.records.forEach((item) => {
|
||||
this.orderPrintList.push({
|
||||
...item,
|
||||
btnHide: 1
|
||||
ServeStoreGetFootPrint(this.footPrintParams).then(res => {
|
||||
res.result.records.forEach((item, index) => {
|
||||
if (localStorage.getItem(item.goodsId)) {
|
||||
item.btnHide = 0
|
||||
} else {
|
||||
item.btnHide = 1
|
||||
}
|
||||
if (item.goodsId === this.goodsParams.goodsId) {
|
||||
res.result.records.splice(index, 1)
|
||||
}
|
||||
});
|
||||
this.footPrintList.push(...res.result.records)
|
||||
})
|
||||
ServeStoreGetOrderPrint(this.footPrintParams).then((res) => {
|
||||
if (res.code == 200) {
|
||||
res.result.records.forEach((item) => {
|
||||
this.orderPrintList.push({
|
||||
...item,
|
||||
btnHide: 1
|
||||
})
|
||||
})
|
||||
})
|
||||
// this.orderPrintList.push(...res.result.records)
|
||||
}
|
||||
})
|
||||
console.log("this.orderPrintListthis.orderPrintList", this.orderPrintList);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 发送消息回调事件
|
||||
|
|
|
@ -514,7 +514,8 @@ export default {
|
|||
? (this.loadRecord.status = 1)
|
||||
: (this.loadRecord.status = 2);
|
||||
this.$nextTick(() => {
|
||||
if (data.record_id == 0 || !data.record_id) {
|
||||
// if (data.record_id == 0 || !data.record_id) {
|
||||
if (data.record_id == 0 || data.pageNumber == 1) {
|
||||
el.scrollTop = el.scrollHeight
|
||||
} else {
|
||||
el.scrollTop = el.scrollHeight - scrollHeight
|
||||
|
|
|
@ -3,9 +3,9 @@ export default {
|
|||
BASE_API_URL: process.env.VUE_APP_API_BASE_URL || "",
|
||||
BASE_WS_URL: process.env.VUE_APP_WEB_SOCKET_URL || "",
|
||||
BASE_COMMON: process.env.VUE_APP_COMMON || "",
|
||||
BASE_BUYER: process.env.VUE_APP_BUYER || "",
|
||||
BASE_SELLER: process.env.VUE_APP_SELLER || "",
|
||||
PC_URL: process.env.VUE_APP_PC_URL || "https://pc-b2b2c.pickmall.cn",
|
||||
STORE_URL: process.env.VUE_APP_PC_ORDER_URL || "http://192.168.0.139:8000/",
|
||||
PC_STORE_GOODS: process.env.VUE_APP_PC_STORE_ORDER_URL || '',
|
||||
PC_STORE_ORDER: process.env.VUE_APP_PC_STORE_ORDER || '',
|
||||
PC_STORE: process.env.VUE_APP_PC_STORE || '',
|
||||
PC_USER_ORDER: process.env.VUE_APP_PC_USER_ORDER || '',
|
||||
};
|
||||
|
|
|
@ -26,7 +26,7 @@ Vue.component('face-null', faceNull)
|
|||
|
||||
Vue.prototype.linkToGoods = function (goodsId, skuId) { // 跳转买家端商品
|
||||
if (localStorage.getItem('storeFlag') == 'false') {
|
||||
window.open(`${config.PC_STORE_GOODS}goods-operation-edit?id=${goodsId}`, '_blank')
|
||||
window.open(`${config.PC_STORE}goods-operation-edit?id=${goodsId}`, '_blank')
|
||||
} else {
|
||||
window.open(`${config.PC_URL}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`, '_blank')
|
||||
}
|
||||
|
@ -39,10 +39,10 @@ Vue.prototype.linkToStore = function (storeId) { // 跳转商家端商品
|
|||
Vue.prototype.linkToOrders = function (sn) {
|
||||
if (localStorage.getItem('storeFlag') == 'false') {
|
||||
// 商家
|
||||
window.open(`${config.PC_STORE_GOODS}order-detail?sn=${sn}`, '_blank')
|
||||
window.open(`${config.PC_STORE}order-detail?sn=${sn}`, '_blank')
|
||||
} else {
|
||||
// 用户
|
||||
window.open(`${config.STORE_URL}/OrderDetail?sn=${sn}`, '_blank')
|
||||
window.open(`${config.PC_URL}/OrderDetail?sn=${sn}`, '_blank')
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue