This commit is contained in:
2026-01-05 12:47:14 +08:00
commit 1fc846fae3
1614 changed files with 162035 additions and 0 deletions

View File

@@ -0,0 +1,151 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_order = require("../../api/order.js");
const utils_helper = require("../../utils/helper.js");
const api_config = require("../../api/config.js");
if (!Array) {
const _easycom_nut_step2 = common_vendor.resolveComponent("nut-step");
const _easycom_nut_steps2 = common_vendor.resolveComponent("nut-steps");
const _easycom_nut_cell2 = common_vendor.resolveComponent("nut-cell");
const _easycom_nut_cell_group2 = common_vendor.resolveComponent("nut-cell-group");
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
const _easycom_nut_price2 = common_vendor.resolveComponent("nut-price");
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
(_easycom_nut_step2 + _easycom_nut_steps2 + _easycom_nut_cell2 + _easycom_nut_cell_group2 + _easycom_nut_tag2 + _easycom_nut_price2 + _easycom_nut_button2)();
}
const _easycom_nut_step = () => "../../uni_modules/nutui-uni/components/step/step.js";
const _easycom_nut_steps = () => "../../uni_modules/nutui-uni/components/steps/steps.js";
const _easycom_nut_cell = () => "../../uni_modules/nutui-uni/components/cell/cell.js";
const _easycom_nut_cell_group = () => "../../uni_modules/nutui-uni/components/cellgroup/cellgroup.js";
const _easycom_nut_tag = () => "../../uni_modules/nutui-uni/components/tag/tag.js";
const _easycom_nut_price = () => "../../uni_modules/nutui-uni/components/price/price.js";
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
if (!Math) {
(_easycom_nut_step + _easycom_nut_steps + _easycom_nut_cell + _easycom_nut_cell_group + _easycom_nut_tag + _easycom_nut_price + _easycom_nut_button)();
}
const _sfc_main = {
__name: "detail",
setup(__props) {
const audit = common_vendor.ref(true);
const id = common_vendor.ref(0);
const detail = common_vendor.reactive({});
const images = common_vendor.ref([]);
common_vendor.onLoad((options) => {
id.value = options.id;
});
common_vendor.onShow(() => {
getConfig();
api_order.fetchOrderDetail(id.value).then((res) => {
Object.assign(detail, res);
});
});
const getConfig = () => {
api_config.fetchGetConfig().then((res) => {
common_vendor.index.__f__("log", "at pages/order/detail.vue:149", "getConfig=====>", res);
audit.value = res.appConfig.is_audit == 1;
common_vendor.index.__f__("log", "at pages/order/detail.vue:151", res.appConfig.pay_imgs);
let pay_imgs = JSON.parse(res.appConfig.pay_imgs) || [];
let wechat_imgs = JSON.parse(res.appConfig.wechat_imgs) || [];
let pay_imgs_arr = pay_imgs.map((item) => item.file_path) || [];
let wechat_imgs_arr = wechat_imgs.map((item) => item.file_path) || [];
const merged_imgs_arr = pay_imgs_arr.concat(wechat_imgs_arr);
images.value = merged_imgs_arr;
});
};
const showPayImgs = () => {
if (images.value.length === 0) {
common_vendor.index.showToast({
title: "暂无图片",
icon: "none"
});
return;
}
common_vendor.index.__f__("log", "at pages/order/detail.vue:170", "preview images:", images);
common_vendor.index.previewImage({
urls: images.value
});
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
title: "待付款"
}),
b: common_vendor.p({
title: "待发货"
}),
c: common_vendor.p({
title: "待收货"
}),
d: common_vendor.p({
title: "已完成"
}),
e: common_vendor.p({
current: detail.progress
}),
f: detail.address_info
}, detail.address_info ? {
g: common_vendor.t(detail.address_info.user_name),
h: common_vendor.t(detail.address_info.tel_number),
i: common_vendor.t(detail.address_info.province_name + detail.address_info.city_name + detail.address_info.county_name + detail.address_info.street_name + detail.address_info.detail_info_new)
} : {}, {
j: common_vendor.f(detail.goods, (goods, index, i0) => {
return {
a: common_vendor.t(goods.snapshot_info.degree.degree_name),
b: "6b23c96c-9-" + i0 + "," + ("6b23c96c-8-" + i0),
c: common_vendor.t(goods.goods_name),
d: common_vendor.t(goods.goods_no),
e: "6b23c96c-10-" + i0 + "," + ("6b23c96c-8-" + i0),
f: common_vendor.p({
price: goods.goods_price,
size: "small",
["need-symbol"]: true
}),
g: index,
h: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/mall/detail?id=" + goods.goods_id), index),
i: "6b23c96c-8-" + i0 + ",6b23c96c-7"
};
}),
k: common_vendor.p({
["custom-color"]: "#1a1a1a"
}),
l: common_vendor.p({
center: true
}),
m: common_vendor.p({
price: detail.pay_price,
size: "normal",
["need-symbol"]: true
}),
n: common_vendor.p({
title: "订单编号",
desc: detail.order_no
}),
o: common_vendor.p({
title: "下单时间",
desc: detail.create_time
}),
p: detail.progress >= 3
}, detail.progress >= 3 ? {
q: common_vendor.p({
title: "物流公司",
desc: detail.express_company
}),
r: common_vendor.p({
title: "物流单号",
desc: detail.express_no
})
} : {}, {
s: detail.progress === 1 && !audit.value
}, detail.progress === 1 && !audit.value ? {
t: common_vendor.o(($event) => showPayImgs()),
v: common_vendor.p({
type: "primary",
block: true
})
} : {});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-6b23c96c"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order/detail.js.map

View File

@@ -0,0 +1,12 @@
{
"navigationBarTitleText": "订单详情",
"usingComponents": {
"nut-step": "../../uni_modules/nutui-uni/components/step/step",
"nut-steps": "../../uni_modules/nutui-uni/components/steps/steps",
"nut-cell": "../../uni_modules/nutui-uni/components/cell/cell",
"nut-cell-group": "../../uni_modules/nutui-uni/components/cellgroup/cellgroup",
"nut-tag": "../../uni_modules/nutui-uni/components/tag/tag",
"nut-price": "../../uni_modules/nutui-uni/components/price/price",
"nut-button": "../../uni_modules/nutui-uni/components/button/button"
}
}

View File

