no message

This commit is contained in:
2024-01-16 22:53:42 +08:00
commit 40e5198c79
479 changed files with 52166 additions and 0 deletions

View File

@@ -0,0 +1,495 @@
var e = require("../../common/vendor.js"),
t = require("../../hooks/onMounted.js"),
u = require("../../hooks/onShareAppMessage.js"),
n = require("../../service/index.js"),
r = require("../../enums/index.js"),
o = require("../../utils/util.js"),
a = require("../../utils/navigate.js"),
s = require("../../utils/common.js");
require("../../hooks/useState.js"),
require("../../store/app/index.js"),
require("../../data/index.js"),
require("../../config/index.js"),
require("../../constant/index.js"),
require("../../utils/request.js"),
Array || e.resolveComponent("uni-load-more")();
Math ||
(
e.unref(p) +
function () {
return "../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js";
} +
e.unref(l) +
e.unref(c) +
e.unref(f) +
e.unref(i) +
e.unref(d)
)();
var i = function () {
return "../../components/popup-upload-tips/index.js";
},
d = function () {
return "../../components/popup-pay-again/index.js";
},
c = function () {
return "../../components/float-refresh/index.js";
},
f = function () {
return "../../components/float-back-to-top/index.js";
},
l = function () {
return "../../components/empty/index.js";
},
p = function () {
return "../../components/vehicle-number/index.js";
},
v = {
__name: "index",
setup: function (i) {
var d = e.ref([
{ title: "全部", status: 0 },
{ title: "待付款", status: 4 },
{ title: "待上传", status: 5 },
{ title: "查询中", status: 2 },
{ title: "查询成功", status: 1 },
]),
c = e.ref(0),
f = e.ref(!0),
l = e.ref(!1),
p = e.ref(!1),
v = e.ref(1),
m = e.ref(r.PageStatusEnum.LOADING),
E = e.ref([]),
_ = e.ref(!1),
g = e.ref(!1),
S = e.ref(!1),
N = e.ref(null),
P = function () {
var e = g.value || S.value;
return "height: 100%; overflow: "
.concat(e ? "hidden" : "visible", "; position: ")
.concat(e ? "fixed" : "relative");
},
h = function (t) {
return e._.find(t.productList, function (e) {
return e.status === r.ProductStatusEnum.TO_BE_UPLOADED;
});
},
I = function (e) {
var t = e.order_no,
u = e.product_id,
n = e.status;
s.openReport({ orderNo: t, productId: u, status: n });
},
T = function () {
o.showToast("已经帮您催了,请耐心等待一会儿...");
},
A = function () {
s.queryWithoutDrivingLicense({ orderNo: N.value.order_no }).then(
function () {
a.navigateTo({ url: "/pages/upload-success/index" }),
(g.value = !1);
}
);
},
O = function () {
g.value = !1;
},
x = function () {
S.value = !1;
},
y = function (e) {
D(e), (S.value = !1);
},
D = function (e) {
o.showLoading("支付中"),
n
.payOrderAgain({ payMethod: e, order_no: N.value.order_no })
.then(function (t) {
s.payForOrder({ payMethod: e, data: t })
.then(function (e) {
var t = e.orderNo;
a.navigateTo({
url: "/pages/pay-success/index",
params: { orderNo: t },
});
})
.catch(function (e) {
var t = e.orderNo;
a.navigateTo({
url: "/pages/pay-fail/index",
params: { orderNo: t },
});
});
});
},
L = function () {
return m.value === r.PageStatusEnum.NOMORE
? Promise.resolve()
: ((m.value = r.PageStatusEnum.LOADING),
n
.getOrderList({
page: v.value,
status: d.value[c.value].status,
})
.then(function (t) {
var u = t.data,
n = t.per_page;
0 === u.length && 0 === E.value.length
? (p.value = !0)
: ((p.value = !1),
u.length < n && (m.value = r.PageStatusEnum.NOMORE),
1 === v.value
? (E.value = u)
: (E.value = e._.concat(E.value, u)));
}));
},
j = function () {
o.showLoading(),
(_.value = !0),
(m.value = ""),
(v.value = 1),
L().then(function () {
(_.value = !1),
o.hideLoading(),
e.index.stopPullDownRefresh(),
e.index.pageScrollTo({ scrollTop: 0, duration: 100 });
});
};
return (
t.onMounted(function (t) {
var u = t.tabIndex;
e.index.$on("updateMyOrderList", function (e) {
j();
}),
(c.value = u || 0),
L().then(function () {
(f.value = !1),
o.hideLoading(),
e.index.pageScrollTo({ scrollTop: 0, duration: 100 });
});
}),
e.onPullDownRefresh(function () {
j();
}),
e.onReachBottom(function () {
v.value++, L();
}),
e.onPageScroll(function (t) {
var u = t.scrollTop;
l.value = u >= e.index.getSystemInfoSync().windowHeight / 3;
}),
u.onShareAppMessage(),
function (t, u) {
return e.e(
{ a: P(), b: !f.value },
f.value
? {}
: e.e(
{
c: e.f(d.value, function (t, u, n) {
return {
a: e.t(t.title),
b: e.n(c.value === u ? "active" : ""),
c: u,
d: e.o(function (t) {
return (function (t) {
var u = t.index;
c.value !== u &&
((v.value = 1),
(m.value = ""),
(E.value = []),
(c.value = u),
o.showLoading(),
L().then(function () {
o.hideLoading(),
e.index.pageScrollTo({
scrollTop: 0,
duration: 100,
});
}));
})({ index: u });
}, u),
};
}),
d: !p.value,
},
p.value
? {}
: {
e: e.f(E.value, function (t, u, n) {
return e.e(
{
a: e.t(
e.unref(s.getProduct)(t.product_id).product_name
),
b: t.status === e.unref(r.OrderStatusEnum).UNPAID,
},
(t.status, e.unref(r.OrderStatusEnum).UNPAID, {}),
{ c: t.status === e.unref(r.OrderStatusEnum).PAID },
t.status === e.unref(r.OrderStatusEnum).PAID
? {
d: e.t(
e.unref(s.getOrderStatus)(t.productList)
),
}
: {},
{
e: t.status === e.unref(r.OrderStatusEnum).REFUND,
},
(t.status, e.unref(r.OrderStatusEnum).REFUND, {}),
{
f:
t.status ===
e.unref(r.OrderStatusEnum).COMPLETE,
},
(t.status, e.unref(r.OrderStatusEnum).COMPLETE, {}),
{ g: e.t(t.order_no), h: t.car_name },
t.car_name ? { i: e.t(t.car_name) } : {},
{ j: t.car_no },
t.car_no
? {
k: "2e6df7a1-0-" + n,
l: e.p({ data: t.car_no }),
}
: {},
{ m: t.vin },
t.vin
? {
n: e.t(
(t.vin || "")
.toString()
.replace(/^(.{5}).{6}/, "$1******")
),
}
: {},
{ o: e.t(t.create_time), p: t.productList },
t.productList
? {
q: e.f(t.productList, function (u, o, a) {
return e.e(
{
a: e.t(
e.unref(s.getProduct)(u.product_id)
.product_name
),
b: e.t(
e.unref(s.getProduct)(u.product_id)
.product_desc
),
c:
t.status !==
e.unref(r.OrderStatusEnum).REFUND &&
u.status ===
e.unref(r.ProductStatusEnum)
.IN_QUERY,
},
t.status !==
e.unref(r.OrderStatusEnum).REFUND &&
u.status ===
e.unref(r.ProductStatusEnum).IN_QUERY
? {
d: "2e6df7a1-1-" + n + "-" + a,
e: e.p({
iconType: "snow",
iconSize: 20,
status: "loading",
showText: !1,
}),
}
: {},
t.status !==
e.unref(r.OrderStatusEnum).REFUND
? e.e(
{
f:
u.status ===
e.unref(r.ProductStatusEnum)
.SUCCESS,
},
u.status ===
e.unref(r.ProductStatusEnum)
.SUCCESS
? {
g: e.o(function (e) {
return I(u);
}, u.id),
}
: {},
{
h:
u.status ===
e.unref(r.ProductStatusEnum)
.FAIL &&
(u.product_id ==
e.unref(r.ProductTypeEnum)
.INSURANCE_MAINTAIN ||
u.product_id ===
e.unref(r.ProductTypeEnum)
.ACCIDENT),
},
u.status !==
e.unref(r.ProductStatusEnum)
.FAIL ||
(u.product_id !=
e.unref(r.ProductTypeEnum)
.INSURANCE_MAINTAIN &&
u.product_id !==
e.unref(r.ProductTypeEnum)
.ACCIDENT)
? {}
: {
i: e.o(function (e) {
return I(u);
}, u.id),
},
{
j:
u.status ===
e.unref(r.ProductStatusEnum)
.IN_QUERY,
},
u.status ===
e.unref(r.ProductStatusEnum)
.IN_QUERY
? { k: e.o(T, u.id) }
: {},
{
l:
u.status ===
e.unref(r.ProductStatusEnum)
.FAIL &&
u.product_id !==
e.unref(r.ProductTypeEnum)
.INSURANCE_MAINTAIN &&
u.product_id !==
e.unref(r.ProductTypeEnum)
.ACCIDENT,
},
(u.status ===
e.unref(r.ProductStatusEnum)
.FAIL &&
u.product_id !==
e.unref(r.ProductTypeEnum)
.INSURANCE_MAINTAIN &&
(u.product_id,
e.unref(r.ProductTypeEnum)
.ACCIDENT),
{})
)
: {},
{ m: u.id }
);
}),
r:
t.status !==
e.unref(r.OrderStatusEnum).REFUND,
}
: {},
{
s: t.status !== e.unref(r.OrderStatusEnum).REFUND,
},
t.status !== e.unref(r.OrderStatusEnum).REFUND
? e.e(
{
t:
t.status ===
e.unref(r.OrderStatusEnum).UNPAID,
},
t.status === e.unref(r.OrderStatusEnum).UNPAID
? {
v: e.o(function (e) {
return (
(u = t),
(N.value = u),
void D(r.PayMethodEnum.WECHAT_PAY)
);
var u;
}, t.order_no),
}
: {},
{ w: h(t) },
h(t)
? e.e(
{
x: e.o(function (e) {
return (
(u = t),
void s
.chooseDrivingLicense({
orderNo: u.order_no,
})
.then(function () {
a.navigateTo({
url: "/pages/upload-success/index",
});
})
);
var u;
}, t.order_no),
y:
t.vin ||
t.type ===
e.unref(r.ProductTypeEnum)
.VIOLATION,
},
t.vin ||
t.type ===
e.unref(r.ProductTypeEnum).VIOLATION
? {
z: e.o(function (e) {
return (
(u = t),
(g.value = !0),
void (N.value = u)
);
var u;
}, t.order_no),
}
: {}
)
: {}
)
: {},
{
A: t.order_no,
B: e.o(function (e) {
return (function (e) {
var t = e.order_no,
u = e.product_id;
a.navigateTo({
url: "/pages/order-detail/index",
params: {
orderNo: t,
productName: s.getProduct(u).product_name,
},
});
})(t);
}, t.order_no),
}
);
}),
f: E.value.length,
g: e.p({ iconType: "snow", status: m.value }),
},
{ h: p.value },
p.value ? { i: e.p({ info: "暂无订单记录" }) } : {},
{
j: e.o(j),
k: e.p({ loading: _.value }),
l: e.p({ visible: l.value }),
m: e.o(O),
n: e.o(A),
o: e.p({ visible: g.value }),
p: e.o(x),
q: e.o(y),
r: e.p({ visible: S.value }),
}
)
);
}
);
},
},
m = e._export_sfc(v, [["__scopeId", "data-v-2e6df7a1"]]);
(v.__runtimeHooks = 3), wx.createPage(m);

