diff --git a/components/MapComponent.vue b/components/MapComponent.vue index 95c1042..f002f3b 100644 --- a/components/MapComponent.vue +++ b/components/MapComponent.vue @@ -379,7 +379,7 @@ const handleSearch = () => { const handleService = () => { uni.navigateTo({ - url: '/pages/help/index' + url: '/subPackages/service/help/index' }) } @@ -389,7 +389,7 @@ const handleSearch = () => { const handleJoinTap = () => { uni.navigateTo({ - url: '/pages/join/index' + url: '/subPackages/business/join/index' }) } diff --git a/config/http.js b/config/http.js index 44c0d41..9234f5b 100644 --- a/config/http.js +++ b/config/http.js @@ -65,7 +65,7 @@ const request = (option) => { const query = current && current.options ? Object.keys(current.options).map(k => `${k}=${encodeURIComponent(current.options[k])}`).join('&') : '' const redirect = encodeURIComponent(query ? `${route}?${query}` : route) // 跳转到登录页 - uni.reLaunch({ url: `/pages/login/index?redirect=${redirect}` }) + uni.reLaunch({ url: `/subPackages/user/login/index?redirect=${redirect}` }) } catch (e) {} } diff --git a/config/url.js b/config/url.js index 542c40a..7c6b44d 100644 --- a/config/url.js +++ b/config/url.js @@ -1,6 +1,6 @@ // export const URL = "https://my.gxfs123.com/api" //正式服务器-弃用 -// export const URL = "https://manager.fdzpower.com/api" //正式服务器 -export const URL = "https://fansdev.gxfs123.com/api" //测试服务器 +export const URL = "https://manager.fdzpower.com/api" //正式服务器 +// export const URL = "https://fansdev.gxfs123.com/api" //测试服务器 // export const URL = "http://192.168.5.123:8080" //本地调试 // export const URL = "http://127.0.0.1:8080" //本地调试 diff --git a/locale/en-US.js b/locale/en-US.js index 55fc6cf..020667f 100644 --- a/locale/en-US.js +++ b/locale/en-US.js @@ -55,7 +55,12 @@ export default { pull: 'Pull to refresh', release: 'Release to refresh', noMore: 'No more', - functionDeveloping: 'Function under development' + functionDeveloping: 'Function under development', + saveImage: 'Save to Phone', + saveSuccess: 'Saved successfully', + saving: 'Saving...', + saveFailed: 'Save failed', + downloadFailed: 'Download failed' }, nav: { @@ -272,7 +277,8 @@ export default { deviceNoEjectSuccess: 'Feedback received, will be handled within 5 minutes', deviceNoEjectFailed: 'Feedback submission failed, please try again', returnProblemTip: 'After returning, if the order is still active, please go to ', - contactStaff: ' to contact staff.' + contactStaff: ' to contact staff.', + returnLocationMap: 'Return Location Map', }, user: { diff --git a/locale/id-ID.js b/locale/id-ID.js index 11255c7..5225837 100644 --- a/locale/id-ID.js +++ b/locale/id-ID.js @@ -55,7 +55,12 @@ export default { pull: 'Tarik untuk muat ulang', release: 'Lepas untuk muat ulang', noMore: 'Tidak ada lagi', - functionDeveloping: 'Fungsi sedang dikembangkan' + functionDeveloping: 'Fungsi sedang dikembangkan', + saveImage: 'Simpan ke Ponsel', + saveSuccess: 'Berhasil disimpan', + saving: 'Menyimpan...', + saveFailed: 'Gagal menyimpan', + downloadFailed: 'Gagal mengunduh' }, nav: { @@ -272,7 +277,8 @@ export default { deviceNoEjectSuccess: 'Umpan balik telah diterima, akan diproses dalam 5 menit', deviceNoEjectFailed: 'Pengiriman umpan balik gagal, harap coba lagi nanti', returnProblemTip: 'Setelah produk dikembalikan ke gudang, pesanan masih belum berakhir, harap pergi ke', - contactStaff: 'Hubungi staf.' + contactStaff: 'Hubungi staf.', + returnLocationMap: 'Peta Lokasi Pengembalian', }, user: { diff --git a/locale/zh-CN.js b/locale/zh-CN.js index 022a242..a200878 100644 --- a/locale/zh-CN.js +++ b/locale/zh-CN.js @@ -55,7 +55,11 @@ export default { pull: '下拉刷新', release: '释放刷新', noMore: '没有更多了', - functionDeveloping: '功能开发中' + functionDeveloping: '功能开发中', + saveImage:'保存到手机', + saveSuccess:'保存成功', + saving:'保存中...', + saveFailed:'保存失败' }, nav: { @@ -157,7 +161,7 @@ export default { order: { myOrders: '我的订单', - myDeviceOrders:'我的定制', + myDeviceOrders: '我的定制', noOrderRecord: '暂无订单记录', getOrderListFailed: '获取订单列表失败', confirmCancelContent: '确定要取消此订单吗?', @@ -176,11 +180,11 @@ export default { payAmount: '支付金额', deposit: '押金', rentFee: '租金', - myCards:'会员卡优惠', - myCoupons:'优惠券优惠', + myCards: '会员卡优惠', + myCoupons: '优惠券优惠', payNow: '立即支付', cancelOrder: '取消订单', - quickReturn: '快速归还', + quickReturn: '附近可归还', returnDevice: '归还设备', viewDetails: '查看详情', orderCompleted: '订单已完成', @@ -261,7 +265,7 @@ export default { convertToOwnSuccess: '已成功转为自用', convertToOwnFailed: '操作失败,请稍后重试', convertToOwnConfirmBtn: '买断自用', - convertToOwnCancelBtn: '继续租借', + convertToOwnCancelBtn: '继续租借', convertToOwnWithMaxFee: '不想还了?转为自用', convertToOwnWithMaxFeeTitle: '买断带回家!', convertToOwnWithMaxFeeConfirm: '既然用得顺手,直接买断带回家!仅需99元,设备永久归你,无需归还~\n✅支持Type-C充电,居家使用超方便~\n✅买断后无任何使用限制,随心用!', @@ -272,7 +276,8 @@ export default { deviceNoEjectSuccess: '反馈已受理,将在5分钟内处理', deviceNoEjectFailed: '反馈提交失败,请稍后重试', returnProblemTip: '产品归还入仓后,订单仍未结束,请前往', - contactStaff: '联系工作人员。' + contactStaff: '联系工作人员。', + returnLocationMap:'归还点地图', }, user: { @@ -578,23 +583,23 @@ export default { applicableToService: '适用于"风电者"共享风扇租借服务', footerNotice: '如对本协议有疑问,请前往"我的-客服"咨询', footerNoticePolicy: '如对本政策有疑问,请前往"我的-客服"咨询', - + // 条款与细则内容 applicableLaw: '适用法律', applicableLawContent: '本服务条款受中华人民共和国法律管辖。用户使用本服务即表示同意接受中国法律的约束。任何因本服务引起的争议,应首先通过友好协商解决;协商不成的,任何一方均可向服务提供方所在地有管辖权的人民法院提起诉讼。', - + paymentMethods: '支付方式', paymentMethodsContent: '我们支持多种支付方式,包括但不限于:微信支付、支付宝、微信支付分免押金等。用户在使用服务前需完成支付流程。支付成功后,系统将自动开启设备供用户使用。所有支付交易均通过安全加密通道进行,确保用户资金安全。', - + refundPolicy: '退款介绍', refundPolicyContent: '1. 押金退款:归还设备后,押金将在扣除相应租金后自动退还至原支付账户,预计0-7个工作日到账。\n2. 订单取消:未使用的订单可在开始使用前取消,押金将全额退还。\n3. 异常退款:如遇设备故障等特殊情况,用户可申请退款,我们将在核实后3-5个工作日内处理。\n4. 会员卡/优惠券:已购买的会员卡和优惠券一般不支持退款,特殊情况请联系客服处理。', - + serviceTerms: '服务条款', serviceTermsContent: '用户在使用本服务时,应遵守以下规定:1) 妥善保管租借的设备,不得故意损坏或私自占有;2) 按时归还设备,避免产生额外费用;3) 不得将设备用于非法用途;4) 如发现设备故障,应及时联系客服处理。违反上述规定的,我们有权终止服务并追究相应责任。', - + liabilityLimitation: '责任限制', liabilityLimitationContent: '在法律允许的最大范围内,我们对因使用或无法使用本服务而导致的任何间接、偶然、特殊或后果性损害不承担责任。我们的总责任不超过用户为使用本服务所支付的费用。对于因不可抗力、网络故障、第三方原因等导致的服务中断或延迟,我们不承担责任。', - + disputeResolution: '争议解决', disputeResolutionContent: '如用户对服务有任何疑问或争议,请首先通过客服渠道联系我们,我们将在收到反馈后24小时内响应,并尽快协商解决。如协商不成,双方同意将争议提交至服务提供方所在地有管辖权的人民法院通过诉讼方式解决。在争议解决期间,双方应继续履行本协议中无争议的条款。' }, @@ -809,7 +814,7 @@ export default { useNow: '去使用', usedStatus: '已使用', expiredStatus: '已过期', - refundedStatus:'已退款', + refundedStatus: '已退款', noAvailableCoupons: '暂无可用优惠券', noUsedCoupons: '暂无已使用优惠券', noExpiredCoupons: '暂无已过期优惠券', @@ -821,7 +826,7 @@ export default { goods: { title: '商品详情', - goodsTitle:'定制详情', + goodsTitle: '定制详情', productName: '风电者共享风扇 + 充电宝 + 暖手宝系列-樱花粉', perUnit: '/个', buyNow: '立即购买', diff --git a/pages.json b/pages.json index 6a28718..f67fee8 100644 --- a/pages.json +++ b/pages.json @@ -5,7 +5,8 @@ "^uv-(.*)": "@climblee/uv-ui/components/uv-$1/uv-$1.vue" } }, - "pages": [{ + "pages": [ + { "path": "pages/index/index", "style": { "navigationBarTitleText": "", @@ -15,6 +16,12 @@ "enableShareTimeline": true } }, + { + "path": "pages/serve/bagCheck/index", + "style": { + "navigationBarTitleText": "" + } + }, { "path": "pages/scan/index", "style": { @@ -23,168 +30,6 @@ "navigationBarTextStyle": "white" } }, - { - "path": "pages/login/index", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#C8F4D9", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/login/phone", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#C8F4D9", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/legal/agreement", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/legal/agreement-zh", - "style": { - "navigationBarTitleText": "用户协议", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/legal/agreement-en", - "style": { - "navigationBarTitleText": "User Agreement", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/legal/privacy", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/legal/privacy-zh", - "style": { - "navigationBarTitleText": "隐私政策", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/legal/privacy-en", - "style": { - "navigationBarTitleText": "Privacy Policy", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/legal/terms", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/my/index", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#D1FFE1", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/userProfile/index", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#D1FFE1", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/setting/index", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/deposit/index", - "style": { - "navigationBarTitleText": "" - } - }, - { - "path": "pages/device/orderList", - "style": { - "navigationBarTitleText": "" - } - }, - { - "path": "pages/device/orderDetail", - "style": { - "navigationBarTitleText": "定制详情", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/order/index", - "style": { - "navigationBarTitleText": "" - } - }, - { - "path": "pages/order/payment", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/expressReturn/addExpressReturn", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/feedback/index", - "style": { - "navigationBarTitleText": "" - } - }, - { - "path": "pages/feedback/list", - "style": { - "navigationBarTitleText": "" - } - }, - { - "path": "pages/feedback/detail", - "style": { - "navigationBarTitleText": "" - } - }, - { - "path": "pages/help/index", - "style": { - "navigationBarTitleText": "" - } - }, { "path": "pages/device/detail", "style": { @@ -193,37 +38,6 @@ "navigationBarTextStyle": "black" } }, - - { - "path": "pages/serve/bagCheck/index", - "style": { - "navigationBarTitleText": "" - } - }, - { - "path": "pages/return/index", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/order/success", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/order/return-success", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, { "path": "pages/order/detail", "style": { @@ -232,21 +46,6 @@ "navigationBarTextStyle": "black" } }, - { - "path": "pages/expressReturn/index", - "style": { - "navigationBarTitleText": "", - "navigationStyle": "default" - } - }, - { - "path": "pages/expressReturn/detail", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, { "path": "pages/search/index", "style": { @@ -255,22 +54,6 @@ "navigationBarTextStyle": "black" } }, - { - "path": "pages/position/detail", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#D1FFE1", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/join/index", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, { "path": "pages/waiting/index", "style": { @@ -278,47 +61,305 @@ "navigationBarBackgroundColor": "#ffffff", "navigationBarTextStyle": "black" } + } + ], + "subPackages": [ + { + "root": "subPackages/user", + "pages": [ + { + "path": "login/index", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#C8F4D9", + "navigationBarTextStyle": "black" + } + }, + { + "path": "login/phone", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#C8F4D9", + "navigationBarTextStyle": "black" + } + }, + { + "path": "my/index", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#D1FFE1", + "navigationBarTextStyle": "black" + } + }, + { + "path": "userProfile/index", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#D1FFE1", + "navigationBarTextStyle": "black" + } + }, + { + "path": "setting/index", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "user/index", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + } + ] }, { - "path": "pages/webview/index", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black", - "navigationStyle": "custom" - } + "root": "subPackages/order", + "pages": [ + { + "path": "index", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "payment", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "success", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "return-success", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + } + ] }, { - "path": "pages/purchase/index", - "style": { - "navigationBarTitleText": "优惠专区", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } + "root": "subPackages/service", + "pages": [ + { + "path": "feedback/index", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "feedback/list", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "feedback/detail", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "help/index", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "expressReturn/index", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "default" + } + }, + { + "path": "expressReturn/addExpressReturn", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "expressReturn/detail", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "return/index", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + } + ] }, { - "path": "pages/my/card", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } + "root": "subPackages/business", + "pages": [ + { + "path": "purchase/index", + "style": { + "navigationBarTitleText": "优惠专区", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "my-card", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "my-coupon", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "position/detail", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#D1FFE1", + "navigationBarTextStyle": "black" + } + }, + { + "path": "device-goods", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "device-orderList", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "device-orderDetail", + "style": { + "navigationBarTitleText": "定制详情", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + } + ] }, { - "path": "pages/my/coupon", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } - }, - { - "path": "pages/device/goods", - "style": { - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#ffffff", - "navigationBarTextStyle": "black" - } + "root": "subPackages/other", + "pages": [ + { + "path": "legal/agreement", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "legal/agreement-zh", + "style": { + "navigationBarTitleText": "用户协议", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "legal/agreement-en", + "style": { + "navigationBarTitleText": "User Agreement", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "legal/privacy", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "legal/privacy-zh", + "style": { + "navigationBarTitleText": "隐私政策", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "legal/privacy-en", + "style": { + "navigationBarTitleText": "Privacy Policy", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "legal/terms", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "join/index", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black" + } + }, + { + "path": "webview/index", + "style": { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTextStyle": "black", + "navigationStyle": "custom" + } + }, + { + "path": "serve/bagCheck/index", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "deposit/index", + "style": { + "navigationBarTitleText": "" + } + } + ] } ], "globalStyle": { diff --git a/pages/device/detail.vue b/pages/device/detail.vue index 736fb2f..4f5fb20 100644 --- a/pages/device/detail.vue +++ b/pages/device/detail.vue @@ -81,11 +81,12 @@ - - + + {{ hasActiveOrder ? $t('order.returnDevice') : getRentButtonText() }} + + + {{ $t('device.wxPayScoreDesc') }} @@ -162,6 +163,7 @@ const isLoggedIn = ref(true) const phoneNumber = ref('') const showPhoneAuthPopup = ref(false) + const isWechatMiniProgram = ref(false) // 生命周期 onLoad 钩子 onLoad(async (options) => { @@ -179,6 +181,13 @@ uni.setNavigationBarTitle({ title: t('device.deviceInfo') }) + // 检测当前运行环境 + // #ifdef MP-WEIXIN + isWechatMiniProgram.value = true + // #endif + // #ifdef H5 + isWechatMiniProgram.value = false + // #endif await checkUserPhone() await fetchDeviceInfo() }) @@ -368,7 +377,7 @@ const goToPurchase = () => { const positionId = positionInfo.value?.positionId || positionInfo.value?.id uni.navigateTo({ - url: `/pages/purchase/index?positionId=${positionId}` + url: `/subPackages/business/purchase/index?positionId=${positionId}` }) } @@ -381,7 +390,7 @@ const order = inUseRes.data // 如果有正在进行的订单,跳转到归还页面,带上设备ID uni.redirectTo({ - url: `/pages/device/return?deviceId=${deviceId.value}` + url: `/subPackages/service/return/index?deviceId=${deviceId.value}` }) return } @@ -499,6 +508,15 @@ return `不足${unitMinutes}分钟按${unitMinutes}分钟计费,封顶${depositAmount}元,持续计费至${depositAmount}元视为买断` } + // 获取租借按钮文本 + const getRentButtonText = () => { + if (isWechatMiniProgram.value) { + return t('device.rentDepositFree') + } else { + return '立即租借' + } + } + // 提交租借订单 const submitRentOrder = async (payWay) => { try { diff --git a/pages/index/index.vue b/pages/index/index.vue index 94b7b11..b90c1bf 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -287,11 +287,11 @@ `${k}=${encodeURIComponent(current.options[k])}`).join('&') : '' const redirect = encodeURIComponent(query ? `${route}?${query}` : route) uni.reLaunch({ - url: `/pages/login/index?redirect=${redirect}` + url: `/subPackages/user/login/index?redirect=${redirect}` }) } catch (e) { uni.reLaunch({ - url: '/pages/login/index' + url: '/subPackages/user/login/index' }) } } @@ -407,7 +407,7 @@ } else if (config.linkType === 'external' && config.linkUrl) { // 跳转到外部链接(H5页面) uni.navigateTo({ - url: `/pages/webview/index?url=${encodeURIComponent(config.linkUrl)}` + url: `/subPackages/other/webview/index?url=${encodeURIComponent(config.linkUrl)}` }) } else if (config.linkType === 'internal' && config.linkUrl) { // 跳转到内部页面 @@ -875,7 +875,7 @@ const goMy = () => { uni.navigateTo({ - url: '/pages/my/index' + url: '/subPackages/user/my/index' }) } @@ -906,13 +906,13 @@ // 跳转到商品详情页面,传递商品ID uni.navigateTo({ - url: `/pages/device/goods?productId=${productId}` + url: `/subPackages/business/device-goods?productId=${productId}` }) } else { console.warn('没有查询到商品数据') // 如果没有商品数据,仍然跳转到商品页面(显示空状态) uni.navigateTo({ - url: '/pages/device/goods' + url: '/subPackages/business/device-goods' }) } } catch (error) { @@ -921,7 +921,7 @@ // 即使查询失败,也跳转到商品页面 uni.navigateTo({ - url: '/pages/device/goods' + url: '/subPackages/business/device-goods' }) } } @@ -1061,14 +1061,14 @@ success: () => { setTimeout(() => { uni.navigateTo({ - url: `/pages/order/payment?orderId=${unpaidOrder.orderId}` + url: `/subPackages/order/payment?orderId=${unpaidOrder.orderId}` }); }, 100); } }); } else { uni.navigateTo({ - url: `/pages/order/payment?orderId=${unpaidOrder.orderId}` + url: `/subPackages/order/payment?orderId=${unpaidOrder.orderId}` }); } } else { @@ -1171,7 +1171,7 @@ // 使用指南弹窗控制 const openPopup = () => { uni.navigateTo({ - url:'/pages/device/goods' + url:'/subPackages/business/device-goods' }) // try { // showGuidePopup.value = true diff --git a/pages/order/detail.vue b/pages/order/detail.vue index 16b49f5..766b67d 100644 --- a/pages/order/detail.vue +++ b/pages/order/detail.vue @@ -48,9 +48,10 @@ - + + + + @@ -209,6 +210,27 @@ + + + + + + + {{ $t('order.returnLocationMap') }} + + × + + + + + + + + {{ $t('common.saveImage') }} + + + + @@ -288,7 +310,8 @@ userPurchaseId: '', discountTypeName: '', originalFee:'', - discountAmount:'' + discountAmount:'', + returnMapImage: '' }) const timer = ref(null) const statusCheckTimer = ref(null) @@ -303,6 +326,8 @@ const countdownTimer = ref(null) const feeRuleText = ref('') const convertToOwnPopup = ref(null) + const showReturnMapPopup = ref(false) + const returnMapImageUrl = ref('') // 计算属性:是否显示优惠券/会员卡可用提示 const canUsePromotionTag = computed(() => { @@ -400,14 +425,86 @@ // 联系客服 const contactService = () => { uni.navigateTo({ - url: '/pages/help/index' + url: '/subPackages/service/help/index' }) } + // 获取计费规则图片URL + const getFeeRuleImageUrl = () => { + const locale = instance?.proxy?.$i18n?.locale || 'en_US' + // 如果是中文环境,显示中文图片,否则显示英文图片 + if (locale === 'zh_CN' || locale === 'zh-CN' || locale === 'zh') { + return 'https://static.fdzpower.com/order_notice/notice_CN.png' + } + return 'https://static.fdzpower.com/order_notice/notice_EN.png' + } + // 快速归还 const quickReturn = () => { - uni.navigateTo({ - url: '/pages/search/index' + // 检查是否有 returnMapImage 字段 + console.log(orderInfo.value.returnMapImage); + + if (orderInfo.value.returnMapImage) { + // 有值则弹窗显示图片 + returnMapImageUrl.value = orderInfo.value.returnMapImage + showReturnMapPopup.value = true + } else { + // 没有值则继续执行跳转流程 + uni.navigateTo({ + url: '/pages/search/index' + }) + } + } + + // 关闭归还地图弹窗 + const closeReturnMapPopup = () => { + showReturnMapPopup.value = false + } + + // 保存归还地图图片 + const saveReturnMapImage = () => { + uni.showLoading({ + title: t('common.saving') + }) + + uni.downloadFile({ + url: returnMapImageUrl.value, + success: (res) => { + if (res.statusCode === 200) { + uni.saveImageToPhotosAlbum({ + filePath: res.tempFilePath, + success: () => { + uni.hideLoading() + uni.showToast({ + title: t('common.saveSuccess'), + icon: 'success' + }) + }, + fail: (err) => { + uni.hideLoading() + console.error('保存图片失败:', err) + uni.showToast({ + title: t('common.saveFailed'), + icon: 'none' + }) + } + }) + } else { + uni.hideLoading() + uni.showToast({ + title: t('common.downloadFailed'), + icon: 'none' + }) + } + }, + fail: (err) => { + uni.hideLoading() + console.error('下载图片失败:', err) + uni.showToast({ + title: t('common.downloadFailed'), + icon: 'none' + }) + } }) } @@ -781,6 +878,7 @@ orderInfo.value.userPurchaseId = orderData.userPurchaseId || '' orderInfo.value.discountTypeName = orderData.discountTypeName || '' orderInfo.value.originalFee = orderData.originalFee||'' + orderInfo.value.returnMapImage = orderData.returnMapImage||'' // 保存快递归还开始时间(小时为单位) orderInfo.value.expressReturnStart = orderData.expressReturnStart || null @@ -997,37 +1095,40 @@ // 申请退款 const handleWithdraw = async () => { - try { - uni.showLoading({ - title: t('common.processing') - }) + uni.navigateTo({ + url:'/subPackages/service/feedback/index' + }) + // try { + // uni.showLoading({ + // title: t('common.processing') + // }) - const res = await withdrawDeposit(orderInfo.value.orderNo) + // const res = await withdrawDeposit(orderInfo.value.orderNo) - if (res && res.code === 200) { - uni.showToast({ - title: t('order.refundSuccess'), - icon: 'success' - }) + // if (res && res.code === 200) { + // uni.showToast({ + // title: t('order.refundSuccess'), + // icon: 'success' + // }) - orderInfo.value.withdrawStatus = 'processing' - orderInfo.value.isWithdrawn = true + // orderInfo.value.withdrawStatus = 'processing' + // orderInfo.value.isWithdrawn = true - setTimeout(() => { - getOrderDetails() - }, 1500) - } else { - throw new Error(res?.msg || t('order.refundFailed')) - } - } catch (error) { - console.error('退款申请失败:', error) - uni.showToast({ - title: error.message || t('order.refundFailed'), - icon: 'none' - }) - } finally { - uni.hideLoading() - } + // setTimeout(() => { + // getOrderDetails() + // }, 1500) + // } else { + // throw new Error(res?.msg || t('order.refundFailed')) + // } + // } catch (error) { + // console.error('退款申请失败:', error) + // uni.showToast({ + // title: error.message || t('order.refundFailed'), + // icon: 'none' + // }) + // } finally { + // uni.hideLoading() + // } } // 返回首页 @@ -1381,6 +1482,18 @@ color: #4CAF50; line-height: 1.6; } + + .fee-rule-image { + margin-top: 20rpx; + width: 100%; + + .rule-image { + // height: 100%; + width: 100%; + display: block; + border-radius: 12rpx; + } + } } // 转为自用提示 @@ -1655,4 +1768,103 @@ } } } + + /* 归还地图弹窗样式 */ + .return-map-popup { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 9999; + display: flex; + align-items: center; + justify-content: center; + + .popup-mask { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.6); + } + + .popup-content { + position: relative; + width: 90%; + max-width: 600rpx; + background: #ffffff; + border-radius: 24rpx; + overflow: hidden; + z-index: 10000; + + .popup-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 30rpx; + border-bottom: 1rpx solid #f0f0f0; + + .popup-title { + font-size: 32rpx; + font-weight: bold; + color: #333; + } + + .close-btn { + width: 48rpx; + height: 48rpx; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50%; + background: #f5f5f5; + + .close-icon { + font-size: 40rpx; + color: #666; + line-height: 1; + } + + &:active { + opacity: 0.7; + } + } + } + + .popup-body { + padding: 30rpx; + max-height: 60vh; + overflow-y: auto; + + .map-image { + width: 100%; + display: block; + border-radius: 12rpx; + } + } + + .popup-footer { + padding: 20rpx 30rpx 30rpx; + + .save-btn { + width: 100%; + height: 88rpx; + background: linear-gradient(135deg, #07c160, #10d673); + border-radius: 44rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + font-weight: 600; + color: #fff; + + &:active { + opacity: 0.8; + } + } + } + } + } \ No newline at end of file diff --git a/pages/search/index.vue b/pages/search/index.vue index 85e3a0b..ffa864a 100644 --- a/pages/search/index.vue +++ b/pages/search/index.vue @@ -303,7 +303,7 @@ const init = async () => { return } uni.navigateTo({ - url: `/pages/position/detail?positionId=${position.positionId}` + url: `/subPackages/business/position/detail?positionId=${position.positionId}` }) } diff --git a/pages/serve/bagCheck/index.vue b/pages/serve/bagCheck/index.vue index 4dcdf24..042ed27 100644 --- a/pages/serve/bagCheck/index.vue +++ b/pages/serve/bagCheck/index.vue @@ -7,15 +7,15 @@ - - \ No newline at end of file diff --git a/pages/order/return-success.vue b/subPackages/order/return-success.vue similarity index 100% rename from pages/order/return-success.vue rename to subPackages/order/return-success.vue diff --git a/subPackages/order/success.vue b/subPackages/order/success.vue new file mode 100644 index 0000000..a13d2cc --- /dev/null +++ b/subPackages/order/success.vue @@ -0,0 +1,399 @@ + + + + + \ No newline at end of file diff --git a/pages/deposit/index.vue b/subPackages/other/deposit/index.vue similarity index 94% rename from pages/deposit/index.vue rename to subPackages/other/deposit/index.vue index 9b4b6bd..aeb6a69 100644 --- a/pages/deposit/index.vue +++ b/subPackages/other/deposit/index.vue @@ -1,323 +1,323 @@ - - - - - \ No newline at end of file diff --git a/pages/join/index.vue b/subPackages/other/join/index.vue similarity index 100% rename from pages/join/index.vue rename to subPackages/other/join/index.vue diff --git a/pages/legal/agreement-en.vue b/subPackages/other/legal/agreement-en.vue similarity index 100% rename from pages/legal/agreement-en.vue rename to subPackages/other/legal/agreement-en.vue diff --git a/pages/legal/agreement-zh.vue b/subPackages/other/legal/agreement-zh.vue similarity index 100% rename from pages/legal/agreement-zh.vue rename to subPackages/other/legal/agreement-zh.vue diff --git a/pages/legal/agreement.vue b/subPackages/other/legal/agreement.vue similarity index 100% rename from pages/legal/agreement.vue rename to subPackages/other/legal/agreement.vue diff --git a/pages/legal/privacy-en.vue b/subPackages/other/legal/privacy-en.vue similarity index 100% rename from pages/legal/privacy-en.vue rename to subPackages/other/legal/privacy-en.vue diff --git a/pages/legal/privacy-zh.vue b/subPackages/other/legal/privacy-zh.vue similarity index 100% rename from pages/legal/privacy-zh.vue rename to subPackages/other/legal/privacy-zh.vue diff --git a/pages/legal/privacy.vue b/subPackages/other/legal/privacy.vue similarity index 100% rename from pages/legal/privacy.vue rename to subPackages/other/legal/privacy.vue diff --git a/pages/legal/terms.vue b/subPackages/other/legal/terms.vue similarity index 100% rename from pages/legal/terms.vue rename to subPackages/other/legal/terms.vue diff --git a/subPackages/other/serve/bagCheck/index.vue b/subPackages/other/serve/bagCheck/index.vue new file mode 100644 index 0000000..54cf1cd --- /dev/null +++ b/subPackages/other/serve/bagCheck/index.vue @@ -0,0 +1,144 @@ + + + + + \ No newline at end of file diff --git a/pages/webview/index.vue b/subPackages/other/webview/index.vue similarity index 100% rename from pages/webview/index.vue rename to subPackages/other/webview/index.vue diff --git a/pages/expressReturn/addExpressReturn.vue b/subPackages/service/expressReturn/addExpressReturn.vue similarity index 100% rename from pages/expressReturn/addExpressReturn.vue rename to subPackages/service/expressReturn/addExpressReturn.vue diff --git a/pages/expressReturn/detail.vue b/subPackages/service/expressReturn/detail.vue similarity index 100% rename from pages/expressReturn/detail.vue rename to subPackages/service/expressReturn/detail.vue diff --git a/pages/expressReturn/index.vue b/subPackages/service/expressReturn/index.vue similarity index 100% rename from pages/expressReturn/index.vue rename to subPackages/service/expressReturn/index.vue diff --git a/pages/feedback/detail.vue b/subPackages/service/feedback/detail.vue similarity index 99% rename from pages/feedback/detail.vue rename to subPackages/service/feedback/detail.vue index 09282ca..62732be 100644 --- a/pages/feedback/detail.vue +++ b/subPackages/service/feedback/detail.vue @@ -92,7 +92,7 @@ getFeedbackDetail, getFeedbackMessages, sendFeedbackMessage - } from '../../config/api/feedback.js'; + } from '@/config/api/feedback.js'; import { useI18n } from '@/utils/i18n.js' diff --git a/pages/feedback/index.vue b/subPackages/service/feedback/index.vue similarity index 99% rename from pages/feedback/index.vue rename to subPackages/service/feedback/index.vue index 48ea427..c7ede06 100644 --- a/pages/feedback/index.vue +++ b/subPackages/service/feedback/index.vue @@ -72,10 +72,10 @@ } from "@dcloudio/uni-app" import { addUserFeedback - } from '../../config/api/feedback' + } from '@/config/api/feedback' import { uploadOssResource - } from '../../config/api/user' + } from '@/config/api/user' import { useI18n } from '@/utils/i18n.js' diff --git a/pages/feedback/list.vue b/subPackages/service/feedback/list.vue similarity index 99% rename from pages/feedback/list.vue rename to subPackages/service/feedback/list.vue index 526ae78..49062c0 100644 --- a/pages/feedback/list.vue +++ b/subPackages/service/feedback/list.vue @@ -72,7 +72,7 @@ } from '@dcloudio/uni-app'; import { getFeedbackList - } from '../../config/api/feedback.js'; + } from '@/config/api/feedback.js'; import { useI18n } from '@/utils/i18n.js' diff --git a/pages/help/index.vue b/subPackages/service/help/index.vue similarity index 95% rename from pages/help/index.vue rename to subPackages/service/help/index.vue index 3ebf058..ba308c6 100644 --- a/pages/help/index.vue +++ b/subPackages/service/help/index.vue @@ -1,143 +1,143 @@ - - - - - \ No newline at end of file diff --git a/pages/return/index.vue b/subPackages/service/return/index.vue similarity index 100% rename from pages/return/index.vue rename to subPackages/service/return/index.vue diff --git a/pages/login/index.vue b/subPackages/user/login/index.vue similarity index 94% rename from pages/login/index.vue rename to subPackages/user/login/index.vue index 4d2d2bb..b94a7e2 100644 --- a/pages/login/index.vue +++ b/subPackages/user/login/index.vue @@ -27,9 +27,9 @@ {{ $t('auth.agreeToTerms') }} - {{ $t('user.userAgreement') }} + {{ $t('user.userAgreement') }} {{ $t('common.and') }} - {{ $t('user.privacyPolicy') }} + {{ $t('user.privacyPolicy') }} @@ -40,7 +40,7 @@ diff --git a/pages/login/phone.vue b/subPackages/user/login/phone.vue similarity index 100% rename from pages/login/phone.vue rename to subPackages/user/login/phone.vue diff --git a/subPackages/user/my/card.vue b/subPackages/user/my/card.vue new file mode 100644 index 0000000..7d3d10e --- /dev/null +++ b/subPackages/user/my/card.vue @@ -0,0 +1,479 @@ + + + + + \ No newline at end of file diff --git a/subPackages/user/my/coupon.vue b/subPackages/user/my/coupon.vue new file mode 100644 index 0000000..8150b0b --- /dev/null +++ b/subPackages/user/my/coupon.vue @@ -0,0 +1,542 @@ + + + + + diff --git a/pages/my/index.vue b/subPackages/user/my/index.vue similarity index 84% rename from pages/my/index.vue rename to subPackages/user/my/index.vue index f241ad2..4c09ca6 100644 --- a/pages/my/index.vue +++ b/subPackages/user/my/index.vue @@ -1,858 +1,867 @@ - - - - - \ No newline at end of file diff --git a/pages/setting/index.vue b/subPackages/user/setting/index.vue similarity index 93% rename from pages/setting/index.vue rename to subPackages/user/setting/index.vue index 0e0b2d0..35287cf 100644 --- a/pages/setting/index.vue +++ b/subPackages/user/setting/index.vue @@ -10,15 +10,15 @@ - + {{ $t('user.userAgreement') }} - + {{ $t('user.privacyPolicy') }} - + {{ $t('legal.termsAndConditions') }} @@ -123,7 +123,7 @@ const handleLogout = async () => { setTimeout(() => { uni.removeStorageSync('token') uni.removeStorageSync('userInfo') - uni.reLaunch({ url: '/pages/login/index' }) + uni.reLaunch({ url: '/subPackages/user/login/index' }) }, 1200) } } diff --git a/pages/user/index.vue b/subPackages/user/user/index.vue similarity index 95% rename from pages/user/index.vue rename to subPackages/user/user/index.vue index 4e5e069..299db18 100644 --- a/pages/user/index.vue +++ b/subPackages/user/user/index.vue @@ -1,240 +1,240 @@ - - - - - \ No newline at end of file diff --git a/pages/userProfile/index.vue b/subPackages/user/userProfile/index.vue similarity index 99% rename from pages/userProfile/index.vue rename to subPackages/user/userProfile/index.vue index 9d1dedf..36c0438 100644 --- a/pages/userProfile/index.vue +++ b/subPackages/user/userProfile/index.vue @@ -56,7 +56,7 @@