style:根据支付分免押规范进行页面样式变更(整体)
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
"use strict";exports._imports_0="/static/scan-icon.png",exports._imports_0$1="/static/jl.png",exports._imports_1="/static/complaint.png",exports._imports_2="/static/hlep.png";
|
||||
"use strict";exports._imports_0="/static/logo.png",exports._imports_0$1="/static/user-active.png",exports._imports_0$2="/static/images/wxpayflag.png",exports._imports_0$3="/static/images/location-map.svg",exports._imports_1="/static/scan-icon.png",exports._imports_1$1="/static/jl.png",exports._imports_1$2="/static/images/Electricity.svg",exports._imports_2="/static/complaint.png",exports._imports_3="/static/hlep.png";
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
"use strict";const e=require("../common/vendor.js"),o=require("./url.js");exports.request=a=>new Promise(((t,d)=>{console.log(`发起请求: ${a.method} ${o.URL+a.url}`,a.data),e.index.request({url:o.URL+a.url,method:a.method,data:a.data,header:{"Content-Type":"application/x-www-form-urlencoded",...a.headers,appid:o.appid,Authorization:"Bearer "+e.index.getStorageSync("token"),Clientid:e.index.getStorageSync("client_id")},success:e=>(console.log(`请求响应: ${a.url}`,e),200!==e.statusCode?(console.error(`HTTP状态码错误: ${e.statusCode}`,e.data),e.data?void t(e.data):void d({msg:`请求失败,状态码:${e.statusCode}`})):e.data&&200!==e.data.code?(console.warn(`业务状态码错误: ${e.data.code}`,e.data),void t(e.data)):void t(e.data)),fail(e){console.error(`请求失败: ${a.url}`,e),d(e)}})}));
|
||||
"use strict";const e=require("../common/vendor.js"),d=require("./url.js");exports.request=a=>new Promise(((o,t)=>{console.log(`发起请求: ${a.method} ${d.URL+a.url}`,a.data),a.hideLoading||e.index.showLoading({title:a.loadingText||"加载中...",mask:!0}),e.index.request({url:d.URL+a.url,method:a.method,data:a.data,header:{"Content-Type":"application/x-www-form-urlencoded",...a.headers,appid:d.appid,Authorization:"Bearer "+e.index.getStorageSync("token"),Clientid:e.index.getStorageSync("client_id")},success:e=>(console.log(`请求响应: ${a.url}`,e),200!==e.statusCode?(console.error(`HTTP状态码错误: ${e.statusCode}`,e.data),e.data?void o(e.data):void t({msg:`请求失败,状态码:${e.statusCode}`})):e.data&&200!==e.data.code?(console.warn(`业务状态码错误: ${e.data.code}`,e.data),a.ignoreEmptyError&&500===e.data.code&&e.data.msg&&(e.data.msg.includes("未找到")||e.data.msg.includes("不存在"))?void o({code:200,msg:"操作成功",data:[]}):void o(e.data)):void o(e.data)),fail(e){console.error(`请求失败: ${a.url}`,e),t(e)},complete(){a.hideLoading||e.index.hideLoading()}})}));
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
"use strict";exports.URL="https://unifans.gxfs123.com",exports.appid="wxe752f45e7f7aa271";
|
||||
"use strict";exports.URL="https://my.gxfs123.com/api",exports.appid="wx2165f0be356ae7a9";
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
"use strict";const e=require("./http.js");exports.confirmPaymentAndRent=r=>(console.log(`确认支付并弹出充电宝, orderId: ${r}`),e.request({url:`/app/device/confirmPaymentAndRent?orderId=${r}`,method:"post"})),exports.getDeviceInfo=r=>e.request({url:`/app/device/${r}`,method:"get"}),exports.getMyIndexInfo=r=>e.request({url:"/app/user/userInfo",method:"get",data:r}),exports.getOrderList=r=>e.request({url:"/app/order/list",method:"get",data:r,hideLoading:!0}),exports.login=r=>e.request({url:"/app/user/login",method:"get",data:r}),exports.queryById=r=>(console.log(`查询订单详情, orderId: ${r}`),e.request({url:`/app/order/${r}`,method:"get",hideLoading:!0})),exports.queryHasOrder=r=>e.request({url:`/app/order/list?deviceNo=${r}&orderStatus=in_used`,method:"get"}),exports.rentPowerBank=(r,t)=>e.request({url:"/app/device/rentPowerBank",method:"post",data:{deviceNo:r,phone:t}});
|
||||
"use strict";const e=require("./http.js");exports.checkOrdersByStatus=(r,t)=>{const o=t.join(",");return e.request({url:`/app/order/list?deviceNo=${r}&orderStatus=${o}`,method:"get",hideLoading:!0,ignoreEmptyError:!0})},exports.confirmPaymentAndRent=r=>(console.log(`确认支付并弹出充电宝, orderId: ${r}`),e.request({url:`/app/device/confirmPaymentAndRent?orderId=${r}`,method:"post"})),exports.getDeviceInfo=r=>e.request({url:`/app/device/${r}`,method:"get"}),exports.getMyIndexInfo=r=>e.request({url:"/app/user/userInfo",method:"get",data:r}),exports.getOrderByOrderNoScore=r=>(console.log("通过订单号获取支付分订单信息",r),e.request({url:`/app/wx-payment/score/create/${r}`,method:"get",hideLoading:!0})),exports.getOrderByOrderNoScorePayStatus=r=>(console.log("通过订单号获取支付分订单状态",r),e.request({url:`/app/wx-payment/score/status/${r}`,method:"get",hideLoading:!0})),exports.getOrderList=r=>e.request({url:"/app/order/list",method:"get",data:r,hideLoading:!0}),exports.login=r=>e.request({url:"/app/user/login",method:"get",data:r}),exports.queryById=r=>(console.log(`查询订单详情, orderId: ${r}`),e.request({url:`/app/order/${r}`,method:"get",hideLoading:!0})),exports.rentPowerBank=(r,t)=>e.request({url:"/app/device/rentPowerBank",method:"post",data:{deviceNo:r,phone:t}}),exports.updateUserBalance=r=>e.request({url:`/app/user/updateBalance/${r}`,method:"post",hideLoading:!0}),exports.withdrawDeposit=r=>(console.log("调用提现API,订单号:",r),e.request({url:`/app/withdraw/add/${r}`,method:"get",hideLoading:!0}));
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
"use strict";exports.OrderStatusMap={waiting_for_payment:{text:"待支付",class:"status-waiting"},payment_in_progress:{text:"支付中",class:"status-progress"},payment_successful:{text:"支付成功",class:"status-success"},in_used:{text:"使用中",class:"status-using"},payment_failed:{text:"支付失败",class:"status-failed"},order_cancelled:{text:"已取消",class:"status-cancelled"},used_done:{text:"已完成",class:"status-finished"}},exports.OrderStatusTabs=[{text:"全部",status:[]},{text:"待支付",status:["waiting_for_payment","payment_in_progress"]},{text:"使用中",status:["payment_successful","in_used"]},{text:"已完成",status:["used_done","payment_failed","order_cancelled"]}];
|
||||
+1
-1
@@ -1 +1 @@
|
||||
"use strict";const t=require("../../common/vendor.js"),e={data:()=>({depositAmount:"99.00",records:[{type:"支付",time:"2024-03-20 15:30",amount:"99.00"},{type:"退还",time:"2024-03-19 12:00",amount:"99.00"}]}),methods:{handleWithdraw(){t.index.showModal({title:"确认提现",content:"押金将原路退回,预计0-7个工作日到账",success:e=>{e.confirm&&t.index.showToast({title:"提现申请已提交",icon:"success"})}})}}};const o=t._export_sfc(e,[["render",function(e,o,n,d,s,a){return{a:t.t(s.depositAmount),b:t.o(((...t)=>a.handleWithdraw&&a.handleWithdraw(...t))),c:t.f(s.records,((e,o,n)=>({a:t.t(e.type),b:t.t(e.time),c:t.t("退还"===e.type?"+":"-"),d:t.t(e.amount),e:t.n("退还"===e.type?"refund":""),f:o})))}}],["__scopeId","data-v-a3ef2e56"]]);wx.createPage(o);
|
||||
"use strict";const e=require("../../common/vendor.js"),t=require("../../util/index.js"),o=require("../../config/user.js"),s={data:()=>({depositAmount:"0.00",orderNo:"",records:[],orderId:""}),onLoad(){},onShow(){this.loadUserInfo()},methods:{async loadUserInfo(){try{const e=await t.getUserInfo();console.log("loadUserInfo",e),200===e.code&&(this.depositAmount=e.data.balanceAmount||"0.00",this.orderNo=e.data.latestOrderNo||"",this.orderId=e.data.latestOrderId||"",parseFloat(this.depositAmount)>0&&this.orderNo?this.records=[{type:"支付",time:this.formatDate(new Date),amount:this.depositAmount}]:this.records=[])}catch(o){console.error("获取用户信息失败:",o),e.index.showToast({title:"获取用户信息失败",icon:"none"})}},async handleWithdraw(){if(parseFloat(this.depositAmount)<=0)e.index.showToast({title:"无可提现余额",icon:"none"});else{if(0!=this.orderId.length||0!=this.orderNo.length){const e=await o.queryById(Number(this.orderId));console.log(e)}e.index.showModal({title:"确认提现",content:"押金将原路退回,预计0-7个工作日到账",success:async t=>{if(t.confirm){e.index.showLoading({title:"提现中..."});try{console.log("发起提现请求,订单号:",this.orderNo);const t=await o.withdrawDeposit(this.orderNo);if(console.log("提现响应:",t),200!==t.code)throw new Error(t.msg||"提现失败");e.index.hideLoading(),e.index.showToast({title:"提现申请已提交",icon:"success"}),this.depositAmount="0.00",this.records.push({type:"退还",time:this.formatDate(new Date),amount:this.depositAmount}),setTimeout((()=>{this.loadUserInfo()}),1500)}catch(s){console.error("提现失败:",s),e.index.hideLoading();let t="提现失败,请稍后再试";s.message&&(t=s.message.includes("尚未归还")?"当前订单尚未归还,请归还后再提现":s.message.includes("已退还")?"押金已退还,无需重复提现":s.message.includes("处理中")?"押金退还处理中,请耐心等待":s.message.includes("余额为0")?"账户余额为0,无法提现":s.message),e.index.showModal({title:"提现失败",content:t,showCancel:!1})}}}})}},formatDate: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")}`}};const r=e._export_sfc(s,[["render",function(t,o,s,r,n,i){return e.e({a:e.t(n.depositAmount),b:e.o(((...e)=>i.handleWithdraw&&i.handleWithdraw(...e))),c:n.depositAmount<=0,d:n.records.length>0},n.records.length>0?{e:e.f(n.records,((t,o,s)=>({a:e.t(t.type),b:e.t(t.time),c:e.t("退还"===t.type?"+":"-"),d:e.t(t.amount),e:e.n("退还"===t.type?"refund":""),f:o})))}:{})}],["__scopeId","data-v-8981ee42"]]);wx.createPage(r);
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
<view class="deposit-container data-v-a3ef2e56"><view class="deposit-card data-v-a3ef2e56"><view class="title data-v-a3ef2e56">押金余额</view><view class="amount data-v-a3ef2e56">¥{{a}}</view><button class="withdraw-btn data-v-a3ef2e56" bindtap="{{b}}">提现</button></view><view class="notice-card data-v-a3ef2e56"><view class="notice-title data-v-a3ef2e56"><view class="dot data-v-a3ef2e56"></view><text class="data-v-a3ef2e56">提现说明</text></view><view class="notice-content data-v-a3ef2e56"><view class="notice-item data-v-a3ef2e56">1. 提现金额将原路退回支付账户</view><view class="notice-item data-v-a3ef2e56">2. 提现申请提交后预计0-7个工作日到账</view><view class="notice-item data-v-a3ef2e56">3. 如超时未收到,请联系客服处理</view></view></view><view class="record-card data-v-a3ef2e56"><view class="record-title data-v-a3ef2e56">押金记录</view><view class="record-list data-v-a3ef2e56"><view wx:for="{{c}}" wx:for-item="item" wx:key="f" class="record-item data-v-a3ef2e56"><view class="record-info data-v-a3ef2e56"><text class="record-type data-v-a3ef2e56">{{item.a}}</text><text class="record-time data-v-a3ef2e56">{{item.b}}</text></view><text class="{{['record-amount', 'data-v-a3ef2e56', item.e]}}">{{item.c}}¥{{item.d}}</text></view></view></view></view>
|
||||
<view class="deposit-container data-v-8981ee42"><view class="deposit-card data-v-8981ee42"><view class="title data-v-8981ee42">押金余额</view><view class="amount data-v-8981ee42">¥{{a}}</view><button class="withdraw-btn data-v-8981ee42" bindtap="{{b}}" disabled="{{c}}">提现</button></view><view class="notice-card data-v-8981ee42"><view class="notice-title data-v-8981ee42"><view class="dot data-v-8981ee42"></view><text class="data-v-8981ee42">提现说明</text></view><view class="notice-content data-v-8981ee42"><view class="notice-item data-v-8981ee42">1. 提现金额将原路退回支付账户</view><view class="notice-item data-v-8981ee42">2. 提现申请提交后预计0-7个工作日到账</view><view class="notice-item data-v-8981ee42">3. 如超时未收到,请联系客服处理</view></view></view><view wx:if="{{d}}" class="record-card data-v-8981ee42"><view class="record-title data-v-8981ee42">押金记录</view><view class="record-list data-v-8981ee42"><view wx:for="{{e}}" wx:for-item="item" wx:key="f" class="record-item data-v-8981ee42"><view class="record-info data-v-8981ee42"><text class="record-type data-v-8981ee42">{{item.a}}</text><text class="record-time data-v-8981ee42">{{item.b}}</text></view><text class="{{['record-amount', 'data-v-8981ee42', item.e]}}">{{item.c}}¥{{item.d}}</text></view></view></view></view>
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.deposit-container.data-v-a3ef2e56{min-height:100vh;background:#f8f8f8;padding:30rpx}.deposit-container .deposit-card.data-v-a3ef2e56{background:linear-gradient(135deg,#1976d2,#64b5f6);border-radius:20rpx;padding:40rpx;color:#fff;text-align:center;box-shadow:0 4rpx 20rpx rgba(25,118,210,.2)}.deposit-container .deposit-card .title.data-v-a3ef2e56{font-size:28rpx;opacity:.9;margin-bottom:20rpx}.deposit-container .deposit-card .amount.data-v-a3ef2e56{font-size:72rpx;font-weight:700;margin-bottom:40rpx}.deposit-container .deposit-card .withdraw-btn.data-v-a3ef2e56{background:#fff;color:#1976d2;width:80%;height:80rpx;line-height:80rpx;border-radius:40rpx;font-size:32rpx;font-weight:500;margin:0 auto}.deposit-container .deposit-card .withdraw-btn.data-v-a3ef2e56:active{transform:scale(.98)}.deposit-container .notice-card.data-v-a3ef2e56{margin-top:30rpx;background:#fff;border-radius:20rpx;padding:30rpx;box-shadow:0 4rpx 16rpx rgba(0,0,0,.04)}.deposit-container .notice-card .notice-title.data-v-a3ef2e56{display:flex;align-items:center;margin-bottom:20rpx}.deposit-container .notice-card .notice-title .dot.data-v-a3ef2e56{width:12rpx;height:12rpx;background:#1976d2;border-radius:50%;margin-right:10rpx}.deposit-container .notice-card .notice-title text.data-v-a3ef2e56{font-size:30rpx;font-weight:500;color:#333}.deposit-container .notice-card .notice-content .notice-item.data-v-a3ef2e56{font-size:26rpx;color:#666;line-height:1.8;padding-left:22rpx}.deposit-container .record-card.data-v-a3ef2e56{margin-top:30rpx;background:#fff;border-radius:20rpx;padding:30rpx;box-shadow:0 4rpx 16rpx rgba(0,0,0,.04)}.deposit-container .record-card .record-title.data-v-a3ef2e56{font-size:30rpx;font-weight:500;color:#333;margin-bottom:20rpx;border-left:8rpx solid #1976D2;padding-left:20rpx}.deposit-container .record-card .record-list .record-item.data-v-a3ef2e56{display:flex;justify-content:space-between;align-items:center;padding:20rpx 0;border-bottom:1rpx solid #f5f5f5}.deposit-container .record-card .record-list .record-item.data-v-a3ef2e56:last-child{border-bottom:none}.deposit-container .record-card .record-list .record-item .record-info .record-type.data-v-a3ef2e56{font-size:28rpx;color:#333;margin-bottom:6rpx;display:block}.deposit-container .record-card .record-list .record-item .record-info .record-time.data-v-a3ef2e56{font-size:24rpx;color:#999}.deposit-container .record-card .record-list .record-item .record-amount.data-v-a3ef2e56{font-size:32rpx;color:#333;font-weight:500}.deposit-container .record-card .record-list .record-item .record-amount.refund.data-v-a3ef2e56{color:#4caf50}
|
||||
.deposit-container.data-v-8981ee42{min-height:100vh;background:#f8f8f8;padding:30rpx}.deposit-container .deposit-card.data-v-8981ee42{background:linear-gradient(135deg,#1976d2,#64b5f6);border-radius:20rpx;padding:40rpx;color:#fff;text-align:center;box-shadow:0 4rpx 20rpx rgba(25,118,210,.2)}.deposit-container .deposit-card .title.data-v-8981ee42{font-size:28rpx;opacity:.9;margin-bottom:20rpx}.deposit-container .deposit-card .amount.data-v-8981ee42{font-size:72rpx;font-weight:700;margin-bottom:40rpx}.deposit-container .deposit-card .withdraw-btn.data-v-8981ee42{background:#fff;color:#1976d2;width:80%;height:80rpx;line-height:80rpx;border-radius:40rpx;font-size:32rpx;font-weight:500;margin:0 auto}.deposit-container .deposit-card .withdraw-btn.data-v-8981ee42:active{transform:scale(.98)}.deposit-container .deposit-card .withdraw-btn[disabled].data-v-8981ee42{background:rgba(255,255,255,.6);color:rgba(25,118,210,.5)}.deposit-container .notice-card.data-v-8981ee42{margin-top:30rpx;background:#fff;border-radius:20rpx;padding:30rpx;box-shadow:0 4rpx 16rpx rgba(0,0,0,.04)}.deposit-container .notice-card .notice-title.data-v-8981ee42{display:flex;align-items:center;margin-bottom:20rpx}.deposit-container .notice-card .notice-title .dot.data-v-8981ee42{width:12rpx;height:12rpx;background:#1976d2;border-radius:50%;margin-right:10rpx}.deposit-container .notice-card .notice-title text.data-v-8981ee42{font-size:30rpx;font-weight:500;color:#333}.deposit-container .notice-card .notice-content .notice-item.data-v-8981ee42{font-size:26rpx;color:#666;line-height:1.8;padding-left:22rpx}.deposit-container .record-card.data-v-8981ee42{margin-top:30rpx;background:#fff;border-radius:20rpx;padding:30rpx;box-shadow:0 4rpx 16rpx rgba(0,0,0,.04)}.deposit-container .record-card .record-title.data-v-8981ee42{font-size:30rpx;font-weight:500;color:#333;margin-bottom:20rpx;border-left:8rpx solid #1976D2;padding-left:20rpx}.deposit-container .record-card .record-list .record-item.data-v-8981ee42{display:flex;justify-content:space-between;align-items:center;padding:20rpx 0;border-bottom:1rpx solid #f5f5f5}.deposit-container .record-card .record-list .record-item.data-v-8981ee42:last-child{border-bottom:none}.deposit-container .record-card .record-list .record-item .record-info .record-type.data-v-8981ee42{font-size:28rpx;color:#333;margin-bottom:6rpx;display:block}.deposit-container .record-card .record-list .record-item .record-info .record-time.data-v-8981ee42{font-size:24rpx;color:#999}.deposit-container .record-card .record-list .record-item .record-amount.data-v-8981ee42{font-size:32rpx;color:#333;font-weight:500}.deposit-container .record-card .record-list .record-item .record-amount.refund.data-v-8981ee42{color:#4caf50}
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js"),t=require("../../config/user.js"),i={data:()=>({deviceInfo:{},deviceId:"",deviceLocation:"一号教学楼大厅",batteryLevel:95,hasActiveOrder:!1,deviceStatus:{text:"可使用",class:"available"},selectedPackage:1,packages:[{time:"1小时",price:"2.00",unitPrice:"2.00"},{time:"4小时",price:"6.00",unitPrice:"1.50"},{time:"12小时",price:"15.00",unitPrice:"1.25"}],isLoggedIn:!0,phoneNumber:""}),onLoad(e){this.deviceId=e.deviceNo,console.log(e.deviceNo),this.getDeviceInfo()},methods:{async getDeviceInfo(){const e=await t.getDeviceInfo(this.deviceId);200==e.code&&(this.deviceInfo=e.data)},showLoginTip(){e.index.showModal({title:"提示",content:"请先登录后再操作",confirmText:"去登录",success:t=>{t.confirm&&e.index.navigateTo({url:"/pages/login/index"})}})},selectPackage(e){this.selectedPackage=e},async checkOrderStatus(){try{(await this.$api.checkActiveOrder()).hasOrder&&e.index.redirectTo({url:`/pages/device/return?deviceId=${this.deviceId}`})}catch(t){e.index.showToast({title:"订单状态查询失败",icon:"none"})}},handleRent(){if(!this.isLoggedIn)return void this.showLoginTip();if(!this.phoneNumber)return void e.index.showToast({title:"请输入手机号码",icon:"none"});if(!/^1[3-9]\d{9}$/.test(this.phoneNumber))return void e.index.showToast({title:"请输入正确的手机号码",icon:"none"});const t=this.packages[this.selectedPackage];e.index.showModal({title:"确认租借",content:`确认支付押金¥99.00及${t.time}套餐费用¥${t.price}?`,success:e=>{e.confirm&&this.submitRentOrder()}})},async submitRentOrder(){try{e.index.showLoading({title:"处理中"});const i=this.packages[this.selectedPackage],c=await t.rentPowerBank(this.deviceId,this.phoneNumber);if(200!==c.code)throw new Error(c.msg||"设备租借失败");const n=c.data;e.index.hideLoading(),e.index.redirectTo({url:`/pages/order/payment?orderId=${n.orderId}&packageTime=${i.time}&packagePrice=${i.price}`})}catch(i){e.index.hideLoading(),e.index.showToast({title:i.message||"租借失败,请重试",icon:"none"})}}}};const c=e._export_sfc(i,[["render",function(t,i,c,n,a,r){return e.e({a:e.t(a.deviceId),b:e.t(a.deviceStatus.text),c:e.n(a.deviceStatus.class),d:e.t(a.deviceLocation),e:e.t(a.batteryLevel),f:!a.hasActiveOrder},a.hasActiveOrder?{}:{g:e.f(a.packages,((t,i,c)=>({a:e.t(t.time),b:e.t(t.price),c:e.t(t.unitPrice),d:i,e:a.selectedPackage===i?1:"",f:e.o((e=>r.selectPackage(i)),i)})))},{h:!a.hasActiveOrder},a.hasActiveOrder?{}:{i:a.phoneNumber,j:e.o((e=>a.phoneNumber=e.detail.value))},{k:!a.hasActiveOrder},(a.hasActiveOrder,{}),{l:e.t(a.hasActiveOrder?"归还设备":"立即租借"),m:e.n(a.hasActiveOrder?"return":"rent"),n:e.o(((...e)=>r.handleRent&&r.handleRent(...e)))})}],["__scopeId","data-v-b8e15e19"]]);wx.createPage(c);
|
||||
"use strict";const e=require("../../common/vendor.js"),t=require("../../common/assets.js"),a=require("../../config/user.js"),o=require("../../util/index.js"),i={__name:"detail",setup(i){const n=e.ref({}),s=e.ref(""),r=e.ref("一号教学楼大厅"),d=e.ref(95),c=e.ref(!1),l=e.reactive({text:"可使用",class:"available"}),u=e.ref(!0),v=e.ref("");e.onLoad((e=>{s.value=e.deviceNo,f(),console.log(e.deviceNo),x()}));const x=async()=>{const e=await a.getDeviceInfo(s.value);200==e.code&&(n.value=e.data.device||{},n.value.deviceLocation?r.value=n.value.deviceLocation:e.data.position&&e.data.position.name&&(r.value=e.data.position.name),n.value.status&&("online"===n.value.status?(l.text="可使用",l.class="available"):"offline"===n.value.status&&(l.text="离线",l.class="offline")))},f=async()=>{try{const t=await e.index.$api.checkActiveOrder();if(t.hasOrder){const a=t.order;"waiting_for_payment"===a.status?e.index.redirectTo({url:`/pages/order/payment?orderId=${a.orderId}&deviceId=${s.value}`}):"in_used"===a.status&&e.index.redirectTo({url:`/pages/device/return?deviceId=${s.value}`})}}catch(t){e.index.showToast({title:"订单状态查询失败",icon:"none"})}},g=()=>{u.value?v.value?/^1[3-9]\d{9}$/.test(v.value)?m():e.index.showToast({title:"请输入正确的手机号码",icon:"none"}):e.index.showToast({title:"请输入手机号码",icon:"none"}):e.index.showModal({title:"提示",content:"请先登录后再操作",confirmText:"去登录",success:t=>{t.confirm&&e.index.navigateTo({url:"/pages/login/index"})}})},m=async()=>{try{e.index.showLoading({title:"处理中"});const i=await a.rentPowerBank(s.value,v.value);if(200!==i.code)throw new Error(i.msg||"设备租借失败");const n=i.data,r=await a.getOrderByOrderNoScore(n.orderNo);if(console.log(r),e.index.hideLoading(),r&&200===r.code)try{if("0"==(await o.initiateWeChatScorePayment(r)).errCode){await a.getOrderByOrderNoScorePayStatus(n.orderNo);e.index.showToast({title:"设备租借成功",icon:"success"}),setTimeout((()=>{e.index.redirectTo({url:"/pages/order/index"})}),1500)}}catch(t){e.index.showToast({title:"支付分调用失败,请重试",icon:"none"})}else e.index.showToast({title:(null==r?void 0:r.msg)||"获取支付参数失败",icon:"none"});console.log(n)}catch(i){e.index.hideLoading(),e.index.showToast({title:i.message||"租借失败,请重试",icon:"none"})}};return(a,o)=>e.e({a:e.t(l.text),b:e.n(l.class),c:e.t(s.value),d:t._imports_0$3,e:e.t(r.value),f:t._imports_1$2,g:d.value<20?1:"",h:e.t(d.value),i:!c.value},c.value?{}:{j:v.value,k:e.o((e=>v.value=e.detail.value))},{l:t._imports_0$2,m:e.t(c.value?"归还设备":"免押金租借"),n:c.value?1:"",o:e.o(g)})}},n=e._export_sfc(i,[["__scopeId","data-v-fc2714b0"]]);wx.createPage(n);
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
<view class="detail-container data-v-b8e15e19"><view class="device-card data-v-b8e15e19"><view class="device-header data-v-b8e15e19"><view class="device-title data-v-b8e15e19"><text class="name data-v-b8e15e19">共享风扇</text><text class="id data-v-b8e15e19">设备号:{{a}}</text></view><view class="{{['status', 'data-v-b8e15e19', c]}}">{{b}}</view></view><view class="device-info data-v-b8e15e19"><view class="info-item data-v-b8e15e19"><text class="label data-v-b8e15e19">设备位置</text><text class="value data-v-b8e15e19">{{d}}</text></view><view class="info-item data-v-b8e15e19"><text class="label data-v-b8e15e19">电池电量</text><text class="value data-v-b8e15e19">{{e}}%</text></view></view></view><view wx:if="{{f}}" class="package-section data-v-b8e15e19"><view class="section-title data-v-b8e15e19">选择套餐</view><view class="package-list data-v-b8e15e19"><view wx:for="{{g}}" wx:for-item="pkg" wx:key="d" class="{{['package-item', 'data-v-b8e15e19', pkg.e && 'active']}}" bindtap="{{pkg.f}}"><view class="package-content data-v-b8e15e19"><text class="time data-v-b8e15e19">{{pkg.a}}</text><text class="price data-v-b8e15e19">¥{{pkg.b}}</text></view><text class="unit-price data-v-b8e15e19">约{{pkg.c}}元/小时</text></view></view></view><view wx:if="{{h}}" class="phone-section data-v-b8e15e19"><view class="section-title data-v-b8e15e19">联系方式</view><view class="phone-input-wrap data-v-b8e15e19"><input type="number" class="phone-input data-v-b8e15e19" maxlength="11" placeholder="请输入手机号码" value="{{i}}" bindinput="{{j}}"/></view></view><view class="notice-section data-v-b8e15e19"><view class="section-title data-v-b8e15e19">使用说明</view><view class="notice-list data-v-b8e15e19"><view class="notice-item data-v-b8e15e19"><view class="dot data-v-b8e15e19"></view><text class="data-v-b8e15e19">请在使用前检查设备是否完好</text></view><view class="notice-item data-v-b8e15e19"><view class="dot data-v-b8e15e19"></view><text class="data-v-b8e15e19">超出使用时间将自动按小时计费</text></view><view class="notice-item data-v-b8e15e19"><view class="dot data-v-b8e15e19"></view><text class="data-v-b8e15e19">请在指定区域内使用设备</text></view></view></view><view class="bottom-bar data-v-b8e15e19"><view wx:if="{{k}}" class="price-info data-v-b8e15e19"><text class="deposit-text data-v-b8e15e19">押金:</text><text class="deposit-amount data-v-b8e15e19">¥99</text></view><button class="{{['action-btn', 'data-v-b8e15e19', m]}}" bindtap="{{n}}">{{l}}</button></view></view>
|
||||
<view class="container data-v-fc2714b0"><view class="device-header data-v-fc2714b0"><view class="{{['device-status-card', 'data-v-fc2714b0', b]}}"><view class="status-indicator data-v-fc2714b0"></view><text class="status-text data-v-fc2714b0">{{a}}</text></view><view class="device-title data-v-fc2714b0"><text class="name data-v-fc2714b0">共享风扇</text><view class="device-meta data-v-fc2714b0"><text class="id-label data-v-fc2714b0">设备号:</text><text class="id-value data-v-fc2714b0">{{c}}</text></view></view></view><view class="card device-info-card data-v-fc2714b0"><view class="card-row data-v-fc2714b0"><view class="card-item data-v-fc2714b0"><view class="item-icon location-icon data-v-fc2714b0"><image class="data-v-fc2714b0" src="{{d}}" mode="aspectFill" style="width:45rpx;height:45rpx"></image></view><view class="item-content data-v-fc2714b0"><text class="item-label data-v-fc2714b0">当前位置</text><text class="item-value data-v-fc2714b0">{{e}}</text></view></view><view class="card-item data-v-fc2714b0"><view class="{{['item-icon', 'battery-icon', 'data-v-fc2714b0', g && 'battery-low']}}"><image class="data-v-fc2714b0" src="{{f}}" mode="aspectFill" style="width:45rpx;height:45rpx"></image></view><view class="item-content data-v-fc2714b0"><text class="item-label data-v-fc2714b0">电池电量</text><text class="item-value data-v-fc2714b0">{{h}}%</text></view></view></view></view><view class="card pricing-card data-v-fc2714b0"><view class="card-header data-v-fc2714b0"><text class="card-title data-v-fc2714b0">计费规则</text></view><view class="pricing-banner data-v-fc2714b0"><view class="pricing-main data-v-fc2714b0"><text class="price data-v-fc2714b0">¥5.00</text><text class="unit data-v-fc2714b0">/小时</text></view><text class="cap-price data-v-fc2714b0">封顶 ¥99</text></view><view class="pricing-rules data-v-fc2714b0"><view class="rule-item data-v-fc2714b0"><view class="rule-dot data-v-fc2714b0"></view><text class="rule-text data-v-fc2714b0">前15分钟内归还<text class="highlight data-v-fc2714b0">免费</text></text></view><view class="rule-item data-v-fc2714b0"><view class="rule-dot data-v-fc2714b0"></view><text class="rule-text data-v-fc2714b0">不足60分钟按60分钟计费</text></view><view class="rule-item data-v-fc2714b0"><view class="rule-dot data-v-fc2714b0"></view><text class="rule-text data-v-fc2714b0">持续计费至99元视为买断</text></view></view></view><view wx:if="{{i}}" class="card phone-card data-v-fc2714b0"><view class="card-header data-v-fc2714b0"><text class="card-title data-v-fc2714b0">联系方式</text></view><view class="phone-input-container data-v-fc2714b0"><view class="input-wrapper data-v-fc2714b0"><text class="prefix data-v-fc2714b0">+86</text><input type="number" class="phone-input data-v-fc2714b0" maxlength="11" placeholder="请输入手机号码" value="{{j}}" bindinput="{{k}}"/></view></view></view><view class="card notice-card data-v-fc2714b0"><view class="card-header data-v-fc2714b0"><text class="card-title data-v-fc2714b0">使用须知</text></view><view class="notice-items data-v-fc2714b0"><view class="notice-item data-v-fc2714b0"><view class="notice-dot data-v-fc2714b0"></view><text class="notice-text data-v-fc2714b0">请在使用前检查设备是否完好</text></view><view class="notice-item data-v-fc2714b0"><view class="notice-dot data-v-fc2714b0"></view><text class="notice-text data-v-fc2714b0">请在指定区域内使用设备</text></view><view class="notice-item data-v-fc2714b0"><view class="notice-dot data-v-fc2714b0"></view><text class="notice-text data-v-fc2714b0">归还时请确保设备完好,避免损坏</text></view></view></view><view class="footer data-v-fc2714b0"><view class="wechat-credit data-v-fc2714b0"><image src="{{l}}" mode="aspectFit" class="wx-icon data-v-fc2714b0"></image><view class="credit-text data-v-fc2714b0"><text class="data-v-fc2714b0">微信支付分</text><text class="credit-divider data-v-fc2714b0">|</text><text class="credit-score data-v-fc2714b0">支付分200分及以上优享</text></view></view><button class="{{['rent-button', 'data-v-fc2714b0', n && 'return-button']}}" bindtap="{{o}}"><text class="data-v-fc2714b0">{{m}}</text></button></view></view>
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js"),t={data:()=>({types:["设备故障","收费问题","使用建议","其他"],selectedType:-1,description:"",images:[],contact:""}),methods:{selectType(e){this.selectedType=e},chooseImage(){e.index.chooseImage({count:3-this.images.length,success:e=>{this.images=[...this.images,...e.tempFilePaths]}})},deleteImage(e){this.images.splice(e,1)},submitFeedback(){-1!==this.selectedType?this.description.trim()?this.contact?e.index.showToast({title:"提交成功",icon:"success"}):e.index.showToast({title:"请留下联系方式",icon:"none"}):e.index.showToast({title:"请描述您的问题",icon:"none"}):e.index.showToast({title:"请选择问题类型",icon:"none"})}}};const s=e._export_sfc(t,[["render",function(t,s,i,c,o,a){return e.e({a:e.f(o.types,((t,s,i)=>({a:e.t(t),b:s,c:o.selectedType===s?1:"",d:e.o((e=>a.selectType(s)),s)}))),b:o.description,c:e.o((e=>o.description=e.detail.value)),d:e.t(o.description.length),e:e.f(o.images,((t,s,i)=>({a:t,b:e.o((e=>a.deleteImage(s)),s),c:s}))),f:o.images.length<3},o.images.length<3?{g:e.o(((...e)=>a.chooseImage&&a.chooseImage(...e)))}:{},{h:o.contact,i:e.o((e=>o.contact=e.detail.value)),j:e.o(((...e)=>a.submitFeedback&&a.submitFeedback(...e)))})}],["__scopeId","data-v-229c69af"]]);wx.createPage(s);
|
||||
"use strict";const e=require("../../common/vendor.js"),t={data:()=>({types:["设备故障","收费问题","使用建议","其他"],selectedType:-1,description:"",images:[],contact:""}),methods:{selectType(e){this.selectedType=e},chooseImage(){e.index.chooseImage({count:3-this.images.length,success:e=>{this.images=[...this.images,...e.tempFilePaths]}})},deleteImage(e){this.images.splice(e,1)},submitFeedback(){if(-1===this.selectedType)return void e.index.showToast({title:"请选择问题类型",icon:"none"});if(!this.description.trim())return void e.index.showToast({title:"请描述您的问题",icon:"none"});if(!this.contact)return void e.index.showToast({title:"请留下联系方式",icon:"none"});const t={type:this.types[this.selectedType],content:this.description,phone:this.contact,images:this.images};e.index.request({url:"/app/feedback/add",method:"POST",data:t,success:t=>{200===t.statusCode?(e.index.showToast({title:"提交成功",icon:"success"}),this.selectedType=-1,this.description="",this.contact="",this.images=[]):e.index.showToast({title:"提交失败",icon:"none"})},fail:()=>{e.index.showToast({title:"提交失败",icon:"none"})}})}}};const s=e._export_sfc(t,[["render",function(t,s,i,o,c,n){return e.e({a:e.f(c.types,((t,s,i)=>({a:e.t(t),b:s,c:c.selectedType===s?1:"",d:e.o((e=>n.selectType(s)),s)}))),b:c.description,c:e.o((e=>c.description=e.detail.value)),d:e.t(c.description.length),e:e.f(c.images,((t,s,i)=>({a:t,b:e.o((e=>n.deleteImage(s)),s),c:s}))),f:c.images.length<3},c.images.length<3?{g:e.o(((...e)=>n.chooseImage&&n.chooseImage(...e)))}:{},{h:c.contact,i:e.o((e=>c.contact=e.detail.value)),j:e.o(((...e)=>n.submitFeedback&&n.submitFeedback(...e)))})}],["__scopeId","data-v-e7b0add7"]]);wx.createPage(s);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="feedback-container data-v-229c69af"><view class="type-section data-v-229c69af"><view class="section-title data-v-229c69af">问题类型</view><view class="type-grid data-v-229c69af"><view wx:for="{{a}}" wx:for-item="type" wx:key="b" class="{{['type-item', 'data-v-229c69af', type.c && 'active']}}" bindtap="{{type.d}}">{{type.a}}</view></view></view><view class="description-section data-v-229c69af"><view class="section-title data-v-229c69af">问题描述</view><block wx:if="{{r0}}"><textarea class="description-input data-v-229c69af" placeholder="请详细描述您遇到的问题,以便我们更好地为您解决" maxlength="500" value="{{b}}" bindinput="{{c}}"/></block><view class="word-count data-v-229c69af">{{d}}/500</view></view><view class="upload-section data-v-229c69af"><view class="section-title data-v-229c69af">图片上传(选填)</view><view class="upload-grid data-v-229c69af"><view wx:for="{{e}}" wx:for-item="img" wx:key="c" class="upload-item data-v-229c69af"><image class="data-v-229c69af" src="{{img.a}}" mode="aspectFill"/><view class="delete-btn data-v-229c69af" bindtap="{{img.b}}">×</view></view><view wx:if="{{f}}" class="upload-btn data-v-229c69af" bindtap="{{g}}"><text class="plus data-v-229c69af">+</text><text class="tip data-v-229c69af">上传图片</text></view></view></view><view class="contact-section data-v-229c69af"><view class="section-title data-v-229c69af">联系方式</view><input class="contact-input data-v-229c69af" placeholder="请留下您的手机号,方便我们联系您" type="number" maxlength="11" value="{{h}}" bindinput="{{i}}"/></view><view class="submit-section data-v-229c69af"><button class="submit-btn data-v-229c69af" bindtap="{{j}}">提交反馈</button></view></view>
|
||||
<view class="feedback-container data-v-e7b0add7"><view class="type-section data-v-e7b0add7"><view class="section-title data-v-e7b0add7">问题类型</view><view class="type-grid data-v-e7b0add7"><view wx:for="{{a}}" wx:for-item="type" wx:key="b" class="{{['type-item', 'data-v-e7b0add7', type.c && 'active']}}" bindtap="{{type.d}}">{{type.a}}</view></view></view><view class="description-section data-v-e7b0add7"><view class="section-title data-v-e7b0add7">问题描述</view><block wx:if="{{r0}}"><textarea class="description-input data-v-e7b0add7" placeholder="请详细描述您遇到的问题,以便我们更好地为您解决" maxlength="500" value="{{b}}" bindinput="{{c}}"/></block><view class="word-count data-v-e7b0add7">{{d}}/500</view></view><view class="upload-section data-v-e7b0add7"><view class="section-title data-v-e7b0add7">图片上传(选填)</view><view class="upload-grid data-v-e7b0add7"><view wx:for="{{e}}" wx:for-item="img" wx:key="c" class="upload-item data-v-e7b0add7"><image class="data-v-e7b0add7" src="{{img.a}}" mode="aspectFill"/><view class="delete-btn data-v-e7b0add7" bindtap="{{img.b}}">×</view></view><view wx:if="{{f}}" class="upload-btn data-v-e7b0add7" bindtap="{{g}}"><text class="plus data-v-e7b0add7">+</text><text class="tip data-v-e7b0add7">上传图片</text></view></view></view><view class="contact-section data-v-e7b0add7"><view class="section-title data-v-e7b0add7">联系方式</view><input class="contact-input data-v-e7b0add7" placeholder="请留下您的手机号,方便我们联系您" type="number" maxlength="11" value="{{h}}" bindinput="{{i}}"/></view><view class="submit-section data-v-e7b0add7"><button class="submit-btn data-v-e7b0add7" bindtap="{{j}}">提交反馈</button></view></view>
|
||||
@@ -1 +1 @@
|
||||
.feedback-container.data-v-229c69af{min-height:100vh;background:#f8f8f8;padding:30rpx}.feedback-container .section-title.data-v-229c69af{font-size:30rpx;color:#333;font-weight:500;margin-bottom:20rpx}.feedback-container .type-section.data-v-229c69af{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:20rpx}.feedback-container .type-section .type-grid.data-v-229c69af{display:flex;flex-wrap:wrap;margin:0 -10rpx}.feedback-container .type-section .type-grid .type-item.data-v-229c69af{width:calc(50% - 20rpx);margin:10rpx;height:80rpx;display:flex;align-items:center;justify-content:center;background:#f5f5f5;border-radius:10rpx;font-size:28rpx;color:#666;transition:all .3s}.feedback-container .type-section .type-grid .type-item.active.data-v-229c69af{background:#e3f2fd;color:#1976d2}.feedback-container .description-section.data-v-229c69af{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:20rpx}.feedback-container .description-section .description-input.data-v-229c69af{width:100%;height:240rpx;background:#f8f8f8;border-radius:10rpx;padding:20rpx;font-size:28rpx;color:#333;box-sizing:border-box}.feedback-container .description-section .word-count.data-v-229c69af{text-align:right;font-size:24rpx;color:#999;margin-top:10rpx}.feedback-container .upload-section.data-v-229c69af{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:20rpx}.feedback-container .upload-section .upload-grid.data-v-229c69af{display:flex;flex-wrap:wrap}.feedback-container .upload-section .upload-grid .upload-item.data-v-229c69af{width:200rpx;height:200rpx;margin-right:20rpx;margin-bottom:20rpx;position:relative}.feedback-container .upload-section .upload-grid .upload-item image.data-v-229c69af{width:100%;height:100%;border-radius:10rpx}.feedback-container .upload-section .upload-grid .upload-item .delete-btn.data-v-229c69af{position:absolute;right:-10rpx;top:-10rpx;width:40rpx;height:40rpx;background:rgba(0,0,0,.5);color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:32rpx}.feedback-container .upload-section .upload-grid .upload-btn.data-v-229c69af{width:200rpx;height:200rpx;background:#f5f5f5;border-radius:10rpx;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#999}.feedback-container .upload-section .upload-grid .upload-btn .plus.data-v-229c69af{font-size:60rpx;line-height:1;margin-bottom:10rpx}.feedback-container .upload-section .upload-grid .upload-btn .tip.data-v-229c69af{font-size:24rpx}.feedback-container .contact-section.data-v-229c69af{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:40rpx}.feedback-container .contact-section .contact-input.data-v-229c69af{width:100%;height:80rpx;background:#f8f8f8;border-radius:10rpx;padding:0 20rpx;font-size:28rpx;color:#333;box-sizing:border-box}.feedback-container .submit-section.data-v-229c69af{padding:0 40rpx}.feedback-container .submit-section .submit-btn.data-v-229c69af{width:100%;height:88rpx;background:#1976d2;color:#fff;border-radius:44rpx;font-size:32rpx;font-weight:500;display:flex;align-items:center;justify-content:center}.feedback-container .submit-section .submit-btn.data-v-229c69af:active{transform:scale(.98)}
|
||||
.feedback-container.data-v-e7b0add7{min-height:100vh;background:#f8f8f8;padding:30rpx}.feedback-container .section-title.data-v-e7b0add7{font-size:30rpx;color:#333;font-weight:500;margin-bottom:20rpx}.feedback-container .type-section.data-v-e7b0add7{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:20rpx}.feedback-container .type-section .type-grid.data-v-e7b0add7{display:flex;flex-wrap:wrap;margin:0 -10rpx}.feedback-container .type-section .type-grid .type-item.data-v-e7b0add7{width:calc(50% - 20rpx);margin:10rpx;height:80rpx;display:flex;align-items:center;justify-content:center;background:#f5f5f5;border-radius:10rpx;font-size:28rpx;color:#666;transition:all .3s}.feedback-container .type-section .type-grid .type-item.active.data-v-e7b0add7{background:#e3f2fd;color:#1976d2}.feedback-container .description-section.data-v-e7b0add7{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:20rpx}.feedback-container .description-section .description-input.data-v-e7b0add7{width:100%;height:240rpx;background:#f8f8f8;border-radius:10rpx;padding:20rpx;font-size:28rpx;color:#333;box-sizing:border-box}.feedback-container .description-section .word-count.data-v-e7b0add7{text-align:right;font-size:24rpx;color:#999;margin-top:10rpx}.feedback-container .upload-section.data-v-e7b0add7{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:20rpx}.feedback-container .upload-section .upload-grid.data-v-e7b0add7{display:flex;flex-wrap:wrap}.feedback-container .upload-section .upload-grid .upload-item.data-v-e7b0add7{width:200rpx;height:200rpx;margin-right:20rpx;margin-bottom:20rpx;position:relative}.feedback-container .upload-section .upload-grid .upload-item image.data-v-e7b0add7{width:100%;height:100%;border-radius:10rpx}.feedback-container .upload-section .upload-grid .upload-item .delete-btn.data-v-e7b0add7{position:absolute;right:-10rpx;top:-10rpx;width:40rpx;height:40rpx;background:rgba(0,0,0,.5);color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:32rpx}.feedback-container .upload-section .upload-grid .upload-btn.data-v-e7b0add7{width:200rpx;height:200rpx;background:#f5f5f5;border-radius:10rpx;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#999}.feedback-container .upload-section .upload-grid .upload-btn .plus.data-v-e7b0add7{font-size:60rpx;line-height:1;margin-bottom:10rpx}.feedback-container .upload-section .upload-grid .upload-btn .tip.data-v-e7b0add7{font-size:24rpx}.feedback-container .contact-section.data-v-e7b0add7{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:40rpx}.feedback-container .contact-section .contact-input.data-v-e7b0add7{width:100%;height:80rpx;background:#f8f8f8;border-radius:10rpx;padding:0 20rpx;font-size:28rpx;color:#333;box-sizing:border-box}.feedback-container .submit-section.data-v-e7b0add7{padding:0 40rpx}.feedback-container .submit-section .submit-btn.data-v-e7b0add7{width:100%;height:88rpx;background:#1976d2;color:#fff;border-radius:44rpx;font-size:32rpx;font-weight:500;display:flex;align-items:center;justify-content:center}.feedback-container .submit-section .submit-btn.data-v-e7b0add7:active{transform:scale(.98)}
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js"),o=require("../../util/index.js"),t=require("../../config/url.js"),n=require("../../common/assets.js"),a={methods:{async handleScan(){try{const n=await new Promise(((o,t)=>{e.index.scanCode({success:o,fail:t})}));let a=o.getQueryString(n.path,"deviceNo");if(console.log("扫码路径:",n.path),console.log("解析到的设备号:",a),!a)return void e.index.showToast({title:"无效的设备二维码",icon:"none"});e.index.getStorageSync("token")||await o.wxLogin();const d=await e.index.request({url:`${t.URL||"http://127.0.0.1:8080"}/app/order/inUse`,method:"GET",header:{Authorization:"Bearer "+e.index.getStorageSync("token"),Clientid:e.index.getStorageSync("client_id")}});if(console.log("使用中订单检查结果:",JSON.stringify(d)),200==d.statusCode&&200==d.data.code&&d.data.data){const o=d.data.data;return console.log("检测到使用中订单,准备跳转:",o),e.index.reLaunch({url:`/pages/return/index?orderId=${o.orderId}&deviceId=${a||o.deviceNo}`}),void console.log("已发起页面跳转")}const i=await e.index.request({url:`${t.URL||"http://127.0.0.1:8080"}/app/order/unpaid`,method:"GET",header:{Authorization:"Bearer "+e.index.getStorageSync("token"),Clientid:e.index.getStorageSync("client_id")}});if(console.log("待支付订单检查结果:",JSON.stringify(i)),200==i.statusCode&&200==i.data.code&&i.data.data){const o=i.data.data;console.log("检测到待支付订单,准备跳转:",o),e.index.navigateTo({url:`/pages/order/payment?orderId=${o.orderId}`})}else console.log("无待支付订单,直接跳转到设备详情页面, deviceNo:",a),e.index.navigateTo({url:`/pages/device/detail?deviceNo=${a}`})}catch(n){console.error("扫码处理失败:",n),e.index.showToast({title:"扫码失败",icon:"none"})}}}};const d=e._export_sfc(a,[["render",function(o,t,a,d,i,r){return{a:n._imports_0,b:e.o(((...e)=>r.handleScan&&r.handleScan(...e)))}}],["__scopeId","data-v-8df762f3"]]);wx.createPage(d);
|
||||
"use strict";const e=require("../../common/vendor.js"),o=require("../../util/index.js"),n=require("../../config/url.js"),t=require("../../config/user.js"),i=require("../../common/assets.js"),a={methods:{async handleScan(){try{const d=await new Promise(((o,n)=>{e.index.scanCode({success:o,fail:n})}));console.log(d.path);let r=o.getQueryString(d.path,"deviceNo");if(console.log("扫码路径:",d.path),console.log("解析到的设备号:",r),!r)return void e.index.showToast({title:"无效的设备二维码",icon:"none"});e.index.getStorageSync("token")||await o.wxLogin();const c=await e.index.request({url:`${n.URL||"http://127.0.0.1:8080"}/app/order/inUse`,method:"GET",header:{Authorization:"Bearer "+e.index.getStorageSync("token"),Clientid:e.index.getStorageSync("client_id")}});if(console.log("使用中订单检查结果:",JSON.stringify(c)),200==c.statusCode&&200==c.data.code&&c.data.data){const o=c.data.data;return console.log("检测到使用中订单,准备跳转:",o),e.index.reLaunch({url:`/pages/return/index?orderId=${o.orderId}&deviceId=${r||o.deviceNo}`}),void console.log("已发起页面跳转")}const s=await e.index.request({url:`${n.URL||"http://127.0.0.1:8080"}/app/order/unpaid`,method:"GET",header:{Authorization:"Bearer "+e.index.getStorageSync("token"),Clientid:e.index.getStorageSync("client_id")}});if(console.log("待支付订单检查结果:",JSON.stringify(s)),200==s.statusCode&&200==s.data.code&&s.data.data){const o=s.data.data;console.log("检测到待支付订单,准备跳转:",o),e.index.navigateTo({url:`/pages/order/payment?orderId=${o.orderId}`})}else{console.log("无待支付订单,获取设备信息, deviceNo:",r);try{const o=await t.getDeviceInfo(r);if(200==o.code&&o.data&&o.data.device){const n=o.data.device;if(n.feeConfig){console.log("获取到设备feeConfig信息:",n.feeConfig);try{JSON.parse(n.feeConfig);e.index.navigateTo({url:`/pages/device/detail?deviceNo=${r}&feeConfig=${encodeURIComponent(n.feeConfig)}`})}catch(i){console.error("解析feeConfig失败:",i),e.index.navigateTo({url:`/pages/device/detail?deviceNo=${r}`})}}else e.index.navigateTo({url:`/pages/device/detail?deviceNo=${r}`})}else console.error("获取设备信息失败:",o.msg||"未知错误"),e.index.showToast({title:"获取设备信息失败",icon:"none"}),e.index.navigateTo({url:`/pages/device/detail?deviceNo=${r}`})}catch(a){console.error("获取设备信息异常:",a),e.index.showToast({title:"获取设备信息失败",icon:"none"}),e.index.navigateTo({url:`/pages/device/detail?deviceNo=${r}`})}}}catch(a){console.error("扫码处理失败:",a),e.index.showToast({title:"扫码失败",icon:"none"})}}}};const d=e._export_sfc(a,[["render",function(o,n,t,a,d,r){return{a:i._imports_0,b:i._imports_1,c:e.o(((...e)=>r.handleScan&&r.handleScan(...e)))}}],["__scopeId","data-v-deeaf54a"]]);wx.createPage(d);
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
<view class="container data-v-8df762f3"><view class="banner data-v-8df762f3"><view class="temp-banner data-v-8df762f3"><text class="banner-text data-v-8df762f3">共享风扇</text><text class="banner-subtitle data-v-8df762f3">让清凉随身携带</text><view class="banner-bg data-v-8df762f3"></view></view></view><view class="scan-area data-v-8df762f3"><view class="scan-btn data-v-8df762f3" bindtap="{{b}}"><view class="btn-content data-v-8df762f3"><image class="btn-icon data-v-8df762f3" src="{{a}}" mode="aspectFit"/><text class="btn-text data-v-8df762f3">扫一扫</text></view><text class="btn-desc data-v-8df762f3">扫描设备二维码使用或归还</text></view></view><view class="tips-section data-v-8df762f3"><view class="tips-header data-v-8df762f3"><view class="tips-title data-v-8df762f3">使用小贴士</view></view><view class="tips-list data-v-8df762f3"><view class="tip-item data-v-8df762f3"><view class="tip-dot data-v-8df762f3"></view><text class="data-v-8df762f3">租借时间:每次最长可租借12小时</text></view><view class="tip-item data-v-8df762f3"><view class="tip-dot data-v-8df762f3"></view><text class="data-v-8df762f3">押金说明:租借需支付99元押金,归还后自动退还</text></view><view class="tip-item data-v-8df762f3"><view class="tip-dot data-v-8df762f3"></view><text class="data-v-8df762f3">收费标准:2元/小时,不足1小时按1小时计算</text></view><view class="tip-item data-v-8df762f3"><view class="tip-dot data-v-8df762f3"></view><text class="data-v-8df762f3">爱护提示:请勿将设备带离指定区域,保持设备清洁</text></view></view></view></view>
|
||||
<view class="container data-v-deeaf54a"><view class="header data-v-deeaf54a"><view class="header-bg data-v-deeaf54a"><view class="circle-decoration circle-1 data-v-deeaf54a"></view><view class="circle-decoration circle-2 data-v-deeaf54a"></view><view class="wave-decoration data-v-deeaf54a"></view></view><view class="header-content data-v-deeaf54a"><view class="brand-area data-v-deeaf54a"><image class="brand-logo data-v-deeaf54a" src="{{a}}" mode="aspectFit"></image><view class="brand-text data-v-deeaf54a"><text class="title data-v-deeaf54a">共享风扇</text><text class="subtitle data-v-deeaf54a">随时随地,享受清凉</text></view></view><view class="header-info data-v-deeaf54a"><view class="service-tag data-v-deeaf54a"><text class="data-v-deeaf54a">便捷租赁</text><text class="dot data-v-deeaf54a">·</text><text class="data-v-deeaf54a">品质保障</text></view></view></view></view><view class="scan-section data-v-deeaf54a"><view class="scan-card data-v-deeaf54a"><view class="scan-btn data-v-deeaf54a" bindtap="{{c}}"><image class="scan-icon data-v-deeaf54a" src="{{b}}" mode="aspectFit"/><text class="scan-text data-v-deeaf54a">扫码使用</text></view><view class="scan-desc data-v-deeaf54a"><text class="data-v-deeaf54a">扫描设备二维码即可使用或归还</text></view></view></view><view class="price-card data-v-deeaf54a"><view class="card-header data-v-deeaf54a"><text class="card-title data-v-deeaf54a">收费规则</text></view><view class="price-rules data-v-deeaf54a"><view class="price-item data-v-deeaf54a"><view class="price-tag data-v-deeaf54a">5.0<text class="unit data-v-deeaf54a">元/小时</text></view></view><view class="divider data-v-deeaf54a"></view><view class="rule-list data-v-deeaf54a"><view class="rule-item data-v-deeaf54a"><view class="rule-dot data-v-deeaf54a"></view><text class="data-v-deeaf54a">15分钟内归还免费</text></view><view class="rule-item data-v-deeaf54a"><view class="rule-dot data-v-deeaf54a"></view><text class="data-v-deeaf54a">不足1小时按1小时计费</text></view><view class="rule-item data-v-deeaf54a"><view class="rule-dot data-v-deeaf54a"></view><text class="data-v-deeaf54a">封顶99元,计费达99元视为买断</text></view></view></view></view><view class="usage-steps data-v-deeaf54a"><view class="steps-header data-v-deeaf54a"><text class="steps-title data-v-deeaf54a">使用流程</text></view><view class="steps-container data-v-deeaf54a"><view class="step-item data-v-deeaf54a"><view class="step-icon data-v-deeaf54a"><text class="step-number data-v-deeaf54a">1</text></view><text class="step-text data-v-deeaf54a">扫码开锁</text></view><view class="step-arrow data-v-deeaf54a"></view><view class="step-item data-v-deeaf54a"><view class="step-icon data-v-deeaf54a"><text class="step-number data-v-deeaf54a">2</text></view><text class="step-text data-v-deeaf54a">使用风扇</text></view><view class="step-arrow data-v-deeaf54a"></view><view class="step-item data-v-deeaf54a"><view class="step-icon data-v-deeaf54a"><text class="step-number data-v-deeaf54a">3</text></view><text class="step-text data-v-deeaf54a">归还结算</text></view></view></view></view>
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js"),o=require("../../util/index.js"),t=require("../../common/assets.js"),n={data:()=>({userInfo:{},deposit:"0.00",tempAvatar:"",tempNickname:"",show:!1}),onShow(){this.getInfo()},methods:{async getInfo(){try{if(!e.index.getStorageSync("token"))return await o.wxLogin(),void this.getInfo();const t=await o.getUserInfo();if(console.log(t),200===t.code){const o={nickName:t.data.nickname,phone:t.data.phone,avatar:t.data.iconUrl,isAdmin:t.data.isAdmin};this.userInfo=o,e.index.setStorageSync("userInfo",o),this.deposit=t.data.balanceAmount||"0.00"}}catch(t){console.error("获取用户信息失败:",t),e.index.showToast({title:"获取用户信息失败",icon:"none"})}},navigateTo(o){e.index.navigateTo({url:o})}}};const a=e._export_sfc(n,[["render",function(o,n,a,s,i,r){return e.e({a:i.userInfo.avatar||"/static/user.png",b:i.userInfo},i.userInfo?{c:e.t(i.userInfo.nickName),d:e.t(i.userInfo.phone||"")}:{},{e:e.o(((...e)=>o.showPopup&&o.showPopup(...e))),f:e.t(i.deposit),g:e.o((e=>r.navigateTo("/pages/deposit/index"))),h:t._imports_0$1,i:e.o((e=>r.navigateTo("/pages/order/index"))),j:t._imports_1,k:e.o((e=>r.navigateTo("/pages/feedback/index"))),l:t._imports_2,m:e.o((e=>r.navigateTo("/pages/help/index")))})}],["__scopeId","data-v-b106ba06"]]);wx.createPage(a);
|
||||
"use strict";const e=require("../../common/vendor.js"),a=require("../../common/assets.js"),o=require("../../util/index.js");if(!Array){e.resolveComponent("uni-icons")()}const n={__name:"index",setup(n){const t=e.ref({}),i=e.ref("0.00"),r=e.ref(""),s=e.ref(null),d=e.ref(!1);e.onMounted((()=>{c()}));const c=async()=>{try{if(!e.index.getStorageSync("token"))return void(await o.wxLogin());const a=await o.getUserInfo();console.log("User info response:",a),200==a.code&&(a.data.openId&&(r.value=a.data.openId,e.index.setStorageSync("openId",a.data.openId)),t.value={nickName:a.data.nickname,phone:a.data.phone,avatar:a.data.iconUrl,isAdmin:a.data.isAdmin},e.index.setStorageSync("userInfo",t.value),i.value=a.data.balanceAmount||"0.00")}catch(a){console.error("获取用户信息失败:",a),e.index.showToast({title:"获取用户信息失败",icon:"none"})}},l=a=>{e.index.navigateTo({url:a})},p=()=>{l("/pages/deposit/index")},u=()=>{t.value||v()},v=()=>{s.value&&(s.value.open(),d.value=!0)};return(o,n)=>e.e({a:t.value.avatar},t.value.avatar?{b:t.value.avatar}:{c:a._imports_0$1},{d:t.value.isAdmin},(t.value.isAdmin,{}),{e:t.value},t.value?{f:e.t(t.value.nickName),g:e.t(t.value.phone||"未绑定手机号")}:{},{h:e.p({type:"right",size:"16",color:"#999"}),i:e.o(u),j:e.t(i.value),k:e.o(p),l:a._imports_1$1,m:e.p({type:"right",size:"16",color:"#999"}),n:e.o((e=>l("/pages/order/index"))),o:a._imports_2,p:e.p({type:"right",size:"16",color:"#999"}),q:e.o((e=>l("/pages/feedback/index"))),r:a._imports_3,s:e.p({type:"right",size:"16",color:"#999"}),t:e.o((e=>l("/pages/help/index")))})}},t=e._export_sfc(n,[["__scopeId","data-v-ac1cfc8d"]]);wx.createPage(t);
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
<view class="my-container data-v-b106ba06"><view class="user-info data-v-b106ba06"><view class="floating-dots data-v-b106ba06"></view><view class="user-info-content data-v-b106ba06" bindtap="{{e}}"><view class="avatar-wrap data-v-b106ba06"><image class="avatar data-v-b106ba06" src="{{a}}" mode="aspectFill"/></view><view wx:if="{{b}}" class="info-content data-v-b106ba06"><view class="text-group data-v-b106ba06"><text class="nickname data-v-b106ba06">{{c}}</text><text class="phone data-v-b106ba06">{{d}}</text></view></view><view wx:else class="info-content not-login data-v-b106ba06"><text class="login-text data-v-b106ba06">点击登录</text><text class="login-desc data-v-b106ba06">登录后享受更多服务</text></view></view><view class="wave-decoration data-v-b106ba06"></view></view><view class="balance-card data-v-b106ba06"><view class="balance-content data-v-b106ba06"><text class="label data-v-b106ba06">押金余额</text><text class="amount data-v-b106ba06">¥{{f}}</text></view><view class="withdraw-btn data-v-b106ba06" bindtap="{{g}}"> 提现 <view class="arrow data-v-b106ba06"></view></view></view><view class="function-list data-v-b106ba06"><view class="function-item data-v-b106ba06" bindtap="{{i}}"><view class="item-left data-v-b106ba06"><view class="icon-wrap order data-v-b106ba06"><image src="{{h}}" mode="aspectFit" class="icon-image data-v-b106ba06"/></view><text class="title data-v-b106ba06">租借记录</text></view><view class="arrow data-v-b106ba06"></view></view><view class="function-item data-v-b106ba06" bindtap="{{k}}"><view class="item-left data-v-b106ba06"><view class="icon-wrap feedback data-v-b106ba06"><image src="{{j}}" mode="aspectFit" class="icon-image data-v-b106ba06"/></view><text class="title data-v-b106ba06">投诉与建议</text></view><view class="arrow data-v-b106ba06"></view></view><view class="function-item data-v-b106ba06" bindtap="{{m}}"><view class="item-left data-v-b106ba06"><view class="icon-wrap help data-v-b106ba06"><image src="{{l}}" mode="aspectFit" class="icon-image data-v-b106ba06"/></view><text class="title data-v-b106ba06">帮助中心</text></view><view class="arrow data-v-b106ba06"></view></view></view></view>
|
||||
<view class="profile-container data-v-ac1cfc8d"><view class="header-section data-v-ac1cfc8d"><view class="user-profile data-v-ac1cfc8d" bindtap="{{i}}"><view class="avatar-container data-v-ac1cfc8d"><image wx:if="{{a}}" class="avatar data-v-ac1cfc8d" src="{{b}}" mode="aspectFill"></image><image wx:else class="avatar data-v-ac1cfc8d" src="{{c}}" mode="aspectFill"></image><view wx:if="{{d}}" class="avatar-badge data-v-ac1cfc8d"></view></view><view wx:if="{{e}}" class="user-details data-v-ac1cfc8d"><view class="username data-v-ac1cfc8d">{{f}}</view><view class="user-id data-v-ac1cfc8d">{{g}}</view></view><view wx:else class="user-details data-v-ac1cfc8d"><view class="username data-v-ac1cfc8d">点击登录</view><view class="user-id data-v-ac1cfc8d">授权登录后享受更多服务</view></view><view class="edit-profile data-v-ac1cfc8d"><uni-icons wx:if="{{h}}" class="data-v-ac1cfc8d" u-i="ac1cfc8d-0" bind:__l="__l" u-p="{{h}}"></uni-icons></view></view></view><view class="balance-card data-v-ac1cfc8d"><view class="balance-info data-v-ac1cfc8d"><view class="balance-label data-v-ac1cfc8d">押金余额</view><view class="balance-amount data-v-ac1cfc8d">¥{{j}}</view></view><view class="action-button data-v-ac1cfc8d" bindtap="{{k}}"><text class="data-v-ac1cfc8d">提现</text></view></view><view class="function-list data-v-ac1cfc8d"><view class="function-item data-v-ac1cfc8d" bindtap="{{n}}"><view class="item-left data-v-ac1cfc8d"><view class="item-icon data-v-ac1cfc8d"><image class="data-v-ac1cfc8d" src="{{l}}" mode="aspectFit"></image></view><text class="item-title data-v-ac1cfc8d">订单中心</text></view><view class="item-right data-v-ac1cfc8d"><uni-icons wx:if="{{m}}" class="data-v-ac1cfc8d" u-i="ac1cfc8d-1" bind:__l="__l" u-p="{{m}}"></uni-icons></view></view><view class="function-item data-v-ac1cfc8d" bindtap="{{q}}"><view class="item-left data-v-ac1cfc8d"><view class="item-icon data-v-ac1cfc8d"><image class="data-v-ac1cfc8d" src="{{o}}" mode="aspectFit"></image></view><text class="item-title data-v-ac1cfc8d">投诉建议</text></view><view class="item-right data-v-ac1cfc8d"><uni-icons wx:if="{{p}}" class="data-v-ac1cfc8d" u-i="ac1cfc8d-2" bind:__l="__l" u-p="{{p}}"></uni-icons></view></view><view class="function-item data-v-ac1cfc8d" bindtap="{{t}}"><view class="item-left data-v-ac1cfc8d"><view class="item-icon data-v-ac1cfc8d"><image class="data-v-ac1cfc8d" src="{{r}}" mode="aspectFit"></image></view><text class="item-title data-v-ac1cfc8d">帮助中心</text></view><view class="item-right data-v-ac1cfc8d"><uni-icons wx:if="{{s}}" class="data-v-ac1cfc8d" u-i="ac1cfc8d-3" bind:__l="__l" u-p="{{s}}"></uni-icons></view></view></view></view>
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
"use strict";const t=require("../../common/vendor.js"),e=require("../../config/user.js"),r=require("../../constants/orderStatus.js"),s={data:()=>({currentTab:0,OrderStatusMap:r.OrderStatusMap,OrderStatusTabs:r.OrderStatusTabs,orderList:[]}),async onLoad(t){if(t&&t.orderId)try{const r=await e.queryById(t.orderId);if(200===r.code&&r.data){const t=r.data;console.log("特定订单数据:",JSON.stringify(t)),console.log("特定订单的开始时间:",t.startTime),console.log("特定订单的创建时间:",t.createTime);const e=t.startTime||t.createTime||"";console.log("特定订单最终显示的开始时间:",e);const s={orderNo:t.orderId,status:t.orderStatus,deviceId:t.deviceNo,startTime:e,endTime:t.endTime||"",amount:t.payAmount||t.actualDeviceAmount||"0.00"};this.orderList=[s,...this.orderList];const o=this.OrderStatusTabs.findIndex((e=>e.status.includes(t.orderStatus)));-1!==o&&this.switchTab(o)}}catch(r){console.error("获取订单详情失败:",r)}await this.getOrderList()},methods:{async getOrderList(r=[]){try{const t=await e.getOrderList(r);200===t.code&&t.data&&t.data.records&&(console.log("API返回的订单列表数据:",JSON.stringify(t.data.records)),this.orderList=t.data.records.map((t=>{console.log(`订单 ${t.orderId} 的开始时间:`,t.startTime),console.log(`订单 ${t.orderId} 的创建时间:`,t.createTime);const e=t.startTime||t.createTime||"";return console.log(`订单 ${t.orderId} 最终显示的开始时间:`,e),{orderNo:t.orderId,status:t.orderStatus,deviceId:t.deviceNo,startTime:e,endTime:t.endTime||"",amount:t.payAmount||t.actualDeviceAmount||"0.00"}})))}catch(s){console.error("获取订单列表失败:",s),t.index.showToast({title:"获取订单列表失败",icon:"none"})}},async switchTab(t){this.currentTab=t;const e=this.OrderStatusTabs[t].status;await this.getOrderList(e)}}};const o=t._export_sfc(s,[["render",function(e,r,s,o,a,d){return t.e({a:t.f(a.OrderStatusTabs,((e,r,s)=>({a:t.t(e.text),b:r,c:a.currentTab===r?1:"",d:t.o((t=>d.switchTab(r)),r)}))),b:t.f(a.orderList,((e,r,s)=>{var o,d;return t.e({a:t.t(e.orderNo),b:t.t(null==(o=a.OrderStatusMap[e.status])?void 0:o.text),c:t.n(null==(d=a.OrderStatusMap[e.status])?void 0:d.class),d:1===e.status},1===e.status?{e:`/pages/return/index?deviceId=${e.deviceId}&orderId=${e.orderNo}`}:{},{f:t.t(e.deviceId),g:t.t(e.startTime),h:t.t(e.endTime||"-"),i:t.t(e.amount),j:r})})),c:0===a.orderList.length},(a.orderList.length,{}))}],["__scopeId","data-v-d5ec5c8e"]]);wx.createPage(o);
|
||||
"use strict";const t=require("../../common/vendor.js"),e=require("../../common/assets.js"),a=require("../../config/user.js"),s={__name:"index",setup(s){const r=t.ref(0),o=t.ref([]),d=t.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"},canceled:{text:"已取消",class:"status-cancelled"}}),n=t.reactive([{text:"全部",status:[]},{text:"使用中",status:["1","in_used"]},{text:"已完成",status:["2","used_done"]},{text:"已取消",status:["3","canceled"]}]);t.onLoad((async t=>{if(t&&t.orderId)try{const e=await a.queryById(t.orderId);if(200===e.code&&e.data){const t=e.data,a=t.startTime||t.createTime||"",s={orderNo:t.orderId,status:t.orderStatus,deviceId:t.deviceNo,payWay:t.payWay,startTime:a,endTime:t.endTime||"",amount:t.payAmount||t.actualDeviceAmount||"0.00"};o.value=[s,...o.value];const r=n.findIndex((e=>e.status.includes(t.orderStatus)));-1!==r&&c(r)}}catch(e){console.error("获取订单详情失败:",e)}await i()}));const c=async t=>{r.value=t;const e=n[t].status;await i(e)},i=async(e=[])=>{try{const t=await a.getOrderList(e);200===t.code&&t.data&&t.data.records&&(o.value=t.data.records.map((t=>{const e=t.startTime||t.createTime||"";return{orderNo:t.orderNo,orderId:t.orderId,status:t.orderStatus,deviceId:t.deviceNo,payWay:t.payWay,startTime:e,endTime:t.endTime||"",amount:t.payAmount||t.actualDeviceAmount||"0.00"}})))}catch(s){console.error("获取订单列表失败:",s),t.index.showToast({title:"获取订单列表失败",icon:"none"})}};return(s,u)=>t.e({a:t.f(n,((e,a,s)=>({a:t.t(e.text),b:a,c:r.value===a?1:"",d:t.o((t=>c(a)),a)}))),b:0===o.value.length},(o.value.length,{}),{c:t.f(o.value,((s,o,c)=>{var u,l;return t.e({a:t.t(s.orderNo),b:t.t(null==(u=d[s.status])?void 0:u.text),c:t.n(null==(l=d[s.status])?void 0:l.class),d:t.t(s.deviceId),e:"wx_score_pay"==s.payWay},"wx_score_pay"==s.payWay?{f:e._imports_0$2}:{},{g:t.t(s.startTime),h:t.t(s.endTime||"-"),i:t.t(s.amount),j:"in_used"==s.status},"in_used"==s.status?{k:t.o((e=>{return a=s.deviceId,r=s.orderId,console.log(r),void t.index.navigateTo({url:`/pages/return/index?deviceId=${a}&orderId=${r}`});var a,r}),o)}:{},{l:"waiting_for_payment"===s.status},"waiting_for_payment"===s.status?{m:t.o((e=>(async e=>{try{200===(await a.getOrderByOrderNoScorePayStatus(e.orderNo)).code&&(t.index.showToast({title:"状态同步成功",icon:"success"}),await i(n[r.value].status))}catch(s){t.index.showToast({title:"同步状态失败",icon:"none"})}})(s)),o)}:{},{n:o})}))})}},r=t._export_sfc(s,[["__scopeId","data-v-4442a2bb"]]);wx.createPage(r);
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
<view class="order-container data-v-d5ec5c8e"><view class="tab-bar data-v-d5ec5c8e"><view wx:for="{{a}}" wx:for-item="tab" wx:key="b" class="{{['tab-item', 'data-v-d5ec5c8e', tab.c && 'active']}}" bindtap="{{tab.d}}">{{tab.a}}</view></view><view class="order-list data-v-d5ec5c8e"><view wx:for="{{b}}" wx:for-item="order" wx:key="j" class="order-item data-v-d5ec5c8e"><view class="order-header data-v-d5ec5c8e"><text class="order-no data-v-d5ec5c8e">订单号:{{order.a}}</text><text class="{{['order-status', 'data-v-d5ec5c8e', order.c]}}">{{order.b}}</text><navigator wx:if="{{order.d}}" url="{{order.e}}" class="return-btn data-v-d5ec5c8e">归还设备</navigator></view><view class="order-content data-v-d5ec5c8e"><view class="device-info data-v-d5ec5c8e"><text class="device-name data-v-d5ec5c8e">共享风扇</text><text class="device-id data-v-d5ec5c8e">设备号:{{order.f}}</text></view><view class="time-info data-v-d5ec5c8e"><view class="time-item data-v-d5ec5c8e"><text class="label data-v-d5ec5c8e">开始时间:</text><text class="value data-v-d5ec5c8e">{{order.g}}</text></view><view class="time-item data-v-d5ec5c8e"><text class="label data-v-d5ec5c8e">结束时间:</text><text class="value data-v-d5ec5c8e">{{order.h}}</text></view></view><view class="price-info data-v-d5ec5c8e"><text class="amount data-v-d5ec5c8e">¥{{order.i}}</text></view></view></view></view><view wx:if="{{c}}" class="empty-tip data-v-d5ec5c8e"><view class="empty-icon data-v-d5ec5c8e"></view><text class="data-v-d5ec5c8e">暂无订单记录</text></view></view>
|
||||
<view class="order-container data-v-4442a2bb"><view class="status-tabs data-v-4442a2bb"><view wx:for="{{a}}" wx:for-item="tab" wx:key="b" class="{{['tab-item', 'data-v-4442a2bb', tab.c && 'active']}}" bindtap="{{tab.d}}">{{tab.a}}</view></view><view class="order-list data-v-4442a2bb"><view wx:if="{{b}}" class="empty-state data-v-4442a2bb"><view class="empty-icon data-v-4442a2bb"></view><text class="empty-text data-v-4442a2bb">暂无订单记录</text></view><view wx:for="{{c}}" wx:for-item="order" wx:key="n" class="order-item data-v-4442a2bb"><view class="order-header data-v-4442a2bb"><view class="order-id data-v-4442a2bb"><text class="data-v-4442a2bb">订单号:{{order.a}}</text></view><view class="{{['order-status', 'data-v-4442a2bb', order.c]}}">{{order.b}}</view></view><view class="order-body data-v-4442a2bb"><view class="device-info data-v-4442a2bb"><view class="device-left data-v-4442a2bb"><view class="device-name data-v-4442a2bb">共享风扇</view><view class="device-id data-v-4442a2bb">设备号:{{order.d}}</view></view><view class="device-right data-v-4442a2bb"><view wx:if="{{order.e}}" class="payment-badge wx-score data-v-4442a2bb"><image src="{{order.f}}" mode="aspectFit" class="badge-icon data-v-4442a2bb"></image><view class="badge-text data-v-4442a2bb"><text class="data-v-4442a2bb">微信支付分</text><text class="divider data-v-4442a2bb">|</text><text class="highlight data-v-4442a2bb">免押租借</text></view></view><view wx:else class="payment-badge deposit data-v-4442a2bb"><text class="badge-text data-v-4442a2bb">押金租借</text></view></view></view><view class="order-times data-v-4442a2bb"><view class="time-row data-v-4442a2bb"><text class="time-label data-v-4442a2bb">开始时间:</text><text class="time-value data-v-4442a2bb">{{order.g}}</text></view><view class="time-row data-v-4442a2bb"><text class="time-label data-v-4442a2bb">结束时间:</text><text class="time-value data-v-4442a2bb">{{order.h}}</text></view></view></view><view class="order-footer data-v-4442a2bb"><view class="price data-v-4442a2bb">¥{{order.i}}</view><view class="actions data-v-4442a2bb"><view wx:if="{{order.j}}" class="action-item primary data-v-4442a2bb" bindtap="{{order.k}}"> 归还设备 </view><view wx:if="{{order.l}}" class="action-item secondary data-v-4442a2bb" bindtap="{{order.m}}"> 同步订单状态 </view></view></view></view></view></view>
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
<view class="payment-container data-v-a18b4e4b"><view class="status-card data-v-a18b4e4b"><view class="{{['status-icon', 'data-v-a18b4e4b', a]}}"></view><view class="status-text data-v-a18b4e4b">{{b}}</view><view class="status-desc data-v-a18b4e4b">{{c}}</view></view><view class="order-card data-v-a18b4e4b"><view class="card-title data-v-a18b4e4b">订单信息</view><view class="info-item data-v-a18b4e4b"><text class="label data-v-a18b4e4b">订单号</text><text class="value data-v-a18b4e4b">{{d}}</text></view><view class="info-item data-v-a18b4e4b"><text class="label data-v-a18b4e4b">设备号</text><text class="value data-v-a18b4e4b">{{e}}</text></view><view class="info-item data-v-a18b4e4b"><text class="label data-v-a18b4e4b">创建时间</text><text class="value data-v-a18b4e4b">{{f}}</text></view><view class="info-item data-v-a18b4e4b"><text class="label data-v-a18b4e4b">联系电话</text><text class="value data-v-a18b4e4b">{{g}}</text></view></view><view class="price-card data-v-a18b4e4b"><view class="card-title data-v-a18b4e4b">费用信息</view><view class="price-item data-v-a18b4e4b"><text class="label data-v-a18b4e4b">押金</text><text class="value data-v-a18b4e4b">¥{{h}}</text></view><view class="price-item data-v-a18b4e4b"><text class="label data-v-a18b4e4b">套餐</text><text class="value data-v-a18b4e4b">{{i}} (¥{{j}})</text></view><view class="price-item data-v-a18b4e4b"><text class="label data-v-a18b4e4b">租借费用</text><text class="value data-v-a18b4e4b">¥{{k}}</text></view><view class="price-item total data-v-a18b4e4b"><text class="label data-v-a18b4e4b">合计</text><text class="value data-v-a18b4e4b">¥{{l}}</text></view></view><view class="payment-methods data-v-a18b4e4b"><view class="card-title data-v-a18b4e4b">支付方式</view><view wx:for="{{m}}" wx:for-item="method" wx:key="c" class="{{['method-item', 'data-v-a18b4e4b', method.d && 'active']}}" bindtap="{{method.e}}"><view class="{{['method-icon', 'data-v-a18b4e4b', method.a]}}"></view><view class="method-name data-v-a18b4e4b">{{method.b}}</view><view class="method-check data-v-a18b4e4b"></view></view></view><view class="bottom-bar data-v-a18b4e4b"><view class="total-amount data-v-a18b4e4b"><text class="data-v-a18b4e4b">合计:</text><text class="amount data-v-a18b4e4b">¥{{n}}</text></view><button class="pay-btn data-v-a18b4e4b" bindtap="{{o}}">立即支付</button></view></view>
|
||||
<view class="payment-container data-v-5c44f5c0"><view class="status-card data-v-5c44f5c0"><view class="{{['status-icon', 'data-v-5c44f5c0', a]}}"></view><view class="status-text data-v-5c44f5c0">{{b}}</view><view class="status-desc data-v-5c44f5c0">{{c}}</view></view><view class="order-card data-v-5c44f5c0"><view class="card-title data-v-5c44f5c0">订单信息</view><view class="info-item data-v-5c44f5c0"><text class="label data-v-5c44f5c0">订单号</text><text class="value data-v-5c44f5c0">{{d}}</text></view><view class="info-item data-v-5c44f5c0"><text class="label data-v-5c44f5c0">设备号</text><text class="value data-v-5c44f5c0">{{e}}</text></view><view class="info-item data-v-5c44f5c0"><text class="label data-v-5c44f5c0">创建时间</text><text class="value data-v-5c44f5c0">{{f}}</text></view><view class="info-item data-v-5c44f5c0"><text class="label data-v-5c44f5c0">联系电话</text><text class="value data-v-5c44f5c0">{{g}}</text></view></view><view class="price-card data-v-5c44f5c0"><view class="card-title data-v-5c44f5c0">费用信息</view><view class="price-item data-v-5c44f5c0"><text class="label data-v-5c44f5c0">押金</text><text class="value data-v-5c44f5c0">¥{{h}}</text></view><view class="price-item data-v-5c44f5c0"><text class="label data-v-5c44f5c0">套餐</text><text class="value data-v-5c44f5c0">{{i}}元/{{j}}小时</text></view><view class="price-item total data-v-5c44f5c0"><text class="label data-v-5c44f5c0">合计</text><text class="value data-v-5c44f5c0">¥{{k}}</text></view></view><view class="bottom-bar data-v-5c44f5c0"><view class="total-amount data-v-5c44f5c0"><text class="data-v-5c44f5c0">合计:</text><text class="amount data-v-5c44f5c0">¥{{l}}</text></view><button class="pay-btn data-v-5c44f5c0" bindtap="{{m}}">立即支付</button></view></view>
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js"),t=require("../../config/user.js"),r=require("../../config/url.js"),o={data:()=>({orderId:"",orderInfo:{orderNo:"",deviceNo:"",usedTime:"",currentFee:"0.00",deposit:"99.00",refundAmount:"99.00",endTime:"",withdrawStatus:"waiting",isWithdrawn:!1}}),onLoad(t){t&&t.orderId?(this.orderId=t.orderId,this.loadOrderInfo()):(e.index.showToast({title:"订单ID不能为空",icon:"none"}),setTimeout((()=>{this.goToHome()}),1500))},methods:{getWithdrawStatusText(){return{waiting:"待申请",processing:"处理中",success:"已退款",failed:"退款失败"}[this.orderInfo.withdrawStatus]||"待申请"},async loadOrderInfo(){try{e.index.showLoading({title:"加载中"});const o=await t.queryById(this.orderId);if(200!==o.code||!o.data)throw new Error(o.msg||"获取订单信息失败");{const e=o.data;let t=60,d=0,n=0,i="0.00",a="0.00";if(e.remark)try{const r=e.remark,o=r.match(/使用时长:(\d+)分钟/);o&&o[1]&&(n=parseInt(o[1]));const s=r.match(/套餐时长:(\d+)分钟/);s&&s[1]&&(t=parseInt(s[1]));const c=r.match(/超出时长:(\d+)分钟/);c&&c[1]&&(d=parseInt(c[1]));const h=r.match(/套餐费用:([\d.]+)元/);h&&h[1]&&(i=h[1]);const u=r.match(/超时费用:([\d.]+)元/);u&&u[1]&&(a=u[1]),console.log("从remark解析到的信息:",{usedMinutes:n,packageMinutes:t,extraMinutes:d,packagePrice:i,extraFee:a})}catch(r){console.error("解析remark字段失败:",r)}this.orderInfo={orderNo:e.orderNo||"",deviceNo:e.deviceNo||"",usedTime:n+"分钟",packageTime:t+"分钟",extraTime:d+"分钟",packagePrice:i,extraFee:a,currentFee:e.actualDeviceAmount||"0.00",deposit:e.depositAmount||"99.00",refundAmount:e.residueAmount||"99.00",endTime:e.endTime||"",withdrawStatus:e.withdrawStatus||"waiting",isWithdrawn:"success"===e.withdrawStatus}}}catch(o){console.error("加载订单信息错误:",o),e.index.showToast({title:o.message||"获取订单信息失败",icon:"none"})}finally{e.index.hideLoading()}},async handleWithdraw(){try{e.index.showLoading({title:"处理中"});const t=await e.index.request({url:`${r.URL||"http://127.0.0.1:8080"}/app/withdraw/add/${this.orderInfo.orderNo}`,method:"GET",header:{"Content-Type":"application/json",Authorization:"Bearer "+e.index.getStorageSync("token"),Clientid:e.index.getStorageSync("client_id")}});if(200!==t.statusCode||200!==t.data.code)throw new Error(t.data.msg||"退款申请失败");e.index.showToast({title:"退款申请成功",icon:"success"}),this.orderInfo.withdrawStatus="processing",this.orderInfo.isWithdrawn=!0,setTimeout((()=>{this.loadOrderInfo()}),1500)}catch(t){console.error("退款申请错误:",t),e.index.showToast({title:t.message||"退款申请失败",icon:"none"})}finally{e.index.hideLoading()}},goToHome(){e.index.reLaunch({url:"/pages/index/index"})}}};const d=e._export_sfc(o,[["render",function(t,r,o,d,n,i){return e.e({a:e.t(n.orderInfo.orderNo||"-"),b:e.t(n.orderInfo.deviceNo||"-"),c:e.t(n.orderInfo.usedTime||"-"),d:e.t(n.orderInfo.packageTime||"1小时"),e:e.t(n.orderInfo.extraTime||"0分钟"),f:e.t(n.orderInfo.endTime||"-"),g:e.t(n.orderInfo.packagePrice||"0.00"),h:e.t(n.orderInfo.extraFee||"0.00"),i:e.t(n.orderInfo.currentFee||"0.00"),j:e.t(n.orderInfo.deposit||"99.00"),k:e.t(n.orderInfo.refundAmount||"99.00"),l:e.t(i.getWithdrawStatusText()),m:e.n(n.orderInfo.withdrawStatus||"waiting"),n:!n.orderInfo.isWithdrawn},n.orderInfo.isWithdrawn?{}:{o:e.o(((...e)=>i.handleWithdraw&&i.handleWithdraw(...e)))},{p:e.o(((...e)=>i.goToHome&&i.goToHome(...e)))})}],["__scopeId","data-v-845b5869"]]);wx.createPage(d);
|
||||
"use strict";const e=require("../../common/vendor.js"),t=require("../../config/user.js"),r=require("../../config/url.js"),o={data:()=>({orderId:"",orderInfo:{orderNo:"",deviceNo:"",usedTime:"",currentFee:"0.00",deposit:"99.00",refundAmount:"99.00",endTime:"",withdrawStatus:"waiting",isWithdrawn:!1}}),onLoad(t){t&&t.orderId?(this.orderId=t.orderId,this.loadOrderInfo()):(e.index.showToast({title:"订单ID不能为空",icon:"none"}),setTimeout((()=>{this.goToHome()}),1500))},methods:{getWithdrawStatusText(){return{waiting:"待申请",processing:"处理中",success:"已退款",failed:"退款失败"}[this.orderInfo.withdrawStatus]||"待申请"},async loadOrderInfo(){try{e.index.showLoading({title:"加载中"});const o=await t.queryById(this.orderId);if(200!==o.code||!o.data)throw new Error(o.msg||"获取订单信息失败");{const e=o.data;let t=60,n=0,d=0,i="0.00",a="0.00";if(e.remark)try{const r=e.remark,o=r.match(/使用时长:(\d+)分钟/);o&&o[1]&&(d=parseInt(o[1]));const s=r.match(/套餐时长:(\d+)分钟/);s&&s[1]&&(t=parseInt(s[1]));const c=r.match(/超出时长:(\d+)分钟/);c&&c[1]&&(n=parseInt(c[1]));const h=r.match(/套餐费用:([\d.]+)元/);h&&h[1]&&(i=h[1]);const u=r.match(/超时费用:([\d.]+)元/);u&&u[1]&&(a=u[1]),console.log("从remark解析到的信息:",{usedMinutes:d,packageMinutes:t,extraMinutes:n,packagePrice:i,extraFee:a})}catch(r){console.error("解析remark字段失败:",r)}this.orderInfo={orderNo:e.orderNo||"",deviceNo:e.deviceNo||"",usedTime:d+"分钟",packageTime:t+"分钟",extraTime:n+"分钟",packagePrice:i,extraFee:a,currentFee:e.actualDeviceAmount||"0.00",deposit:e.depositAmount||"99.00",refundAmount:e.residueAmount||"99.00",endTime:e.endTime||"",withdrawStatus:e.withdrawStatus||"waiting",isWithdrawn:"success"===e.withdrawStatus}}}catch(o){console.error("加载订单信息错误:",o),e.index.showToast({title:o.message||"获取订单信息失败",icon:"none"})}finally{e.index.hideLoading()}},async handleWithdraw(){try{e.index.showLoading({title:"处理中"});const t=await e.index.request({url:`${r.URL||"http://127.0.0.1:8080"}/app/withdraw/add/${this.orderInfo.orderNo}`,method:"GET",header:{"Content-Type":"application/json",Authorization:"Bearer "+e.index.getStorageSync("token"),Clientid:e.index.getStorageSync("client_id")}});if(200!==t.statusCode||200!==t.data.code)throw new Error(t.data.msg||"退款申请失败");e.index.showToast({title:"退款申请成功",icon:"success"}),this.orderInfo.withdrawStatus="processing",this.orderInfo.isWithdrawn=!0,setTimeout((()=>{this.loadOrderInfo()}),1500)}catch(t){console.error("退款申请错误:",t),e.index.showToast({title:t.message||"退款申请失败",icon:"none"})}finally{e.index.hideLoading()}},goToHome(){e.index.reLaunch({url:"/pages/index/index"})}}};const n=e._export_sfc(o,[["render",function(t,r,o,n,d,i){return e.e({a:e.t(d.orderInfo.orderNo||"-"),b:e.t(d.orderInfo.deviceNo||"-"),c:e.t(d.orderInfo.usedTime||"-"),d:e.t(d.orderInfo.packageTime||"1小时"),e:e.t(d.orderInfo.extraTime||"0分钟"),f:e.t(d.orderInfo.endTime||"-"),g:e.t(d.orderInfo.packagePrice||"0.00"),h:e.t(d.orderInfo.extraFee||"0.00"),i:e.t(d.orderInfo.currentFee||"0.00"),j:e.t(d.orderInfo.deposit||"99.00"),k:e.t(d.orderInfo.refundAmount||"99.00"),l:e.t(i.getWithdrawStatusText()),m:e.n(d.orderInfo.withdrawStatus||"waiting"),n:!d.orderInfo.isWithdrawn&&d.orderInfo.refundAmount>0},!d.orderInfo.isWithdrawn&&d.orderInfo.refundAmount>0?{o:e.o(((...e)=>i.handleWithdraw&&i.handleWithdraw(...e)))}:{},{p:e.o(((...e)=>i.goToHome&&i.goToHome(...e)))})}],["__scopeId","data-v-42c00aae"]]);wx.createPage(n);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="success-container data-v-845b5869"><view class="status-card data-v-845b5869"><view class="status-icon success data-v-845b5869"></view><view class="status-text data-v-845b5869">归还成功</view><view class="status-desc data-v-845b5869">您的充电宝已归还,费用已从押金中扣除</view></view><view class="order-card data-v-845b5869"><view class="card-title data-v-845b5869">订单信息</view><view class="info-item data-v-845b5869"><text class="label data-v-845b5869">订单号</text><text class="value data-v-845b5869">{{a}}</text></view><view class="info-item data-v-845b5869"><text class="label data-v-845b5869">设备号</text><text class="value data-v-845b5869">{{b}}</text></view><view class="info-item data-v-845b5869"><text class="label data-v-845b5869">使用时长</text><text class="value data-v-845b5869">{{c}}</text></view><view class="info-item data-v-845b5869"><text class="label data-v-845b5869">套餐时长</text><text class="value data-v-845b5869">{{d}}</text></view><view class="info-item data-v-845b5869"><text class="label data-v-845b5869">超出时长</text><text class="value data-v-845b5869">{{e}}</text></view><view class="info-item data-v-845b5869"><text class="label data-v-845b5869">归还时间</text><text class="value data-v-845b5869">{{f}}</text></view></view><view class="refund-card data-v-845b5869"><view class="card-title data-v-845b5869">费用信息</view><view class="info-item data-v-845b5869"><text class="label data-v-845b5869">套餐费用</text><text class="value data-v-845b5869">¥{{g}}</text></view><view class="info-item data-v-845b5869"><text class="label data-v-845b5869">超时费用</text><text class="value data-v-845b5869">¥{{h}}</text></view><view class="info-item data-v-845b5869"><text class="label data-v-845b5869">总费用</text><text class="value data-v-845b5869">¥{{i}}</text></view><view class="info-item data-v-845b5869"><text class="label data-v-845b5869">押金</text><text class="value data-v-845b5869">¥{{j}}</text></view><view class="info-item data-v-845b5869"><text class="label data-v-845b5869">退还金额</text><text class="value highlight data-v-845b5869">¥{{k}}</text></view><view class="info-item data-v-845b5869"><text class="label data-v-845b5869">退还状态</text><text class="{{['value', 'data-v-845b5869', m]}}">{{l}}</text></view></view><view class="notice-card data-v-845b5869"><view class="card-title data-v-845b5869">退款说明</view><view class="notice-content data-v-845b5869"><text class="data-v-845b5869">1. 押金剩余金额需要您手动申请提现</text><text class="data-v-845b5869">2. 提现申请提交后将在1-3个工作日内退还到原支付账户</text><text class="data-v-845b5869">3. 如有疑问,请联系客服</text></view></view><view class="button-group data-v-845b5869"><button wx:if="{{n}}" class="primary-btn data-v-845b5869" bindtap="{{o}}">申请退款</button><button class="primary-btn data-v-845b5869" bindtap="{{p}}">返回首页</button></view></view>
|
||||
<view class="success-container data-v-42c00aae"><view class="status-card data-v-42c00aae"><view class="status-icon success data-v-42c00aae"></view><view class="status-text data-v-42c00aae">归还成功</view><view class="status-desc data-v-42c00aae">您的充电宝已归还,费用已从押金中扣除</view></view><view class="order-card data-v-42c00aae"><view class="card-title data-v-42c00aae">订单信息</view><view class="info-item data-v-42c00aae"><text class="label data-v-42c00aae">订单号</text><text class="value data-v-42c00aae">{{a}}</text></view><view class="info-item data-v-42c00aae"><text class="label data-v-42c00aae">设备号</text><text class="value data-v-42c00aae">{{b}}</text></view><view class="info-item data-v-42c00aae"><text class="label data-v-42c00aae">使用时长</text><text class="value data-v-42c00aae">{{c}}</text></view><view class="info-item data-v-42c00aae"><text class="label data-v-42c00aae">套餐时长</text><text class="value data-v-42c00aae">{{d}}</text></view><view class="info-item data-v-42c00aae"><text class="label data-v-42c00aae">超出时长</text><text class="value data-v-42c00aae">{{e}}</text></view><view class="info-item data-v-42c00aae"><text class="label data-v-42c00aae">归还时间</text><text class="value data-v-42c00aae">{{f}}</text></view></view><view class="refund-card data-v-42c00aae"><view class="card-title data-v-42c00aae">费用信息</view><view class="info-item data-v-42c00aae"><text class="label data-v-42c00aae">套餐费用</text><text class="value data-v-42c00aae">¥{{g}}</text></view><view class="info-item data-v-42c00aae"><text class="label data-v-42c00aae">超时费用</text><text class="value data-v-42c00aae">¥{{h}}</text></view><view class="info-item data-v-42c00aae"><text class="label data-v-42c00aae">总费用</text><text class="value data-v-42c00aae">¥{{i}}</text></view><view class="info-item data-v-42c00aae"><text class="label data-v-42c00aae">押金</text><text class="value data-v-42c00aae">¥{{j}}</text></view><view class="info-item data-v-42c00aae"><text class="label data-v-42c00aae">退还金额</text><text class="value highlight data-v-42c00aae">¥{{k}}</text></view><view class="info-item data-v-42c00aae"><text class="label data-v-42c00aae">退还状态</text><text class="{{['value', 'data-v-42c00aae', m]}}">{{l}}</text></view></view><view class="notice-card data-v-42c00aae"><view class="card-title data-v-42c00aae">退款说明</view><view class="notice-content data-v-42c00aae"><text class="data-v-42c00aae">1. 押金剩余金额需要您手动申请提现</text><text class="data-v-42c00aae">2. 提现申请提交后将在1-3个工作日内退还到原支付账户</text><text class="data-v-42c00aae">3. 如有疑问,请联系客服</text></view></view><view class="button-group data-v-42c00aae"><button wx:if="{{n}}" class="primary-btn data-v-42c00aae" bindtap="{{o}}">申请退款</button><button class="primary-btn data-v-42c00aae" bindtap="{{p}}">返回首页</button></view></view>
|
||||
@@ -1 +1 @@
|
||||
.success-container.data-v-845b5869{padding:20px;background-color:#f8f8f8;min-height:100vh}.status-card.data-v-845b5869{background-color:#fff;border-radius:12px;padding:30px;text-align:center;margin-bottom:20px;box-shadow:0 2px 8px rgba(0,0,0,.04)}.status-card .status-icon.data-v-845b5869{width:60px;height:60px;margin:0 auto 16px}.status-card .status-icon.success.data-v-845b5869{background-color:#07c160;border-radius:50%;position:relative}.status-card .status-icon.success.data-v-845b5869:after{content:"";position:absolute;left:50%;top:50%;width:30px;height:20px;border:3px solid #fff;border-top:none;border-right:none;transform-origin:center;transform:translate(-50%,-70%) rotate(-45deg)}.status-card .status-text.data-v-845b5869{font-size:24px;font-weight:700;color:#07c160;margin-bottom:8px}.status-card .status-desc.data-v-845b5869{font-size:14px;color:#666}.order-card.data-v-845b5869,.refund-card.data-v-845b5869{background-color:#fff;border-radius:12px;padding:20px;margin-bottom:20px;box-shadow:0 2px 8px rgba(0,0,0,.04)}.order-card .card-title.data-v-845b5869,.refund-card .card-title.data-v-845b5869{font-size:16px;font-weight:700;margin-bottom:16px;color:#333;border-bottom:1px solid #f0f0f0;padding-bottom:10px}.order-card .info-item.data-v-845b5869,.refund-card .info-item.data-v-845b5869{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.order-card .info-item.data-v-845b5869:last-child,.refund-card .info-item.data-v-845b5869:last-child{margin-bottom:0}.order-card .info-item .label.data-v-845b5869,.refund-card .info-item .label.data-v-845b5869{color:#666;font-size:14px}.order-card .info-item .value.data-v-845b5869,.refund-card .info-item .value.data-v-845b5869{color:#333;font-size:14px}.order-card .info-item .value.highlight.data-v-845b5869,.refund-card .info-item .value.highlight.data-v-845b5869{color:#ff6b00;font-weight:700;font-size:16px}.order-card .info-item .value.success.data-v-845b5869,.refund-card .info-item .value.success.data-v-845b5869{color:#07c160}.button-group.data-v-845b5869{margin-top:40rpx;display:flex;justify-content:space-between;gap:20rpx}.button-group .primary-btn.data-v-845b5869,.button-group .secondary-btn.data-v-845b5869{flex:1;height:88rpx;line-height:88rpx;border-radius:44rpx;text-align:center;font-size:32rpx}.button-group .primary-btn.data-v-845b5869{background:#07c160;color:#fff}.button-group .primary-btn.data-v-845b5869:active{opacity:.8}.button-group .secondary-btn.data-v-845b5869{background:#f0f0f0;color:#333}.button-group .secondary-btn.data-v-845b5869:active{opacity:.8}.notice-card.data-v-845b5869{background-color:#fff;border-radius:12px;padding:20px;margin-bottom:20px;box-shadow:0 2px 8px rgba(0,0,0,.04)}.notice-card .card-title.data-v-845b5869{font-size:16px;font-weight:700;margin-bottom:16px;color:#333;border-bottom:1px solid #f0f0f0;padding-bottom:10px}.notice-card .notice-content.data-v-845b5869{text-align:left;color:#666;font-size:14px}.waiting.data-v-845b5869{color:#fa0;font-weight:700}
|
||||
.success-container.data-v-42c00aae{padding:20px;background-color:#f8f8f8;min-height:100vh}.status-card.data-v-42c00aae{background-color:#fff;border-radius:12px;padding:30px;text-align:center;margin-bottom:20px;box-shadow:0 2px 8px rgba(0,0,0,.04)}.status-card .status-icon.data-v-42c00aae{width:60px;height:60px;margin:0 auto 16px}.status-card .status-icon.success.data-v-42c00aae{background-color:#07c160;border-radius:50%;position:relative}.status-card .status-icon.success.data-v-42c00aae:after{content:"";position:absolute;left:50%;top:50%;width:30px;height:20px;border:3px solid #fff;border-top:none;border-right:none;transform-origin:center;transform:translate(-50%,-70%) rotate(-45deg)}.status-card .status-text.data-v-42c00aae{font-size:24px;font-weight:700;color:#07c160;margin-bottom:8px}.status-card .status-desc.data-v-42c00aae{font-size:14px;color:#666}.order-card.data-v-42c00aae,.refund-card.data-v-42c00aae{background-color:#fff;border-radius:12px;padding:20px;margin-bottom:20px;box-shadow:0 2px 8px rgba(0,0,0,.04)}.order-card .card-title.data-v-42c00aae,.refund-card .card-title.data-v-42c00aae{font-size:16px;font-weight:700;margin-bottom:16px;color:#333;border-bottom:1px solid #f0f0f0;padding-bottom:10px}.order-card .info-item.data-v-42c00aae,.refund-card .info-item.data-v-42c00aae{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.order-card .info-item.data-v-42c00aae:last-child,.refund-card .info-item.data-v-42c00aae:last-child{margin-bottom:0}.order-card .info-item .label.data-v-42c00aae,.refund-card .info-item .label.data-v-42c00aae{color:#666;font-size:14px}.order-card .info-item .value.data-v-42c00aae,.refund-card .info-item .value.data-v-42c00aae{color:#333;font-size:14px}.order-card .info-item .value.highlight.data-v-42c00aae,.refund-card .info-item .value.highlight.data-v-42c00aae{color:#ff6b00;font-weight:700;font-size:16px}.order-card .info-item .value.success.data-v-42c00aae,.refund-card .info-item .value.success.data-v-42c00aae{color:#07c160}.button-group.data-v-42c00aae{margin-top:40rpx;display:flex;justify-content:center;gap:20rpx}.button-group .primary-btn.data-v-42c00aae,.button-group .secondary-btn.data-v-42c00aae{width:50%;height:88rpx;line-height:88rpx;border-radius:44rpx;text-align:center;font-size:32rpx}.button-group .primary-btn.data-v-42c00aae{background:#07c160;color:#fff}.button-group .primary-btn.data-v-42c00aae:active{opacity:.8}.button-group .secondary-btn.data-v-42c00aae{background:#f0f0f0;color:#333}.button-group .secondary-btn.data-v-42c00aae:active{opacity:.8}.notice-card.data-v-42c00aae{background-color:#fff;border-radius:12px;padding:20px;margin-bottom:20px;box-shadow:0 2px 8px rgba(0,0,0,.04)}.notice-card .card-title.data-v-42c00aae{font-size:16px;font-weight:700;margin-bottom:16px;color:#333;border-bottom:1px solid #f0f0f0;padding-bottom:10px}.notice-card .notice-content.data-v-42c00aae{text-align:left;color:#666;font-size:14px}.waiting.data-v-42c00aae{color:#fa0;font-weight:700}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
<view class="return-container data-v-44a2261b"><view class="order-card data-v-44a2261b"><view class="order-header data-v-44a2261b"><text class="title data-v-44a2261b">{{a}}</text><text class="order-no data-v-44a2261b">订单号:{{b}}</text></view><view class="device-info data-v-44a2261b"><text class="device-name data-v-44a2261b">共享风扇</text><text class="device-id data-v-44a2261b">设备号:{{c}}</text></view><view class="time-info data-v-44a2261b"><view class="time-item data-v-44a2261b"><text class="label data-v-44a2261b">开始时间</text><text class="value data-v-44a2261b">{{d}}</text></view><view class="time-item data-v-44a2261b"><text class="label data-v-44a2261b">已使用时长</text><text class="value highlight data-v-44a2261b">{{e}}</text></view><view class="time-item data-v-44a2261b"><text class="label data-v-44a2261b">当前费用</text><text class="value data-v-44a2261b">¥{{f}}</text></view></view><view wx:if="{{false}}" class="debug-info data-v-44a2261b"><view class="debug-title data-v-44a2261b">调试信息</view><view class="debug-item data-v-44a2261b">原始开始时间: {{g}}</view><view class="debug-item data-v-44a2261b">处理后开始时间: {{h}}</view><view class="debug-item data-v-44a2261b">订单状态: {{i}}</view></view></view><view class="notice-card data-v-44a2261b"><view class="notice-title data-v-44a2261b">归还说明</view><view class="notice-list data-v-44a2261b"><view class="notice-item data-v-44a2261b"><view class="dot data-v-44a2261b"></view><text class="data-v-44a2261b">请确保设备完好无损</text></view><view class="notice-item data-v-44a2261b"><view class="dot data-v-44a2261b"></view><text class="data-v-44a2261b">将充电宝插入原位置或空闲插口</text></view><view class="notice-item data-v-44a2261b"><view class="dot data-v-44a2261b"></view><text class="data-v-44a2261b">系统将自动检测归还并处理退款</text></view><view class="notice-item data-v-44a2261b"><view class="dot data-v-44a2261b"></view><text class="data-v-44a2261b">归还成功后将自动跳转到成功页面</text></view></view></view><view class="bottom-bar data-v-44a2261b"><button class="secondary-btn data-v-44a2261b" bindtap="{{j}}">刷新状态</button><button class="primary-btn data-v-44a2261b" bindtap="{{k}}">返回首页</button></view></view>
|
||||
<view class="return-container data-v-8b6b904e"><view class="order-card data-v-8b6b904e"><view class="order-header data-v-8b6b904e"><text class="title data-v-8b6b904e">{{a}}</text><text class="order-no data-v-8b6b904e">订单号:{{b}}</text></view><view class="device-info data-v-8b6b904e"><view class="device-left data-v-8b6b904e"><view class="device-name data-v-8b6b904e">共享风扇</view><view class="device-id data-v-8b6b904e">设备号:{{c}}</view></view><view class="device-right data-v-8b6b904e"><view wx:if="{{d}}" class="payment-badge wx-score data-v-8b6b904e"><image src="{{e}}" mode="aspectFit" class="badge-icon data-v-8b6b904e"></image><view class="badge-text data-v-8b6b904e"><text class="data-v-8b6b904e">微信支付分</text><text class="divider data-v-8b6b904e">|</text><text class="highlight data-v-8b6b904e">免押租借</text></view></view><view wx:else class="payment-badge deposit data-v-8b6b904e"><text class="badge-text data-v-8b6b904e">押金租借</text></view></view></view><view class="time-info data-v-8b6b904e"><view class="time-item data-v-8b6b904e"><text class="label data-v-8b6b904e">开始时间</text><text class="value data-v-8b6b904e">{{f}}</text></view><view class="time-item data-v-8b6b904e"><text class="label data-v-8b6b904e">已使用时长</text><text class="value highlight data-v-8b6b904e">{{g}}</text></view><view class="time-item data-v-8b6b904e"><text class="label data-v-8b6b904e">当前费用</text><text class="value data-v-8b6b904e">¥{{h}}</text></view></view><view wx:if="{{false}}" class="debug-info data-v-8b6b904e"><view class="debug-title data-v-8b6b904e">调试信息</view><view class="debug-item data-v-8b6b904e">原始开始时间: {{i}}</view><view class="debug-item data-v-8b6b904e">处理后开始时间: {{j}}</view><view class="debug-item data-v-8b6b904e">订单状态: {{k}}</view></view></view><view class="notice-card data-v-8b6b904e"><view class="notice-title data-v-8b6b904e">归还说明</view><view class="notice-list data-v-8b6b904e"><view class="notice-item data-v-8b6b904e"><view class="dot data-v-8b6b904e"></view><text class="data-v-8b6b904e">请确保设备完好无损</text></view><view class="notice-item data-v-8b6b904e"><view class="dot data-v-8b6b904e"></view><text class="data-v-8b6b904e">将充电宝插入原位置或空闲插口</text></view><view class="notice-item data-v-8b6b904e"><view class="dot data-v-8b6b904e"></view><text class="data-v-8b6b904e">系统将自动检测归还并处理退款</text></view><view class="notice-item data-v-8b6b904e"><view class="dot data-v-8b6b904e"></view><text class="data-v-8b6b904e">归还成功后将自动跳转到成功页面</text></view></view></view><view class="bottom-bar data-v-8b6b904e"><view class="action-item secondary data-v-8b6b904e" bindtap="{{l}}">刷新状态</view><view class="action-item primary data-v-8b6b904e" bindtap="{{m}}">返回首页</view></view></view>
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.return-container.data-v-44a2261b{min-height:100vh;background:#f8f8f8;padding:30rpx 30rpx 180rpx;box-sizing:border-box}.return-container .order-card.data-v-44a2261b{background:#fff;border-radius:24rpx;padding:30rpx;margin-bottom:30rpx;box-shadow:0 4rpx 16rpx rgba(0,0,0,.04)}.return-container .order-card .order-header.data-v-44a2261b{display:flex;justify-content:space-between;align-items:center;margin-bottom:30rpx}.return-container .order-card .order-header .title.data-v-44a2261b{font-size:32rpx;font-weight:700;color:#333}.return-container .order-card .order-header .order-no.data-v-44a2261b{font-size:24rpx;color:#999}.return-container .order-card .device-info.data-v-44a2261b{margin-bottom:30rpx}.return-container .order-card .device-info .device-name.data-v-44a2261b{font-size:28rpx;color:#333;display:block;margin-bottom:10rpx}.return-container .order-card .device-info .device-id.data-v-44a2261b{font-size:24rpx;color:#666}.return-container .order-card .time-info.data-v-44a2261b{background:#f9f9f9;border-radius:16rpx;padding:20rpx}.return-container .order-card .time-info .time-item.data-v-44a2261b{display:flex;justify-content:space-between;align-items:center;margin-bottom:16rpx}.return-container .order-card .time-info .time-item.data-v-44a2261b:last-child{margin-bottom:0}.return-container .order-card .time-info .time-item .label.data-v-44a2261b{font-size:26rpx;color:#666}.return-container .order-card .time-info .time-item .value.data-v-44a2261b{font-size:26rpx;color:#333}.return-container .order-card .time-info .time-item .value.highlight.data-v-44a2261b{color:#ff6b00;font-weight:700}.return-container .notice-card.data-v-44a2261b{background:#fff;border-radius:24rpx;padding:30rpx;margin-bottom:30rpx;box-shadow:0 4rpx 16rpx rgba(0,0,0,.04)}.return-container .notice-card .notice-title.data-v-44a2261b{font-size:28rpx;font-weight:700;color:#333;margin-bottom:20rpx}.return-container .notice-card .notice-list .notice-item.data-v-44a2261b{display:flex;align-items:flex-start;margin-bottom:16rpx}.return-container .notice-card .notice-list .notice-item.data-v-44a2261b:last-child{margin-bottom:0}.return-container .notice-card .notice-list .notice-item .dot.data-v-44a2261b{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-44a2261b{font-size:26rpx;color:#666;line-height:1.5}.return-container .bottom-bar.data-v-44a2261b{position:fixed;left:0;right:0;bottom:0;padding:30rpx;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 .primary-btn.data-v-44a2261b,.return-container .bottom-bar .secondary-btn.data-v-44a2261b{height:88rpx;line-height:88rpx;font-size:32rpx;border-radius:44rpx;text-align:center;flex:1}.return-container .bottom-bar .primary-btn.data-v-44a2261b{background:#07c160;color:#fff}.return-container .bottom-bar .primary-btn.data-v-44a2261b:active{opacity:.8}.return-container .bottom-bar .secondary-btn.data-v-44a2261b{background:#f0f0f0;color:#333}.return-container .bottom-bar .secondary-btn.data-v-44a2261b:active{opacity:.8}
|
||||
.return-container.data-v-8b6b904e{min-height:100vh;background:#f7f8fa;padding:30rpx 30rpx 180rpx;box-sizing:border-box}.return-container .order-card.data-v-8b6b904e{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-8b6b904e{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-8b6b904e{font-size:30rpx;font-weight:700;color:#333}.return-container .order-card .order-header .order-no.data-v-8b6b904e{font-size:24rpx;color:#999}.return-container .order-card .device-info.data-v-8b6b904e{margin-bottom:24rpx;display:flex;justify-content:space-between;align-items:flex-start}.return-container .order-card .device-info .device-left.data-v-8b6b904e{flex:1;margin-right:20rpx}.return-container .order-card .device-info .device-left .device-name.data-v-8b6b904e{font-size:32rpx;font-weight:500;color:#333;margin-bottom:8rpx}.return-container .order-card .device-info .device-left .device-id.data-v-8b6b904e{font-size:26rpx;color:#999;margin-bottom:0}.return-container .order-card .device-info .device-right .payment-badge.data-v-8b6b904e{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-8b6b904e{background:rgba(7,193,96,.08)}.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-icon.data-v-8b6b904e{width:32rpx;height:26rpx;margin-right:8rpx}.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-text.data-v-8b6b904e{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-8b6b904e{margin:0 6rpx}.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-text .highlight.data-v-8b6b904e{font-weight:500}.return-container .order-card .device-info .device-right .payment-badge.deposit.data-v-8b6b904e{background:#f5f5f5}.return-container .order-card .device-info .device-right .payment-badge.deposit .badge-text.data-v-8b6b904e{font-size:22rpx;color:#666;font-weight:500}.return-container .order-card .time-info.data-v-8b6b904e{background:#f9f9f9;border-radius:16rpx;padding:20rpx}.return-container .order-card .time-info .time-item.data-v-8b6b904e{display:flex;justify-content:space-between;align-items:center;margin-bottom:16rpx}.return-container .order-card .time-info .time-item.data-v-8b6b904e:last-child{margin-bottom:0}.return-container .order-card .time-info .time-item .label.data-v-8b6b904e{font-size:26rpx;color:#666}.return-container .order-card .time-info .time-item .value.data-v-8b6b904e{font-size:26rpx;color:#333}.return-container .order-card .time-info .time-item .value.highlight.data-v-8b6b904e{color:#ff6b6b;font-weight:700}.return-container .notice-card.data-v-8b6b904e{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-8b6b904e{font-size:30rpx;font-weight:700;color:#333;margin-bottom:20rpx}.return-container .notice-card .notice-list .notice-item.data-v-8b6b904e{display:flex;align-items:flex-start;margin-bottom:16rpx}.return-container .notice-card .notice-list .notice-item.data-v-8b6b904e:last-child{margin-bottom:0}.return-container .notice-card .notice-list .notice-item .dot.data-v-8b6b904e{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-8b6b904e{font-size:26rpx;color:#666;line-height:1.5}.return-container .bottom-bar.data-v-8b6b904e{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-8b6b904e{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-8b6b904e{background:#07c160;color:#fff}.return-container .bottom-bar .action-item.primary.data-v-8b6b904e:active{opacity:.8}.return-container .bottom-bar .action-item.secondary.data-v-8b6b904e{background:#f5f5f5;color:#333;border:1rpx solid #e0e0e0}.return-container .bottom-bar .action-item.secondary.data-v-8b6b904e:active{opacity:.8}
|
||||
|
||||
@@ -1 +1 @@
|
||||
"use strict";const e=require("../../../common/vendor.js"),i=require("../../../util/index.js"),o=require("../../../config/user.js"),d={data:()=>({}),async onLoad(d){try{if(e.index.showLoading({title:"加载中..."}),e.index.getStorageSync("token")||await i.wxLogin(),!d.deviceNo)return e.index.hideLoading(),void e.index.showToast({title:"设备编号不能为空",icon:"none"});const n=await o.queryHasOrder(d.deviceNo);e.index.hideLoading(),n.data&&n.data.data&&n.data.data.length>0?e.index.redirectTo({url:`/pages/device/return?deviceNo=${d.deviceNo}`}):e.index.redirectTo({url:`/pages/device/detail?deviceNo=${d.deviceNo}`})}catch(n){e.index.hideLoading(),e.index.showToast({title:"页面加载失败,请重试",icon:"none"}),console.error("bagCheck onLoad error:",n)}},methods:{}};const n=e._export_sfc(d,[["render",function(e,i,o,d,n,t){return{}}]]);wx.createPage(n);
|
||||
"use strict";const e=require("../../../common/vendor.js"),o=require("../../../config/user.js"),d={data:()=>({}),async onLoad(d){console.log("bagCheck onLoad option:",d);try{if(e.index.showLoading({title:"处理中...",mask:!0}),!d||!d.deviceNo)throw new Error("未识别到设备编号");const r=d.deviceNo,i=["in_used","waiting_for_payment"],t=await o.checkOrdersByStatus(r,i);if(200===t.code&&t.data&&t.data.length>0){const o=t.data[0];if("in_used"===o.orderStatus)console.log("检测到使用中订单,跳转归还页:",o.orderId),e.index.redirectTo({url:`/pages/device/return?orderId=${o.orderId}`});else if("waiting_for_payment"===o.orderStatus){console.log("检测到待支付订单,跳转支付页:",o.orderId);const d=o.packageTime||60,r=(d/60).toFixed(1),i=o.packagePrice||"0.00",t=(parseFloat(i)/(d/60)).toFixed(2),a=o.depositAmount||"99.00",s=(parseFloat(a)+parseFloat(i)).toFixed(2);e.index.redirectTo({url:`/pages/order/payment?orderId=${o.orderId}&packageTimeHours=${r}&packagePrice=${i}&hourlyRate=${t}&totalAmount=${s}&depositAmount=${a}`})}else console.log("检测到其他状态订单,跳转详情页:",o.orderId),e.index.redirectTo({url:`/pages/device/detail?deviceNo=${r}`})}else console.log("未检测到相关订单,跳转详情页"),e.index.redirectTo({url:`/pages/device/detail?deviceNo=${r}`})}catch(r){r.message&&(r.message.includes("未识别到设备编号")||r.message.includes("网络请求失败")||r.message.includes("服务器错误"))?(console.error("扫码检查订单失败:",r),e.index.showToast({title:r.message||"处理失败,请稍后重试",icon:"none",duration:2e3})):console.log("没有找到符合条件的订单或发生其他错误,直接跳转详情页"),setTimeout((()=>{d&&d.deviceNo?e.index.redirectTo({url:`/pages/device/detail?deviceNo=${d.deviceNo}`}):e.index.switchTab({url:"/pages/index/index"})}),2e3)}finally{e.index.hideLoading()}},methods:{}};const r=e._export_sfc(d,[["render",function(e,o,d,r,i,t){return{}}]]);wx.createPage(r);
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "",
|
||||
"appid": "wxe752f45e7f7aa271",
|
||||
"appid": "wx2165f0be356ae7a9",
|
||||
"projectname": "fs",
|
||||
"condition": {
|
||||
"search": {
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1751009018822" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7460" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M779.073919 133.586954H667.784787V66.793477C667.784787 29.997071 637.887706 0 600.991309 0H423.008691c-36.796407 0-66.793477 29.997071-66.793478 66.793477v66.793477H244.926081c-36.796407 0-66.793477 29.997071-66.793477 66.793478v756.826091c0 36.796407 29.997071 66.793477 66.793477 66.793477h534.247828c36.796407 0 66.793477-29.997071 66.793477-66.793477v-756.926082c-0.09999-36.796407-29.997071-66.693487-66.893467-66.693487zM400.710868 66.793477c0-12.298799 9.999024-22.297822 22.297823-22.297822h177.982618c12.298799 0 22.297822 9.999024 22.297823 22.297822v64.593692H400.710868V66.793477z m400.660873 890.313056c0 12.298799-9.999024 22.297822-22.297822 22.297822H244.926081c-12.298799 0-22.297822-9.999024-22.297822-22.297822V200.280441c0-12.298799 9.999024-22.297822 22.297822-22.297822h534.247828c12.298799 0 22.297822 9.999024 22.297822 22.297822v756.826092z" fill="#ffffff" p-id="7461"></path><path d="M645.586954 489.652182H378.413046c-12.198809 0-22.297822 9.999024-22.297823 22.297823 0 12.198809 9.999024 22.297822 22.297823 22.297822h267.073918c12.198809 0 22.297822-9.999024 22.297823-22.297822 0-12.198809-9.999024-22.297822-22.197833-22.297823zM645.586954 667.734792H378.413046c-12.198809 0-22.297822 9.999024-22.297823 22.297822s9.999024 22.297822 22.297823 22.297822h267.073918c12.198809 0 22.297822-9.999024 22.297823-22.297822s-9.999024-22.297822-22.197833-22.297822zM645.586954 845.817401H378.413046c-12.198809 0-22.297822 9.999024-22.297823 22.297822s9.999024 22.297822 22.297823 22.297823h267.073918c12.198809 0 22.297822-9.999024 22.297823-22.297823s-9.999024-22.297822-22.197833-22.297822zM645.586954 311.669564H378.413046c-12.198809 0-22.297822 9.999024-22.297823 22.297822 0 12.198809 9.999024 22.297822 22.297823 22.297822h267.073918c12.198809 0 22.297822-9.999024 22.297823-22.297822s-9.999024-22.297822-22.197833-22.297822z" fill="#ffffff" p-id="7462"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1751008766607" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5409" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 427.023m-90 0a90 90 0 1 0 180 0 90 90 0 1 0-180 0Z" fill="#ffffff" p-id="5410"></path><path d="M512 910.402c-19.14 0-37.482-5.854-53.042-16.929-14.063-10.01-24.926-23.596-31.589-39.46L255.043 585.177l-0.154-0.25C225.522 537.209 210 482.605 210 427.021c0-80.667 31.414-156.506 88.454-213.546S431.333 125.021 512 125.021s156.506 31.414 213.546 88.454C782.587 270.515 814 346.354 814 427.021c0 55.849-15.655 110.671-45.274 158.539l-0.264 0.419-172.081 268.716c-6.755 15.726-17.66 29.176-31.704 39.055-15.485 10.895-33.7 16.652-52.677 16.652zM309.246 551.141l175.494 273.78 1.194 3.197c4.149 11.107 14.381 18.284 26.066 18.284 11.584 0 21.791-7.071 26.004-18.015l1.165-3.028L714.43 551.678C737.701 513.983 750 470.884 750 427.021c0-63.572-24.756-123.339-69.709-168.292-44.952-44.951-104.719-69.708-168.291-69.708s-123.339 24.756-168.292 69.708S274 363.449 274 427.021c0 43.64 12.186 86.552 35.246 124.12z" fill="#ffffff" p-id="5411"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 5.2 KiB |
+1
-1
@@ -1 +1 @@
|
||||
"use strict";const e=require("../common/vendor.js"),n=require("../config/user.js");exports.getQueryString=function(e,n){var o=new RegExp("(^|&|/?)"+n+"=([^&|/?]*)(&|/?|$)","i"),i=e.substr(1).match(o);return null!=i?i[2]:null},exports.getUserInfo=()=>new Promise((async(e,o)=>{e(await n.getMyIndexInfo({isHide:!1}))})),exports.wxLogin=()=>new Promise(((o,i)=>{e.index.login({provider:"weixin",success:async t=>{try{if(!t.code)throw new Error("获取微信登录凭证失败");{const i=await n.login({code:t.code,appid:"wxe752f45e7f7aa271"});if(200!==i.code)throw new Error(i.message||"登录失败");e.index.setStorageSync("token",i.data.LoginWxVo.access_token),e.index.setStorageSync("client_id",i.data.LoginWxVo.client_id),o(i.data)}}catch(s){e.index.showToast({title:s.message||"登录失败",icon:"none"}),i(s)}},fail:n=>{e.index.showToast({title:"微信登录失败",icon:"none"}),i(n)}})}));
|
||||
"use strict";const e=require("../common/vendor.js"),o=require("../config/user.js");exports.getQueryString=function(e,o){var n=new RegExp("(^|&|/?)"+o+"=([^&|/?]*)(&|/?|$)","i"),s=e.substr(1).match(n);return null!=s?s[2]:null},exports.getUserInfo=()=>new Promise((async(e,n)=>{e(await o.getMyIndexInfo({isHide:!1}))})),exports.initiateWeChatScorePayment=o=>new Promise(((n,s)=>{o&&o.data&&o.data.package?e.wx$1.openBusinessView({businessType:"wxpayScoreUse",extraData:{mch_id:o.data.mch_id,package:o.data.package},success:e=>{console.log("微信支付分小程序调用成功",e),"openBusinessView:ok"===e.errMsg?n(e):s(new Error("支付流程未完成"))},fail:o=>{console.error("微信支付分小程序调用失败",o),e.index.showToast({title:o.errMsg||"支付分接口调用失败",icon:"none"}),s(o)}}):s(new Error("支付参数不完整"))})),exports.wxLogin=()=>new Promise(((n,s)=>{e.index.login({provider:"weixin",success:async i=>{try{if(!i.code)throw new Error("获取微信登录凭证失败");{const s=await o.login({code:i.code,appid:"wx2165f0be356ae7a9"});if(200!==s.code)throw new Error(s.message||"登录失败");e.index.setStorageSync("token",s.data.LoginWxVo.access_token),e.index.setStorageSync("client_id",s.data.LoginWxVo.client_id),n(s.data)}}catch(t){e.index.showToast({title:t.message||"登录失败",icon:"none"}),s(t)}},fail:o=>{e.index.showToast({title:"微信登录失败",icon:"none"}),s(o)}})}));
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
"use strict";const e=require("../common/vendor.js"),s=require("../config/user.js");const r=new class{constructor(){this.activeOrders=new Map,this.timer=null,this.checkInterval=1e4,this.isRunning=!1}addOrder(e){e&&e.orderId?(console.log("添加订单到监控队列:",e.orderId),this.activeOrders.set(e.orderId,e),this.isRunning||this.start()):console.error("添加订单监控失败:无效的订单数据")}removeOrder(e){this.activeOrders.has(e)&&(console.log("从监控队列移除订单:",e),this.activeOrders.delete(e),0===this.activeOrders.size&&this.stop())}start(){this.isRunning||(console.log("启动订单监控服务"),this.isRunning=!0,this.checkOrders(),this.timer=setInterval((()=>{this.checkOrders()}),this.checkInterval))}stop(){this.isRunning&&(console.log("停止订单监控服务"),this.isRunning=!1,this.timer&&(clearInterval(this.timer),this.timer=null))}async checkOrders(){if(0!==this.activeOrders.size){console.log(`检查 ${this.activeOrders.size} 个活跃订单状态`);for(const[s,r]of this.activeOrders.entries())try{await this.checkOrderStatus(s)}catch(e){console.error(`检查订单状态失败: ${s}`,e)}}}async checkOrderStatus(r){try{console.log(`检查订单 ${r} 的状态`);const t=await s.queryById(r);if(200===t.code&&t.data){const s=t.data;if(this.activeOrders.set(r,s),"used_done"===s.orderStatus||"used_down"===s.orderStatus){console.log(`订单 ${r} 已完成!`),e.index.$emit("orderCompleted",s),e.index.showToast({title:"充电宝归还成功",icon:"success",duration:2e3});const t=e.index.createInnerAudioContext();t.src="/static/audio/return_success.mp3",t.play(),this.removeOrder(r),setTimeout((()=>{e.index.showModal({title:"归还成功",content:"充电宝已归还成功,剩余押金将退还到您的账户",confirmText:"查看详情",success:s=>{s.confirm&&e.index.redirectTo({url:`/pages/order/return-success?orderId=${r}`})}})}),500)}}}catch(t){console.error(`检查订单 ${r} 状态出错:`,t)}}};(()=>{const s=e.index.getStorageSync("activeOrderId");if(s){const e={orderId:s};r.addOrder(e)}})(),exports.orderMonitor=r;
|
||||
"use strict";const e=require("../common/vendor.js"),r=require("../config/user.js");const t=new class{constructor(){this.activeOrders=new Map,this.timer=null,this.checkInterval=1e4,this.isRunning=!1,this.currentPage=null}addOrder(e,r="return"){e&&e.orderId?(console.log(`添加订单到监控队列: ${e.orderId}, 页面: ${r}`),this.activeOrders.set(e.orderId,{...e,pageName:r}),this.isRunning||this.start()):console.error("添加订单监控失败:无效的订单数据")}removeOrder(e){if(e){if(e.orderId&&this.activeOrders.has(e.orderId))console.log("从监控队列移除订单:",e.orderId),this.activeOrders.delete(e.orderId);else if(e.pageName){console.log("从监控队列移除页面相关订单:",e.pageName);for(const[r,t]of this.activeOrders.entries())t.pageName===e.pageName&&this.activeOrders.delete(r)}0===this.activeOrders.size&&this.stop()}}setActivePage(e){this.currentPage=e,console.log("设置当前活跃页面:",e)}start(){this.isRunning||(console.log("启动订单监控服务"),this.isRunning=!0,this.checkOrders(),this.timer=setInterval((()=>{this.checkOrders()}),this.checkInterval))}stop(){this.isRunning&&(console.log("停止订单监控服务"),this.isRunning=!1,this.timer&&(clearInterval(this.timer),this.timer=null))}async checkOrders(){if(0!==this.activeOrders.size){console.log(`检查 ${this.activeOrders.size} 个活跃订单状态, 当前页面: ${this.currentPage}`);for(const[r,t]of this.activeOrders.entries())try{t.pageName&&"return"!==t.pageName||("return"===this.currentPage||null===this.currentPage?await this.checkOrderStatus(r):console.log(`跳过订单状态检查: ${r}, 当前不在归还页面`))}catch(e){console.error(`检查订单状态失败: ${r}`,e)}}}async checkOrderStatus(t){try{console.log(`检查订单 ${t} 的状态`);const s=await r.queryById(t);if(200===s.code&&s.data){const r=s.data,i=this.activeOrders.get(t),o=i?i.pageName:null;if(this.activeOrders.set(t,{...r,pageName:o}),"used_done"===r.orderStatus||"used_down"===r.orderStatus){console.log(`订单 ${t} 已完成!`),e.index.$emit("orderCompleted",r),e.index.showToast({title:"充电宝归还成功",icon:"success",duration:2e3});const s=e.index.createInnerAudioContext();s.src="/static/audio/return_success.mp3",s.play(),this.removeOrder({orderId:t}),setTimeout((()=>{e.index.showModal({title:"归还成功",content:"充电宝已归还成功,剩余押金将退还到您的账户",confirmText:"查看详情",success:r=>{r.confirm&&e.index.redirectTo({url:`/pages/order/return-success?orderId=${t}`})}})}),500)}}}catch(s){console.error(`检查订单 ${t} 状态出错:`,s)}}};e.index.onAppRoute((e=>{const r=e.path||"",s=r.split("/"),i=s[s.length-1];t.setActivePage(i||null),console.log("页面切换:",r,"当前活跃页面:",i)}));(()=>{const r=e.index.getStorageSync("activeOrderId");if(r){const e={orderId:r};t.addOrder(e,"return")}})(),exports.orderMonitor=t;
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"assets.js","sources":["static/logo.png","static/scan-icon.png","static/jl.png","static/complaint.png","static/hlep.png","static/images/location-map.svg","static/images/Electricity.svg","static/images/wxpayflag.png"],"sourcesContent":["export default \"__VITE_ASSET__fcf1191c__\"","export default \"__VITE_ASSET__b9d91c1a__\"","export default \"__VITE_ASSET__44ff4dfa__\"","export default \"__VITE_ASSET__d1c6bbb6__\"","export default \"__VITE_ASSET__f0ed8f64__\"","export default \"__VITE_ASSET__52e4836e__\"","export default \"__VITE_ASSET__f8b20b4b__\"","export default \"__VITE_ASSET__9081434a__\""],"names":[],"mappings":";AAAA,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,aAAA;ACAf,MAAe,aAAA;ACAf,MAAe,aAAA;;;;;;;;;"}
|
||||
{"version":3,"file":"assets.js","sources":["static/logo.png","static/scan-icon.png","static/user-active.png","static/jl.png","static/complaint.png","static/hlep.png","static/images/wxpayflag.png","static/images/location-map.svg","static/images/Electricity.svg"],"sourcesContent":["export default \"__VITE_ASSET__fcf1191c__\"","export default \"__VITE_ASSET__b9d91c1a__\"","export default \"__VITE_ASSET__e217d500__\"","export default \"__VITE_ASSET__44ff4dfa__\"","export default \"__VITE_ASSET__d1c6bbb6__\"","export default \"__VITE_ASSET__f0ed8f64__\"","export default \"__VITE_ASSET__9081434a__\"","export default \"__VITE_ASSET__52e4836e__\"","export default \"__VITE_ASSET__f8b20b4b__\""],"names":[],"mappings":";AAAA,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,eAAA;ACAf,MAAe,aAAA;ACAf,MAAe,aAAA;ACAf,MAAe,eAAA;ACAf,MAAe,aAAA;ACAf,MAAe,aAAA;;;;;;;;;;"}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"version":3,"file":"url.js","sources":["config/url.js"],"sourcesContent":["export const URL = \"https://my.gxfs123.com/api\"\r\n// export const URL = \"http://192.168.10.30:8080\"\r\n\r\nexport const appid = \"wx2165f0be356ae7a9\" "],"names":[],"mappings":";AAAY,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 = \"http://192.168.10.33:8080\"\r\n\r\nexport const appid = \"wx2165f0be356ae7a9\" "],"names":[],"mappings":";AAAY,MAAC,MAAM;AAGP,MAAC,QAAQ;;;"}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"version":3,"file":"orderStatus.js","sources":["constants/orderStatus.js"],"sourcesContent":["/**\r\n * 订单状态映射\r\n */\r\nexport const OrderStatusMap = {\r\n waiting_for_payment: {\r\n text: '待支付',\r\n class: 'status-waiting'\r\n },\r\n payment_in_progress: {\r\n text: '支付中',\r\n class: 'status-progress'\r\n },\r\n payment_successful: {\r\n text: '支付成功',\r\n class: 'status-success'\r\n },\r\n in_used: {\r\n text: '使用中',\r\n class: 'status-using'\r\n },\r\n payment_failed: {\r\n text: '支付失败',\r\n class: 'status-failed'\r\n },\r\n order_cancelled: {\r\n text: '已取消',\r\n class: 'status-cancelled'\r\n },\r\n used_done: {\r\n text: '已完成',\r\n class: 'status-finished'\r\n }\r\n}\r\n\r\n/**\r\n * 订单状态分类\r\n */\r\nexport const OrderStatusTabs = [\r\n {\r\n text: '全部',\r\n status: []\r\n },\r\n {\r\n text: '待支付',\r\n status: ['waiting_for_payment', 'payment_in_progress']\r\n },\r\n {\r\n text: '使用中',\r\n status: ['payment_successful', 'in_used']\r\n },\r\n {\r\n text: '已完成',\r\n status: ['used_done', 'payment_failed', 'order_cancelled']\r\n }\r\n]"],"names":[],"mappings":";AAGY,MAAC,iBAAiB;AAAA,EAC5B,qBAAqB;AAAA,IACnB,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,qBAAqB;AAAA,IACnB,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,oBAAoB;AAAA,IAClB,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,SAAS;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,WAAW;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AACH;AAKY,MAAC,kBAAkB;AAAA,EAC7B;AAAA,IACE,MAAM;AAAA,IACN,QAAQ,CAAE;AAAA,EACX;AAAA,EACD;AAAA,IACE,MAAM;AAAA,IACN,QAAQ,CAAC,uBAAuB,qBAAqB;AAAA,EACtD;AAAA,EACD;AAAA,IACE,MAAM;AAAA,IACN,QAAQ,CAAC,sBAAsB,SAAS;AAAA,EACzC;AAAA,EACD;AAAA,IACE,MAAM;AAAA,IACN,QAAQ,CAAC,aAAa,kBAAkB,iBAAiB;AAAA,EAC1D;AACH;;;"}
|
||||
{"version":3,"file":"orderStatus.js","sources":["constants/orderStatus.js"],"sourcesContent":["/**\r\n * 订单状态映射\r\n */\r\nexport const OrderStatusMap = {\r\n waiting_for_payment: {\r\n text: '待支付',\r\n class: 'status-waiting'\r\n },\r\n payment_in_progress: {\r\n text: '支付中',\r\n class: 'status-progress'\r\n },\r\n payment_successful: {\r\n text: '支付成功',\r\n class: 'status-success'\r\n },\r\n in_used: {\r\n text: '使用中',\r\n class: 'status-using'\r\n },\r\n payment_failed: {\r\n text: '支付失败',\r\n class: 'status-failed'\r\n },\r\n order_cancelled: {\r\n text: '已取消',\r\n class: 'status-cancelled'\r\n },\r\n used_done: {\r\n text: '已完成',\r\n class: 'status-finished'\r\n },\r\n fail: {\r\n text: '已取消',\r\n class: 'status-cancelled'\r\n }\r\n}\r\n\r\n/**\r\n * 订单状态分类\r\n */\r\nexport const OrderStatusTabs = [\r\n {\r\n text: '全部',\r\n status: []\r\n },\r\n {\r\n text: '待支付',\r\n status: ['waiting_for_payment', 'payment_in_progress']\r\n },\r\n {\r\n text: '使用中',\r\n status: ['payment_successful', 'in_used']\r\n },\r\n {\r\n text: '已完成',\r\n status: ['used_done', 'payment_failed', 'order_cancelled']\r\n }\r\n]"],"names":[],"mappings":";AAGY,MAAC,iBAAiB;AAAA,EAC5B,qBAAqB;AAAA,IACnB,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,qBAAqB;AAAA,IACnB,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,oBAAoB;AAAA,IAClB,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,SAAS;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,gBAAgB;AAAA,IACd,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,WAAW;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AAAA,EACD,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,OAAO;AAAA,EACR;AACH;AAKY,MAAC,kBAAkB;AAAA,EAC7B;AAAA,IACE,MAAM;AAAA,IACN,QAAQ,CAAE;AAAA,EACX;AAAA,EACD;AAAA,IACE,MAAM;AAAA,IACN,QAAQ,CAAC,uBAAuB,qBAAqB;AAAA,EACtD;AAAA,EACD;AAAA,IACE,MAAM;AAAA,IACN,QAAQ,CAAC,sBAAsB,SAAS;AAAA,EACzC;AAAA,EACD;AAAA,IACE,MAAM;AAAA,IACN,QAAQ,CAAC,aAAa,kBAAkB,iBAAiB;AAAA,EAC1D;AACH;;;"}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+12
-10
@@ -1,18 +1,20 @@
|
||||
"use strict";
|
||||
const _imports_0$2 = "/static/logo.png";
|
||||
const _imports_0$3 = "/static/logo.png";
|
||||
const _imports_1$2 = "/static/scan-icon.png";
|
||||
const _imports_0$1 = "/static/jl.png";
|
||||
const _imports_1$1 = "/static/complaint.png";
|
||||
const _imports_2$1 = "/static/hlep.png";
|
||||
const _imports_0$2 = "/static/user-active.png";
|
||||
const _imports_1$1 = "/static/jl.png";
|
||||
const _imports_2 = "/static/complaint.png";
|
||||
const _imports_3 = "/static/hlep.png";
|
||||
const _imports_0$1 = "/static/images/wxpayflag.png";
|
||||
const _imports_0 = "/static/images/location-map.svg";
|
||||
const _imports_1 = "/static/images/Electricity.svg";
|
||||
const _imports_2 = "/static/images/wxpayflag.png";
|
||||
exports._imports_0 = _imports_0$2;
|
||||
exports._imports_0$1 = _imports_0$1;
|
||||
exports._imports_0$2 = _imports_0;
|
||||
exports._imports_0 = _imports_0$3;
|
||||
exports._imports_0$1 = _imports_0$2;
|
||||
exports._imports_0$2 = _imports_0$1;
|
||||
exports._imports_0$3 = _imports_0;
|
||||
exports._imports_1 = _imports_1$2;
|
||||
exports._imports_1$1 = _imports_1$1;
|
||||
exports._imports_1$2 = _imports_1;
|
||||
exports._imports_2 = _imports_2$1;
|
||||
exports._imports_2$1 = _imports_2;
|
||||
exports._imports_2 = _imports_2;
|
||||
exports._imports_3 = _imports_3;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/assets.js.map
|
||||
|
||||
+82
-22
@@ -1303,6 +1303,9 @@ function isReadonly(value) {
|
||||
function isShallow(value) {
|
||||
return !!(value && value["__v_isShallow"]);
|
||||
}
|
||||
function isProxy(value) {
|
||||
return isReactive(value) || isReadonly(value);
|
||||
}
|
||||
function toRaw(observed) {
|
||||
const raw = observed && observed["__v_raw"];
|
||||
return raw ? toRaw(raw) : observed;
|
||||
@@ -2094,6 +2097,47 @@ function setCurrentRenderingInstance(instance) {
|
||||
instance && instance.type.__scopeId || null;
|
||||
return prev;
|
||||
}
|
||||
const COMPONENTS = "components";
|
||||
function resolveComponent(name, maybeSelfReference) {
|
||||
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
||||
}
|
||||
function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
|
||||
const instance = currentRenderingInstance || currentInstance;
|
||||
if (instance) {
|
||||
const Component2 = instance.type;
|
||||
if (type === COMPONENTS) {
|
||||
const selfName = getComponentName(
|
||||
Component2,
|
||||
false
|
||||
);
|
||||
if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
|
||||
return Component2;
|
||||
}
|
||||
}
|
||||
const res = (
|
||||
// local registration
|
||||
// check instance[type] first which is resolved for options API
|
||||
resolve(instance[type] || Component2[type], name) || // global registration
|
||||
resolve(instance.appContext[type], name)
|
||||
);
|
||||
if (!res && maybeSelfReference) {
|
||||
return Component2;
|
||||
}
|
||||
if (warnMissing && !res) {
|
||||
const extra = type === COMPONENTS ? `
|
||||
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
|
||||
warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
||||
}
|
||||
return res;
|
||||
} else {
|
||||
warn$1(
|
||||
`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
|
||||
);
|
||||
}
|
||||
}
|
||||
function resolve(registry, name) {
|
||||
return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
|
||||
}
|
||||
const INITIAL_WATCHER_VALUE = {};
|
||||
function watch(source, cb, options) {
|
||||
if (!isFunction(cb)) {
|
||||
@@ -3704,6 +3748,12 @@ const Static = Symbol.for("v-stc");
|
||||
function isVNode(value) {
|
||||
return value ? value.__v_isVNode === true : false;
|
||||
}
|
||||
const InternalObjectKey = `__vInternal`;
|
||||
function guardReactiveProps(props) {
|
||||
if (!props)
|
||||
return null;
|
||||
return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props;
|
||||
}
|
||||
const emptyAppContext = createAppContext();
|
||||
let uid = 0;
|
||||
function createComponentInstance(vnode, parent, suspense) {
|
||||
@@ -4942,6 +4992,11 @@ function initApp(app) {
|
||||
}
|
||||
}
|
||||
const propsCaches = /* @__PURE__ */ Object.create(null);
|
||||
function renderProps(props) {
|
||||
const { uid: uid2, __counter } = getCurrentInstance();
|
||||
const propsId = (propsCaches[uid2] || (propsCaches[uid2] = [])).push(guardReactiveProps(props)) - 1;
|
||||
return uid2 + "," + propsId + "," + __counter;
|
||||
}
|
||||
function pruneComponentPropsCache(uid2) {
|
||||
delete propsCaches[uid2];
|
||||
}
|
||||
@@ -5113,6 +5168,7 @@ const f = (source, renderItem) => vFor(source, renderItem);
|
||||
const e = (target, ...sources) => extend(target, ...sources);
|
||||
const n = (value) => normalizeClass(value);
|
||||
const t = (val) => toDisplayString(val);
|
||||
const p = (props) => renderProps(props);
|
||||
function createApp$1(rootComponent, rootProps = null) {
|
||||
rootComponent && (rootComponent.mpType = "app");
|
||||
return createVueApp(rootComponent, rootProps).use(plugin);
|
||||
@@ -5434,8 +5490,8 @@ function promisify$1(name, fn) {
|
||||
if (hasCallback(args)) {
|
||||
return wrapperReturnValue(name, invokeApi(name, fn, args, rest));
|
||||
}
|
||||
return wrapperReturnValue(name, handlePromise(new Promise((resolve, reject) => {
|
||||
invokeApi(name, fn, extend(args, { success: resolve, fail: reject }), rest);
|
||||
return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
|
||||
invokeApi(name, fn, extend(args, { success: resolve2, fail: reject }), rest);
|
||||
})));
|
||||
};
|
||||
}
|
||||
@@ -5756,7 +5812,7 @@ function invokeGetPushCidCallbacks(cid2, errMsg) {
|
||||
getPushCidCallbacks.length = 0;
|
||||
}
|
||||
const API_GET_PUSH_CLIENT_ID = "getPushClientId";
|
||||
const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve, reject }) => {
|
||||
const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve: resolve2, reject }) => {
|
||||
Promise.resolve().then(() => {
|
||||
if (typeof enabled === "undefined") {
|
||||
enabled = false;
|
||||
@@ -5765,7 +5821,7 @@ const getPushClientId = defineAsyncApi(API_GET_PUSH_CLIENT_ID, (_, { resolve, re
|
||||
}
|
||||
getPushCidCallbacks.push((cid2, errMsg) => {
|
||||
if (cid2) {
|
||||
resolve({ cid: cid2 });
|
||||
resolve2({ cid: cid2 });
|
||||
} else {
|
||||
reject(errMsg);
|
||||
}
|
||||
@@ -5834,9 +5890,9 @@ function promisify(name, api) {
|
||||
if (isFunction(options.success) || isFunction(options.fail) || isFunction(options.complete)) {
|
||||
return wrapperReturnValue(name, invokeApi(name, api, options, rest));
|
||||
}
|
||||
return wrapperReturnValue(name, handlePromise(new Promise((resolve, reject) => {
|
||||
return wrapperReturnValue(name, handlePromise(new Promise((resolve2, reject) => {
|
||||
invokeApi(name, api, extend({}, options, {
|
||||
success: resolve,
|
||||
success: resolve2,
|
||||
fail: reject
|
||||
}), rest);
|
||||
})));
|
||||
@@ -6034,7 +6090,7 @@ function populateParameters(fromRes, toRes) {
|
||||
let _SDKVersion = SDKVersion;
|
||||
const hostLanguage = (language || "").replace(/_/g, "-");
|
||||
const parameters = {
|
||||
appId: "__UNI__4630191",
|
||||
appId: "__UNI__A871B6B",
|
||||
appName: "fs",
|
||||
appVersion: "1.0.0",
|
||||
appVersionCode: "100",
|
||||
@@ -6183,7 +6239,7 @@ const getAppBaseInfo = {
|
||||
hostName: _hostName,
|
||||
hostSDKVersion: SDKVersion,
|
||||
hostTheme: theme,
|
||||
appId: "__UNI__4630191",
|
||||
appId: "__UNI__A871B6B",
|
||||
appName: "fs",
|
||||
appVersion: "1.0.0",
|
||||
appVersionCode: "100",
|
||||
@@ -6443,13 +6499,13 @@ function initRuntimeSocket(hosts, port, id) {
|
||||
}
|
||||
const SOCKET_TIMEOUT = 500;
|
||||
function tryConnectSocket(host2, port, id) {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve2, reject) => {
|
||||
const socket = index.connectSocket({
|
||||
url: `ws://${host2}:${port}/${id}`,
|
||||
multiple: true,
|
||||
// 支付宝小程序 是否开启多实例
|
||||
fail() {
|
||||
resolve(null);
|
||||
resolve2(null);
|
||||
}
|
||||
});
|
||||
const timer = setTimeout(() => {
|
||||
@@ -6457,19 +6513,19 @@ function tryConnectSocket(host2, port, id) {
|
||||
code: 1006,
|
||||
reason: "connect timeout"
|
||||
});
|
||||
resolve(null);
|
||||
resolve2(null);
|
||||
}, SOCKET_TIMEOUT);
|
||||
socket.onOpen((e2) => {
|
||||
clearTimeout(timer);
|
||||
resolve(socket);
|
||||
resolve2(socket);
|
||||
});
|
||||
socket.onClose((e2) => {
|
||||
clearTimeout(timer);
|
||||
resolve(null);
|
||||
resolve2(null);
|
||||
});
|
||||
socket.onError((e2) => {
|
||||
clearTimeout(timer);
|
||||
resolve(null);
|
||||
resolve2(null);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -6934,7 +6990,7 @@ function isConsoleWritable() {
|
||||
function initRuntimeSocketService() {
|
||||
const hosts = "192.168.10.21,127.0.0.1";
|
||||
const port = "8090";
|
||||
const id = "mp-weixin_ZQiCij";
|
||||
const id = "mp-weixin_hkcpyE";
|
||||
const lazy = typeof swan !== "undefined";
|
||||
let restoreError = lazy ? () => {
|
||||
} : initOnError();
|
||||
@@ -8098,7 +8154,7 @@ class Request {
|
||||
options.params = options.params || {};
|
||||
options.header = Object.assign({}, this.config.header, options.header);
|
||||
options.method = options.method || this.config.method;
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve2, reject) => {
|
||||
options.complete = (response) => {
|
||||
index.hideLoading();
|
||||
clearTimeout(this.config.timer);
|
||||
@@ -8107,24 +8163,24 @@ class Request {
|
||||
if (this.interceptor.response && typeof this.interceptor.response === "function") {
|
||||
let resInterceptors = this.interceptor.response(response);
|
||||
if (resInterceptors !== false) {
|
||||
resolve(resInterceptors);
|
||||
resolve2(resInterceptors);
|
||||
} else {
|
||||
reject(response);
|
||||
}
|
||||
} else {
|
||||
resolve(response);
|
||||
resolve2(response);
|
||||
}
|
||||
} else {
|
||||
if (response.statusCode == 200) {
|
||||
if (this.interceptor.response && typeof this.interceptor.response === "function") {
|
||||
let resInterceptors = this.interceptor.response(response.data);
|
||||
if (resInterceptors !== false) {
|
||||
resolve(resInterceptors);
|
||||
resolve2(resInterceptors);
|
||||
} else {
|
||||
reject(response.data);
|
||||
}
|
||||
} else {
|
||||
resolve(response.data);
|
||||
resolve2(response.data);
|
||||
}
|
||||
} else {
|
||||
reject(response);
|
||||
@@ -8303,8 +8359,8 @@ class Router {
|
||||
mergeConfig.params = params;
|
||||
mergeConfig = index.$u.deepMerge(this.config, mergeConfig);
|
||||
if (typeof index.$u.routeIntercept === "function") {
|
||||
const isNext = await new Promise((resolve, reject) => {
|
||||
index.$u.routeIntercept(mergeConfig, resolve);
|
||||
const isNext = await new Promise((resolve2, reject) => {
|
||||
index.$u.routeIntercept(mergeConfig, resolve2);
|
||||
});
|
||||
isNext && this.openPage(mergeConfig);
|
||||
} else {
|
||||
@@ -8824,7 +8880,11 @@ exports.index = index;
|
||||
exports.n = n;
|
||||
exports.o = o;
|
||||
exports.onLoad = onLoad;
|
||||
exports.onMounted = onMounted;
|
||||
exports.p = p;
|
||||
exports.reactive = reactive;
|
||||
exports.ref = ref;
|
||||
exports.resolveComponent = resolveComponent;
|
||||
exports.t = t;
|
||||
exports.wx$1 = wx$1;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map
|
||||
|
||||
+9
@@ -78,6 +78,14 @@ const getOrderByOrderNoScore = (orderNo) => {
|
||||
hideLoading: true
|
||||
});
|
||||
};
|
||||
const getOrderByOrderNoScorePayStatus = (orderNo) => {
|
||||
common_vendor.index.__f__("log", "at config/user.js:166", "通过订单号获取支付分订单状态", orderNo);
|
||||
return config_http.request({
|
||||
url: `/app/wx-payment/score/status/${orderNo}`,
|
||||
method: "get",
|
||||
hideLoading: true
|
||||
});
|
||||
};
|
||||
const updateUserBalance = (orderId) => {
|
||||
return config_http.request({
|
||||
url: `/app/user/updateBalance/${orderId}`,
|
||||
@@ -90,6 +98,7 @@ exports.confirmPaymentAndRent = confirmPaymentAndRent;
|
||||
exports.getDeviceInfo = getDeviceInfo;
|
||||
exports.getMyIndexInfo = getMyIndexInfo;
|
||||
exports.getOrderByOrderNoScore = getOrderByOrderNoScore;
|
||||
exports.getOrderByOrderNoScorePayStatus = getOrderByOrderNoScorePayStatus;
|
||||
exports.getOrderList = getOrderList;
|
||||
exports.login = login;
|
||||
exports.queryById = queryById;
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
"use strict";
|
||||
const OrderStatusMap = {
|
||||
waiting_for_payment: {
|
||||
text: "待支付",
|
||||
class: "status-waiting"
|
||||
},
|
||||
payment_in_progress: {
|
||||
text: "支付中",
|
||||
class: "status-progress"
|
||||
},
|
||||
payment_successful: {
|
||||
text: "支付成功",
|
||||
class: "status-success"
|
||||
},
|
||||
in_used: {
|
||||
text: "使用中",
|
||||
class: "status-using"
|
||||
},
|
||||
payment_failed: {
|
||||
text: "支付失败",
|
||||
class: "status-failed"
|
||||
},
|
||||
order_cancelled: {
|
||||
text: "已取消",
|
||||
class: "status-cancelled"
|
||||
},
|
||||
used_done: {
|
||||
text: "已完成",
|
||||
class: "status-finished"
|
||||
}
|
||||
};
|
||||
const OrderStatusTabs = [
|
||||
{
|
||||
text: "全部",
|
||||
status: []
|
||||
},
|
||||
{
|
||||
text: "待支付",
|
||||
status: ["waiting_for_payment", "payment_in_progress"]
|
||||
},
|
||||
{
|
||||
text: "使用中",
|
||||
status: ["payment_successful", "in_used"]
|
||||
},
|
||||
{
|
||||
text: "已完成",
|
||||
status: ["used_done", "payment_failed", "order_cancelled"]
|
||||
}
|
||||
];
|
||||
exports.OrderStatusMap = OrderStatusMap;
|
||||
exports.OrderStatusTabs = OrderStatusTabs;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/constants/orderStatus.js.map
|
||||
+33
-5
@@ -2,6 +2,7 @@
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const config_user = require("../../config/user.js");
|
||||
const util_index = require("../../util/index.js");
|
||||
const _sfc_main = {
|
||||
__name: "detail",
|
||||
setup(__props) {
|
||||
@@ -19,7 +20,7 @@ const _sfc_main = {
|
||||
common_vendor.onLoad((options) => {
|
||||
deviceId.value = options.deviceNo;
|
||||
checkOrderStatus();
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:161", options.deviceNo);
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:168", options.deviceNo);
|
||||
fetchDeviceInfo();
|
||||
});
|
||||
const fetchDeviceInfo = async () => {
|
||||
@@ -110,9 +111,36 @@ const _sfc_main = {
|
||||
}
|
||||
const order = rentResult.data;
|
||||
const res = await config_user.getOrderByOrderNoScore(order.orderNo);
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:282", res);
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:291", res);
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:291", order);
|
||||
if (res && res.code === 200) {
|
||||
try {
|
||||
const payResult = await util_index.initiateWeChatScorePayment(res);
|
||||
if (payResult.errCode == "0") {
|
||||
const res2 = await config_user.getOrderByOrderNoScorePayStatus(order.orderNo);
|
||||
common_vendor.index.showToast({
|
||||
title: "设备租借成功",
|
||||
icon: "success"
|
||||
});
|
||||
setTimeout(() => {
|
||||
common_vendor.index.redirectTo({
|
||||
url: "/pages/order/index"
|
||||
});
|
||||
}, 1500);
|
||||
}
|
||||
} catch (payError) {
|
||||
common_vendor.index.showToast({
|
||||
title: "支付分调用失败,请重试",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
title: (res == null ? void 0 : res.msg) || "获取支付参数失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:330", order);
|
||||
} catch (error) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.showToast({
|
||||
@@ -126,7 +154,7 @@ const _sfc_main = {
|
||||
a: common_vendor.t(deviceStatus.text),
|
||||
b: common_vendor.n(deviceStatus.class),
|
||||
c: common_vendor.t(deviceId.value),
|
||||
d: common_assets._imports_0$2,
|
||||
d: common_assets._imports_0$3,
|
||||
e: common_vendor.t(deviceLocation.value),
|
||||
f: common_assets._imports_1$2,
|
||||
g: batteryLevel.value < 20 ? 1 : "",
|
||||
@@ -136,7 +164,7 @@ const _sfc_main = {
|
||||
j: phoneNumber.value,
|
||||
k: common_vendor.o(($event) => phoneNumber.value = $event.detail.value)
|
||||
} : {}, {
|
||||
l: common_assets._imports_2$1,
|
||||
l: common_assets._imports_0$2,
|
||||
m: common_vendor.t(hasActiveOrder.value ? "归还设备" : "免押金租借"),
|
||||
n: hasActiveOrder.value ? 1 : "",
|
||||
o: common_vendor.o(handleRent)
|
||||
|
||||
+90
-46
@@ -1,76 +1,120 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const util_index = require("../../util/index.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const util_index = require("../../util/index.js");
|
||||
if (!Array) {
|
||||
const _component_uni_icons = common_vendor.resolveComponent("uni-icons");
|
||||
_component_uni_icons();
|
||||
}
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
userInfo: {},
|
||||
deposit: "0.00",
|
||||
tempAvatar: "",
|
||||
tempNickname: "",
|
||||
show: false
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.getInfo();
|
||||
},
|
||||
methods: {
|
||||
async getInfo() {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const userInfo = common_vendor.ref({});
|
||||
const deposit = common_vendor.ref("0.00");
|
||||
const openId = common_vendor.ref("");
|
||||
const authPopup = common_vendor.ref(null);
|
||||
const isPopupVisible = common_vendor.ref(false);
|
||||
common_vendor.onMounted(() => {
|
||||
getInfo();
|
||||
});
|
||||
const getInfo = async () => {
|
||||
try {
|
||||
const token = common_vendor.index.getStorageSync("token");
|
||||
if (!token) {
|
||||
await util_index.wxLogin();
|
||||
this.getInfo();
|
||||
return;
|
||||
}
|
||||
const res = await util_index.getUserInfo();
|
||||
common_vendor.index.__f__("log", "at pages/my/index.vue:105", res);
|
||||
if (res.code === 200) {
|
||||
const userInfo = {
|
||||
common_vendor.index.__f__("log", "at pages/my/index.vue:146", "User info response:", res);
|
||||
if (res.code == 200) {
|
||||
if (res.data.openId) {
|
||||
openId.value = res.data.openId;
|
||||
common_vendor.index.setStorageSync("openId", res.data.openId);
|
||||
}
|
||||
userInfo.value = {
|
||||
nickName: res.data.nickname,
|
||||
phone: res.data.phone,
|
||||
avatar: res.data.iconUrl,
|
||||
isAdmin: res.data.isAdmin
|
||||
};
|
||||
this.userInfo = userInfo;
|
||||
common_vendor.index.setStorageSync("userInfo", userInfo);
|
||||
this.deposit = res.data.balanceAmount || "0.00";
|
||||
common_vendor.index.setStorageSync("userInfo", userInfo.value);
|
||||
deposit.value = res.data.balanceAmount || "0.00";
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/my/index.vue:120", "获取用户信息失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/my/index.vue:167", "获取用户信息失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "获取用户信息失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
},
|
||||
navigateTo(url) {
|
||||
};
|
||||
const navigateTo = (url) => {
|
||||
common_vendor.index.navigateTo({
|
||||
url
|
||||
});
|
||||
}
|
||||
};
|
||||
const handleWithdraw = () => {
|
||||
navigateTo("/pages/deposit/index");
|
||||
};
|
||||
const handleUserProfileClick = () => {
|
||||
if (!userInfo.value) {
|
||||
openAuthPopup();
|
||||
}
|
||||
};
|
||||
const openAuthPopup = () => {
|
||||
if (authPopup.value) {
|
||||
authPopup.value.open();
|
||||
isPopupVisible.value = true;
|
||||
}
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: userInfo.value.avatar
|
||||
}, userInfo.value.avatar ? {
|
||||
b: userInfo.value.avatar
|
||||
} : {
|
||||
c: common_assets._imports_0$1
|
||||
}, {
|
||||
d: userInfo.value.isAdmin
|
||||
}, userInfo.value.isAdmin ? {} : {}, {
|
||||
e: userInfo.value
|
||||
}, userInfo.value ? {
|
||||
f: common_vendor.t(userInfo.value.nickName),
|
||||
g: common_vendor.t(userInfo.value.phone || "未绑定手机号")
|
||||
} : {}, {
|
||||
h: common_vendor.p({
|
||||
type: "right",
|
||||
size: "16",
|
||||
color: "#999"
|
||||
}),
|
||||
i: common_vendor.o(handleUserProfileClick),
|
||||
j: common_vendor.t(deposit.value),
|
||||
k: common_vendor.o(handleWithdraw),
|
||||
l: common_assets._imports_1$1,
|
||||
m: common_vendor.p({
|
||||
type: "right",
|
||||
size: "16",
|
||||
color: "#999"
|
||||
}),
|
||||
n: common_vendor.o(($event) => navigateTo("/pages/order/index")),
|
||||
o: common_assets._imports_2,
|
||||
p: common_vendor.p({
|
||||
type: "right",
|
||||
size: "16",
|
||||
color: "#999"
|
||||
}),
|
||||
q: common_vendor.o(($event) => navigateTo("/pages/feedback/index")),
|
||||
r: common_assets._imports_3,
|
||||
s: common_vendor.p({
|
||||
type: "right",
|
||||
size: "16",
|
||||
color: "#999"
|
||||
}),
|
||||
t: common_vendor.o(($event) => navigateTo("/pages/help/index"))
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $data.userInfo.avatar || "/static/user.png",
|
||||
b: $data.userInfo
|
||||
}, $data.userInfo ? {
|
||||
c: common_vendor.t($data.userInfo.nickName),
|
||||
d: common_vendor.t($data.userInfo.phone || "")
|
||||
} : {}, {
|
||||
e: common_vendor.o((...args) => _ctx.showPopup && _ctx.showPopup(...args)),
|
||||
f: common_vendor.t($data.deposit),
|
||||
g: common_vendor.o(($event) => $options.navigateTo("/pages/deposit/index")),
|
||||
h: common_assets._imports_0$1,
|
||||
i: common_vendor.o(($event) => $options.navigateTo("/pages/order/index")),
|
||||
j: common_assets._imports_1$1,
|
||||
k: common_vendor.o(($event) => $options.navigateTo("/pages/feedback/index")),
|
||||
l: common_assets._imports_2,
|
||||
m: common_vendor.o(($event) => $options.navigateTo("/pages/help/index"))
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-f97bc692"]]);
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f97bc692"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/my/index.js.map
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
<view class="my-container data-v-f97bc692"><view class="user-info data-v-f97bc692"><view class="floating-dots data-v-f97bc692"></view><view class="user-info-content data-v-f97bc692" bindtap="{{e}}"><view class="avatar-wrap data-v-f97bc692"><image class="avatar data-v-f97bc692" src="{{a}}" mode="aspectFill"/></view><view wx:if="{{b}}" class="info-content data-v-f97bc692"><view class="text-group data-v-f97bc692"><text class="nickname data-v-f97bc692">{{c}}</text><text class="phone data-v-f97bc692">{{d}}</text></view></view><view wx:else class="info-content not-login data-v-f97bc692"><text class="login-text data-v-f97bc692">点击登录</text><text class="login-desc data-v-f97bc692">登录后享受更多服务</text></view></view><view class="wave-decoration data-v-f97bc692"></view></view><view class="balance-card data-v-f97bc692"><view class="balance-content data-v-f97bc692"><text class="label data-v-f97bc692">押金余额</text><text class="amount data-v-f97bc692">¥{{f}}</text></view><view class="withdraw-btn data-v-f97bc692" bindtap="{{g}}"> 提现 <view class="arrow data-v-f97bc692"></view></view></view><view class="function-list data-v-f97bc692"><view class="function-item data-v-f97bc692" bindtap="{{i}}"><view class="item-left data-v-f97bc692"><view class="icon-wrap order data-v-f97bc692"><image src="{{h}}" mode="aspectFit" class="icon-image data-v-f97bc692"/></view><text class="title data-v-f97bc692">租借记录</text></view><view class="arrow data-v-f97bc692"></view></view><view class="function-item data-v-f97bc692" bindtap="{{k}}"><view class="item-left data-v-f97bc692"><view class="icon-wrap feedback data-v-f97bc692"><image src="{{j}}" mode="aspectFit" class="icon-image data-v-f97bc692"/></view><text class="title data-v-f97bc692">投诉与建议</text></view><view class="arrow data-v-f97bc692"></view></view><view class="function-item data-v-f97bc692" bindtap="{{m}}"><view class="item-left data-v-f97bc692"><view class="icon-wrap help data-v-f97bc692"><image src="{{l}}" mode="aspectFit" class="icon-image data-v-f97bc692"/></view><text class="title data-v-f97bc692">帮助中心</text></view><view class="arrow data-v-f97bc692"></view></view></view></view>
|
||||
<view class="profile-container data-v-f97bc692"><view class="header-section data-v-f97bc692"><view class="user-profile data-v-f97bc692" bindtap="{{i}}"><view class="avatar-container data-v-f97bc692"><image wx:if="{{a}}" class="avatar data-v-f97bc692" src="{{b}}" mode="aspectFill"></image><image wx:else class="avatar data-v-f97bc692" src="{{c}}" mode="aspectFill"></image><view wx:if="{{d}}" class="avatar-badge data-v-f97bc692"></view></view><view wx:if="{{e}}" class="user-details data-v-f97bc692"><view class="username data-v-f97bc692">{{f}}</view><view class="user-id data-v-f97bc692">{{g}}</view></view><view wx:else class="user-details data-v-f97bc692"><view class="username data-v-f97bc692">点击登录</view><view class="user-id data-v-f97bc692">授权登录后享受更多服务</view></view><view class="edit-profile data-v-f97bc692"><uni-icons wx:if="{{h}}" class="data-v-f97bc692" u-i="f97bc692-0" bind:__l="__l" u-p="{{h}}"></uni-icons></view></view></view><view class="balance-card data-v-f97bc692"><view class="balance-info data-v-f97bc692"><view class="balance-label data-v-f97bc692">押金余额</view><view class="balance-amount data-v-f97bc692">¥{{j}}</view></view><view class="action-button data-v-f97bc692" bindtap="{{k}}"><text class="data-v-f97bc692">提现</text></view></view><view class="function-list data-v-f97bc692"><view class="function-item data-v-f97bc692" bindtap="{{n}}"><view class="item-left data-v-f97bc692"><view class="item-icon data-v-f97bc692"><image class="data-v-f97bc692" src="{{l}}" mode="aspectFit"></image></view><text class="item-title data-v-f97bc692">订单中心</text></view><view class="item-right data-v-f97bc692"><uni-icons wx:if="{{m}}" class="data-v-f97bc692" u-i="f97bc692-1" bind:__l="__l" u-p="{{m}}"></uni-icons></view></view><view class="function-item data-v-f97bc692" bindtap="{{q}}"><view class="item-left data-v-f97bc692"><view class="item-icon data-v-f97bc692"><image class="data-v-f97bc692" src="{{o}}" mode="aspectFit"></image></view><text class="item-title data-v-f97bc692">投诉建议</text></view><view class="item-right data-v-f97bc692"><uni-icons wx:if="{{p}}" class="data-v-f97bc692" u-i="f97bc692-2" bind:__l="__l" u-p="{{p}}"></uni-icons></view></view><view class="function-item data-v-f97bc692" bindtap="{{t}}"><view class="item-left data-v-f97bc692"><view class="item-icon data-v-f97bc692"><image class="data-v-f97bc692" src="{{r}}" mode="aspectFit"></image></view><text class="item-title data-v-f97bc692">帮助中心</text></view><view class="item-right data-v-f97bc692"><uni-icons wx:if="{{s}}" class="data-v-f97bc692" u-i="f97bc692-3" bind:__l="__l" u-p="{{s}}"></uni-icons></view></view></view></view>
|
||||
+146
-255
@@ -23,306 +23,197 @@
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.my-container.data-v-f97bc692 {
|
||||
min-height: 87.5vh;
|
||||
background: #f8f8f8;
|
||||
.profile-container.data-v-f97bc692 {
|
||||
min-height: 100vh;
|
||||
background-color: #f5f7fa;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
.my-container .user-info.data-v-f97bc692 {
|
||||
height: 360rpx;
|
||||
background: linear-gradient(135deg, #1976D2, #42A5F5);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.my-container .user-info.data-v-f97bc692::before, .my-container .user-info.data-v-f97bc692::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
background-repeat: no-repeat;
|
||||
opacity: 0.1;
|
||||
}
|
||||
.my-container .user-info.data-v-f97bc692::before {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
left: -40rpx;
|
||||
top: -40rpx;
|
||||
background-image: radial-gradient(circle, #fff 2rpx, transparent 3rpx);
|
||||
background-size: 30rpx 30rpx;
|
||||
transform: rotate(30deg);
|
||||
}
|
||||
.my-container .user-info.data-v-f97bc692::after {
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
right: -60rpx;
|
||||
bottom: -60rpx;
|
||||
background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.2) 30%, transparent 30.5%), radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.2) 20%, transparent 20.5%);
|
||||
background-size: 60rpx 60rpx;
|
||||
background-position: 0 0, 30rpx 30rpx;
|
||||
transform: rotate(-15deg);
|
||||
}
|
||||
.my-container .user-info .floating-dots.data-v-f97bc692 {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
.my-container .user-info .floating-dots.data-v-f97bc692::before, .my-container .user-info .floating-dots.data-v-f97bc692::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
animation: float-f97bc692 3s infinite ease-in-out;
|
||||
}
|
||||
.my-container .user-info .floating-dots.data-v-f97bc692::before {
|
||||
top: 20%;
|
||||
right: 10%;
|
||||
animation-delay: -2s;
|
||||
}
|
||||
.my-container .user-info .floating-dots.data-v-f97bc692::after {
|
||||
top: 50%;
|
||||
right: 20%;
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
animation-delay: -1s;
|
||||
}
|
||||
.my-container .user-info .user-info-content.data-v-f97bc692 {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 60rpx 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.my-container .user-info .user-info-content .avatar-wrap.data-v-f97bc692 {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 70rpx;
|
||||
border: 6rpx solid rgba(255, 255, 255, 0.3);
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1), 0 0 0 6rpx rgba(255, 255, 255, 0.1);
|
||||
margin-right: 40rpx;
|
||||
position: relative;
|
||||
}
|
||||
.my-container .user-info .user-info-content .avatar-wrap.data-v-f97bc692::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -10%;
|
||||
left: -10%;
|
||||
right: -10%;
|
||||
bottom: -10%;
|
||||
background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
|
||||
animation: shine-f97bc692 2s infinite;
|
||||
}
|
||||
.my-container .user-info .user-info-content .avatar-wrap .avatar.data-v-f97bc692 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
}
|
||||
.my-container .user-info .user-info-content .info-content.not-login .login-text.data-v-f97bc692 {
|
||||
font-size: 40rpx;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
margin-bottom: 12rpx;
|
||||
display: block;
|
||||
}
|
||||
.my-container .user-info .user-info-content .info-content.not-login .login-desc.data-v-f97bc692 {
|
||||
font-size: 28rpx;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
display: block;
|
||||
}
|
||||
.my-container .user-info .user-info-content .info-content .text-group.data-v-f97bc692 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
}
|
||||
.my-container .user-info .user-info-content .info-content .text-group .nickname.data-v-f97bc692 {
|
||||
font-size: 42rpx;
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
.my-container .user-info .user-info-content .info-content .text-group .phone.data-v-f97bc692 {
|
||||
font-size: 30rpx;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
font-weight: 400;
|
||||
letter-spacing: 1rpx;
|
||||
position: relative;
|
||||
padding: 4rpx 24rpx;
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
border-radius: 24rpx;
|
||||
-webkit-backdrop-filter: blur(4px);
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
.my-container .user-info .wave-decoration.data-v-f97bc692 {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 120rpx;
|
||||
background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNDQwIDMyMCI+PHBhdGggZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjEpIiBkPSJNMCwyNjAuMjI3YzE3My42NjEsMCwzMjEuMTM3LDAsNDQyLjQyOCwwYzE4MS41MTcsMCwyODUuNjQ1LDAsMzk3LjU3MiwwQzk1Mi4zODksMjYwLjIyNywxMTQwLjI3MSwyNjAuMjI3LDE0NDAsMjYwLjIyN1YwSDBWMjYwLjIyN3oiLz48L3N2Zz4=") bottom/100% no-repeat;
|
||||
opacity: 0.8;
|
||||
}
|
||||
@keyframes float-f97bc692 {
|
||||
0%, 100% {
|
||||
transform: translateY(0) scale(1);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(-20rpx) scale(1.1);
|
||||
}
|
||||
}
|
||||
@keyframes shine-f97bc692 {
|
||||
0% {
|
||||
transform: translateX(-100%) rotate(45deg);
|
||||
}
|
||||
80%, 100% {
|
||||
transform: translateX(100%) rotate(45deg);
|
||||
}
|
||||
}
|
||||
.my-container .balance-card.data-v-f97bc692 {
|
||||
margin: -60rpx 30rpx 30rpx;
|
||||
background: #fff;
|
||||
border-radius: 24rpx;
|
||||
|
||||
/* Header Section */
|
||||
.header-section.data-v-f97bc692 {
|
||||
padding: 40rpx;
|
||||
background: linear-gradient(135deg, #4facfe, #00f2fe);
|
||||
position: relative;
|
||||
border-radius: 0 0 30rpx 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 10rpx 30rpx rgba(79, 172, 254, 0.2);
|
||||
}
|
||||
.user-profile.data-v-f97bc692 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.avatar-container.data-v-f97bc692 {
|
||||
position: relative;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
.avatar.data-v-f97bc692 {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 60rpx;
|
||||
border: 4rpx solid rgba(255, 255, 255, 0.6);
|
||||
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.avatar-badge.data-v-f97bc692 {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
border-radius: 18rpx;
|
||||
background-color: #ff9500;
|
||||
border: 4rpx solid white;
|
||||
}
|
||||
.user-details.data-v-f97bc692 {
|
||||
flex: 1;
|
||||
}
|
||||
.username.data-v-f97bc692 {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
color: white;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.user-id.data-v-f97bc692 {
|
||||
font-size: 26rpx;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
.edit-profile.data-v-f97bc692 {
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
padding: 10rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* Balance Card */
|
||||
.balance-card.data-v-f97bc692 {
|
||||
margin: 30rpx;
|
||||
background: white;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
box-shadow: 0 8rpx 32rpx rgba(25, 118, 210, 0.1);
|
||||
box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.my-container .balance-card .balance-content .label.data-v-f97bc692 {
|
||||
.balance-label.data-v-f97bc692 {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
margin-bottom: 12rpx;
|
||||
display: block;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.my-container .balance-card .balance-content .amount.data-v-f97bc692 {
|
||||
font-size: 52rpx;
|
||||
color: #1976D2;
|
||||
font-weight: bold;
|
||||
.balance-amount.data-v-f97bc692 {
|
||||
font-size: 48rpx;
|
||||
font-weight: 600;
|
||||
color: #4facfe;
|
||||
}
|
||||
.my-container .balance-card .withdraw-btn.data-v-f97bc692 {
|
||||
padding: 20rpx 36rpx;
|
||||
background: linear-gradient(135deg, #1976D2, #42A5F5);
|
||||
color: #fff;
|
||||
border-radius: 36rpx;
|
||||
font-size: 30rpx;
|
||||
.action-button.data-v-f97bc692 {
|
||||
background: linear-gradient(135deg, #4facfe, #00f2fe);
|
||||
border-radius: 40rpx;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-shadow: 0 4rpx 12rpx rgba(25, 118, 210, 0.2);
|
||||
justify-content: center;
|
||||
padding: 0 40rpx;
|
||||
color: white;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
box-shadow: 0 8rpx 16rpx rgba(79, 172, 254, 0.2);
|
||||
}
|
||||
.my-container .balance-card .withdraw-btn.data-v-f97bc692:active {
|
||||
.action-button.data-v-f97bc692:active {
|
||||
opacity: 0.9;
|
||||
transform: scale(0.98);
|
||||
}
|
||||
.my-container .balance-card .withdraw-btn .arrow.data-v-f97bc692 {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-top: 3rpx solid #fff;
|
||||
border-right: 3rpx solid #fff;
|
||||
transform: rotate(45deg);
|
||||
margin-left: 12rpx;
|
||||
.action-button text.data-v-f97bc692 {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.my-container .function-list.data-v-f97bc692 {
|
||||
margin: 0 30rpx;
|
||||
background: #fff;
|
||||
border-radius: 24rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
|
||||
|
||||
/* Function List */
|
||||
.function-list.data-v-f97bc692 {
|
||||
margin: 30rpx;
|
||||
background: white;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.my-container .function-list .function-item.data-v-f97bc692 {
|
||||
.function-item.data-v-f97bc692 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 32rpx 20rpx;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
transition: all 0.3s;
|
||||
align-items: center;
|
||||
padding: 32rpx 30rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
.my-container .function-list .function-item.data-v-f97bc692:active {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.my-container .function-list .function-item.data-v-f97bc692:last-child {
|
||||
.function-item.data-v-f97bc692:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.my-container .function-list .function-item .item-left.data-v-f97bc692 {
|
||||
.function-item.data-v-f97bc692:active {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
.item-left.data-v-f97bc692 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.my-container .function-list .function-item .item-left .icon-wrap.data-v-f97bc692 {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
.item-icon.data-v-f97bc692 {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
margin-right: 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 20rpx;
|
||||
background: #F5F9FF;
|
||||
}
|
||||
.my-container .function-list .function-item .item-left .icon-wrap .icon-image.data-v-f97bc692 {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
.item-icon image.data-v-f97bc692 {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
.my-container .function-list .function-item .item-left .title.data-v-f97bc692 {
|
||||
font-size: 32rpx;
|
||||
.item-title.data-v-f97bc692 {
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
}
|
||||
.my-container .function-list .function-item .arrow.data-v-f97bc692 {
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
border-top: 3rpx solid #999;
|
||||
border-right: 3rpx solid #999;
|
||||
transform: rotate(45deg);
|
||||
.item-right.data-v-f97bc692 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.my-container .popup-content.data-v-f97bc692 {
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx 24rpx 0 0;
|
||||
padding: 40rpx 30rpx;
|
||||
|
||||
/* Auth Popup */
|
||||
.auth-popup.data-v-f97bc692 {
|
||||
background-color: white;
|
||||
width: 100%;
|
||||
padding: 40rpx;
|
||||
border-radius: 15rpx;
|
||||
}
|
||||
.my-container .popup-content .popup-title.data-v-f97bc692 {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
.auth-title.data-v-f97bc692 {
|
||||
font-size: 34rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.auth-desc.data-v-f97bc692 {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
.my-container .popup-content .popup-body.data-v-f97bc692 {
|
||||
.auth-buttons.data-v-f97bc692 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 30rpx;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.my-container .popup-content .avatar-btn.data-v-f97bc692 {
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 44rpx;
|
||||
.cancel-btn.data-v-f97bc692,
|
||||
.confirm-btn.data-v-f97bc692 {
|
||||
width: 240rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
border-radius: 40rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
.my-container .popup-content .avatar-btn.data-v-f97bc692::after {
|
||||
.cancel-btn.data-v-f97bc692::after,
|
||||
.confirm-btn.data-v-f97bc692::after {
|
||||
border: none;
|
||||
}
|
||||
.my-container .popup-content .avatar-btn.data-v-f97bc692:active {
|
||||
opacity: 0.8;
|
||||
.cancel-btn.data-v-f97bc692 {
|
||||
background-color: #f0f0f0;
|
||||
color: #666;
|
||||
}
|
||||
.my-container .popup-content .nickname-input.data-v-f97bc692 {
|
||||
height: 88rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 44rpx;
|
||||
padding: 0 30rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.my-container .popup-content .submit-btn.data-v-f97bc692 {
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
background: #1976D2;
|
||||
color: #fff;
|
||||
border-radius: 44rpx;
|
||||
font-size: 30rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.my-container .popup-content .submit-btn.data-v-f97bc692:active {
|
||||
opacity: 0.9;
|
||||
.confirm-btn.data-v-f97bc692 {
|
||||
background: linear-gradient(135deg, #4facfe, #00f2fe);
|
||||
color: white;
|
||||
}
|
||||
+161
-87
@@ -1,64 +1,111 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const config_user = require("../../config/user.js");
|
||||
const constants_orderStatus = require("../../constants/orderStatus.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
currentTab: 0,
|
||||
OrderStatusMap: constants_orderStatus.OrderStatusMap,
|
||||
OrderStatusTabs: constants_orderStatus.OrderStatusTabs,
|
||||
orderList: []
|
||||
};
|
||||
},
|
||||
async onLoad(options) {
|
||||
if (options && options.orderId) {
|
||||
try {
|
||||
const res = await config_user.queryById(options.orderId);
|
||||
if (res.code === 200 && res.data) {
|
||||
const orderData = res.data;
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:76", "特定订单数据:", JSON.stringify(orderData));
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:77", "特定订单的开始时间:", orderData.startTime);
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:78", "特定订单的创建时间:", orderData.createTime);
|
||||
const orderStartTime = orderData.startTime || orderData.createTime || "";
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:82", "特定订单最终显示的开始时间:", orderStartTime);
|
||||
const formattedOrder = {
|
||||
orderNo: orderData.orderId,
|
||||
status: orderData.orderStatus,
|
||||
deviceId: orderData.deviceNo,
|
||||
startTime: orderStartTime,
|
||||
endTime: orderData.endTime || "",
|
||||
amount: orderData.payAmount || orderData.actualDeviceAmount || "0.00"
|
||||
};
|
||||
this.orderList = [formattedOrder, ...this.orderList];
|
||||
const tabIndex = this.OrderStatusTabs.findIndex(
|
||||
(tab) => tab.status.includes(orderData.orderStatus)
|
||||
);
|
||||
if (tabIndex !== -1) {
|
||||
this.switchTab(tabIndex);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/order/index.vue:106", "获取订单详情失败:", error);
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const currentTab = common_vendor.ref(0);
|
||||
const orderList = common_vendor.ref([]);
|
||||
const orderStatusMap = common_vendor.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"
|
||||
},
|
||||
"canceled": {
|
||||
text: "已取消",
|
||||
class: "status-cancelled"
|
||||
}
|
||||
}
|
||||
await this.getOrderList();
|
||||
},
|
||||
methods: {
|
||||
async getOrderList(statusList = []) {
|
||||
});
|
||||
const orderStatusTabs = common_vendor.reactive([
|
||||
{
|
||||
text: "全部",
|
||||
status: []
|
||||
},
|
||||
{
|
||||
text: "使用中",
|
||||
status: ["1", "in_used"]
|
||||
},
|
||||
{
|
||||
text: "已完成",
|
||||
status: ["2", "used_done"]
|
||||
},
|
||||
{
|
||||
text: "已取消",
|
||||
status: ["3", "canceled"]
|
||||
}
|
||||
]);
|
||||
common_vendor.onLoad(async (options) => {
|
||||
if (options && options.orderId) {
|
||||
try {
|
||||
const res = await config_user.queryById(options.orderId);
|
||||
if (res.code === 200 && res.data) {
|
||||
const orderData = res.data;
|
||||
const orderStartTime = orderData.startTime || orderData.createTime || "";
|
||||
const formattedOrder = {
|
||||
orderNo: orderData.orderId,
|
||||
status: orderData.orderStatus,
|
||||
deviceId: orderData.deviceNo,
|
||||
payWay: orderData.payWay,
|
||||
startTime: orderStartTime,
|
||||
endTime: orderData.endTime || "",
|
||||
amount: orderData.payAmount || orderData.actualDeviceAmount || "0.00"
|
||||
};
|
||||
orderList.value = [formattedOrder, ...orderList.value];
|
||||
const tabIndex = orderStatusTabs.findIndex(
|
||||
(tab) => tab.status.includes(orderData.orderStatus)
|
||||
);
|
||||
if (tabIndex !== -1) {
|
||||
switchTab(tabIndex);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/order/index.vue:199", "获取订单详情失败:", error);
|
||||
}
|
||||
}
|
||||
await loadOrderList();
|
||||
});
|
||||
const switchTab = async (index) => {
|
||||
currentTab.value = index;
|
||||
const statusList = orderStatusTabs[index].status;
|
||||
await loadOrderList(statusList);
|
||||
};
|
||||
const loadOrderList = async (statusList = []) => {
|
||||
try {
|
||||
const res = await config_user.getOrderList(statusList);
|
||||
if (res.code === 200 && res.data && res.data.records) {
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:118", "API返回的订单列表数据:", JSON.stringify(res.data.records));
|
||||
this.orderList = res.data.records.map((item) => {
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:122", `订单 ${item.orderId} 的开始时间:`, item.startTime);
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:123", `订单 ${item.orderId} 的创建时间:`, item.createTime);
|
||||
orderList.value = res.data.records.map((item) => {
|
||||
const orderStartTime = item.startTime || item.createTime || "";
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:127", `订单 ${item.orderId} 最终显示的开始时间:`, orderStartTime);
|
||||
return {
|
||||
orderNo: item.orderId,
|
||||
orderNo: item.orderNo,
|
||||
orderId: item.orderId,
|
||||
status: item.orderStatus,
|
||||
deviceId: item.deviceNo,
|
||||
payWay: item.payWay,
|
||||
startTime: orderStartTime,
|
||||
endTime: item.endTime || "",
|
||||
amount: item.payAmount || item.actualDeviceAmount || "0.00"
|
||||
@@ -66,50 +113,77 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/order/index.vue:140", "获取订单列表失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/order/index.vue:238", "获取订单列表失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: "获取订单列表失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
},
|
||||
async switchTab(index) {
|
||||
this.currentTab = index;
|
||||
const statusList = this.OrderStatusTabs[index].status;
|
||||
await this.getOrderList(statusList);
|
||||
}
|
||||
};
|
||||
const getOrderStatus = async (order) => {
|
||||
try {
|
||||
const res = await config_user.getOrderByOrderNoScorePayStatus(order.orderNo);
|
||||
if (res.code === 200) {
|
||||
common_vendor.index.showToast({
|
||||
title: "状态同步成功",
|
||||
icon: "success"
|
||||
});
|
||||
await loadOrderList(orderStatusTabs[currentTab.value].status);
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.showToast({
|
||||
title: "同步状态失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
};
|
||||
const navigateToReturn = (deviceId, orderId) => {
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:267", orderId);
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/return/index?deviceId=${deviceId}&orderId=${orderId}`
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.f(orderStatusTabs, (tab, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(tab.text),
|
||||
b: index,
|
||||
c: currentTab.value === index ? 1 : "",
|
||||
d: common_vendor.o(($event) => switchTab(index), index)
|
||||
};
|
||||
}),
|
||||
b: orderList.value.length === 0
|
||||
}, orderList.value.length === 0 ? {} : {}, {
|
||||
c: common_vendor.f(orderList.value, (order, index, i0) => {
|
||||
var _a, _b;
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(order.orderNo),
|
||||
b: common_vendor.t((_a = orderStatusMap[order.status]) == null ? void 0 : _a.text),
|
||||
c: common_vendor.n((_b = orderStatusMap[order.status]) == null ? void 0 : _b.class),
|
||||
d: common_vendor.t(order.deviceId),
|
||||
e: order.payWay == "wx_score_pay"
|
||||
}, order.payWay == "wx_score_pay" ? {
|
||||
f: common_assets._imports_0$2
|
||||
} : {}, {
|
||||
g: common_vendor.t(order.startTime),
|
||||
h: common_vendor.t(order.endTime || "-"),
|
||||
i: common_vendor.t(order.amount),
|
||||
j: order.status == "in_used"
|
||||
}, order.status == "in_used" ? {
|
||||
k: common_vendor.o(($event) => navigateToReturn(order.deviceId, order.orderId), index)
|
||||
} : {}, {
|
||||
l: order.status === "waiting_for_payment"
|
||||
}, order.status === "waiting_for_payment" ? {
|
||||
m: common_vendor.o(($event) => getOrderStatus(order), index)
|
||||
} : {}, {
|
||||
n: index
|
||||
});
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.f($data.OrderStatusTabs, (tab, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(tab.text),
|
||||
b: index,
|
||||
c: $data.currentTab === index ? 1 : "",
|
||||
d: common_vendor.o(($event) => $options.switchTab(index), index)
|
||||
};
|
||||
}),
|
||||
b: common_vendor.f($data.orderList, (order, index, i0) => {
|
||||
var _a, _b;
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(order.orderNo),
|
||||
b: common_vendor.t((_a = $data.OrderStatusMap[order.status]) == null ? void 0 : _a.text),
|
||||
c: common_vendor.n((_b = $data.OrderStatusMap[order.status]) == null ? void 0 : _b.class),
|
||||
d: order.status === 1
|
||||
}, order.status === 1 ? {
|
||||
e: `/pages/return/index?deviceId=${order.deviceId}&orderId=${order.orderNo}`
|
||||
} : {}, {
|
||||
f: common_vendor.t(order.deviceId),
|
||||
g: common_vendor.t(order.startTime),
|
||||
h: common_vendor.t(order.endTime || "-"),
|
||||
i: common_vendor.t(order.amount),
|
||||
j: index
|
||||
});
|
||||
}),
|
||||
c: $data.orderList.length === 0
|
||||
}, $data.orderList.length === 0 ? {} : {});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-17a44f9d"]]);
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-17a44f9d"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order/index.js.map
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
<view class="order-container data-v-17a44f9d"><view class="tab-bar data-v-17a44f9d"><view wx:for="{{a}}" wx:for-item="tab" wx:key="b" class="{{['tab-item', 'data-v-17a44f9d', tab.c && 'active']}}" bindtap="{{tab.d}}">{{tab.a}}</view></view><view class="order-list data-v-17a44f9d"><view wx:for="{{b}}" wx:for-item="order" wx:key="j" class="order-item data-v-17a44f9d"><view class="order-header data-v-17a44f9d"><text class="order-no data-v-17a44f9d">订单号:{{order.a}}</text><text class="{{['order-status', 'data-v-17a44f9d', order.c]}}">{{order.b}}</text><navigator wx:if="{{order.d}}" url="{{order.e}}" class="return-btn data-v-17a44f9d">归还设备</navigator></view><view class="order-content data-v-17a44f9d"><view class="device-info data-v-17a44f9d"><text class="device-name data-v-17a44f9d">共享风扇</text><text class="device-id data-v-17a44f9d">设备号:{{order.f}}</text></view><view class="time-info data-v-17a44f9d"><view class="time-item data-v-17a44f9d"><text class="label data-v-17a44f9d">开始时间:</text><text class="value data-v-17a44f9d">{{order.g}}</text></view><view class="time-item data-v-17a44f9d"><text class="label data-v-17a44f9d">结束时间:</text><text class="value data-v-17a44f9d">{{order.h}}</text></view></view><view class="price-info data-v-17a44f9d"><text class="amount data-v-17a44f9d">¥{{order.i}}</text></view></view></view></view><view wx:if="{{c}}" class="empty-tip data-v-17a44f9d"><view class="empty-icon data-v-17a44f9d"></view><text class="data-v-17a44f9d">暂无订单记录</text></view></view>
|
||||
<view class="order-container data-v-17a44f9d"><view class="status-tabs data-v-17a44f9d"><view wx:for="{{a}}" wx:for-item="tab" wx:key="b" class="{{['tab-item', 'data-v-17a44f9d', tab.c && 'active']}}" bindtap="{{tab.d}}">{{tab.a}}</view></view><view class="order-list data-v-17a44f9d"><view wx:if="{{b}}" class="empty-state data-v-17a44f9d"><view class="empty-icon data-v-17a44f9d"></view><text class="empty-text data-v-17a44f9d">暂无订单记录</text></view><view wx:for="{{c}}" wx:for-item="order" wx:key="n" class="order-item data-v-17a44f9d"><view class="order-header data-v-17a44f9d"><view class="order-id data-v-17a44f9d"><text class="data-v-17a44f9d">订单号:{{order.a}}</text></view><view class="{{['order-status', 'data-v-17a44f9d', order.c]}}">{{order.b}}</view></view><view class="order-body data-v-17a44f9d"><view class="device-info data-v-17a44f9d"><view class="device-left data-v-17a44f9d"><view class="device-name data-v-17a44f9d">共享风扇</view><view class="device-id data-v-17a44f9d">设备号:{{order.d}}</view></view><view class="device-right data-v-17a44f9d"><view wx:if="{{order.e}}" class="payment-badge wx-score data-v-17a44f9d"><image src="{{order.f}}" mode="aspectFit" class="badge-icon data-v-17a44f9d"></image><view class="badge-text data-v-17a44f9d"><text class="data-v-17a44f9d">微信支付分</text><text class="divider data-v-17a44f9d">|</text><text class="highlight data-v-17a44f9d">免押租借</text></view></view><view wx:else class="payment-badge deposit data-v-17a44f9d"><text class="badge-text data-v-17a44f9d">押金租借</text></view></view></view><view class="order-times data-v-17a44f9d"><view class="time-row data-v-17a44f9d"><text class="time-label data-v-17a44f9d">开始时间:</text><text class="time-value data-v-17a44f9d">{{order.g}}</text></view><view class="time-row data-v-17a44f9d"><text class="time-label data-v-17a44f9d">结束时间:</text><text class="time-value data-v-17a44f9d">{{order.h}}</text></view></view></view><view class="order-footer data-v-17a44f9d"><view class="price data-v-17a44f9d">¥{{order.i}}</view><view class="actions data-v-17a44f9d"><view wx:if="{{order.j}}" class="action-item primary data-v-17a44f9d" bindtap="{{order.k}}"> 归还设备 </view><view wx:if="{{order.l}}" class="action-item secondary data-v-17a44f9d" bindtap="{{order.m}}"> 同步订单状态 </view></view></view></view></view></view>
|
||||
+129
-56
@@ -25,31 +25,34 @@
|
||||
/* 文章场景相关 */
|
||||
.order-container.data-v-17a44f9d {
|
||||
min-height: 100vh;
|
||||
background: #f8f8f8;
|
||||
background: #f7f8fa;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
.order-container .tab-bar.data-v-17a44f9d {
|
||||
.order-container .status-tabs.data-v-17a44f9d {
|
||||
display: flex;
|
||||
background: #fff;
|
||||
padding: 20rpx 0;
|
||||
padding: 0 20rpx;
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
z-index: 10;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.order-container .tab-bar .tab-item.data-v-17a44f9d {
|
||||
.order-container .status-tabs .tab-item.data-v-17a44f9d {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
height: 90rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
position: relative;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.order-container .tab-bar .tab-item.active.data-v-17a44f9d {
|
||||
.order-container .status-tabs .tab-item.active.data-v-17a44f9d {
|
||||
color: #1976D2;
|
||||
font-weight: 500;
|
||||
}
|
||||
.order-container .tab-bar .tab-item.active.data-v-17a44f9d::after {
|
||||
.order-container .status-tabs .tab-item.active.data-v-17a44f9d::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
@@ -65,89 +68,159 @@
|
||||
}
|
||||
.order-container .order-list .order-item.data-v-17a44f9d {
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 30rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.order-container .order-list .order-item .order-header.data-v-17a44f9d {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
padding: 24rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
.order-container .order-list .order-item .order-header .order-no.data-v-17a44f9d {
|
||||
.order-container .order-list .order-item .order-header .order-id.data-v-17a44f9d {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
}
|
||||
.order-container .order-list .order-item .order-header .order-status.data-v-17a44f9d {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.order-container .order-list .order-item .order-header .order-status.status-waiting.data-v-17a44f9d {
|
||||
color: #FF9800;
|
||||
}
|
||||
.order-container .order-list .order-item .order-header .order-status.status-progress.data-v-17a44f9d {
|
||||
color: #2196F3;
|
||||
}
|
||||
.order-container .order-list .order-item .order-header .order-status.status-success.data-v-17a44f9d {
|
||||
color: #4CAF50;
|
||||
}
|
||||
.order-container .order-list .order-item .order-header .order-status.status-using.data-v-17a44f9d {
|
||||
color: #1976D2;
|
||||
}
|
||||
.order-container .order-list .order-item .order-header .order-status.status-failed.data-v-17a44f9d {
|
||||
color: #F44336;
|
||||
}
|
||||
.order-container .order-list .order-item .order-header .order-status.status-cancelled.data-v-17a44f9d {
|
||||
color: #9E9E9E;
|
||||
color: #2196F3;
|
||||
}
|
||||
.order-container .order-list .order-item .order-header .order-status.status-finished.data-v-17a44f9d {
|
||||
color: #4CAF50;
|
||||
}
|
||||
.order-container .order-list .order-item .order-content.data-v-17a44f9d {
|
||||
padding-top: 20rpx;
|
||||
.order-container .order-list .order-item .order-header .order-status.status-cancelled.data-v-17a44f9d {
|
||||
color: #9E9E9E;
|
||||
}
|
||||
.order-container .order-list .order-item .order-content .device-info.data-v-17a44f9d {
|
||||
.order-container .order-list .order-item .order-body.data-v-17a44f9d {
|
||||
padding: 24rpx;
|
||||
}
|
||||
.order-container .order-list .order-item .order-body .device-info.data-v-17a44f9d {
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.order-container .order-list .order-item .order-content .device-info .device-name.data-v-17a44f9d {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
.order-container .order-list .order-item .order-body .device-info .device-left.data-v-17a44f9d {
|
||||
flex: 1;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.order-container .order-list .order-item .order-content .device-info .device-id.data-v-17a44f9d {
|
||||
.order-container .order-list .order-item .order-body .device-info .device-left .device-name.data-v-17a44f9d {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
.order-container .order-list .order-item .order-body .device-info .device-left .device-id.data-v-17a44f9d {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.order-container .order-list .order-item .order-content .time-info .time-item.data-v-17a44f9d {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
margin-bottom: 10rpx;
|
||||
.order-container .order-list .order-item .order-body .device-info .device-right .payment-badge.data-v-17a44f9d {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 6rpx 12rpx;
|
||||
border-radius: 8rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.order-container .order-list .order-item .order-content .time-info .time-item .label.data-v-17a44f9d {
|
||||
color: #999;
|
||||
.order-container .order-list .order-item .order-body .device-info .device-right .payment-badge.wx-score.data-v-17a44f9d {
|
||||
background: rgba(7, 193, 96, 0.08);
|
||||
}
|
||||
.order-container .order-list .order-item .order-content .price-info.data-v-17a44f9d {
|
||||
text-align: right;
|
||||
margin-top: 20rpx;
|
||||
.order-container .order-list .order-item .order-body .device-info .device-right .payment-badge.wx-score .badge-icon.data-v-17a44f9d {
|
||||
width: 32rpx;
|
||||
height: 26rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
.order-container .order-list .order-item .order-content .price-info .amount.data-v-17a44f9d {
|
||||
font-size: 36rpx;
|
||||
color: #FF9800;
|
||||
.order-container .order-list .order-item .order-body .device-info .device-right .payment-badge.wx-score .badge-text.data-v-17a44f9d {
|
||||
font-size: 22rpx;
|
||||
color: #07c160;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.order-container .order-list .order-item .order-body .device-info .device-right .payment-badge.wx-score .badge-text .divider.data-v-17a44f9d {
|
||||
margin: 0 6rpx;
|
||||
}
|
||||
.order-container .order-list .order-item .order-body .device-info .device-right .payment-badge.wx-score .badge-text .highlight.data-v-17a44f9d {
|
||||
font-weight: 500;
|
||||
}
|
||||
.order-container .empty-tip.data-v-17a44f9d {
|
||||
.order-container .order-list .order-item .order-body .device-info .device-right .payment-badge.deposit.data-v-17a44f9d {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
.order-container .order-list .order-item .order-body .device-info .device-right .payment-badge.deposit .badge-text.data-v-17a44f9d {
|
||||
font-size: 22rpx;
|
||||
color: #666;
|
||||
font-weight: 500;
|
||||
}
|
||||
.order-container .order-list .order-item .order-body .order-times .time-row.data-v-17a44f9d {
|
||||
display: flex;
|
||||
font-size: 26rpx;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.order-container .order-list .order-item .order-body .order-times .time-row .time-label.data-v-17a44f9d {
|
||||
color: #999;
|
||||
width: 140rpx;
|
||||
}
|
||||
.order-container .order-list .order-item .order-body .order-times .time-row .time-value.data-v-17a44f9d {
|
||||
color: #333;
|
||||
flex: 1;
|
||||
}
|
||||
.order-container .order-list .order-item .order-footer.data-v-17a44f9d {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx 24rpx;
|
||||
background: #fafafa;
|
||||
border-top: 1rpx solid #f0f0f0;
|
||||
}
|
||||
.order-container .order-list .order-item .order-footer .price.data-v-17a44f9d {
|
||||
font-size: 34rpx;
|
||||
font-weight: 500;
|
||||
color: #ff6b6b;
|
||||
}
|
||||
.order-container .order-list .order-item .order-footer .actions.data-v-17a44f9d {
|
||||
display: flex;
|
||||
}
|
||||
.order-container .order-list .order-item .order-footer .actions .action-item.data-v-17a44f9d {
|
||||
font-size: 26rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 30rpx;
|
||||
margin-left: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.order-container .order-list .order-item .order-footer .actions .action-item.primary.data-v-17a44f9d {
|
||||
background: #1976D2;
|
||||
color: #fff;
|
||||
}
|
||||
.order-container .order-list .order-item .order-footer .actions .action-item.secondary.data-v-17a44f9d {
|
||||
background: #f5f5f5;
|
||||
color: #666;
|
||||
border: 1rpx solid #e0e0e0;
|
||||
}
|
||||
.order-container .order-list .order-item .order-footer .actions .action-item.data-v-17a44f9d:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.order-container .order-list .empty-state.data-v-17a44f9d {
|
||||
padding: 100rpx 0;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.order-container .empty-tip .empty-icon.data-v-17a44f9d {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
margin: 0 auto 20rpx;
|
||||
background: #f0f0f0;
|
||||
.order-container .order-list .empty-state .empty-icon.data-v-17a44f9d {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
margin: 0 auto 30rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.order-container .order-list .empty-state .empty-text.data-v-17a44f9d {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
+57
-41
@@ -2,6 +2,7 @@
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const config_user = require("../../config/user.js");
|
||||
const config_url = require("../../config/url.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
@@ -13,8 +14,10 @@ const _sfc_main = {
|
||||
// 用于调试
|
||||
usedTime: "0分钟",
|
||||
currentFee: "0.00",
|
||||
orderStatus: "in_used"
|
||||
orderStatus: "in_used",
|
||||
// 默认状态为使用中
|
||||
payWay: ""
|
||||
// 新增支付方式字段
|
||||
},
|
||||
timer: null,
|
||||
statusCheckTimer: null,
|
||||
@@ -28,11 +31,11 @@ const _sfc_main = {
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:97", "Return page loaded with options:", JSON.stringify(options));
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:117", "Return page loaded with options:", JSON.stringify(options));
|
||||
this.isPageActive = true;
|
||||
this.orderInfo.orderId = options.orderId || "";
|
||||
this.deviceId = options.deviceNo || options.deviceId || "";
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:106", `初始化参数: orderId=${this.orderInfo.orderId}, deviceId=${this.deviceId}`);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:126", `初始化参数: orderId=${this.orderInfo.orderId}, deviceId=${this.deviceId}`);
|
||||
if (!this.orderInfo.orderId && this.deviceId) {
|
||||
this.getOrderByDevice();
|
||||
} else if (this.orderInfo.orderId) {
|
||||
@@ -44,12 +47,12 @@ const _sfc_main = {
|
||||
if (this.$orderMonitor) {
|
||||
this.$orderMonitor.removeOrder({ orderId: this.orderInfo.orderId });
|
||||
this.$orderMonitor.addOrder({ orderId: this.orderInfo.orderId }, "return");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:129", "订单已添加到监控队列:", this.orderInfo.orderId);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:149", "订单已添加到监控队列:", this.orderInfo.orderId);
|
||||
} else {
|
||||
common_vendor.index.__f__("warn", "at pages/return/index.vue:131", "$orderMonitor 未定义,无法添加订单到监控队列");
|
||||
common_vendor.index.__f__("warn", "at pages/return/index.vue:151", "$orderMonitor 未定义,无法添加订单到监控队列");
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:134", "添加订单到监控队列失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:154", "添加订单到监控队列失败:", error);
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.showToast({
|
||||
@@ -64,14 +67,14 @@ const _sfc_main = {
|
||||
},
|
||||
// 添加onHide生命周期,处理页面隐藏时的清理工作
|
||||
onHide() {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:154", "归还页面隐藏,清理计时器资源和监控服务");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:174", "归还页面隐藏,清理计时器资源和监控服务");
|
||||
this.isPageActive = false;
|
||||
this.clearTimer();
|
||||
this.clearStatusCheckTimer();
|
||||
this.removeFromOrderMonitor();
|
||||
},
|
||||
onUnload() {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:166", "归还页面卸载,清理所有资源");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:186", "归还页面卸载,清理所有资源");
|
||||
this.isPageActive = false;
|
||||
this.clearTimer();
|
||||
this.clearStatusCheckTimer();
|
||||
@@ -84,15 +87,15 @@ const _sfc_main = {
|
||||
if (this.orderInfo.orderId && this.$orderMonitor) {
|
||||
try {
|
||||
this.$orderMonitor.removeOrder({ orderId: this.orderInfo.orderId });
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:186", "订单已从监控队列移除:", this.orderInfo.orderId);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:206", "订单已从监控队列移除:", this.orderInfo.orderId);
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:188", "从监控队列移除订单失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:208", "从监控队列移除订单失败:", error);
|
||||
}
|
||||
}
|
||||
},
|
||||
// 处理订单完成事件(可由任何地方触发)
|
||||
handleOrderCompleted(orderData) {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:194", "收到订单完成事件:", orderData);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:214", "收到订单完成事件:", orderData);
|
||||
if (orderData.orderId === this.orderInfo.orderId || orderData.orderNo === this.orderInfo.orderNo) {
|
||||
this.showReturnSuccessModal(orderData);
|
||||
}
|
||||
@@ -135,35 +138,38 @@ const _sfc_main = {
|
||||
// 获取订单详情
|
||||
async getOrderDetails() {
|
||||
if (!this.isPageActive) {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:250", "页面已不活跃,跳过订单详情请求");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:270", "页面已不活跃,跳过订单详情请求");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (!this.orderInfo.orderId) {
|
||||
throw new Error("订单ID不能为空");
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:261", "请求订单详情, orderId:", this.orderInfo.orderId);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:281", "请求订单详情, orderId:", this.orderInfo.orderId);
|
||||
const result = await config_user.queryById(this.orderInfo.orderId);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:263", "订单详情结果:", JSON.stringify(result));
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:283", "订单详情结果:", JSON.stringify(result));
|
||||
if (result.code === 200 && result.data) {
|
||||
const orderData = result.data;
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:267", "订单原始数据:", orderData);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:268", "开始时间字段:", orderData.startTime, typeof orderData.startTime);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:287", "订单原始数据:", orderData);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:288", "开始时间字段:", orderData.startTime, typeof orderData.startTime);
|
||||
if (orderData.orderStatus) {
|
||||
this.orderInfo.orderStatus = orderData.orderStatus;
|
||||
}
|
||||
if (orderData.payWay) {
|
||||
this.orderInfo.payWay = orderData.payWay;
|
||||
}
|
||||
if (orderData.orderStatus && (orderData.orderStatus === "used_done" || orderData.orderStatus === "used_down")) {
|
||||
common_vendor.index.$emit("orderCompleted", orderData);
|
||||
this.showReturnSuccessModal(orderData);
|
||||
return;
|
||||
}
|
||||
this.updateOrderInfo(orderData);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:290", "更新后的开始时间:", this.orderInfo.startTime);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:315", "更新后的开始时间:", this.orderInfo.startTime);
|
||||
} else {
|
||||
throw new Error(result.msg || "获取订单详情失败");
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:295", "获取订单详情错误:", error);
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:320", "获取订单详情错误:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: error.message || "获取订单信息失败",
|
||||
icon: "none"
|
||||
@@ -186,25 +192,28 @@ const _sfc_main = {
|
||||
},
|
||||
// 使用后端返回的使用时长和费用数据
|
||||
updateOrderInfo(orderData) {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:323", "更新订单信息:", JSON.stringify(orderData));
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:348", "更新订单信息:", JSON.stringify(orderData));
|
||||
this.orderInfo.usedTime = orderData.usedTime || "0分钟";
|
||||
this.orderInfo.currentFee = orderData.currentFee || orderData.actualDeviceAmount || orderData.payAmount || "0.00";
|
||||
if (orderData.orderStatus) {
|
||||
this.orderInfo.orderStatus = orderData.orderStatus;
|
||||
}
|
||||
if (orderData.payWay) {
|
||||
this.orderInfo.payWay = orderData.payWay;
|
||||
}
|
||||
this.orderInfo._rawStartTime = orderData.startTime;
|
||||
if (orderData.startTime) {
|
||||
try {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:342", "API返回的开始时间:", orderData.startTime);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:372", "API返回的开始时间:", orderData.startTime);
|
||||
this.orderInfo.startTime = orderData.startTime;
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:346", "更新开始时间错误:", e);
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:376", "更新开始时间错误:", e);
|
||||
this.orderInfo.startTime = "未知";
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.__f__("warn", "at pages/return/index.vue:350", "API返回的订单数据中没有startTime字段");
|
||||
common_vendor.index.__f__("warn", "at pages/return/index.vue:380", "API返回的订单数据中没有startTime字段");
|
||||
if (orderData.createTime) {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:353", "使用createTime作为备选:", orderData.createTime);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:383", "使用createTime作为备选:", orderData.createTime);
|
||||
this.orderInfo.startTime = orderData.createTime;
|
||||
} else {
|
||||
this.orderInfo.startTime = "未知";
|
||||
@@ -219,21 +228,21 @@ const _sfc_main = {
|
||||
this.clearTimer();
|
||||
this.timer = setInterval(() => {
|
||||
if (this.isPageActive) {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:375", "执行定时更新订单信息");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:405", "执行定时更新订单信息");
|
||||
this.getOrderDetails();
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:378", "页面已不活跃,停止计时器");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:408", "页面已不活跃,停止计时器");
|
||||
this.clearTimer();
|
||||
}
|
||||
}, 6e4);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:383", "已启动使用时长更新计时器");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:413", "已启动使用时长更新计时器");
|
||||
},
|
||||
// 清除定时器
|
||||
clearTimer() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:391", "已清除使用时长更新计时器");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:421", "已清除使用时长更新计时器");
|
||||
}
|
||||
},
|
||||
// 清除状态检查定时器
|
||||
@@ -241,7 +250,7 @@ const _sfc_main = {
|
||||
if (this.statusCheckTimer) {
|
||||
clearInterval(this.statusCheckTimer);
|
||||
this.statusCheckTimer = null;
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:400", "已清除归还状态检查计时器");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:430", "已清除归还状态检查计时器");
|
||||
}
|
||||
},
|
||||
// 开始状态检查定时器
|
||||
@@ -251,7 +260,7 @@ const _sfc_main = {
|
||||
this.statusCheckTimer = setInterval(() => {
|
||||
if (this.isPageActive) {
|
||||
this.currentStatusChecks++;
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:414", `执行归还状态检查 (${this.currentStatusChecks}/${this.maxStatusChecks})`);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:444", `执行归还状态检查 (${this.currentStatusChecks}/${this.maxStatusChecks})`);
|
||||
this.checkReturnStatus();
|
||||
if (this.currentStatusChecks >= this.maxStatusChecks) {
|
||||
this.clearStatusCheckTimer();
|
||||
@@ -262,11 +271,11 @@ const _sfc_main = {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:429", "页面已不活跃,停止状态检查计时器");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:459", "页面已不活跃,停止状态检查计时器");
|
||||
this.clearStatusCheckTimer();
|
||||
}
|
||||
}, this.statusCheckInterval);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:434", "已启动归还状态检查计时器");
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:464", "已启动归还状态检查计时器");
|
||||
},
|
||||
// 通过设备号查询使用中的订单
|
||||
async getOrderByDevice() {
|
||||
@@ -282,16 +291,19 @@ const _sfc_main = {
|
||||
"Clientid": common_vendor.index.getStorageSync("client_id")
|
||||
}
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:456", "通过设备号查询订单结果:", JSON.stringify(inUseRes));
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:486", "通过设备号查询订单结果:", JSON.stringify(inUseRes));
|
||||
if (inUseRes.statusCode === 200 && inUseRes.data.code === 200 && inUseRes.data.data) {
|
||||
const inUseOrder = inUseRes.data.data;
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:460", "使用中的订单:", inUseOrder);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:490", "使用中的订单:", inUseOrder);
|
||||
this.orderInfo.orderId = inUseOrder.orderId;
|
||||
if (inUseOrder.orderStatus) {
|
||||
this.orderInfo.orderStatus = inUseOrder.orderStatus;
|
||||
}
|
||||
if (inUseOrder.payWay) {
|
||||
this.orderInfo.payWay = inUseOrder.payWay;
|
||||
}
|
||||
if (inUseOrder.startTime) {
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:472", "inUse API返回的开始时间:", inUseOrder.startTime);
|
||||
common_vendor.index.__f__("log", "at pages/return/index.vue:507", "inUse API返回的开始时间:", inUseOrder.startTime);
|
||||
this.orderInfo.startTime = inUseOrder.startTime;
|
||||
}
|
||||
this.getOrderDetails();
|
||||
@@ -301,7 +313,7 @@ const _sfc_main = {
|
||||
throw new Error("未找到使用中的订单");
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:486", "通过设备号查询订单失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:521", "通过设备号查询订单失败:", error);
|
||||
common_vendor.index.showToast({
|
||||
title: error.message || "获取订单信息失败",
|
||||
icon: "none"
|
||||
@@ -320,7 +332,7 @@ const _sfc_main = {
|
||||
await this.getOrderDetails();
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:509", "检查归还状态失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/return/index.vue:544", "检查归还状态失败:", error);
|
||||
}
|
||||
},
|
||||
// 返回首页
|
||||
@@ -336,12 +348,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
a: common_vendor.t($options.getOrderStatusText()),
|
||||
b: common_vendor.t($data.orderInfo.orderId),
|
||||
c: common_vendor.t($data.deviceId),
|
||||
d: common_vendor.t($data.orderInfo.startTime),
|
||||
e: common_vendor.t($data.orderInfo.usedTime),
|
||||
f: common_vendor.t($data.orderInfo.currentFee)
|
||||
d: $data.orderInfo.payWay == "wx_score_pay"
|
||||
}, $data.orderInfo.payWay == "wx_score_pay" ? {
|
||||
e: common_assets._imports_0$2
|
||||
} : {}, {
|
||||
f: common_vendor.t($data.orderInfo.startTime),
|
||||
g: common_vendor.t($data.orderInfo.usedTime),
|
||||
h: common_vendor.t($data.orderInfo.currentFee)
|
||||
}, {}, {
|
||||
j: common_vendor.o((...args) => $options.checkReturnStatus && $options.checkReturnStatus(...args)),
|
||||
k: common_vendor.o((...args) => $options.goToHome && $options.goToHome(...args))
|
||||
l: common_vendor.o((...args) => $options.checkReturnStatus && $options.checkReturnStatus(...args)),
|
||||
m: common_vendor.o((...args) => $options.goToHome && $options.goToHome(...args))
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-6d22bdf8"]]);
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
<view class="return-container data-v-6d22bdf8"><view class="order-card data-v-6d22bdf8"><view class="order-header data-v-6d22bdf8"><text class="title data-v-6d22bdf8">{{a}}</text><text class="order-no data-v-6d22bdf8">订单号:{{b}}</text></view><view class="device-info data-v-6d22bdf8"><text class="device-name data-v-6d22bdf8">共享风扇</text><text class="device-id data-v-6d22bdf8">设备号:{{c}}</text></view><view class="time-info data-v-6d22bdf8"><view class="time-item data-v-6d22bdf8"><text class="label data-v-6d22bdf8">开始时间</text><text class="value data-v-6d22bdf8">{{d}}</text></view><view class="time-item data-v-6d22bdf8"><text class="label data-v-6d22bdf8">已使用时长</text><text class="value highlight data-v-6d22bdf8">{{e}}</text></view><view class="time-item data-v-6d22bdf8"><text class="label data-v-6d22bdf8">当前费用</text><text class="value data-v-6d22bdf8">¥{{f}}</text></view></view><view wx:if="{{false}}" class="debug-info data-v-6d22bdf8"><view class="debug-title data-v-6d22bdf8">调试信息</view><view class="debug-item data-v-6d22bdf8">原始开始时间: {{g}}</view><view class="debug-item data-v-6d22bdf8">处理后开始时间: {{h}}</view><view class="debug-item data-v-6d22bdf8">订单状态: {{i}}</view></view></view><view class="notice-card data-v-6d22bdf8"><view class="notice-title data-v-6d22bdf8">归还说明</view><view class="notice-list data-v-6d22bdf8"><view class="notice-item data-v-6d22bdf8"><view class="dot data-v-6d22bdf8"></view><text class="data-v-6d22bdf8">请确保设备完好无损</text></view><view class="notice-item data-v-6d22bdf8"><view class="dot data-v-6d22bdf8"></view><text class="data-v-6d22bdf8">将充电宝插入原位置或空闲插口</text></view><view class="notice-item data-v-6d22bdf8"><view class="dot data-v-6d22bdf8"></view><text class="data-v-6d22bdf8">系统将自动检测归还并处理退款</text></view><view class="notice-item data-v-6d22bdf8"><view class="dot data-v-6d22bdf8"></view><text class="data-v-6d22bdf8">归还成功后将自动跳转到成功页面</text></view></view></view><view class="bottom-bar data-v-6d22bdf8"><button class="secondary-btn data-v-6d22bdf8" bindtap="{{j}}">刷新状态</button><button class="primary-btn data-v-6d22bdf8" bindtap="{{k}}">返回首页</button></view></view>
|
||||
<view class="return-container data-v-6d22bdf8"><view class="order-card data-v-6d22bdf8"><view class="order-header data-v-6d22bdf8"><text class="title data-v-6d22bdf8">{{a}}</text><text class="order-no data-v-6d22bdf8">订单号:{{b}}</text></view><view class="device-info data-v-6d22bdf8"><view class="device-left data-v-6d22bdf8"><view class="device-name data-v-6d22bdf8">共享风扇</view><view class="device-id data-v-6d22bdf8">设备号:{{c}}</view></view><view class="device-right data-v-6d22bdf8"><view wx:if="{{d}}" class="payment-badge wx-score data-v-6d22bdf8"><image src="{{e}}" mode="aspectFit" class="badge-icon data-v-6d22bdf8"></image><view class="badge-text data-v-6d22bdf8"><text class="data-v-6d22bdf8">微信支付分</text><text class="divider data-v-6d22bdf8">|</text><text class="highlight data-v-6d22bdf8">免押租借</text></view></view><view wx:else class="payment-badge deposit data-v-6d22bdf8"><text class="badge-text data-v-6d22bdf8">押金租借</text></view></view></view><view class="time-info data-v-6d22bdf8"><view class="time-item data-v-6d22bdf8"><text class="label data-v-6d22bdf8">开始时间</text><text class="value data-v-6d22bdf8">{{f}}</text></view><view class="time-item data-v-6d22bdf8"><text class="label data-v-6d22bdf8">已使用时长</text><text class="value highlight data-v-6d22bdf8">{{g}}</text></view><view class="time-item data-v-6d22bdf8"><text class="label data-v-6d22bdf8">当前费用</text><text class="value data-v-6d22bdf8">¥{{h}}</text></view></view><view wx:if="{{false}}" class="debug-info data-v-6d22bdf8"><view class="debug-title data-v-6d22bdf8">调试信息</view><view class="debug-item data-v-6d22bdf8">原始开始时间: {{i}}</view><view class="debug-item data-v-6d22bdf8">处理后开始时间: {{j}}</view><view class="debug-item data-v-6d22bdf8">订单状态: {{k}}</view></view></view><view class="notice-card data-v-6d22bdf8"><view class="notice-title data-v-6d22bdf8">归还说明</view><view class="notice-list data-v-6d22bdf8"><view class="notice-item data-v-6d22bdf8"><view class="dot data-v-6d22bdf8"></view><text class="data-v-6d22bdf8">请确保设备完好无损</text></view><view class="notice-item data-v-6d22bdf8"><view class="dot data-v-6d22bdf8"></view><text class="data-v-6d22bdf8">将充电宝插入原位置或空闲插口</text></view><view class="notice-item data-v-6d22bdf8"><view class="dot data-v-6d22bdf8"></view><text class="data-v-6d22bdf8">系统将自动检测归还并处理退款</text></view><view class="notice-item data-v-6d22bdf8"><view class="dot data-v-6d22bdf8"></view><text class="data-v-6d22bdf8">归还成功后将自动跳转到成功页面</text></view></view></view><view class="bottom-bar data-v-6d22bdf8"><view class="action-item secondary data-v-6d22bdf8" bindtap="{{l}}">刷新状态</view><view class="action-item primary data-v-6d22bdf8" bindtap="{{m}}">返回首页</view></view></view>
|
||||
+72
-24
@@ -25,14 +25,14 @@
|
||||
/* 文章场景相关 */
|
||||
.return-container.data-v-6d22bdf8 {
|
||||
min-height: 100vh;
|
||||
background: #f8f8f8;
|
||||
background: #f7f8fa;
|
||||
padding: 30rpx;
|
||||
padding-bottom: 180rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.return-container .order-card.data-v-6d22bdf8 {
|
||||
background: #fff;
|
||||
border-radius: 24rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
|
||||
@@ -41,10 +41,12 @@
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
.return-container .order-card .order-header .title.data-v-6d22bdf8 {
|
||||
font-size: 32rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
@@ -53,17 +55,60 @@
|
||||
color: #999;
|
||||
}
|
||||
.return-container .order-card .device-info.data-v-6d22bdf8 {
|
||||
margin-bottom: 30rpx;
|
||||
margin-bottom: 24rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.return-container .order-card .device-info .device-name.data-v-6d22bdf8 {
|
||||
font-size: 28rpx;
|
||||
.return-container .order-card .device-info .device-left.data-v-6d22bdf8 {
|
||||
flex: 1;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.return-container .order-card .device-info .device-left .device-name.data-v-6d22bdf8 {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
display: block;
|
||||
margin-bottom: 10rpx;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.return-container .order-card .device-info .device-id.data-v-6d22bdf8 {
|
||||
font-size: 24rpx;
|
||||
.return-container .order-card .device-info .device-left .device-id.data-v-6d22bdf8 {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.return-container .order-card .device-info .device-right .payment-badge.data-v-6d22bdf8 {
|
||||
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-6d22bdf8 {
|
||||
background: rgba(7, 193, 96, 0.08);
|
||||
}
|
||||
.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-icon.data-v-6d22bdf8 {
|
||||
width: 32rpx;
|
||||
height: 26rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-text.data-v-6d22bdf8 {
|
||||
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-6d22bdf8 {
|
||||
margin: 0 6rpx;
|
||||
}
|
||||
.return-container .order-card .device-info .device-right .payment-badge.wx-score .badge-text .highlight.data-v-6d22bdf8 {
|
||||
font-weight: 500;
|
||||
}
|
||||
.return-container .order-card .device-info .device-right .payment-badge.deposit.data-v-6d22bdf8 {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
.return-container .order-card .device-info .device-right .payment-badge.deposit .badge-text.data-v-6d22bdf8 {
|
||||
font-size: 22rpx;
|
||||
color: #666;
|
||||
font-weight: 500;
|
||||
}
|
||||
.return-container .order-card .time-info.data-v-6d22bdf8 {
|
||||
background: #f9f9f9;
|
||||
@@ -88,18 +133,18 @@
|
||||
color: #333;
|
||||
}
|
||||
.return-container .order-card .time-info .time-item .value.highlight.data-v-6d22bdf8 {
|
||||
color: #ff6b00;
|
||||
color: #ff6b6b;
|
||||
font-weight: bold;
|
||||
}
|
||||
.return-container .notice-card.data-v-6d22bdf8 {
|
||||
background: #fff;
|
||||
border-radius: 24rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.return-container .notice-card .notice-title.data-v-6d22bdf8 {
|
||||
font-size: 28rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 20rpx;
|
||||
@@ -131,7 +176,8 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 30rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||
background: #fff;
|
||||
box-shadow: 0 -4rpx 16rpx rgba(0, 0, 0, 0.04);
|
||||
z-index: 10;
|
||||
@@ -139,25 +185,27 @@
|
||||
justify-content: space-between;
|
||||
gap: 20rpx;
|
||||
}
|
||||
.return-container .bottom-bar .primary-btn.data-v-6d22bdf8, .return-container .bottom-bar .secondary-btn.data-v-6d22bdf8 {
|
||||
.return-container .bottom-bar .action-item.data-v-6d22bdf8 {
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 30rpx;
|
||||
border-radius: 44rpx;
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
}
|
||||
.return-container .bottom-bar .primary-btn.data-v-6d22bdf8 {
|
||||
.return-container .bottom-bar .action-item.primary.data-v-6d22bdf8 {
|
||||
background: #07c160;
|
||||
color: #fff;
|
||||
}
|
||||
.return-container .bottom-bar .primary-btn.data-v-6d22bdf8:active {
|
||||
.return-container .bottom-bar .action-item.primary.data-v-6d22bdf8:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.return-container .bottom-bar .secondary-btn.data-v-6d22bdf8 {
|
||||
background: #f0f0f0;
|
||||
.return-container .bottom-bar .action-item.secondary.data-v-6d22bdf8 {
|
||||
background: #f5f5f5;
|
||||
color: #333;
|
||||
border: 1rpx solid #e0e0e0;
|
||||
}
|
||||
.return-container .bottom-bar .secondary-btn.data-v-6d22bdf8:active {
|
||||
.return-container .bottom-bar .action-item.secondary.data-v-6d22bdf8:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
+32
@@ -48,6 +48,37 @@ const getUserInfo = () => {
|
||||
res(result);
|
||||
});
|
||||
};
|
||||
const initiateWeChatScorePayment = (paymentData) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!paymentData || !paymentData.data || !paymentData.data.package) {
|
||||
reject(new Error("支付参数不完整"));
|
||||
return;
|
||||
}
|
||||
common_vendor.wx$1.openBusinessView({
|
||||
businessType: "wxpayScoreUse",
|
||||
extraData: {
|
||||
mch_id: paymentData.data.mch_id,
|
||||
package: paymentData.data.package
|
||||
},
|
||||
success: (businessRes) => {
|
||||
common_vendor.index.__f__("log", "at util/index.js:92", "微信支付分小程序调用成功", businessRes);
|
||||
if (businessRes.errMsg === "openBusinessView:ok") {
|
||||
resolve(businessRes);
|
||||
} else {
|
||||
reject(new Error("支付流程未完成"));
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
common_vendor.index.__f__("error", "at util/index.js:101", "微信支付分小程序调用失败", error);
|
||||
common_vendor.index.showToast({
|
||||
title: error.errMsg || "支付分接口调用失败",
|
||||
icon: "none"
|
||||
});
|
||||
reject(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
const getQueryString = function(url, name) {
|
||||
var reg = new RegExp("(^|&|/?)" + name + "=([^&|/?]*)(&|/?|$)", "i");
|
||||
var r = url.substr(1).match(reg);
|
||||
@@ -58,5 +89,6 @@ const getQueryString = function(url, name) {
|
||||
};
|
||||
exports.getQueryString = getQueryString;
|
||||
exports.getUserInfo = getUserInfo;
|
||||
exports.initiateWeChatScorePayment = initiateWeChatScorePayment;
|
||||
exports.wxLogin = wxLogin;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/util/index.js.map
|
||||
|
||||
Reference in New Issue
Block a user