调试接口
This commit is contained in:
@ -217,4 +217,11 @@ export interface IGetStoreIncomeListParams {
|
||||
|
||||
export function getStoreIncomeList(data: IGetStoreIncomeListParams) {
|
||||
return http.Post<any>('/storeapi/user/checkStoreAccountList', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫码验券
|
||||
*/
|
||||
export function scanVerifyCoupon(qr_sn: string, store_id: number) {
|
||||
return http.Post<any>('/storeapi/group/cancelCode', { qr_sn, store_id })
|
||||
}
|
||||
@ -27,19 +27,20 @@
|
||||
<wd-img width="690rpx" height="240rpx" :src="`${OSS}images/store/home/image1.png`" mode="aspectFit" />
|
||||
|
||||
<!-- 本月收入 -->
|
||||
<view class="flex flex-col justify-center items-center absolute top-42rpx left-46rpx">
|
||||
<view class="font-400 text-26rpx text-[#825F37] leading-36rpx">本月收入</view>
|
||||
<view class="mt-42rpx">
|
||||
<price-format color="#825F37" :first-size="36" :second-size="36" :subscript-size="24" :price="statistics.month"></price-format>
|
||||
<view class=" absolute top-42rpx left-46rpx w-120rpx ">
|
||||
<view class="flex flex-col justify-center items-center">
|
||||
<view class="font-400 text-26rpx text-[#825F37] leading-36rpx">本月收入</view>
|
||||
<view class="mt-42rpx">
|
||||
<price-format color="#825F37" :first-size="36" :second-size="36" :subscript-size="24" :price="statistics.month"></price-format>
|
||||
</view>
|
||||
</view>
|
||||
<view class="absolute top-20rpx left-160rpx">
|
||||
<wd-img width="6rpx" height="188rpx" :src="`${OSS}images/store/home/image2.png`" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="absolute top-42rpx left-174rpx">
|
||||
<wd-img width="6rpx" height="188rpx" :src="`${OSS}images/store/home/image2.png`" mode="aspectFit" />
|
||||
</view>
|
||||
|
||||
<!-- 下单金额 -->
|
||||
<view class="flex flex-col justify-center items-center absolute top-42rpx left-208rpx">
|
||||
<view class="flex flex-col justify-center items-center absolute top-42rpx left-240rpx w-140rpx">
|
||||
<view class="font-400 text-26rpx text-[#825F37] leading-36rpx">下单金额</view>
|
||||
<view class="mt-26rpx">
|
||||
<price-format color="#825F37" :first-size="36" :second-size="36" :subscript-size="24" :price="statistics.today_price"></price-format>
|
||||
@ -48,7 +49,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 核销金额 -->
|
||||
<view class="flex flex-col justify-center items-center absolute top-42rpx left-368rpx">
|
||||
<view class="flex flex-col justify-center items-center absolute top-42rpx left-420rpx w-140rpx">
|
||||
<view class="font-400 text-26rpx text-[#825F37] leading-36rpx">核销金额</view>
|
||||
<view class="mt-26rpx">
|
||||
<price-format color="#825F37" :first-size="36" :second-size="36" :subscript-size="24" :price="statistics.yan_price"></price-format>
|
||||
@ -125,8 +126,9 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { router } from '@/utils/tools'
|
||||
import { getStoreList, getStoreDetails, getStoreStatistics } from '@/api/store'
|
||||
import { getStoreList, getStoreDetails, getStoreStatistics, scanVerifyCoupon } from '@/api/store'
|
||||
import { useStoreStore } from '@/store'
|
||||
import { toast } from '@/utils/toast'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
const navbarHeight = inject('navbarHeight')
|
||||
@ -240,6 +242,21 @@
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
console.log('scanCode res:', res)
|
||||
uni.showLoading({
|
||||
title: '验券中...'
|
||||
})
|
||||
try {
|
||||
scanVerifyCoupon(res.result, useStore.defaultStore.id).then((res) => {
|
||||
toast.info('验券成功')
|
||||
uni.hideLoading()
|
||||
}).catch((error) => {
|
||||
uni.hideLoading()
|
||||
return false
|
||||
})
|
||||
} catch(e) {
|
||||
uni.hideLoading()
|
||||
return false
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('scanCode err:', err)
|
||||
|
||||
@ -66,8 +66,8 @@
|
||||
mobile: string
|
||||
passowrd: string
|
||||
}>({
|
||||
mobile: '15005837859',
|
||||
passowrd: '123456'
|
||||
mobile: '',
|
||||
passowrd: ''
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user