This commit is contained in:
2025-04-05 23:47:00 +08:00
commit 8001f8eaeb
215 changed files with 14655 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), r = require("../../@babel/runtime/helpers/asyncToGenerator"), t = (getApp(),
require("../../utils/login.js")), a = require("../../utils/common.js");
Page({
data: {
showLoding: !0,
orderid: "",
verificationQrcode: {},
orderData: {},
ordercart: [],
token: "",
orderValidity: [],
purchasenotes: "",
contentHidden: !0,
orderVerification: []
},
onLoad: function(e) {
this.setData({
orderid: e.orderid || ""
}), this.getOrderDetail();
},
getOrderDetail: function() {
var i = this;
return r(e.default.mark(function r() {
var o, n, d, c;
return e.default.wrap(function(e) {
for (;;) switch (e.prev = e.next) {
case 0:
return i, o = i.data.orderid, e.prev = 2, e.next = 5, t.request(t.baseUrl + "shop/order/detail", {
orderid: o
}, !0);
case 5:
if (n = e.sent, (d = n.data).orderData.updatetime = a.changeTime(new Date(1e3 * d.orderData.updatetime)),
d.orderValidity && d.orderValidity.length > 0) for (c = 0; c < d.orderValidity.length; c++) i.data.orderValidity[c] = a.changeTime(new Date(1e3 * d.orderValidity[c]));
i.setData({
showLoding: !1,
companyList: d.companyList,
orderData: d.orderData,
token: d.token,
ordercart: d.ordercart,
verificationQrcode: d.verificationQrcode,
orderValidity: i.data.orderValidity,
purchasenotes: d.purchasenotes,
orderVerification: d.orderVerification
}), e.next = 15;
break;
case 12:
e.prev = 12, e.t0 = e.catch(2), console.log(e.t0);
case 15:
case "end":
return e.stop();
}
}, r, null, [ [ 2, 12 ] ]);
}))();
},
call: function(e) {
var r = e.currentTarget.dataset.tel;
wx.makePhoneCall({
phoneNumber: r
});
},
toMap: function(e) {
var r = e.currentTarget.dataset, t = r.latitude, a = r.longitude;
wx.openLocation({
latitude: t,
longitude: a
});
},
showcontentHidden: function() {
this.setData({
contentHidden: !1
});
},
copy: function(e) {
var r = e.currentTarget.dataset.code;
wx.setClipboardData({
data: r
});
}
});

View File

@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "聚美汽服",
"usingComponents": {
"page-loding": "../../template/pageLoding/pageLoding"
}
}

View File

@@ -0,0 +1,88 @@
<view class="charge-off">
<page-loding wx:if="{{showLoding}}"></page-loding>
<view class="coupon__box">
<navigator class="coupon__box__title" url="/pages/goodsDetails/goodsDetails?id={{ordercart[0].id}}">{{ordercart[0].shop.name}}</navigator>
<view class="coupon__box__split"></view>
<view class="coupon__box__qrcode">
<view class="qrcode-area">
<view class="{{verificationQrcode.status==1?'img':'img gray'}}" id="qrcode">
<image alt="Scan me!" mode="widthFix" src="{{verificationQrcode.image}}"></image>
</view>
<view class="txt" wx:if="{{verificationQrcode.status!=1}}">不可使用</view>
</view>
<view class="tips">请将此二维码展示给商家核销</view>
</view>
</view>
<view class="box">
<view class="tips">
<view>核销码 <view class="til">点击核销码可复制</view>
</view>
</view>
<view>
<view bindtap="copy" class="box-items" data-code="{{item.code}}" wx:for="{{orderVerification}}">
<view class="item__bd">
<view class="line"></view>
<view class="code">{{item.code}}</view>
<view class="name">{{item.name}}</view>
<view class="merchant">
<image class="shop" src="/img/shop.png"></image>{{item.merchantname}}</view>
</view>
</view>
</view>
</view>
<view class="box">
<view class="tips">
<view>订单总价:</view>
<view class="right">¥{{orderData.total_price}} </view>
</view>
<view class="box-items">
<view class="item__bd">
<view class="line">
<view class="info">姓名:{{orderData.recipient_name}}</view>
</view>
<view class="line">
<view class="info">支付时间:{{orderData.updatetime}}</view>
</view>
<view class="line">
<view class="info">订单号:{{orderData.orderid}}</view>
</view>
<view class="line">
<view class="info">有效期:{{orderValidity[0]}} 至 {{orderValidity[1]}}</view>
</view>
</view>
</view>
</view>
<view class="box">
<view class="tips">
<view>商家信息:</view>
</view>
<view>
<view class="box-items" wx:for="{{companyList}}" wx:key="index">
<view class="item__tips">{{item.name}}</view>
<view class="item__bd">
<view class="line">
<view class="info">营业时间:{{item.businesshours}}</view>
</view>
<view class="line">
<view class="info">商家电话:{{item.tel}}</view>
<view bindtap="call" class="btn" data-tel="{{item.tel}}">拨号</view>
</view>
<view class="line">
<view class="info">商家地址:{{item.address}}</view>
<view bindtap="toMap" class="btn" data-latitude="{{item.lat*1}}" data-longitude="{{item.lng*1}}">导航</view>
</view>
</view>
</view>
</view>
</view>
<view class="box" wx:if="{{purchasenotes}}">
<view class="tips">
<view>注意事项:</view>
</view>
<view class="list_body">
<view class="content">
<rich-text nodes="{{purchasenotes}}"></rich-text>
</view>
</view>
</view>
</view>

View File

