feat:商户、订单接口替换
This commit is contained in:
1 parent
2fde3715e3
commit
3321d7aeb7
6 files changed
+22
-21
No files matched your search
@@ -6,6 +6,8 @@ import { isEmpty } from "radash"
|
||||
import { hooks, router } from "@@/index"
|
||||
import { merchantApi, foodApi, payApi } from "@@/api"
|
||||
|
||||
import { filePath } from "@@/utils/file"
|
||||
|
||||
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"
|
||||
|
||||
@@ -205,8 +207,8 @@ const doFood = () => {
|
||||
<tm-sticky>
|
||||
<!-- start 轮播 start -->
|
||||
<z-swiper>
|
||||
<z-swiper-item v-for="(v, i) in state.detail.swiper?.split(',')" :key="i">
|
||||
<image class="w-100vw h-400rpx" :src="v" mode="aspectFill" />
|
||||
<z-swiper-item v-for="(v, i) in state.detail.swiperPic?.split(',')" :key="i">
|
||||
<image class="w-100vw h-400rpx" :src="filePath(v)" mode="aspectFill" />
|
||||
</z-swiper-item>
|
||||
</z-swiper>
|
||||
<!-- end 轮播 end -->
|
||||
@@ -215,22 +217,23 @@ const doFood = () => {
|
||||
<!-- start 简介 start -->
|
||||
<view class="h-15rpx" />
|
||||
<view flex-row card p-20rpx>
|
||||
<image class="w-160rpx h-160rpx rounded-12rpx" :src="state.detail.logo" mode="aspectFill" />
|
||||
<image class="w-160rpx h-160rpx rounded-12rpx" :src="filePath(state.detail.logoPic)"
|
||||
mode="aspectFill" />
|
||||
<view class="flex-1 flex-col m-l-20rpx">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row-center sub-text-36">
|
||||
<text>{{ state.detail.name }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<tm-tag size="s">{{ state.detail.deptStr }}</tm-tag>
|
||||
<tm-tag size="s">{{ state.detail.deptName }}</tm-tag>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-t-10rpx second-text-28">
|
||||
<text>营业时间</text>
|
||||
<text class="m-l-10rpx">
|
||||
{{ hooks.useTime(state.detail.applianceStartTime, "{h}:{i}") }}
|
||||
{{ state.detail.jobStartTime }}
|
||||
~
|
||||
{{ hooks.useTime(state.detail.applianceEndTime, "{h}:{i}") }}
|
||||
{{ state.detail.jobEndTime }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="m-t-10rpx second-text-28">
|
||||
|
||||
@@ -5,10 +5,12 @@ import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import { hooks, router } from "@@/index"
|
||||
import { merchantApi } from "@@/api"
|
||||
|
||||
import { filePath } from "@@/utils/file"
|
||||
|
||||
const state = reactive<any>({
|
||||
pa: {
|
||||
pagesize: 10,
|
||||
type: 'canteen'
|
||||
type: '1'
|
||||
}
|
||||
})
|
||||
|
||||
@@ -22,7 +24,7 @@ onShow(() => {
|
||||
})
|
||||
|
||||
const pageRef = ref<any>(null)
|
||||
const pageHook = hooks.usePage(pageRef, merchantApi.page, null, 'data.list')
|
||||
const pageHook = hooks.usePage(pageRef, merchantApi.page, null, 'data.records')
|
||||
const query = (page: number, pagesize: number) => {
|
||||
pageHook.startPage(page, pagesize, false, state.pa);
|
||||
}
|
||||
@@ -39,22 +41,22 @@ const query = (page: number, pagesize: number) => {
|
||||
</template>
|
||||
<view class="flex-row card p-20rpx m-b-20rpx" v-for="(v, i) in pageHook.list" :key="i"
|
||||
@tap="router.jump('/pages/merchant/detail', { id: v.id })">
|
||||
<image class="w-160rpx h-160rpx rounded-12rpx" :src="v.logo" mode="aspectFill" />
|
||||
<image class="w-160rpx h-160rpx rounded-12rpx" :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-center sub-text-34">
|
||||
<text> {{ v.name }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<tm-tag size="s">{{ v.deptStr }}</tm-tag>
|
||||
<tm-tag size="s">{{ v.deptName }}</tm-tag>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-t-10rpx second-text-28">
|
||||
<text>营业时间</text>
|
||||
<text class="m-l-10rpx">
|
||||
{{ hooks.useTime(v.applianceStartTime, "{h}:{i}") }}
|
||||
{{ v.jobStartTime }}
|
||||
~
|
||||
{{ hooks.useTime(v.applianceEndTime, "{h}:{i}") }}
|
||||
{{ v.jobEndTime }}
|
||||
</text>
|
||||
</view>
|
||||
<view v-if="v.addressDes" class="m-t-10rpx second-text-28">
|
||||
|
||||
@@ -76,10 +76,6 @@ const doPay = async () => {
|
||||
channelCode: targetPayType.value,
|
||||
channelExtras: {},
|
||||
}
|
||||
const { data: payData, code: payCode }: any = await payApi.submitOrder(_payPa)
|
||||
if (payCode != 0) throw new Error()
|
||||
state.currentPayType = 1
|
||||
state.currentRecharge = -1
|
||||
getDetail()
|
||||
uni.hideLoading()
|
||||
uni.showToast({ title: '充值成功', icon: "none" });
|
||||
|
||||
@@ -3,7 +3,7 @@ import request from "@/sheep/utils/request";
|
||||
export default {
|
||||
page: (params: any) =>
|
||||
request({
|
||||
url: "/merchant/manage/page-join",
|
||||
url: "/wallet/mch-manage/app/page-join",
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
@@ -12,7 +12,7 @@ export default {
|
||||
}),
|
||||
detail: (params: any) =>
|
||||
request({
|
||||
url: "/merchant/manage/get",
|
||||
url: "/wallet/mch-manage/app/detail",
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
|
||||
@@ -3,7 +3,7 @@ import request from "@/sheep/utils/request";
|
||||
export default {
|
||||
page: (params: any) =>
|
||||
request({
|
||||
url: `/hardware/order/page-join`,
|
||||
url: `/hard/hard-order/app/page-join`,
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
@@ -12,7 +12,7 @@ export default {
|
||||
}),
|
||||
detail: (params: any) =>
|
||||
request({
|
||||
url: `/hardware/order/get-join`,
|
||||
url: `/hard/hard-order/app/detail`,
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
|
||||
@@ -83,7 +83,7 @@ export default {
|
||||
}),
|
||||
recharge: (data: any) =>
|
||||
request({
|
||||
url: "pay/wallet-recharge/create",
|
||||
url: "wallet/wallet-recharge/app/create",
|
||||
method: "POST",
|
||||
data,
|
||||
custom: {
|
||||
|
||||
Reference in new issue
Block a user