View File

@@ -0,0 +1,14 @@
{
"navigationBarTitleText": "我的订单",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50,
"usingComponents": {
"uni-load-more": "../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more",
"popup-upload-tips": "../../components/popup-upload-tips/index",
"popup-pay-again": "../../components/popup-pay-again/index",
"float-refresh": "../../components/float-refresh/index",
"float-back-to-top": "../../components/float-back-to-top/index",
"empty": "../../components/empty/index",
"vehicle-number": "../../components/vehicle-number/index"
}
}

View File

@@ -0,0 +1,218 @@
<page-meta class="data-v-2e6df7a1" pageStyle="{{a}}"></page-meta>
<view class="content data-v-2e6df7a1" wx:if="{{b}}">
<view class="tabs data-v-2e6df7a1">
<view
bindtap="{{item.d}}"
class="{{['tab','data-v-2e6df7a1',item.b]}}"
wx:for="{{c}}"
wx:key="c"
>{{item.a}}</view
>
</view>
<view class="data-v-2e6df7a1" style="margin-top: 110rpx" wx:if="{{d}}">
<view
bindtap="{{item.B}}"
class="order data-v-2e6df7a1"
wx:for="{{e}}"
wx:key="A"
>
<view class="title-content data-v-2e6df7a1">
<view class="product-name data-v-2e6df7a1">{{item.a}}</view>
<view class="status type1 data-v-2e6df7a1" wx:if="{{item.b}}"
>待付款</view
>
<view class="status type4 data-v-2e6df7a1" wx:if="{{item.c}}">
已付款{{item.d}}</view
>
<view class="status type3 data-v-2e6df7a1" wx:if="{{item.e}}"
>已退款</view
>
<view class="status type4 data-v-2e6df7a1" wx:if="{{item.f}}"
>已完成</view
>
</view>
<view class="desc data-v-2e6df7a1">
<text class="label data-v-2e6df7a1">订单编号:</text>
<text class="value data-v-2e6df7a1">{{item.g}}</text>
</view>
<view class="desc data-v-2e6df7a1" wx:if="{{item.h}}">
<text class="label data-v-2e6df7a1">车辆型号:</text>
<text class="value data-v-2e6df7a1">{{item.i}}</text>
</view>
<view class="desc data-v-2e6df7a1" wx:if="{{item.j}}">
<text class="label data-v-2e6df7a1">车牌号码:</text>
<vehicle-number
bind:__l="__l"
class="data-v-2e6df7a1"
uI="{{item.k}}"
uP="{{item.l}}"
wx:if="{{item.l}}"
></vehicle-number>
</view>
<view class="desc data-v-2e6df7a1" wx:if="{{item.m}}">
<text class="label data-v-2e6df7a1">VIN 号码:</text>
<text class="value vin data-v-2e6df7a1">{{item.n}}</text>
</view>
<view class="desc data-v-2e6df7a1">
<text class="label data-v-2e6df7a1">下单时间:</text>
<text class="value data-v-2e6df7a1">{{item.o}}</text>
</view>
<view class="product-list data-v-2e6df7a1" wx:if="{{item.p}}">
<view
class="product data-v-2e6df7a1"
wx:for="{{item.q}}"
wx:for-item="product"
wx:key="m"
>
<view class="product-wrap data-v-2e6df7a1">
<view class="product-content data-v-2e6df7a1">
<view class="product-name data-v-2e6df7a1">{{product.a}}</view>
<view class="product-desc data-v-2e6df7a1">{{product.b}}</view>
<view class="loading data-v-2e6df7a1" wx:if="{{product.c}}">
<uni-load-more
bind:__l="__l"
class="data-v-2e6df7a1"
uI="{{product.d}}"
uP="{{product.e}}"
wx:if="{{product.e}}"
></uni-load-more>
</view>
</view>
<view class="data-v-2e6df7a1" wx:if="{{item.r}}">
<view
class="button-content data-v-2e6df7a1"
wx:if="{{product.f}}"
>
<view
catchtap="{{product.g}}"
class="button type1 data-v-2e6df7a1"
hoverClass="default-hover-class"
hoverStayTime="100"
>
查看报告
</view>
</view>
<view
class="button-content data-v-2e6df7a1"
wx:if="{{product.h}}"
>
<view
catchtap="{{product.i}}"
class="button type1 data-v-2e6df7a1"
hoverClass="default-hover-class"
hoverStayTime="100"
>
查看报告
</view>
</view>
<view
class="button-content data-v-2e6df7a1"
wx:if="{{product.j}}"
>
<view
catchtap="{{product.k}}"
class="button type2 data-v-2e6df7a1"
hoverClass="default-hover-class"
hoverStayTime="100"
>
我要催单
</view>
<view class="button type4 data-v-2e6df7a1"
>正在查询中,请耐心等待</view
>
</view>
<view
class="button-content data-v-2e6df7a1"
wx:if="{{product.l}}"
>
<view class="button type3 data-v-2e6df7a1"
>查询失败,请联系客服</view
>
</view>
</view>
</view>
</view>
</view>
<view class="bottom-content data-v-2e6df7a1" wx:if="{{item.s}}">
<view
catchtap="{{item.v}}"
class="button type1 data-v-2e6df7a1"
hoverClass="default-hover-class"
hoverStayTime="100"
wx:if="{{item.t}}"
>
去付款
</view>
<block wx:if="{{item.w}}">
<view
catchtap="{{item.x}}"
class="button type2 data-v-2e6df7a1"
hoverClass="default-hover-class"
hoverStayTime="100"
>
上传行驶证
</view>
<view
catchtap="{{item.z}}"
class="button type3 data-v-2e6df7a1"
hoverClass="default-hover-class"
hoverStayTime="100"
wx:if="{{item.y}}"
>
无法提供行驶证
</view>
</block>
</view>
</view>
<view class="loading-content data-v-2e6df7a1">
<uni-load-more
bind:__l="__l"
class="data-v-2e6df7a1"
data-c-h="{{!f}}"
uI="2e6df7a1-2"
uP="{{g}}"
wx:if="{{g}}"
></uni-load-more>
</view>
</view>
<empty
bind:__l="__l"
class="data-v-2e6df7a1"
uI="2e6df7a1-3"
uP="{{i}}"
wx:if="{{h}}"
></empty>
<float-refresh
bind:__l="__l"
bindclick="{{j}}"
class="data-v-2e6df7a1"
uI="2e6df7a1-4"
uP="{{k}}"
wx:if="{{k}}"
></float-refresh>
<float-back-to-top
bind:__l="__l"
class="data-v-2e6df7a1"
uI="2e6df7a1-5"
uP="{{l}}"
wx:if="{{l}}"
></float-back-to-top>
<popup-upload-tips
bind:__l="__l"
bindcancel="{{m}}"
bindconfirm="{{n}}"
class="data-v-2e6df7a1"
uI="2e6df7a1-6"
uP="{{o}}"
wx:if="{{o}}"
></popup-upload-tips>
<popup-pay-again
bind:__l="__l"
bindclose="{{p}}"
bindconfirm="{{q}}"
class="data-v-2e6df7a1"
uI="2e6df7a1-7"
uP="{{r}}"
wx:if="{{r}}"
></popup-pay-again>
</view>