@@ -0,0 +1,279 @@
.charge-off {
background: #f8f8f8;
min-height: 100vh;
padding: 3.333vw 4vw;
}
.charge-off .coupon__box {
background: #fff;
border-radius: 1.6vw;
box-shadow: 0 0 2.667vw 0 rgba(11,2,5,.05);
}
.charge-off .coupon__box__title {
color: #2a2a2a;
font-size: 4.8vw;
font-weight: 700;
line-height: 6.4vw;
padding: 6.667vw 4.667vw;
}
.charge-off .coupon__box__split {
background: #eee;
height: 1px;
margin: 0 4.667vw;
position: relative;
}
.charge-off .coupon__box__split:before {
left: -6vw;
}
.charge-off .coupon__box__split:after,.charge-off .coupon__box__split:before {
background: #f8f8f8;
border-radius: 50%;
content: "";
height: 2.667vw;
position: absolute;
top: -1.333vw;
width: 2.667vw;
}
.charge-off .coupon__box__split:after {
right: -6vw;
}
.charge-off .coupon__box__qrcode {
color: #787878;
font-size: 3.2vw;
font-weight: 500;
line-height: 4.8vw;
line-height: 3.2vw;
padding: 11.333vw 0 10.667vw;
text-align: center;
}
.charge-off .coupon__box__qrcode .tips {
margin-top: 5.333vw;
text-align: center;
}
.charge-off .components {
display: block;
}
.charge-off .box {
background: #fff;
border-radius: 1.6vw;
box-shadow: 0 0 2.667vw 0 rgba(11,2,5,.05);
margin-top: 4vw;
padding: 5.333vw 4vw 0;
}
.charge-off .box .tips {
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
align-items: center;
border-bottom: 1px solid #eee;
color: #2a2a2a;
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
font-size: 4vw;
font-weight: 700;
justify-content: space-between;
line-height: 4vw;
padding-bottom: 4vw;
}
.charge-off .box .tips .right {
color: #f60;
}
.charge-off .box .box-items {
border-bottom: 1px dashed #eee;
padding: 3.733vw 0;
}
.charge-off .box .box-items .item__tips {
font-size: 4vw;
font-weight: 700;
margin-bottom: 4.667vw;
}
.charge-off .box .box-items .item__bd {
color: #2a2a2a;
font-size: 3.467vw;
}
.charge-off .box .box-items .item__bd .line {
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
align-items: center;
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
justify-content: space-between;
line-height: 6.667vw;
}
.charge-off .box .box-items .item__bd .line .info {
-webkit-box-flex: 1;
flex: 1;
}
.charge-off .box .box-items .item__bd .name {
display: block;
font-size: 3.6vw;
margin: 8px 0 10px;
}
.charge-off .box .box-items .item__bd .merchant {
display: block;
font-size: 3vw;
}
.charge-off .box .box-items .item__bd .merchant .shop {
display: inline-block;
height: 14px;
margin-right: 4px;
position: relative;
top: -1px;
vertical-align: middle;
width: 14px;
}
.charge-off .box .box-items .item__bd .code {
color: #333;
font-size: 4.3vw;
}
.charge-off .box .box-items .item__bd .line .btn {
background: #06a2b3;
border-radius: .667vw;
color: #fff;
font-size: 3.2vw;
font-weight: 500;
line-height: 3.2vw;
margin-left: 8vw;
padding: 1.333vw 2vw;
}
.charge-off .box .box-items:last-child {
border-bottom: none;
padding-bottom: 5.333vw;
}
.charge-off .box .list_body {
color: #2a2a2a;
font-size: 3.733vw;
font-weight: 500;
line-height: 6.667vw;
margin-top: 2.667vw;
position: relative;
}
.charge-off .box .list_body .content {
padding-bottom: 4vw;
}
.charge-off .box .list_body .content-hidden {
height: 106.667vw;
overflow: hidden;
}
.charge-off .box .list_body .list_body__shade {
bottom: 0;
left: 0;
position: absolute;
width: 100%;
}
.charge-off .box .list_body .list_body__shade .up {
background: -webkit-gradient(linear,left bottom,left top,from(#fff),to(hsla(0,0%,97%,0)));
background: linear-gradient(0deg,#fff,hsla(0,0%,97%,0));
height: 12vw;
width: 100%;
}
.charge-off .box .list_body .list_body__shade .down {
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
align-items: center;
background: #fff;
color: #2a2a2a;
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
font-size: 3.733vw;
font-weight: 500;
height: 13.333vw;
justify-content: center;
line-height: 3.733vw;
width: 100%;
}
.charge-off .box .list_body .list_body__shade .down .icon {
border-bottom: .4vw solid #1b1b1b;
border-left: .4vw solid #1b1b1b;
height: 2vw;
margin-left: 1.6vw;
margin-top: -1.333vw;
transform: rotate(-45deg);
width: 2vw;
}
.charge-off .box .list_body .list_body__shade .down .icon--active {
margin-top: 1.333vw;
transform: rotate(135deg);
}
.charge-off .qrcode-area {
display: inline-block;
position: relative;
vertical-align: top;
}
.charge-off .qrcode-area .txt {
background-color: hsla(0,0%,92%,.6);
color: #989898;
font-size: 4vw;
font-weight: 500;
left: 50%;
line-height: 8vw;
padding: 0 2.667vw;
position: absolute;
top: 50%;
transform: translateX(-50%) translateY(-50%);
white-space: nowrap;
}
.charge-off .coupon__box .gray {
filter: blur(2px);
opacity: .3;
}
.coupon__box__qrcode {
position: relative;
}
.coupon__box__title {
display: block;
}
.box .tips .til {
color: #787878;
display: inline;
font-size: 3.2vw;
font-weight: 400;
margin-left: 1.333vw;
}