fix: 配送单页面接口数据对接,去除部分失效接口调用
This commit is contained in:
4
.env
4
.env
@@ -5,8 +5,8 @@ SHOPRO_VERSION=v2.3.0
|
||||
SHOPRO_BASE_URL = http://api.jnmall.zq-hightech.com
|
||||
|
||||
# 后端接口 - 测试环境(通过 process.env.NODE_ENV = development)
|
||||
SHOPRO_DEV_BASE_URL = https://icepacker.52cfzy.com
|
||||
# SHOPRO_DEV_BASE_URL = http://delivery-test.huichibao.com
|
||||
# SHOPRO_DEV_BASE_URL = https://icepacker.52cfzy.com
|
||||
SHOPRO_DEV_BASE_URL = http://delivery-test.huichibao.com
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
||||
SHOPRO_UPLOAD_TYPE=server
|
||||
|
||||
@@ -9,8 +9,10 @@
|
||||
<image class="user-avatar" @tap="sheep.$router.go('/pages/index/user')"
|
||||
:src="driverInfo.avatar || defaultAvatar" mode="cover" />
|
||||
<view class="user-meta">
|
||||
<!-- <text class="user-name">{{ driverInfo.nickName || '骑手姓名' }}</text> -->
|
||||
<text class="user-status" @click="toggleOnline">{{ driverInfo.isOnline ? '在线中' : '离线' }}</text>
|
||||
<!-- <text class="user-status" @click="toggleOnline">{{ driverInfo.isOnline ? '在线中' : '离线' }}</text> -->
|
||||
<text class="user-status">
|
||||
{{ driverInfo.onlineStatus == 0 ? '离线' : (driverInfo.onlineStatus == 1 ? '在线' : '待审核') }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tabs">
|
||||
@@ -48,10 +50,10 @@
|
||||
<view class="address-row">
|
||||
<view class="icon pickup">取</view>
|
||||
<view class="address-content">
|
||||
<text class="address-title">{{ order.pickupAddress }}</text>
|
||||
<text class="address-sub">商家已出餐 · {{ order.pickupNote || '' }}</text>
|
||||
<text class="address-title">{{ order.shopAddress }}</text>
|
||||
<text class="address-sub">商家 · {{ order.shopPhone || '' }}</text>
|
||||
</view>
|
||||
<view class="nav-icon" @click="openMap(order.pickupLat, order.pickupLng, order.pickupAddress)">导航</view>
|
||||
<view class="nav-icon" @click="openMap(order.shopLat, order.shopLng, order.shopAddress)">导航</view>
|
||||
</view>
|
||||
<view class="address-row">
|
||||
<view class="icon deliver">送</view>
|
||||
@@ -62,11 +64,6 @@
|
||||
<view class="nav-icon" @click="openMap(order.deliveryLat, order.deliveryLng, order.deliveryAddress)">导航</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 备注 -->
|
||||
<view class="order-note" v-if="order.note">
|
||||
<text>顾客:{{ order.note }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 操作区 -->
|
||||
@@ -74,9 +71,12 @@
|
||||
<view class="contact" @click="callPhone(order.receiverPhone)">
|
||||
<text>联系</text>
|
||||
</view>
|
||||
<view class="confirm" @click="confirmArrive(order.id)">
|
||||
<view class="confirm" @click="confirmArrive(order.id)" v-if="order.deliveryStatus == 2">
|
||||
<text>确认到店</text>
|
||||
</view>
|
||||
<view class="confirm" @click="confirmPickup(order.id)" v-if="order.deliveryStatus == 3">
|
||||
<text>确认取餐</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -94,6 +94,7 @@ import { ref, computed, onMounted } from 'vue';
|
||||
import sheep from '@/sheep';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import OrderCodePopup from './components/order-code-popup.vue';
|
||||
import DeliveryOrderApi from '@/sheep/api/member/deliveryOrder';
|
||||
|
||||
// 驿站/骑手信息(从 store 获取或 mock)
|
||||
const driverInfo = ref({
|
||||
@@ -107,56 +108,119 @@ const defaultAvatar = 'https://huichibao.oss-cn-guangzhou.aliyuncs.com/1/materia
|
||||
// 页面状态
|
||||
const activeTab = ref('pickup'); // 'pickup' | 'delivering'
|
||||
const listHeight = ref(600);
|
||||
const loading = ref(false);
|
||||
const noMore = ref(false);
|
||||
|
||||
// Mock 订单数据(真实项目应从后端接口拉取 / store)
|
||||
const orders = ref([
|
||||
{
|
||||
id: 1001,
|
||||
type: 'pickup',
|
||||
statusText: '待取货',
|
||||
shopName: '取货点店铺名称',
|
||||
pickupAddress: '广东省广州市天河区学院站荷光路118-121号',
|
||||
pickupLat: 23.1,
|
||||
pickupLng: 113.3,
|
||||
pickupNote: '商家已出餐',
|
||||
deliveryAddress: '广东省广州市天河区华景新城软件园区',
|
||||
deliveryLat: 23.12,
|
||||
deliveryLng: 113.31,
|
||||
receiverName: '张先生',
|
||||
receiverPhone: '13900001234',
|
||||
note: '根据餐量提供餐具'
|
||||
},
|
||||
{
|
||||
id: 1002,
|
||||
type: 'pickup',
|
||||
statusText: '待取货',
|
||||
shopName: '乐易购(学院店)',
|
||||
pickupAddress: '广东省广州市天河区学院站荷光路118--121号',
|
||||
pickupLat: 23.11,
|
||||
pickupLng: 113.32,
|
||||
pickupNote: '',
|
||||
deliveryAddress: '广东省广州市天河区某小区',
|
||||
deliveryLat: 23.13,
|
||||
deliveryLng: 113.33,
|
||||
receiverName: '李女士',
|
||||
receiverPhone: '13900005678',
|
||||
note: ''
|
||||
}
|
||||
]);
|
||||
// 配送单列表数据
|
||||
const orders = ref([]);
|
||||
const pagination = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
});
|
||||
|
||||
// 计算各 tab 数量与过滤列表
|
||||
// deliveryStatus 到页面 type 的映射
|
||||
const statusToTypeMap = {
|
||||
'3': 'pickup', // 骑手待取货 -> 待取货
|
||||
'4': 'delivering', // 配送中待送达交接点 -> 配送中
|
||||
'5': 'delivering', // 配送中送达交接点待分配 -> 配送中
|
||||
'6': 'delivering' // 配送中待送达顾客 -> 配送中
|
||||
};
|
||||
|
||||
// deliveryStatus 状态文本映射
|
||||
const deliveryStatusTextMap = {
|
||||
'-1': '配送异常',
|
||||
'0': '已取消',
|
||||
'1': '待接单',
|
||||
'2': '骑手待到店',
|
||||
'3': '待取货',
|
||||
'4': '待送达交接点',
|
||||
'5': '送达交接点待分配',
|
||||
'6': '待送达顾客',
|
||||
'7': '已完成'
|
||||
};
|
||||
|
||||
// 计算各 tab 数量
|
||||
const pickupCount = computed(() => orders.value.filter(o => o.type === 'pickup').length);
|
||||
const deliveringCount = computed(() => orders.value.filter(o => o.type === 'delivering').length);
|
||||
const filteredOrders = computed(() => {
|
||||
if (activeTab.value === 'pickup') {
|
||||
return orders.value.filter(o => o.type === 'pickup');
|
||||
const filteredOrders = computed(() => orders.value);
|
||||
|
||||
// 加载订单列表数据
|
||||
async function loadOrders(isLoadMore = false) {
|
||||
if (loading.value) return;
|
||||
|
||||
loading.value = true;
|
||||
|
||||
// 根据当前 tab 确定接口参数 status
|
||||
const status = activeTab.value === 'pickup' ? 1 : 2;
|
||||
|
||||
try {
|
||||
const res = await DeliveryOrderApi.getPageByDeliveryManId({
|
||||
pageNo: pagination.value.pageNo,
|
||||
pageSize: pagination.value.pageSize,
|
||||
status: status
|
||||
});
|
||||
|
||||
if (res.code === 0 && res.data) {
|
||||
const records = res.data.records || [];
|
||||
|
||||
// 转换接口数据为页面所需格式
|
||||
const transformedOrders = records.map(item => {
|
||||
const deliveryStatus = String(item.deliveryStatus);
|
||||
return {
|
||||
id: item.id,
|
||||
type: statusToTypeMap[deliveryStatus] || 'pickup',
|
||||
statusText: deliveryStatusTextMap[deliveryStatus] || '未知状态',
|
||||
shopName: item.shopName || '',
|
||||
shopAddress: item.shopAddress || '',
|
||||
shopLat: item.shopLatitude || null,
|
||||
shopLng: item.shopLongitude || null,
|
||||
shopPhone: item.shopPhone || '',
|
||||
shopShipmentStatus: item.shopShipmentStatus,
|
||||
deliveryAddress: item.receiverAddress || '',
|
||||
deliveryLat: item.receiverLatitude || null,
|
||||
deliveryLng: item.receiverLongitude || null,
|
||||
receiverName: item.receiverName || '',
|
||||
receiverPhone: item.receiverPhone || '',
|
||||
deliveryStatus: item.deliveryStatus
|
||||
};
|
||||
});
|
||||
|
||||
if (isLoadMore) {
|
||||
orders.value = [...orders.value, ...transformedOrders];
|
||||
} else {
|
||||
orders.value = transformedOrders;
|
||||
}
|
||||
|
||||
// 更新分页信息
|
||||
pagination.value.total = res.data.total || 0;
|
||||
pagination.value.pageNo = res.data.current || 1;
|
||||
|
||||
// 判断是否还有更多数据
|
||||
noMore.value = orders.value.length >= pagination.value.total;
|
||||
} else {
|
||||
sheep.$helper.toast(res.msg || '加载失败');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载订单列表异常:', error);
|
||||
sheep.$helper.toast('加载失败,请重试');
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
return orders.value.filter(o => o.type === 'delivering');
|
||||
});
|
||||
}
|
||||
|
||||
// 刷新列表
|
||||
function refreshOrders() {
|
||||
pagination.value.pageNo = 1;
|
||||
noMore.value = false;
|
||||
loadOrders(false);
|
||||
}
|
||||
|
||||
// 切换 tab
|
||||
function switchTab(tab) {
|
||||
if (activeTab.value === tab) return;
|
||||
activeTab.value = tab;
|
||||
refreshOrders();
|
||||
}
|
||||
|
||||
// 切换上线/下线(简单 UI 切换,建议接入后端)
|
||||
@@ -165,15 +229,49 @@ function toggleOnline() {
|
||||
sheep.$helper && sheep.$helper.toast && sheep.$helper.toast(driverInfo.value.isOnline ? '已上线' : '已下线');
|
||||
}
|
||||
|
||||
// 确认到店(演示:改变订单状态)
|
||||
function confirmArrive(orderId) {
|
||||
// 确认到店
|
||||
async function confirmArrive(orderId) {
|
||||
const order = orders.value.find(o => o.id === orderId);
|
||||
if (!order) return;
|
||||
// 示例逻辑:到店后将类型改为 delivering
|
||||
if (order.type === 'pickup') {
|
||||
order.type = 'delivering';
|
||||
order.statusText = '配送中';
|
||||
sheep.$helper && sheep.$helper.toast && sheep.$helper.toast('已确认到店,开始配送');
|
||||
|
||||
if (order.type !== 'pickup') return;
|
||||
|
||||
try {
|
||||
const res = await DeliveryOrderApi.riderConfirmArrival(orderId);
|
||||
if (res.code === 0 && res.data === true) {
|
||||
// 接口返回成功,更新本地订单状态
|
||||
order.type = 'delivering';
|
||||
order.statusText = '配送中';
|
||||
order.deliveryStatus = 4; // 状态更新为待送达交接点
|
||||
sheep.$helper.toast('已确认到店,开始配送');
|
||||
} else {
|
||||
sheep.$helper.toast(res.msg || '确认到店失败');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('确认到店异常:', error);
|
||||
sheep.$helper.toast('操作异常,请重试');
|
||||
}
|
||||
}
|
||||
|
||||
// 确认取餐
|
||||
async function confirmPickup(orderId) {
|
||||
const order = orders.value.find(o => o.id === orderId);
|
||||
if (!order) return;
|
||||
|
||||
try {
|
||||
const res = await DeliveryOrderApi.riderConfirmPickup(orderId);
|
||||
if (res.code === 0 && res.data === true) {
|
||||
// 接口返回成功,更新本地订单状态为配送中
|
||||
order.type = 'delivering';
|
||||
order.statusText = '配送中';
|
||||
order.deliveryStatus = 4; // 状态更新为待送达交接点
|
||||
sheep.$helper.toast('已确认取餐,开始配送');
|
||||
} else {
|
||||
sheep.$helper.toast(res.msg || '确认取餐失败');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('确认取餐异常:', error);
|
||||
sheep.$helper.toast('操作异常,请重试');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,6 +360,8 @@ onMounted(() => {
|
||||
onShow(() => {
|
||||
// 每次页面显示时重新计算(兼容热更或状态变化)
|
||||
setHeaderSafeArea();
|
||||
// 加载订单列表
|
||||
refreshOrders();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@@ -6,9 +6,13 @@
|
||||
<view class="header-inner">
|
||||
<image class="avatar" :src="userInfo.avatar || defautAvatar" @tap="sheep.$router.go('/pages/user/info')"></image>
|
||||
<view class="user-meta" v-if="userInfo.nickname">
|
||||
<view class="user-name">{{ userInfo.nickname + `(${userInfo.mobile})` }}</view>
|
||||
<!-- <view class="user-name">{{ userInfo.nickname + `(${userInfo.mobile})` }}</view> -->
|
||||
<view class="user-name">{{ userInfo.nickname }}</view>
|
||||
<view class="user-status" @click="handleStatusToggle">
|
||||
{{ userInfo.isOnline ? '在线' : '离线' }}<uni-icons style="margin-left:10rpx;" type="right" size="13" color="#fff"></uni-icons>
|
||||
<text>
|
||||
{{ userInfo.onlineStatus == 0 ? '离线' : (userInfo.onlineStatus == 1 ? '在线' : '待审核') }}
|
||||
</text>
|
||||
<uni-icons style="margin-left:10rpx;" type="right" size="13" color="#fff"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="user-meta" v-else>
|
||||
@@ -88,14 +92,13 @@
|
||||
import {
|
||||
showAuthModal,
|
||||
} from '@/sheep/hooks/useModal';
|
||||
import DeliveryApi from '@/sheep/api/member/delivery';
|
||||
|
||||
// 现有 store / 模板数据
|
||||
const template = computed(() => sheep.$store('app').template.user);
|
||||
const isLogin = computed(() => sheep.$store('user').isLogin);
|
||||
const userInfo = computed(() => sheep.$store('user').userInfo);
|
||||
|
||||
const todayIncome = ref(0);
|
||||
const todayOrders = ref(0);
|
||||
const showBind = ref(false);
|
||||
// 动态 header 内联样式,用于兼容不同平台的状态栏高度
|
||||
const headerStyle = ref({});
|
||||
@@ -124,9 +127,6 @@
|
||||
onShow(async () => {
|
||||
const data = userInfo.value;
|
||||
if (data) {
|
||||
// 兼容后端字段名,优先使用 data.todayIncome / data.income / placeholder
|
||||
todayIncome.value = data.todayIncome ?? data.income ?? 137.9;
|
||||
todayOrders.value = data.todayOrders ?? data.orders ?? 39;
|
||||
if (data?.status == 1) {
|
||||
console.log("清空缓存");
|
||||
uni.clearStorageSync();
|
||||
@@ -161,25 +161,30 @@
|
||||
|
||||
// 点击状态:根据当前状态弹不同的确认框
|
||||
function handleStatusToggle() {
|
||||
if (userInfo.value.isOnline) {
|
||||
const status = userInfo.value.onlineStatus;
|
||||
|
||||
// 在线状态(1) -> 申请离线
|
||||
if (status === 1) {
|
||||
confirmType.value = 'offline';
|
||||
modalTitle.value = '确认下线?';
|
||||
modalMsg.value = '下线需平台进行核准\n此时正常接单请留意核准信息';
|
||||
modalTitle.value = '确认申请离线?';
|
||||
modalMsg.value = '离线需平台进行核准\n此时无法接单,请留意核准信息';
|
||||
showStatusPopup.value = true;
|
||||
return;
|
||||
}
|
||||
// 如果被禁止接单
|
||||
if (isUserForbidden()) {
|
||||
confirmType.value = 'forbidden';
|
||||
modalTitle.value = '您处于禁止接单状态';
|
||||
modalMsg.value = '暂无法上线上线';
|
||||
|
||||
// 待审核状态(2) -> 提示等待
|
||||
if (status === 2) {
|
||||
confirmType.value = 'pending';
|
||||
modalTitle.value = '等待平台审核';
|
||||
modalMsg.value = '您的申请正在审核中\n请留意审核结果';
|
||||
showStatusPopup.value = true;
|
||||
return;
|
||||
}
|
||||
// 普通从离线 -> 上线
|
||||
|
||||
// 离线状态(0) -> 申请上线
|
||||
confirmType.value = 'online';
|
||||
modalTitle.value = '确认上线?';
|
||||
modalMsg.value = '';
|
||||
modalMsg.value = '上线后即可开始接单';
|
||||
showStatusPopup.value = true;
|
||||
}
|
||||
|
||||
@@ -190,19 +195,34 @@
|
||||
async function confirmAction() {
|
||||
const type = confirmType.value;
|
||||
showStatusPopup.value = false;
|
||||
if (type === 'online') {
|
||||
// TODO: 调用后端接口变更上线状态
|
||||
userInfo.value.isOnline = true;
|
||||
sheep.$helper && sheep.$helper.toast && sheep.$helper.toast('已上线');
|
||||
} else if (type === 'offline') {
|
||||
userInfo.value.isOnline = false;
|
||||
sheep.$helper && sheep.$helper.toast && sheep.$helper.toast('已下线');
|
||||
} else if (type === 'forbidden') {
|
||||
// 仅展示信息,无操作
|
||||
sheep.$helper && sheep.$helper.toast && sheep.$helper.toast('无法上线(禁止接单)');
|
||||
|
||||
try {
|
||||
if (type === 'online') {
|
||||
// 调用后端接口变更上线状态
|
||||
const res = await DeliveryApi.postOnline();
|
||||
if (res.code === 0) {
|
||||
userInfo.value.onlineStatus = 2; // 变为待审核状态
|
||||
sheep.$helper.toast('已提交上线申请,请等待平台核准');
|
||||
} else {
|
||||
sheep.$helper.toast(res.msg || '上线申请失败');
|
||||
}
|
||||
} else if (type === 'offline') {
|
||||
// 调用后端接口申请离线
|
||||
const res = await DeliveryApi.offlineApply();
|
||||
if (res.code === 0) {
|
||||
userInfo.value.onlineStatus = 0; // 变为离线状态
|
||||
sheep.$helper.toast('已提交离线申请,请等待平台核准');
|
||||
} else {
|
||||
sheep.$helper.toast(res.msg || '离线申请失败');
|
||||
}
|
||||
} else if (type === 'pending') {
|
||||
// 待审核状态,仅提示
|
||||
sheep.$helper.toast('请等待平台审核');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('上下线操作异常:', error);
|
||||
sheep.$helper.toast('操作异常,请重试');
|
||||
}
|
||||
// 可在此处调用 store 或 API 同步服务端状态,例如:
|
||||
// await sheep.$store('user').setOnline(user.value.isOnline);
|
||||
}
|
||||
|
||||
onPullDownRefresh(() => {
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<view class="map-area">
|
||||
<!-- 真实项目建议使用 <map> 并渲染 polyline/markers -->
|
||||
<image class="map-image" src="/static/img/map-placeholder.png" mode="widthFix" v-if="!mapAvailable" />
|
||||
<map v-else class="map-native" :latitude="order?.pickupLat" :longitude="order?.pickupLng" show-location enable-3D
|
||||
enable-zoom :scale="16"></map>
|
||||
<map v-else class="map-native" :latitude="order?.pickupLat" :longitude="order?.pickupLng" show-location
|
||||
enable-3D enable-zoom :scale="16"></map>
|
||||
<view class="map-overlay">
|
||||
<view class="eta">距离商家{{ distanceText }},预计{{ etaText }}到达</view>
|
||||
<view class="nav-btn" @click="navigateToShop">导航到商家</view>
|
||||
@@ -82,7 +82,7 @@
|
||||
<view class="btn confirm" @click="confirmArrive">确认到店</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 催单弹框(uView Plus up-popup) -->
|
||||
<!-- 催单弹框 -->
|
||||
<up-popup v-model:show="showRemind" mode="bottom" :closeable="false" border-radius="12">
|
||||
<view class="remind-popup">
|
||||
<view class="remind-row" @click="callShopPhone">
|
||||
@@ -229,7 +229,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
// 催单弹框控制(使用 uView Plus 的 up-popup)
|
||||
// 催单弹框控制
|
||||
const showRemind = ref(false);
|
||||
|
||||
function openRemindPopup() {
|
||||
@@ -292,11 +292,9 @@
|
||||
url: `/pages/order/handoverRecord?orderId=${orderId.value}`
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.order-detail-page {
|
||||
// background: #fff;
|
||||
background: #f7f7f7;
|
||||
|
||||
22
sheep/api/member/delivery.js
Normal file
22
sheep/api/member/delivery.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import request from '@/sheep/request';
|
||||
|
||||
const DeliveryApi = {
|
||||
// 骑手上线
|
||||
postOnline: () => {
|
||||
return request({
|
||||
url: '/onlineStatus/online',
|
||||
method: 'POST'
|
||||
});
|
||||
},
|
||||
|
||||
// 骑手申请离线
|
||||
offlineApply: () => {
|
||||
return request({
|
||||
url: '/onlineStatus/offline/apply',
|
||||
method: 'POST'
|
||||
});
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
export default DeliveryApi;
|
||||
65
sheep/api/member/deliveryOrder.js
Normal file
65
sheep/api/member/deliveryOrder.js
Normal file
@@ -0,0 +1,65 @@
|
||||
import request from '@/sheep/request';
|
||||
|
||||
const DeliveryOrderApi = {
|
||||
// 分页获取当前配送员负责的配送单
|
||||
getPageByDeliveryManId: (data) => {
|
||||
return request({
|
||||
url: '/deliveryOrder/getPageByDeliveryManId',
|
||||
method: 'POST',
|
||||
data
|
||||
});
|
||||
},
|
||||
|
||||
// 当前配送员确认到店
|
||||
riderConfirmArrival: (id) => {
|
||||
return request({
|
||||
url: `/deliveryOrder/riderConfirmArrival/${id}`,
|
||||
method: 'POST',
|
||||
});
|
||||
},
|
||||
|
||||
// 当前配送员确认取餐
|
||||
riderConfirmPickup: (id) => {
|
||||
return request({
|
||||
url: `/deliveryOrder/riderConfirmPickup/${id}`,
|
||||
method: 'POST',
|
||||
});
|
||||
},
|
||||
|
||||
// 当前配送员送达交接点
|
||||
riderDeliveryHandover: (id) => {
|
||||
return request({
|
||||
url: `/deliveryOrder/riderDeliveryHandover/${id}`,
|
||||
method: 'POST',
|
||||
});
|
||||
},
|
||||
|
||||
// 批量送达交接点
|
||||
riderDeliveryHandoverBatch: (data) => {
|
||||
return request({
|
||||
url: `/deliveryOrder/riderDeliveryHandoverBatch`,
|
||||
method: 'POST',
|
||||
params: data
|
||||
});
|
||||
},
|
||||
|
||||
// 当前配送员确认交接
|
||||
riderConfirmHandover: (data) => {
|
||||
return request({
|
||||
url: `/deliveryOrder/riderConfirmHandover`,
|
||||
method: 'POST',
|
||||
data
|
||||
});
|
||||
},
|
||||
|
||||
// 当前配送员确认送达顾客
|
||||
riderConfirmDelivery: (id) => {
|
||||
return request({
|
||||
url: `/deliveryOrder/riderConfirmDelivery/${id}`,
|
||||
method: 'POST',
|
||||
});
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
export default DeliveryOrderApi;
|
||||
@@ -18,8 +18,8 @@
|
||||
labelWidth="140"
|
||||
labelAlign="center"
|
||||
>
|
||||
<uni-forms-item name="mobile" label="账号">
|
||||
<uni-easyinput placeholder="请输入手机号" v-model="state.model.mobile" :inputBorder="false">
|
||||
<uni-forms-item name="username" label="账号">
|
||||
<uni-easyinput placeholder="请输入手机号" v-model="state.model.username" :inputBorder="false">
|
||||
<template v-slot:right>
|
||||
<button class="ss-reset-button forgot-btn" @tap="showAuthModal('resetPassword')">
|
||||
忘记密码
|
||||
|
||||
@@ -9,7 +9,7 @@ let subscribeEventList = [];
|
||||
// 加载微信小程序
|
||||
function load() {
|
||||
checkUpdate();
|
||||
getSubscribeTemplate();
|
||||
// getSubscribeTemplate();
|
||||
}
|
||||
|
||||
// 微信小程序静默授权登陆
|
||||
|
||||
@@ -55,12 +55,12 @@ const app = defineStore({
|
||||
}
|
||||
|
||||
// 加载装修配置
|
||||
await adaptTemplate(this.template, templateId);
|
||||
// await adaptTemplate(this.template, templateId);
|
||||
|
||||
// TODO 芋艿:未来支持管理后台可配;对应 https://api.shopro.sheepjs.com/shop/api/init
|
||||
if (true) {
|
||||
this.info = {
|
||||
name: '云南江楠商城',
|
||||
name: '惠吃宝骑手端',
|
||||
// logo: 'https://static.iocoder.cn/ruoyi-vue-pro-logo.png',
|
||||
logo: 'http://api.jnmall.zq-hightech.com/admin-api/infra/file/29/get/4afd6199c4dae91669abf0e67bbb4e6cf07b7849458ed8aa9a6db2a78c5400a8.png',
|
||||
version: '1.0.0',
|
||||
|
||||
@@ -116,8 +116,8 @@ const user = defineStore({
|
||||
|
||||
// 获取最新信息
|
||||
await this.getInfo();
|
||||
this.getWallet();
|
||||
this.getNumData();
|
||||
// this.getWallet();
|
||||
// this.getNumData();
|
||||
return this.userInfo;
|
||||
},
|
||||
|
||||
@@ -130,7 +130,7 @@ const user = defineStore({
|
||||
this.userWallet = clone(defaultUserWallet);
|
||||
this.numData = cloneDeep(defaultNumData);
|
||||
// 清空购物车的缓存
|
||||
cart().emptyList();
|
||||
// cart().emptyList();
|
||||
},
|
||||
|
||||
// 登录后,加载各种信息
|
||||
@@ -139,7 +139,7 @@ const user = defineStore({
|
||||
await this.updateUserData();
|
||||
|
||||
// 加载购物车
|
||||
cart().getList();
|
||||
// cart().getList();
|
||||
// 登录后设置全局分享参数
|
||||
$share.getShareInfo();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user