@@ -0,0 +1 @@
<view class="page-content data-v-6b23c96c"><nut-steps wx:if="{{e}}" class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-0" bind:__l="__l" u-p="{{e}}"><nut-step wx:if="{{a}}" class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-1,6b23c96c-0" bind:__l="__l" u-p="{{a}}">1</nut-step><nut-step wx:if="{{b}}" class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-2,6b23c96c-0" bind:__l="__l" u-p="{{b}}">2</nut-step><nut-step wx:if="{{c}}" class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-3,6b23c96c-0" bind:__l="__l" u-p="{{c}}">3</nut-step><nut-step wx:if="{{d}}" class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-4,6b23c96c-0" bind:__l="__l" u-p="{{d}}">4</nut-step></nut-steps><nut-cell-group class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-5" bind:__l="__l"><nut-cell class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-6,6b23c96c-5" bind:__l="__l"><view wx:if="{{f}}" class="address-inner data-v-6b23c96c"><text class="data-v-6b23c96c">{{g}} - {{h}}</text><text class="data-v-6b23c96c">{{i}}</text></view></nut-cell></nut-cell-group><nut-cell-group class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-7" bind:__l="__l"><nut-cell wx:for="{{j}}" wx:for-item="goods" wx:key="g" class="data-v-6b23c96c" u-s="{{['title','link']}}" bindclick="{{goods.h}}" u-i="{{goods.i}}" bind:__l="__l" u-p="{{l}}"><view class="goods-info-row data-v-6b23c96c" slot="title"><view class="left-text data-v-6b23c96c"><view class="goods-name data-v-6b23c96c"><nut-tag wx:if="{{k}}" class="data-v-6b23c96c" u-s="{{['d']}}" u-i="{{goods.b}}" bind:__l="__l" u-p="{{k}}">{{goods.a}}</nut-tag><text class="data-v-6b23c96c" style="margin-left:10rpx">{{goods.c}}</text></view><text class="goods-no data-v-6b23c96c">串号:{{goods.d}}</text></view></view><nut-price class="data-v-6b23c96c" u-i="{{goods.e}}" bind:__l="__l" u-p="{{goods.f}}" slot="link"/></nut-cell></nut-cell-group><nut-cell-group class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-11" bind:__l="__l"><nut-cell class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-12,6b23c96c-11" bind:__l="__l"><view class="total-price-inner data-v-6b23c96c"><text class="data-v-6b23c96c">商品总额</text><nut-price wx:if="{{m}}" class="data-v-6b23c96c" u-i="6b23c96c-13,6b23c96c-12" bind:__l="__l" u-p="{{m}}"/></view></nut-cell></nut-cell-group><nut-cell-group class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-14" bind:__l="__l"><nut-cell wx:if="{{n}}" class="data-v-6b23c96c" u-i="6b23c96c-15,6b23c96c-14" bind:__l="__l" u-p="{{n}}"/><nut-cell wx:if="{{o}}" class="data-v-6b23c96c" u-i="6b23c96c-16,6b23c96c-14" bind:__l="__l" u-p="{{o}}"/></nut-cell-group><nut-cell-group wx:if="{{p}}" class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-17" bind:__l="__l"><nut-cell wx:if="{{q}}" class="data-v-6b23c96c" u-i="6b23c96c-18,6b23c96c-17" bind:__l="__l" u-p="{{q}}"/><nut-cell wx:if="{{r}}" class="data-v-6b23c96c" u-i="6b23c96c-19,6b23c96c-17" bind:__l="__l" u-p="{{r}}"/></nut-cell-group><view wx:if="{{s}}" class="wechat-img-inner data-v-6b23c96c"><nut-button wx:if="{{v}}" class="data-v-6b23c96c" u-s="{{['d']}}" bindclick="{{t}}" u-i="6b23c96c-20" bind:__l="__l" u-p="{{v}}"> 点我付款 </nut-button></view></view>

View File

