上传代码

This commit is contained in:
2025-08-18 14:20:34 +08:00
commit 527fd07910
2408 changed files with 427370 additions and 0 deletions

View File

@ -0,0 +1,152 @@
"use strict";
const pages_goToPay_utils = require("./utils.js");
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
name: "distributionBox",
props: {
getTime: String
// 接收父组件传来的初始值
},
data() {
return {
sendTime: "",
sRightDate: "",
sLDate: "",
jmhDay: [],
timeList: [
{ disabled: false, time: "10:00-12:00", id: 1 },
{ disabled: false, time: "12:00-14:00", id: 2 },
{ disabled: false, time: "14:00-16:00", id: 3 },
{ disabled: false, time: "16:00-18:00", id: 4 },
{ disabled: false, time: "18:00-20:00", id: 5 }
]
};
},
mounted() {
this.getNextDay();
},
methods: {
close() {
this.$refs.popup.close();
},
getWeekDate(day) {
const weeks = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
return weeks[day];
},
getNextDay() {
const day = this.getWeekDate((/* @__PURE__ */ new Date()).getDay());
const isDay = pages_goToPay_utils.getDate().fullDate;
const nextDay = this.getWeekDate(new Date((/* @__PURE__ */ new Date()).getTime() + 24 * 60 * 60 * 1e3).getDay());
const nDate = pages_goToPay_utils.getDate(new Date((/* @__PURE__ */ new Date()).getTime() + 24 * 60 * 60 * 1e3)).fullDate;
const HDay = this.getWeekDate(new Date((/* @__PURE__ */ new Date()).getTime() + 48 * 60 * 60 * 1e3).getDay());
const hDate = pages_goToPay_utils.getDate(new Date((/* @__PURE__ */ new Date()).getTime() + 48 * 60 * 60 * 1e3)).fullDate;
const d1 = hDate.substr(hDate.indexOf("-") + 1);
this.sLDate = isDay;
this.selectLDate(1);
this.jmhDay = [
{ name: day, id: 1, formatDate: isDay, desc: "今天" },
{ name: nextDay, id: 2, formatDate: nDate, desc: "明天" },
{ name: HDay, id: 3, formatDate: hDate, desc: d1.substr(0, d1.indexOf("-")) + "月" + d1.substr(d1.indexOf("-") + 1) + "日" }
];
},
showBox() {
this.$refs.popup.open();
},
selectRDate(item) {
if (item.disabled) {
return;
}
this.sRightDate = item.time;
this.sendTime = `${this.sLDate} ${item.time}`;
this.$emit("update:getTime", this.sendTime);
this.$emit("timeSelected", this.sendTime);
this.$refs.popup.close();
},
selectLDate(val) {
if (val !== 1) {
this.sLDate = val.formatDate;
}
let t = [
{ disabled: false, time: "10:00-12:00", id: 1 },
{ disabled: false, time: "12:00-14:00", id: 2 },
{ disabled: false, time: "14:00-16:00", id: 3 },
{ disabled: false, time: "16:00-18:00", id: 4 },
{ disabled: false, time: "18:00-20:00", id: 5 }
];
if (val.desc === "今天" || val === 1) {
const currentHour = (/* @__PURE__ */ new Date()).getHours();
if (currentHour <= 10) {
this.timeList = t;
} else if (currentHour <= 12) {
t[0].disabled = true;
this.timeList = t;
} else if (currentHour <= 14) {
t[0].disabled = true;
t[1].disabled = true;
this.timeList = t;
} else if (currentHour <= 16) {
t[0].disabled = true;
t[1].disabled = true;
t[2].disabled = true;
this.timeList = t;
} else if (currentHour <= 18) {
t[0].disabled = true;
t[1].disabled = true;
t[2].disabled = true;
t[3].disabled = true;
this.timeList = t;
} else if (currentHour <= 20) {
t[0].disabled = true;
t[1].disabled = true;
t[2].disabled = true;
t[3].disabled = true;
t[4].disabled = true;
this.timeList = t;
}
} else {
this.timeList = t;
}
this.sRightDate = "";
}
}
};
if (!Array) {
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
_easycom_uni_popup2();
}
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
_easycom_uni_popup();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.f($data.jmhDay, (item, index, i0) => {
return {
a: common_vendor.t(item.desc),
b: common_vendor.t(item.name),
c: common_vendor.o(($event) => $options.selectLDate(item), index),
d: common_vendor.n($data.sLDate === item.formatDate ? "ed" : ""),
e: index
};
}),
b: common_vendor.f($data.timeList, (item, index, i0) => {
return {
a: common_vendor.t(item.time),
b: common_vendor.t(item.disabled ? " (超出配送时间)" : ""),
c: common_vendor.o(($event) => $options.selectRDate(item), index),
d: common_vendor.n($data.sRightDate === item.time ? "ed" : ""),
e: common_vendor.n(item.disabled ? "disabled" : ""),
f: index
};
}),
c: $data.timeList.length < 1
}, $data.timeList.length < 1 ? {} : {}, {
d: common_vendor.o(($event) => $options.close()),
e: common_vendor.sr("popup", "1d253218-0"),
f: common_vendor.p({
type: "bottom"
})
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1d253218"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
}
}

