增加新模块
This commit is contained in:
@@ -0,0 +1,392 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const utils_enumUtils = require("../../utils/enumUtils.js");
|
||||
const utils_enumCssUtils = require("../../utils/enumCssUtils.js");
|
||||
const _sfc_main = {
|
||||
computed: {
|
||||
ORDER_TYPE() {
|
||||
return utils_enumUtils.ORDER_TYPE;
|
||||
},
|
||||
ORDER_STATUS() {
|
||||
return utils_enumUtils.ORDER_STATUS;
|
||||
},
|
||||
ORDER_STATUS_CSS() {
|
||||
return utils_enumCssUtils.ORDER_STATUS_CSS;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type: 0,
|
||||
// 选中的类型
|
||||
orderTypeList: [
|
||||
{
|
||||
id: 0,
|
||||
title: "全部"
|
||||
},
|
||||
{
|
||||
id: utils_enumUtils.ORDER_TYPE.UNPAID,
|
||||
title: "待支付"
|
||||
},
|
||||
{
|
||||
id: utils_enumUtils.ORDER_TYPE.UNSHIPPED,
|
||||
title: "待发货"
|
||||
},
|
||||
{
|
||||
id: utils_enumUtils.ORDER_TYPE.NOT_RECEIVE,
|
||||
title: "待收货"
|
||||
},
|
||||
{
|
||||
id: utils_enumUtils.ORDER_TYPE.AFTER_SALE,
|
||||
title: "退款售后"
|
||||
}
|
||||
],
|
||||
form: {
|
||||
search: null
|
||||
//搜索
|
||||
},
|
||||
orderList: [
|
||||
{
|
||||
id: 1,
|
||||
url: "/static/common/order_defal.png",
|
||||
name: "哈希店铺",
|
||||
status: 1,
|
||||
paymentTime: 29,
|
||||
// 剩余付款时间,单位:分钟
|
||||
product: [
|
||||
{
|
||||
id: 1,
|
||||
url: "/static/common/product_def.png",
|
||||
title: "美的双开门冰箱大容量多美的双开门冰箱大容量多",
|
||||
description: ["双开门", "大容量"],
|
||||
tag: ["7天无理由退货", "退货险"],
|
||||
quantity: 1,
|
||||
total: 3599
|
||||
}
|
||||
],
|
||||
productTotal: 3599
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
url: "/static/common/order_defal.png",
|
||||
name: "哈希店铺",
|
||||
status: 2,
|
||||
product: [
|
||||
{
|
||||
id: 1,
|
||||
url: "/static/common/product_def.png",
|
||||
title: "美的双开门冰箱大容量多美的双开门冰箱大容量多",
|
||||
description: ["双开门", "大容量"],
|
||||
tag: ["7天无理由退货", "退货险"],
|
||||
quantity: 1,
|
||||
total: 3599
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
url: "/static/common/product_def.png",
|
||||
title: "美的双开门冰箱大容量多美的双开门冰箱大容量多",
|
||||
description: ["双开门", "大容量"],
|
||||
tag: ["7天无理由退货", "退货险"],
|
||||
quantity: 1,
|
||||
total: 3599
|
||||
}
|
||||
],
|
||||
productTotal: 7099.88
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
url: "/static/common/order_defal.png",
|
||||
name: "哈希店铺",
|
||||
status: 4,
|
||||
product: [
|
||||
{
|
||||
id: 1,
|
||||
url: "/static/common/product_def.png",
|
||||
title: "美的双开门冰箱大容量多美的双开门冰箱大容量多",
|
||||
description: ["双开门", "大容量"],
|
||||
tag: ["7天无理由退货", "退货险"],
|
||||
quantity: 1,
|
||||
total: 3599
|
||||
}
|
||||
],
|
||||
productTotal: 3599
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
url: "/static/common/order_defal.png",
|
||||
name: "哈希店铺",
|
||||
status: 5,
|
||||
product: [
|
||||
{
|
||||
id: 1,
|
||||
url: "/static/common/product_def.png",
|
||||
title: "美的双开门冰箱大容量多美的双开门冰箱大容量多",
|
||||
description: ["双开门", "大容量"],
|
||||
tag: ["7天无理由退货", "退货险"],
|
||||
quantity: 1,
|
||||
total: 3599
|
||||
}
|
||||
],
|
||||
productTotal: 3599
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
url: "/static/common/order_defal.png",
|
||||
name: "哈希店铺",
|
||||
status: 6,
|
||||
product: [
|
||||
{
|
||||
id: 1,
|
||||
url: "/static/common/product_def.png",
|
||||
title: "美的双开门冰箱大容量多美的双开门冰箱大容量多",
|
||||
description: ["双开门", "大容量"],
|
||||
tag: ["7天无理由退货", "退货险"],
|
||||
quantity: 1,
|
||||
total: 3599
|
||||
}
|
||||
],
|
||||
productTotal: 3599
|
||||
}
|
||||
],
|
||||
cancelShow: false,
|
||||
// 取消订单
|
||||
reasonList: [
|
||||
{
|
||||
id: 1,
|
||||
name: "地址信息填写错误"
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "不想要了"
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "商品错选/多选"
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "没用/少用/错用优惠券"
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: "商品降价"
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: "其他原因"
|
||||
}
|
||||
],
|
||||
cancelForm: {
|
||||
reason: null,
|
||||
remark: null
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
const type = options.type;
|
||||
this.type = type ? parseInt(type, 10) : 0;
|
||||
},
|
||||
methods: {
|
||||
getValue: utils_enumUtils.getValue,
|
||||
jumpLeft() {
|
||||
common_vendor.index.switchTab({
|
||||
url: "/pages/mine/mine"
|
||||
});
|
||||
},
|
||||
searchFun(val) {
|
||||
common_vendor.index.__f__("log", "at pages/mine_order/mine_order.vue:297", "searchFun", val);
|
||||
},
|
||||
checkType(item) {
|
||||
this.type = item.id;
|
||||
},
|
||||
jumpOrderInfo() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine_order_info/mine_order_info?type=" + this.type
|
||||
});
|
||||
},
|
||||
checkCancel(status) {
|
||||
this.cancelShow = status;
|
||||
if (!status) {
|
||||
this.cancelForm = {
|
||||
reason: null,
|
||||
remark: null
|
||||
};
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 确认取消
|
||||
*/
|
||||
cancelOk() {
|
||||
const params = {
|
||||
...this.cancelForm
|
||||
};
|
||||
if (!params.reason) {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: "请选择取消原因"
|
||||
});
|
||||
return;
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/mine_order/mine_order.vue:330", "params", params);
|
||||
this.checkCancel(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
|
||||
const _easycom_up_search2 = common_vendor.resolveComponent("up-search");
|
||||
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
|
||||
const _easycom_up_radio2 = common_vendor.resolveComponent("up-radio");
|
||||
const _easycom_up_radio_group2 = common_vendor.resolveComponent("up-radio-group");
|
||||
const _easycom_up_textarea2 = common_vendor.resolveComponent("up-textarea");
|
||||
const _easycom_up_popup2 = common_vendor.resolveComponent("up-popup");
|
||||
const _easycom_up_toast2 = common_vendor.resolveComponent("up-toast");
|
||||
(_easycom_up_image2 + _easycom_up_search2 + _easycom_up_icon2 + _easycom_up_radio2 + _easycom_up_radio_group2 + _easycom_up_textarea2 + _easycom_up_popup2 + _easycom_up_toast2)();
|
||||
}
|
||||
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
|
||||
const _easycom_up_search = () => "../../uni_modules/uview-plus/components/u-search/u-search.js";
|
||||
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
|
||||
const _easycom_up_radio = () => "../../uni_modules/uview-plus/components/u-radio/u-radio.js";
|
||||
const _easycom_up_radio_group = () => "../../uni_modules/uview-plus/components/u-radio-group/u-radio-group.js";
|
||||
const _easycom_up_textarea = () => "../../uni_modules/uview-plus/components/u-textarea/u-textarea.js";
|
||||
const _easycom_up_popup = () => "../../uni_modules/uview-plus/components/u-popup/u-popup.js";
|
||||
const _easycom_up_toast = () => "../../uni_modules/uview-plus/components/u-toast/u-toast.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_image + _easycom_up_search + _easycom_up_icon + _easycom_up_radio + _easycom_up_radio_group + _easycom_up_textarea + _easycom_up_popup + _easycom_up_toast)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.o($options.jumpLeft),
|
||||
b: common_vendor.p({
|
||||
src: "/static/common/left.png",
|
||||
width: "20",
|
||||
height: "20",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.o($options.searchFun),
|
||||
d: common_vendor.p({
|
||||
shape: "round",
|
||||
bgColor: "#FFFFFFFF",
|
||||
showAction: false
|
||||
}),
|
||||
e: common_vendor.f($data.orderTypeList, (item, k0, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.title),
|
||||
b: common_vendor.n($data.type === item.id ? "order_type_title_item order_type_title_item_sel" : "order_type_title_item"),
|
||||
c: common_vendor.o(($event) => $options.checkType(item), item.id),
|
||||
d: item.id
|
||||
};
|
||||
}),
|
||||
f: $data.orderList && $data.orderList.length !== 0
|
||||
}, $data.orderList && $data.orderList.length !== 0 ? {
|
||||
g: common_vendor.f($data.orderList, (item, k0, i0) => {
|
||||
return common_vendor.e({
|
||||
a: "abc152e3-2-" + i0,
|
||||
b: common_vendor.p({
|
||||
src: item.url,
|
||||
width: "22",
|
||||
height: "22",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.t(item.name),
|
||||
d: item.status !== 1
|
||||
}, item.status !== 1 ? {
|
||||
e: common_vendor.t($options.getValue($options.ORDER_STATUS, item.status)),
|
||||
f: $options.ORDER_STATUS_CSS[item.status]
|
||||
} : {
|
||||
g: common_vendor.t(item.paymentTime)
|
||||
}, {
|
||||
h: common_vendor.f(item.product, (pItem, k1, i1) => {
|
||||
return {
|
||||
a: "abc152e3-3-" + i0 + "-" + i1,
|
||||
b: common_vendor.p({
|
||||
src: pItem.url,
|
||||
width: "80",
|
||||
height: "80",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.t(pItem.title),
|
||||
d: common_vendor.t(pItem.tag.join(" ")),
|
||||
e: common_vendor.f(pItem.description, (dItem, k2, i2) => {
|
||||
return {
|
||||
a: common_vendor.t(dItem)
|
||||
};
|
||||
}),
|
||||
f: common_vendor.t(pItem.total),
|
||||
g: common_vendor.t(pItem.quantity),
|
||||
h: pItem.id
|
||||
};
|
||||
}),
|
||||
i: item.status === $options.ORDER_TYPE.UNSHIPPED
|
||||
}, item.status === $options.ORDER_TYPE.UNSHIPPED ? {
|
||||
j: common_vendor.o(($event) => $options.checkCancel(true), item.id)
|
||||
} : {}, {
|
||||
k: item.status === $options.ORDER_TYPE.UNPAID
|
||||
}, item.status === $options.ORDER_TYPE.UNPAID ? {
|
||||
l: common_vendor.o((...args) => $options.jumpOrderInfo && $options.jumpOrderInfo(...args), item.id)
|
||||
} : {}, {
|
||||
m: item.status === $options.ORDER_TYPE.COMPLETED
|
||||
}, item.status === $options.ORDER_TYPE.COMPLETED ? {} : {}, {
|
||||
n: item.status === $options.ORDER_TYPE.NOT_RECEIVE
|
||||
}, item.status === $options.ORDER_TYPE.NOT_RECEIVE ? {} : {}, {
|
||||
o: item.status === $options.ORDER_TYPE.UNSHIPPED
|
||||
}, item.status === $options.ORDER_TYPE.UNSHIPPED ? {} : {}, {
|
||||
p: item.status === $options.ORDER_TYPE.COMPLETED
|
||||
}, item.status === $options.ORDER_TYPE.COMPLETED ? {} : {}, {
|
||||
q: item.status === $options.ORDER_TYPE.AFTER_SALE
|
||||
}, item.status === $options.ORDER_TYPE.AFTER_SALE ? {} : {}, {
|
||||
r: [$options.ORDER_TYPE.COMPLETED].includes(item.status)
|
||||
}, [$options.ORDER_TYPE.COMPLETED].includes(item.status) ? {} : {}, {
|
||||
s: [$options.ORDER_TYPE.COMPLETED, $options.ORDER_TYPE.CANCELED].includes(item.status)
|
||||
}, [$options.ORDER_TYPE.COMPLETED, $options.ORDER_TYPE.CANCELED].includes(item.status) ? {} : {}, {
|
||||
t: item.id
|
||||
});
|
||||
})
|
||||
} : {
|
||||
h: common_vendor.p({
|
||||
src: "/static/common/not_order.png",
|
||||
width: "80",
|
||||
height: "80",
|
||||
bgColor: "#f1f6ff00"
|
||||
})
|
||||
}, {
|
||||
i: common_vendor.p({
|
||||
name: "close-circle",
|
||||
color: "#9e9e9e",
|
||||
size: "20"
|
||||
}),
|
||||
j: common_vendor.o(($event) => $options.checkCancel(false)),
|
||||
k: common_vendor.f($data.reasonList, (item, index, i0) => {
|
||||
return {
|
||||
a: index,
|
||||
b: "abc152e3-8-" + i0 + ",abc152e3-7",
|
||||
c: common_vendor.p({
|
||||
customStyle: {
|
||||
marginBottom: "8px"
|
||||
},
|
||||
label: item.name,
|
||||
name: item.name
|
||||
})
|
||||
};
|
||||
}),
|
||||
l: common_vendor.o(($event) => $data.cancelForm.reason = $event),
|
||||
m: common_vendor.p({
|
||||
placement: "column",
|
||||
modelValue: $data.cancelForm.reason
|
||||
}),
|
||||
n: common_vendor.o(($event) => $data.cancelForm.remark = $event),
|
||||
o: common_vendor.p({
|
||||
modelValue: $data.cancelForm.remark
|
||||
}),
|
||||
p: common_vendor.o((...args) => $options.cancelOk && $options.cancelOk(...args)),
|
||||
q: common_vendor.o(($event) => $data.cancelShow = $event),
|
||||
r: common_vendor.p({
|
||||
round: 10,
|
||||
closeOnClickOverlay: false,
|
||||
show: $data.cancelShow
|
||||
}),
|
||||
s: common_vendor.sr("uToastRef", "abc152e3-10")
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-abc152e3"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine_order/mine_order.js.map
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image",
|
||||
"up-search": "../../uni_modules/uview-plus/components/u-search/u-search",
|
||||
"up-icon": "../../uni_modules/uview-plus/components/u-icon/u-icon",
|
||||
"up-radio": "../../uni_modules/uview-plus/components/u-radio/u-radio",
|
||||
"up-radio-group": "../../uni_modules/uview-plus/components/u-radio-group/u-radio-group",
|
||||
"up-textarea": "../../uni_modules/uview-plus/components/u-textarea/u-textarea",
|
||||
"up-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup",
|
||||
"up-toast": "../../uni_modules/uview-plus/components/u-toast/u-toast"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,152 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/* uni.scss */
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
.order_warp.data-v-abc152e3 {
|
||||
height: calc(100vh - 130rpx);
|
||||
background-color: #F5F5F5;
|
||||
padding: 100rpx 30rpx 30rpx;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.order_header.data-v-abc152e3 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.order_type_title.data-v-abc152e3 {
|
||||
display: flex;
|
||||
margin-top: 30rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.order_type_title .order_type_title_item.data-v-abc152e3 {
|
||||
margin-right: 40rpx;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
color: #222222;
|
||||
}
|
||||
.order_type_title .order_type_title_item_sel.data-v-abc152e3 {
|
||||
font-weight: 800;
|
||||
font-size: 36rpx;
|
||||
color: #FF7C41;
|
||||
}
|
||||
.order_list_warp.data-v-abc152e3 {
|
||||
height: calc(100vh - 270rpx);
|
||||
overflow-y: auto;
|
||||
}
|
||||
.order_item.data-v-abc152e3 {
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.order_item .order_item_header.data-v-abc152e3 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.order_item .order_product_title.data-v-abc152e3 {
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #1A1A1A;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.order_item .order_item_header_left.data-v-abc152e3 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.order_item .order_item_header_right.data-v-abc152e3 {
|
||||
font-weight: 500;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.order_item .order_right_due.data-v-abc152e3 {
|
||||
display: flex;
|
||||
background: #FFF9F2;
|
||||
border-radius: 19rpx 22rpx 22rpx 19rpx;
|
||||
}
|
||||
.order_item .order_right_due_msg.data-v-abc152e3 {
|
||||
background: #FF7C41;
|
||||
border-radius: 22rpx 0rpx 12rpx 22rpx;
|
||||
color: #FFFFFF;
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
.order_item .order_right_due_time.data-v-abc152e3 {
|
||||
font-weight: bold;
|
||||
font-size: 24rpx;
|
||||
color: #FF7C41;
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
.order_item .order_item_collect.data-v-abc152e3 {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.order_item .order_item_collect .collect_msg.data-v-abc152e3 {
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
text-align: right;
|
||||
}
|
||||
.cancel_show_warp.data-v-abc152e3 {
|
||||
padding: 20rpx;
|
||||
}
|
||||
.cancel_show_warp .cancel_show_title_warp.data-v-abc152e3 {
|
||||
position: relative;
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: #222222;
|
||||
line-height: 48rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.cancel_show_warp .cancel_show_title_icon.data-v-abc152e3 {
|
||||
position: absolute;
|
||||
right: 14rpx;
|
||||
top: 6rpx;
|
||||
}
|
||||
.cancel_show_warp .cancel_show_msg_warp.data-v-abc152e3 {
|
||||
background: #F8F8F8;
|
||||
padding: 30rpx;
|
||||
font-weight: 500;
|
||||
font-size: 26rpx;
|
||||
color: #222222;
|
||||
line-height: 48rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.cancel_show_warp .cancel_show_reason_warp.data-v-abc152e3 {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.cancel_show_warp .cancel_show_reason_warp .reason_title.data-v-abc152e3 {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #222222;
|
||||
line-height: 36rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.but_border_warp.data-v-abc152e3 {
|
||||
border: 1rpx solid #eeeeee94;
|
||||
margin: 30rpx 0;
|
||||
}
|
||||
.cancel_show_but.data-v-abc152e3 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.add_but.data-v-abc152e3 {
|
||||
position: initial;
|
||||
width: 94%;
|
||||
}
|
||||
Reference in New Issue
Block a user