View File

@@ -0,0 +1,257 @@
.content.data-v-2e6df7a1 {
padding-bottom: 10rpx;
}
.content .tabs.data-v-2e6df7a1 {
align-items: center;
background-color: #fff;
display: -webkit-flex;
display: flex;
font-size: 32rpx;
height: 90rpx;
justify-content: space-evenly;
left: 0;
position: fixed;
top: 0;
width: 100%;
z-index: 55;
}
.content .tabs .tab.data-v-2e6df7a1 {
height: 90rpx;
line-height: 90rpx;
}
.content .tabs .tab.active.data-v-2e6df7a1 {
border-bottom: 4rpx solid #1f68e9;
color: #1f68e9;
}
.content .loading-content.data-v-2e6df7a1 {
margin: 30rpx;
}
.content .order.data-v-2e6df7a1 {
background: #fff;
border-radius: 10rpx;
margin: 25rpx;
padding: 25rpx 30rpx;
}
.content .order .title-content.data-v-2e6df7a1 {
align-items: center;
border-bottom: 2rpx solid #f2f2f2;
display: -webkit-flex;
display: flex;
justify-content: space-between;
margin-bottom: 30rpx;
padding-bottom: 20rpx;
}
.content .order .title-content .product-name.data-v-2e6df7a1 {
color: #333;
font-size: 32rpx;
font-weight: 700;
}
.content .order .title-content .status.data-v-2e6df7a1 {
font-size: 28rpx;
font-weight: 700;
}
.content .order .title-content .status.type1.data-v-2e6df7a1 {
color: #eb010b;
}
.content .order .title-content .status.type2.data-v-2e6df7a1 {
color: #1f68e9;
}
.content .order .title-content .status.type3.data-v-2e6df7a1 {
color: #999;
}
.content .order .title-content .status.type4.data-v-2e6df7a1 {
color: #333;
}
.content .order .desc.data-v-2e6df7a1 {
align-items: center;
display: -webkit-flex;
display: flex;
font-size: 30rpx;
margin: 15rpx 0;
}
.content .order .desc .label.data-v-2e6df7a1 {
color: #333;
flex-shrink: 0;
width: 155rpx;
}
.content .order .desc .value.data-v-2e6df7a1 {
color: #333;
}
.content .order .desc .value.vin.data-v-2e6df7a1 {
color: #1f68e9;
}
.content .order .product-list.data-v-2e6df7a1 {
margin-top: 20rpx;
padding: 5rpx 0;
}
.content .order .product-list .product.data-v-2e6df7a1 {
border-top: 2rpx solid #f2f2f2;
padding: 20rpx 0;
}
.content .order .product-list .product .product-wrap.data-v-2e6df7a1 {
background-color: rgba(234, 241, 248, 0.408);
border-radius: 10rpx;
padding: 20rpx;
}
.content
.order
.product-list
.product
.product-wrap
.product-content.data-v-2e6df7a1 {
color: #555;
position: relative;
}
.content
.order
.product-list
.product
.product-wrap
.product-content
.product-name.data-v-2e6df7a1 {
font-size: 30rpx;
font-weight: 700;
}
.content
.order
.product-list
.product
.product-wrap
.product-content
.product-desc.data-v-2e6df7a1 {
color: #5f5f5f;
font-size: 28rpx;
margin-top: 5rpx;
}
.content
.order
.product-list
.product
.product-wrap
.product-content
.loading.data-v-2e6df7a1 {
position: absolute;
right: 0;
top: 0;
}
.content
.order
.product-list
.product
.product-wrap
.product-content
.upload.data-v-2e6df7a1 {
color: #1f68e9;
font-size: 28rpx;
font-weight: 700;
position: absolute;
right: 0;
top: 0;
}
.content
.order
.product-list
.product
.product-wrap
.button-content.data-v-2e6df7a1 {
align-items: center;
display: -webkit-flex;
display: flex;
flex-direction: row-reverse;
}
.content
.order
.product-list
.product
.product-wrap
.button-content
.button.data-v-2e6df7a1 {
align-items: center;
border-radius: 30rpx;
display: -webkit-flex;
display: flex;
font-size: 28rpx;
height: 60rpx;
justify-content: center;
margin-top: 10rpx;
width: 165rpx;
}
.content
.order
.product-list
.product
.product-wrap
.button-content
.button.type1.data-v-2e6df7a1 {
border: 2rpx solid #1f68e9;
color: #1f68e9;
}
.content
.order
.product-list
.product
.product-wrap
.button-content
.button.type2.data-v-2e6df7a1 {
border: 2rpx solid #c4c8d1;
}
.content
.order
.product-list
.product
.product-wrap
.button-content
.button.type3.data-v-2e6df7a1 {
border: none;
color: brown;
width: auto;
}
.content
.order
.product-list
.product
.product-wrap
.button-content
.button.type4.data-v-2e6df7a1 {
color: #ff7038;
font-size: 26rpx;
margin-right: 10rpx;
width: 300rpx;
}
.content .order .bottom-content.data-v-2e6df7a1 {
align-items: center;
border-top: 2rpx solid #f2f2f2;
display: -webkit-flex;
display: flex;
flex-direction: row-reverse;
flex-grow: 1;
padding-top: 20rpx;
}
.content .order .bottom-content .button.data-v-2e6df7a1 {
align-items: center;
border-radius: 30rpx;
display: -webkit-flex;
display: flex;
font-size: 28rpx;
height: 60rpx;
justify-content: center;
width: 165rpx;
}
.content .order .bottom-content .button.type1.data-v-2e6df7a1 {
background: #1f68e9;
color: #fff;
}
.content .order .bottom-content .button.type2.data-v-2e6df7a1 {
border: 2rpx solid #c4c8d1;
}
.content .order .bottom-content .button.type3.data-v-2e6df7a1 {
color: #1f68e9;
margin-right: 10rpx;
width: 220rpx;
}
.content .order .tips.data-v-2e6df7a1 {
color: #ff7038;
font-size: 25rpx;
margin-top: 20rpx;
text-align: right;
}