Merge branch 'master' of https://codeup.aliyun.com/bsdtec/biz-mobile-react-cloud
This commit is contained in:
commit
af59902a51
15 files changed
+165
-220
No files matched your search
@@ -25,13 +25,13 @@ VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api # 线上
|
||||
# ******************** start 开发环境 start ********************
|
||||
# VITE_APP_DEV_SERVICE =http://123.156.228.134:48080/app-api
|
||||
# VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/app-api
|
||||
# VITE_APP_DEV_SERVICE = http://192.168.101.29:9999 # 邓-本地
|
||||
# VITE_APP_DEV_SERVICE = http://pjcloud.center.takin.cc/ # 张
|
||||
# VITE_APP_DEV_SERVICE = http://localhost:9999
|
||||
VITE_APP_DEV_SERVICE = http://123.156.230.15:8089/api # 线上
|
||||
#VITE_APP_DEV_SERVICE = http://192.168.101.29:9999 # 邓-本地
|
||||
#VITE_APP_DEV_SERVICE = http://127.0.0.1:9999
|
||||
# VITE_APP_DEV_SERVICE = http://123.156.230.15:8089/api
|
||||
VITE_APP_DEV_SERVICE = http://localhost:9999
|
||||
# ******************** end 开发环境 end ********************
|
||||
|
||||
# ******************** start 生产环境 start ********************
|
||||
#VITE_APP_PROD_SERVICE = http://123.156.228.134:48080/app-api
|
||||
VITE_APP_PROD_SERVICE = https://stgl.pj.gov.cn/app-api
|
||||
# ******************** end 生产环境 end ********************
|
||||
VITE_APP_PROD_SERVICE = http://123.156.230.15:8089/api
|
||||
# ******************** end 生产环境 end ********************
|
||||
+2
-1
@@ -64,6 +64,7 @@
|
||||
"dayjs": "^1.11.13",
|
||||
"luch-request": "^3.1.1",
|
||||
"pinia": "^2.2.6",
|
||||
"qs": "^6.13.1",
|
||||
"radash": "^12.1.0",
|
||||
"vue": "^3.3.11",
|
||||
"vue-i18n": "^9.1.9",
|
||||
@@ -86,4 +87,4 @@
|
||||
"vite": "5.2.8",
|
||||
"vue-tsc": "^1.0.24"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,8 @@ import { merchantApi } from "@@/api"
|
||||
import ProductRow from './product-row.vue'
|
||||
import ProductTotal from './product-total.vue'
|
||||
|
||||
import { filePath } from "@@/utils/file";
|
||||
|
||||
const emit = defineEmits(["update:modelValue", "submit", "doContainer", "add", "remove"])
|
||||
|
||||
export type Props = {
|
||||
@@ -57,7 +59,7 @@ const getHeight = () => {
|
||||
<template>
|
||||
<tm-drawer z-index="100" v-model:show="props.modelValue" showFooter title="购物车" position="bottom" size="60%"
|
||||
@close="doClose">
|
||||
<product-row v-for="(v, i) in props.carList" mode="car" :key="v.id" v-model="v.productCount" :pic="v.productPic"
|
||||
<product-row v-for="(v, i) in props.carList" mode="car" :key="v.id" v-model="v.productCount" :pic="filePath(v.productPic)"
|
||||
:count="v.productCount" :name="v.name" :price="v.productPrice" :marketPrice="v.marketPrice"
|
||||
:salesCount="v.salesCount" :stock="v.stock" @add="() => emit('add', v)" @remove="emit('remove', v)" />
|
||||
<template #footer>
|
||||
|
||||
@@ -47,15 +47,17 @@ const getDetail = async () => {
|
||||
};
|
||||
|
||||
const getShopCar = async () => {
|
||||
const _pa = { merchantId: state.detailId };
|
||||
const _pa = { merchantId: state.detailId, hardType: "CANTEEN" };
|
||||
const { data } = await foodApi.getShopCar(_pa);
|
||||
state.carList = data ?? [];
|
||||
asyncCarCount(state.shopList)
|
||||
state.totPrice = state.carList
|
||||
.map((v) => v.totalPrice)
|
||||
.map((v) => Number(v.totalPrice))
|
||||
.reduce((pre, next) => pre + next, 0);
|
||||
state.totCount = state.carList
|
||||
.map((v) => v.productCount)
|
||||
.reduce((pre, next) => pre + next, 0);
|
||||
|
||||
};
|
||||
|
||||
const getClassify = async () => {
|
||||
@@ -78,7 +80,7 @@ const updateShopCar = async () => {
|
||||
};
|
||||
});
|
||||
if (isEmpty(list)) return;
|
||||
const _pa = { merchantId: state.detailId, list: list };
|
||||
const _pa = { merchantId: state.detailId, list: list, hardType:"CANTEEN" };
|
||||
const { data, code }: any = await foodApi.updateShopCar(_pa);
|
||||
if (code == 0) await getShopCar();
|
||||
};
|
||||
@@ -91,40 +93,26 @@ const getPorduct = async () => {
|
||||
categoryId: target.id,
|
||||
};
|
||||
const { data } = await foodApi.product(_pa);
|
||||
state.shopList = data;
|
||||
state.shopList.forEach((i) => {
|
||||
if (i && i.foodSPURespVOList && i.foodSPURespVOList.length) {
|
||||
i.foodSPURespVOList.forEach((j) => {
|
||||
j.productCount = 0;
|
||||
j.productId = j.id;
|
||||
});
|
||||
}
|
||||
data.forEach((i: any) => {
|
||||
i.productCount = 0;
|
||||
i.productId = i.id;
|
||||
});
|
||||
const shopList = [...state.shopList];
|
||||
// if (state.carList && state.carList.length) {
|
||||
// for (const i of shopList) {
|
||||
// if (i && i.foodSPURespVOList && i.foodSPURespVOList.length) {
|
||||
// for (const j of i.foodSPURespVOList) {
|
||||
// for (const v of state.carList) {
|
||||
// if (j.id == v.productId) {
|
||||
// j.productCount = v.productCount;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
asyncCarCount(data)
|
||||
};
|
||||
|
||||
// 同步购买数量
|
||||
const asyncCarCount = (shopList)=>{
|
||||
if (state.carList && state.carList.length) {
|
||||
for (const i of shopList) {
|
||||
for (const v of state.carList) {
|
||||
if (i.id == v.productId) {
|
||||
i.productCount = v.productCount;
|
||||
i.productCount = v.productCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
state.shopList = shopList;
|
||||
};
|
||||
}
|
||||
|
||||
const doAdd = async (item: any) => {
|
||||
chentProductCount(item);
|
||||
@@ -331,13 +319,6 @@ const doFood = () => {
|
||||
class="flex-1 p-b-20rpx"
|
||||
>
|
||||
<view v-for="(pV, pI) in state.shopList" :key="pI">
|
||||
<!-- <view class="flex-row-center m-y-20rpx">
|
||||
<view class="w-25rpx h-1px bg-#d2d2d2" />
|
||||
<text class="p-x-15rpx second-text-28">
|
||||
{{ cV.categoryName }}
|
||||
</text>
|
||||
<view class="w-25rpx h-1px bg-#d2d2d2" />
|
||||
</view> -->
|
||||
<view class="m-x-15rpx">
|
||||
<product-row
|
||||
:key="pV.id"
|
||||
|
||||
@@ -42,7 +42,7 @@ onShow(() => {
|
||||
})
|
||||
|
||||
const pageRef = ref<any>(null)
|
||||
const pageHook = hooks.usePage(pageRef, foodApi.page, null, 'data.list')
|
||||
const pageHook = hooks.usePage(pageRef, foodApi.page, null, 'data.records')
|
||||
const query = (page: number, pagesize: number) => {
|
||||
pageHook.startPage(page, pagesize, false, state.pa);
|
||||
}
|
||||
@@ -60,13 +60,13 @@ const initDate = () => {
|
||||
})
|
||||
}
|
||||
state.dateList = list
|
||||
state.pa.day = state.dateList[0].dateTime
|
||||
state.pa.startTime = state.dateList[0].dateTime
|
||||
pageRef.value?.reload(false)
|
||||
}
|
||||
|
||||
const doDateItem = (v: any, i: any) => {
|
||||
state.currentDateIndex = i
|
||||
state.pa.day = state.dateList[i].dateTime
|
||||
state.pa.startTime = state.dateList[i].dateTime
|
||||
pageRef.value.reload(true)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,76 +1,87 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import { isEmpty } from 'radash'
|
||||
import { isEmpty } from "radash";
|
||||
|
||||
import { hooks } from "@@/index"
|
||||
import { productApi } from "@@/api"
|
||||
import { hooks } from "@@/index";
|
||||
import { productApi } from "@@/api";
|
||||
|
||||
import zSwiper from "@zebra-ui/swiper/components/z-swiper/z-swiper.vue"
|
||||
import zSwiperItem from "@zebra-ui/swiper/components/z-swiper-item/z-swiper-item.vue"
|
||||
import { filePath } from "@@/utils/file";
|
||||
|
||||
const data = {
|
||||
}
|
||||
import zSwiper from "@zebra-ui/swiper/components/z-swiper/z-swiper.vue";
|
||||
import zSwiperItem from "@zebra-ui/swiper/components/z-swiper-item/z-swiper-item.vue";
|
||||
|
||||
const data = {};
|
||||
const state = reactive<any>({
|
||||
detailId: null,
|
||||
detail: null,
|
||||
})
|
||||
detailId: null,
|
||||
detail: null,
|
||||
});
|
||||
|
||||
onLoad((options: any) => {
|
||||
if (!isEmpty(options.id)) {
|
||||
state.detailId = options.id
|
||||
}
|
||||
if (!isEmpty(options.id)) {
|
||||
state.detailId = options.id;
|
||||
}
|
||||
});
|
||||
onShow(() => {
|
||||
getDetail()
|
||||
})
|
||||
getDetail();
|
||||
});
|
||||
|
||||
const getDetail = async () => {
|
||||
const _pa = { id: state.detailId }
|
||||
const { data } = await productApi.get(_pa)
|
||||
state.detail = data
|
||||
}
|
||||
|
||||
const _pa = { id: state.detailId };
|
||||
const { data } = await productApi.get(_pa);
|
||||
state.detail = data;
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<crud-layout title="订单详情" tabBarType="just-flot-back" bg="/static/page/blue-bg.png">
|
||||
<z-swiper>
|
||||
<z-swiper-item v-for="(v, i) in state.detail.sliderPicUrls" :key="i">
|
||||
<image class="w-100vw" :src="v" mode="widthFix" />
|
||||
</z-swiper-item>
|
||||
</z-swiper>
|
||||
<view class="p-x-15rpx">
|
||||
<view class="flex-col justify-between card p-y-20rpx p-x-30rpx">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row items-center">
|
||||
<view class="second-text-46 color-#f63a36!">¥{{ state.detail.price }}</view>
|
||||
<view class="m-l-20rpx second-text-28 line-through">¥{{ state.detail.marketPrice }}</view>
|
||||
</view>
|
||||
<view class="second-text-26">已售{{ state.detail.salesCount }}</view>
|
||||
</view>
|
||||
<view class="flex-col m-t-15rpx">
|
||||
<view class="sub-text-32">{{ state.detail.name }}</view>
|
||||
<view class="m-t-15rpx second-text-26">{{ state.detail.introduction }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="h-15rpx" />
|
||||
<view class="flex-row items-center justify-between card p-y-20rpx p-x-30rpx">
|
||||
<view class="prefix_title">评价</view>
|
||||
</view>
|
||||
<view class="h-15rpx" />
|
||||
<view class="flex-col justify-between card p-y-20rpx p-x-30rpx">
|
||||
<view class="prefix_title">详情</view>
|
||||
<view class="m-t-15rpx" v-html="state.detail.description"></view>
|
||||
</view>
|
||||
<crud-layout
|
||||
title="订单详情"
|
||||
tabBarType="just-flot-back"
|
||||
bg="/static/page/blue-bg.png"
|
||||
>
|
||||
<image
|
||||
class="w-100vw"
|
||||
:src="filePath(state.detail.picUrl)"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<view class="p-x-15rpx">
|
||||
<view class="flex-col justify-between card p-y-20rpx p-x-30rpx">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row items-center">
|
||||
<view class="second-text-46 color-#f63a36!"
|
||||
>¥{{ state.detail.price }}</view
|
||||
>
|
||||
<view class="m-l-20rpx second-text-28 line-through"
|
||||
>¥{{ state.detail.marketPrice }}</view
|
||||
>
|
||||
</view>
|
||||
<view class="second-text-26">已售{{ state.detail.salesCount }}</view>
|
||||
</view>
|
||||
</crud-layout>
|
||||
<view class="flex-col m-t-15rpx">
|
||||
<view class="sub-text-32">{{ state.detail.name }}</view>
|
||||
<view class="m-t-15rpx second-text-26">{{
|
||||
state.detail.introduction
|
||||
}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="false"
|
||||
class="m-t-15rpx flex-row items-center justify-between card p-y-20rpx p-x-30rpx"
|
||||
>
|
||||
<view class="prefix_title">评价</view>
|
||||
</view>
|
||||
<view v-if="state.detail.description" class="m-t-15rpx flex-col justify-between card p-y-20rpx p-x-30rpx">
|
||||
<view class="prefix_title">详情</view>
|
||||
<view class="m-t-15rpx" v-html="state.detail.description"></view>
|
||||
</view>
|
||||
</view>
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep() {
|
||||
.layout_main>scroll-view {
|
||||
padding: 0 !important;
|
||||
}
|
||||
.layout_main > scroll-view {
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
+10
-12
@@ -6,6 +6,8 @@ import { isEmpty } from "radash"
|
||||
import { hooks, constant, router } from "@@/index"
|
||||
import { orderApi, refundApi } from "@@/api"
|
||||
|
||||
import { filePath } from "@@/utils/file";
|
||||
|
||||
const data = {
|
||||
|
||||
}
|
||||
@@ -90,10 +92,6 @@ const doCancelRefund = async () => {
|
||||
<view>商户</view>
|
||||
<view>{{ state.detail.merchantStr }}</view>
|
||||
</view>
|
||||
<view class="info_cell">
|
||||
<view>部门</view>
|
||||
<view>{{ state.detail.deptName }}</view>
|
||||
</view>
|
||||
<view class="m-t-15rpx h-1px bg-#999 bg-opacity-5" />
|
||||
<view class="info_cell">
|
||||
<view>订单号</view>
|
||||
@@ -117,29 +115,29 @@ const doCancelRefund = async () => {
|
||||
<view class="flex-row items-start justify-between" v-for="(v, i) in state.shopCarList" :key="i"
|
||||
@tap.stop="router.jump('/pages/merchant/product-detail', { id: v.productId })">
|
||||
<view class="flex-row items-center">
|
||||
<image class="w-160rpx h-160rpx rounded-8rpx" :src="v.productPic" mode="aspectFill" />
|
||||
<image class="w-160rpx h-160rpx rounded-8rpx" :src="filePath(v.productPic)" mode="aspectFill" />
|
||||
<view class="flex-col m-l-15rpx second-text-26">
|
||||
<view class="sub-text-28">{{ v.productName }}</view>
|
||||
<view class="m-t-5rpx">¥ {{ hooks.useMoney(v.productPrice) }}</view>
|
||||
<view class="m-t-5rpx color-red">¥ {{ hooks.useMoney(v.productPrice) }}</view>
|
||||
<view class="m-t-5rpx">x {{ v.productCount }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row-center">
|
||||
<view class="sub-text-32">¥ {{ hooks.useMoney(v.totalPrice) }}</view>
|
||||
<view class="sub-text-32 color-red!">¥ {{ hooks.useMoney(v.totalPrice) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-y-15rpx h-1px bg-#999 bg-opacity-5" />
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="sub-text-32">实付款</view>
|
||||
<view class="flex-row items-end">
|
||||
<view class="sub-text-28">¥</view>
|
||||
<view class="m-l-5rpx sub-text-32">{{ hooks.useMoney(state.detail.practicalTotalPrice) }}</view>
|
||||
<view class="sub-text-28 color-red!">¥</view>
|
||||
<view class="m-l-5rpx sub-text-32 color-red!">{{ hooks.useMoney(state.detail.payPrice) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- start 退款相关 start -->
|
||||
<slot v-if="state.detail.orderStatus == 10">
|
||||
<slot v-if="['10'].includes(state.detail.orderStatus)">
|
||||
<view class="flex-row items-center justify-between card p-x-20rpx p-y-30rpx m-b-20rpx"
|
||||
@tap="router.jump('/pages/refund/history', { id: state.refundDetail.id })">
|
||||
<view>
|
||||
@@ -195,14 +193,14 @@ const doCancelRefund = async () => {
|
||||
<!-- end 退款相关 end -->
|
||||
<view class="h-30rpx" />
|
||||
<template #main-bottom>
|
||||
<view v-if="state.detail.orderStatus == 10 && state.refundDetail.status != 62"
|
||||
<view v-if="state.detail.orderStatus == 10 && state.refundDetail.status == 62"
|
||||
class="bg-#999 p-y-20rpx text-center rounded-40rpx m-x-30rpx m-y-30rpx sub-text-30 color-white!"
|
||||
@tap="doCancelRefund">
|
||||
取消申请
|
||||
</view>
|
||||
<view v-else-if="state.refundDetail.status == 62"
|
||||
class="bg-#999 p-y-20rpx text-center rounded-40rpx m-x-30rpx m-y-30rpx sub-text-30 color-white!"
|
||||
@tap=" router.jump('/pages/refund/apply', { id: state.detailId }, 2)">
|
||||
@tap="router.jump('/pages/refund/apply', { id: state.detailId }, 2)">
|
||||
重新申请
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -6,6 +6,8 @@ import { isEmpty } from "radash"
|
||||
import { hooks, router } from "@@/index"
|
||||
import { orderApi, refundApi, commonApi } from "@@/api"
|
||||
|
||||
import { filePath } from "@@/utils/file";
|
||||
|
||||
const data = {
|
||||
payType: [
|
||||
{ text: "仅退款", disabled: false, visible: true, type: "10", value: "10" },
|
||||
@@ -42,7 +44,7 @@ const getSetting = async () => {
|
||||
const _pa = {};
|
||||
const { data } = await commonApi.setting(_pa)
|
||||
state.setting = data
|
||||
state.selectList = data.afterSaleRefundReasons.map(v => {
|
||||
state.selectList = data.afterSaleRefundReasons?.split(",").map(v => {
|
||||
return {
|
||||
id: v,
|
||||
title: v,
|
||||
@@ -91,7 +93,7 @@ const doSubmit = async () => {
|
||||
const _pa = {
|
||||
way: applyForm.way,
|
||||
refundPrice: state.detail.practicalTotalPrice,
|
||||
orderItemId: state.detailId,
|
||||
orderId: state.detailId,
|
||||
images: [],
|
||||
applyReason: applyForm.reasonStr,
|
||||
applyDescription: applyForm.remark,
|
||||
@@ -119,7 +121,7 @@ const doSubmit = async () => {
|
||||
<view class="flex-row items-start justify-between" v-for="(v, i) in state.shopCarList" :key="i"
|
||||
@tap.stop="router.jump('/pages/merchant/product-detail', { id: v.productId })">
|
||||
<view class="flex-row items-center">
|
||||
<image class="w-160rpx h-160rpx rounded-8rpx" :src="v.productPic" mode="aspectFill" />
|
||||
<image class="w-160rpx h-160rpx rounded-8rpx" :src="filePath(v.productPic)" mode="aspectFill" />
|
||||
<view class="flex-col m-l-15rpx second-text-26">
|
||||
<view class="sub-text-28">{{ v.productName }}</view>
|
||||
<view class="m-t-5rpx">¥ {{ hooks.useMoney(v.productPrice) }}</view>
|
||||
@@ -135,7 +137,7 @@ const doSubmit = async () => {
|
||||
<view class="sub-text-28">实付款</view>
|
||||
<view class="flex-row items-end">
|
||||
<view class="sub-text-28">¥</view>
|
||||
<view class="m-l-5rpx sub-text-28">{{ hooks.useMoney(state.detail.practicalTotalPrice) }}</view>
|
||||
<view class="m-l-5rpx sub-text-28">{{ hooks.useMoney(state.detail.payPrice) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -151,7 +153,7 @@ const doSubmit = async () => {
|
||||
</view>
|
||||
<view class="flex-row items-center justify-between card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<view class="sub-text-28">退款金额</view>
|
||||
<view class="sub-text-28 color-red!">¥{{ hooks.useMoney(state.detail.practicalTotalPrice) }}</view>
|
||||
<view class="sub-text-28 color-red!">¥{{ hooks.useMoney(state.detail.payPrice) }}</view>
|
||||
</view>
|
||||
<view class="card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<tm-picker rang-key="title" rang-text="title" v-model="applyForm.reason"
|
||||
|
||||
+31
-85
@@ -5,6 +5,8 @@ import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import { hooks, router } from "@@/index";
|
||||
import { orderApi, payApi } from "@@/api";
|
||||
|
||||
import { filePath } from "@@/utils/file";
|
||||
|
||||
import zTabs from "@@/components/other/z-tabs/z-tabs.vue";
|
||||
|
||||
const data = {
|
||||
@@ -22,7 +24,7 @@ const state = reactive<any>({
|
||||
},
|
||||
});
|
||||
|
||||
onLoad(() => {});
|
||||
onLoad(() => { });
|
||||
onShow(async () => {
|
||||
const isLogin = await hooks.useCheckLogin();
|
||||
if (!isLogin) return;
|
||||
@@ -37,11 +39,11 @@ const doTab = (e: any) => {
|
||||
};
|
||||
|
||||
const pageRef = ref<any>(null);
|
||||
const pageHook = hooks.usePage(pageRef, orderApi.page, null, "data.list");
|
||||
const pageHook = hooks.usePage(pageRef, orderApi.page, null, "data.records");
|
||||
const query = (page: number, pagesize: number) => {
|
||||
const isLogin = hooks.useStaticCheckLogin();
|
||||
console.log(isLogin,"isLogin");
|
||||
|
||||
console.log(isLogin, "isLogin");
|
||||
|
||||
if (!isLogin) return;
|
||||
pageHook.startPage(page, pagesize, false, state.pa);
|
||||
};
|
||||
@@ -50,7 +52,7 @@ const doToDetail = (v: any) => {
|
||||
router.jump("/pages/order/detail", { id: v.id });
|
||||
};
|
||||
|
||||
const doAppraise = () => {};
|
||||
const doAppraise = () => { };
|
||||
|
||||
const doRefund = (v: any) => {
|
||||
router.jump("/pages/refund/apply", { id: v.id });
|
||||
@@ -59,20 +61,9 @@ const doRefund = (v: any) => {
|
||||
|
||||
<template>
|
||||
<crud-layout title="订单" bg="/static/page/blue-bg.png">
|
||||
<z-paging
|
||||
ref="pageRef"
|
||||
height="100%"
|
||||
:fixed="false"
|
||||
v-model="pageHook.list"
|
||||
:default-page-size="5"
|
||||
safe-area-inset-bottom
|
||||
:loading-more-enabled="true"
|
||||
:show-scrollbar="false"
|
||||
@query="query"
|
||||
:auto-clean-list-when-reload="false"
|
||||
:auto-scroll-to-top-when-reload="false"
|
||||
@scroll="pageHook.scroll"
|
||||
>
|
||||
<z-paging ref="pageRef" height="100%" :fixed="false" v-model="pageHook.list" :default-page-size="5"
|
||||
safe-area-inset-bottom :loading-more-enabled="true" :show-scrollbar="false" @query="query"
|
||||
:auto-clean-list-when-reload="false" :auto-scroll-to-top-when-reload="false" @scroll="pageHook.scroll">
|
||||
<template #top>
|
||||
<view class="h-30rpx" />
|
||||
<view class="bg-white rounded-16rpx px-20rpx">
|
||||
@@ -80,39 +71,23 @@ const doRefund = (v: any) => {
|
||||
</view>
|
||||
</template>
|
||||
<view class="h-20rpx" />
|
||||
<view
|
||||
class="flex-col justify-center card p-x-15rpx p-y-25rpx m-b-20rpx"
|
||||
v-for="(v, i) in pageHook.list"
|
||||
:key="i"
|
||||
@tap="doToDetail(v)"
|
||||
>
|
||||
<view class="flex-col justify-center card p-x-15rpx p-y-25rpx m-b-20rpx" v-for="(v, i) in pageHook.list" :key="i"
|
||||
@tap="doToDetail(v)">
|
||||
<view class="flex-row items-center">
|
||||
<image
|
||||
class="w-80rpx h-80rpx rounded-8rpx"
|
||||
:src="v.merchantLogo"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<image class="w-80rpx h-80rpx rounded-8rpx" :src="filePath(v.logoPic)" mode="aspectFill" />
|
||||
<view class="flex-1 flex-col m-l-20rpx">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row items-center">
|
||||
<view class="main-text-28">{{ v.merchantStr }}</view>
|
||||
<view
|
||||
class="m-l-15rpx color-#999 font-size-26rpx! iconfont icon-youjiantou"
|
||||
/>
|
||||
<view class="main-text-28">{{ v.merchantName }}</view>
|
||||
<view class="m-l-15rpx color-#999 font-size-26rpx! iconfont icon-youjiantou" />
|
||||
</view>
|
||||
<tm-tag v-if="v.orderStatus == 1" color="info" size="xs"
|
||||
>未支付</tm-tag
|
||||
>
|
||||
<tm-tag v-if="v.orderStatus == 5" color="success" size="xs"
|
||||
>待核销</tm-tag
|
||||
>
|
||||
<tm-tag v-if="v.orderStatus == 10" color="error" size="xs"
|
||||
>售后中</tm-tag
|
||||
>
|
||||
<tm-tag v-if="v.orderStatus == 1" color="info" size="xs">未支付</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 5" color="success" size="xs">待核销</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 10" color="error" size="xs">售后中</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 15" size="xs">已核销</tm-tag>
|
||||
</view>
|
||||
<view class="flex-row items-center justify-between m-t-5rpx">
|
||||
<view class="second-text-26">
|
||||
<view class="second-text-20">
|
||||
<text>下单时间</text>
|
||||
<text class="m-l-10rpx">
|
||||
{{ hooks.useTime(v.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}
|
||||
@@ -128,22 +103,14 @@ const doRefund = (v: any) => {
|
||||
<view class="absolute top-0 right-0 bottom-0 left-0 h-180rpx">
|
||||
<scroll-view scroll-x class="flex-row-center whitespace-nowrap">
|
||||
<view class="flex-row items-center">
|
||||
<view
|
||||
class="inline-flex! flex-col justify-center h-180rpx m-r-20rpx"
|
||||
v-for="(pV, pI) in v.shopCarList"
|
||||
:key="pI"
|
||||
@tap.stop="
|
||||
<view class="inline-flex! flex-col justify-center h-180rpx m-r-20rpx" v-for="(pV, pI) in v.carList"
|
||||
:key="pI" @tap.stop="
|
||||
router.jump('/pages/merchant/product-detail', {
|
||||
id: pV.productId,
|
||||
})
|
||||
"
|
||||
>
|
||||
<image
|
||||
class="w-160rpx h-120rpx rounded-8rpx"
|
||||
:src="pV.productPic"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view class="w-160rpx m-t-10rpx sub-text-28 show-line">
|
||||
">
|
||||
<image class="w-160rpx h-120rpx rounded-8rpx" :src="filePath(pV.productPic)" mode="aspectFill" />
|
||||
<view class="w-160rpx m-t-10rpx sub-text-24 show-line text-center">
|
||||
{{ pV.productName }}
|
||||
</view>
|
||||
</view>
|
||||
@@ -154,37 +121,16 @@ const doRefund = (v: any) => {
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view
|
||||
class="absolute top-0 right-0 bottom-0 z-10 flex-col items-end w-160rpx p-x-20rpx bg-white bg-opacity-95"
|
||||
>
|
||||
<view class="main-text-30"
|
||||
>¥ {{ hooks.useMoney(v.totalPrice) }}</view
|
||||
>
|
||||
<view class="m-t-10rpx second-text-26"
|
||||
>共 {{ v.shopCarList.length }} 件</view
|
||||
>
|
||||
class="absolute top-0 right-0 bottom-0 z-10 flex-col items-end w-160rpx p-x-20rpx bg-white bg-opacity-95">
|
||||
<view class="main-text-30 color-red!">¥ {{ hooks.useMoney(v.totalPrice) }}</view>
|
||||
<view class="m-t-10rpx second-text-26">共 {{ v.carList.length }} 件</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="[5, 10].includes(v.orderStatus)"
|
||||
class="flex-row items-center justify-end p-t-20rpx"
|
||||
>
|
||||
<view
|
||||
v-if="v.orderStatus == 10"
|
||||
class="botder_btn"
|
||||
@tap.stop="doAppraise"
|
||||
>评价</view
|
||||
>
|
||||
<view
|
||||
v-if="v.orderStatus == 5 && v.orderType == 2"
|
||||
class="botder_btn"
|
||||
@tap.stop="doRefund(v)"
|
||||
>退款
|
||||
<view v-if="['5', '10'].includes(v.orderStatus)" class="flex-row items-center justify-end p-t-20rpx">
|
||||
<view v-if="v.orderStatus == 5 && v.orderType == 2" class="botder_btn" @tap.stop="doRefund(v)">退款
|
||||
</view>
|
||||
<view
|
||||
v-if="v.orderStatus == 5 && v.orderType == 2"
|
||||
class="m-l-20rpx botder_btn"
|
||||
@tap.stop="hooks.usePreviewImage(v.orderTypeExtendReserve.qrCode)"
|
||||
>
|
||||
<view v-if="v.orderStatus == 5 && v.orderType == 2" class="m-l-20rpx botder_btn"
|
||||
@tap.stop="hooks.usePreviewImage(v.orderTypeExtendReserve.qrCode)">
|
||||
核销码
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -3,7 +3,7 @@ import request from "@/sheep/utils/request";
|
||||
export default {
|
||||
setting: (params: any) =>
|
||||
request({
|
||||
url: "pay/setting/get",
|
||||
url: "wallet/wallet-setting/app/get-setting",
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
import request from "@/sheep/utils/request";
|
||||
|
||||
export default {
|
||||
page: (params: any) =>
|
||||
page: (data: any) =>
|
||||
request({
|
||||
url: `/canteen/canteenDailyMenu/ad/getCanteenList`,
|
||||
method: "GET",
|
||||
params,
|
||||
url: `/canteen/canteenDailyMenu/app/page`,
|
||||
method: "POST",
|
||||
data,
|
||||
params:{
|
||||
pageNo: data.pageNo,
|
||||
pagesize: data.pagesize
|
||||
},
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
}),
|
||||
shopCarList: (params: any) =>
|
||||
request({
|
||||
url: `/hardware/car/get-by-order-id`,
|
||||
url: `/hard/hard-car/app/order-id`,
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
|
||||
@@ -3,7 +3,7 @@ import request from "@/sheep/utils/request";
|
||||
export default {
|
||||
get: (params) => {
|
||||
return request({
|
||||
url: "/onlinefood/spu/get-detail",
|
||||
url: "/canteen/canteenOnlineSpu/app/getCanteenSpuDetails",
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
|
||||
+10
-10
@@ -3,28 +3,28 @@ import request from "@/sheep/utils/request";
|
||||
export default {
|
||||
create: (data: any) => {
|
||||
return request({
|
||||
url: "/hardware/trade-after-sale/create",
|
||||
url: "/hard/hard-after-sale/app/create",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
},
|
||||
cancel: (params: any) => {
|
||||
return request({
|
||||
url: "/hard/hard-after-sale/app/cancel",
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
},
|
||||
get: (params: any) => {
|
||||
return request({
|
||||
url: "/hardware/trade-after-sale/get-by-order-id",
|
||||
url: "/hard/hard-after-sale/app/detail-by-order-id",
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
},
|
||||
history: (params: any) => {
|
||||
return request({
|
||||
url: "/hardware/trade-after-sale/history",
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
},
|
||||
cancel: (params: any) => {
|
||||
return request({
|
||||
url: "/hardware/trade-after-sale/cancel",
|
||||
url: "/hard/hard-after-sale/app/history",
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
|
||||
@@ -50,8 +50,8 @@ export const usePage = (
|
||||
return state;
|
||||
}
|
||||
const _data = {
|
||||
pageNo: page,
|
||||
pagesize: pagesize,
|
||||
current: page,
|
||||
size: pagesize,
|
||||
...query,
|
||||
};
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user