@@ -0,0 +1,77 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.page-content.data-v-6b23c96c {
min-height: 100vh;
background-color: #f2f3f5;
padding: 20rpx;
}
.address-inner.data-v-6b23c96c {
display: flex;
flex-direction: column;
justify-content: center;
}
.total-price-inner.data-v-6b23c96c {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.total-price-inner view.data-v-6b23c96c:nth-child(2) {
color: #fa2c19;
}
.wechat-img-inner.data-v-6b23c96c {
margin-top: 60rpx;
padding: 0rpx 80rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}

View File

@@ -0,0 +1,245 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_house_order = require("../../api/house_order.js");
const api_config = require("../../api/config.js");
if (!Array) {
const _easycom_nut_cell2 = common_vendor.resolveComponent("nut-cell");
const _easycom_nut_cell_group2 = common_vendor.resolveComponent("nut-cell-group");
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
const _easycom_nut_price2 = common_vendor.resolveComponent("nut-price");
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
(_easycom_nut_cell2 + _easycom_nut_cell_group2 + _easycom_nut_tag2 + _easycom_nut_price2 + _easycom_nut_button2)();
}
const _easycom_nut_cell = () => "../../uni_modules/nutui-uni/components/cell/cell.js";
const _easycom_nut_cell_group = () => "../../uni_modules/nutui-uni/components/cellgroup/cellgroup.js";
const _easycom_nut_tag = () => "../../uni_modules/nutui-uni/components/tag/tag.js";
const _easycom_nut_price = () => "../../uni_modules/nutui-uni/components/price/price.js";
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
if (!Math) {
(_easycom_nut_cell + _easycom_nut_cell_group + _easycom_nut_tag + _easycom_nut_price + _easycom_nut_button)();
}
const _sfc_main = {
__name: "housePreview",
setup(__props) {
const audit = common_vendor.ref(true);
const isWarehouse = common_vendor.ref(false);
const singleRule = common_vendor.ref([]);
const rangeRule = common_vendor.ref([]);
const warehouseRule = common_vendor.reactive({
val: 0,
val_type: 1
});
const GetPriceRules = () => {
api_config.fetchGetPriceRules().then((res) => {
var _a;
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:107", "res", res);
rangeRule.value = (res == null ? void 0 : res.range) ?? [];
singleRule.value = (res == null ? void 0 : res.single) ?? [];
Object.assign(warehouseRule, ((_a = res == null ? void 0 : res.warehouse) == null ? void 0 : _a[0]) ?? {
val: 0,
val_type: 1
});
});
};
const getPrice = (goods2) => {
if (isWarehouse.value) {
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:125", "开启整仓调价");
const list = singleRule.value || singleRule;
const rule = list.find((item) => item.product_id === (goods2 == null ? void 0 : goods2.goods_id));
if (rule) {
const basePrice = Number(goods2 == null ? void 0 : goods2.goods_price);
const val = Number(rule.val);
let finalPrice = basePrice;
if (rule.val_type == 1) {
finalPrice = basePrice + val;
} else if (rule.val_type == 2) {
finalPrice = basePrice + basePrice * val / 100;
}
return finalPrice.toFixed(2);
} else {
const basePrice = Number(goods2 == null ? void 0 : goods2.goods_price);
const val = Number(warehouseRule.val);
let finalPrice = basePrice;
if (warehouseRule.val_type == 1) {
finalPrice = basePrice + val;
} else if (warehouseRule.val_type == 2) {
finalPrice = basePrice + basePrice * val / 100;
}
return finalPrice.toFixed(2);
}
} else {
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:156", "未开启整仓调价");
const singleRuleList = singleRule.value || singleRule;
const oneRule = singleRuleList.find((item) => item.product_id === (goods2 == null ? void 0 : goods2.goods_id));
if (oneRule) {
const basePrice = Number(goods2 == null ? void 0 : goods2.goods_price);
const val = Number(oneRule.val);
let finalPrice = basePrice;
if (oneRule.val_type == 1) {
finalPrice = basePrice + val;
} else if (oneRule.val_type == 2) {
finalPrice = basePrice + basePrice * val / 100;
}
return finalPrice.toFixed(2);
} else {
const basePrice = Number(goods2 == null ? void 0 : goods2.goods_price);
const rangeRulelist = rangeRule.value || rangeRule;
const quRule = rangeRulelist.find((item) => {
const min = Number(item.min_price);
const max = Number(item.max_price);
return basePrice >= min && basePrice < max;
}) || null;
if (quRule) {
const val = Number(quRule.val);
let finalPrice = basePrice;
if (quRule.val_type == 1) {
finalPrice = basePrice + val;
} else if (quRule.val_type == 2) {
finalPrice = basePrice + basePrice * val / 100;
}
return finalPrice.toFixed(2);
} else {
return basePrice;
}
}
}
};
const getConfig = () => {
api_config.fetchGetConfig().then((res) => {
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:204", "getConfig=====>", res);
audit.value = res.appConfig.is_audit == 1;
isWarehouse.value = res.appConfig.is_warehouse == 1;
});
};
const chooseAddress = () => {
common_vendor.index.chooseAddress({
success(res) {
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:226", res);
Object.assign(form, {
address_info: {
address_id: res.addressID || 1,
user_name: res.userName,
tel_number: res.telNumber,
city_name: res.cityName || "",
county_name: res.countyName || "",
detail_info: res.detailInfo || "",
detail_info_new: res.detailInfoNew || "",
national_code: res.nationalCode || "",
national_code_full: res.nationalCodeFull || "",
postal_code: res.postalCode || "",
province_name: res.provinceName || "",
street_name: res.streetName || ""
}
});
}
});
};
common_vendor.ref([]);
const goods = common_vendor.reactive({});
const order_total_price = common_vendor.ref(0);
const order_total_num = common_vendor.ref(0);
const form = common_vendor.reactive({
goods_id: 0,
address_info: {}
});
const fromStr = common_vendor.ref("");
common_vendor.onLoad((options) => {
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:271", "init");
getConfig();
GetPriceRules();
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:277", "🚀 ~ from:", options.from);
fromStr.value = options.from;
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:279", "🚀 ~ ids:", options.ids);
form.goods_id = options.ids;
});
common_vendor.onShow(() => {
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:287", "🚀 ~ onShowfrom:", fromStr.value);
if (fromStr.value === "list" || fromStr.value === "item") {
api_house_order.houseFetchGoodsPreview({
goods_id: form.goods_id
}).then((res) => {
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:292", res);
Object.assign(goods, res.goods);
order_total_price.value = res.order_total_price;
order_total_num.value = res.order_total_num;
});
}
});
common_vendor.onHide(() => {
fromStr.value = "";
});
const onSubmitClick = () => {
var _a;
if (!((_a = form.address_info) == null ? void 0 : _a.address_id)) {
common_vendor.index.showToast({
title: "请选择收货地址",
icon: "none"
});
return;
}
api_house_order.fetchOrderbuyNow(form).then((res) => {
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:318", res);
common_vendor.index.redirectTo({
url: "/pages/order/detail?id=" + res.order_id,
success: (res2) => {
},
fail: () => {
},
complete: () => {
}
});
});
};
return (_ctx, _cache) => {
var _a, _b, _c, _d, _e, _f;
return common_vendor.e({
a: !((_a = form.address_info) == null ? void 0 : _a.address_id)
}, !((_b = form.address_info) == null ? void 0 : _b.address_id) ? {
b: common_vendor.o(chooseAddress),
c: common_vendor.p({
title: "添加地址",
["is-link"]: true
})
} : {
d: common_vendor.o(chooseAddress),
e: common_vendor.p({
title: form.address_info.user_name + " " + form.address_info.tel_number,
["is-link"]: true,
["sub-title"]: form.address_info.province_name + form.address_info.city_name + form.address_info.county_name + form.address_info.street_name + form.address_info.detail_info_new
})
}, {
f: common_vendor.t((_d = (_c = goods == null ? void 0 : goods.goods_house) == null ? void 0 : _c.degree) == null ? void 0 : _d.degree_name),
g: common_vendor.p({
["custom-color"]: "#1a1a1a"
}),
h: common_vendor.t((_e = goods == null ? void 0 : goods.goods_house) == null ? void 0 : _e.goods_name),
i: common_vendor.t((_f = goods == null ? void 0 : goods.goods_house) == null ? void 0 : _f.goods_no),
j: common_vendor.p({
price: getPrice(goods == null ? void 0 : goods.goods_house),
size: "small",
["need-symbol"]: true
}),
k: common_vendor.p({
center: true
}),
l: common_vendor.t(order_total_num.value),
m: common_vendor.p({
price: getPrice(goods == null ? void 0 : goods.goods_house),
["need-symbol"]: true
}),
n: common_vendor.p({
size: "large",
price: getPrice(goods == null ? void 0 : goods.goods_house),
["need-symbol"]: true
}),
o: common_vendor.o(onSubmitClick),
p: common_vendor.p({
type: "primary"
})
});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f68461ec"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order/housePreview.js.map

View File

@@ -0,0 +1,10 @@
{
"navigationBarTitleText": "提交订单",
"usingComponents": {
"nut-cell": "../../uni_modules/nutui-uni/components/cell/cell",
"nut-cell-group": "../../uni_modules/nutui-uni/components/cellgroup/cellgroup",
"nut-tag": "../../uni_modules/nutui-uni/components/tag/tag",
"nut-price": "../../uni_modules/nutui-uni/components/price/price",
"nut-button": "../../uni_modules/nutui-uni/components/button/button"
}
}

View File

@@ -0,0 +1 @@
<view class="page-content data-v-f68461ec"><nut-cell-group class="data-v-f68461ec" u-s="{{['d']}}" u-i="f68461ec-0" bind:__l="__l"><nut-cell wx:if="{{a}}" class="data-v-f68461ec" bindclick="{{b}}" u-i="f68461ec-1,f68461ec-0" bind:__l="__l" u-p="{{c}}"></nut-cell><nut-cell wx:else class="data-v-f68461ec" bindclick="{{d}}" u-i="f68461ec-2,f68461ec-0" bind:__l="__l" u-p="{{e||''}}"></nut-cell></nut-cell-group><nut-cell-group class="data-v-f68461ec" u-s="{{['d']}}" u-i="f68461ec-3" bind:__l="__l"><nut-cell wx:if="{{k}}" class="data-v-f68461ec" u-s="{{['title','link']}}" u-i="f68461ec-4,f68461ec-3" bind:__l="__l" u-p="{{k}}"><view class="goods-info-row data-v-f68461ec" slot="title"><view class="left-text data-v-f68461ec"><view class="goods-name data-v-f68461ec"><nut-tag wx:if="{{g}}" class="data-v-f68461ec" u-s="{{['d']}}" u-i="f68461ec-5,f68461ec-4" bind:__l="__l" u-p="{{g}}">{{f}}</nut-tag><text class="data-v-f68461ec" style="margin-left:10rpx">{{h}}</text></view><text class="goods-no data-v-f68461ec">串号:{{i}}</text></view></view><nut-price class="data-v-f68461ec" u-i="f68461ec-6,f68461ec-4" bind:__l="__l" u-p="{{j}}" slot="link"/></nut-cell></nut-cell-group><nut-cell-group class="data-v-f68461ec" u-s="{{['d']}}" u-i="f68461ec-7" bind:__l="__l"><nut-cell class="data-v-f68461ec" u-s="{{['d']}}" u-i="f68461ec-8,f68461ec-7" bind:__l="__l"><view class="total-price-inner data-v-f68461ec"><text class="data-v-f68461ec">件数</text><text class="data-v-f68461ec">{{l}}件</text></view></nut-cell><nut-cell class="data-v-f68461ec" u-s="{{['d']}}" u-i="f68461ec-9,f68461ec-7" bind:__l="__l"><view class="total-price-inner data-v-f68461ec"><text class="data-v-f68461ec">商品总额</text><nut-price wx:if="{{m}}" class="data-v-f68461ec" u-i="f68461ec-10,f68461ec-9" bind:__l="__l" u-p="{{m}}"/></view></nut-cell></nut-cell-group><view class="bottom-submit-inner data-v-f68461ec"><view class="bottom-submit-inner-info data-v-f68461ec"><text class="data-v-f68461ec">合计:</text><nut-price wx:if="{{n}}" class="data-v-f68461ec" u-i="f68461ec-11" bind:__l="__l" u-p="{{n}}"/></view><view class="bottom-submit-inner-btn data-v-f68461ec"><nut-button wx:if="{{p}}" class="data-v-f68461ec" u-s="{{['d']}}" bindclick="{{o}}" u-i="f68461ec-12" bind:__l="__l" u-p="{{p}}">确认下单</nut-button></view></view></view>

View File

@@ -0,0 +1,107 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.page-content.data-v-f68461ec {
min-height: calc(100vh - 60px);
background-color: #f2f3f5;
padding: 20rpx;
padding-bottom: 140rpx;
}
/* 信息行布局 */
.goods-info-row.data-v-f68461ec {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 10rpx;
/* 左侧文字样式 */
/* 右侧价格样式 */
}
.goods-info-row .left-text.data-v-f68461ec {
flex: 1;
}
.goods-info-row .goods-name.data-v-f68461ec {
font-size: 30rpx;
color: #000000;
display: block;
margin-bottom: 8rpx;
}
.goods-info-row .goods-no.data-v-f68461ec {
font-size: 26rpx;
color: #000000;
display: block;
}
.goods-info-row .price.data-v-f68461ec {
margin-left: 20rpx;
align-self: center;
/* 垂直居中在两行文字之间 */
}
.bottom-submit-inner.data-v-f68461ec {
position: fixed;
bottom: 0;
left: 0;
height: 120rpx;
background: #fff;
width: calc(100% - 40rpx);
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 auto;
padding: 15rpx 20rpx;
}
.total-price-inner.data-v-f68461ec {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.total-price-inner view.data-v-f68461ec:nth-child(2) {
color: #fa2c19;
}

View File

@@ -0,0 +1,284 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_order = require("../../api/order.js");
const api_config = require("../../api/config.js");
if (!Array) {
const _easycom_nut_dialog2 = common_vendor.resolveComponent("nut-dialog");
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
const _easycom_nut_searchbar2 = common_vendor.resolveComponent("nut-searchbar");
const _easycom_nut_tabs2 = common_vendor.resolveComponent("nut-tabs");
const _easycom_nut_sticky2 = common_vendor.resolveComponent("nut-sticky");
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
const _easycom_nut_price2 = common_vendor.resolveComponent("nut-price");
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
(_easycom_nut_dialog2 + _easycom_nut_button2 + _easycom_nut_searchbar2 + _easycom_nut_tabs2 + _easycom_nut_sticky2 + _easycom_nut_tag2 + _easycom_nut_price2 + _easycom_z_paging2)();
}
const _easycom_nut_dialog = () => "../../uni_modules/nutui-uni/components/dialog/dialog.js";
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
const _easycom_nut_searchbar = () => "../../uni_modules/nutui-uni/components/searchbar/searchbar.js";
const _easycom_nut_tabs = () => "../../uni_modules/nutui-uni/components/tabs/tabs.js";
const _easycom_nut_sticky = () => "../../uni_modules/nutui-uni/components/sticky/sticky.js";
const _easycom_nut_tag = () => "../../uni_modules/nutui-uni/components/tag/tag.js";
const _easycom_nut_price = () => "../../uni_modules/nutui-uni/components/price/price.js";
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
if (!Math) {
(_easycom_nut_dialog + _easycom_nut_button + _easycom_nut_searchbar + _easycom_nut_tabs + _easycom_nut_sticky + _easycom_nut_tag + _easycom_nut_price + _easycom_z_paging)();
}
const _sfc_main = {
__name: "index",
setup(__props) {
const audit = common_vendor.ref(true);
const images = common_vendor.ref([]);
const current_tab_idx = common_vendor.ref(0);
const dataList = common_vendor.ref([]);
const paging = common_vendor.ref(null);
const tabs_config = [
{
title: "全部",
status: "all"
},
{
title: "待付款",
status: "payment"
},
{
title: "待发货",
status: "delivery"
},
{
title: "待收货",
status: "received"
},
{
title: "已完成",
status: "finish"
}
];
const visibleCancelOrderDialog = common_vendor.ref(false);
const current_cancel_order_id = common_vendor.ref(0);
const search_val = common_vendor.ref("");
const onChangeTab = (item, idx) => {
current_tab_idx.value = idx;
paging.value.reload();
};
const getConfig = () => {
api_config.fetchGetConfig().then((res) => {
common_vendor.index.__f__("log", "at pages/order/index.vue:165", "getConfig=====>", res);
audit.value = res.appConfig.is_audit == 1;
common_vendor.index.__f__("log", "at pages/order/index.vue:167", res.appConfig.pay_imgs);
let pay_imgs = JSON.parse(res.appConfig.pay_imgs) || [];
let wechat_imgs = JSON.parse(res.appConfig.wechat_imgs) || [];
let pay_imgs_arr = pay_imgs.map((item) => item.file_path) || [];
let wechat_imgs_arr = wechat_imgs.map((item) => item.file_path) || [];
const merged_imgs_arr = pay_imgs_arr.concat(wechat_imgs_arr);
images.value = merged_imgs_arr;
});
};
const showPayImgs = () => {
if (images.value.length === 0) {
common_vendor.index.showToast({
title: "暂无图片",
icon: "none"
});
return;
}
common_vendor.index.__f__("log", "at pages/order/index.vue:186", "preview images:", images);
common_vendor.index.previewImage({
urls: images.value
});
};
const navigateToDetail = (id) => {
common_vendor.index.__f__("log", "at pages/order/index.vue:194", id);
if (!id) {
common_vendor.index.__f__("warn", "at pages/order/index.vue:196", "导航ID不能为空");
return;
}
common_vendor.index.navigateTo({
url: `/pages/order/detail?id=${encodeURIComponent(id)}`
});
};
const onClickCancelOrder = () => {
api_order.fetchCancelOrder(current_cancel_order_id.value).then((res) => {
common_vendor.index.showToast({
title: "取消成功",
icon: "none"
});
paging.value.reload();
});
};
const onClickReceiptOrder = (id) => {
api_order.fetchReceiptOrder(id).then((res) => {
common_vendor.index.showToast({
title: "确认收货成功",
icon: "none"
});
paging.value.reload();
});
};
const apiFetchOrderList = (pageNo = 1, pageSize = 10) => {
common_vendor.index.__f__("log", "at pages/order/index.vue:229", tabs_config[current_tab_idx.value]["status"]);
const params = {
page: pageNo,
pageSize: 10,
status: tabs_config[current_tab_idx.value]["status"],
goods_no: search_val.value
};
api_order.fetchOrderList(params).then((res) => {
common_vendor.index.__f__("log", "at pages/order/index.vue:237", res);
paging.value.complete(res.list);
}).catch((res) => {
paging.value.complete(false);
});
};
common_vendor.onLoad((options) => {
current_tab_idx.value = parseInt(options.tab);
});
common_vendor.onShow(() => {
getConfig();
});
const onSearch = () => {
common_vendor.index.__f__("log", "at pages/order/index.vue:261", "搜索:", search_val.value);
paging.value.reload();
};
const onClear = () => {
common_vendor.index.__f__("log", "at pages/order/index.vue:267", "搜索:", search_val.value);
paging.value.reload();
};
const getStatusText = (order) => {
if (order.order_status.value == 20) {
return order.order_status.text;
} else if (order.order_status.value == 30) {
return order.order_status.text;
} else if (order.order_status.value == 10) {
if (order.pay_status.value == 10) {
return order.pay_status.text;
} else if (order.pay_status.value == 20) {
if (order.delivery_status.value == 10) {
return order.delivery_status.text;
} else if (order.delivery_status.value == 20) {
return order.receipt_status.text;
}
}
}
};
return (_ctx, _cache) => {
return {
a: common_vendor.o(($event) => visibleCancelOrderDialog.value = false),
b: common_vendor.o(onClickCancelOrder),
c: common_vendor.o(($event) => visibleCancelOrderDialog.value = $event),
d: common_vendor.p({
title: "取消订单",
content: "确认取消吗?此操作不可恢复!",
visible: visibleCancelOrderDialog.value
}),
e: common_vendor.o(onSearch),
f: common_vendor.p({
size: "small",
type: "primary"
}),
g: common_vendor.o(onSearch),
h: common_vendor.o(onClear),
i: common_vendor.o(($event) => search_val.value = $event),
j: common_vendor.p({
placeholder: "请输入商品串号",
clearable: true,
["input-background"]: "#eee",
modelValue: search_val.value
}),
k: common_vendor.f(tabs_config, (item, idx, i0) => {
return {
a: common_vendor.t(item.title),
b: idx,
c: idx === current_tab_idx.value ? 1 : "",
d: common_vendor.o(($event) => onChangeTab(item, idx), idx)
};
}),
l: common_vendor.o(($event) => current_tab_idx.value = $event),
m: common_vendor.p({
background: "#fff",
modelValue: current_tab_idx.value
}),
n: common_vendor.f(dataList.value, (order, index, i0) => {
return common_vendor.e({
a: common_vendor.t(order.create_time),
b: common_vendor.t(getStatusText(order)),
c: "17a44f9d-6-" + i0 + ",17a44f9d-5",
d: common_vendor.f(order.goods, (goods, iidx, i1) => {
return {
a: common_vendor.t(goods.snapshot_info.degree.degree_name),
b: "17a44f9d-7-" + i0 + "-" + i1 + ",17a44f9d-5",
c: common_vendor.t(goods.goods_name),
d: common_vendor.t(goods.goods_no),
e: "17a44f9d-8-" + i0 + "-" + i1 + ",17a44f9d-5",
f: common_vendor.p({
price: goods.goods_price,
size: "small",
["need-symbol"]: true
}),
g: iidx,
h: common_vendor.o(($event) => navigateToDetail(order.order_id), iidx)
};
}),
e: "17a44f9d-9-" + i0 + ",17a44f9d-5",
f: common_vendor.p({
price: order.total_price,
size: "normal",
["need-symbol"]: true
}),
g: order.order_status.value === 10
}, order.order_status.value === 10 ? common_vendor.e({
h: order.pay_status.value === 10
}, order.pay_status.value === 10 ? {
i: common_vendor.o(($event) => {
visibleCancelOrderDialog.value = true;
current_cancel_order_id.value = order.order_id;
}, index),
j: "17a44f9d-10-" + i0 + ",17a44f9d-5",
k: common_vendor.p({
plain: true,
size: "small"
})
} : {}, {
l: order.pay_status.value === 10 && !audit.value
}, order.pay_status.value === 10 && !audit.value ? {
m: common_vendor.o(($event) => showPayImgs(), index),
n: "17a44f9d-11-" + i0 + ",17a44f9d-5",
o: common_vendor.p({
type: "primary",
size: "small"
})
} : {}, {
p: order.pay_status.value === 20 && order.delivery_status.value === 20 && order.receipt_status.value === 10
}, order.pay_status.value === 20 && order.delivery_status.value === 20 && order.receipt_status.value === 10 ? {
q: common_vendor.o(($event) => onClickReceiptOrder(order.order_id), index),
r: "17a44f9d-12-" + i0 + ",17a44f9d-5",
s: common_vendor.p({
type: "primary",
size: "small"
})
} : {}) : {}, {
t: index
});
}),
o: common_vendor.p({
["custom-color"]: "#1a1a1a"
}),
p: common_vendor.p({
["custom-color"]: "#1a1a1a"
}),
q: common_vendor.sr(paging, "17a44f9d-5", {
"k": "paging"
}),
r: common_vendor.o(apiFetchOrderList),
s: common_vendor.o(($event) => dataList.value = $event),
t: common_vendor.p({
fixed: false,
modelValue: dataList.value
})
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-17a44f9d"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order/index.js.map

View File

@@ -0,0 +1,13 @@
{
"navigationBarTitleText": "我的订单",
"usingComponents": {
"nut-dialog": "../../uni_modules/nutui-uni/components/dialog/dialog",
"nut-button": "../../uni_modules/nutui-uni/components/button/button",
"nut-searchbar": "../../uni_modules/nutui-uni/components/searchbar/searchbar",
"nut-tabs": "../../uni_modules/nutui-uni/components/tabs/tabs",
"nut-sticky": "../../uni_modules/nutui-uni/components/sticky/sticky",
"nut-tag": "../../uni_modules/nutui-uni/components/tag/tag",
"nut-price": "../../uni_modules/nutui-uni/components/price/price",
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging"
}
}

View File

@@ -0,0 +1 @@
<view class="page-content data-v-17a44f9d"><nut-dialog wx:if="{{d}}" class="data-v-17a44f9d" bindcancel="{{a}}" bindok="{{b}}" u-i="17a44f9d-0" bind:__l="__l" bindupdateVisible="{{c}}" u-p="{{d}}"/><nut-sticky class="data-v-17a44f9d" u-s="{{['d']}}" u-i="17a44f9d-1" bind:__l="__l"><nut-searchbar wx:if="{{j}}" class="data-v-17a44f9d" u-s="{{['rightout']}}" bindsearch="{{g}}" bindclear="{{h}}" u-i="17a44f9d-2,17a44f9d-1" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"><nut-button class="data-v-17a44f9d" u-s="{{['d']}}" bindclick="{{e}}" u-i="17a44f9d-3,17a44f9d-2" bind:__l="__l" u-p="{{f}}" slot="rightout">搜索</nut-button></nut-searchbar><nut-tabs wx:if="{{m}}" class="data-v-17a44f9d" u-s="{{['titles']}}" u-i="17a44f9d-4,17a44f9d-1" bind:__l="__l" bindupdateModelValue="{{l}}" u-p="{{m}}"><view class="title-list data-v-17a44f9d" slot="titles"><view wx:for="{{k}}" wx:for-item="item" wx:key="b" class="{{['title-item', 'data-v-17a44f9d', item.c && 'tabs-active']}}" bindtap="{{item.d}}"><view class="nut-tabs__titles-item__text data-v-17a44f9d">{{item.a}}</view><view class="item__line data-v-17a44f9d"/></view></view></nut-tabs></nut-sticky><z-paging wx:if="{{t}}" u-s="{{['d']}}" u-r="paging" style="height:88vh" class="order-list r data-v-17a44f9d" bindquery="{{r}}" u-i="17a44f9d-5" bind:__l="__l" bindupdateModelValue="{{s}}" u-p="{{t}}"><view wx:for="{{n}}" wx:for-item="order" wx:key="t" class="order-inner data-v-17a44f9d"><view class="order-inner-header data-v-17a44f9d"><text class="data-v-17a44f9d">{{order.a}}</text><nut-tag wx:if="{{o}}" class="data-v-17a44f9d" u-s="{{['d']}}" u-i="{{order.c}}" bind:__l="__l" u-p="{{o}}">{{order.b}}</nut-tag></view><view wx:for="{{order.d}}" wx:for-item="goods" wx:key="g" class="goods-info-row data-v-17a44f9d" bindtap="{{goods.h}}"><view class="left-text data-v-17a44f9d"><view class="goods-name data-v-17a44f9d"><nut-tag wx:if="{{p}}" class="data-v-17a44f9d" u-s="{{['d']}}" u-i="{{goods.b}}" bind:__l="__l" u-p="{{p}}">{{goods.a}}</nut-tag><text class="data-v-17a44f9d" style="margin-left:10rpx">{{goods.c}}</text></view><text class="goods-no data-v-17a44f9d">串号:{{goods.d}}</text></view><view class="price data-v-17a44f9d"><nut-price wx:if="{{goods.f}}" class="data-v-17a44f9d" u-i="{{goods.e}}" bind:__l="__l" u-p="{{goods.f}}"/></view></view><view class="footer data-v-17a44f9d"><view class="order-inner-price data-v-17a44f9d"> 总计:<nut-price wx:if="{{order.f}}" class="data-v-17a44f9d" u-i="{{order.e}}" bind:__l="__l" u-p="{{order.f}}"/></view><view wx:if="{{order.g}}" class="order-inner-action data-v-17a44f9d"><view class="data-v-17a44f9d" style="margin-left:10rpx"><nut-button wx:if="{{order.h}}" class="data-v-17a44f9d" u-s="{{['d']}}" bindclick="{{order.i}}" u-i="{{order.j}}" bind:__l="__l" u-p="{{order.k}}"> 取消订单 </nut-button></view><view class="data-v-17a44f9d" style="margin-left:10rpx"><nut-button wx:if="{{order.l}}" class="data-v-17a44f9d" u-s="{{['d']}}" bindclick="{{order.m}}" u-i="{{order.n}}" bind:__l="__l" u-p="{{order.o}}"> 点我付款 </nut-button></view><view class="data-v-17a44f9d" style="margin-left:10rpx"><nut-button wx:if="{{order.p}}" class="data-v-17a44f9d" u-s="{{['d']}}" bindclick="{{order.q}}" u-i="{{order.r}}" bind:__l="__l" u-p="{{order.s}}"> 确认收货 </nut-button></view></view></view></view></z-paging></view>

View File

@@ -0,0 +1,159 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.page-content.data-v-17a44f9d {
min-height: 100vh;
background-color: #f2f3f5;
}
.order-list.data-v-17a44f9d {
display: flex;
flex-direction: column;
width: 100%;
}
.order-inner.data-v-17a44f9d {
display: flex;
flex-direction: column;
background: #fff;
border-radius: 15rpx;
overflow: hidden;
margin: 20rpx;
/* 信息行布局 */
}
.order-inner .order-inner-header.data-v-17a44f9d {
display: flex;
align-items: center;
background-color: #dcdcdc;
color: rgba(0, 0, 0, 0.5);
font-size: 24rpx;
justify-content: space-between;
line-height: 45rpx;
padding: 15rpx 20rpx;
}
.order-inner .goods-info-row.data-v-17a44f9d {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx;
border-bottom: 2rpx solid #f2f3f5;
/* 左侧文字样式 */
/* 右侧价格样式 */
}
.order-inner .goods-info-row .left-text.data-v-17a44f9d {
flex: 1;
}
.order-inner .goods-info-row .goods-name.data-v-17a44f9d {
font-size: 30rpx;
color: #000000;
display: block;
margin-bottom: 8rpx;
}
.order-inner .goods-info-row .goods-no.data-v-17a44f9d {
font-size: 26rpx;
color: #000000;
display: block;
}
.order-inner .goods-info-row .price.data-v-17a44f9d {
margin-left: 20rpx;
align-self: center;
/* 垂直居中在两行文字之间 */
}
.order-inner .footer.data-v-17a44f9d {
display: flex;
flex-direction: column;
}
.order-inner .footer .order-inner-price.data-v-17a44f9d {
display: flex;
justify-content: flex-end;
padding-top: 10rpx;
padding-right: 20rpx;
padding-bottom: 20rpx;
font-size: 24rpx;
align-items: center;
}
.order-inner .footer .order-inner-action.data-v-17a44f9d {
display: flex;
padding-top: 10rpx;
padding-bottom: 30rpx;
align-items: center;
justify-content: flex-end;
}
.title-list.data-v-17a44f9d {
display: flex;
justify-content: space-around;
align-items: center;
width: 100%;
}
.title-list .title-item.data-v-17a44f9d {
display: flex;
justify-content: space-around;
align-items: center;
position: relative;
}
.title-list .tabs-active.data-v-17a44f9d {
font-weight: bold;
color: var(--nut-tabs-titles-item-active-color, var(--nut-title-color, #1a1a1a));
opacity: var(--nut-tabs-titles-item-line-opacity, 1);
transition: width 0.3s ease;
}
.title-list .tabs-active .item__line.data-v-17a44f9d {
position: absolute;
bottom: -10%;
left: 50%;
overflow: hidden;
content: " ";
border-radius: var(--nut-tabs-titles-item-line-border-radius, 0);
opacity: var(--nut-tabs-titles-item-line-opacity, 1);
transition: width 0.3s ease;
transform: translate(-50%, 0);
width: var(--nut-tabs-horizontal-titles-item-active-line-width, 40px);
height: 3px;
content: " ";
background: var(--nut-tabs-horizontal-tab-line-color, linear-gradient(90deg, var(--nut-primary-color, #fa2c19) 0%, rgba(250, 44, 25, 0.15) 100%));
}

View File

@@ -0,0 +1,157 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_order = require("../../api/order.js");
if (!Array) {
const _easycom_nut_cell2 = common_vendor.resolveComponent("nut-cell");
const _easycom_nut_cell_group2 = common_vendor.resolveComponent("nut-cell-group");
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
const _easycom_nut_price2 = common_vendor.resolveComponent("nut-price");
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
(_easycom_nut_cell2 + _easycom_nut_cell_group2 + _easycom_nut_tag2 + _easycom_nut_price2 + _easycom_nut_button2)();
}
const _easycom_nut_cell = () => "../../uni_modules/nutui-uni/components/cell/cell.js";
const _easycom_nut_cell_group = () => "../../uni_modules/nutui-uni/components/cellgroup/cellgroup.js";
const _easycom_nut_tag = () => "../../uni_modules/nutui-uni/components/tag/tag.js";
const _easycom_nut_price = () => "../../uni_modules/nutui-uni/components/price/price.js";
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
if (!Math) {
(_easycom_nut_cell + _easycom_nut_cell_group + _easycom_nut_tag + _easycom_nut_price + _easycom_nut_button)();
}
const _sfc_main = {
__name: "preview",
setup(__props) {
const chooseAddress = () => {
common_vendor.index.chooseAddress({
success(res) {
common_vendor.index.__f__("log", "at pages/order/preview.vue:145", res);
Object.assign(form, {
address_info: {
address_id: res.addressID || 1,
user_name: res.userName,
tel_number: res.telNumber,
city_name: res.cityName || "",
county_name: res.countyName || "",
detail_info: res.detailInfo || "",
detail_info_new: res.detailInfoNew || "",
national_code: res.nationalCode || "",
national_code_full: res.nationalCodeFull || "",
postal_code: res.postalCode || "",
province_name: res.provinceName || "",
street_name: res.streetName || ""
}
});
}
});
};
common_vendor.ref([]);
const list = common_vendor.reactive([]);
const order_total_price = common_vendor.ref(0);
const order_total_num = common_vendor.ref(0);
const form = common_vendor.reactive({
goods_id: 0,
address_info: {}
});
const fromStr = common_vendor.ref("");
common_vendor.onLoad((options) => {
common_vendor.index.__f__("log", "at pages/order/preview.vue:186", "🚀 ~ from:", options.from);
fromStr.value = options.from;
common_vendor.index.__f__("log", "at pages/order/preview.vue:188", "🚀 ~ ids:", options.ids);
form.goods_id = options.ids;
});
common_vendor.onShow(() => {
common_vendor.index.__f__("log", "at pages/order/preview.vue:196", "🚀 ~ onShowfrom:", fromStr.value);
if (fromStr.value === "list" || fromStr.value === "item") {
api_order.fetchOrderPreview(form).then((res) => {
Object.assign(list, res.goods_list);
Object.assign(form.address_info, res.address_info);
order_total_price.value = res.order_total_price;
order_total_num.value = res.order_total_num;
});
}
});
common_vendor.onHide(() => {
fromStr.value = "";
});
const onSubmitClick = () => {
var _a;
if (!((_a = form.address_info) == null ? void 0 : _a.address_id)) {
common_vendor.index.showToast({
title: "请选择收货地址",
icon: "none"
});
return;
}
api_order.fetchOrderbuyNow(form).then((res) => {
common_vendor.index.__f__("log", "at pages/order/preview.vue:223", res);
common_vendor.index.redirectTo({
url: "/pages/order/detail?id=" + res.order_id,
success: (res2) => {
},
fail: () => {
},
complete: () => {
}
});
});
};
return (_ctx, _cache) => {
var _a, _b;
return common_vendor.e({
a: !((_a = form.address_info) == null ? void 0 : _a.address_id)
}, !((_b = form.address_info) == null ? void 0 : _b.address_id) ? {
b: common_vendor.o(chooseAddress),
c: common_vendor.p({
title: "添加地址",
["is-link"]: true
})
} : {
d: common_vendor.o(chooseAddress),
e: common_vendor.p({
title: form.address_info.user_name + " " + form.address_info.tel_number,
["is-link"]: true,
["sub-title"]: form.address_info.province_name + form.address_info.city_name + form.address_info.county_name + form.address_info.street_name + form.address_info.detail_info_new
})
}, {
f: common_vendor.f(list, (goods, index, i0) => {
return {
a: common_vendor.t(goods.degree.degree_name),
b: "2ea27d69-5-" + i0 + "," + ("2ea27d69-4-" + i0),
c: common_vendor.t(goods.goods_name),
d: common_vendor.t(goods.goods_no),
e: "2ea27d69-6-" + i0 + "," + ("2ea27d69-4-" + i0),
f: common_vendor.p({
price: goods.goods_price,
size: "small",
["need-symbol"]: true
}),
g: index,
h: "2ea27d69-4-" + i0 + ",2ea27d69-3"
};
}),
g: common_vendor.p({
["custom-color"]: "#1a1a1a"
}),
h: common_vendor.p({
center: true
}),
i: common_vendor.t(order_total_num.value),
j: common_vendor.p({
price: order_total_price.value,
["need-symbol"]: true
}),
k: common_vendor.p({
size: "large",
price: order_total_price.value,
["need-symbol"]: true
}),
l: common_vendor.o(onSubmitClick),
m: common_vendor.p({
type: "primary"
})
});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2ea27d69"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order/preview.js.map

View File

@@ -0,0 +1,10 @@
{
"navigationBarTitleText": "提交订单",
"usingComponents": {
"nut-cell": "../../uni_modules/nutui-uni/components/cell/cell",
"nut-cell-group": "../../uni_modules/nutui-uni/components/cellgroup/cellgroup",
"nut-tag": "../../uni_modules/nutui-uni/components/tag/tag",
"nut-price": "../../uni_modules/nutui-uni/components/price/price",
"nut-button": "../../uni_modules/nutui-uni/components/button/button"
}
}

View File

@@ -0,0 +1 @@
<view class="page-content data-v-2ea27d69"><nut-cell-group class="data-v-2ea27d69" u-s="{{['d']}}" u-i="2ea27d69-0" bind:__l="__l"><nut-cell wx:if="{{a}}" class="data-v-2ea27d69" bindclick="{{b}}" u-i="2ea27d69-1,2ea27d69-0" bind:__l="__l" u-p="{{c}}"></nut-cell><nut-cell wx:else class="data-v-2ea27d69" bindclick="{{d}}" u-i="2ea27d69-2,2ea27d69-0" bind:__l="__l" u-p="{{e||''}}"></nut-cell></nut-cell-group><nut-cell-group class="data-v-2ea27d69" u-s="{{['d']}}" u-i="2ea27d69-3" bind:__l="__l"><nut-cell wx:for="{{f}}" wx:for-item="goods" wx:key="g" class="data-v-2ea27d69" u-s="{{['title','link']}}" u-i="{{goods.h}}" bind:__l="__l" u-p="{{h}}"><view class="goods-info-row data-v-2ea27d69" slot="title"><view class="left-text data-v-2ea27d69"><view class="goods-name data-v-2ea27d69"><nut-tag wx:if="{{g}}" class="data-v-2ea27d69" u-s="{{['d']}}" u-i="{{goods.b}}" bind:__l="__l" u-p="{{g}}">{{goods.a}}</nut-tag><text class="data-v-2ea27d69" style="margin-left:10rpx">{{goods.c}}</text></view><text class="goods-no data-v-2ea27d69">串号:{{goods.d}}</text></view></view><nut-price class="data-v-2ea27d69" u-i="{{goods.e}}" bind:__l="__l" u-p="{{goods.f}}" slot="link"/></nut-cell></nut-cell-group><nut-cell-group class="data-v-2ea27d69" u-s="{{['d']}}" u-i="2ea27d69-7" bind:__l="__l"><nut-cell class="data-v-2ea27d69" u-s="{{['d']}}" u-i="2ea27d69-8,2ea27d69-7" bind:__l="__l"><view class="total-price-inner data-v-2ea27d69"><text class="data-v-2ea27d69">件数</text><text class="data-v-2ea27d69">{{i}}件</text></view></nut-cell><nut-cell class="data-v-2ea27d69" u-s="{{['d']}}" u-i="2ea27d69-9,2ea27d69-7" bind:__l="__l"><view class="total-price-inner data-v-2ea27d69"><text class="data-v-2ea27d69">商品总额</text><nut-price wx:if="{{j}}" class="data-v-2ea27d69" u-i="2ea27d69-10,2ea27d69-9" bind:__l="__l" u-p="{{j}}"/></view></nut-cell></nut-cell-group><view class="bottom-submit-inner data-v-2ea27d69"><view class="bottom-submit-inner-info data-v-2ea27d69"><text class="data-v-2ea27d69">合计:</text><nut-price wx:if="{{k}}" class="data-v-2ea27d69" u-i="2ea27d69-11" bind:__l="__l" u-p="{{k}}"/></view><view class="bottom-submit-inner-btn data-v-2ea27d69"><nut-button wx:if="{{m}}" class="data-v-2ea27d69" u-s="{{['d']}}" bindclick="{{l}}" u-i="2ea27d69-12" bind:__l="__l" u-p="{{m}}">确认下单</nut-button></view></view></view>

View File

@@ -0,0 +1,107 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.page-content.data-v-2ea27d69 {
min-height: calc(100vh - 60px);
background-color: #f2f3f5;
padding: 20rpx;
padding-bottom: 140rpx;
}
/* 信息行布局 */
.goods-info-row.data-v-2ea27d69 {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 10rpx;
/* 左侧文字样式 */
/* 右侧价格样式 */
}
.goods-info-row .left-text.data-v-2ea27d69 {
flex: 1;
}
.goods-info-row .goods-name.data-v-2ea27d69 {
font-size: 30rpx;
color: #000000;
display: block;
margin-bottom: 8rpx;
}
.goods-info-row .goods-no.data-v-2ea27d69 {
font-size: 26rpx;
color: #000000;
display: block;
}
.goods-info-row .price.data-v-2ea27d69 {
margin-left: 20rpx;
align-self: center;
/* 垂直居中在两行文字之间 */
}
.bottom-submit-inner.data-v-2ea27d69 {
position: fixed;
bottom: 0;
left: 0;
height: 120rpx;
background: #fff;
width: calc(100% - 40rpx);
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 auto;
padding: 15rpx 20rpx;
}
.total-price-inner.data-v-2ea27d69 {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.total-price-inner view.data-v-2ea27d69:nth-child(2) {
color: #fa2c19;
}