后台接口对接
This commit is contained in:
parent
3a8baa3d81
commit
04d54d172c
|
|
@ -6,9 +6,9 @@ export default {
|
|||
uni.addInterceptor('request', {
|
||||
invoke(args) {
|
||||
// request 触发前拼接 url
|
||||
args.url = 'https://www.opsoul.com' + args.url;
|
||||
// args.url = 'https://www.opsoul.com' + args.url;
|
||||
// args.url = 'http://10.45.137.214:80' + args.url;
|
||||
// args.url = 'http://127.0.0.1:80' + args.url;
|
||||
args.url = 'http://127.0.0.1:80' + args.url;
|
||||
if (args.data) {
|
||||
args.data.deptId = globalData.deptId;
|
||||
args.data.from = globalData.from;
|
||||
|
|
@ -309,18 +309,18 @@ export default {
|
|||
}
|
||||
return resObj;
|
||||
},
|
||||
async qryOrderGoodsPage(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/order/goods/list',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
header: {
|
||||
pageNum: params.pageNum,
|
||||
pageSize: params.pageSize
|
||||
}
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
// async qryOrderGoodsPage(params = {}) {
|
||||
// let res = await uni.request({
|
||||
// url: '/order/goods/list',
|
||||
// method: 'POST',
|
||||
// data: params,
|
||||
// header: {
|
||||
// pageNum: params.pageNum,
|
||||
// pageSize: params.pageSize
|
||||
// }
|
||||
// })
|
||||
// return res[1].data;
|
||||
// },
|
||||
async bindBankCard(params) {
|
||||
let res = await uni.request({
|
||||
url: '/customer/bankcard/bind',
|
||||
|
|
@ -360,5 +360,17 @@ export default {
|
|||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async qryOrderPage(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/order/master/app/list',
|
||||
method: 'POST',
|
||||
data: params,
|
||||
header: {
|
||||
pageNum: params.pageNum,
|
||||
pageSize: params.pageSize
|
||||
}
|
||||
})
|
||||
return res[1].data;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<view class="cu-bar solid-bottom">
|
||||
<view class="action bar-first-action">
|
||||
<text class="cuIcon-shopfill text-main-color"></text>
|
||||
{{shopOrder.shopName}}
|
||||
{{shopOrder.worker.name}}
|
||||
<view>
|
||||
<view class="cuIcon-right"></view>
|
||||
</view>
|
||||
|
|
@ -31,16 +31,16 @@
|
|||
</view>
|
||||
<view class="padding-lr">
|
||||
<view class="margin-top-sm">
|
||||
<product-picked :product="shopOrder.product" :pickedList="shopOrder.product.pickedList">
|
||||
<product-picked :product="shopOrder.orderGoods" :pickedList="shopOrder.orderGoods.pickedList">
|
||||
</product-picked>
|
||||
</view>
|
||||
<view class="flex justify-end align-end padding-bottom-sm">
|
||||
<view class="margin-right-sm"><text>总价</text><text class="text-price text-red">1049.00</text>
|
||||
<view class="margin-right-sm"><text>总价</text><text class="text-price text-red">{{shopOrder.financialMaster.totalMoney}}</text>
|
||||
</view>
|
||||
<view class="margin-right-sm"><text>优惠</text><text class="text-price text-red">50.00</text>
|
||||
<view class="margin-right-sm"><text>优惠</text><text class="text-price text-red">{{shopOrder.financialMaster.discountMoney}}</text>
|
||||
</view>
|
||||
<view class="text-lg"><text>需付款</text><text
|
||||
class="text-price text-red text-lg text-bold">999.00</text></view>
|
||||
class="text-price text-red text-lg text-bold">{{shopOrder.financialMaster.payMoney}}</text></view>
|
||||
</view>
|
||||
<view v-if="orderType === 'servOrder'" class="padding-tb-sm flex justify-end oper-bar">
|
||||
<button v-if="shopOrder.subProcessStatus <= 4 && shopOrder.mainProcess !== 'ordersWait2Serv'"
|
||||
|
|
@ -159,12 +159,23 @@
|
|||
orderType: this.orderType
|
||||
});
|
||||
},
|
||||
reloadOrderPage(params = {}) {
|
||||
this.pageParams = [];
|
||||
for(let i = 0; i < this.tabHeaderList.length; i++) {
|
||||
this.pageParams.push({
|
||||
pageNum: 0
|
||||
});
|
||||
}
|
||||
this.myOrders = [];
|
||||
this.$refs.loadStatusBar.showLoadMore();
|
||||
this.loadOrderPage(params);
|
||||
},
|
||||
async loadOrderPage(params) {
|
||||
params.pageNum = this.pageParams[this.tabCur].pageNum;
|
||||
params.pageSize = this.$globalData.pageSize;
|
||||
params.pageSize = this.$globalData.initPageSize;
|
||||
this.$refs.loadStatusBar.showLoading();
|
||||
try {
|
||||
let res = await this.$request.qryOrderGoodsPage(params);
|
||||
let res = await this.$request.qryOrderPage(params);
|
||||
let rowsLength = res.rows.length;
|
||||
if (rowsLength > 0) {
|
||||
this.myOrders = this.myOrders.concat(res.rows);
|
||||
|
|
@ -183,14 +194,9 @@
|
|||
tabSelect(e) {
|
||||
this.tabCur = e.currentTarget.dataset.id;
|
||||
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
|
||||
this.resetPageData();
|
||||
this.loadOrderPage({
|
||||
this.reloadOrderPage({
|
||||
orderType: this.tabHeaderList[this.tabCur].type
|
||||
});
|
||||
},
|
||||
resetPageData() {
|
||||
this.myOrders = [];
|
||||
this.$refs.loadStatusBar.showLoadMore();
|
||||
})
|
||||
},
|
||||
updateAgreeStatus(status, index) {
|
||||
this.myOrders[index].agreedServTime.customerAgreeStatus = status;
|
||||
|
|
|
|||
Loading…
Reference in New Issue