feat(config): 添加本地调试地址配置项
在 `config/url.js` 中新增了本地调试地址 `"http://127.0.0.1:8080"` 的注释配置,便于开发人员快速切换调试环境。 fix(device): 修复设备详情页费用配置解析逻辑 在 `pages/device/detail.vue` 中增强了对 `feeConfig` 字段的判断,防止因字段不存在导致页面报错,并设置默认值以提升用户体验。同时调整了订单创建后的套餐信息更新逻辑,暂时将其注释以便后续排查问题。 refactor(device): 调整订单金额计算方式 修改订单金额计算逻辑,从原来的押金加套餐价改为仅使用押金部分作为总价展示,并修正跳转支付页面时传递的价格参数为实际单位价格。 feat(feedback): 反馈页面增加联系方式输入框 在 `pages/feedback/index.vue` 表单中添加了联系方式输入框,支持用户填写手机号码用于后续客服联系,并将图片上传功能临时隐藏待优化。 chore(build): 更新构建产物中的 JS 文件内容 同步更新了打包目录下相关 JS 构建文件的内容,包括 `user.js` 和 `detail.js` 等,确保与源代码变更一致。
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
"use strict";const e=require("./http.js");exports.addUserFeedback=r=>(console.log(r),e.request({url:"/app/feedback/add",method:"post",data:r})),exports.cancelOrder=r=>e.request({url:`/device/order/clear/${r.orderId}`,method:"get",data:r}),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:"GET"})),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.getOrderByOrderNo=r=>e.request({url:`/app/order/byOrderNo/${r}`,method:"get",hideLoading:!0}),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.updateOrderPackage=r=>(console.log("更新订单套餐信息:",r),e.request({url:"/app/device/updateOrderPackage",method:"post",data:r})),exports.updateUserBalance=r=>e.request({url:`/app/user/updateBalance/${r}`,method:"post",hideLoading:!0}),exports.withdrawDeposit=r=>e.request({url:`/app/withdraw/add/${r}`,method:"get",hideLoading:!0});
|
||||
"use strict";const e=require("./http.js");exports.addUserFeedback=r=>(console.log(r),e.request({url:"/app/feedback/add",method:"post",data:r})),exports.cancelOrder=r=>e.request({url:`/device/order/clear/${r.orderId}`,method:"get",data:r}),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:"GET"})),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.getOrderByOrderNo=r=>e.request({url:`/app/order/byOrderNo/${r}`,method:"get",hideLoading:!0}),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=>e.request({url:`/app/withdraw/add/${r}`,method:"get",hideLoading:!0});
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
<view class="container data-v-43d897c5"><view class="device-header data-v-43d897c5"><view class="{{['device-status-card', 'data-v-43d897c5', b]}}"><view class="status-indicator data-v-43d897c5"></view><text class="status-text data-v-43d897c5">{{a}}</text></view><view class="device-title data-v-43d897c5"><text class="name data-v-43d897c5">共享风扇</text><view class="device-meta data-v-43d897c5"><text class="id-label data-v-43d897c5">设备号:</text><text class="id-value data-v-43d897c5">{{c}}</text></view></view></view><view class="card device-info-card data-v-43d897c5"><view class="card-row data-v-43d897c5"><view class="card-item data-v-43d897c5"><view class="item-icon location-icon data-v-43d897c5"><image class="data-v-43d897c5" src="{{d}}" mode="aspectFill" style="width:45rpx;height:45rpx"></image></view><view class="item-content data-v-43d897c5"><text class="item-label data-v-43d897c5">当前位置</text><text class="item-value data-v-43d897c5">{{e}}</text></view></view></view></view><view class="card pricing-card data-v-43d897c5"><view class="card-header data-v-43d897c5"><text class="card-title data-v-43d897c5">计费规则</text></view><view class="pricing-banner data-v-43d897c5"><view class="pricing-main data-v-43d897c5"><text class="price data-v-43d897c5">¥{{f}}</text><text class="unit data-v-43d897c5">/小时</text></view><text class="cap-price data-v-43d897c5">封顶 ¥{{g}}</text></view><view class="pricing-rules data-v-43d897c5"><view class="rule-item data-v-43d897c5"><view class="rule-dot data-v-43d897c5"></view><text class="rule-text data-v-43d897c5">不足60分钟按60分钟计费</text></view><view class="rule-item data-v-43d897c5"><view class="rule-dot data-v-43d897c5"></view><text class="rule-text data-v-43d897c5">持续计费至99元视为买断</text></view></view></view><view class="card notice-card data-v-43d897c5"><view class="card-header data-v-43d897c5"><text class="card-title data-v-43d897c5">使用须知</text></view><view class="notice-items data-v-43d897c5"><view class="notice-item data-v-43d897c5"><view class="notice-dot data-v-43d897c5"></view><text class="notice-text data-v-43d897c5">请在使用前检查设备是否完好</text></view><view class="notice-item data-v-43d897c5"><view class="notice-dot data-v-43d897c5"></view><text class="notice-text data-v-43d897c5">请在指定区域内使用设备</text></view><view class="notice-item data-v-43d897c5"><view class="notice-dot data-v-43d897c5"></view><text class="notice-text data-v-43d897c5">归还时请确保设备完好,避免损坏</text></view></view></view><view class="footer data-v-43d897c5"><button class="{{['rent-button', 'data-v-43d897c5', i && 'return-button']}}" bindtap="{{j}}"><text class="data-v-43d897c5">{{h}}</text></button><view class="wechat-credit data-v-43d897c5"><image src="{{k}}" mode="aspectFit" class="wx-icon data-v-43d897c5"></image><view class="credit-text data-v-43d897c5"><text class="data-v-43d897c5">微信支付分</text><text class="credit-divider data-v-43d897c5">|</text><text class="credit-score data-v-43d897c5">550分及以上优享</text></view></view></view><view wx:if="{{l}}" class="phone-auth-popup data-v-43d897c5"><view class="popup-mask data-v-43d897c5" catchtap="{{m}}"></view><view class="popup-content data-v-43d897c5"><view class="popup-header data-v-43d897c5"><text class="popup-title data-v-43d897c5">授权获取手机号</text></view><view class="popup-body data-v-43d897c5"><view class="auth-desc data-v-43d897c5"><text class="data-v-43d897c5">为了提供更好的服务,需要授权获取您的手机号</text></view><button class="auth-btn data-v-43d897c5" open-type="getPhoneNumber" bindgetphonenumber="{{n}}"> 一键获取手机号 </button><view class="auth-cancel data-v-43d897c5" bindtap="{{o}}"><text class="data-v-43d897c5">暂不授权</text></view></view></view></view></view>
|
||||
<view class="container data-v-fb925e18"><view class="device-header data-v-fb925e18"><view class="{{['device-status-card', 'data-v-fb925e18', b]}}"><view class="status-indicator data-v-fb925e18"></view><text class="status-text data-v-fb925e18">{{a}}</text></view><view class="device-title data-v-fb925e18"><text class="name data-v-fb925e18">共享风扇</text><view class="device-meta data-v-fb925e18"><text class="id-label data-v-fb925e18">设备号:</text><text class="id-value data-v-fb925e18">{{c}}</text></view></view></view><view class="card device-info-card data-v-fb925e18"><view class="card-row data-v-fb925e18"><view class="card-item data-v-fb925e18"><view class="item-icon location-icon data-v-fb925e18"><image class="data-v-fb925e18" src="{{d}}" mode="aspectFill" style="width:45rpx;height:45rpx"></image></view><view class="item-content data-v-fb925e18"><text class="item-label data-v-fb925e18">当前位置</text><text class="item-value data-v-fb925e18">{{e}}</text></view></view></view></view><view class="card pricing-card data-v-fb925e18"><view class="card-header data-v-fb925e18"><text class="card-title data-v-fb925e18">计费规则</text></view><view class="pricing-banner data-v-fb925e18"><view class="pricing-main data-v-fb925e18"><text class="price data-v-fb925e18">¥{{f}}</text><text class="unit data-v-fb925e18">/小时</text></view><text class="cap-price data-v-fb925e18">封顶 ¥{{g}}</text></view><view class="pricing-rules data-v-fb925e18"><view class="rule-item data-v-fb925e18"><view class="rule-dot data-v-fb925e18"></view><text class="rule-text data-v-fb925e18">不足60分钟按60分钟计费</text></view><view class="rule-item data-v-fb925e18"><view class="rule-dot data-v-fb925e18"></view><text class="rule-text data-v-fb925e18">持续计费至99元视为买断</text></view></view></view><view class="card notice-card data-v-fb925e18"><view class="card-header data-v-fb925e18"><text class="card-title data-v-fb925e18">使用须知</text></view><view class="notice-items data-v-fb925e18"><view class="notice-item data-v-fb925e18"><view class="notice-dot data-v-fb925e18"></view><text class="notice-text data-v-fb925e18">请在使用前检查设备是否完好</text></view><view class="notice-item data-v-fb925e18"><view class="notice-dot data-v-fb925e18"></view><text class="notice-text data-v-fb925e18">请在指定区域内使用设备</text></view><view class="notice-item data-v-fb925e18"><view class="notice-dot data-v-fb925e18"></view><text class="notice-text data-v-fb925e18">归还时请确保设备完好,避免损坏</text></view></view></view><view class="footer data-v-fb925e18"><button class="{{['rent-button', 'data-v-fb925e18', i && 'return-button']}}" bindtap="{{j}}"><text class="data-v-fb925e18">{{h}}</text></button><view class="wechat-credit data-v-fb925e18"><image src="{{k}}" mode="aspectFit" class="wx-icon data-v-fb925e18"></image><view class="credit-text data-v-fb925e18"><text class="data-v-fb925e18">微信支付分</text><text class="credit-divider data-v-fb925e18">|</text><text class="credit-score data-v-fb925e18">550分及以上优享</text></view></view></view><view wx:if="{{l}}" class="phone-auth-popup data-v-fb925e18"><view class="popup-mask data-v-fb925e18" catchtap="{{m}}"></view><view class="popup-content data-v-fb925e18"><view class="popup-header data-v-fb925e18"><text class="popup-title data-v-fb925e18">授权获取手机号</text></view><view class="popup-body data-v-fb925e18"><view class="auth-desc data-v-fb925e18"><text class="data-v-fb925e18">为了提供更好的服务,需要授权获取您的手机号</text></view><button class="auth-btn data-v-fb925e18" open-type="getPhoneNumber" bindgetphonenumber="{{n}}"> 一键获取手机号 </button><view class="auth-cancel data-v-fb925e18" bindtap="{{o}}"><text class="data-v-fb925e18">暂不授权</text></view></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"),a=require("../../config/user.js"),o={__name:"index",setup(o){const t=e.ref(["设备故障","收费问题","使用建议","其他"]),l=e.ref(-1),u=e.ref(""),n=e.ref(""),i=e.ref([]),s=e.ref(""),v=()=>{e.index.chooseImage({count:3-i.value.length,success:e=>{i.value=[...i.value,...e.tempFilePaths]}})},c=async()=>{if(-1===l.value)return void e.index.showToast({title:"请选择问题类型",icon:"none"});if(!n.value.trim())return void e.index.showToast({title:"请描述您的问题",icon:"none"});if(!s.value)return void e.index.showToast({title:"请留下联系方式",icon:"none"});"设备故障"==t.value[l.value]||"收费问题"==t.value[l.value]?u.value="complain":u.value="suggestion";const o={type:u.value,content:n.value,phone:s.value,images:i.value};200==(await a.addUserFeedback(o)).code?e.index.showToast({title:"反馈成功",icon:"success"}):e.index.showToast({title:"反馈失败",icon:"none"})};return(a,o)=>e.e({a:e.f(t.value,((a,o,t)=>({a:e.t(a),b:o,c:l.value===o?1:"",d:e.o((e=>(e=>{l.value=e})(o)),o)}))),b:n.value,c:e.o((e=>n.value=e.detail.value)),d:e.t(n.value.length),e:e.f(i.value,((a,o,t)=>({a:a,b:e.o((e=>(e=>{i.value.splice(e,1)})(o)),o),c:o}))),f:i.value.length<3},i.value.length<3?{g:e.o(v)}:{},{h:s.value,i:e.o((e=>s.value=e.detail.value)),j:e.o(c)})}},t=e._export_sfc(o,[["__scopeId","data-v-e2170816"]]);wx.createPage(t);
|
||||
"use strict";const e=require("../../common/vendor.js"),a=require("../../config/user.js"),o={__name:"index",setup(o){const t=e.ref(["设备故障","收费问题","使用建议","其他"]),n=e.ref(-1),u=e.ref(""),i=e.ref("");e.ref([]);const l=e.ref(""),s=async()=>{if(-1===n.value)return void e.index.showToast({title:"请选择问题类型",icon:"none"});if(!i.value.trim())return void e.index.showToast({title:"请描述您的问题",icon:"none"});if(!l.value)return void e.index.showToast({title:"请留下联系方式",icon:"none"});"设备故障"==t.value[n.value]||"收费问题"==t.value[n.value]?u.value="complain":u.value="suggestion";const o={type:u.value,content:i.value,phone:l.value};200==(await a.addUserFeedback(o)).code?e.index.showToast({title:"反馈成功",icon:"success"}):e.index.showToast({title:"反馈失败",icon:"none"})};return(a,o)=>({a:e.f(t.value,((a,o,t)=>({a:e.t(a),b:o,c:n.value===o?1:"",d:e.o((e=>(e=>{n.value=e})(o)),o)}))),b:i.value,c:e.o((e=>i.value=e.detail.value)),d:e.t(i.value.length),e:l.value,f:e.o((e=>l.value=e.detail.value)),g:e.o(s)})}},t=e._export_sfc(o,[["__scopeId","data-v-22cdb973"]]);wx.createPage(t);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="feedback-container data-v-e2170816"><view class="type-section data-v-e2170816"><view class="section-title data-v-e2170816">问题类型</view><view class="type-grid data-v-e2170816"><view wx:for="{{a}}" wx:for-item="type" wx:key="b" class="{{['type-item', 'data-v-e2170816', type.c && 'active']}}" bindtap="{{type.d}}">{{type.a}}</view></view></view><view class="description-section data-v-e2170816"><view class="section-title data-v-e2170816">问题描述</view><block wx:if="{{r0}}"><textarea class="description-input data-v-e2170816" placeholder="请详细描述您遇到的问题,以便我们更好地为您解决" maxlength="500" value="{{b}}" bindinput="{{c}}"/></block><view class="word-count data-v-e2170816">{{d}}/500</view></view><view class="upload-section data-v-e2170816"><view class="section-title data-v-e2170816">图片上传(选填)</view><view class="upload-grid data-v-e2170816"><view wx:for="{{e}}" wx:for-item="img" wx:key="c" class="upload-item data-v-e2170816"><image class="data-v-e2170816" src="{{img.a}}" mode="aspectFill"/><view class="delete-btn data-v-e2170816" bindtap="{{img.b}}">×</view></view><view wx:if="{{f}}" class="upload-btn data-v-e2170816" bindtap="{{g}}"><text class="plus data-v-e2170816">+</text><text class="tip data-v-e2170816">上传图片</text></view></view></view><view class="contact-section data-v-e2170816"><view class="section-title data-v-e2170816">联系方式</view><input class="contact-input data-v-e2170816" placeholder="请留下您的手机号,方便我们联系您" type="number" maxlength="11" value="{{h}}" bindinput="{{i}}"/></view><view class="submit-section data-v-e2170816"><button class="submit-btn data-v-e2170816" bindtap="{{j}}">提交反馈</button></view></view>
|
||||
<view class="feedback-container data-v-22cdb973"><form class="data-v-22cdb973"><view class="type-section data-v-22cdb973"><view class="section-title data-v-22cdb973">问题类型</view><view class="type-grid data-v-22cdb973"><view wx:for="{{a}}" wx:for-item="type" wx:key="b" class="{{['type-item', 'data-v-22cdb973', type.c && 'active']}}" bindtap="{{type.d}}">{{type.a}}</view></view></view><view class="description-section data-v-22cdb973"><view class="section-title data-v-22cdb973">问题描述</view><block wx:if="{{r0}}"><textarea class="description-input data-v-22cdb973" placeholder="请详细描述您遇到的问题,以便我们更好地为您解决" maxlength="500" name="description" value="{{b}}" bindinput="{{c}}"/></block><view class="word-count data-v-22cdb973">{{d}}/500</view></view><view class="contact-section data-v-22cdb973"><view class="section-title data-v-22cdb973">联系方式</view><input class="contact-input data-v-22cdb973" placeholder="请留下您的手机号,方便我们联系您" type="number" maxlength="11" name="contact" value="{{e}}" bindinput="{{f}}"/></view><view class="submit-section data-v-22cdb973"><view class="submit-btn data-v-22cdb973" bindtap="{{g}}">提交反馈</view></view></form></view>
|
||||
@@ -1 +1 @@
|
||||
.feedback-container.data-v-e2170816{min-height:100vh;background:#f8f8f8;padding:30rpx}.feedback-container .section-title.data-v-e2170816{font-size:30rpx;color:#333;font-weight:500;margin-bottom:20rpx}.feedback-container .type-section.data-v-e2170816{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:20rpx}.feedback-container .type-section .type-grid.data-v-e2170816{display:flex;flex-wrap:wrap;margin:0 -10rpx}.feedback-container .type-section .type-grid .type-item.data-v-e2170816{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-e2170816{background:#e3f2fd;color:#1976d2}.feedback-container .description-section.data-v-e2170816{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:20rpx}.feedback-container .description-section .description-input.data-v-e2170816{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-e2170816{text-align:right;font-size:24rpx;color:#999;margin-top:10rpx}.feedback-container .upload-section.data-v-e2170816{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:20rpx}.feedback-container .upload-section .upload-grid.data-v-e2170816{display:flex;flex-wrap:wrap}.feedback-container .upload-section .upload-grid .upload-item.data-v-e2170816{width:200rpx;height:200rpx;margin-right:20rpx;margin-bottom:20rpx;position:relative}.feedback-container .upload-section .upload-grid .upload-item image.data-v-e2170816{width:100%;height:100%;border-radius:10rpx}.feedback-container .upload-section .upload-grid .upload-item .delete-btn.data-v-e2170816{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-e2170816{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-e2170816{font-size:60rpx;line-height:1;margin-bottom:10rpx}.feedback-container .upload-section .upload-grid .upload-btn .tip.data-v-e2170816{font-size:24rpx}.feedback-container .contact-section.data-v-e2170816{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:40rpx}.feedback-container .contact-section .contact-input.data-v-e2170816{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-e2170816{padding:0 40rpx}.feedback-container .submit-section .submit-btn.data-v-e2170816{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-e2170816:active{transform:scale(.98)}
|
||||
.feedback-container.data-v-22cdb973{min-height:100vh;background:#f8f8f8;padding:30rpx}.feedback-container .section-title.data-v-22cdb973{font-size:30rpx;color:#333;font-weight:500;margin-bottom:20rpx}.feedback-container .type-section.data-v-22cdb973{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:20rpx}.feedback-container .type-section .type-grid.data-v-22cdb973{display:flex;flex-wrap:wrap;margin:0 -10rpx}.feedback-container .type-section .type-grid .type-item.data-v-22cdb973{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-22cdb973{background:#e3f2fd;color:#1976d2}.feedback-container .description-section.data-v-22cdb973{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:20rpx}.feedback-container .description-section .description-input.data-v-22cdb973{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-22cdb973{text-align:right;font-size:24rpx;color:#999;margin-top:10rpx}.feedback-container .upload-section.data-v-22cdb973{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:20rpx}.feedback-container .upload-section .upload-grid.data-v-22cdb973{display:flex;flex-wrap:wrap}.feedback-container .upload-section .upload-grid .upload-item.data-v-22cdb973{width:200rpx;height:200rpx;margin-right:20rpx;margin-bottom:20rpx;position:relative}.feedback-container .upload-section .upload-grid .upload-item image.data-v-22cdb973{width:100%;height:100%;border-radius:10rpx}.feedback-container .upload-section .upload-grid .upload-item .delete-btn.data-v-22cdb973{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-22cdb973{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-22cdb973{font-size:60rpx;line-height:1;margin-bottom:10rpx}.feedback-container .upload-section .upload-grid .upload-btn .tip.data-v-22cdb973{font-size:24rpx}.feedback-container .contact-section.data-v-22cdb973{background:#fff;border-radius:20rpx;padding:30rpx;margin-bottom:40rpx}.feedback-container .contact-section .contact-input.data-v-22cdb973{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-22cdb973{padding:0 40rpx}.feedback-container .submit-section .submit-btn.data-v-22cdb973{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-22cdb973:active{transform:scale(.98)}
|
||||
|
||||
@@ -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 = \"https://fansdev.gxfs123.com/api\" //测试服务器\r\n// export const URL = \"http://192.168.5.22:8080\" \t\t//本地调试\r\n\r\nexport const appid = \"wx2165f0be356ae7a9\" //小程序appid"],"names":[],"mappings":";AAAY,MAAC,MAAM;AAIP,MAAC,QAAQ;;;"}
|
||||
{"version":3,"file":"url.js","sources":["config/url.js"],"sourcesContent":["// export const URL = \"https://my.gxfs123.com/api\" //正式服务器\r\n// export const URL = \"https://fansdev.gxfs123.com/api\" //测试服务器\r\n// export const URL = \"http://192.168.5.22:8080\" \t\t//本地调试\r\nexport const URL = \"http://127.0.0.1:8080\" \t\t//本地调试\r\n\r\nexport const appid = \"wx2165f0be356ae7a9\" //小程序appid"],"names":[],"mappings":";AAGY,MAAC,MAAM;AAEP,MAAC,QAAQ;;;"}
|
||||
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
+2
-2
@@ -7047,9 +7047,9 @@ function isConsoleWritable() {
|
||||
return isWritable;
|
||||
}
|
||||
function initRuntimeSocketService() {
|
||||
const hosts = "192.168.5.17,127.0.0.1";
|
||||
const hosts = "198.18.0.1,192.168.5.113,127.0.0.1";
|
||||
const port = "8090";
|
||||
const id = "mp-weixin_7kve6_";
|
||||
const id = "mp-weixin_ubrITl";
|
||||
const lazy = typeof swan !== "undefined";
|
||||
let restoreError = lazy ? () => {
|
||||
} : initOnError();
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
"use strict";
|
||||
const URL = "https://my.gxfs123.com/api";
|
||||
const URL = "http://127.0.0.1:8080";
|
||||
const appid = "wx2165f0be356ae7a9";
|
||||
exports.URL = URL;
|
||||
exports.appid = appid;
|
||||
|
||||
+26
-19
@@ -31,22 +31,23 @@ const _sfc_main = {
|
||||
});
|
||||
common_vendor.onMounted(async () => {
|
||||
await checkUserPhone();
|
||||
await fetchDeviceInfo();
|
||||
});
|
||||
const checkUserPhone = async () => {
|
||||
try {
|
||||
const userInfoRes = await util_index.getUserInfo();
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:221", userInfoRes.data.phone, "getUserInfoPhone");
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:222", userInfoRes.data.phone, "getUserInfoPhone");
|
||||
if (userInfoRes.code == 200 && userInfoRes.data && userInfoRes.data.phone) {
|
||||
phoneNumber.value = userInfoRes.data.phone;
|
||||
} else {
|
||||
showPhoneAuthPopup.value = true;
|
||||
}
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/device/detail.vue:230", "获取用户信息失败:", error);
|
||||
common_vendor.index.__f__("error", "at pages/device/detail.vue:231", "获取用户信息失败:", error);
|
||||
}
|
||||
};
|
||||
const onGetPhoneNumber = (e) => {
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:236", "getPhoneNumber event:", e.detail);
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:237", "getPhoneNumber event:", e.detail);
|
||||
if (e.detail.errMsg && e.detail.errMsg.includes("deny")) {
|
||||
common_vendor.index.showToast({
|
||||
title: "需要授权手机号才能使用设备",
|
||||
@@ -58,13 +59,13 @@ const _sfc_main = {
|
||||
common_vendor.index.showLoading({
|
||||
title: "获取中..."
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:253", "获取到的授权code:", e.detail.code);
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:254", "获取到的授权code:", e.detail.code);
|
||||
try {
|
||||
util_index.getUserPhoneNumber(e.detail.code).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:259", "获取手机号API响应原始数据:", JSON.stringify(res));
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:260", "获取手机号API响应原始数据:", JSON.stringify(res));
|
||||
common_vendor.index.hideLoading();
|
||||
if (!res) {
|
||||
common_vendor.index.__f__("error", "at pages/device/detail.vue:264", "API返回数据为空");
|
||||
common_vendor.index.__f__("error", "at pages/device/detail.vue:265", "API返回数据为空");
|
||||
common_vendor.index.showModal({
|
||||
title: "数据异常",
|
||||
content: "API返回为空",
|
||||
@@ -72,8 +73,8 @@ const _sfc_main = {
|
||||
});
|
||||
return;
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:274", "响应code:", res.code, "响应类型:", typeof res.code);
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:275", "是否有data:", !!res.data, "是否有phone:", res.data && !!res.data.phone);
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:275", "响应code:", res.code, "响应类型:", typeof res.code);
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:276", "是否有data:", !!res.data, "是否有phone:", res.data && !!res.data.phone);
|
||||
if (res.code == 200 && res.data && res.data.phoneNumber) {
|
||||
phoneNumber.value = res.data.phoneNumber;
|
||||
showPhoneAuthPopup.value = false;
|
||||
@@ -82,7 +83,7 @@ const _sfc_main = {
|
||||
icon: "success"
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.__f__("warn", "at pages/device/detail.vue:287", "获取手机号响应异常:", res.msg || "未知错误");
|
||||
common_vendor.index.__f__("warn", "at pages/device/detail.vue:288", "获取手机号响应异常:", res.msg || "未知错误");
|
||||
common_vendor.index.showModal({
|
||||
title: "获取手机号异常",
|
||||
content: `状态码: ${res.code}, 消息: ${res.msg || "无"}`,
|
||||
@@ -91,7 +92,7 @@ const _sfc_main = {
|
||||
}
|
||||
}).catch((err) => {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/device/detail.vue:297", "获取手机号码失败(catch):", err);
|
||||
common_vendor.index.__f__("error", "at pages/device/detail.vue:298", "获取手机号码失败(catch):", err);
|
||||
let errMsg = err.message || err.toString();
|
||||
common_vendor.index.showModal({
|
||||
title: "获取手机号失败",
|
||||
@@ -101,7 +102,7 @@ const _sfc_main = {
|
||||
});
|
||||
} catch (outerError) {
|
||||
common_vendor.index.hideLoading();
|
||||
common_vendor.index.__f__("error", "at pages/device/detail.vue:309", "获取手机号外部错误:", outerError);
|
||||
common_vendor.index.__f__("error", "at pages/device/detail.vue:310", "获取手机号外部错误:", outerError);
|
||||
common_vendor.index.showModal({
|
||||
title: "意外错误",
|
||||
content: "处理过程发生异常: " + (outerError.message || outerError),
|
||||
@@ -133,8 +134,14 @@ const _sfc_main = {
|
||||
deviceStatus.class = "offline";
|
||||
}
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:347", "feeconfig", deviceInfo.value.feeConfig);
|
||||
deviceFeeConfig.value = JSON.parse(deviceInfo.value.feeConfig)[0] || {};
|
||||
if (deviceInfo.value.feeConfig) {
|
||||
deviceFeeConfig.value = JSON.parse(deviceInfo.value.feeConfig)[0] || {};
|
||||
} else {
|
||||
deviceFeeConfig.value = {
|
||||
maxHourPrice: "5.00"
|
||||
};
|
||||
discount.value = "99.00";
|
||||
}
|
||||
}
|
||||
};
|
||||
const showLoginTip = () => {
|
||||
@@ -194,7 +201,7 @@ const _sfc_main = {
|
||||
common_vendor.index.showLoading({
|
||||
title: "处理中"
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:428", deviceId.value);
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:435", deviceId.value);
|
||||
const rentResult = await config_user.rentPowerBank(deviceId.value, phoneNumber.value);
|
||||
if (rentResult.code !== 200) {
|
||||
throw new Error(rentResult.msg || "设备租借失败");
|
||||
@@ -215,17 +222,17 @@ const _sfc_main = {
|
||||
packagePrice: parseFloat(selectedPkg.price)
|
||||
});
|
||||
if (updateRes.code !== 200) {
|
||||
common_vendor.index.__f__("warn", "at pages/device/detail.vue:455", "更新订单套餐信息失败:", updateRes.msg);
|
||||
common_vendor.index.__f__("warn", "at pages/device/detail.vue:462", "更新订单套餐信息失败:", updateRes.msg);
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:458", "订单套餐信息已提前更新");
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:465", "订单套餐信息已提前更新");
|
||||
}
|
||||
} catch (updateError) {
|
||||
common_vendor.index.__f__("error", "at pages/device/detail.vue:461", "更新订单套餐信息时出错:", updateError);
|
||||
common_vendor.index.__f__("error", "at pages/device/detail.vue:468", "更新订单套餐信息时出错:", updateError);
|
||||
}
|
||||
if (payWay == "wx-pay") {
|
||||
common_vendor.index.hideLoading();
|
||||
const res = await config_user.getOrderByOrderNo(order.orderNo);
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:470", res);
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:477", res);
|
||||
const deposit = parseFloat(deviceInfo.value.depositAmount);
|
||||
const packagePrice = parseFloat(selectedPkg.price);
|
||||
const totalAmount = (deposit + packagePrice).toFixed(2);
|
||||
@@ -242,7 +249,7 @@ const _sfc_main = {
|
||||
const payResult = await util_index.initiateWeChatScorePayment(res);
|
||||
if (payResult.errCode == "0") {
|
||||
const res2 = await config_user.getOrderByOrderNoScorePayStatus(order.orderNo);
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:498", res2.data.orderStatus);
|
||||
common_vendor.index.__f__("log", "at pages/device/detail.vue:505", res2.data.orderStatus);
|
||||
if (res2.data.orderStatus == "in_used") {
|
||||
common_vendor.index.showToast({
|
||||
title: "设备租借成功",
|
||||
|
||||
+8
-30
@@ -8,22 +8,11 @@ const _sfc_main = {
|
||||
const selectedType = common_vendor.ref(-1);
|
||||
const paramsType = common_vendor.ref("");
|
||||
const description = common_vendor.ref("");
|
||||
const images = common_vendor.ref([]);
|
||||
common_vendor.ref([]);
|
||||
const contact = common_vendor.ref("");
|
||||
const selectType = (index) => {
|
||||
selectedType.value = index;
|
||||
};
|
||||
const chooseImage = () => {
|
||||
common_vendor.index.chooseImage({
|
||||
count: 3 - images.value.length,
|
||||
success: (res) => {
|
||||
images.value = [...images.value, ...res.tempFilePaths];
|
||||
}
|
||||
});
|
||||
};
|
||||
const deleteImage = (index) => {
|
||||
images.value.splice(index, 1);
|
||||
};
|
||||
const submitFeedback = async () => {
|
||||
if (selectedType.value === -1) {
|
||||
common_vendor.index.showToast({
|
||||
@@ -54,8 +43,8 @@ const _sfc_main = {
|
||||
const feedbackData = {
|
||||
type: paramsType.value,
|
||||
content: description.value,
|
||||
phone: contact.value,
|
||||
images: images.value
|
||||
phone: contact.value
|
||||
// images: images.value
|
||||
};
|
||||
const res = await config_user.addUserFeedback(feedbackData);
|
||||
if (res.code == 200) {
|
||||
@@ -71,7 +60,7 @@ const _sfc_main = {
|
||||
}
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
return {
|
||||
a: common_vendor.f(types.value, (type, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(type),
|
||||
@@ -83,21 +72,10 @@ const _sfc_main = {
|
||||
b: description.value,
|
||||
c: common_vendor.o(($event) => description.value = $event.detail.value),
|
||||
d: common_vendor.t(description.value.length),
|
||||
e: common_vendor.f(images.value, (img, index, i0) => {
|
||||
return {
|
||||
a: img,
|
||||
b: common_vendor.o(($event) => deleteImage(index), index),
|
||||
c: index
|
||||
};
|
||||
}),
|
||||
f: images.value.length < 3
|
||||
}, images.value.length < 3 ? {
|
||||
g: common_vendor.o(chooseImage)
|
||||
} : {}, {
|
||||
h: contact.value,
|
||||
i: common_vendor.o(($event) => contact.value = $event.detail.value),
|
||||
j: common_vendor.o(submitFeedback)
|
||||
});
|
||||
e: contact.value,
|
||||
f: common_vendor.o(($event) => contact.value = $event.detail.value),
|
||||
g: common_vendor.o(submitFeedback)
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
<view class="feedback-container data-v-2aa7bac2"><view class="type-section data-v-2aa7bac2"><view class="section-title data-v-2aa7bac2">问题类型</view><view class="type-grid data-v-2aa7bac2"><view wx:for="{{a}}" wx:for-item="type" wx:key="b" class="{{['type-item', 'data-v-2aa7bac2', type.c && 'active']}}" bindtap="{{type.d}}">{{type.a}}</view></view></view><view class="description-section data-v-2aa7bac2"><view class="section-title data-v-2aa7bac2">问题描述</view><block wx:if="{{r0}}"><textarea class="description-input data-v-2aa7bac2" placeholder="请详细描述您遇到的问题,以便我们更好地为您解决" maxlength="500" value="{{b}}" bindinput="{{c}}"/></block><view class="word-count data-v-2aa7bac2">{{d}}/500</view></view><view class="upload-section data-v-2aa7bac2"><view class="section-title data-v-2aa7bac2">图片上传(选填)</view><view class="upload-grid data-v-2aa7bac2"><view wx:for="{{e}}" wx:for-item="img" wx:key="c" class="upload-item data-v-2aa7bac2"><image class="data-v-2aa7bac2" src="{{img.a}}" mode="aspectFill"/><view class="delete-btn data-v-2aa7bac2" bindtap="{{img.b}}">×</view></view><view wx:if="{{f}}" class="upload-btn data-v-2aa7bac2" bindtap="{{g}}"><text class="plus data-v-2aa7bac2">+</text><text class="tip data-v-2aa7bac2">上传图片</text></view></view></view><view class="contact-section data-v-2aa7bac2"><view class="section-title data-v-2aa7bac2">联系方式</view><input class="contact-input data-v-2aa7bac2" placeholder="请留下您的手机号,方便我们联系您" type="number" maxlength="11" value="{{h}}" bindinput="{{i}}"/></view><view class="submit-section data-v-2aa7bac2"><button class="submit-btn data-v-2aa7bac2" bindtap="{{j}}">提交反馈</button></view></view>
|
||||
<view class="feedback-container data-v-2aa7bac2"><form class="data-v-2aa7bac2"><view class="type-section data-v-2aa7bac2"><view class="section-title data-v-2aa7bac2">问题类型</view><view class="type-grid data-v-2aa7bac2"><view wx:for="{{a}}" wx:for-item="type" wx:key="b" class="{{['type-item', 'data-v-2aa7bac2', type.c && 'active']}}" bindtap="{{type.d}}">{{type.a}}</view></view></view><view class="description-section data-v-2aa7bac2"><view class="section-title data-v-2aa7bac2">问题描述</view><block wx:if="{{r0}}"><textarea class="description-input data-v-2aa7bac2" placeholder="请详细描述您遇到的问题,以便我们更好地为您解决" maxlength="500" name="description" value="{{b}}" bindinput="{{c}}"/></block><view class="word-count data-v-2aa7bac2">{{d}}/500</view></view><view class="contact-section data-v-2aa7bac2"><view class="section-title data-v-2aa7bac2">联系方式</view><input class="contact-input data-v-2aa7bac2" placeholder="请留下您的手机号,方便我们联系您" type="number" maxlength="11" name="contact" value="{{e}}" bindinput="{{f}}"/></view><view class="submit-section data-v-2aa7bac2"><view class="submit-btn data-v-2aa7bac2" bindtap="{{g}}">提交反馈</view></view></form></view>
|
||||
Reference in New Issue
Block a user