修改订单接口

parent fdbfb1a4
......@@ -61,3 +61,11 @@ export function repaymentApi(data) {
data,
});
}
// 查询各类订单状态
export function sgyOrderGetStatus(data) {
return request({
url: '/sgyrdd/sgyOrder/getStatus',
method: 'GET',
data,
});
}
......@@ -3,12 +3,22 @@
<view class="bg-img"></view>
<view class="top">
<!-- 搜索 -->
<Search>
<Search @toSearch="toSearch">
<image class="food" :src="pics" mode="widthFix" />
</Search>
<!-- 类别选择 -->
<scroll-view class="scroll-x" scroll-x="true" @scroll="scroll">
<view class="foodCard" v-for="(item, index) in topDiscountedProducts" :key="index">
<scroll-view
v-if="topDiscountedProducts.length > 0"
class="scroll-x"
scroll-x="true"
@scroll="scroll"
>
<view
@click="jumpProductDetails(item.prodId)"
class="foodCard"
v-for="(item, index) in topDiscountedProducts"
:key="index"
>
<view class="test5">
<image class="img1" :src="imgUrl + item.pic" />
<image class="img2" src="../../static/index/icon-tab.png" />
......@@ -83,11 +93,11 @@
<!-- 附近筛选 -->
<Position v-show="rotate2" @nearby="nearby" @popular="popular" @region="region" />
<!-- 排序筛选 -->
<Sort v-show="rotate3" />
<Sort v-show="rotate3" @sortParams="sortParams" />
</view>
<FoodDetails :cardData="cardData" />
<view
style="width: 100%; text-align: center; font-size: 24rpx; margin-top: 10rpx"
style="width: 100%; text-align: center; font-size: 24rpx; margin-top: 10rpx; color: #888989"
v-if="params.isEnd"
>
没有更多啦~
......@@ -158,6 +168,22 @@ const popular = (communityName) => {
getMerchantList();
});
};
// 搜索
const toSearch = (keyword) => {
params.value.keyword = keyword;
refresh().then(() => {
getMerchantList();
});
};
// 排序参数来源
const sortParams = (sortType) => {
const { sortName, sortMode } = sortType;
params.value.sortName = sortName;
params.value.sortMode = sortMode;
refresh().then(() => {
getMerchantList();
});
};
// area参数来源
const region = (area) => {
console.log('area', area);
......@@ -201,6 +227,14 @@ const query = (parentId) => {
categoryData.value = res.data;
});
};
function jumpProductDetails(prodId) {
xma.navigateTo({
url: `/pages/packageDetails/packageDetails?prodId=${prodId}`,
params: {
productId: 123,
},
});
}
const prodSpecialFn = () => {
prodSpecial({ categoryId: categoryId.value }).then((res) => {
res.data.data = res.data.data.map((el) => {
......@@ -302,7 +336,7 @@ page {
}
.top {
width: 100%;
height: 666rpx;
min-height: 420rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
overflow: hidden;
.food {
......
......@@ -76,7 +76,12 @@
</view>
</view>
<view class="nearby-bootom">
<view class="contentBox" v-for="(item, index) in foodNearbyData" :key="index">
<view
@click="jumpProductDetails(item)"
class="contentBox"
v-for="(item, index) in foodNearbyData"
:key="index"
>
<!-- <image class="img" src="../../static/index/eatFood.png" mode="widthFix" /> -->
<image class="img" :src="item.shopLogo" mode="aspectFill" />
<text class="one">{{ item.shopName }}</text>
......@@ -201,6 +206,11 @@ onMounted(() => {
getMerchantList();
getCouponMainList();
});
function jumpProductDetails(item) {
xma.navigateTo({
url: '/pages/shop/shop?shopId=' + item.shopId,
});
}
// 登录
// const signIn = () => {
// getTokenUser(testJson).then((res) => {
......
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