Commit 94e35554 authored by 周俊涛(东信)'s avatar 周俊涛(东信)
parents e430bb13 426291f3
...@@ -10,16 +10,17 @@ ...@@ -10,16 +10,17 @@
> >
{{ item.startDate }} {{ item.startDate }}
</li> </li>
<wd-calendar use-default-slot v-model="value" @confirm="handleConfirm4"> <wd-calendar use-default-slot v-model="value" @confirm="handleConfirm">
<li>选择日期</li> <li @tap="selectItem(index, item)">选择日期</li>
</wd-calendar> </wd-calendar>
</ul> </ul>
</view> </view>
</template> </template>
<script setup> <script setup>
import { defineProps, onMounted } from 'vue'; import { defineProps, onMounted, ref } from 'vue';
import { getStartDate } from '@/api/assistingAgriculture/village'; import { getStartDate } from '@/api/assistingAgriculture/village';
const selectedItem = ref(null); const selectedItem = ref(null);
const emit = defineEmits(['dataParams']); const emit = defineEmits(['dataParams']);
const dataList = ref([]); const dataList = ref([]);
...@@ -35,21 +36,33 @@ const props = defineProps({ ...@@ -35,21 +36,33 @@ const props = defineProps({
default: '100%', default: '100%',
}, },
}); });
onMounted(async () => { onMounted(async () => {
getStartDateList(); getStartDateList();
}); });
const selectItem = (index, item) => { const selectItem = (index, item) => {
console.log(item, 323);
const datePart = timestampToDateBasic(value.value);
selectedItem.value = index; selectedItem.value = index;
emit('dataParams', item); emit('dataParams', item, datePart);
console.log(datePart, 'datePart');
}; };
// 查询出发日期
const getStartDateList = () => { const getStartDateList = () => {
getStartDate(params).then((res) => { getStartDate(params).then((res) => {
dataList.value = res.data; dataList.value = res.data;
}); });
}; };
function handleConfirm4({ value }) { function handleConfirm({ value }) {
formatValue.value = new Date(value).toString(); const datePart = timestampToDateBasic(value);
console.log(datePart, 'datePart---111');
selectItem(undefined, undefined);
}
function timestampToDateBasic(timestamp) {
const date = new Date(timestamp);
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
return `${year}/${month}/${day}`;
} }
</script> </script>
......
...@@ -20,7 +20,7 @@ export async function updateAddress(data) { ...@@ -20,7 +20,7 @@ export async function updateAddress(data) {
export async function deleteAddress(addrId) { export async function deleteAddress(addrId) {
return request({ return request({
url: `/sgyrdd/useraddr/delete/${addrId}`, url: `/sgyrdd/useraddr/delete/${addrId}`,
method: 'GET', method: 'POST',
}); });
} }
// 查询收货地址列表 // 查询收货地址列表
......
...@@ -64,3 +64,10 @@ export function getItinerary(data) { ...@@ -64,3 +64,10 @@ export function getItinerary(data) {
data, data,
}); });
} }
// 店铺信息
export function getStoreInformation(data) {
return request({
url: `/sgyrdd/shop/getById?shopId=${data}`,
method: 'GET',
});
}
...@@ -87,6 +87,8 @@ export function evaluation(data) { ...@@ -87,6 +87,8 @@ export function evaluation(data) {
data, data,
}); });
} }
// 查询售后详情
export function afterSale(data) { export function afterSale(data) {
return request({ return request({
url: '/sgyrdd/sgyOrder/afterSales/getInfo', url: '/sgyrdd/sgyOrder/afterSales/getInfo',
...@@ -94,3 +96,21 @@ export function afterSale(data) { ...@@ -94,3 +96,21 @@ export function afterSale(data) {
data, data,
}); });
} }
// 查询物流轨迹
export function getLogistics(data) {
return request({
url: '/sgyrdd/sgyOrder/logistics/logistics',
method: 'POST',
data,
});
}
// 查询物流轨迹含地图
export function getLogisticsMap(data) {
return request({
url: '/sgyrdd/sgyOrder/logistics/logisticsMap',
method: 'GET',
data,
});
}
import { request } from '../utils/request';
// 查询商家相册列表
export function getPhoto(data) {
return request({
url: `/sgyrdd/photo/getPhoto`,
method: 'GET',
data,
});
}
...@@ -79,9 +79,11 @@ const forMData = ref({ ...@@ -79,9 +79,11 @@ const forMData = ref({
lat: '', lat: '',
commonAddr: false, commonAddr: false,
}); });
const content = ref([]);
onLoad((options) => { onLoad((options) => {
newAddressFlag.value = options.new; newAddressFlag.value = options.new;
content.value = JSON.parse(options.content);
forMData.value = content.value;
}); });
function fieldNotEmpty(val) { function fieldNotEmpty(val) {
...@@ -93,12 +95,22 @@ function fieldNotEmpty(val) { ...@@ -93,12 +95,22 @@ function fieldNotEmpty(val) {
} }
const hdSubmit = async () => { const hdSubmit = async () => {
await addAddress({ if (!content.value.addrId) {
...forMData.value, await addAddress({
commonAddr: forMData.value.commonAddr ? 1 : 0, ...forMData.value,
province: forMData.value.province, commonAddr: forMData.value.commonAddr ? 1 : 0,
city: forMData.value.city, province: forMData.value.province,
area: forMData.value.area, city: forMData.value.city,
area: forMData.value.area,
});
} else {
await updateAddress({
...forMData.value,
commonAddr: forMData.value.commonAddr ? 1 : 0,
});
}
uni.navigateTo({
url: '/pages/address/addressList',
}); });
}; };
function handleSubmit() { function handleSubmit() {
...@@ -126,7 +138,6 @@ async function changeLocation() { ...@@ -126,7 +138,6 @@ async function changeLocation() {
forMData.value.addr = res.address; forMData.value.addr = res.address;
forMData.value.lng = res.longitude; forMData.value.lng = res.longitude;
forMData.value.lat = res.latitude; forMData.value.lat = res.latitude;
console.log('位置信息:' + JSON.stringify(res));
uni.request({ uni.request({
url: '/ws/geocoder/v1/', url: '/ws/geocoder/v1/',
data: { data: {
......
...@@ -9,29 +9,31 @@ ...@@ -9,29 +9,31 @@
</view> </view>
<view class="full_list" v-else> <view class="full_list" v-else>
<view class="additem" v-for="(item, index) in addressList" :key="index"> <wd-swipe-action>
<view class="additem_l"> <view class="additem" v-for="(item, index) in addressList" :key="index">
<view class="address">{{ item.addr }}</view> <view class="additem_l">
<view class="info"> <view class="address">{{ item.addr }}</view>
<view class="name">{{ item.receiver }}</view> <view class="info">
<view class="phone">{{ item.mobile }}</view> <view class="name">{{ item.receiver }}</view>
</view> <view class="phone">{{ item.mobile }}</view>
<view class="address_status">
<view v-if="item.commonAddr === 1" class="box active">
<wd-icon name="check-circle-filled" size="12px"></wd-icon>
<view class="txt">默认</view>
</view> </view>
<view class="address_status">
<view v-else class="box"> <view v-if="item.commonAddr === 1" class="box active">
<wd-icon name="circle1" size="12px"></wd-icon> <wd-icon name="check-circle-filled" size="12px"></wd-icon>
<view class="txt">默认</view> <view class="txt">默认</view>
</view>
<view v-else class="box" @click="deleteAdd(item.addrId)">
<wd-icon name="circle1" size="12px"></wd-icon>
<view class="txt">删除</view>
</view>
</view> </view>
</view> </view>
<view class="additem_r">
<wd-icon name="edit-outline" size="14px" @tap="editAddress(item)"></wd-icon>
</view>
</view> </view>
<view class="additem_r"> </wd-swipe-action>
<wd-icon name="edit-outline" size="14px" @tap="editAddress"></wd-icon>
</view>
</view>
<wd-button type="error" block class="addBtn" @tap="addNewAddress">新增地址</wd-button> <wd-button type="error" block class="addBtn" @tap="addNewAddress">新增地址</wd-button>
</view> </view>
...@@ -45,7 +47,6 @@ import Header from '@/pages/order/components/Header/index.vue'; ...@@ -45,7 +47,6 @@ import Header from '@/pages/order/components/Header/index.vue';
import { getAddressList, deleteAddress } from '@/api/address'; import { getAddressList, deleteAddress } from '@/api/address';
const isAdressEmpty = ref(false); const isAdressEmpty = ref(false);
const mainAddFlag = ref(false);
const addressList = ref([]); const addressList = ref([]);
const getAddressListData = async () => { const getAddressListData = async () => {
...@@ -56,26 +57,32 @@ const getAddressListData = async () => { ...@@ -56,26 +57,32 @@ const getAddressListData = async () => {
res.length === 0 ? (isAdressEmpty.value = true) : (isAdressEmpty.value = false); res.length === 0 ? (isAdressEmpty.value = true) : (isAdressEmpty.value = false);
} }
}; };
onLoad(() => {});
getAddressListData(); getAddressListData();
const addNewAddress = () => { const addNewAddress = () => {
xma.navigateTo({ url: '/pages/address/addressEdit?new=true' }); xma.navigateTo({ url: '/pages/address/addressEdit?new=true' });
}; };
const editAddress = () => { const editAddress = (col) => {
xma.navigateTo({ url: '/pages/address/addressEdit' }); xma.navigateTo({
url: `/pages/address/addressEdit?content=${JSON.stringify(col)}`,
});
}; };
const deleteAdd = async (id) => {
onLoad(() => { console.log(id);
xma.getLocation({ xma.showModal({
success: (res) => { title: '提示',
console.log(res); content: '确定删除该地址吗?',
}, showCancel: true,
fail: (err) => { confirmText: '确定',
console.log(err); cancelText: '取消',
success: async (res) => {
if (res.confirm) {
await deleteAddress(id);
getAddressListData();
}
}, },
}); });
}); };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -92,6 +99,7 @@ page { ...@@ -92,6 +99,7 @@ page {
.full_list { .full_list {
margin-top: 20rpx; margin-top: 20rpx;
padding-bottom: 180rpx;
.additem { .additem {
width: 710rpx; width: 710rpx;
...@@ -146,6 +154,7 @@ page { ...@@ -146,6 +154,7 @@ page {
display: flex; display: flex;
font-size: 18rpx; font-size: 18rpx;
align-items: center; align-items: center;
// justify-content: space-between;
.txt { .txt {
margin-left: 5rpx; margin-left: 5rpx;
......
...@@ -300,9 +300,10 @@ ...@@ -300,9 +300,10 @@
</div> </div>
</scroll-view> </scroll-view>
<div class="footer flex-between"> <div class="footer flex-between">
<div class="like"> <div class="like" @click="getCollectFn">
<wd-icon name="star"></wd-icon> <wd-icon v-if="shopInfo.isCollect === 0" name="star"></wd-icon>
<p>收藏</p> <wd-icon v-else color="red" name="star-on"></wd-icon>
<p>{{ shopInfo.privateIntFcount || 0 }}</p>
</div> </div>
<button>立即预定</button> <button>立即预定</button>
</div> </div>
...@@ -321,7 +322,9 @@ import { ...@@ -321,7 +322,9 @@ import {
getMealList, getMealList,
getPriceList, getPriceList,
getItinerary, getItinerary,
getStoreInformation,
} from '@/api/assistingAgriculture/route'; } from '@/api/assistingAgriculture/route';
import { getCollect } from '@/api/packageDetail';
const swiperList = ref([ const swiperList = ref([
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg', 'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg',
...@@ -346,6 +349,7 @@ const priceList = ref([]); ...@@ -346,6 +349,7 @@ const priceList = ref([]);
const viewPriceList = ref([]); const viewPriceList = ref([]);
const activePrice = ref({}); const activePrice = ref({});
const show = ref(false); const show = ref(false);
const shopIds = ref('');
watch(show, (value) => { watch(show, (value) => {
let index = priceList.value.indexOf(activePrice.value); let index = priceList.value.indexOf(activePrice.value);
index = Math.max(1, index); index = Math.max(1, index);
...@@ -363,13 +367,26 @@ const getPriceListFn = (mealId) => { ...@@ -363,13 +367,26 @@ const getPriceListFn = (mealId) => {
viewPriceList.value = res.data.slice(0, 4); viewPriceList.value = res.data.slice(0, 4);
}); });
}; };
const shopInfo = ref({});
// 获取店铺信息
const getStoreInformationFn = (id) => {
return new Promise((resolve, reject) => {
getStoreInformation(id).then((res) => {
if (res.code === 0) {
shopInfo.value = res.data.shop;
resolve();
}
});
});
};
// 行程 // 行程
const itineraryData = ref([]); const itineraryData = ref([]);
/* shopId:1821388624367861761 /* shopId:1821388624367861761
prodId:43835 */ prodId:43835 */
onLoad(({ /* shopId, prodId */ x }) => { onLoad(({ shopId, prodId }) => {
const shopId = 1821388624367861761n; shopIds.value = shopId;
const prodId = 43840; // const shopId = 1821388624367861761n;
// const prodId = 43835;
getProd({ getProd({
prodId, prodId,
}).then((res) => { }).then((res) => {
...@@ -399,7 +416,22 @@ onLoad(({ /* shopId, prodId */ x }) => { ...@@ -399,7 +416,22 @@ onLoad(({ /* shopId, prodId */ x }) => {
getItinerary({ prodId }).then((res) => { getItinerary({ prodId }).then((res) => {
itineraryData.value = res.data; itineraryData.value = res.data;
}); });
// 获取店铺信息
getStoreInformationFn(shopId);
}); });
function getCollectFn() {
getCollect(shopIds.value).then((res) => {
if (res.code === 0) {
if (shopInfo.value.isCollect === 0) {
shopInfo.value.privateIntFcount++;
shopInfo.value.isCollect = 1;
} else {
shopInfo.value.privateIntFcount--;
shopInfo.value.isCollect = 0;
}
}
});
}
// 返回上一级 // 返回上一级
function back() { function back() {
xma.navigateBack({ xma.navigateBack({
......
...@@ -180,6 +180,7 @@ const sortType = ref(null); ...@@ -180,6 +180,7 @@ const sortType = ref(null);
const attractionId = ref(null); const attractionId = ref(null);
const startCity = ref(null); const startCity = ref(null);
const dateType = ref(null); const dateType = ref(null);
const allocateDate = ref(null);
const serviceCommitment = ref(null); const serviceCommitment = ref(null);
const labelId = ref(null); const labelId = ref(null);
const locationFiltering = (index) => { const locationFiltering = (index) => {
...@@ -233,10 +234,16 @@ const sortParams = (sortMode) => { ...@@ -233,10 +234,16 @@ const sortParams = (sortMode) => {
getProd(); getProd();
}; };
// 出发日期 // 出发日期
const dataParams = (item) => { const dataParams = (item, datePart) => {
console.log(item, item.key, 22322323); if (item !== undefined) {
dateType.value = item.key; dateType.value = item.key;
getProd(); getProd();
} else if (item === undefined) {
console.log(item, 3333333);
dateType.value = 8;
allocateDate.value = datePart;
getProd();
}
}; };
// 景点 // 景点
const placeParams = (id) => { const placeParams = (id) => {
...@@ -262,10 +269,11 @@ const getProd = () => { ...@@ -262,10 +269,11 @@ const getProd = () => {
size: 10, size: 10,
...(sortType.value !== null && { sortType: sortType.value.sortMode }), ...(sortType.value !== null && { sortType: sortType.value.sortMode }),
...(attractionId.value !== null && { attractionId: attractionId.value.id }), ...(attractionId.value !== null && { attractionId: attractionId.value.id }),
...(dateType.value !== null && { dateType: dateType.value.key }), ...(dateType.value !== null && { dateType: dateType.value }),
...(startCity.value !== null && { startCity: startCity.value }), ...(startCity.value !== null && { startCity: startCity.value }),
...(serviceCommitment.value !== null && { serviceCommitment: serviceCommitment.value }), ...(serviceCommitment.value !== null && { serviceCommitment: serviceCommitment.value }),
...(labelId.value !== null && { labelId: labelId.value }), ...(labelId.value !== null && { labelId: labelId.value }),
...(dateType.value === 8 && { allocateDate: allocateDate.value }),
}; };
getProdList(params).then((res) => { getProdList(params).then((res) => {
res.data.records.forEach((item) => { res.data.records.forEach((item) => {
...@@ -274,11 +282,12 @@ const getProd = () => { ...@@ -274,11 +282,12 @@ const getProd = () => {
cardList.value = res.data.records; cardList.value = res.data.records;
}); });
}; };
function toRouteDetails(item) { function toRouteDetails(item) {
console.log(item, 22222); console.log(item, 22222);
// TODO: 跳转到线路详情 // TODO: 跳转到线路详情
xma.navigateTo({ xma.navigateTo({
url: `/pages/assistingAgriculture/RouteDetails/RouteDetails?shopId=${item.shopId},prodId=${item.prodId}`, url: `/pages/assistingAgriculture/RouteDetails/RouteDetails?shopId=${item.shopId}&prodId=${item.prodId}`,
}); });
} }
function toSpecialOfferZoneList() { function toSpecialOfferZoneList() {
......
<template> <template>
<div class="card"> <div class="card" v-for="(item, index) in photoData" :key="index">
<div class="img-wrap"> <div class="img-wrap">
<wd-img <wd-img v-for="(item, index) in item.images" :key="index" :src="item" enable-preview />
v-for="v in 3"
:key="v"
:src="`/src/static/assistingAgriculture/comment/${v}.png`"
enable-preview
/>
</div> </div>
<div class="text"> <div class="text">
跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客... {{ item.evaluation }}
</div> </div>
<div class="user-info flex-between"> <div class="user-info flex-between">
<div class="info flex-align-center"> <div class="info flex-align-center">
...@@ -24,7 +19,15 @@ ...@@ -24,7 +19,15 @@
</div> </div>
</template> </template>
<script setup></script> <script setup>
const showMore = ref(false);
const props = defineProps({
photoData: {
type: Array,
default: () => [],
},
});
</script>
<style lang="scss" scoped> <style lang="scss" scoped>
.card { .card {
......
<template> <template>
<div class="album"> <div class="album">
<scroll-view class="content" scroll-y> <scroll-view class="content" @scrolltolower="scrolltolower" scroll-y>
<div class="filter-box"> <!-- <div class="filter-box">
<div class="active">全部</div> <div class="active">全部</div>
<div v-for="(v, i) in filterList" :key="i">{{ v.text }}({{ v.value }})</div> <div v-for="(v, i) in filterList" :key="i">{{ v.text }}({{ v.value }})</div>
</div> </div> -->
<div class="card-wrap"> <div class="card-wrap">
<card v-for="v in 13" :key="v" /> <card :photoData="photoData" />
</div> </div>
</scroll-view> </scroll-view>
<div class="back"> <div class="back">
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
<script setup> <script setup>
import card from './card.vue'; import card from './card.vue';
import { getPhoto } from '../../../api/photo';
const imgUrl = import.meta.env.VITE_APP_IMG_URL;
// let total
const filterList = [ const filterList = [
{ {
text: '家人', text: '家人',
...@@ -59,6 +62,36 @@ const filterList = [ ...@@ -59,6 +62,36 @@ const filterList = [
value: 514, value: 514,
}, },
]; ];
const photoData = ref([]);
const params = {
prodId: '43828',
shopId: '1818876196597334017',
};
onLoad(() => {
getPhotoFn();
});
// const scrolltolower = () => {
// console.log('触底加载触底加载触底加载');
// if (commentData.value.length < total) {
// commentParameters.current++;
// getCommentListFn();
// return;
// }
// show.value = true;
// };
const getPhotoFn = () => {
getPhoto(params).then((res) => {
res.data.forEach((v) => {
if (v.images) {
v.images = v.images.split(',').map((item) => {
item = imgUrl + item;
return item;
});
}
});
photoData.value = [...photoData.value, ...res.data];
});
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -94,7 +127,7 @@ uni-page-body { ...@@ -94,7 +127,7 @@ uni-page-body {
} }
} }
.card-wrap { .card-wrap {
margin-top: 5px; // margin-top: 5px;
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
gap: 5px; gap: 5px;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<img :src="item.avatar" alt="" /> <img :src="item.avatar" alt="" />
<div class="name"> <div class="name">
<p>{{ item.nickName }}</p> <p>{{ item.nickName }}</p>
<div class="grade flex-align-center">5.0分</div> <text class="grade flex-align-center">5.0分</text>
</div> </div>
</div> </div>
<div class="info">{{ item.createTime[0] }}发表</div> <div class="info">{{ item.createTime[0] }}发表</div>
...@@ -55,15 +55,15 @@ const props = defineProps({ ...@@ -55,15 +55,15 @@ const props = defineProps({
} }
.grade { .grade {
margin-top: 18rpx; margin-top: 18rpx;
display: inline-block;
font-size: 16rpx; font-size: 16rpx;
background: rgba(253, 223, 109, 0.1686); background: rgba(253, 223, 109, 0.1686);
line-height: 24rpx;
color: #e1961d; color: #e1961d;
// width: 116rpx; padding: 2rpx 10rpx;
border-radius: 200rpx; border-radius: 16rpx;
// padding-left: 32rpx; // // padding-left: 32rpx;
box-sizing: border-box; // box-sizing: border-box;
position: relative; // position: relative;
// img { // img {
// height: 24rpx; // height: 24rpx;
// position: absolute; // position: absolute;
......
...@@ -58,11 +58,13 @@ ...@@ -58,11 +58,13 @@
</view> </view>
</view> </view>
</view> </view>
<fab />
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import Search from '../../../components/assistingAgriculture/index/Search.vue'; import Search from '../../../components/assistingAgriculture/index/Search.vue';
import fab from '../../../components/fab/fab.vue';
import { import {
getPresaleCategory, getPresaleCategory,
getPresaleList, getPresaleList,
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
<Header title="商品详情页"></Header> <Header title="商品详情页"></Header>
<web-view <web-view
style="height: 600rpx" style="height: 600rpx"
src="https://api.kuaidi100.com/tools/map/59d4a57b7964ebd6fc1d831847cb61c9_106.714305,26.568055_6" :src="logisticsDetail.trailUrl"
v-if="logisticsDetail"
></web-view> ></web-view>
<!-- <view style="height: 600rpx; background-color: aquamarine"></view> --> <!-- <view style="height: 600rpx; background-color: aquamarine"></view> -->
<view class="content"> <view class="content">
...@@ -11,7 +12,7 @@ ...@@ -11,7 +12,7 @@
<view class="top"> <view class="top">
<view class="left"> <view class="left">
<image class="logo" src="/static/ticket/logo.png" mode="aspectFill"></image> <image class="logo" src="/static/ticket/logo.png" mode="aspectFill"></image>
<text>中通快递78810259271088</text> <text>中通快递{{ orderDetail.orderLogistics.logisticsNumber }}</text>
</view> </view>
<view class="right"> <view class="right">
<text>复制</text> <text>复制</text>
...@@ -159,10 +160,11 @@ ...@@ -159,10 +160,11 @@
</view> </view>
<view style="height: 170rpx"></view> <view style="height: 170rpx"></view>
</view> </view>
<view class="footer"> <view class="footer" v-if="orderDetail">
<view class="btn">查看物流</view> <view class="btn" v-if="orderDetail.orderLogistics.status === '3'">查看物流</view>
<view class="btn">申请售后</view> <view class="btn">联系商家</view>
<view class="btn err">确认收货</view> <view class="btn err" v-if="orderDetail.orderLogistics.status === '3'">确认收货</view>
<view class="btn err" v-if="orderDetail.orderLogistics.status === '1'">立即付款</view>
</view> </view>
</view> </view>
<stepBar ref="stepBarRef"></stepBar> <stepBar ref="stepBarRef"></stepBar>
...@@ -171,7 +173,7 @@ ...@@ -171,7 +173,7 @@
<script setup> <script setup>
import Header from '@/pages/order/components/Header/index.vue'; import Header from '@/pages/order/components/Header/index.vue';
import stepBar from '@/pages/assistingAgriculture/order/components/stepBar/index.vue'; import stepBar from '@/pages/assistingAgriculture/order/components/stepBar/index.vue';
import { getOrderDetail, getShopDetail } from '@/api/order'; import { getOrderDetail, getShopDetail, getLogisticsMap } from '@/api/order';
const fileDomain = import.meta.env.VITE_APP_IMG_URL; const fileDomain = import.meta.env.VITE_APP_IMG_URL;
const orderNumber = ref(''); const orderNumber = ref('');
...@@ -194,6 +196,9 @@ const getDetail = async () => { ...@@ -194,6 +196,9 @@ const getDetail = async () => {
const res = await getOrderDetail({ orderNumber: orderNumber.value }); const res = await getOrderDetail({ orderNumber: orderNumber.value });
orderDetail.value = res.data; orderDetail.value = res.data;
getShopMailDetail(orderDetail.value.baseOrder.shopId); getShopMailDetail(orderDetail.value.baseOrder.shopId);
if (orderDetail.value.orderLogistics.logisticsNumber) {
getLogisticsDetail(orderDetail.value.orderLogistics.logisticsNumber);
}
}; };
/** /**
...@@ -205,6 +210,15 @@ const getShopMailDetail = async (id) => { ...@@ -205,6 +210,15 @@ const getShopMailDetail = async (id) => {
shopDetail.value = res.data.shop; shopDetail.value = res.data.shop;
}; };
/**
* 获取物流信息
*/
const logisticsDetail = ref();
const getLogisticsDetail = async (id) => {
const res = await getLogisticsMap({ expressNum: id });
logisticsDetail.value = res.data;
};
const toShopDetail = () => { const toShopDetail = () => {
xma.navigateTo({ xma.navigateTo({
url: `/pages/assistingAgriculture/shop/index?shopId=${shopDetail.value.shopId}`, url: `/pages/assistingAgriculture/shop/index?shopId=${shopDetail.value.shopId}`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment