fix:会员订单新增对应标识

This commit is contained in:
2025-08-25 17:57:38 +08:00
parent 38eb05fefd
commit ab9a7279f5
30 changed files with 46 additions and 560 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
// export const URL = "https://my.gxfs123.com/api" //正式服务器
export const URL = "https://fansdev.gxfs123.com/api" //测试服务器
// export const URL = "http://192.168.10.69:8080" //本地调试
export const URL = "https://my.gxfs123.com/api" //正式服务器
// export const URL = "https://fansdev.gxfs123.com/api" //测试服务器
// export const URL = "http://192.168.10.76:8080" //本地调试
export const appid = "wx2165f0be356ae7a9" //小程序appid
+16 -1
View File
@@ -20,7 +20,12 @@
<text class="highlight">免押租借</text>
</view>
</view>
<view class="payment-badge deposit" v-else>
<!-- 会员订单标识 -->
<view class="payment-badge member" v-else-if="orderInfo.payWay === 'wx_member_pay'">
<text class="badge-text">会员订单</text>
</view>
<!-- 微信支付押金标识 -->
<view class="payment-badge deposit" v-else-if="orderInfo.payWay === 'wx_pay'">
<text class="badge-text">押金租借</text>
</view>
</view>
@@ -295,6 +300,16 @@ const navigateToReturn = () => {
}
}
&.member {
background: rgba(25, 118, 210, 0.08);
.badge-text {
font-size: 22rpx;
color: #1976D2;
font-weight: 500;
}
}
&.deposit {
background: #f5f5f5;
+16 -2
View File
@@ -45,8 +45,12 @@
<text class="highlight">免押租借</text>
</view>
</view>
<!-- 押金租借标识 -->
<view class="payment-badge deposit" v-else>
<!-- 会员订单标识 -->
<view class="payment-badge member" v-else-if="order.payWay == 'wx_member_pay'">
<text class="badge-text">会员订单</text>
</view>
<!-- 押金租借标识微信支付订单 -->
<view class="payment-badge deposit" v-else-if="order.payWay == 'wx_pay'">
<text class="badge-text">押金租借</text>
</view>
</view>
@@ -563,6 +567,16 @@
}
}
&.member {
background: rgba(25, 118, 210, 0.08);
.badge-text {
font-size: 22rpx;
color: #1976D2;
font-weight: 500;
}
}
&.deposit {
background: #f5f5f5;
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
"use strict";exports.URL="https://fansdev.gxfs123.com/api",exports.appid="wx2165f0be356ae7a9";
"use strict";exports.URL="https://my.gxfs123.com/api",exports.appid="wx2165f0be356ae7a9";
+1 -1
View File
@@ -1 +1 @@
"use strict";const e=require("../../common/vendor.js"),a=require("../../common/assets.js"),t=require("../../config/user.js"),r={__name:"details",setup(r){const n=e.ref(""),o=e.ref({}),i=e.computed((()=>{switch(o.value.orderStatus){case"waiting_for_payment":return"待支付";case"in_used":default:return"使用中";case"used_done":return"已完成";case"order_cancelled":return"已取消"}}));e.onLoad((async a=>{a&&a.orderId?(n.value=a.orderId,await u()):(e.index.showToast({title:"订单信息不存在",icon:"none"}),setTimeout((()=>{e.index.navigateBack()}),1500))}));const u=async()=>{try{e.index.showLoading({title:"加载中"});const a=await t.queryById(n.value);if(200!==a.code||!a.data)throw new Error("获取订单详情失败");o.value=a.data,o.value.createTime&&(o.value.createTime=s(new Date(o.value.createTime))),o.value.startTime&&(o.value.startTime=s(new Date(o.value.startTime))),o.value.endTime&&(o.value.endTime=s(new Date(o.value.endTime))),e.index.hideLoading()}catch(a){e.index.hideLoading(),e.index.showToast({title:a.message||"获取订单详情失败",icon:"none"})}},s=e=>`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")} ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`,d=e=>{if(!e)return"";const a=parseInt(e);if(a<60)return`${a}分钟`;{const e=Math.floor(a/60),t=a%60;return t>0?`${e}小时${t}分钟`:`${e}小时`}};return(t,r)=>e.e({a:e.t(i.value),b:e.t(o.value.orderNo||"-"),c:e.t(o.value.deviceNo||"-"),d:"wx_score_pay"===o.value.payWay},"wx_score_pay"===o.value.payWay?{e:a._imports_0$3}:{},{f:e.t(o.value.startTime||"-"),g:o.value.endTime},o.value.endTime?{h:e.t(o.value.endTime)}:{},{i:o.value.phone},o.value.phone?{j:e.t(o.value.phone)}:{},{k:o.value.depositAmount},o.value.depositAmount?{l:e.t(o.value.depositAmount)}:{},{m:o.value.packageTime&&o.value.packagePrice},o.value.packageTime&&o.value.packagePrice?{n:e.t(o.value.packagePrice),o:e.t(d(o.value.packageTime))}:{},{p:e.t(o.value.payAmount||0)})}},n=e._export_sfc(r,[["__scopeId","data-v-f9b4f795"]]);wx.createPage(n);
"use strict";const e=require("../../common/vendor.js"),a=require("../../common/assets.js"),t=require("../../config/user.js"),r={__name:"details",setup(r){const n=e.ref(""),u=e.ref({}),o=e.computed((()=>{switch(u.value.orderStatus){case"waiting_for_payment":return"待支付";case"in_used":default:return"使用中";case"used_done":return"已完成";case"order_cancelled":return"已取消"}}));e.onLoad((async a=>{a&&a.orderId?(n.value=a.orderId,await i()):(e.index.showToast({title:"订单信息不存在",icon:"none"}),setTimeout((()=>{e.index.navigateBack()}),1500))}));const i=async()=>{try{e.index.showLoading({title:"加载中"});const a=await t.queryById(n.value);if(200!==a.code||!a.data)throw new Error("获取订单详情失败");u.value=a.data,u.value.createTime&&(u.value.createTime=d(new Date(u.value.createTime))),u.value.startTime&&(u.value.startTime=d(new Date(u.value.startTime))),u.value.endTime&&(u.value.endTime=d(new Date(u.value.endTime))),e.index.hideLoading()}catch(a){e.index.hideLoading(),e.index.showToast({title:a.message||"获取订单详情失败",icon:"none"})}},d=e=>`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")} ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`,l=e=>{if(!e)return"";const a=parseInt(e);if(a<60)return`${a}分钟`;{const e=Math.floor(a/60),t=a%60;return t>0?`${e}小时${t}分钟`:`${e}小时`}};return(t,r)=>e.e({a:e.t(o.value),b:e.t(u.value.orderNo||"-"),c:e.t(u.value.deviceNo||"-"),d:"wx_score_pay"===u.value.payWay},"wx_score_pay"===u.value.payWay?{e:a._imports_0$3}:("wx_member_pay"===u.value.payWay||u.value.payWay,{}),{f:"wx_member_pay"===u.value.payWay,g:"wx_pay"===u.value.payWay,h:e.t(u.value.startTime||"-"),i:u.value.endTime},u.value.endTime?{j:e.t(u.value.endTime)}:{},{k:u.value.phone},u.value.phone?{l:e.t(u.value.phone)}:{},{m:u.value.depositAmount},u.value.depositAmount?{n:e.t(u.value.depositAmount)}:{},{o:u.value.packageTime&&u.value.packagePrice},u.value.packageTime&&u.value.packagePrice?{p:e.t(u.value.packagePrice),q:e.t(l(u.value.packageTime))}:{},{r:e.t(u.value.payAmount||0)})}},n=e._export_sfc(r,[["__scopeId","data-v-d8a382d6"]]);wx.createPage(n);
+1 -1
View File
@@ -1 +1 @@
<view class="return-container data-v-f9b4f795"><view class="order-card data-v-f9b4f795"><view class="order-header data-v-f9b4f795"><text class="title data-v-f9b4f795">{{a}}</text><text class="order-no data-v-f9b4f795">订单号:{{b}}</text></view><view class="device-info data-v-f9b4f795"><view class="device-left data-v-f9b4f795"><view class="device-name data-v-f9b4f795">共享风扇</view><view class="device-id data-v-f9b4f795">设备号:{{c}}</view></view><view class="device-right data-v-f9b4f795"><view wx:if="{{d}}" class="payment-badge wx-score data-v-f9b4f795"><image src="{{e}}" mode="aspectFit" class="badge-icon data-v-f9b4f795"></image><view class="badge-text data-v-f9b4f795"><text class="data-v-f9b4f795">微信支付分</text><text class="divider data-v-f9b4f795">|</text><text class="highlight data-v-f9b4f795">免押租借</text></view></view><view wx:else class="payment-badge deposit data-v-f9b4f795"><text class="badge-text data-v-f9b4f795">押金租借</text></view></view></view><view class="time-info data-v-f9b4f795"><view class="time-item data-v-f9b4f795"><text class="label data-v-f9b4f795">开始时间</text><text class="value data-v-f9b4f795">{{f}}</text></view><view wx:if="{{g}}" class="time-item data-v-f9b4f795"><text class="label data-v-f9b4f795">结束时间</text><text class="value data-v-f9b4f795">{{h}}</text></view><view wx:if="{{i}}" class="time-item data-v-f9b4f795"><text class="label data-v-f9b4f795">联系电话</text><text class="value data-v-f9b4f795">{{j}}</text></view></view></view><view class="notice-card data-v-f9b4f795"><view class="notice-title data-v-f9b4f795">费用信息</view><view class="notice-list data-v-f9b4f795"><view wx:if="{{k}}" class="notice-item data-v-f9b4f795"><view class="dot data-v-f9b4f795"></view><text class="data-v-f9b4f795">押金:¥{{l}}</text></view><view wx:if="{{m}}" class="notice-item data-v-f9b4f795"><view class="dot data-v-f9b4f795"></view><text class="data-v-f9b4f795">套餐:¥{{n}}元 / {{o}}</text></view><view class="notice-item data-v-f9b4f795"><view class="dot data-v-f9b4f795"></view><text class="data-v-f9b4f795">合计:¥{{p}}</text></view></view></view></view>
<view class="return-container data-v-d8a382d6"><view class="order-card data-v-d8a382d6"><view class="order-header data-v-d8a382d6"><text class="title data-v-d8a382d6">{{a}}</text><text class="order-no data-v-d8a382d6">订单号:{{b}}</text></view><view class="device-info data-v-d8a382d6"><view class="device-left data-v-d8a382d6"><view class="device-name data-v-d8a382d6">共享风扇</view><view class="device-id data-v-d8a382d6">设备号:{{c}}</view></view><view class="device-right data-v-d8a382d6"><view wx:if="{{d}}" class="payment-badge wx-score data-v-d8a382d6"><image src="{{e}}" mode="aspectFit" class="badge-icon data-v-d8a382d6"></image><view class="badge-text data-v-d8a382d6"><text class="data-v-d8a382d6">微信支付分</text><text class="divider data-v-d8a382d6">|</text><text class="highlight data-v-d8a382d6">免押租借</text></view></view><view wx:elif="{{f}}" class="payment-badge member data-v-d8a382d6"><text class="badge-text data-v-d8a382d6">会员订单</text></view><view wx:elif="{{g}}" class="payment-badge deposit data-v-d8a382d6"><text class="badge-text data-v-d8a382d6">押金租借</text></view></view></view><view class="time-info data-v-d8a382d6"><view class="time-item data-v-d8a382d6"><text class="label data-v-d8a382d6">开始时间</text><text class="value data-v-d8a382d6">{{h}}</text></view><view wx:if="{{i}}" class="time-item data-v-d8a382d6"><text class="label data-v-d8a382d6">结束时间</text><text class="value data-v-d8a382d6">{{j}}</text></view><view wx:if="{{k}}" class="time-item data-v-d8a382d6"><text class="label data-v-d8a382d6">联系电话</text><text class="value data-v-d8a382d6">{{l}}</text></view></view></view><view class="notice-card data-v-d8a382d6"><view class="notice-title data-v-d8a382d6">费用信息</view><view class="notice-list data-v-d8a382d6"><view wx:if="{{m}}" class="notice-item data-v-d8a382d6"><view class="dot data-v-d8a382d6"></view><text class="data-v-d8a382d6">押金:¥{{n}}</text></view><view wx:if="{{o}}" class="notice-item data-v-d8a382d6"><view class="dot data-v-d8a382d6"></view><text class="data-v-d8a382d6">套餐:¥{{p}}元 / {{q}}</text></view><view class="notice-item data-v-d8a382d6"><view class="dot data-v-d8a382d6"></view><text class="data-v-d8a382d6">合计:¥{{r}}</text></view></view></view></view>
+1 -1
View File
@@ -1 +1 @@
.return-container.data-v-f9b4f795{min-height:100vh;background:#f7f8fa;padding:30rpx 30rpx 180rpx;box-sizing:border-box}.return-container .order-card.data-v-f9b4f795{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:30rpx;box-shadow:0 4rpx 16rpx rgba(0,0,0,.04)}.return-container .order-card .order-header.data-v-f9b4f795{display:flex;justify-content:space-between;align-items:center;margin-bottom:20rpx;padding-bottom:16rpx;border-bottom:1rpx solid #f0f0f0}.return-container .order-card .order-header .title.data-v-f9b4f795{font-size:30rpx;font-weight:700;color:#333}.return-container .order-card .order-header .order-no.data-v-f9b4f795{font-size:24rpx;color:#999}.return-container .order-card .device-info.data-v-f9b4f795{margin-bottom:24rpx;display:flex;justify-content:space-between;align-items:flex-start}.return-container .order-card .device-info .device-left.data-v-f9b4f795{flex:1;margin-right:20rpx}.return-container .order-card .device-info .device-left .device-name.data-v-f9b4f795{font-size:32rpx;font-weight:500;color:#333;margin-bottom:8rpx}.return-container .order-card .device-info .device-left .device-id.data-v-f9b4f795{font-size:26rpx;color:#999;margin-bottom:0}.return-container .order-card .device-info .device-right .payment-badge.data-v-f9b4f795{display:inline-flex;align-items:center;padding:6rpx 12rpx;border-radius:8rpx;white-space:nowrap}.return-container .order-card .device-info .device-right .payment-badge.wx-score.data-v-f9b4f795{background:rgba(7,193,96,.08)}.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-icon.data-v-f9b4f795{width:32rpx;height:26rpx;margin-right:8rpx}.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-text.data-v-f9b4f795{font-size:22rpx;color:#07c160;display:flex;align-items:center}.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-text .divider.data-v-f9b4f795{margin:0 6rpx}.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-text .highlight.data-v-f9b4f795{font-weight:500}.return-container .order-card .device-info .device-right .payment-badge.deposit.data-v-f9b4f795{background:#f5f5f5}.return-container .order-card .device-info .device-right .payment-badge.deposit .badge-text.data-v-f9b4f795{font-size:22rpx;color:#666;font-weight:500}.return-container .order-card .time-info.data-v-f9b4f795{background:#f9f9f9;border-radius:16rpx;padding:20rpx}.return-container .order-card .time-info .time-item.data-v-f9b4f795{display:flex;justify-content:space-between;align-items:center;margin-bottom:16rpx}.return-container .order-card .time-info .time-item.data-v-f9b4f795:last-child{margin-bottom:0}.return-container .order-card .time-info .time-item .label.data-v-f9b4f795{font-size:26rpx;color:#666}.return-container .order-card .time-info .time-item .value.data-v-f9b4f795{font-size:26rpx;color:#333}.return-container .order-card .time-info .time-item .value.highlight.data-v-f9b4f795{color:#ff6b6b;font-weight:700}.return-container .notice-card.data-v-f9b4f795{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:30rpx;box-shadow:0 4rpx 16rpx rgba(0,0,0,.04)}.return-container .notice-card .notice-title.data-v-f9b4f795{font-size:30rpx;font-weight:700;color:#333;margin-bottom:20rpx}.return-container .notice-card .notice-list .notice-item.data-v-f9b4f795{display:flex;align-items:flex-start;margin-bottom:16rpx}.return-container .notice-card .notice-list .notice-item.data-v-f9b4f795:last-child{margin-bottom:0}.return-container .notice-card .notice-list .notice-item .dot.data-v-f9b4f795{width:12rpx;height:12rpx;background:#07c160;border-radius:50%;margin-top:10rpx;margin-right:16rpx;flex-shrink:0}.return-container .notice-card .notice-list .notice-item text.data-v-f9b4f795{font-size:26rpx;color:#666;line-height:1.5}.return-container .bottom-bar.data-v-f9b4f795{position:fixed;left:0;right:0;bottom:0;padding:20rpx 30rpx;padding-bottom:calc(20rpx + env(safe-area-inset-bottom));background:#fff;box-shadow:0 -4rpx 16rpx rgba(0,0,0,.04);z-index:10;display:flex;justify-content:space-between;gap:20rpx}.return-container .bottom-bar .action-item.data-v-f9b4f795{height:88rpx;display:flex;align-items:center;justify-content:center;font-size:30rpx;border-radius:44rpx;flex:1}.return-container .bottom-bar .action-item.primary.data-v-f9b4f795{background:#07c160;color:#fff}.return-container .bottom-bar .action-item.primary.data-v-f9b4f795:active{opacity:.8}.return-container .bottom-bar .action-item.secondary.data-v-f9b4f795{background:#f5f5f5;color:#333;border:1rpx solid #e0e0e0}.return-container .bottom-bar .action-item.secondary.data-v-f9b4f795:active{opacity:.8}
.return-container.data-v-d8a382d6{min-height:100vh;background:#f7f8fa;padding:30rpx 30rpx 180rpx;box-sizing:border-box}.return-container .order-card.data-v-d8a382d6{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:30rpx;box-shadow:0 4rpx 16rpx rgba(0,0,0,.04)}.return-container .order-card .order-header.data-v-d8a382d6{display:flex;justify-content:space-between;align-items:center;margin-bottom:20rpx;padding-bottom:16rpx;border-bottom:1rpx solid #f0f0f0}.return-container .order-card .order-header .title.data-v-d8a382d6{font-size:30rpx;font-weight:700;color:#333}.return-container .order-card .order-header .order-no.data-v-d8a382d6{font-size:24rpx;color:#999}.return-container .order-card .device-info.data-v-d8a382d6{margin-bottom:24rpx;display:flex;justify-content:space-between;align-items:flex-start}.return-container .order-card .device-info .device-left.data-v-d8a382d6{flex:1;margin-right:20rpx}.return-container .order-card .device-info .device-left .device-name.data-v-d8a382d6{font-size:32rpx;font-weight:500;color:#333;margin-bottom:8rpx}.return-container .order-card .device-info .device-left .device-id.data-v-d8a382d6{font-size:26rpx;color:#999;margin-bottom:0}.return-container .order-card .device-info .device-right .payment-badge.data-v-d8a382d6{display:inline-flex;align-items:center;padding:6rpx 12rpx;border-radius:8rpx;white-space:nowrap}.return-container .order-card .device-info .device-right .payment-badge.wx-score.data-v-d8a382d6{background:rgba(7,193,96,.08)}.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-icon.data-v-d8a382d6{width:32rpx;height:26rpx;margin-right:8rpx}.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-text.data-v-d8a382d6{font-size:22rpx;color:#07c160;display:flex;align-items:center}.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-text .divider.data-v-d8a382d6{margin:0 6rpx}.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-text .highlight.data-v-d8a382d6{font-weight:500}.return-container .order-card .device-info .device-right .payment-badge.member.data-v-d8a382d6{background:rgba(25,118,210,.08)}.return-container .order-card .device-info .device-right .payment-badge.member .badge-text.data-v-d8a382d6{font-size:22rpx;color:#1976d2;font-weight:500}.return-container .order-card .device-info .device-right .payment-badge.deposit.data-v-d8a382d6{background:#f5f5f5}.return-container .order-card .device-info .device-right .payment-badge.deposit .badge-text.data-v-d8a382d6{font-size:22rpx;color:#666;font-weight:500}.return-container .order-card .time-info.data-v-d8a382d6{background:#f9f9f9;border-radius:16rpx;padding:20rpx}.return-container .order-card .time-info .time-item.data-v-d8a382d6{display:flex;justify-content:space-between;align-items:center;margin-bottom:16rpx}.return-container .order-card .time-info .time-item.data-v-d8a382d6:last-child{margin-bottom:0}.return-container .order-card .time-info .time-item .label.data-v-d8a382d6{font-size:26rpx;color:#666}.return-container .order-card .time-info .time-item .value.data-v-d8a382d6{font-size:26rpx;color:#333}.return-container .order-card .time-info .time-item .value.highlight.data-v-d8a382d6{color:#ff6b6b;font-weight:700}.return-container .notice-card.data-v-d8a382d6{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:30rpx;box-shadow:0 4rpx 16rpx rgba(0,0,0,.04)}.return-container .notice-card .notice-title.data-v-d8a382d6{font-size:30rpx;font-weight:700;color:#333;margin-bottom:20rpx}.return-container .notice-card .notice-list .notice-item.data-v-d8a382d6{display:flex;align-items:flex-start;margin-bottom:16rpx}.return-container .notice-card .notice-list .notice-item.data-v-d8a382d6:last-child{margin-bottom:0}.return-container .notice-card .notice-list .notice-item .dot.data-v-d8a382d6{width:12rpx;height:12rpx;background:#07c160;border-radius:50%;margin-top:10rpx;margin-right:16rpx;flex-shrink:0}.return-container .notice-card .notice-list .notice-item text.data-v-d8a382d6{font-size:26rpx;color:#666;line-height:1.5}.return-container .bottom-bar.data-v-d8a382d6{position:fixed;left:0;right:0;bottom:0;padding:20rpx 30rpx;padding-bottom:calc(20rpx + env(safe-area-inset-bottom));background:#fff;box-shadow:0 -4rpx 16rpx rgba(0,0,0,.04);z-index:10;display:flex;justify-content:space-between;gap:20rpx}.return-container .bottom-bar .action-item.data-v-d8a382d6{height:88rpx;display:flex;align-items:center;justify-content:center;font-size:30rpx;border-radius:44rpx;flex:1}.return-container .bottom-bar .action-item.primary.data-v-d8a382d6{background:#07c160;color:#fff}.return-container .bottom-bar .action-item.primary.data-v-d8a382d6:active{opacity:.8}.return-container .bottom-bar .action-item.secondary.data-v-d8a382d6{background:#f5f5f5;color:#333;border:1rpx solid #e0e0e0}.return-container .bottom-bar .action-item.secondary.data-v-d8a382d6:active{opacity:.8}
+1 -1
View File
@@ -1 +1 @@
"use strict";const e=require("../../common/vendor.js"),t=require("../../common/assets.js"),a=require("../../config/user.js"),s=require("../../config/url.js"),r={__name:"index",setup(r){const o=e.ref(0),n=e.ref([]),d=e.reactive({0:{text:"待支付",class:"status-waiting"},1:{text:"使用中",class:"status-using"},2:{text:"已完成",class:"status-finished"},3:{text:"已取消",class:"status-cancelled"},waiting_for_payment:{text:"待支付",class:"status-waiting"},in_used:{text:"使用中",class:"status-using"},used_done:{text:"已完成",class:"status-finished"},order_cancelled:{text:"已取消",class:"status-cancelled"}}),i=e.reactive([{text:"全部",status:[]},{text:"待付款",status:["waiting_for_payment"]},{text:"使用中",status:["in_used"]},{text:"已完成",status:["used_done"]},{text:"已取消",status:["order_cancelled"]}]);e.onLoad((async e=>{if(e&&e.orderId)try{const t=await a.queryById(e.orderId);if(200===t.code&&t.data){const e=t.data,a=e.startTime||e.createTime||"",s={orderNo:e.orderId,status:e.orderStatus,deviceId:e.deviceNo,payWay:e.payWay,startTime:a,endTime:e.endTime||"",amount:e.payAmount||e.actualDeviceAmount||"0.00"};n.value=[s,...n.value];const r=i.findIndex((t=>t.status.includes(e.orderStatus)));-1!==r&&c(r)}}catch(t){console.error("获取订单详情失败:",t)}await u()}));const c=async e=>{o.value=e;const t=i[e].status[0];await u(t)},u=async t=>{try{null!=t&&(t={orderStatus:t});const e=await a.getOrderList(t);200===e.code&&e.data&&e.data.records&&(n.value=e.data.records.map((e=>{const t=e.startTime||e.createTime||"";return{orderNo:e.orderNo,orderId:e.orderId,orderStatus:e.orderStatus,deviceId:e.deviceNo,payWay:e.payWay,startTime:t,endTime:e.endTime||"",amount:e.payAmount||e.actualDeviceAmount||"0.00"}})))}catch(s){console.error("获取订单列表失败:",s),e.index.showToast({title:"获取订单列表失败",icon:"none"})}};return(r,l)=>e.e({a:e.f(i,((t,a,s)=>({a:e.t(t.text),b:a,c:o.value===a?1:"",d:e.o((e=>c(a)),a)}))),b:0===n.value.length},(n.value.length,{}),{c:e.f(n.value,((r,n,c)=>{var l,m;return e.e({a:e.t(r.orderNo),b:e.t(null==(l=d[r.orderStatus])?void 0:l.text),c:e.n(null==(m=d[r.orderStatus])?void 0:m.class),d:e.t(r.deviceId),e:"wx_score_pay"==r.payWay},"wx_score_pay"==r.payWay?{f:t._imports_0$3}:{},{g:e.t(r.startTime),h:e.t(r.endTime||"-"),i:e.t(r.amount),j:"waiting_for_payment"===r.status||"waiting_for_payment"===r.orderStatus},"waiting_for_payment"===r.status||"waiting_for_payment"===r.orderStatus?{k:e.o((t=>(async t=>{try{e.index.showLoading({title:"处理中"});const r=await e.index.request({url:`${s.URL||"http://127.0.0.1:8080"}/app/wx-payment/create/${t.orderNo}`,method:"GET",header:{Authorization:"Bearer "+e.index.getStorageSync("token"),Clientid:e.index.getStorageSync("client_id")}});if(200!==r.statusCode||200!==r.data.code)throw new Error(r.data.msg||"创建支付订单失败");{const s=r.data.data;await e.index.requestPayment({...s,success:async()=>{e.index.showToast({title:"支付成功",icon:"success"});try{await a.updateUserBalance(t.orderId||t.orderNo)}catch(s){console.warn("更新用户余额失败:",s)}await u(i[o.value].status)},fail:e=>{throw console.error("支付失败:",e),new Error("支付失败,请重试")}})}e.index.hideLoading()}catch(r){e.index.hideLoading(),e.index.showToast({title:r.message||"支付失败",icon:"none"})}})(r)),n)}:{},{l:"waiting_for_payment"===r.status||"waiting_for_payment"===r.orderStatus},"waiting_for_payment"===r.status||"waiting_for_payment"===r.orderStatus?{m:e.o((t=>(async t=>{try{e.index.showModal({title:"确认取消",content:"确定要取消此订单吗?",success:async s=>{if(s.confirm){e.index.showLoading({title:"处理中"});const s=await a.cancelOrder({orderId:t.orderNo});if(!s)throw new Error(s.msg||"取消订单失败");e.index.hideLoading(),e.index.showToast({title:"订单已取消",icon:"success"}),await u()}}})}catch(s){e.index.hideLoading(),e.index.showToast({title:s.message||"取消订单失败",icon:"none"})}})(r)),n)}:{},{n:"in_used"==r.status||"in_used"==r.orderStatus},"in_used"==r.status||"in_used"==r.orderStatus?{o:e.o((t=>{return a=r.deviceId,s=r.orderId,console.log(s),void e.index.navigateTo({url:`/pages/return/index?deviceId=${a}&orderId=${s}`});var a,s}),n)}:{},{p:e.o((t=>(t=>{e.index.navigateTo({url:`/pages/order/details?orderId=${t.orderId||t.orderNo}`})})(r)),n),q:n})}))})}},o=e._export_sfc(r,[["__scopeId","data-v-57aa6fd9"]]);wx.createPage(o);
"use strict";const e=require("../../common/vendor.js"),t=require("../../common/assets.js"),a=require("../../config/user.js"),s=require("../../config/url.js"),r={__name:"index",setup(r){const o=e.ref(0),n=e.ref([]),d=e.reactive({0:{text:"待支付",class:"status-waiting"},1:{text:"使用中",class:"status-using"},2:{text:"已完成",class:"status-finished"},3:{text:"已取消",class:"status-cancelled"},waiting_for_payment:{text:"待支付",class:"status-waiting"},in_used:{text:"使用中",class:"status-using"},used_done:{text:"已完成",class:"status-finished"},order_cancelled:{text:"已取消",class:"status-cancelled"}}),i=e.reactive([{text:"全部",status:[]},{text:"待付款",status:["waiting_for_payment"]},{text:"使用中",status:["in_used"]},{text:"已完成",status:["used_done"]},{text:"已取消",status:["order_cancelled"]}]);e.onLoad((async e=>{if(e&&e.orderId)try{const t=await a.queryById(e.orderId);if(200===t.code&&t.data){const e=t.data,a=e.startTime||e.createTime||"",s={orderNo:e.orderId,status:e.orderStatus,deviceId:e.deviceNo,payWay:e.payWay,startTime:a,endTime:e.endTime||"",amount:e.payAmount||e.actualDeviceAmount||"0.00"};n.value=[s,...n.value];const r=i.findIndex((t=>t.status.includes(e.orderStatus)));-1!==r&&c(r)}}catch(t){console.error("获取订单详情失败:",t)}await u()}));const c=async e=>{o.value=e;const t=i[e].status[0];await u(t)},u=async t=>{try{null!=t&&(t={orderStatus:t});const e=await a.getOrderList(t);200===e.code&&e.data&&e.data.records&&(n.value=e.data.records.map((e=>{const t=e.startTime||e.createTime||"";return{orderNo:e.orderNo,orderId:e.orderId,orderStatus:e.orderStatus,deviceId:e.deviceNo,payWay:e.payWay,startTime:t,endTime:e.endTime||"",amount:e.payAmount||e.actualDeviceAmount||"0.00"}})))}catch(s){console.error("获取订单列表失败:",s),e.index.showToast({title:"获取订单列表失败",icon:"none"})}};return(r,l)=>e.e({a:e.f(i,((t,a,s)=>({a:e.t(t.text),b:a,c:o.value===a?1:"",d:e.o((e=>c(a)),a)}))),b:0===n.value.length},(n.value.length,{}),{c:e.f(n.value,((r,n,c)=>{var l,y;return e.e({a:e.t(r.orderNo),b:e.t(null==(l=d[r.orderStatus])?void 0:l.text),c:e.n(null==(y=d[r.orderStatus])?void 0:y.class),d:e.t(r.deviceId),e:"wx_score_pay"==r.payWay},"wx_score_pay"==r.payWay?{f:t._imports_0$3}:("wx_member_pay"==r.payWay||r.payWay,{}),{g:"wx_member_pay"==r.payWay,h:"wx_pay"==r.payWay,i:e.t(r.startTime),j:e.t(r.endTime||"-"),k:e.t(r.amount),l:"waiting_for_payment"===r.status||"waiting_for_payment"===r.orderStatus},"waiting_for_payment"===r.status||"waiting_for_payment"===r.orderStatus?{m:e.o((t=>(async t=>{try{e.index.showLoading({title:"处理中"});const r=await e.index.request({url:`${s.URL||"http://127.0.0.1:8080"}/app/wx-payment/create/${t.orderNo}`,method:"GET",header:{Authorization:"Bearer "+e.index.getStorageSync("token"),Clientid:e.index.getStorageSync("client_id")}});if(200!==r.statusCode||200!==r.data.code)throw new Error(r.data.msg||"创建支付订单失败");{const s=r.data.data;await e.index.requestPayment({...s,success:async()=>{e.index.showToast({title:"支付成功",icon:"success"});try{await a.updateUserBalance(t.orderId||t.orderNo)}catch(s){console.warn("更新用户余额失败:",s)}await u(i[o.value].status)},fail:e=>{throw console.error("支付失败:",e),new Error("支付失败,请重试")}})}e.index.hideLoading()}catch(r){e.index.hideLoading(),e.index.showToast({title:r.message||"支付失败",icon:"none"})}})(r)),n)}:{},{n:"waiting_for_payment"===r.status||"waiting_for_payment"===r.orderStatus},"waiting_for_payment"===r.status||"waiting_for_payment"===r.orderStatus?{o:e.o((t=>(async t=>{try{e.index.showModal({title:"确认取消",content:"确定要取消此订单吗?",success:async s=>{if(s.confirm){e.index.showLoading({title:"处理中"});const s=await a.cancelOrder({orderId:t.orderNo});if(!s)throw new Error(s.msg||"取消订单失败");e.index.hideLoading(),e.index.showToast({title:"订单已取消",icon:"success"}),await u()}}})}catch(s){e.index.hideLoading(),e.index.showToast({title:s.message||"取消订单失败",icon:"none"})}})(r)),n)}:{},{p:"in_used"==r.status||"in_used"==r.orderStatus},"in_used"==r.status||"in_used"==r.orderStatus?{q:e.o((t=>{return a=r.deviceId,s=r.orderId,console.log(s),void e.index.navigateTo({url:`/pages/return/index?deviceId=${a}&orderId=${s}`});var a,s}),n)}:{},{r:e.o((t=>(t=>{e.index.navigateTo({url:`/pages/order/details?orderId=${t.orderId||t.orderNo}`})})(r)),n),s:n})}))})}},o=e._export_sfc(r,[["__scopeId","data-v-ccb8ba5b"]]);wx.createPage(o);
+1 -1
View File
@@ -1 +1 @@
<view class="order-container data-v-57aa6fd9"><view class="status-tabs data-v-57aa6fd9"><view wx:for="{{a}}" wx:for-item="tab" wx:key="b" class="{{['tab-item', 'data-v-57aa6fd9', tab.c && 'active']}}" bindtap="{{tab.d}}">{{tab.a}}</view></view><view class="order-list data-v-57aa6fd9"><view wx:if="{{b}}" class="empty-state data-v-57aa6fd9"><view class="empty-icon data-v-57aa6fd9"></view><text class="empty-text data-v-57aa6fd9">暂无订单记录</text></view><view wx:for="{{c}}" wx:for-item="order" wx:key="q" class="order-item data-v-57aa6fd9"><view class="order-header data-v-57aa6fd9"><view class="order-id data-v-57aa6fd9"><text class="data-v-57aa6fd9">订单号:{{order.a}}</text></view><view class="{{['order-status', 'data-v-57aa6fd9', order.c]}}">{{order.b}}</view></view><view class="order-body data-v-57aa6fd9"><view class="device-info data-v-57aa6fd9"><view class="device-left data-v-57aa6fd9"><view class="device-name data-v-57aa6fd9">共享风扇</view><view class="device-id data-v-57aa6fd9">设备号:{{order.d}}</view></view><view class="device-right data-v-57aa6fd9"><view wx:if="{{order.e}}" class="payment-badge wx-score data-v-57aa6fd9"><image src="{{order.f}}" mode="aspectFit" class="badge-icon data-v-57aa6fd9"></image><view class="badge-text data-v-57aa6fd9"><text class="data-v-57aa6fd9">微信支付分</text><text class="divider data-v-57aa6fd9">|</text><text class="highlight data-v-57aa6fd9">免押租借</text></view></view><view wx:else class="payment-badge deposit data-v-57aa6fd9"><text class="badge-text data-v-57aa6fd9">押金租借</text></view></view></view><view class="order-times data-v-57aa6fd9"><view class="time-row data-v-57aa6fd9"><text class="time-label data-v-57aa6fd9">开始时间:</text><text class="time-value data-v-57aa6fd9">{{order.g}}</text></view><view class="time-row data-v-57aa6fd9"><text class="time-label data-v-57aa6fd9">结束时间:</text><text class="time-value data-v-57aa6fd9">{{order.h}}</text></view></view></view><view class="order-footer data-v-57aa6fd9"><view class="price data-v-57aa6fd9">¥{{order.i}}</view><view class="actions data-v-57aa6fd9"><view wx:if="{{order.j}}" class="action-item primary data-v-57aa6fd9" bindtap="{{order.k}}"> 立即支付 </view><view wx:if="{{order.l}}" class="action-item secondary data-v-57aa6fd9" bindtap="{{order.m}}"> 取消订单 </view><view wx:if="{{order.n}}" class="action-item primary data-v-57aa6fd9" bindtap="{{order.o}}"> 归还设备 </view><view class="action-item secondary data-v-57aa6fd9" bindtap="{{order.p}}"> 查看详情 </view></view></view></view></view></view>
<view class="order-container data-v-ccb8ba5b"><view class="status-tabs data-v-ccb8ba5b"><view wx:for="{{a}}" wx:for-item="tab" wx:key="b" class="{{['tab-item', 'data-v-ccb8ba5b', tab.c && 'active']}}" bindtap="{{tab.d}}">{{tab.a}}</view></view><view class="order-list data-v-ccb8ba5b"><view wx:if="{{b}}" class="empty-state data-v-ccb8ba5b"><view class="empty-icon data-v-ccb8ba5b"></view><text class="empty-text data-v-ccb8ba5b">暂无订单记录</text></view><view wx:for="{{c}}" wx:for-item="order" wx:key="s" class="order-item data-v-ccb8ba5b"><view class="order-header data-v-ccb8ba5b"><view class="order-id data-v-ccb8ba5b"><text class="data-v-ccb8ba5b">订单号:{{order.a}}</text></view><view class="{{['order-status', 'data-v-ccb8ba5b', order.c]}}">{{order.b}}</view></view><view class="order-body data-v-ccb8ba5b"><view class="device-info data-v-ccb8ba5b"><view class="device-left data-v-ccb8ba5b"><view class="device-name data-v-ccb8ba5b">共享风扇</view><view class="device-id data-v-ccb8ba5b">设备号:{{order.d}}</view></view><view class="device-right data-v-ccb8ba5b"><view wx:if="{{order.e}}" class="payment-badge wx-score data-v-ccb8ba5b"><image src="{{order.f}}" mode="aspectFit" class="badge-icon data-v-ccb8ba5b"></image><view class="badge-text data-v-ccb8ba5b"><text class="data-v-ccb8ba5b">微信支付分</text><text class="divider data-v-ccb8ba5b">|</text><text class="highlight data-v-ccb8ba5b">免押租借</text></view></view><view wx:elif="{{order.g}}" class="payment-badge member data-v-ccb8ba5b"><text class="badge-text data-v-ccb8ba5b">会员订单</text></view><view wx:elif="{{order.h}}" class="payment-badge deposit data-v-ccb8ba5b"><text class="badge-text data-v-ccb8ba5b">押金租借</text></view></view></view><view class="order-times data-v-ccb8ba5b"><view class="time-row data-v-ccb8ba5b"><text class="time-label data-v-ccb8ba5b">开始时间:</text><text class="time-value data-v-ccb8ba5b">{{order.i}}</text></view><view class="time-row data-v-ccb8ba5b"><text class="time-label data-v-ccb8ba5b">结束时间:</text><text class="time-value data-v-ccb8ba5b">{{order.j}}</text></view></view></view><view class="order-footer data-v-ccb8ba5b"><view class="price data-v-ccb8ba5b">¥{{order.k}}</view><view class="actions data-v-ccb8ba5b"><view wx:if="{{order.l}}" class="action-item primary data-v-ccb8ba5b" bindtap="{{order.m}}"> 立即支付 </view><view wx:if="{{order.n}}" class="action-item secondary data-v-ccb8ba5b" bindtap="{{order.o}}"> 取消订单 </view><view wx:if="{{order.p}}" class="action-item primary data-v-ccb8ba5b" bindtap="{{order.q}}"> 归还设备 </view><view class="action-item secondary data-v-ccb8ba5b" bindtap="{{order.r}}"> 查看详情 </view></view></view></view></view></view>
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"url.js","sources":["config/url.js"],"sourcesContent":["// export const URL = \"https://my.gxfs123.com/api\" //正式服务器\r\nexport const URL = \"https://fansdev.gxfs123.com/api\" //测试服务器\r\n// export const URL = \"http://192.168.10.69:8080\" \t\t//本地调试\r\n\r\nexport const appid = \"wx2165f0be356ae7a9\" //小程序appid"],"names":[],"mappings":";AACY,MAAC,MAAM;AAGP,MAAC,QAAQ;;;"}
{"version":3,"file":"url.js","sources":["config/url.js"],"sourcesContent":["// export const URL = \"https://my.gxfs123.com/api\" //正式服务器\r\n// export const URL = \"https://fansdev.gxfs123.com/api\" //测试服务器\r\nexport const URL = \"http://192.168.10.76:8080\" \t\t//本地调试\r\n\r\nexport const appid = \"wx2165f0be356ae7a9\" //小程序appid"],"names":[],"mappings":";AAEY,MAAC,MAAM;AAEP,MAAC,QAAQ;;;"}
+1 -1
View File
@@ -7043,7 +7043,7 @@ function isConsoleWritable() {
function initRuntimeSocketService() {
const hosts = "192.168.10.62,127.0.0.1";
const port = "8090";
const id = "mp-weixin_MczgwA";
const id = "mp-weixin_A62-ap";
const lazy = typeof swan !== "undefined";
let restoreError = lazy ? () => {
} : initOnError();
+1 -1
View File
@@ -1,5 +1,5 @@
"use strict";
const URL = "https://fansdev.gxfs123.com/api";
const URL = "http://192.168.10.76:8080";
const appid = "wx2165f0be356ae7a9";
exports.URL = URL;
exports.appid = appid;
@@ -1,90 +0,0 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
const _sfc_main = {
name: "uv-cell",
emits: ["click"],
mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$6],
computed: {
titleTextStyle() {
return this.$uv.addStyle(this.titleStyle);
}
},
methods: {
// 点击cell
clickHandler(e) {
if (this.disabled)
return;
this.$emit("click", {
name: this.name
});
this.openPage();
this.stop && this.preventEvent(e);
}
}
};
if (!Array) {
const _easycom_uv_icon2 = common_vendor.resolveComponent("uv-icon");
const _easycom_uv_line2 = common_vendor.resolveComponent("uv-line");
(_easycom_uv_icon2 + _easycom_uv_line2)();
}
const _easycom_uv_icon = () => "../uv-icon/uv-icon.js";
const _easycom_uv_line = () => "../uv-line/uv-line.js";
if (!Math) {
(_easycom_uv_icon + _easycom_uv_line)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: _ctx.icon
}, _ctx.icon ? {
b: common_vendor.p({
name: _ctx.icon,
["custom-style"]: _ctx.iconStyle,
size: _ctx.size === "large" ? 22 : 18
})
} : {}, {
c: _ctx.title
}, _ctx.title ? {
d: common_vendor.t(_ctx.title),
e: common_vendor.s($options.titleTextStyle),
f: common_vendor.n(_ctx.disabled && "uv-cell--disabled"),
g: common_vendor.n(_ctx.size === "large" && "uv-cell__title-text--large")
} : {}, {
h: _ctx.label
}, _ctx.label ? {
i: common_vendor.t(_ctx.label),
j: common_vendor.n(_ctx.disabled && "uv-cell--disabled"),
k: common_vendor.n(_ctx.size === "large" && "uv-cell__label--large")
} : {}, {
l: !_ctx.$uv.test.empty(_ctx.value)
}, !_ctx.$uv.test.empty(_ctx.value) ? {
m: common_vendor.t(_ctx.value),
n: common_vendor.n(_ctx.disabled && "uv-cell--disabled"),
o: common_vendor.n(_ctx.size === "large" && "uv-cell__value--large")
} : {}, {
p: _ctx.$slots["right-icon"] || _ctx.isLink
}, _ctx.$slots["right-icon"] || _ctx.isLink ? common_vendor.e({
q: _ctx.$slots["right-icon"]
}, _ctx.$slots["right-icon"] ? {} : {
r: common_vendor.p({
name: _ctx.rightIcon,
["custom-style"]: _ctx.rightIconStyle,
color: _ctx.disabled ? "#c8c9cc" : "info",
size: _ctx.size === "large" ? 18 : 16
})
}, {
s: common_vendor.n(`uv-cell__right-icon-wrap--${_ctx.arrowDirection}`)
}) : {}, {
t: common_vendor.n(_ctx.center && "uv-cell--center"),
v: common_vendor.n(_ctx.size === "large" && "uv-cell__body--large"),
w: common_vendor.s(_ctx.cellStyle),
x: _ctx.border
}, _ctx.border ? {} : {}, {
y: common_vendor.n(_ctx.customClass),
z: common_vendor.s(_ctx.$uv.addStyle(_ctx.customStyle)),
A: !_ctx.disabled && (_ctx.clickable || _ctx.isLink) ? "uv-cell--clickable" : "",
B: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args))
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-fd61d93a"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/node-modules/@climblee/uv-ui/components/uv-cell/uv-cell.js.map
@@ -1,7 +0,0 @@
{
"component": true,
"usingComponents": {
"uv-icon": "../uv-icon/uv-icon",
"uv-line": "../uv-line/uv-line"
}
}
@@ -1 +0,0 @@
<view class="{{['uv-cell', 'data-v-fd61d93a', y]}}" style="{{z}}" hover-class="{{A}}" hover-stay-time="{{250}}" bindtap="{{B}}"><view class="{{['uv-cell__body', 'data-v-fd61d93a', t, v]}}" style="{{w}}"><view class="uv-cell__body__content data-v-fd61d93a"><view class="uv-cell__left-icon-wrap data-v-fd61d93a"><block wx:if="{{$slots.icon}}"><slot name="icon"></slot></block><block wx:else><uv-icon wx:if="{{a}}" class="data-v-fd61d93a" u-i="fd61d93a-0" bind:__l="__l" u-p="{{b}}"></uv-icon></block></view><view class="uv-cell__title data-v-fd61d93a"><block wx:if="{{$slots.title}}"><slot name="title"></slot></block><block wx:else><text wx:if="{{c}}" style="{{e}}" class="{{['uv-cell__title-text', 'data-v-fd61d93a', f, g]}}">{{d}}</text></block><block wx:if="{{$slots.label}}"><slot name="label"></slot></block><block wx:else><text wx:if="{{h}}" class="{{['uv-cell__label', 'data-v-fd61d93a', j, k]}}">{{i}}</text></block></view></view><block wx:if="{{$slots.value}}"><slot name="value"></slot></block><block wx:else><text wx:if="{{l}}" class="{{['uv-cell__value', 'data-v-fd61d93a', n, o]}}">{{m}}</text></block><view wx:if="{{p}}" class="{{['uv-cell__right-icon-wrap', 'data-v-fd61d93a', s]}}"><slot wx:if="{{q}}" name="right-icon"></slot><uv-icon wx:else class="data-v-fd61d93a" u-i="fd61d93a-1" bind:__l="__l" u-p="{{r||''}}"></uv-icon></view></view><uv-line wx:if="{{x}}" class="data-v-fd61d93a" u-i="fd61d93a-2" bind:__l="__l"></uv-line></view>
@@ -1,110 +0,0 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
view.data-v-fd61d93a, scroll-view.data-v-fd61d93a, swiper-item.data-v-fd61d93a {
display: flex;
flex-direction: column;
flex-shrink: 0;
flex-grow: 0;
flex-basis: auto;
align-items: stretch;
align-content: flex-start;
}
.uv-cell__body.data-v-fd61d93a {
display: flex;
flex-direction: row;
box-sizing: border-box;
padding: 10px 15px;
font-size: 15px;
color: #303133;
}
.uv-cell__body__content.data-v-fd61d93a {
display: flex;
flex-direction: row;
align-items: center;
flex: 1;
}
.uv-cell__body--large.data-v-fd61d93a {
padding-top: 13px;
padding-bottom: 13px;
}
.uv-cell__left-icon-wrap.data-v-fd61d93a, .uv-cell__right-icon-wrap.data-v-fd61d93a {
display: flex;
flex-direction: row;
align-items: center;
font-size: 16px;
}
.uv-cell__left-icon-wrap.data-v-fd61d93a {
margin-right: 4px;
}
.uv-cell__right-icon-wrap.data-v-fd61d93a {
margin-left: 4px;
transition: transform 0.3s;
}
.uv-cell__right-icon-wrap--up.data-v-fd61d93a {
transform: rotate(-90deg);
}
.uv-cell__right-icon-wrap--down.data-v-fd61d93a {
transform: rotate(90deg);
}
.uv-cell__title.data-v-fd61d93a {
flex: 1;
}
.uv-cell__title-text.data-v-fd61d93a {
font-size: 15px;
line-height: 22px;
color: #303133;
}
.uv-cell__title-text--large.data-v-fd61d93a {
font-size: 16px;
}
.uv-cell__label.data-v-fd61d93a {
margin-top: 5px;
font-size: 12px;
color: #909193;
line-height: 18px;
}
.uv-cell__label--large.data-v-fd61d93a {
font-size: 14px;
}
.uv-cell__value.data-v-fd61d93a {
text-align: right;
font-size: 14px;
line-height: 24px;
color: #606266;
}
.uv-cell__value--large.data-v-fd61d93a {
font-size: 15px;
}
.uv-cell--clickable.data-v-fd61d93a {
background-color: #f3f4f6;
}
.uv-cell--disabled.data-v-fd61d93a {
color: #c8c9cc;
cursor: not-allowed;
}
.uv-cell--center.data-v-fd61d93a {
align-items: center;
}
@@ -1,132 +0,0 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
const _sfc_main = {
name: "uv-collapse-item",
mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$1],
data() {
return {
elId: "",
// uni.createAnimation的导出数据
animationData: {},
// 是否展开状态
expanded: false,
// 根据expanded确定是否显示border,为了控制展开时,cell的下划线更好的显示效果,进行一定时间的延时
showBorder: false,
// 是否动画中,如果是则不允许继续触发点击
animating: false,
// 父组件uv-collapse的参数
parentData: {
accordion: false,
border: false
}
};
},
watch: {
expanded(n) {
clearTimeout(this.timer);
this.timer = null;
this.timer = setTimeout(() => {
this.showBorder = n;
}, n ? 10 : 290);
}
},
created() {
this.elId = this.$uv.guid();
},
mounted() {
this.init();
},
methods: {
// 异步获取内容,或者动态修改了内容时,需要重新初始化
init() {
this.updateParentData();
if (!this.parent) {
return this.$uv.error("uv-collapse-item必须要搭配uv-collapse组件使用");
}
const {
value,
accordion,
children = []
} = this.parent;
if (accordion) {
if (this.$uv.test.array(value)) {
return this.$uv.error("手风琴模式下,uv-collapse组件的value参数不能为数组");
}
this.expanded = this.name == value;
} else {
if (!this.$uv.test.array(value) && value !== null) {
return this.$uv.error("非手风琴模式下,uv-collapse组件的value参数必须为数组");
}
this.expanded = (value || []).some((item) => item == this.name);
}
this.$nextTick(function() {
this.setContentAnimate();
});
},
updateParentData() {
this.getParentData("uv-collapse");
},
async setContentAnimate() {
const rect = await this.queryRect();
const height = this.expanded ? rect.height : 0;
this.animating = true;
const animation = common_vendor.index.createAnimation({
timingFunction: "ease-in-out"
});
animation.height(height).step({
duration: this.duration
}).step();
this.animationData = animation.export();
this.$uv.sleep(this.duration).then(() => {
this.animating = false;
});
},
// 点击collapsehead头部
clickHandler() {
if (this.disabled && this.animating)
return;
this.parent && this.parent.onChange(this);
},
// 查询内容高度
queryRect() {
return new Promise((resolve) => {
this.$uvGetRect(`#${this.elId}`).then((size) => {
resolve(size);
});
});
}
}
};
if (!Array) {
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
const _easycom_uv_line2 = common_vendor.resolveComponent("uv-line");
(_easycom_uv_cell2 + _easycom_uv_line2)();
}
const _easycom_uv_cell = () => "../uv-cell/uv-cell.js";
const _easycom_uv_line = () => "../uv-line/uv-line.js";
if (!Math) {
(_easycom_uv_cell + _easycom_uv_line)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.o($options.clickHandler),
b: common_vendor.p({
title: _ctx.title,
value: _ctx.value,
label: _ctx.label,
icon: _ctx.icon,
isLink: _ctx.isLink,
clickable: _ctx.clickable,
border: $data.parentData.border && $data.showBorder,
arrowDirection: $data.expanded ? "up" : "down",
disabled: _ctx.disabled
}),
c: $data.elId,
d: $data.elId,
e: $data.animationData,
f: $data.parentData.border
}, $data.parentData.border ? {} : {});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-b32ffb1f"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/node-modules/@climblee/uv-ui/components/uv-collapse-item/uv-collapse-item.js.map
@@ -1,7 +0,0 @@
{
"component": true,
"usingComponents": {
"uv-cell": "../uv-cell/uv-cell",
"uv-line": "../uv-line/uv-line"
}
}
@@ -1 +0,0 @@
<view class="uv-collapse-item data-v-b32ffb1f"><uv-cell wx:if="{{b}}" class="data-v-b32ffb1f" bindclick="{{a}}" u-i="b32ffb1f-0" bind:__l="__l" u-p="{{b}}"></uv-cell><view class="uv-collapse-item__content data-v-b32ffb1f" animation="{{e}}" ref="animation"><view class="uv-collapse-item__content__text content-class data-v-b32ffb1f" id="{{c}}" ref="{{d}}"><slot/></view></view><uv-line wx:if="{{f}}" class="data-v-b32ffb1f" u-i="b32ffb1f-1" bind:__l="__l"></uv-line></view>
@@ -1,44 +0,0 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
view.data-v-b32ffb1f, scroll-view.data-v-b32ffb1f, swiper-item.data-v-b32ffb1f {
display: flex;
flex-direction: column;
flex-shrink: 0;
flex-grow: 0;
flex-basis: auto;
align-items: stretch;
align-content: flex-start;
}
.uv-collapse-item__content.data-v-b32ffb1f {
overflow: hidden;
height: 0;
}
.uv-collapse-item__content__text.data-v-b32ffb1f {
padding: 12px 15px;
color: #606266;
font-size: 14px;
line-height: 18px;
}
@@ -1,76 +0,0 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
const _sfc_main = {
name: "uv-collapse",
mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$2],
watch: {
needInit() {
this.init();
},
// 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
parentData() {
if (this.children.length) {
this.children.map((child) => {
typeof child.updateParentData === "function" && child.updateParentData();
});
}
}
},
created() {
this.children = [];
},
computed: {
needInit() {
return [this.accordion, this.value];
}
},
methods: {
// 重新初始化一次内部的所有子元素
init() {
this.children.map((child) => {
child.init();
});
},
/**
* collapse-item被点击时触发,由collapse统一处理各子组件的状态
* @param {Object} target 被操作的面板的实例
*/
onChange(target) {
let changeArr = [];
this.children.map((child, index) => {
if (this.accordion) {
child.expanded = child === target ? !target.expanded : false;
child.setContentAnimate();
} else {
if (child === target) {
child.expanded = !child.expanded;
child.setContentAnimate();
}
}
changeArr.push({
// 如果没有定义name属性,则默认返回组件的index索引
name: child.name || index,
status: child.expanded ? "open" : "close"
});
});
this.$emit("change", changeArr);
this.$emit(target.expanded ? "open" : "close", target.name);
}
}
};
if (!Array) {
const _easycom_uv_line2 = common_vendor.resolveComponent("uv-line");
_easycom_uv_line2();
}
const _easycom_uv_line = () => "../uv-line/uv-line.js";
if (!Math) {
_easycom_uv_line();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: _ctx.border
}, _ctx.border ? {} : {});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/node-modules/@climblee/uv-ui/components/uv-collapse/uv-collapse.js.map
@@ -1,6 +0,0 @@
{
"component": true,
"usingComponents": {
"uv-line": "../uv-line/uv-line"
}
}
@@ -1 +0,0 @@
<view class="uv-collapse"><uv-line wx:if="{{a}}" u-i="544d1ba4-0" bind:__l="__l"></uv-line><slot/></view>
@@ -1,35 +0,0 @@
"use strict";
const common_vendor = require("../../../../../common/vendor.js");
const _sfc_main = {
name: "uv-line",
mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$7],
computed: {
lineStyle() {
const style = {};
style.margin = this.margin;
if (this.direction === "row") {
style.borderBottomWidth = "1px";
style.borderBottomStyle = this.dashed ? "dashed" : "solid";
style.width = this.$uv.addUnit(this.length);
if (this.hairline)
style.transform = "scaleY(0.5)";
} else {
style.borderLeftWidth = "1px";
style.borderLeftStyle = this.dashed ? "dashed" : "solid";
style.height = this.$uv.addUnit(this.length);
if (this.hairline)
style.transform = "scaleX(0.5)";
}
style.borderColor = this.color;
return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle));
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.s($options.lineStyle)
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0a68c4fc"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/node-modules/@climblee/uv-ui/components/uv-line/uv-line.js.map
@@ -1,4 +0,0 @@
{
"component": true,
"usingComponents": {}
}
@@ -1 +0,0 @@
<view class="uv-line data-v-0a68c4fc" style="{{a}}"></view>
@@ -1,28 +0,0 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.uv-line.data-v-0a68c4fc {
vertical-align: middle;
}