diff --git a/components/home/HomeMainH5.vue b/components/home/HomeMainH5.vue
new file mode 100644
index 0000000..f749b4b
--- /dev/null
+++ b/components/home/HomeMainH5.vue
@@ -0,0 +1,294 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ loadingText }}
+
+
+
+
+
+
+ {{ scanText }}
+
+
+
+
+ {{ t('home.h5HowItWorks') }}
+
+
+ 1
+ {{ t('home.h5StepScan') }}
+
+
+ 2
+ {{ t('home.h5StepUnlock') }}
+
+
+ 3
+ {{ t('home.h5StepReturn') }}
+
+
+
+
+
+ {{ t('home.h5ServiceTitle') }}
+
+ {{ t('home.h5ServiceSupport') }}
+ {{ t('home.h5ServiceSafePayment') }}
+ {{ t('home.h5ServiceEasyReturn') }}
+
+
+
+
+
+
+
+ {{ buyDeviceText }}
+
+
+
+ {{ scanText }}
+
+
+
+ {{ personalCenterText }}
+
+
+
+
+
+
+
+
diff --git a/components/home/HomeMainNonH5.vue b/components/home/HomeMainNonH5.vue
new file mode 100644
index 0000000..70cb42f
--- /dev/null
+++ b/components/home/HomeMainNonH5.vue
@@ -0,0 +1,276 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ locationPermissionText }}
+
+ {{ enableLocationText }}
+
+
+
+
+
+
+
+
+
+ {{ loadingLocationText }}
+
+
+
+
+
+
+
+
+
+
+ {{ buyDeviceText }}
+
+
+
+
+
+
+ {{ scanText }}
+
+
+
+
+
+
+ {{ personalCenterText }}
+
+
+
+
+
+
+
+
diff --git a/config/url.js b/config/url.js
index 1e4c28a..106577d 100644
--- a/config/url.js
+++ b/config/url.js
@@ -1,5 +1,6 @@
// export const URL = "https://my.gxfs123.com/api" //正式服务器-弃用
-export const URL = "https://manager.fdzpower.com/api" //正式服务器
+// export const URL = "https://manager.fdzpower.com/api" //正式国内服务器
+export const URL = "https://ina.fdzpower.com/api" //正式国外服务器
// export const URL = "https://fansdev.gxfs123.com/api" //测试服务器
// export const URL = "http://192.168.0.158:8080" //本地调试
// export const URL = "http://127.0.0.1:8080" //本地调试
diff --git a/locale/en-US.js b/locale/en-US.js
index b1b5c40..7e3426f 100644
--- a/locale/en-US.js
+++ b/locale/en-US.js
@@ -92,6 +92,15 @@ export default {
relocate: 'Relocate',
search: 'Search',
service: 'Service',
+ h5ScanDesc: 'Scan the device QR code to start',
+ h5HowItWorks: 'How It Works',
+ h5StepScan: 'Scan',
+ h5StepUnlock: 'Device Ejects',
+ h5StepReturn: 'Return',
+ h5ServiceTitle: 'Service',
+ h5ServiceSupport: '24/7 Support',
+ h5ServiceSafePayment: 'Safe Payment',
+ h5ServiceEasyReturn: 'Easy Return',
searchPlaceholder: 'Search locations',
nearbyDeviceLocation: 'Nearby',
noNearbyDevice: 'No devices nearby',
diff --git a/locale/id-ID.js b/locale/id-ID.js
index fa4bcfc..db82116 100644
--- a/locale/id-ID.js
+++ b/locale/id-ID.js
@@ -92,6 +92,15 @@ export default {
relocate: 'Lokasi Ulang',
search: 'Cari',
service: 'Layanan Pelanggan',
+ h5ScanDesc: 'Pindai kode QR perangkat untuk mulai menggunakan',
+ h5HowItWorks: 'Cara Penggunaan',
+ h5StepScan: 'Pindai',
+ h5StepUnlock: 'Perangkat Keluar',
+ h5StepReturn: 'Kembalikan',
+ h5ServiceTitle: 'Layanan',
+ h5ServiceSupport: 'Dukungan 24/7',
+ h5ServiceSafePayment: 'Pembayaran Aman',
+ h5ServiceEasyReturn: 'Pengembalian Mudah',
searchPlaceholder: 'Cari lokasi terdekat',
nearbyDeviceLocation: 'Lokasi Perangkat Terdekat',
noNearbyDevice: 'Tidak ada perangkat terdekat',
diff --git a/locale/zh-CN.js b/locale/zh-CN.js
index 01b6cf1..2283b59 100644
--- a/locale/zh-CN.js
+++ b/locale/zh-CN.js
@@ -91,6 +91,15 @@ export default {
relocate: '重新定位',
search: '搜索',
service: '客服',
+ h5ScanDesc: '扫描设备二维码,立即开始使用',
+ h5HowItWorks: '使用流程',
+ h5StepScan: '扫码',
+ h5StepUnlock: '设备弹出',
+ h5StepReturn: '归还',
+ h5ServiceTitle: '服务保障',
+ h5ServiceSupport: '24小时在线客服',
+ h5ServiceSafePayment: '安全支付',
+ h5ServiceEasyReturn: '便捷归还',
searchPlaceholder: '搜索附近场地',
nearbyDeviceLocation: '附近设备场地',
noNearbyDevice: '附近暂无设备',
diff --git a/pages/device/detail.vue b/pages/device/detail.vue
index 178cc0d..c5c807e 100644
--- a/pages/device/detail.vue
+++ b/pages/device/detail.vue
@@ -34,12 +34,12 @@
- ¥
- {{ deviceFeeConfig.maxHourPrice || '5.00' }}
+ {{ displayCurrencySymbol }}
+ {{ displayHourlyPrice }}
/{{ getPriceUnit() }}
- {{ deviceInfo.depositAmount || '99' }}{{ $t('device.capLimit') }}
+ {{ displayDepositCap }}{{ $t('device.capLimit') }}
@@ -129,6 +129,7 @@
import {
ref,
reactive,
+ computed,
onMounted
} from 'vue'
import {
@@ -178,6 +179,8 @@
const isWechatMiniProgram = ref(false)
const isAlipayMiniProgram = ref(false)
const isH5 = ref(false)
+ const IDR_DEPOSIT_DISPLAY = 99000
+ const IDR_HOUR_PRICE_DISPLAY = 6000
// 生命周期 onLoad 钩子
onLoad(async (options) => {
@@ -499,6 +502,7 @@
// 获取价格单位文本
const getPriceUnit = () => {
+ if (isIdrCurrency.value) return t('time.hour')
console.log(deviceInfo.value);
// 按分钟计费
if (deviceInfo.value && deviceInfo.value.feeType === 'minute') {
@@ -547,6 +551,9 @@
// 生成计费说明文本
const getPricingInfoText = () => {
+ if (isIdrCurrency.value) {
+ return `${displayCurrencySymbol.value}${displayHourlyPrice.value}/${t('time.hour')}`
+ }
const unitPrice = getBillingUnitPrice()
const maxHourPrice = deviceFeeConfig.value.maxHourPrice || '5'
@@ -562,6 +569,9 @@
// 生成详细说明文本
const getDetailInfoText = () => {
+ if (isIdrCurrency.value) {
+ return `不足1${t('time.hour')}按1${t('time.hour')}计费,封顶${displayCurrencySymbol.value}${displayDepositCap.value},持续计费至${displayCurrencySymbol.value}${displayDepositCap.value}视为买断`
+ }
const freeMinutes = getFreeMinutes()
const unitMinutes = getBillingUnitMinutes()
const depositAmount = deviceInfo.value.depositAmount || '99'
@@ -584,6 +594,24 @@
}
}
+ const currencyCode = computed(() => {
+ return (positionInfo.value?.currency || '').toUpperCase()
+ })
+
+ const isIdrCurrency = computed(() => currencyCode.value === 'IDR')
+
+ const displayCurrencySymbol = computed(() => (isIdrCurrency.value ? 'Rp ' : '¥'))
+
+ const displayHourlyPrice = computed(() => {
+ if (isIdrCurrency.value) return `${IDR_HOUR_PRICE_DISPLAY}`
+ return deviceFeeConfig.value.maxHourPrice || '5.00'
+ })
+
+ const displayDepositCap = computed(() => {
+ if (isIdrCurrency.value) return `${IDR_DEPOSIT_DISPLAY}`
+ return deviceInfo.value.depositAmount || '99'
+ })
+
// 提交租借订单
const submitRentOrder = async (payWay) => {
try {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 6a318c1..fc184f4 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -17,80 +17,25 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
- {{ $t('home.locationPermissionOffTip') }}
-
- {{ $t('home.enableLocation') }}
-
-
-
-
-
-
-
-
-
-
- {{ $t('common.loadingLocation') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('home.buyDevice') }}
-
-
-
-
-
-
- {{ $t('home.scanToUse') }}
-
-
-
-
-
-
- {{ $t('home.personalCenter') }}
-
-
+
+
+
0) {
- bannerImageList.value = imageList
- // 提取图片URL用于展示
- bannerImages.value = imageList.map(item => item.imageUrl)
- } else {
- console.warn('未获取到广告图片')
+ console.log('首页广告响应:', platform, res)
+
+ if (res && res.code === 200 && res.data) {
+ const imageList = res.data.imageList || []
+ if (imageList.length > 0) {
+ bannerImageList.value = imageList
+ // 提取图片URL用于展示
+ bannerImages.value = imageList.map(item => item.imageUrl)
+ loaded = true
+ break
+ }
}
- } else {
- console.warn('获取首页广告失败:', res?.msg || '未知错误')
+ }
+
+ if (!loaded) {
+ console.warn('未获取到首页广告图片')
}
} catch (error) {
console.error('获取首页广告失败:', error)
@@ -668,6 +622,11 @@
getBannerImages()
])
+ // #ifdef H5
+ // H5 首页不展示地图,跳过定位与附近设备加载
+ return
+ // #endif
+
// 1. 先获取用户位置
await getUserLocationAndAddress()
@@ -1626,6 +1585,36 @@
box-sizing: border-box;
}
+ .h5-banner-section {
+ padding: 24rpx 20rpx 0;
+ box-sizing: border-box;
+ }
+
+ .h5-banner-swiper {
+ width: 100%;
+ height: 320rpx;
+ border-radius: 20rpx;
+ overflow: hidden;
+ background: #f5f5f5;
+ }
+
+ .h5-banner-item {
+ width: 100%;
+ height: 100%;
+ }
+
+ .h5-banner-image {
+ width: 100%;
+ height: 100%;
+ }
+
+ .h5-banner-empty {
+ padding: 80rpx 20rpx 0;
+ text-align: center;
+ color: #999;
+ font-size: 26rpx;
+ }
+
/* 顶部Logo和通知栏 */
.header-section {
width: 92%;
diff --git a/subPackages/order/payment.vue b/subPackages/order/payment.vue
index 629cd23..ebab93d 100644
--- a/subPackages/order/payment.vue
+++ b/subPackages/order/payment.vue
@@ -124,6 +124,8 @@
const deviceInfo = ref(null)
const passedTotalAmount = ref(null)
const passedDepositAmount = ref(null)
+ const currencyCode = ref('USD')
+ const IDR_DEPOSIT_DISPLAY = 99000
// 支付方式相关(微信/支付宝/H5-Antom 多平台)
const paymentMethods = ref([])
@@ -149,6 +151,9 @@
})
const totalAmount = computed(() => {
+ if (currencyCode.value === 'IDR') {
+ return `${IDR_DEPOSIT_DISPLAY}`
+ }
if (passedTotalAmount.value !== null) {
return parseFloat(passedTotalAmount.value).toFixed(2);
}
@@ -156,7 +161,10 @@
return deposit.toFixed(2)
})
- const currencySymbol = computed(() => 'USD')
+ const currencySymbol = computed(() => {
+ if (currencyCode.value === 'IDR') return 'Rp'
+ return 'USD'
+ })
// 加载订单信息
const loadOrderInfo = async () => {
@@ -244,10 +252,14 @@
const res = await getDeviceInfo(deviceNo.value);
if (res.code === 200 && res.data) {
deviceInfo.value = res.data.device;
+ currencyCode.value = (res.data?.position?.currency || currencyCode.value || 'USD').toUpperCase()
if (deviceInfo.value && deviceInfo.value.depositAmount) {
orderInfo.value.deposit = deviceInfo.value.depositAmount;
}
+ if (currencyCode.value === 'IDR') {
+ orderInfo.value.deposit = `${IDR_DEPOSIT_DISPLAY}`
+ }
}
} catch (error) {
console.error('获取设备信息失败:', error);
diff --git a/subPackages/user/login/phone.vue b/subPackages/user/login/phone.vue
index edf2330..ddf6647 100644
--- a/subPackages/user/login/phone.vue
+++ b/subPackages/user/login/phone.vue
@@ -24,6 +24,7 @@
+
+
@@ -50,6 +52,7 @@
+
+
@@ -170,24 +174,29 @@
// 登录
const handleLogin = async () => {
if (!validatePhone()) return
-
+
+ // #ifndef H5
if (!verifyCode.value) {
uni.showToast({ title: t('auth.codeRequired'), icon: 'none' })
return
}
-
+ // #endif
+
+ // #ifndef H5
if (!isAgreed.value) {
uni.showToast({ title: t('auth.pleaseAgreeToTerms'), icon: 'none' })
return
}
-
+ // #endif
+
try {
uni.showLoading({ title: t('common.loggingIn') })
const res = await quickLogin({
loginType: 'SMS',
appid,
phonenumber: getSubmitPhoneNumber(),
- smsCode: verifyCode.value
+ // H5 按产品要求不做验证码发送与校验,小程序端保持原流程
+ smsCode: verifyCode.value || ''
})
if (res && res.code !== 200) {