1
This commit is contained in:
@ -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,
|
||||
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,
|
||||
USER_DISPATCHFEE,CANCEL_MALL_ORDER
|
||||
USER_DISPATCHFEE,CANCEL_MALL_ORDER,DOUY_REVIEW
|
||||
} from "./url";
|
||||
// 微信登陆
|
||||
export const getCodeByWxLogin = () => {
|
||||
@ -163,6 +163,14 @@ export const getDonationSummary = () => {
|
||||
});
|
||||
};
|
||||
|
||||
// 抖音审核
|
||||
export const getdouyReview = () => {
|
||||
return request({
|
||||
url: DOUY_REVIEW,
|
||||
method: "GET"
|
||||
});
|
||||
};
|
||||
|
||||
// 获取OSS配置
|
||||
export const getOssConfig = () => {
|
||||
return request({
|
||||
|
||||
@ -53,9 +53,8 @@ export const ADDITIONAL_SERVICES_APPEND = '/order/additional_services/append'
|
||||
// 取消预约订单接口
|
||||
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'
|
||||
|
||||
@ -119,7 +119,8 @@
|
||||
<script>
|
||||
import InfoCell from "@/page-reser/components/info-cell.vue";
|
||||
import {
|
||||
gitDiscountfee
|
||||
gitDiscountfee,
|
||||
getdouyReview
|
||||
} from "../../api/login";
|
||||
import {
|
||||
ARTICLE_TYPE_RESERVATION_CAT,
|
||||
@ -187,62 +188,25 @@ export default {
|
||||
methods: {
|
||||
// 核销按钮点击处理
|
||||
async writeOff () {
|
||||
try {
|
||||
// 调用核销 API
|
||||
const result = await tt.verifyCertificates({
|
||||
// 唯一标识,防止重复提交(重要!)
|
||||
verifyToken: `${Date.now()}_${Math.random()}`,
|
||||
|
||||
// 当前核销的门店ID
|
||||
poiId: this.data.currentPoiId,
|
||||
|
||||
// 要核销的订单和券列表
|
||||
orderList: [
|
||||
{
|
||||
orderId: '100238388744094', // 订单ID
|
||||
certificateList: [ // 本次要核销的券
|
||||
'724375050697789', // 普通团购券
|
||||
// 次卡需要特殊格式
|
||||
{
|
||||
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' });
|
||||
const data = {
|
||||
goods_order_id:1, //抖音商品订单id(整数)
|
||||
order_date:'2026-03-01', //预约日期(‘2026-03-01’格式)
|
||||
period_id:1, //预约时间段id(整数)
|
||||
address_id:1, //地址id(整数)
|
||||
recipient_name:'用户姓名', //用户姓名
|
||||
phone:123, //用户手机
|
||||
park_desc:123, //停车描述
|
||||
note:'哈哈' // 备注
|
||||
};
|
||||
getdouyReview(data).then((res) => {
|
||||
if (res.code == 0) {
|
||||
uni.showToast({
|
||||
title: "预约成功",
|
||||
icon: "none",
|
||||
});
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('调用异常', error);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
getPetShortName(pet) {
|
||||
const n = pet.name || pet.pet_name || pet.pet_nickname || '';
|
||||
|
||||
Reference in New Issue
Block a user