Commit 2b696271 authored by 蔡亮华(贵阳日报)'s avatar 蔡亮华(贵阳日报)
parents 8c343c83 58154767
......@@ -4,7 +4,6 @@ onLaunch(() => {});
onShow(() => {
console.log('App Show');
});
onHide(() => {
console.log('App Hide');
});
......
......@@ -3,31 +3,67 @@
<view class="date">出发日期</view>
<ul class="ul">
<li
v-for="(item, index) in items"
v-for="(item, index) in dataList"
:key="index"
:class="{ active: selectedItem === index }"
@tap="selectItem(index)"
@tap="selectItem(index, item)"
>
{{ item }}
{{ item.startDate }}
</li>
<li>选择日期</li>
<wd-calendar use-default-slot v-model="value" @confirm="handleConfirm">
<li @tap="selectItem(index, item)">选择日期</li>
</wd-calendar>
</ul>
</view>
</template>
<script setup>
import { defineProps } from 'vue';
const items = reactive(['日期不限', '今天', '明天', '一周内', '一月内', '本周末', '七夕节']);
import { defineProps, onMounted, ref } from 'vue';
import { getStartDate } from '@/api/assistingAgriculture/village';
const selectedItem = ref(null);
const emit = defineEmits(['dataParams']);
const dataList = ref([]);
const value = ref('');
const formatValue = ref('');
const params = {
current: 1,
size: 10,
};
const props = defineProps({
width: {
type: String,
default: '100%',
},
});
const selectItem = (selectItem) => {
selectedItem.value = selectItem;
onMounted(async () => {
getStartDateList();
});
const selectItem = (index, item) => {
console.log(item, 323);
const datePart = timestampToDateBasic(value.value);
selectedItem.value = index;
emit('dataParams', item, datePart);
console.log(datePart, 'datePart');
};
const getStartDateList = () => {
getStartDate(params).then((res) => {
dataList.value = res.data;
});
};
function handleConfirm({ value }) {
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>
<style lang="scss" scoped>
......
<template>
<view class="sort" :style="{ width: width }">
<view class="date">景点</view>
<ul class="ul">
<li
v-for="(item, index) in placeList"
:key="index"
:class="{ active: selectedItem === index }"
@tap="selectItem(index)"
@tap="selectItem(index, item)"
>
{{ item.brief }}
{{ item.attractionName }}
</li>
</ul>
</view>
......@@ -18,7 +17,7 @@
import { defineProps, onMounted } from 'vue';
import { getTour } from '@/api/assistingAgriculture/village';
const placeList = ref([]);
const emit = defineEmits(['sortParams']);
const emit = defineEmits(['placeParams']);
const selectedItem = ref(null);
const props = defineProps({
width: {
......@@ -31,11 +30,11 @@ onMounted(async () => {
});
const selectItem = (index, item) => {
selectedItem.value = index;
emit('sortParams', item);
emit('placeParams', item);
};
// 查询景点
const getTourList = () => {
getTour({ prodId: 0 }).then((res) => {
getTour().then((res) => {
placeList.value = res.data;
});
};
......
<template>
<view class="sort" :style="{ width: width }">
<view class="date">筛选</view>
<view class="date">出发城市</view>
<ul class="ul">
<li
v-for="(item, index) in items"
v-for="(item, index) in screenList"
:key="index"
:class="{ active: selectedItem === index }"
@tap="selectItem(index)"
@tap="selectItem(index, item, 'screen')"
>
{{ item }}
{{ item.tripCity }}
</li>
</ul>
<view class="date">服务承诺</view>
<ul class="ul">
<li
v-for="(item, index) in serveList"
:key="index"
:class="{ active: selectedItem1 === index }"
@tap="selectItem(index, item, 'serve')"
>
{{ item.labelName }}
</li>
</ul>
<view class="date">适用人群</view>
<ul class="ul">
<li
v-for="(item, index) in peopleList"
:key="index"
:class="{ active: selectedItem2 === index }"
@tap="selectItem(index, item, 'people')"
>
{{ item.labelName }}
</li>
</ul>
</view>
</template>
<script setup>
import { defineProps } from 'vue';
const items = reactive([
'智能排序',
'距离优先',
'好评优先',
'销量优先',
'低价优先',
'低价优先',
'距离优先',
'好评优先',
'销量优先',
'低价优先',
'距离优先',
]);
import { defineProps, onMounted, ref } from 'vue';
import { screeningConditions } from '@/api/assistingAgriculture/village';
const emit = defineEmits(['screenParams']);
const selectedItem = ref(null);
const selectedItem1 = ref(null);
const selectedItem2 = ref(null);
const screenList = ref([]);
const serveList = ref([]);
const peopleList = ref([]);
const props = defineProps({
width: {
type: String,
default: '100%',
},
});
const selectItem = (selectItem) => {
selectedItem.value = selectItem;
onMounted(async () => {
getScreeningConditions();
});
const selectItem = (index, item, type) => {
if (type === 'screen') {
selectedItem.value = index;
} else if (type === 'serve') {
selectedItem1.value = index;
} else if (type === 'people') {
selectedItem2.value = index;
}
emit('screenParams', item, type);
};
// 查询出发日期
const getScreeningConditions = () => {
screeningConditions().then((res) => {
screenList.value = res.data.startCityList;
serveList.value = res.data.serviceList;
peopleList.value = res.data.forPeopleList;
});
};
</script>
......@@ -68,7 +102,6 @@ const selectItem = (selectItem) => {
letter-spacing: 0em;
font-variation-settings: 'opsz' auto;
font-feature-settings: 'kern' on;
color: #fa5151;
margin-left: 44rpx;
margin-top: 20rpx;
}
......
......@@ -5,7 +5,7 @@
v-for="(item, index) in items"
:key="index"
:class="{ active: selectedItem === index }"
@tap="selectItem(index)"
@tap="selectItem(index, item)"
>
{{ item.name }}
</li>
......@@ -16,11 +16,11 @@
<script setup>
import { defineProps } from 'vue';
const items = ref([
{ name: '距离优先', sortModel: 1 },
{ name: '好评优先', sortModel: 2 },
{ name: '销量优先', sortModel: 3 },
{ name: '低价优先', sortModel: 4 },
{ name: '高价优先', sortModel: 5 },
{ name: '距离优先', sortMode: 1 },
{ name: '好评优先', sortMode: 2 },
{ name: '销量优先', sortMode: 3 },
{ name: '低价优先', sortMode: 4 },
{ name: '高价优先', sortMode: 5 },
]);
const emit = defineEmits(['sortParams']);
const selectedItem = ref(null);
......
<template>
<!-- 悬浮按钮 -->
<wd-fab
type="error"
position="right-bottom"
direction="left"
:draggable="true"
inactiveIcon="a-controlplatform"
>
<view class="custom-button" @click="go('/pages/assistingAgriculture/index/index')">
<image class="fab-icon" src="../../static/index/order.png"></image>
<text class="fab-text">助农</text>
</view>
<view class="custom-button" @click="go('/pages/ticket/ticket')">
<image class="fab-icon" src="../../static/index/coupon.png"></image>
<text class="fab-text">优惠券</text>
</view>
<view class="custom-button" @click="go('/pages/order/order')">
<image class="fab-icon" src="../../static/index/order.png"></image>
<text class="fab-text">订单</text>
</view>
</wd-fab>
</template>
<script setup>
// 前往个人中心
const go = (url) => {
xma.navigateTo({
url,
});
};
</script>
<style lang="scss" scoped>
.custom-button {
min-width: auto;
box-sizing: border-box;
gap: 10rpx;
margin: 8rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.fab-icon {
width: 64rpx;
height: 64rpx;
}
.fab-text {
font-size: 20rpx;
color: #333;
}
}
</style>
......@@ -20,7 +20,7 @@ export async function updateAddress(data) {
export async function deleteAddress(addrId) {
return request({
url: `/sgyrdd/useraddr/delete/${addrId}`,
method: 'GET',
method: 'POST',
});
}
// 查询收货地址列表
......
import { request } from '../../utils/request';
// 查询评论详情
export function evaluationGetById(data) {
return request({
url: `/sgyrdd/evaluation/getById`,
method: 'GET',
data,
});
}
export function prodGetProd(data) {
return request({
url: `/sgyrdd/prod/getProd`,
method: 'GET',
data,
});
}
import { request } from '../../utils/request';
// 查询商品详情接口
export function getProd(data) {
return request({
url: `/sgyrdd/prod/getProd`,
method: 'GET',
data,
});
}
// 查询商品详情接口
export function getEvalStatis(data) {
return request({
url: `/sgyrdd/evaluation/getEvalStatis`,
method: 'GET',
data,
});
}
// 获取评价列表第一条
export function getEvaluationOne({ shopId, prodId }) {
return request({
url: `/sgyrdd/evaluation/page`,
method: 'GET',
data: {
shopId,
prodId,
size: 1,
current: 1,
},
});
}
// 查询商家相册列表
export function getPhoto({ shopId, prodId }) {
return request({
url: `/sgyrdd/photo/getPhoto`,
method: 'GET',
data: {
shopId,
prodId,
},
});
}
// 获取套餐价格列表
export function getMealList(data) {
return request({
url: `/sgyrdd/znprod/meal/list`,
method: 'GET',
data,
});
}
// 查询价格日历接口
export function getPriceList(data) {
return request({
url: `/sgyrdd/znprod/price/list`,
method: 'GET',
data,
});
}
// 查询行程活动接口
export function getItinerary(data) {
return request({
url: `/sgyrdd/znprod/activity/list`,
method: 'GET',
data,
});
}
// 店铺信息
export function getStoreInformation(data) {
return request({
url: `/sgyrdd/shop/getById?shopId=${data}`,
method: 'GET',
});
}
import { request } from '../../utils/request';
// 查询景点详情接口
export function znprodTourList(data) {
return request({
url: `/sgyrdd/znprod/tour/list`,
method: 'GET',
data,
});
}
......@@ -64,3 +64,11 @@ export function sgyOrderOrderInfo(data) {
data,
});
}
// 筑农首页-3、订单详情
export function quantity(data) {
return request({
url: `/sgyrdd/sgyBasket/quantity`,
method: 'POST',
data,
});
}
......@@ -3,7 +3,7 @@ import { request } from '../../utils/request';
// 查询景点
export function getTour(data) {
return request({
url: `/sgyrdd/znprod/tour/list`,
url: `/sgyrdd/znprod/attraction/list`,
method: 'GET',
data,
});
......@@ -24,3 +24,19 @@ export function getProdList(data) {
data,
});
}
// 查询出发日期
export function getStartDate(data) {
return request({
url: `/sgyrdd/prod/startDate/page`,
method: 'GET',
data,
});
}
// 查询筛选
export function screeningConditions(data) {
return request({
url: `/sgyrdd/prod/screeningConditions/list`,
method: 'GET',
data,
});
}
......@@ -87,6 +87,8 @@ export function evaluation(data) {
data,
});
}
// 查询售后详情
export function afterSale(data) {
return request({
url: '/sgyrdd/sgyOrder/afterSales/getInfo',
......@@ -94,3 +96,21 @@ export function afterSale(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,
});
}
......@@ -55,3 +55,30 @@ export function receiveCoupon(data) {
data,
});
}
// 商家评论列表
export function getCommentList(data) {
return request({
url: `/sgyrdd/evaluation/page`,
method: 'GET',
data,
});
}
// 评论列表数量统计和相同好评最多的评语
export function getEvalStatis(data) {
return request({
url: `/sgyrdd/evaluation/getEvalStatis`,
method: 'GET',
data,
});
}
// 评论列表数量统计和相同好评最多的评语
export function getEvalStatisByShopId(data) {
return request({
url: `/sgyrdd/evaluation/getShopEvalStatis`,
method: 'GET',
data,
});
}
import { request } from '../utils/request';
// 查询商家相册列表
export function getPhoto(data) {
return request({
url: `/sgyrdd/photo/getPhoto`,
method: 'GET',
data,
});
}
......@@ -225,7 +225,9 @@
"style": {
"navigationBarTitleText": "景点详情",
"navigationBarBackgroundColor": "#ffffff",
"navigationStyle":""
"navigationStyle":"",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50
}
},
{
......@@ -255,7 +257,8 @@
{
"path": "pages/assistingAgriculture/detail/comment",
"style": {
"navigationBarTitleText": "评论"
"navigationBarTitleText": "评论",
"enablePullDownRefresh": true
}
}
],
......
......@@ -25,7 +25,9 @@
<view class="area">
<view class="area_l">
<view class="area_lt">当前定位</view>
<view class="area_lb">{{ forMData.city }}</view>
<view class="area_lb">
{{ forMData.province }}-{{ forMData.city }}-{{ forMData.area }}
</view>
</view>
<view class="area_r">
<wd-icon name="location" size="22px" @tap="changeLocation" />
......@@ -59,7 +61,9 @@
<script setup>
import Header from '@/pages/order/components/Header/index.vue';
import { addAddress, updateAddress, deleteAddress } from '@/api/address';
import api from '@/services';
const newAddressFlag = ref(false);
const reForm = ref();
......@@ -75,9 +79,11 @@ const forMData = ref({
lat: '',
commonAddr: false,
});
const content = ref([]);
onLoad((options) => {
newAddressFlag.value = options.new;
content.value = JSON.parse(options.content);
forMData.value = content.value;
});
function fieldNotEmpty(val) {
......@@ -89,49 +95,70 @@ function fieldNotEmpty(val) {
}
const hdSubmit = async () => {
await addAddress({
...forMData.value,
commonAddr: forMData.value.commonAddr ? 1 : 0,
});
try {
if (!content.value.addrId) {
await addAddress({
...forMData.value,
commonAddr: forMData.value.commonAddr ? 1 : 0,
province: forMData.value.province,
city: forMData.value.city,
area: forMData.value.area,
});
} else {
await updateAddress({
...forMData.value,
commonAddr: forMData.value.commonAddr ? 1 : 0,
});
}
uni.showToast({
title: '提交成功',
duration: 2000,
});
uni.navigateTo({
url: '/pages/address/addressList',
});
} catch (error) {
console.log(error, 'error');
}
};
function handleSubmit() {
console.log('model的值', reForm.value);
reForm.value
.validate()
.then(({ valid }) => {
if (valid) {
hdSubmit();
// xma.showToast({
// title: '提交成功',
// duration: 2000,
// success: function () {
// console.log('数据更新后跳转地址列表页');
// },
// });
}
})
.catch((error) => {
console.log(error, 'error');
});
}
// 重新定位收货地址
async function changeLocation() {
uni.chooseLocation({
success: function (res) {
forMData.value.city = res.address;
// forMData.value.city = res.address;
forMData.value.addr = res.address;
forMData.value.lng = res.longitude;
forMData.value.lat = res.latitude;
console.log('位置信息:' + JSON.stringify(res));
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
uni.request({
url: '/ws/geocoder/v1/',
data: {
key: 'MN4BZ-7JXKW-2RYRD-32QGF-AHONV-PAFUN',
location: `${res.latitude},${res.longitude}`,
},
success: function (res) {
// console.log('逆地理编码:' + JSON.stringify(res));
if (res.data.status === 0) {
forMData.value.province = res.data.result.address_component.province;
forMData.value.city = res.data.result.address_component.city;
forMData.value.area = res.data.result.address_component.district;
}
},
});
},
});
const res = ('26.56806', '106.714304');
console.log('地址转换结果:' + res);
}
</script>
......
......@@ -9,29 +9,31 @@
</view>
<view class="full_list" v-else>
<view class="additem" v-for="(item, index) in addressList" :key="index">
<view class="additem_l">
<view class="address">{{ item.addr }}</view>
<view class="info">
<view class="name">{{ item.receiver }}</view>
<view class="phone">{{ item.mobile }}</view>
</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>
<wd-swipe-action>
<view class="additem" v-for="(item, index) in addressList" :key="index">
<view class="additem_l">
<view class="address">{{ item.addr }}</view>
<view class="info">
<view class="name">{{ item.receiver }}</view>
<view class="phone">{{ item.mobile }}</view>
</view>
<view v-else class="box">
<wd-icon name="circle1" size="12px"></wd-icon>
<view class="txt">默认</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 v-else class="box" @click="deleteAdd(item.addrId)">
<wd-icon name="circle1" size="12px"></wd-icon>
<view class="txt">删除</view>
</view>
</view>
</view>
<view class="additem_r">
<wd-icon name="edit-outline" size="14px" @tap="editAddress(item)"></wd-icon>
</view>
</view>
<view class="additem_r">
<wd-icon name="edit-outline" size="14px" @tap="editAddress"></wd-icon>
</view>
</view>
</wd-swipe-action>
<wd-button type="error" block class="addBtn" @tap="addNewAddress">新增地址</wd-button>
</view>
......@@ -45,7 +47,6 @@ import Header from '@/pages/order/components/Header/index.vue';
import { getAddressList, deleteAddress } from '@/api/address';
const isAdressEmpty = ref(false);
const mainAddFlag = ref(false);
const addressList = ref([]);
const getAddressListData = async () => {
......@@ -56,26 +57,32 @@ const getAddressListData = async () => {
res.length === 0 ? (isAdressEmpty.value = true) : (isAdressEmpty.value = false);
}
};
onLoad(() => {});
getAddressListData();
const addNewAddress = () => {
xma.navigateTo({ url: '/pages/address/addressEdit?new=true' });
};
const editAddress = () => {
xma.navigateTo({ url: '/pages/address/addressEdit' });
const editAddress = (col) => {
xma.navigateTo({
url: `/pages/address/addressEdit?content=${JSON.stringify(col)}`,
});
};
onLoad(() => {
xma.getLocation({
success: (res) => {
console.log(res);
},
fail: (err) => {
console.log(err);
const deleteAdd = async (id) => {
console.log(id);
xma.showModal({
title: '提示',
content: '确定删除该地址吗?',
showCancel: true,
confirmText: '确定',
cancelText: '取消',
success: async (res) => {
if (res.confirm) {
await deleteAddress(id);
getAddressListData();
}
},
});
});
};
</script>
<style lang="scss" scoped>
......@@ -92,6 +99,7 @@ page {
.full_list {
margin-top: 20rpx;
padding-bottom: 180rpx;
.additem {
width: 710rpx;
......@@ -146,6 +154,7 @@ page {
display: flex;
font-size: 18rpx;
align-items: center;
// justify-content: space-between;
.txt {
margin-left: 5rpx;
......
......@@ -55,7 +55,12 @@
:scroll-with-animation="true"
@scroll="scroll"
>
<view class="foodCard" v-for="(item, index) in popularRouterData" :key="index">
<view
class="foodCard"
v-for="(item, index) in popularRouterData"
:key="index"
@tap="toRouteDetails(item)"
>
<!-- <img-->
<!-- class="img-icon"-->
<!-- src="/static/assistingAgriculture/rural/icon.png"-->
......@@ -110,17 +115,24 @@
></wd-icon>
</view>
</view>
|
<view class="bootom-top">
<view class="option" @tap="resetParams">
<text>清空</text>
<wd-icon size="24rpx" class="icons"></wd-icon>
</view>
</view>
<Sort v-show="rotate" @sortParams="sortParams" />
<DepartureDate v-show="rotate2" />
<ScenicSpots v-show="rotate3" />
<Screen v-show="rotate4" />
<DepartureDate v-show="rotate2" @dataParams="dataParams" />
<ScenicSpots v-show="rotate3" @placeParams="placeParams" />
<Screen v-show="rotate4" @screenParams="screenParams" />
</view>
<view class="list-card">
<view
class="card-detail"
v-for="(item, index) in cardList"
:key="index"
@tap="toRouteDetails"
@tap="toRouteDetails(item)"
>
<img class="card-img" :src="item.img" style="width: 248rpx; height: 240rpx" />
<view class="detail-text">
......@@ -171,11 +183,13 @@ const rotate3 = ref(false);
const rotate4 = ref(false);
const cardList = ref([]);
const popularRouterData = ref([]);
const params = ref({
current: 1,
size: 10,
});
const sortType = ref(null);
const attractionId = ref(null);
const startCity = ref(null);
const dateType = ref(null);
const allocateDate = ref(null);
const serviceCommitment = ref(null);
const labelId = ref(null);
const locationFiltering = (index) => {
switch (index) {
case 0:
......@@ -203,6 +217,14 @@ const locationFiltering = (index) => {
rotate3.value = false;
break;
}
if (index === 0) {
sortType.value = null;
attractionId.value = null;
dateType.value = null;
startCity.value = null;
serviceCommitment.value = null;
labelId.value = null;
}
};
// 查询热门路线
const getPopular = () => {
......@@ -213,20 +235,77 @@ const getPopular = () => {
popularRouterData.value = res.data.records;
});
};
// 智能排序
const sortParams = (sortMode) => {
sortType.value = sortMode;
getProd();
};
// 出发日期
const dataParams = (item, datePart) => {
if (item !== undefined) {
dateType.value = item.key;
getProd();
} else if (item === undefined) {
console.log(item, 3333333);
dateType.value = 8;
allocateDate.value = datePart;
getProd();
}
};
// 景点
const placeParams = (id) => {
attractionId.value = id;
getProd();
};
// 筛选
const screenParams = (item, type) => {
console.log(item, type, 111);
if (type === 'screen') {
startCity.value = item.tripCity;
getProd();
} else if (type === 'serve') {
serviceCommitment.value = item.labelName;
getProd();
} else if (type === 'people') {
labelId.value = item.labelName;
getProd();
}
};
// 查询列表
const getProd = () => {
getProdList({ current: 1, size: 10 }).then((res) => {
const params = {
current: 1,
size: 10,
...(sortType.value !== null && { sortType: sortType.value.sortMode }),
...(attractionId.value !== null && { attractionId: attractionId.value.id }),
...(dateType.value !== null && { dateType: dateType.value }),
...(startCity.value !== null && { startCity: startCity.value }),
...(serviceCommitment.value !== null && { serviceCommitment: serviceCommitment.value }),
...(labelId.value !== null && { labelId: labelId.value }),
...(dateType.value === 8 && { allocateDate: allocateDate.value }),
};
getProdList(params).then((res) => {
res.data.records.forEach((item) => {
item.img = import.meta.env.VITE_APP_IMG_URL + item.pic;
});
cardList.value = res.data.records;
console.log(res, 222);
});
};
function toRouteDetails() {
const resetParams = () => {
sortType.value = null;
attractionId.value = null;
dateType.value = null;
startCity.value = null;
serviceCommitment.value = null;
labelId.value = null;
allocateDate.value = null;
getProd();
};
function toRouteDetails(item) {
console.log(item, 22222);
// TODO: 跳转到线路详情
xma.navigateTo({
url: '/pages/assistingAgriculture/RouteDetails/RouteDetails',
url: `/pages/assistingAgriculture/RouteDetails/RouteDetails?shopId=${item.shopId}&prodId=${item.prodId}`,
});
}
function toSpecialOfferZoneList() {
......
<template>
<div class="card">
<div class="card" v-for="(item, index) in photoData" :key="index">
<div class="img-wrap">
<wd-img
v-for="v in 3"
:key="v"
:src="`/src/static/assistingAgriculture/comment/${v}.png`"
enable-preview
/>
<wd-img v-for="(item, index) in item.images" :key="index" :src="item" enable-preview />
</div>
<div class="text">
跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...
{{ item.evaluation }}
</div>
<div class="user-info flex-between">
<div class="info flex-align-center">
<img src="/src/static/assistingAgriculture/comment/1.png" alt="" />
<p>不爱吃鱼的不爱吃鱼的不爱吃鱼的不爱吃鱼的不爱吃鱼的</p>
<img :src="item.avatar" alt="" />
<p>{{ item.nickName }}</p>
</div>
<div class="like">
<wd-icon name="thumb-up"></wd-icon>
12
{{ item.giveCount }}
</div>
</div>
</div>
</template>
<script setup></script>
<script setup>
const showMore = ref(false);
const props = defineProps({
photoData: {
type: Array,
default: () => [],
},
});
</script>
<style lang="scss" scoped>
.card {
......
<template>
<div class="album">
<scroll-view class="content" scroll-y>
<div class="filter-box">
<scroll-view class="content" @scrolltolower="scrolltolower" scroll-y>
<!-- <div class="filter-box">
<div class="active">全部</div>
<div v-for="(v, i) in filterList" :key="i">{{ v.text }}({{ v.value }})</div>
</div>
</div> -->
<div class="card-wrap">
<card v-for="v in 13" :key="v" />
<card :photoData="photoData" />
</div>
</scroll-view>
<div class="back">
......@@ -17,6 +17,9 @@
<script setup>
import card from './card.vue';
import { getPhoto } from '../../../api/photo';
const imgUrl = import.meta.env.VITE_APP_IMG_URL;
// let total
const filterList = [
{
text: '家人',
......@@ -59,6 +62,38 @@ const filterList = [
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;
});
}
v.avatar = imgUrl + v.avatar;
v.prodPic = imgUrl + v.prodPic;
});
photoData.value = [...photoData.value, ...res.data];
});
};
</script>
<style lang="scss" scoped>
......@@ -94,7 +129,7 @@ uni-page-body {
}
}
.card-wrap {
margin-top: 5px;
// margin-top: 5px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 5px;
......
......@@ -66,7 +66,7 @@
</view>
<view class="address-content" @click="jumpToAddressList">
<image class="location-pic" src="@/static/assistingAgriculture/assets/location.png"></image>
<view class="location-text">{{ addressInfo.areaAddr }} {{ addressInfo.areaName }}</view>
<view class="location-text">{{ addressInfo.addr }} {{ addressInfo.areaName }}</view>
<wd-icon custom-class="my-icon" color="#666" name="arrow-right" size="22px"></wd-icon>
</view>
<view class="address-user-info">
......@@ -151,6 +151,7 @@ import {
previewOrderBasketUpdate,
sgyOrderOrderInfo,
} from '@/api/assistingAgriculture/shop';
import { groupBuyConfirm, groupBuyUpdate, groupBuyCreate } from '@/api/confirmOrder';
const imgUrl = import.meta.env.VITE_APP_IMG_URL;
const textInputs = ref('');
const basketIds = ref([]);
......@@ -159,58 +160,112 @@ const changeAddress = ref(false);
const addressParams = ref({});
const showpopup = ref(false);
const outTradeNos = ref(null);
const prodIds = ref(null);
const skuIds = ref(null);
const types = ref('');
const inputLength = computed(() => {
return textInputs.value.length;
});
onLoad((options) => {
const { ids } = options;
basketIds.value = ids.split(',');
sgyrddBasketConfirmFn(basketIds.value).then(() => {
useraddrDefaultUserAddrFn().then(() => {
groupBuyUpdateFn();
const { ids, type, prodId, skuId } = options;
prodIds.value = prodId;
skuIds.value = skuId;
types.value = type;
if (type === 'qg') {
groupBuyConfirmFn(prodId, skuId).then((res) => {
useraddrDefaultUserAddrFn().then(() => {
groupBuyUpdateFnQg();
});
});
});
});
onShow(() => {
if (changeAddress.value) {
} else {
basketIds.value = ids.split(',');
sgyrddBasketConfirmFn(basketIds.value).then(() => {
useraddrDefaultUserAddrFn().then(() => {
groupBuyUpdateFn();
});
});
}
});
function groupBuyUpdateFnQg(couponUserId = '') {
const { receiverName, receiverMobile, receiverAddress } = addressParams.value;
groupBuyUpdate({
key: orderInfo.value.key,
couponUserId,
receiverName,
receiverMobile,
receiverAddress,
}).then((res) => {
if (res.code === 0) {
orderInfo.value = res.data;
}
});
}
onShow(() => {
if (changeAddress.value) {
if (types.value === 'qg') {
groupBuyConfirmFn(prodIds.value, skuIds.value).then((res) => {
useraddrDefaultUserAddrFn().then(() => {
groupBuyUpdateFnQg();
});
});
} else {
sgyrddBasketConfirmFn(basketIds.value).then(() => {
useraddrDefaultUserAddrFn().then(() => {
groupBuyUpdateFn();
});
});
}
}
if (outTradeNos.value) {
// 查询订单状态决定是否支付
sgyOrderOrderInfo({ orderNumber: outTradeNos.value }).then((res) => {
// switch (res.data.baseOrder.subStatus) {
// case '1':
// xma.showToast({
// title: '支付失败',
// icon: 'error',
// duration: 2000,
// success() {
// groupBuyConfirmFn(prodIds.value, skuIds.value);
// },
// });
// break;
// case '2':
// xma.redirectTo({
// url: `/pages/shop/paymentSuccessful?outTradeNos=${outTradeNos.value}`,
// });
// break;
// case '3':
// xma.redirectTo({
// url: `/pages/shop/paymentSuccessful?outTradeNos=${outTradeNos.value}`,
// });
// break;
// default:
// break;
// }
switch (res.data.baseOrder.subStatus) {
case '1':
xma.showToast({
title: '支付失败',
icon: 'error',
duration: 1000,
success() {
setTimeout(() => {
xma.redirectTo({
url: `/pages/assistingAgriculture/order/detail?orderNumber=${outTradeNos.value}`,
});
}, 1500);
},
});
break;
case '2':
xma.redirectTo({
url: `/pages/assistingAgriculture/order/detail?orderNumber=${outTradeNos.value}`,
});
break;
case '3':
xma.redirectTo({
url: `/pages/assistingAgriculture/order/detail?orderNumber=${outTradeNos.value}`,
});
break;
default:
break;
}
});
}
});
function groupBuyConfirmFn(prodId, skuId) {
return new Promise((resolve, reject) => {
groupBuyConfirm({ prodId, skuId }).then((res) => {
if (res.code === 0) {
orderInfo.value = res.data;
resolve(res.data.shopId);
} else {
wx.showToast({
title: res.msg,
});
}
});
});
}
const orderInfo = ref({});
const sgyrddBasketConfirmFn = (basketIds) => {
return new Promise((resolve, reject) => {
......@@ -231,7 +286,11 @@ function selectShopCoupon(item) {
activeCouponId.value = item.couponId;
activeCouponInfo.value = item;
showpopup.value = false;
groupBuyUpdateFn(item.couponUserId);
if (types.value === 'qg') {
groupBuyUpdateFnQg(item.couponUserId);
} else {
groupBuyUpdateFn(item.couponUserId);
}
} else {
xma.showToast({
title: '不满足优惠券使用条件',
......@@ -242,18 +301,11 @@ function selectShopCoupon(item) {
const jumpToAddressList = () => {
changeAddress.value = true;
wx.navigateTo({
url: '/pages/address/list',
url: '/pages/address/addressList',
});
};
function groupBuyUpdateFn(couponUserId) {
const { receiverName, receiverMobile, receiverAddress } = addressParams.value;
console.log(
'receiverName, receiverMobile, receiverAddress',
receiverName,
receiverMobile,
receiverAddress,
);
previewOrderBasketUpdate({
receiverName,
receiverMobile,
......@@ -285,7 +337,7 @@ const useraddrDefaultUserAddrFn = () => {
addressInfo.value = res.data;
addressParams.value.receiverName = res.data.receiver;
addressParams.value.receiverMobile = res.data.mobile;
addressParams.value.receiverAddress = res.data.areaAddr;
addressParams.value.receiverAddress = res.data.addr;
resolve();
}
});
......@@ -302,36 +354,53 @@ const params = ref({
basketIds: [],
remark: '',
});
const PaymentRef = ref(null);
const openZfType = () => {
PaymentRef.value.open();
};
const payNow = async (data) => {
params.value.id = orderInfo.value.key;
params.value.tradeType = data.selectType;
params.value.basketIds = basketIds.value;
znsgyOrderCreate(params.value).then((res) => {
if (res.code === 0) {
const { paymentUrl, outTradeNo } = res.data.result;
outTradeNos.value = outTradeNo;
window.location.href = paymentUrl;
// 设置一个延时器
const start = Date.now();
setTimeout(() => {
const end = Date.now();
if (end - start < 1200) {
// 如果 iframe 加载时间小于 1.2 秒,说明应用没有安装
xma.showToast({
title: '未安装App',
icon: 'error',
});
// 这里可以跳转到应用下载页面
}
}, 1600);
} else {
groupBuyConfirmFn(prodIds.value, skuIds.value);
if (types.value === 'qg') {
const qgParams = {
id: orderInfo.value.key,
placeOrderWay: 'sgy',
payWayCode: 5,
tradeType: data.selectType,
};
groupBuyCreate(qgParams).then((res) => {
if (res.code === 0) {
openUrl(res.data.result);
} else {
groupBuyConfirmFn(prodIds.value, skuIds.value);
}
});
} else {
znsgyOrderCreate(params.value).then((res) => {
if (res.code === 0) {
openUrl(res.data.result);
} else {
sgyrddBasketConfirmFn(basketIds.value);
}
});
}
};
const openUrl = (result) => {
const { paymentUrl, outTradeNo } = result;
outTradeNos.value = outTradeNo;
window.location.href = paymentUrl;
// 设置一个延时器
const start = Date.now();
setTimeout(() => {
const end = Date.now();
if (end - start < 1200) {
// 如果 iframe 加载时间小于 1.2 秒,说明应用没有安装
xma.showToast({
title: '未安装App',
icon: 'error',
});
// 这里可以跳转到应用下载页面
}
});
}, 1600);
};
</script>
......@@ -728,12 +797,12 @@ page {
.content {
font-size: 24rpx;
font-weight: 500;
width: 100%;
max-height: 243rpx;
background: #fafafa;
color: #77818f;
box-sizing: border-box;
border-radius: 12rpx;
margin: 0 auto;
}
}
.xj-content {
......
......@@ -31,7 +31,7 @@
<span></span>
{{ item.skuPrice }}
</div>
<wd-input-number v-model="item.count" />
<wd-input-number v-model="item.count" @change="changeQuantity(item)" />
</div>
</div>
</div>
......@@ -60,6 +60,7 @@
import { ref, computed, onMounted } from 'vue';
import { getshoppingCartList } from '../../../api/packageDetail';
import { categoryPresaleList } from '../../../api/assistingAgriculture/building';
import { quantity } from '../../../api/assistingAgriculture/shop';
// 计算是否全选
const checkedAll = computed(() => {
return cartList.value.every((item) => item.isChecked);
......@@ -114,6 +115,13 @@ const presaleSortList = (index) => {
});
});
};
// 购物车数量修改
const changeQuantity = async (item) => {
const res = await quantity({
basketId: item.basket.basketId,
basketCount: item.count,
});
};
const selectedItems = computed(() => {
return cartList.value.reduce((acc, shop) => {
const selectedProducts = shop.prodInfos.filter((item) => item.isChecked);
......
<template>
<div class="card">
<div
class="card"
v-for="(item, index) in commentData"
:key="index"
@click="toReviewDetails(item.evaluationId)"
>
<div class="card-top">
<div class="avatar flex-align-center">
<img src="/static/assistingAgriculture/comment/1.png" alt="" />
<img :src="item.avatar" alt="" />
<div class="name">
<p>不爱吃鱼的小猫咪</p>
<div class="flex-align-center">
<img src="/src/static/assistingAgriculture/comment/emoji.png" alt="" />
5.0分 好评
</div>
<p>{{ item.nickName }}</p>
<text class="grade flex-align-center">5.0分</text>
</div>
</div>
<div class="info">2024-08-03发表于贵州 | 朋友出游 | 2024-07-22出发</div>
<div class="info">{{ item.createTime[0] }}发表</div>
</div>
<div class="card-content">
<div class="text-wrap" :style="showMore ? 'max-height:none;' : ''">
跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答游跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答游跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答游
<div class="more" v-if="!showMore" @click="showMore = true">全文</div>
<div class="text-wrap">
{{ item.evaluation }}
</div>
<div class="img-wrap">
<wd-img
v-for="v in Math.floor(Math.random() * 6 + 1)"
:key="v"
:src="`/src/static/assistingAgriculture/comment/${v}.png`"
enable-preview
<image
@tap.stop="preview(item)"
mode="aspectFill"
class="wd-img"
v-for="(item, index) in item.images"
:key="index"
:src="item"
/>
</div>
</div>
......@@ -33,6 +36,23 @@
<script setup>
import { ref } from 'vue';
const showMore = ref(false);
const props = defineProps({
commentData: {
type: Array,
default: () => [],
},
});
const preview = (url) => {
xma.previewImage({
urls: [url],
});
};
// 查看评论详情
const toReviewDetails = (id) => {
xma.navigateTo({
url: `/pages/assistingAgriculture/reviewDetails/reviewDetails?evaluationId=${id}`,
});
};
</script>
<style lang="scss" scoped>
......@@ -40,6 +60,7 @@ const showMore = ref(false);
background-color: #fff;
border-radius: 16rpx;
padding: 20rpx;
margin-bottom: 10rpx;
.card-top {
padding-bottom: 20rpx;
border-bottom: 2rpx solid #f3f3f3;
......@@ -55,23 +76,23 @@ const showMore = ref(false);
font-size: 28rpx;
color: #3d3d3d;
}
div {
.grade {
margin-top: 18rpx;
display: inline-block;
font-size: 16rpx;
background: rgba(253, 223, 109, 0.1686);
line-height: 24rpx;
color: #e1961d;
width: 116rpx;
border-radius: 200rpx;
padding-left: 32rpx;
box-sizing: border-box;
position: relative;
img {
height: 24rpx;
position: absolute;
left: 0;
width: 24rpx;
}
padding: 2rpx 10rpx;
border-radius: 16rpx;
// // padding-left: 32rpx;
// box-sizing: border-box;
// position: relative;
// img {
// height: 24rpx;
// position: absolute;
// left: 0;
// width: 24rpx;
// }
}
}
}
......@@ -88,7 +109,7 @@ const showMore = ref(false);
line-height: normal;
color: #3d3d3d;
overflow: hidden;
max-height: 150rpx;
// max-height: 150rpx;
position: relative;
.more {
position: absolute;
......@@ -105,6 +126,8 @@ const showMore = ref(false);
grid-template-columns: repeat(3, 1fr);
.wd-img {
aspect-ratio: 1;
width: 216rpx;
height: 216rpx;
}
}
}
......
<template>
<div class="comment-list">
<div class="top-bar flex-align-center">
<wd-icon name="thin-arrow-left"></wd-icon>
<wd-search hide-cancel placeholder="点评关键词/特色" placeholder-left />
<wd-icon name="thin-arrow-left" @tap="back"></wd-icon>
<wd-search @search="search" hide-cancel placeholder="点评关键词/特色" placeholder-left />
</div>
<scroll-view class="content" :scroll-y="true">
<scroll-view @scrolltolower="scrolltolower" class="content" :scroll-y="true">
<div class="filter-box">
<div class="score-sort flex-between">
<div class="score">
<span class="num">6.9</span>
<span class="t1">超棒</span>
<span class="t2">527</span>
<wd-icon name="check-outline" class="t1"></wd-icon>
<span class="num">{{ topData.score }}</span>
<!-- <span class="t1">超棒</span> -->
<span class="t2">{{ topData.count }}</span>
<!-- <wd-icon name="check-outline" class="t1"></wd-icon> -->
</div>
<div class="sort">
<!-- <div class="sort">
<span class="active">推荐排序</span>
<span>重新点评</span>
</div>
</div> -->
</div>
<div class="type flex-between">
<p class="active">全部</p>
<p v-for="(v, i) in commentTypeList" :key="i">{{ v.text }}({{ v.value }})</p>
<p @tap="choice(-1)" :class="{ active: select === -1 }">全部</p>
<p
@tap="choice(i, v.type)"
:class="{ active: select === i }"
v-for="(v, i) in commentTypeList"
:key="i"
>
{{ v.text }}({{ v.value }})
</p>
</div>
<div class="tags" :style="{ 'max-height': showMoreTag ? '600px' : '90rpx' }">
<div class="item" v-for="(v, i) in tagList" :key="i">{{ v.text }}({{ v.value }})</div>
<div class="more" @click="showMoreTag = !showMoreTag">
<div class="tags">
<div class="item" v-for="(v, i) in tagList" :key="i">
{{ v.evaluation }}({{ v.count }})
</div>
<!-- <div class="more" @click="showMoreTag = !showMoreTag">
更多
<wd-icon name="arrow-down" :class="{ rotate: showMoreTag }"></wd-icon>
</div>
</div> -->
</div>
</div>
<div class="card-list">
<card v-for="v in 10" :key="v" />
<card :commentData="commentData" />
<view
style="width: 100%; text-align: center; font-size: 24rpx; margin: 10rpx 0; color: #888989"
v-if="show"
>
没有更多啦~
</view>
</div>
</scroll-view>
<div class="back">
<button>返回预订</button>
<button @tap="back">返回预订</button>
</div>
</div>
</template>
......@@ -44,77 +59,125 @@
<script setup>
import { ref } from 'vue';
import card from './card.vue';
const commentTypeList = [
import { getCommentList, getEvalStatis } from '../../../api/packageDetail';
const commentTypeList = reactive([
{
text: '图/视频',
value: 183,
value: 0,
type: 'img',
},
{
text: '追评',
value: 5,
value: 0,
type: 'append',
},
{
text: '中差评',
value: 5,
value: 0,
type: 'diff',
},
{
text: '好评',
value: 514,
},
];
const tagList = [
{
text: '餐食棒',
value: 44,
},
{
text: '导游负责耐心',
value: 44,
},
{
text: '车辆条件好',
value: 514,
},
{
text: '餐食棒',
value: 44,
value: 0,
type: 'good',
},
]);
const imgUrl = import.meta.env.VITE_APP_IMG_URL;
const tagList = ref([]);
const commentData = ref([]);
const commentParameters = {
shopId: '1818876196597334017',
prodId: '43828',
current: 1,
size: 10,
};
const show = ref(false);
let total;
const select = ref(-1);
const topData = ref({});
{
text: '餐食棒',
value: 44,
},
{
text: '导游负责耐心',
value: 44,
},
{
text: '行程安排合理',
value: 5,
},
{
text: '车辆条件好',
value: 514,
},
{
text: '行程安排合理',
value: 5,
},
{
text: '导游负责耐心',
value: 44,
},
{
text: '行程安排合理',
value: 5,
},
{
text: '车辆条件好',
value: 514,
},
];
onLoad((options) => {
getEvalStatisFn();
getCommentListFn();
});
const back = () => {
xma.navigateBack({
delta: 1,
});
};
const search = (e) => {
reset();
commentParameters.evaluation = e.value;
getCommentListFn();
};
// 数据重置
const reset = () => {
commentParameters.current = 1;
commentData.value = [];
show.value = false;
};
const scrolltolower = () => {
console.log('触底加载触底加载触底加载');
if (commentData.value.length < total) {
commentParameters.current++;
getCommentListFn();
return;
}
show.value = true;
};
// 触底加载
onReachBottom(() => {
if (cardData2.value.length + 5 < total) {
listParams.current++;
getMerchantListPaging();
}
});
const showMoreTag = ref(false);
// 评论列表数量统计和相同好评最多的评语
const getEvalStatisFn = () => {
getEvalStatis({ prodId: commentParameters.prodId }).then((res) => {
console.log('评论数量统计和相同好评最多的评语', res);
res.data.score = res.data.score.toFixed(1);
topData.value = res.data;
tagList.value = res.data.evals;
commentTypeList[0].value = res.data.imgCount;
commentTypeList[1].value = res.data.append;
commentTypeList[2].value = res.data.diffCount;
commentTypeList[3].value = res.data.goodCount;
});
};
// 评论列表
const getCommentListFn = () => {
xma.showLoading({
title: '加载中...',
mask: true,
});
getCommentList(commentParameters).then((res) => {
xma.hideLoading();
total = res.data.total;
res.data.records.forEach((v) => {
v.avatar = imgUrl + v.avatar;
v.prodPic = imgUrl + v.prodPic;
v.createTime = v.createTime.split(' ');
if (v.images) {
v.images = v.images.split(',').map((item) => {
item = imgUrl + item;
return item;
});
}
// console.log('v.images', v.images);
});
console.log('res.data.records', res.data.records);
commentData.value = [...commentData.value, ...res.data.records];
});
};
// tabs选择
const choice = (i, type) => {
select.value = i;
reset();
commentParameters.type = type;
getCommentListFn();
};
</script>
<style lang="scss" scoped>
......@@ -174,6 +237,7 @@ uni-page-body {
.type {
font-size: 22rpx;
color: #767676;
box-sizing: border-box;
.active {
color: #3d3d3d;
font-size: 24rpx;
......@@ -183,10 +247,11 @@ uni-page-body {
content: '';
display: block;
position: absolute;
width: calc(80%);
width: 30rpx;
height: 4rpx;
bottom: -12rpx;
left: 50%;
border-radius: 25rpx;
background-color: #fa5151;
transform: translateX(-50%);
}
......@@ -198,7 +263,7 @@ uni-page-body {
flex-wrap: wrap;
gap: 10rpx;
position: relative;
max-height: 80rpx;
// max-height: 80rpx;
overflow: hidden;
transition: all 0.3s;
.item {
......
......@@ -223,7 +223,7 @@ function toCart() {
function toSettle() {
// TODO: 跳转到结算页面
xma.navigateTo({
url: '/pages/assistingAgriculture/cart/ConfirmOrder',
url: `/pages/assistingAgriculture/cart/ConfirmOrder?type=qg&prodId=${dataDetails.value.skus[0].prodId}&skuId=${dataDetails.value.skus[0].skuId}`,
});
}
</script>
......
......@@ -58,11 +58,13 @@
</view>
</view>
</view>
<fab />
</view>
</template>
<script setup lang="ts">
import Search from '../../../components/assistingAgriculture/index/Search.vue';
import fab from '../../../components/fab/fab.vue';
import {
getPresaleCategory,
getPresaleList,
......
......@@ -110,6 +110,12 @@
</template>
<script setup>
const props = defineProps({
dataList: {
type: Array,
default: null,
},
});
const show = ref(false);
// 正则表达式匹配电话号码
const phoneRegex = /\b(\d{3,4}-\d{7,8}|\d{11})\b/g;
......
......@@ -3,7 +3,8 @@
<Header title="商品详情页"></Header>
<web-view
style="height: 600rpx"
src="https://api.kuaidi100.com/tools/map/59d4a57b7964ebd6fc1d831847cb61c9_106.714305,26.568055_6"
:src="logisticsDetail.trailUrl"
v-if="logisticsDetail"
></web-view>
<!-- <view style="height: 600rpx; background-color: aquamarine"></view> -->
<view class="content">
......@@ -11,7 +12,7 @@
<view class="top">
<view class="left">
<image class="logo" src="/static/ticket/logo.png" mode="aspectFill"></image>
<text>中通快递78810259271088</text>
<text>中通快递{{ orderDetail.orderLogistics.logisticsNumber }}</text>
</view>
<view class="right">
<text>复制</text>
......@@ -76,64 +77,55 @@
</view>
</view>
<view class="product">
<view class="header">
<view class="header" @tap="toShopDetail()">
<view class="icon">物流</view>
<text class="title">焗中焗盐焗鸡麻辣鸡</text>
<text class="title" v-if="shopDetail">{{ shopDetail.shopName }}</text>
</view>
<view class="product-list">
<view class="product-item">
<view class="left">
<image src="/static/ticket/logo.png" class="img" mode="aspectFill"></image>
<view class="infobox">
<view class="name">盐焗鸡</view>
<view class="num">1斤</view>
</view>
</view>
<view class="right">
<view class="textbox">
<text>实付¥</text>
<text class="price">48.00</text>
</view>
<text class="num">x1</text>
</view>
</view>
<view class="product-item" v-if="showMore">
<view class="left">
<image src="/static/ticket/logo.png" class="img" mode="aspectFill"></image>
<view class="infobox">
<view class="name">盐焗鸡</view>
<view class="num">1斤</view>
<view class="product-list" v-if="orderDetail">
<view
class="product-item"
v-for="(item, index) in orderDetail.orderItems"
:key="index"
@tap="toProdDetail(item.prodId)"
>
<block v-if="index == 0 || showMore">
<view class="left">
<image :src="fileDomain + item.pic" class="img" mode="aspectFill"></image>
<view class="infobox">
<view class="name">{{ item.prodName }}</view>
<view class="num">{{ item.skuName }}</view>
</view>
</view>
</view>
<view class="right">
<view class="textbox">
<text>实付¥</text>
<text class="price">48.00</text>
<view class="right">
<view class="textbox">
<text>实付¥</text>
<text class="price">{{ item.actualTotal }}</text>
</view>
<text class="num">x{{ item.prodCount }}</text>
</view>
<text class="num">x1</text>
</view>
</block>
</view>
</view>
<view class="totalbox totalbox-line" v-if="showMore">
<view class="total-item">
<text>商品总价:</text>
<text>98.70</text>
<text>{{ orderDetail.orderLogistics.total }}</text>
</view>
<view class="total-item">
<text>运费:</text>
<text>10.00</text>
<text>{{ orderDetail.orderLogistics.freightFee }}</text>
</view>
<view class="total-item">
<text>店铺优惠:</text>
<text>0.00</text>
<text>{{ orderDetail.orderLogistics.reduceAmount }}</text>
</view>
<view class="total-item">
<text>实付</text>
<view class="pricebox">
<text class="text">共2件 合计:</text>
<text class="icon"></text>
<text class="price">108.</text>
<text class="icon">70</text>
<text class="price">{{ orderDetail.orderLogistics.actualTotal }}</text>
<!-- <text class="icon">{{ orderDetail.orderLogistics.actualTotal.split('.')[1] }}</text> -->
</view>
</view>
</view>
......@@ -141,19 +133,19 @@
<text class="title">订单信息</text>
<view class="total-item">
<text>订单号:</text>
<text>5555222222111111</text>
<text>{{ orderDetail.orderLogistics.orderNumber.slice(6) }}</text>
</view>
<view class="total-item">
<text>运费:</text>
<text>10.00</text>
<text>{{ orderDetail.orderLogistics.freightFee }}</text>
</view>
<view class="total-item">
<text>下单时间:</text>
<text>2024-05-22 17:25:54</text>
<text>{{ orderDetail.orderLogistics.createTime }}</text>
</view>
<view class="total-item">
<text>支付方式:</text>
<text>微信</text>
<text>{{ payWayList[orderDetail.orderLogistics.payWay] }}</text>
</view>
</view>
<view class="more" @tap="changeShowMore">
......@@ -168,10 +160,11 @@
</view>
<view style="height: 170rpx"></view>
</view>
<view class="footer">
<view class="btn">查看物流</view>
<view class="btn">申请售后</view>
<view class="btn err">确认收货</view>
<view class="footer" v-if="orderDetail">
<view class="btn" v-if="orderDetail.orderLogistics.status === '3'">查看物流</view>
<view class="btn">联系商家</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>
<stepBar ref="stepBarRef"></stepBar>
......@@ -180,6 +173,63 @@
<script setup>
import Header from '@/pages/order/components/Header/index.vue';
import stepBar from '@/pages/assistingAgriculture/order/components/stepBar/index.vue';
import { getOrderDetail, getShopDetail, getLogisticsMap } from '@/api/order';
const fileDomain = import.meta.env.VITE_APP_IMG_URL;
const orderNumber = ref('');
onLoad((options) => {
orderNumber.value = options.orderNumber;
getDetail();
});
const payWayList = ref({
0: '翼支付',
1: '支付宝',
2: '微信',
});
/**
* 获取订单详情 0-翼支付,1-支付宝,2-微信
*/
const orderDetail = ref();
const getDetail = async () => {
const res = await getOrderDetail({ orderNumber: orderNumber.value });
orderDetail.value = res.data;
getShopMailDetail(orderDetail.value.baseOrder.shopId);
if (orderDetail.value.orderLogistics.logisticsNumber) {
getLogisticsDetail(orderDetail.value.orderLogistics.logisticsNumber);
}
};
/**
* 获取商铺信息
*/
const shopDetail = ref();
const getShopMailDetail = async (id) => {
const res = await getShopDetail({ shopId: id });
shopDetail.value = res.data.shop;
};
/**
* 获取物流信息
*/
const logisticsDetail = ref();
const getLogisticsDetail = async (id) => {
const res = await getLogisticsMap({ expressNum: id });
logisticsDetail.value = res.data;
};
const toShopDetail = () => {
xma.navigateTo({
url: `/pages/assistingAgriculture/shop/index?shopId=${shopDetail.value.shopId}`,
});
};
const toProdDetail = (id) => {
xma.navigateTo({
url: `/pages/assistingAgriculture/detail/detail?prodId=${id}`,
});
};
const showMore = ref(false);
const changeShowMore = () => {
......
......@@ -3,7 +3,7 @@
<view class="review-details-pages">
<view class="swiper-list">
<wd-swiper
:list="swiperList"
:list="reviewDetail.orderEvaluation?.images"
direction="horizontal"
indicatorPosition="right"
autoplay
......@@ -22,46 +22,46 @@
<view class="revuew-content">
<view class="user-info">
<view class="info-content">
<image
src="@/static/assistingAgriculture/reviewDetails/avatar.png"
mode="aspectFill"
></image>
<image :src="imgUrl + reviewDetail.user?.avatar" mode="aspectFill"></image>
<view class="text-box">
<text class="user-name">不爱吃鱼的小猫咪</text>
<text class="fb-time">2024-08-03</text>
<text class="user-name">{{ reviewDetail.user.nickName }}</text>
<text class="fb-time">{{ reviewDetail.user.createTime }}</text>
</view>
</view>
<view>
<text class="score">4.9</text>
<text class="score">{{ reviewDetail.orderEvaluation?.descriptionMatches }}</text>
<text class="score-unit">/5分</text>
</view>
</view>
<text style="margin-top: 12rpx; font-size: 14 * 2rpx; color: #3d3d3d">
跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答问题。
跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答问题。
<text style="margin-top: 12rpx; font-size: 14 * 2rpx; color: #3d3d3d; text-align: left">
{{ reviewDetail.orderEvaluation.evaluation }}
</text>
</view>
<view class="scenic-spot">
<image src="@/static/assistingAgriculture/reviewDetails/fj.png" mode="aspectFill"></image>
<view class="scenic-spot" @click="jumpProd">
<image :src="imgUrl + prodInfo.pic" mode="aspectFill"></image>
<view class="scenic-area-details">
<text class="scenic-name">红枫湖+青岩古镇+云漫湖</text>
<text class="scenic-type">自然风景</text>
<text class="scenic-name">{{ prodInfo.prodName }}</text>
<text class="scenic-type">{{ prodInfo.brief }}</text>
<view class="tag-list">
<text class="tag">无购物</text>
<text class="tag">无购物</text>
<!-- <text class="tag">{{ prodInfo.brief }}</text> -->
</view>
</view>
<wd-icon class="icon" color="#ABAAAA" name="arrow-right" size="22px"></wd-icon>
</view>
<view class="dz-btn">
<wd-icon color="#767676" name="thumb-up" size="22px"></wd-icon>
<text>12</text>
<view class="dz-btn" @click="dzClick">
<wd-icon v-if="reviewDetail.isLike == 0" name="thumb-up" size="44rpx"></wd-icon>
<wd-icon v-else name="thumb-up" color="red" size="44rpx"></wd-icon>
<text>{{ reviewDetail.likeNum }}</text>
</view>
</view>
</template>
<script setup>
import { evaluationGetById, prodGetProd } from '@/api/assistingAgriculture/reviewDetails';
import { likeOrDislike } from '@/api/shop';
const current = ref(0);
const imgUrl = import.meta.env.VITE_APP_IMG_URL;
const evaluationIds = ref('');
onMounted(() => {
xma.getSystemInfo({
success: function (res) {
......@@ -69,15 +69,59 @@ onMounted(() => {
},
});
});
const swiperList = ref([
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg',
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/capybara.jpg',
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/panda.jpg',
]);
onLoad((options) => {
const { evaluationId } = options;
evaluationIds.value = evaluationId;
evaluationGetByIdFn(evaluationId);
});
function handleClick(e) {}
function onChange(e) {
console.log(e);
}
const prodInfo = ref({});
function prodGetProdFn(prodId) {
prodGetProd({ prodId }).then((res) => {
prodInfo.value = res.data.data.prod;
});
}
const reviewDetail = ref({});
const jumpProd = () => {
xma.navigateTo({
url: `/pages/assistingAgriculture/RouteDetails/RouteDetails?prodId=${prodInfo.value.prodId}&shopId=${prodInfo.value.shopId}`,
});
};
const dzClick = () => {
likeOrDislike({ evaluationId: evaluationIds.value }).then((res) => {
if (res.code === 0) {
if (reviewDetail.value.isLike === 0) {
reviewDetail.value.likeNum++;
reviewDetail.value.isLike = 1;
} else {
reviewDetail.value.likeNum--;
reviewDetail.value.isLike = 0;
}
}
});
};
function evaluationGetByIdFn(evaluationId) {
evaluationGetById({ evaluationId }).then((res) => {
if (res.code === 0) {
if (res.data.orderEvaluation.images) {
res.data.orderEvaluation.images = res.data.orderEvaluation.images
.split(',')
.map((item) => {
item = import.meta.env.VITE_APP_IMG_URL + item;
return item;
})
.filter((item) => {
return item && item !== '';
});
}
reviewDetail.value = res.data;
prodGetProdFn(res.data.orderEvaluation.prodId);
}
});
}
</script>
<style lang="scss" scoped>
......@@ -109,7 +153,6 @@ page {
display: flex;
flex-direction: column;
width: 100%;
align-items: center;
padding: 40rpx 20rpx;
box-sizing: border-box;
.user-info {
......
......@@ -2,13 +2,13 @@
<!-- 点评详情页面 -->
<view class="review-details-pages">
<view class="list">
<view class="item" v-for="i in 10" :key="i">
<image mode="aspectFill" src="@/static/assistingAgriculture/reviewDetails/fj.png"></image>
<view class="item" v-for="(item, index) in list" :key="index">
<image mode="aspectFill" :src="imgUrl + item.pic"></image>
<view class="info-box">
<text>红枫湖景区</text>
<text>自然风景</text>
<text class="t-2">4.5</text>
<text class="t-2">门票费用已包含</text>
<text>{{ item.attractionName }}</text>
<text>{{ item.resourceType }}</text>
<text class="t-2">{{ item.score }}</text>
<text class="t-2" v-if="item.isTicket === 1">门票费用已包含</text>
</view>
</view>
</view>
......@@ -16,7 +16,22 @@
</template>
<script setup>
onMounted(() => {});
import { znprodTourList } from '@/api/assistingAgriculture/scenicSpotDetails';
const prodIds = ref('');
const list = ref([]);
const imgUrl = import.meta.env.VITE_APP_IMG_URL;
onLoad((options) => {
const { prodId } = options;
prodIds.value = prodId;
znprodTourListFn(prodId);
});
const znprodTourListFn = (prodId) => {
znprodTourList({ prodId }).then((res) => {
if (res.code === 0) {
list.value = res.data;
}
});
};
</script>
<style lang="scss" scoped>
......
......@@ -14,7 +14,7 @@
v-for="(item, index) in classificationT"
:key="index"
>
<image class="imgs" :src="item.icon" mode="widthFix" />
<image class="imgs" :src="item.icon" />
<text class="introduce">{{ item.categoryName }}</text>
</view>
</view>
......@@ -25,7 +25,7 @@
v-for="(item, index) in classificationB"
:key="index"
>
<image class="imgs" :src="item.icon" mode="widthFix" />
<image class="imgs" :src="item.icon" />
<text class="introduce">{{ item.categoryName }}</text>
</view>
</view>
......@@ -150,28 +150,12 @@
>
没有更多啦~
</view>
<!-- 悬浮按钮 -->
<wd-fab
type="error"
position="right-bottom"
direction="left"
:draggable="true"
inactiveIcon="a-controlplatform"
>
<view class="custom-button" @click="go('/pages/ticket/ticket')">
<image class="fab-icon" src="@/static/index/coupon.png"></image>
<text class="fab-text">优惠券</text>
</view>
<view class="custom-button" @click="go('/pages/order/order')">
<image class="fab-icon" src="@/static/index/order.png"></image>
<text class="fab-text">订单</text>
</view>
</wd-fab>
<fab />
</view>
</template>
<script setup>
import fab from '../../components/fab/fab.vue';
import myIcon from '../../components/wd-icon-local/wd-icon.vue';
import { onMounted, reactive, ref } from 'vue';
import { useCountStore } from '@/store';
......@@ -526,13 +510,6 @@ onReachBottom(() => {
}
show.value = true;
});
// 前往个人中心
const go = (url) => {
xma.navigateTo({
url,
});
};
</script>
<style lang="scss" scoped>
......@@ -564,7 +541,7 @@ page {
display: flex;
justify-content: space-evenly;
margin-top: 32rpx;
align-items: center;
align-items: flex-end;
.choice {
display: flex;
flex-direction: column;
......@@ -577,6 +554,7 @@ page {
Source Han Sans;
.imgs {
width: 88rpx;
height: 88rpx;
}
}
}
......@@ -584,7 +562,7 @@ page {
display: flex;
justify-content: space-evenly;
margin-top: 34rpx;
align-items: center;
align-items: flex-end;
.choice {
display: flex;
flex-direction: column;
......@@ -597,6 +575,7 @@ page {
Source Han Sans;
.imgs {
width: 68rpx;
height: 68rpx;
margin-bottom: 8rpx;
}
}
......@@ -865,26 +844,5 @@ page {
}
}
}
.custom-button {
min-width: auto;
box-sizing: border-box;
gap: 10rpx;
margin: 8rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.fab-icon {
width: 64rpx;
height: 64rpx;
}
.fab-text {
font-size: 20rpx;
color: #333;
}
}
}
</style>
......@@ -10,8 +10,8 @@ import { getTokenUser } from '../../api/index';
import { getToken } from '../../utils/auth';
onMounted(async () => {
await signIn();
// if (!getToken()) await signIn2();
// await signIn();
if (!getToken()) await signIn2();
xma.reLaunch({ url: '/pages/index/index' });
});
......
<template>
<view class="container">
<Header title="全部订单"></Header>
<view class="tabs">
<wd-tabs v-model="tab" animated :lineWidth="38" :lineHeight="3" @change="handleChange">
<!-- 顶部搜索框-->
<view class="top">
<wd-icon
class="icon"
name="thin-arrow-left"
color="#000"
size="32rpx"
@click="handleBack"
></wd-icon>
<view class="searchBox">
<view class="search">
<wd-icon name="search" size="30rpx" color="#999"></wd-icon>
<input
type="text"
:value="catalog.keyword"
class="text"
placeholder="搜索我的订单"
placeholder-style="font-size:28rpx;"
@confirm="handleSearch"
@input="handleInput"
confirm-type="搜索"
/>
</view>
<wd-icon
name="error-fill"
size="30rpx"
color="#999"
v-if="catalog.keyword"
@tap="handleClear"
></wd-icon>
</view>
</view>
<view class="tabs" v-if="orderDic">
<wd-tabs v-model="tab" animated :lineWidth="38" :lineHeight="3" @change="handleChange" sticky>
<block v-for="item in tabs" :key="item.value">
<wd-tab :title="`${item.name}`" :name="item.value">
<view class="content" v-if="dataList.length > 0">
<view class="box" v-for="(item, index) in dataList" :key="index">
<view class="header" @click="toShopDetail(item)">
<view class="header" @click="handleDetail(item)">
<view class="left">
<image src="@/static/order/shop.png" />
<text
class="icon"
:style="{ 'background-color': iconList[item.orderType].color }"
>
{{ iconList[item.orderType].text }}
</text>
<!-- <image src="@/static/order/shop.png" /> -->
<view class="title">{{ item.shopName }}</view>
</view>
<view class="right">
<span class="status">{{ stateList[item.status].label }}</span>
<span class="status">{{ stateList[item.orderType][item.status].label }}</span>
<wd-count-down
:time="item.countDown"
:format="format"
......@@ -23,7 +60,7 @@
</view>
</view>
<view class="info" @click="handleDetail(item.orderNumber)">
<view class="info" @click="handleDetail(item)">
<image mode="aspectFill" :src="fileDomain + item.orderItems[0].pic" />
<view class="info-box">
<view class="text">下单时间:{{ item.createTime.slice(0, 16) }}</view>
......@@ -122,7 +159,7 @@
</template>
<script setup>
import Header from './components/Header/index.vue';
// import Header from './components/Header/index.vue';
import Payment from './components/Payment/index.vue';
import {
getOrderList,
......@@ -132,19 +169,32 @@ import {
getOrderDetail,
} from '@/api/order';
import { getOrderDic } from '@/utils/orderDic';
import { orderStatus, signIn } from '@/utils/signIn';
import testJson from '@/static/json/test.json';
import { getTokenUser } from '@/api/index';
import { getToken } from '@/utils/auth';
const fileDomain = import.meta.env.VITE_APP_IMG_URL;
const stateList = ref();
onLoad((options) => {
const orderDic = getOrderDic();
stateList.value = orderDic.reduce((obj, item) => {
obj[item.baseStatus] = item;
return obj;
}, {});
const stateList = ref({});
const orderDic = ref();
onLoad(async (options) => {
// await signIn();
if (!getToken()) await signIn2();
if (!getOrderDic()) await orderStatus();
orderDic.value = getOrderDic();
orderDic.value.baseOrder[0].value = 'all';
for (const key in orderDic.value) {
const data = orderDic.value[key].reduce((obj, item) => {
obj[item.baseStatus] = item;
return obj;
}, {});
stateList.value[key] = data;
}
if (options.status) {
tab.value = options.status;
}
getList();
await getList();
});
const tabs = ref([
......@@ -164,10 +214,10 @@ const tabs = ref([
name: '待评价',
value: 'not_eval',
},
{
name: '已完成',
value: 'complete',
},
// {
// name: '已完成',
// value: 'complete',
// },
{
name: '退款/售后',
value: 'after_sales',
......@@ -175,6 +225,21 @@ const tabs = ref([
]);
const tab = ref('all');
const iconList = ref({
logistics: {
color: '#FF0909',
text: '物流',
},
store: {
color: '#FF4C0D',
text: '到店',
},
takeaway: {
color: '#FFB023',
text: '外卖',
},
});
onShow(() => {
if (pendingPaymentOrder.value) {
// 查询订单状态决定是否支付
......@@ -237,7 +302,7 @@ const catalog = reactive({
endDate: '',
keyword: '',
status: '', // 待付款-not_pay,待使用-not_use,待评价not_eval,退款-after_sales
orderType: 'store', // 团购到店-store,外卖订单-takeaway,筑农物流logistics
orderType: '', // 团购到店-store,外卖订单-takeaway,筑农物流logistics
});
const getList = async () => {
if (isEnd.value) return;
......@@ -292,6 +357,26 @@ const initDataList = () => {
});
};
/**
* 搜索订单
*/
const handleSearch = (e) => {
catalog.keyword = e.detail.value;
initDataList().then(() => {
getList();
});
};
const handleInput = (e) => {
catalog.keyword = e.detail.value;
};
const handleClear = () => {
catalog.keyword = '';
initDataList().then(() => {
getList();
});
};
/**
* 删除订单
* @param {*} orderNumber
......@@ -415,11 +500,19 @@ const onFinish = async (orderNumber) => {
});
};
const handleDetail = (id) => {
const handleDetail = (item) => {
// 清空查询待付款状态
pendingPaymentOrder.value = null;
console.log(item.orderType);
if (item.orderType === 'logistics') {
console.log(1111);
uni.navigateTo({
url: `/pages/assistingAgriculture/order/detail?orderNumber=${item.orderNumber}`,
});
return;
}
uni.navigateTo({
url: `/pages/order/detail?orderNumber=${id}`,
url: `/pages/order/detail?orderNumber=${item.orderNumber}`,
});
};
......@@ -489,6 +582,25 @@ const toShopDetail = (item) => {
url: `/pages/shop/shop?shopId=${item.shopId}`,
});
};
// 登录
const signIn2 = () => {
xma.showLoading({
title: '加载中',
mask: true,
});
return getTokenUser(testJson).then((res) => {
const token = res.data.access_token;
const userInfo = res.data.user_info;
xma.setStorageSync('Authorization', token);
xma.setStorageSync('userInfo', userInfo);
console.log('登录...');
});
};
const handleBack = () => {
uni.navigateBack();
};
</script>
<style scoped lang="scss">
......@@ -501,9 +613,9 @@ page {
margin: 0 auto;
.tabs {
padding-top: 88rpx;
padding-top: 108rpx;
.wd-tabs {
&:deep(.wd-tabs) {
background-color: #f5f5f5;
}
......@@ -518,12 +630,52 @@ page {
}
}
.top {
height: 108rpx;
position: fixed;
width: 100%;
z-index: 999;
display: flex;
background-color: #f5f5f5;
margin: 0 auto;
align-items: center;
padding: 0 30rpx;
gap: 14rpx;
.searchBox {
width: 492rpx;
height: 66rpx;
background: #f3f3f3;
border-radius: 33rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0rpx 28rpx;
background-color: #fff;
.search {
gap: 10rpx;
display: flex;
align-items: center;
.text {
margin-left: 10rpx;
font-family:
PingFang SC,
PingFang SC;
font-weight: 500;
font-size: 28rpx;
}
}
}
}
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 20rpx;
padding: 10rpx 20rpx 20rpx;
gap: 24rpx;
.box {
......@@ -544,7 +696,7 @@ page {
.left {
display: flex;
align-items: center;
gap: 6rpx;
gap: 12rpx;
font-weight: bold;
image {
......@@ -552,6 +704,15 @@ page {
width: 38rpx;
}
.icon {
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #ffffff;
border-radius: 8rpx;
padding: 2rpx 8rpx;
}
.title {
color: #333;
font-size: 32rpx;
......
......@@ -918,6 +918,7 @@ page {
}
img {
max-width: 100%;
object-fit: cover;
height: auto;
margin-top: 20rpx;
}
......
......@@ -231,10 +231,10 @@ function groupBuyConfirmFn(prodId, skuId) {
res.data.orderItems[0].pic = imgUrl + res.data.orderItems[0].pic;
orderInfo.value = res.data;
resolve(res.data.shopId);
}else {
} else {
wx.showToast({
title:res.msg
})
title: res.msg,
});
}
});
});
......
......@@ -9,7 +9,7 @@
class="pubList"
v-for="item in list"
:key="item.shopId"
@click="item.shopStatus != [1, 2, 3] ? shopGto(item) : ''"
@click="item.shopStatus != [1, 2, 3] ? shopGto(item.shopId) : ''"
>
<!-- 列表头部 -->
<view class="titlecon">
......
......@@ -35,7 +35,7 @@ export default defineConfig({
alias: {
'@': path.resolve(__dirname, './src'),
},
},
},
server: {
open: true,
// 代理配置
......@@ -45,6 +45,11 @@ export default defineConfig({
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
'/ws/geocoder': {
target: 'https://apis.map.qq.com',
changeOrigin: true,
bypass: (req, res, options) => res.setHeader("x-req-proxyUr1", options.target + req.url)
}
},
},
});
This source diff could not be displayed because it is too large. You can view the blob instead.
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