This commit is contained in:
2026-03-30 18:36:15 +08:00
parent 15da975168
commit 490fbb7399
3 changed files with 33 additions and 62 deletions

View File

@ -2,7 +2,7 @@ import request from "../utils/request";
import { LOGIN, GET_PHONE, USER_SHARE,USER_WALLET,RECHARGE_WALLET,USER_WXPAY,USER_TRANSACTION,USER_ADDITIONAL,MEMBER_TYPES, import { LOGIN, GET_PHONE, USER_SHARE,USER_WALLET,RECHARGE_WALLET,USER_WXPAY,USER_TRANSACTION,USER_ADDITIONAL,MEMBER_TYPES,
USER_RECHARGE,USER_REDEEM,USER_HolderList,USER_MEMBERSHIP,USER_BINDPETS,USER_PETBINDING,USER_DISCOUNTFEE,USER_COUPONLIST,CANCEL_PET_ORDER, USER_RECHARGE,USER_REDEEM,USER_HolderList,USER_MEMBERSHIP,USER_BINDPETS,USER_PETBINDING,USER_DISCOUNTFEE,USER_COUPONLIST,CANCEL_PET_ORDER,
GET_VIP_PRICE,POINTS_RECHARGE_LIST,POINTS_DONATE,POINTS_RECORDS,POINTS_RANK,OSS_STS,DONATION_SUMMARY, GET_VIP_PRICE,POINTS_RECHARGE_LIST,POINTS_DONATE,POINTS_RECORDS,POINTS_RANK,OSS_STS,DONATION_SUMMARY,
USER_DISPATCHFEE,CANCEL_MALL_ORDER USER_DISPATCHFEE,CANCEL_MALL_ORDER,DOUY_REVIEW
} from "./url"; } from "./url";
// 微信登陆 // 微信登陆
export const getCodeByWxLogin = () => { export const getCodeByWxLogin = () => {
@ -163,6 +163,14 @@ export const getDonationSummary = () => {
}); });
}; };
// 抖音审核
export const getdouyReview = () => {
return request({
url: DOUY_REVIEW,
method: "GET"
});
};
// 获取OSS配置 // 获取OSS配置
export const getOssConfig = () => { export const getOssConfig = () => {
return request({ return request({

View File

@ -53,9 +53,8 @@ export const ADDITIONAL_SERVICES_APPEND = '/order/additional_services/append'
// 取消预约订单接口 // 取消预约订单接口
export const CANCEL_PET_ORDER = '/order/pet/cancel' export const CANCEL_PET_ORDER = '/order/pet/cancel'
// 抖音审核接口
export const DOUY_REVIEW = '/douyin/goods/order/appointment'
// 取消商城接口 // 取消商城接口
export const CANCEL_MALL_ORDER = '/douyin/goods/order/cancel' export const CANCEL_MALL_ORDER = '/douyin/goods/order/cancel'

View File

@ -119,7 +119,8 @@
<script> <script>
import InfoCell from "@/page-reser/components/info-cell.vue"; import InfoCell from "@/page-reser/components/info-cell.vue";
import { import {
gitDiscountfee gitDiscountfee,
getdouyReview
} from "../../api/login"; } from "../../api/login";
import { import {
ARTICLE_TYPE_RESERVATION_CAT, ARTICLE_TYPE_RESERVATION_CAT,
@ -187,61 +188,24 @@ export default {
methods: { methods: {
// 核销按钮点击处理 // 核销按钮点击处理
async writeOff () { async writeOff () {
try { const data = {
// 调用核销 API goods_order_id:1, //抖音商品订单id整数
const result = await tt.verifyCertificates({ order_date:'2026-03-01', //预约日期2026-03-01格式
// 唯一标识,防止重复提交(重要! period_id:1, //预约时间段id整数
verifyToken: `${Date.now()}_${Math.random()}`, address_id:1, //地址id整数
recipient_name:'用户姓名', //用户姓名
// 当前核销的门店ID phone:123, //用户手机
poiId: this.data.currentPoiId, park_desc:123, //停车描述
note:'哈哈' // 备注
// 要核销的订单和券列表 };
orderList: [ getdouyReview(data).then((res) => {
{ if (res.code == 0) {
orderId: '100238388744094', // 订单ID uni.showToast({
certificateList: [ // 本次要核销的券 title: "预约成功",
'724375050697789', // 普通团购券 icon: "none",
// 次卡需要特殊格式 });
{
code: '723733187837987',
times: 2 // 本次核销2次
}
]
}
],
// 【必填】核销成功后跳转的页面
orderEntrySchema: {
path: 'pages/order/detail', // 你的订单详情页路径
params: JSON.stringify({ orderId: 'xxx' })
},
// 成功回调仅代表API调用成功
success: (res) => {
console.log('API调用成功', res);
// 需要遍历确认每个券的核销结果
const verifyResults = res.orderVerifyResults;
const allSuccess = verifyResults.every(item => item.resultCode === 0);
if (allSuccess) {
tt.showToast({ title: '核销成功' });
// 刷新页面或跳转
} else {
tt.showToast({ title: '部分核销失败', icon: 'none' });
}
},
// 失败回调
fail: (err) => {
console.error('核销失败', err);
tt.showToast({ title: '核销失败,请重试', icon: 'none' });
} }
}); });
} catch (error) {
console.error('调用异常', error);
}
}, },
getPetShortName(pet) { getPetShortName(pet) {