View File

@ -0,0 +1 @@
<uni-popup wx:if="{{f}}" class="r data-v-1d253218" u-s="{{['d']}}" u-r="popup" u-i="1d253218-0" bind:__l="__l" u-p="{{f}}"><view class="pBoxUp data-v-1d253218"><view class="textCenter f32 psTitle border-bottom data-v-1d253218"> 请选择配送时间 </view><view class="shopPopup bgff justify-between default-flex data-v-1d253218"><view class="f30 t666 lBox data-v-1d253218"><view wx:for="{{a}}" wx:for-item="item" wx:key="e" bindtap="{{item.c}}" class="{{[item.d, 'boxLDate', 'data-v-1d253218']}}">{{item.a}}({{item.b}}) </view></view><view class="data-v-1d253218"><view wx:for="{{b}}" wx:for-item="item" wx:key="f" bindtap="{{item.c}}" class="{{[item.d, item.e, 'rBox', 'data-v-1d253218']}}">{{item.a}}{{item.b}}</view><view wx:if="{{c}}" class="empty f28 text-center data-v-1d253218" style="color:#999;margin-top:40rpx"> 今天没有时间了,看看明天吧 </view></view></view><view class="cancelButton data-v-1d253218" bindtap="{{d}}"> 取消 </view></view></uni-popup>

View File

@ -0,0 +1,76 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.pBoxUp.data-v-1d253218 {
background: #f5f5f5;
}
.pBoxUp .psTitle.data-v-1d253218 {
line-height: 100rpx;
text-align: center;
border-bottom: 1rpx solid #f7f7f7;
}
.pBoxUp .shopPopup.data-v-1d253218 {
backgound: #ffffff;
font-size: 32rpx;
display: flex;
justify-content: space-between;
}
.pBoxUp .boxLDate.data-v-1d253218 {
font-size: 24rpx;
height: 80rpx;
line-height: 80rpx;
width: 273rpx;
text-align: center;
}
.pBoxUp .lBox.data-v-1d253218 {
color: #666666;
background: #f5f5f5;
font-size: 30rpx;
}
.pBoxUp .boxLDate.ed.data-v-1d253218 {
color: #1DA337;
background: #fff;
}
.pBoxUp .rBox.ed.data-v-1d253218 {
color: #1DA337;
}
.pBoxUp .rBox.data-v-1d253218 {
width: 239px;
padding-left: 20rpx;
font-size: 24rpx;
color: #333;
height: 80rpx;
background: #fff;
line-height: 80rpx;
}
.pBoxUp .cancelButton.data-v-1d253218 {
font-size: 36rpx;
color: #999;
text-align: center;
height: 100rpx;
line-height: 100rpx;
border-top: 1px solid #e5e5e5;
background: #FFF;
}

View File

