first commit
This commit is contained in:
218
unpackage/dist/dev/mp-weixin/pages/order/confirm.js
vendored
Normal file
218
unpackage/dist/dev/mp-weixin/pages/order/confirm.js
vendored
Normal file
@@ -0,0 +1,218 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const api_index = require("../../api/index.js");
|
||||
const store_index = require("../../store/index.js");
|
||||
if (!Array) {
|
||||
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
|
||||
const _easycom_wd_input_number2 = common_vendor.resolveComponent("wd-input-number");
|
||||
const _easycom_wd_textarea2 = common_vendor.resolveComponent("wd-textarea");
|
||||
(_easycom_wd_navbar2 + _easycom_wd_input_number2 + _easycom_wd_textarea2)();
|
||||
}
|
||||
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
|
||||
const _easycom_wd_input_number = () => "../../uni_modules/wot-design-uni/components/wd-input-number/wd-input-number.js";
|
||||
const _easycom_wd_textarea = () => "../../uni_modules/wot-design-uni/components/wd-textarea/wd-textarea.js";
|
||||
if (!Math) {
|
||||
(_easycom_wd_navbar + _easycom_wd_input_number + _easycom_wd_textarea)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "confirm",
|
||||
setup(__props) {
|
||||
const store = store_index.Store();
|
||||
const userInfo = common_vendor.computed(() => {
|
||||
if (!store.userInfo.userRights) {
|
||||
dataFrom.value.payType = 1;
|
||||
}
|
||||
return store.userInfo || {
|
||||
inviteCode: "",
|
||||
nickname: "",
|
||||
mobile: "",
|
||||
avatar: "",
|
||||
paywallet: { balance: 0 },
|
||||
userRights: null
|
||||
};
|
||||
});
|
||||
const goods = common_vendor.ref({});
|
||||
const address = common_vendor.ref(null);
|
||||
const dataFrom = common_vendor.ref({
|
||||
goodsId: null,
|
||||
goodsNum: 1,
|
||||
totalAmount: 0,
|
||||
payableAmount: 0,
|
||||
payAmount: 0,
|
||||
payType: 1,
|
||||
receiverId: null,
|
||||
note: "",
|
||||
orderType: 1
|
||||
});
|
||||
const totalAmount = common_vendor.computed(() => {
|
||||
return goods.value.currentPrice * dataFrom.value.goodsNum;
|
||||
});
|
||||
const paymentAmount = common_vendor.computed(() => {
|
||||
var _a, _b;
|
||||
if (dataFrom.value.payType === 1) {
|
||||
const discount = ((_b = (_a = userInfo.value.userRights) == null ? void 0 : _a.rights) == null ? void 0 : _b.rightsDiscount) || 100;
|
||||
return totalAmount.value * discount / 100;
|
||||
}
|
||||
return totalAmount.value;
|
||||
});
|
||||
const submitOrder = () => {
|
||||
var _a;
|
||||
let data = JSON.parse(JSON.stringify(dataFrom.value));
|
||||
if (!address.value) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请选择收货地址",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
common_vendor.index.showLoading({
|
||||
mask: true
|
||||
});
|
||||
data.receiverId = (_a = address.value) == null ? void 0 : _a.id;
|
||||
if (data.payType == 1) {
|
||||
data.payAmount = paymentAmount.value;
|
||||
data.totalAmount = totalAmount.value;
|
||||
data.payableAmount = paymentAmount.value;
|
||||
data.totalAmount = totalAmount.value;
|
||||
}
|
||||
if (data.payType == 2) {
|
||||
data.deductibleAmount = totalAmount.value;
|
||||
data.totalAmount = totalAmount.value;
|
||||
data.deductionAmount = totalAmount.value;
|
||||
data.totalAmount = totalAmount.value;
|
||||
}
|
||||
if (data.payType == 3) {
|
||||
if (userInfo.value.userRights.pice < totalAmount.value) {
|
||||
data.deductibleAmount = userInfo.value.userRights.pice;
|
||||
data.deductionAmount = userInfo.value.userRights.pice;
|
||||
data.payAmount = totalAmount.value - userInfo.value.userRights.pice;
|
||||
data.payableAmount = totalAmount.value - userInfo.value.userRights.pice;
|
||||
data.totalAmount = totalAmount.value;
|
||||
} else {
|
||||
data.deductibleAmount = totalAmount.value;
|
||||
data.totalAmount = totalAmount.value;
|
||||
data.deductionAmount = totalAmount.value;
|
||||
data.totalAmount = totalAmount.value;
|
||||
data.payType = 2;
|
||||
}
|
||||
}
|
||||
api_index.api.orderCreate(data).then((res) => {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/order/success?id=" + res
|
||||
});
|
||||
}).catch(() => {
|
||||
common_vendor.index.hideLoading();
|
||||
});
|
||||
};
|
||||
common_vendor.onLoad(async (options) => {
|
||||
dataFrom.value.goodsId = options.id;
|
||||
await store.usersGetInfo();
|
||||
api_index.api.goodsInfo({ id: options.id }).then((res) => {
|
||||
goods.value = res;
|
||||
});
|
||||
api_index.api.addressPage({ isDefault: 1 }).then((res) => {
|
||||
if (res.list.length) {
|
||||
address.value = res.list[0];
|
||||
dataFrom.value.receiverId = address.value.id;
|
||||
}
|
||||
});
|
||||
common_vendor.index.$on("address", (e) => {
|
||||
address.value = e;
|
||||
});
|
||||
});
|
||||
const min = (a, b) => Math.min(a, b);
|
||||
const max = (a, b) => Math.max(a, b);
|
||||
const formatPrice = (price) => `¥ ${parseFloat(price).toFixed(2)}`;
|
||||
const selectAddress = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/address/list?type=1"
|
||||
});
|
||||
};
|
||||
const viewProduct = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/goods/goods?id=" + goods.value.id
|
||||
});
|
||||
};
|
||||
const back = () => {
|
||||
common_vendor.index.navigateBack();
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.o(back),
|
||||
b: common_vendor.p({
|
||||
title: "下单",
|
||||
bordered: false,
|
||||
["left-arrow"]: true,
|
||||
["custom-style"]: "background-color: transparent !important;",
|
||||
safeAreaInsetTop: true
|
||||
}),
|
||||
c: address.value
|
||||
}, address.value ? {
|
||||
d: common_vendor.t(address.value.receiverArea),
|
||||
e: common_vendor.t(address.value.receiverAddress),
|
||||
f: common_vendor.t(address.value.receiverName),
|
||||
g: common_vendor.t(address.value.receiverPhone)
|
||||
} : {}, {
|
||||
h: common_assets._imports_0$1,
|
||||
i: common_vendor.o(selectAddress),
|
||||
j: goods.value.cover,
|
||||
k: common_vendor.t(goods.value.name),
|
||||
l: common_vendor.t(goods.value.specs),
|
||||
m: common_vendor.t(goods.value.currentPrice),
|
||||
n: common_vendor.o(viewProduct),
|
||||
o: common_assets._imports_0$1,
|
||||
p: common_vendor.o(($event) => dataFrom.value.goodsNum = $event),
|
||||
q: common_vendor.p({
|
||||
modelValue: dataFrom.value.goodsNum
|
||||
}),
|
||||
r: common_vendor.o(($event) => dataFrom.value.note = $event),
|
||||
s: common_vendor.p({
|
||||
placeholder: "请填写订单备注",
|
||||
modelValue: dataFrom.value.note
|
||||
}),
|
||||
t: common_vendor.t(userInfo.value.money || 0),
|
||||
v: dataFrom.value.payType === 1 ? 1 : "",
|
||||
w: common_vendor.o(($event) => dataFrom.value.payType = 1),
|
||||
x: dataFrom.value.payType === 1 && userInfo.value.userRights
|
||||
}, dataFrom.value.payType === 1 && userInfo.value.userRights ? {
|
||||
y: common_vendor.t(userInfo.value.userRights.rights.rightsName),
|
||||
z: common_vendor.t(userInfo.value.userRights.rights.rightsDiscount / 10)
|
||||
} : {}, {
|
||||
A: userInfo.value.userRights
|
||||
}, userInfo.value.userRights ? {
|
||||
B: common_vendor.t(userInfo.value.userRights.pice || 0),
|
||||
C: dataFrom.value.payType === 2 ? 1 : "",
|
||||
D: common_vendor.o(($event) => dataFrom.value.payType = 2)
|
||||
} : {}, {
|
||||
E: dataFrom.value.payType === 2
|
||||
}, dataFrom.value.payType === 2 ? {} : {}, {
|
||||
F: userInfo.value.userRights
|
||||
}, userInfo.value.userRights ? common_vendor.e({
|
||||
G: totalAmount.value > userInfo.value.userRights.pice + userInfo.value.money
|
||||
}, totalAmount.value > userInfo.value.userRights.pice + userInfo.value.money ? {
|
||||
H: common_vendor.t(min(userInfo.value.money, totalAmount.value - userInfo.value.userRights.pice)),
|
||||
I: common_vendor.t(min(userInfo.value.userRights.pice, totalAmount.value - userInfo.value.money))
|
||||
} : common_vendor.e({
|
||||
J: common_vendor.t(max(0, totalAmount.value - userInfo.value.userRights.pice)),
|
||||
K: min(totalAmount.value - (totalAmount.value - userInfo.value.userRights.pice), userInfo.value.userRights.pice) > totalAmount.value
|
||||
}, min(totalAmount.value - (totalAmount.value - userInfo.value.userRights.pice), userInfo.value.userRights.pice) > totalAmount.value ? {
|
||||
L: common_vendor.t(totalAmount.value)
|
||||
} : {
|
||||
M: common_vendor.t(min(totalAmount.value - (totalAmount.value - userInfo.value.userRights.pice), userInfo.value.userRights.pice))
|
||||
}), {
|
||||
N: dataFrom.value.payType === 3 ? 1 : "",
|
||||
O: common_vendor.o(($event) => dataFrom.value.payType = 3)
|
||||
}) : {}, {
|
||||
P: dataFrom.value.payType === 3
|
||||
}, dataFrom.value.payType === 3 ? {} : {}, {
|
||||
Q: common_vendor.t(formatPrice(paymentAmount.value)),
|
||||
R: common_vendor.o(submitOrder)
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-324e7894"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order/confirm.js.map
|
||||
9
unpackage/dist/dev/mp-weixin/pages/order/confirm.json
vendored
Normal file
9
unpackage/dist/dev/mp-weixin/pages/order/confirm.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"wd-navbar": "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar",
|
||||
"wd-input-number": "../../uni_modules/wot-design-uni/components/wd-input-number/wd-input-number",
|
||||
"wd-textarea": "../../uni_modules/wot-design-uni/components/wd-textarea/wd-textarea"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/order/confirm.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/order/confirm.wxml
vendored
Normal file
File diff suppressed because one or more lines are too long
166
unpackage/dist/dev/mp-weixin/pages/order/confirm.wxss
vendored
Normal file
166
unpackage/dist/dev/mp-weixin/pages/order/confirm.wxss
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
/* 水平间距 */
|
||||
/* 水平间距 */
|
||||
.container.data-v-324e7894 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #f5f5f5;
|
||||
position: relative;
|
||||
}
|
||||
.address-card.data-v-324e7894 {
|
||||
margin: 25rpx;
|
||||
margin-bottom: 0;
|
||||
padding: 30rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.address-content.data-v-324e7894 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.address-text.data-v-324e7894 {
|
||||
flex: 1;
|
||||
}
|
||||
.province-city.data-v-324e7894 {
|
||||
font-size: 15px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.address-detail.data-v-324e7894 {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
}
|
||||
.arrow-right.data-v-324e7894 {
|
||||
color: #ccc;
|
||||
font-size: 18px;
|
||||
}
|
||||
.product-section.data-v-324e7894 {
|
||||
margin: 25rpx;
|
||||
padding: 30rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.section-title.data-v-324e7894 {
|
||||
font-size: 15px;
|
||||
color: #333;
|
||||
margin-bottom: 15px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.product-list.data-v-324e7894 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.product-item.data-v-324e7894 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.product-image.data-v-324e7894 {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 4px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.product-info.data-v-324e7894 {
|
||||
flex: 1;
|
||||
}
|
||||
.product-name.data-v-324e7894 {
|
||||
font-size: 14px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.product-spec.data-v-324e7894 {
|
||||
font-size: 13px;
|
||||
color: #999;
|
||||
margin: 10rpx 0;
|
||||
}
|
||||
.product-price.data-v-324e7894 {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #ff2929;
|
||||
}
|
||||
.price-section.data-v-324e7894 {
|
||||
margin: 25rpx;
|
||||
padding: 30rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.price-item.data-v-324e7894 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.price-item-pay.data-v-324e7894 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 15rpx;
|
||||
padding: 24rpx 0rpx;
|
||||
border: 1rpx solid #f7f7f7;
|
||||
border-radius: 10rpx;
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
.price-total.data-v-324e7894 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.price-label.data-v-324e7894 {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
.price-value.data-v-324e7894 {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
.total.data-v-324e7894 {
|
||||
color: #ff2929;
|
||||
font-weight: 500;
|
||||
}
|
||||
.remark-section.data-v-324e7894 {
|
||||
margin: 25rpx;
|
||||
padding: 30rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.remark-content.data-v-324e7894 {
|
||||
border-radius: 16rpx;
|
||||
border: 1rpx solid #f7f7f7;
|
||||
overflow: hidden;
|
||||
height: 100rpx;
|
||||
}
|
||||
.footer.data-v-324e7894 {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 100rpx;
|
||||
padding: 0 30rpx;
|
||||
background-color: #fff;
|
||||
border-top: 1rpx solid #eee;
|
||||
}
|
||||
.total-price.data-v-324e7894 {
|
||||
font-size: 15px;
|
||||
color: #333;
|
||||
}
|
||||
.pay-button.data-v-324e7894 {
|
||||
background-color: #799675;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
padding: 0 30px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
border-radius: 18px;
|
||||
}
|
||||
.active-border.data-v-324e7894 {
|
||||
background-color: rgba(121, 150, 117, 0.1);
|
||||
border: 1rpx solid #799675;
|
||||
}
|
||||
.active-border .price-label.data-v-324e7894 {
|
||||
color: #799675;
|
||||
}
|
||||
93
unpackage/dist/dev/mp-weixin/pages/order/order.js
vendored
Normal file
93
unpackage/dist/dev/mp-weixin/pages/order/order.js
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_index = require("../../api/index.js");
|
||||
const utils_fun = require("../../utils/fun.js");
|
||||
if (!Array) {
|
||||
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
|
||||
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
||||
(_easycom_wd_navbar2 + _easycom_z_paging2)();
|
||||
}
|
||||
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
|
||||
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
||||
if (!Math) {
|
||||
(_easycom_wd_navbar + _easycom_z_paging)();
|
||||
}
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "order",
|
||||
setup(__props) {
|
||||
const paging = common_vendor.ref(null);
|
||||
const dataList = common_vendor.ref([]);
|
||||
const queryFrom = common_vendor.ref({
|
||||
orderType: 1,
|
||||
payStatus: "",
|
||||
orderStatus: ""
|
||||
});
|
||||
const changeStatus = (e) => {
|
||||
queryFrom.value.orderStatus = e;
|
||||
paging.value.reload();
|
||||
};
|
||||
const queryList = (pageNo, pageSize) => {
|
||||
api_index.api.orderPage({ pageNo, pageSize, ...queryFrom.value }).then((res) => {
|
||||
paging.value.complete(res.list);
|
||||
}).catch((res) => {
|
||||
paging.value.complete(false);
|
||||
});
|
||||
};
|
||||
const toGoods = (e) => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/goods/goods?id=" + e
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
title: "订单",
|
||||
safeAreaInsetTop: true
|
||||
}),
|
||||
b: common_vendor.n(queryFrom.value.orderStatus === "" ? "active" : ""),
|
||||
c: common_vendor.o(($event) => changeStatus("")),
|
||||
d: common_vendor.n(queryFrom.value.orderStatus === 0 ? "active" : ""),
|
||||
e: common_vendor.o(($event) => changeStatus(0)),
|
||||
f: common_vendor.n(queryFrom.value.orderStatus == 1 ? "active" : ""),
|
||||
g: common_vendor.o(($event) => changeStatus(1)),
|
||||
h: common_vendor.n(queryFrom.value.orderStatus == 2 ? "active" : ""),
|
||||
i: common_vendor.o(($event) => changeStatus(2)),
|
||||
j: common_vendor.f(dataList.value, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(item.orderNo),
|
||||
b: item.orderStatus === 0
|
||||
}, item.orderStatus === 0 ? {} : {}, {
|
||||
c: item.orderStatus == 1
|
||||
}, item.orderStatus == 1 ? {} : {}, {
|
||||
d: item.goods.cover,
|
||||
e: common_vendor.t(item.goods.name),
|
||||
f: common_vendor.t(item.goods.specs),
|
||||
g: common_vendor.t(item.goodsNum),
|
||||
h: item.deductionAmount
|
||||
}, item.deductionAmount ? {
|
||||
i: common_vendor.t(item.deductionAmount)
|
||||
} : {}, {
|
||||
j: common_vendor.t(item.payableAmount),
|
||||
k: common_vendor.t(common_vendor.unref(utils_fun.timeFormat)(item.createTime, "yyyy-MM-dd hh:mm:ss")),
|
||||
l: item.orderStatus == 1
|
||||
}, item.orderStatus == 1 ? {
|
||||
m: common_vendor.o(($event) => toGoods(item.goodsId), index)
|
||||
} : {}, {
|
||||
n: index
|
||||
});
|
||||
}),
|
||||
k: common_vendor.sr(paging, "93207a4f-0", {
|
||||
"k": "paging"
|
||||
}),
|
||||
l: common_vendor.o(queryList),
|
||||
m: common_vendor.o(($event) => dataList.value = $event),
|
||||
n: common_vendor.p({
|
||||
modelValue: dataList.value
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-93207a4f"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order/order.js.map
|
||||
8
unpackage/dist/dev/mp-weixin/pages/order/order.json
vendored
Normal file
8
unpackage/dist/dev/mp-weixin/pages/order/order.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"wd-navbar": "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar",
|
||||
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/order/order.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/order/order.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="container data-v-93207a4f"><z-paging wx:if="{{n}}" class="r data-v-93207a4f" u-s="{{['d']}}" u-r="paging" bindquery="{{l}}" u-i="93207a4f-0" bind:__l="__l" bindupdateModelValue="{{m}}" u-p="{{n}}"><wd-navbar wx:if="{{a}}" class="data-v-93207a4f" u-i="93207a4f-1,93207a4f-0" bind:__l="__l" u-p="{{a}}"></wd-navbar><view class="nav-tabs data-v-93207a4f"><view class="{{['tab-item', 'data-v-93207a4f', b]}}" bindtap="{{c}}">全部</view><view class="{{['tab-item', 'data-v-93207a4f', d]}}" bindtap="{{e}}">待付款</view><view class="{{['tab-item', 'data-v-93207a4f', f]}}" bindtap="{{g}}">已完成</view><view class="{{['tab-item', 'data-v-93207a4f', h]}}" bindtap="{{i}}">已取消</view></view><view class="order-list data-v-93207a4f"><view wx:for="{{j}}" wx:for-item="item" wx:key="n" class="order-item data-v-93207a4f"><view class="order-header data-v-93207a4f"><text class="order-id data-v-93207a4f">{{item.a}}</text><text wx:if="{{item.b}}" class="order-status pending data-v-93207a4f">待付款</text><text wx:if="{{item.c}}" class="order-status completed data-v-93207a4f">已完成</text></view><view class="order-content data-v-93207a4f"><image class="product-image data-v-93207a4f" src="{{item.d}}" mode="aspectFill"></image><view class="product-info data-v-93207a4f"><view class="product-name data-v-93207a4f"><view class="data-v-93207a4f">{{item.e}}</view></view><view class="product-spec data-v-93207a4f"><view class="data-v-93207a4f">{{item.f}}</view><view class="product-count data-v-93207a4f">×{{item.g}}</view></view><view class="product-price data-v-93207a4f"><view wx:if="{{item.h}}" class="data-v-93207a4f" style="font-size:26rpx">已抵扣金额:¥{{item.i}}</view><view wx:else class="data-v-93207a4f"></view><text class="data-v-93207a4f" style="font-weight:bold">¥{{item.j}}</text></view></view></view><view class="order-footer data-v-93207a4f"><view class="order-time data-v-93207a4f">{{item.k}}</view><view class="order-actions data-v-93207a4f"><view wx:if="{{item.l}}" class="btn-buy-again data-v-93207a4f" bindtap="{{item.m}}">再次购买</view></view></view></view></view></z-paging></view>
|
||||
173
unpackage/dist/dev/mp-weixin/pages/order/order.wxss
vendored
Normal file
173
unpackage/dist/dev/mp-weixin/pages/order/order.wxss
vendored
Normal file
@@ -0,0 +1,173 @@
|
||||
|
||||
.container.data-v-93207a4f {
|
||||
padding: 0;
|
||||
background-color: #f5f5f5;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* 导航标签样式 */
|
||||
.nav-tabs.data-v-93207a4f {
|
||||
display: flex;
|
||||
/* justify-content: space-around; */
|
||||
background-color: #ffffff;
|
||||
padding: 24rpx 0;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
}
|
||||
.tab-item.data-v-93207a4f {
|
||||
font-size: 15px;
|
||||
color: #999;
|
||||
position: relative;
|
||||
padding: 0 10px;
|
||||
z-index: 9;
|
||||
}
|
||||
.tab-item.active.data-v-93207a4f {
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
.tab-item.active.data-v-93207a4f::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0rpx;
|
||||
right: 20rpx;
|
||||
width: 40rpx;
|
||||
height: 12rpx;
|
||||
background: #627c54;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
z-index: 5;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
/* 订单列表样式 */
|
||||
.order-list.data-v-93207a4f {
|
||||
padding: 10px;
|
||||
}
|
||||
.order-item.data-v-93207a4f {
|
||||
background-color: #fff;
|
||||
margin-bottom: 36rpx;
|
||||
border-radius: 16rpx;
|
||||
padding: 36rpx;
|
||||
}
|
||||
.order-header.data-v-93207a4f {
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
padding-bottom: 24rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.order-id.data-v-93207a4f {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
.order-status.data-v-93207a4f {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.pending.data-v-93207a4f {
|
||||
color: #ff5722;
|
||||
}
|
||||
.completed.data-v-93207a4f {
|
||||
color: #4caf50;
|
||||
}
|
||||
.cancelled.data-v-93207a4f {
|
||||
color: #f44336;
|
||||
}
|
||||
.order-content.data-v-93207a4f {
|
||||
display: flex;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.product-image.data-v-93207a4f {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 20rpx;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
.product-info.data-v-93207a4f {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.product-name.data-v-93207a4f {
|
||||
font-size: 28rpx;
|
||||
color: #232323;
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.product-spec.data-v-93207a4f {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.product-count.data-v-93207a4f {
|
||||
font-size: 24rpx;
|
||||
color: #232323;
|
||||
text-align: right;
|
||||
}
|
||||
.product-price.data-v-93207a4f {
|
||||
font-size: 36rpx;
|
||||
color: #ff3d3d;
|
||||
/* font-weight: bold; */
|
||||
text-align: right;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.order-footer.data-v-93207a4f {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 24rpx 0 0;
|
||||
border-top: 1rpx solid #f5f5f5;
|
||||
}
|
||||
.order-time.data-v-93207a4f {
|
||||
font-size: 24rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.order-actions.data-v-93207a4f {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
.btn-cancel.data-v-93207a4f,
|
||||
.btn-pay.data-v-93207a4f,
|
||||
.btn-reorder.data-v-93207a4f,
|
||||
.btn-buy-again.data-v-93207a4f {
|
||||
width: 150rpx;
|
||||
height: 56rpx;
|
||||
border-radius: 28rpx;
|
||||
/* border: 1rpx solid #999999; */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.btn-cancel.data-v-93207a4f {
|
||||
border: 1rpx solid #999999;
|
||||
color: #999;
|
||||
}
|
||||
.btn-pay.data-v-93207a4f {
|
||||
color: #ff6f00;
|
||||
border: 1rpx solid #ff6f00;
|
||||
}
|
||||
.btn-reorder.data-v-93207a4f {
|
||||
color: #ffffff;
|
||||
background-color: #458f3b;
|
||||
border: none;
|
||||
}
|
||||
.btn-buy-again.data-v-93207a4f {
|
||||
color: #ffffff;
|
||||
background-color: #f44336;
|
||||
border: none;
|
||||
}
|
||||
.btn-cancel.data-v-93207a4f:active,
|
||||
.btn-pay.data-v-93207a4f:active,
|
||||
.btn-reorder.data-v-93207a4f:active,
|
||||
.btn-buy-again.data-v-93207a4f:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
162
unpackage/dist/dev/mp-weixin/pages/order/success.js
vendored
Normal file
162
unpackage/dist/dev/mp-weixin/pages/order/success.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
unpackage/dist/dev/mp-weixin/pages/order/success.json
vendored
Normal file
7
unpackage/dist/dev/mp-weixin/pages/order/success.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"wd-navbar": "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/order/success.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/order/success.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="app data-v-2795c576" style="{{p}}"><wd-navbar wx:if="{{a}}" class="data-v-2795c576" u-i="2795c576-0" bind:__l="__l" u-p="{{a}}"></wd-navbar><view class="header data-v-2795c576"><image src="{{b}}" class="success-image data-v-2795c576"></image><view class="success-title data-v-2795c576">{{c}}</view><view class="hr data-v-2795c576"></view></view><view class="info-box data-v-2795c576"><view class="info-amount data-v-2795c576">¥ {{d}}</view><view wx:if="{{e}}" class="left-circle data-v-2795c576"></view><view wx:if="{{f}}" class="right-circle data-v-2795c576"></view><view wx:if="{{g}}" class="info-main data-v-2795c576"><view wx:if="{{h}}" class="info-cell data-v-2795c576"><view class="left data-v-2795c576">抵扣金额</view><view class="right data-v-2795c576" style="color:#ff2929">¥{{i}}</view></view><view wx:if="{{j}}" class="info-cell data-v-2795c576"><view class="left data-v-2795c576">订单编号</view><view class="right data-v-2795c576">{{k}}</view></view><view wx:if="{{l}}" class="info-cell data-v-2795c576"><view class="left data-v-2795c576">付款时间</view><view class="right data-v-2795c576">{{m}}</view></view></view></view><view class="button-query data-v-2795c576" bindtap="{{n}}">查看订单</view><view class="button-query1 data-v-2795c576" bindtap="{{o}}">返回首页</view><view class="footer-hr data-v-2795c576"></view></view>
|
||||
115
unpackage/dist/dev/mp-weixin/pages/order/success.wxss
vendored
Normal file
115
unpackage/dist/dev/mp-weixin/pages/order/success.wxss
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
/* 水平间距 */
|
||||
/* 水平间距 */
|
||||
.app.data-v-2795c576 {
|
||||
--bgcolor: #f3f3f3;
|
||||
background-color: var(--bgcolor);
|
||||
min-height: calc(100vh - var(--window-bottom) - var(--window-top));
|
||||
}
|
||||
.header.data-v-2795c576 {
|
||||
background-color: var(--main);
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
padding: 80rpx 30rpx 50rpx 30rpx;
|
||||
}
|
||||
.header .success-image.data-v-2795c576 {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
.header .success-title.data-v-2795c576 {
|
||||
font-size: 34rpx;
|
||||
margin-top: 40rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.header .hr.data-v-2795c576 {
|
||||
margin-top: 40rpx;
|
||||
width: 100%;
|
||||
height: 30rpx;
|
||||
border-radius: 20rpx;
|
||||
opacity: 0.1;
|
||||
background-color: #000000;
|
||||
}
|
||||
.info-box.data-v-2795c576 {
|
||||
width: calc(100% - 100rpx);
|
||||
margin: 0 50rpx;
|
||||
position: relative;
|
||||
margin-top: -64rpx;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.info-box .info-amount.data-v-2795c576 {
|
||||
height: 150rpx;
|
||||
line-height: 150rpx;
|
||||
text-align: center;
|
||||
color: var(--main);
|
||||
font-weight: bold;
|
||||
font-size: 60rpx;
|
||||
border-bottom: 4rpx dashed #f3f3f3;
|
||||
}
|
||||
.info-box .left-circle.data-v-2795c576 {
|
||||
background-color: var(--bgcolor);
|
||||
position: absolute;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 50%;
|
||||
top: 130rpx;
|
||||
left: -20rpx;
|
||||
}
|
||||
.info-box .right-circle.data-v-2795c576 {
|
||||
background-color: var(--bgcolor);
|
||||
position: absolute;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 50%;
|
||||
top: 130rpx;
|
||||
right: -20rpx;
|
||||
}
|
||||
.info-box .info-main.data-v-2795c576 {
|
||||
padding: 30rpx;
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.info-box .info-main .info-cell.data-v-2795c576 {
|
||||
display: flex;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
.info-box .info-main .info-cell .left.data-v-2795c576 {
|
||||
width: 200rpx;
|
||||
text-align: left;
|
||||
}
|
||||
.info-box .info-main .info-cell .right.data-v-2795c576 {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
}
|
||||
.uni-ad.data-v-2795c576 {
|
||||
margin-top: 50rpx;
|
||||
min-height: 100rpx;
|
||||
}
|
||||
.uni-ad .ad-interactive.data-v-2795c576 {
|
||||
text-align: center;
|
||||
}
|
||||
.button-query.data-v-2795c576 {
|
||||
background-color: var(--main);
|
||||
color: #ffffff;
|
||||
width: calc(100% - 120rpx);
|
||||
margin: 50rpx 60rpx 0 60rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
border-radius: 50rpx;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.button-query.data-v-2795c576:active {
|
||||
opacity: 0.7;
|
||||
}
|
||||
.button-query1.data-v-2795c576 {
|
||||
border: 1rpx solid var(--main);
|
||||
color: var(--main);
|
||||
width: calc(100% - 120rpx);
|
||||
margin: 50rpx 60rpx 0 60rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
border-radius: 50rpx;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.footer-hr.data-v-2795c576 {
|
||||
height: 100rpx;
|
||||
display: block;
|
||||
}
|
||||
Reference in New Issue
Block a user