@ -0,0 +1,343 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const API_api = require("../../API/api.js");
if (!Array) {
const _easycom_uni_notice_bar2 = common_vendor.resolveComponent("uni-notice-bar");
const _easycom_uni_data_checkbox2 = common_vendor.resolveComponent("uni-data-checkbox");
const _component_template = common_vendor.resolveComponent("template");
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
(_easycom_uni_notice_bar2 + _easycom_uni_data_checkbox2 + _component_template + _easycom_uni_icons2)();
}
const _easycom_uni_notice_bar = () => "../../uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.js";
const _easycom_uni_data_checkbox = () => "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.js";
const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
if (!Math) {
(_easycom_uni_notice_bar + _easycom_uni_data_checkbox + DistributionBox + _easycom_uni_icons)();
}
const DistributionBox = () => "./distributionBox.js";
const paymentTimeout = 15 * 60 * 1e3;
const _sfc_main = {
__name: "goToPay",
setup(__props) {
common_vendor.onUnload(() => {
common_vendor.index.reLaunch({
url: "/pages/index/index"
});
});
const radio1 = common_vendor.ref(0);
const statusId = common_vendor.ref(null);
const array = common_vendor.ref(["1公寓", "2公寓", "3公寓", "4公寓", "5公寓", "6公寓", "7公寓", "8公寓", "9公寓", "10公寓", "11公寓", "12公寓", "育才大厦"]);
const index = common_vendor.ref(0);
const sex = common_vendor.ref([
{
text: "堂食",
value: 0
},
{
text: "自提",
value: 1
},
{
text: "跑腿",
value: 2
}
]);
function bindPickerChange(e) {
const selectedIndex = e.detail.value;
console.log("picker发送选择改变携带值为", selectedIndex);
index.value = selectedIndex;
const selectedApartment = array.value[selectedIndex];
console.log("您选择了:", selectedApartment);
selectedApartmentName.value = selectedApartment;
}
const selectedApartmentName = common_vendor.ref("");
common_vendor.index.$on("updateRemark", (newRemark) => {
orderItem.value.notes = newRemark;
});
const orderItem = common_vendor.ref(null);
const getOrder = () => {
const notPay = common_vendor.index.getStorageSync("notPay");
common_vendor.index.request({
url: API_api.apiImageUrl + "/api/orders/get/my",
method: "GET",
data: {
id: notPay
//id:133
},
header: {
"Content-Type": "application/json",
// 确保设置正确的 Content-Type
"cookie": common_vendor.index.getStorageSync("cookie") || ""
},
success(res) {
console.log("获取订单成功");
if (res.data && res.data.data) {
orderItem.value = res.data.data;
console.log(orderItem.value);
if (orderItem.value.pickupMethod !== void 0) {
radio1.value = orderItem.value.pickupMethod;
}
}
},
fail() {
console.log("获取订单失败");
}
});
};
const isoStart = common_vendor.ref("");
const isoEnd = common_vendor.ref("");
const submitOrder = () => {
var _a;
console.log(
"我选择的radio1的值:",
radio1.value,
"我选择的公寓:",
selectedApartmentName.value,
"我选择的时间:",
sendTime.value
);
const notPay = common_vendor.index.getStorageSync("notPay");
common_vendor.index.request({
url: `${API_api.apiImageUrl}/api/orders/updateOrder`,
method: "POST",
data: {
location: selectedApartmentName.value,
notes: ((_a = orderItem.value) == null ? void 0 : _a.notes) || "",
// 使用订单中的备注,如果不存在则为空字符串
orderId: notPay,
pickupMethod: radio1.value,
// 使用当前选中的配送方式
pickupStartTime: isoStart.value,
// 注意这里使用的是 .value
pickupEndTime: isoEnd.value
// 注意这里使用的是 .value
},
header: {
"Content-Type": "application/json",
// 确保设置正确的 Content-Type
"cookie": common_vendor.index.getStorageSync("cookie") || ""
},
success(res) {
console.log("更新订单成功", res);
orderItem.value.pickupMethod = radio1.value;
goToPayment();
},
fail(err) {
console.log("更新订单失败", err);
}
});
};
common_vendor.onMounted(() => {
getOrder();
});
common_vendor.onActivated(() => {
getOrder();
});
const goToPayment = () => {
const notPay = common_vendor.index.getStorageSync("notPay");
my.request({
url: API_api.apiImageUrl + "/api/Alipay/payment/create",
method: "GET",
data: {
id: notPay
},
header: {
"Content-Type": "application/json",
"cookie": common_vendor.index.getStorageSync("cookie") || ""
},
success: function(result) {
console.log("reasaaaaaaaaaa");
console.log(result);
console.log("tradeNo的值为");
console.log(result.data.data);
my.tradePay({
tradeNO: result.data.data,
success: (res) => {
console.log("成功调用");
console.log(res);
if (res.resultCode == 9e3) {
common_vendor.index.setStorageSync("orderId", notPay);
common_vendor.index.navigateTo({
url: "/pages/testFive/testFive"
});
common_vendor.index.removeStorageSync("cartItems");
}
},
fail: (res) => {
my.alert({
content: JSON.stringify(res)
});
console.log("失败");
console.log(res);
}
});
}
});
};
const orderCreateTime = Date.now();
const updateTimer = () => {
const elapsedTime = Date.now() - orderCreateTime;
if (elapsedTime > paymentTimeout) {
console.log("超时啦");
clearInterval(intervalId);
formattedTime.value = "已超时";
} else {
const remainingTime = paymentTimeout - elapsedTime;
const minutes = Math.floor(remainingTime % (1e3 * 60 * 60) / (1e3 * 60));
const seconds = Math.floor(remainingTime % (1e3 * 60) / 1e3);
formattedTime.value = `待支付,${minutes.toString().padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`;
}
};
const formattedTime = common_vendor.ref("待支付剩余14:48");
const intervalId = common_vendor.ref(null);
common_vendor.onMounted(() => {
intervalId.value = setInterval(updateTimer, 1e3);
updateTimer();
});
setTimeout(() => {
if (!formattedTime.value.includes("已超时")) {
console.log("超时啦");
clearInterval(intervalId.value);
common_vendor.index.showToast({
title: "支付已超时",
duration: 2e3
});
const orderItemId = orderItem.value.id;
const tradeNo = common_vendor.index.getStorageSync("tradeNo");
common_vendor.index.request({
url: API_api.apiImageUrl + "/api/Alipay/test/close",
method: "GET",
data: {
orderId: orderItemId,
out_trade_no: tradeNo
},
success(res) {
console.log("成功");
console.log(res);
},
fail() {
console.log("失败");
}
});
common_vendor.index.showToast({
title: "订单超时,已为您自动取消喽",
duration: 2e3
});
formattedTime.value = "已超时";
}
}, paymentTimeout);
const closeOrder = () => {
const orderItemId = orderItem.value.id;
const tradeNo = common_vendor.index.getStorageSync("tradeNo");
common_vendor.index.request({
url: API_api.apiImageUrl + "/api/Alipay/test/close",
method: "GET",
data: {
orderId: orderItemId,
out_trade_no: tradeNo
},
success(res) {
console.log("成功");
console.log(res);
},
fail() {
console.log("失败");
}
});
};
const goToRemark = () => {
common_vendor.index.navigateTo({
url: "/pages/goToRemark/goToRemark"
});
};
const sendTime = common_vendor.ref("");
const dsbonBox = common_vendor.ref(null);
const showTime = () => {
if (dsbonBox.value) {
dsbonBox.value.showBox();
}
};
const handleTimeSelected = (time) => {
console.log("Selected Time:", time);
const [date, duration] = time.split(" ");
const [startHour, endHour] = duration.split("-");
isoStart.value = `${date}T${startHour}:00+08:00`;
isoEnd.value = `${date}T${endHour}:00+08:00`;
new Date(isoStart.value);
new Date(isoEnd.value);
console.log("Start Time in ISO format:", isoStart.value);
console.log("End Time in ISO format:", isoEnd.value);
sendTime.value = time;
};
return (_ctx, _cache) => {
var _a, _b;
return common_vendor.e({
a: common_vendor.p({
["show-icon"]: true,
scrollable: true,
text: "15分钟内未支付,订单将自动取消"
}),
b: common_vendor.t(formattedTime.value),
c: statusId.value,
d: common_vendor.o(($event) => radio1.value = $event),
e: common_vendor.p({
localdata: sex.value,
modelValue: radio1.value
}),
f: radio1.value === 2
}, radio1.value === 2 ? {
g: common_vendor.t(selectedApartmentName.value ? selectedApartmentName.value : "请选择公寓"),
h: common_vendor.o(bindPickerChange),
i: index.value,
j: array.value,
k: common_vendor.t(sendTime.value || "请选择配送时间"),
l: common_vendor.o(showTime),
m: common_vendor.sr(dsbonBox, "71a06cb4-2", {
"k": "dsbonBox"
}),
n: common_vendor.o(handleTimeSelected),
o: common_vendor.p({
["get-time"]: sendTime.value
})
} : {}, {
p: common_vendor.t(orderItem.value.totalPrice),
q: common_vendor.o(submitOrder),
r: common_vendor.p({
type: "calendar-filled",
size: "30"
}),
s: common_vendor.p({
type: "calendar-filled",
size: "30"
}),
t: common_vendor.p({
type: "calendar-filled",
size: "30"
}),
v: common_vendor.o(closeOrder),
w: (_a = orderItem.value.businessVO) == null ? void 0 : _a.businessImages,
x: common_vendor.t((_b = orderItem.value.businessVO) == null ? void 0 : _b.businessName),
y: common_vendor.f(orderItem.value.orderDetailsVOList, (item, k0, i0) => {
return {
a: item.dishesVO.dishesImage,
b: common_vendor.t(item.dishesVO.dishesName),
c: common_vendor.t(item.quantity),
d: common_vendor.t(item.dishesVO.dishesName),
e: common_vendor.t(item.dishesVO.dishesPrice)
};
}),
z: radio1.value === 1 || radio1.value === 2
}, radio1.value === 1 || radio1.value === 2 ? {} : {}, {
A: radio1.value === 2
}, radio1.value === 2 ? {} : {}, {
B: common_vendor.t(orderItem.value.totalPrice),
C: common_vendor.t(orderItem.value.notes ? orderItem.value.notes : "去备注"),
D: common_vendor.o(goToRemark),
E: common_vendor.t(orderItem.value.phone),
F: common_vendor.t(orderItem.value.pickupCode)
});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-71a06cb4"]]);
wx.createPage(MiniProgramPage);

View File

@ -0,0 +1,9 @@
{
"navigationBarTitleText": "去支付",
"usingComponents": {
"uni-notice-bar": "../../uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar",
"uni-data-checkbox": "../../uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox",
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons",
"distribution-box": "./distributionBox"
}
}

View File

@ -0,0 +1 @@
<view class="notice data-v-71a06cb4"><uni-notice-bar wx:if="{{a}}" class="data-v-71a06cb4" u-i="71a06cb4-0" bind:__l="__l" u-p="{{a}}"/></view><view class="order-page data-v-71a06cb4"><view class="header data-v-71a06cb4"><view class="status data-v-71a06cb4" id="{{c}}"> 待支付,剩余{{b}}</view></view><view class="order-summary data-v-71a06cb4"><view class="order-info data-v-71a06cb4"><view class="uni-px-5 uni-pb-5 data-v-71a06cb4"><uni-data-checkbox wx:if="{{e}}" class="data-v-71a06cb4" u-i="71a06cb4-1" bind:__l="__l" bindupdateModelValue="{{d}}" u-p="{{e}}"></uni-data-checkbox></view></view><view wx:if="{{f}}" class="address data-v-71a06cb4"><picker class="data-v-71a06cb4" bindchange="{{h}}" value="{{i}}" range="{{j}}"><view class="uni-input data-v-71a06cb4">地址:{{g}}</view></picker><block u-s="{{['d']}}" class="time-picker data-v-71a06cb4"><view class="align-center justify-between default-flex secondBox data-v-71a06cb4" bindtap="{{l}}"><view class="default-flex align-center data-v-71a06cb4"><view class="t666 f28 data-v-71a06cb4"> 配送时间: </view></view><view class="tDesc data-v-71a06cb4"><view class="sTime data-v-71a06cb4">{{k}}</view><view class="bj data-v-71a06cb4"><image class="data-v-71a06cb4" src="https://yujia-shanghai-bucket.oss-cn-shanghai.aliyuncs.com/small-program/yvmuShop/timeEdit.png" alt=""></image></view></view></view><distribution-box wx:if="{{o}}" class="r data-v-71a06cb4" u-r="dsbonBox" bindtimeSelected="{{n}}" u-i="71a06cb4-2" bind:__l="__l" u-p="{{o}}"></distribution-box></block></view><view class="pay-button data-v-71a06cb4" bindtap="{{q}}"> 去支付¥{{p}}</view></view><view class="order-options data-v-71a06cb4"><view class="option data-v-71a06cb4"><uni-icons wx:if="{{r}}" class="data-v-71a06cb4" u-i="71a06cb4-3" bind:__l="__l" u-p="{{r}}"></uni-icons><text class="data-v-71a06cb4">找人付</text></view><view class="option data-v-71a06cb4"><uni-icons wx:if="{{s}}" class="data-v-71a06cb4" u-i="71a06cb4-4" bind:__l="__l" u-p="{{s}}"></uni-icons><text class="data-v-71a06cb4">改订单信息</text></view><view class="option data-v-71a06cb4" bindtap="{{v}}"><uni-icons wx:if="{{t}}" class="data-v-71a06cb4" u-i="71a06cb4-5" bind:__l="__l" u-p="{{t}}"></uni-icons><text class="data-v-71a06cb4">取消订单</text></view></view><view class="order-items data-v-71a06cb4"><view class="businessDetail data-v-71a06cb4"><image class="item-image data-v-71a06cb4" src="{{w}}"></image> {{x}}</view><view wx:for="{{y}}" wx:for-item="item" class="order-item data-v-71a06cb4"><image class="item-image data-v-71a06cb4" src="{{item.a}}"></image><view class="item-info data-v-71a06cb4"><view class="item-name data-v-71a06cb4">{{item.b}}</view><view class="item-description data-v-71a06cb4">{{item.c}}×{{item.d}}</view><view class="item-price data-v-71a06cb4">¥{{item.e}}</view></view></view><view wx:if="{{z}}" class="total data-v-71a06cb4"><text class="data-v-71a06cb4">打包费</text><text class="data-v-71a06cb4">¥1</text></view><view wx:if="{{A}}" class="total data-v-71a06cb4"><text class="data-v-71a06cb4">配送费</text><text class="data-v-71a06cb4">¥1.7</text></view><view class="total data-v-71a06cb4"><text class="data-v-71a06cb4">实付款</text><text class="data-v-71a06cb4">¥{{B}}</text></view></view><view class="order-details data-v-71a06cb4"><view class="detail data-v-71a06cb4"><text class="data-v-71a06cb4">备注</text><text class="data-v-71a06cb4" bindtap="{{D}}">{{C}}</text></view><view class="detail data-v-71a06cb4"><text class="data-v-71a06cb4">手机号</text><text class="data-v-71a06cb4">{{E}}</text></view><view class="detail data-v-71a06cb4"><text class="data-v-71a06cb4">发票信息</text><text class="data-v-71a06cb4">暂不支持</text></view><view class="detail data-v-71a06cb4"><text class="data-v-71a06cb4">订单号码</text><text class="data-v-71a06cb4">{{F}}</text></view></view></view>

View File

@ -0,0 +1,215 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.order-page.data-v-71a06cb4 {
background-color: #f5f5f5;
padding: 20px;
}
.header.data-v-71a06cb4 {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.back-button.data-v-71a06cb4,
.customer-service.data-v-71a06cb4 {
width: 30px;
height: 30px;
}
.status.data-v-71a06cb4 {
font-size: 20px;
font-weight: bold;
}
.address.data-v-71a06cb4 {
width: 100%;
height: 20px;
color: #666;
padding-bottom: 10px;
font-size: 14px;
}
.notice.data-v-71a06cb4 {
height: 40px;
}
.order-summary.data-v-71a06cb4 {
background-color: #fff;
padding: 20px;
border-radius: 10px;
margin-bottom: 20px;
}
.order-info.data-v-71a06cb4 {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
}
.time-picker.data-v-71a06cb4 {
margin-bottom: 20px;
}
.pay-button.data-v-71a06cb4 {
background-color: #007bff;
color: #fff;
padding: 10px 0px;
border-radius: 20px;
font-size: 18px;
text-align: center;
position: relative;
/* 确保按钮定位上下文 */
z-index: 1;
/* 设置较高的z-index值确保按钮始终位于顶部 */
margin-top: 40px;
/* 如果需要,增加上边距避免与其他元素重叠 */
}
.order-options.data-v-71a06cb4 {
display: flex;
justify-content: space-around;
margin-bottom: 20px;
}
.option.data-v-71a06cb4 {
display: flex;
flex-direction: column;
align-items: center;
margin: 10px;
}
.businessDetail.data-v-71a06cb4 {
font-size: 15px;
font-weight: 700;
}
.order-items.data-v-71a06cb4 {
background-color: #fff;
padding: 20px;
border-radius: 10px;
margin-bottom: 20px;
}
.item.data-v-71a06cb4 {
display: flex;
align-items: center;
margin-bottom: 10px;
}
.item image.data-v-71a06cb4 {
width: 100px;
height: 100px;
margin-right: 20px;
}
.item-info.data-v-71a06cb4 {
flex: 1;
}
.total.data-v-71a06cb4 {
display: flex;
justify-content: space-between;
margin-top: 10px;
}
.order-details.data-v-71a06cb4 {
background-color: #fff;
padding: 20px;
border-radius: 10px;
margin-bottom: 20px;
}
.detail.data-v-71a06cb4 {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
}
/* */
.order-item.data-v-71a06cb4 {
display: flex;
align-items: center;
padding: 10px 0;
}
.item-image.data-v-71a06cb4 {
width: 80px;
height: 80px;
margin-right: 20px;
}
.item-info.data-v-71a06cb4 {
flex: 1;
}
.item-name.data-v-71a06cb4 {
font-size: 18px;
font-weight: bold;
}
.item-description.data-v-71a06cb4 {
font-size: 14px;
color: #666;
}
.item-price.data-v-71a06cb4 {
font-size: 18px;
font-weight: bold;
text-align: right;
}
.text.data-v-71a06cb4 {
font-size: 12px;
color: #666;
margin-top: 5px;
}
.uni-px-5.data-v-71a06cb4 {
padding-left: 10px;
padding-right: 10px;
}
.uni-pb-5.data-v-71a06cb4 {
padding-bottom: 10px;
}
.button-update.data-v-71a06cb4 {
width: 30px;
height: 30px;
background-color: pink;
border-radius: 15px;
}
/* 时间选择器 */
.bgff.data-v-71a06cb4 {
background-color: pink;
}
.justify-between.data-v-71a06cb4 {
justify-content: space-between;
}
.default-flex.data-v-71a06cb4 {
display: flex;
}
.align-center.data-v-71a06cb4 {
align-items: center;
}
.mr-2.data-v-71a06cb4 {
margin-right: 20rpx;
}
.secondBox.data-v-71a06cb4 {
padding: 30rpx 0rpx 0rpx 0rpx;
}
.secondBox .lImg.data-v-71a06cb4 {
width: 36rpx;
height: 36rpx;
}
.secondBox .bj.data-v-71a06cb4 {
width: 30rpx;
height: 30rpx;
}
.secondBox .tDesc.data-v-71a06cb4 {
font-size: 28rpx;
display: flex;
align-items: center;
color: #666;
}
.secondBox .tDesc .sTime.data-v-71a06cb4 {
margin-right: 20rpx;
}

View File

@ -0,0 +1,22 @@
"use strict";
function getDate(date, AddDayCount = 0) {
if (!date) {
date = /* @__PURE__ */ new Date();
}
if (typeof date !== "object") {
date = date.replace(/-/g, "/");
}
const dd = new Date(date);
dd.setDate(dd.getDate() + AddDayCount);
const y = dd.getFullYear();
const m = dd.getMonth() + 1 < 10 ? "0" + (dd.getMonth() + 1) : dd.getMonth() + 1;
const d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate();
return {
fullDate: y + "-" + m + "-" + d,
year: y,
month: m,
date: d,
day: dd.getDay()
};
}
exports.getDate = getDate;