Compare commits

...

2 Commits

Author SHA1 Message Date
db1aa77903 修改mask 2026-10-19 14:49:18 +08:00
6444c45f81 延迟弹出 防止不会弹出 2026-05-18 14:01:42 +08:00
14 changed files with 230 additions and 78 deletions

View File

@ -69,6 +69,7 @@ export default {
}
}
});
uni.removeStorageSync('getCouponCodeTime'); //清掉弹窗有优惠劵的时间记录 避免重进的时候不会弹窗
// // 开始监听网络状态变化
listenNetworkChange();

View File

@ -1,6 +1,6 @@
<template>
<view class="popup">
<uv-popup ref="popup" customStyle="width: 620rpx; height: auto; padding:32rpx;" round="16rpx"
<uv-popup ref="popup" customStyle="width: 620rpx; height: auto; padding:32rpx;" :zIndex="props.zIndex" round="16rpx"
:closeOnClickOverlay="false" :safeAreaInsetBottom="false">
<view class="modal-container">
@ -99,6 +99,10 @@ const props = defineProps({
noClose: {
type: Boolean,
default: false
},
zIndex: {
type: Number,
default: 10075
}
})
@ -129,7 +133,7 @@ watch(
if (!popup.value) {
setTimeout(() => {
val ? popup.value?.open() : popup.value?.close()
}, 300)
}, 100)
} else {
val ? popup.value?.open() : popup.value?.close()
}

View File

@ -14,10 +14,85 @@
<link rel="icon" href="/favicon.ico" />
<script src="./config.js"></script>
<script src="https://ucmp-static.sf-express.com/assets/sdks/microservice-1.1.9.min.js"></script>
<!-- <script src="https://ucmp-static.sf-express.com/assets/sdks/webview-1.0.3.min.js"></script> -->
<script>
console.log(SFUIP,"SFUIP")
const sf = new SFUIP.SfMicroservice(window?.config?.ENV??'sit')
const sfuip = window.SFUIP
console.log('=== SFUIP 对象 ===', sfuip)
const sf = new sfuip.SfMicroservice(window?.config?.ENV??'sit')
console.log('=== sf 对象 ===', sf)
window.sf = sf
console.log('=== webviewjs 加载完成 ===')
// const loadMicroserviceSDK = () => {
// const script = document.createElement('script')
// script.src = 'https://ucmp-static.sf-express.com/assets/sdks/webview-1.0.3.min.js'
// script.onload = () => {
// // console.log(SFUIP,"SFUIP")
// // const sf = new SFUIP.SfMicroservice(window?.config?.ENV??'sit')
// // window.sf = sf
// console.log('=== webview-1.0.3.min.js 加载完成 ===')
// // 直接打印 SFUIP 对象及其子属性的所有方法
// if (window.SFUIP) {
// const sfuip = window.SFUIP
// console.log('=== SFUIP 对象 ===', sfuip)
// console.log('=== SFUIP 顶层属性/方法 ===', Object.keys(sfuip))
// // 遍历 SFUIP 的每个子属性,打印其类型和方法列表
// Object.keys(sfuip).forEach((key) => {
// const val = sfuip[key]
// const type = typeof val
// if (type === 'function') {
// console.log(` SFUIP.${key} = [Function]`)
// } else if (type === 'object' && val !== null) {
// console.log(` SFUIP.${key} = [Object]`, Object.keys(val))
// } else {
// console.log(` SFUIP.${key} =`, val)
// }
// })
// } else {
// console.warn('=== window.SFUIP 未找到 ===')
// }
// console.log('=== webview-1.0.3.min.js 加载完成 ===')
// // 遍历 window 上新增的属性,查找 SDK 抛出的全局对象
// const sdkKeys = Object.keys(window).filter((key) => {
// try {
// return typeof window[key] === 'function' || typeof window[key] === 'object'
// } catch (e) {
// return false
// }
// })
// console.log('=== window 上所有 function/object 类型的 key ===')
// console.log(sdkKeys)
// // 尝试查找常见的 SDK 全局变量名
// const possibleNames = ['SFUIP', 'SfMicroservice', 'sfMicroservice', 'microservice', 'Microservice', 'SF', 'sf']
// possibleNames.forEach((name) => {
// if (window[name]) {
// console.log(`=== 找到全局变量: ${name} ===`, window[name])
// // 如果是构造函数,打印原型链上的方法
// if (typeof window[name] === 'function' && window[name].prototype) {
// console.log(`=== ${name}.prototype 方法 ===`, Object.getOwnPropertyNames(window[name].prototype))
// }
// // 如果是对象,打印所有属性和方法
// if (typeof window[name] === 'object') {
// console.log(`=== ${name} 属性/方法 ===`, Object.keys(window[name]))
// }
// }
// })
// // 设置微信分享
// if (window.SFUIP?.shareToWx) {
// window.SFUIP.shareToWx({
// title: '生活服务',
// imageUrl: 'https://ucmp-static.sf-express.com/sfoss/ad-act/wxapp/home-banner-new-2023.png',
// url: window.location.href,
// supportShare: 'YES'
// })
// }
// }
// script.onerror = () => {
// console.error('webview-1.0.3.min.js 加载失败')
// }
// document.head.appendChild(script)
// }
// function loadScript(url, retry = 3) {
// return new Promise((resolve, reject) => {
// const script = document.createElement('script')
@ -56,28 +131,6 @@
// })
</script>
<script>
// // 获取当前路径名
// const currentPath = window.location.pathname;
// var currentDomain = window.location.origin;
// // 定义跳转逻辑
// function checkAndRedirect() {
// const screenWidth =document.documentElement.clientWidth;
// if (screenWidth >= 900 && !(currentPath.indexOf('/h5/index.html') ==-1)) {
// window.location.href =currentDomain+ '/';
// } else if (screenWidth < 900 && (currentPath.indexOf('/h5/index.html') ==-1)) {
// window.location.href =currentDomain+ '/h5/index.html';
// }
// }
// // // 初始检查
// checkAndRedirect();
// // 监听屏幕宽度变化
// window.addEventListener('resize', () => {
// checkAndRedirect();
// });
</script>
<title>城市迷你仓</title>
<!--preload-links-->
<!--app-context-->

View File

@ -457,7 +457,7 @@
"reserve.Individual & Family": "个人&家庭",
"reserve.Business & E-commerce": "企业&电商",
"reserve.Retail & Store": "零售&门店",
"reserve.contentTips": "预约成功,请耐心等待工作人员联系,保持手机畅通,感谢!",
"reserve.contentTips": "预约成功,请耐心等待工作人员联系,保持手机畅通,感谢!",
"inviteDetail.title": "邀请记录",
"inviteDetail.Username": "用户名称",
"inviteDetail.Registration Date": "注册日期",

View File

@ -2,8 +2,8 @@ import { createSSRApp } from "vue";
import App from "./App";
import i18n from "./locale/index";
import * as Pinia from "pinia";
import VConsole from 'vconsole'
new VConsole()
// import VConsole from 'vconsole'
// new VConsole()
// import '@/uni.scss'
// 引入uvUI
import uvUI from "@/uni_modules/uv-ui-tools";

View File

@ -75,7 +75,7 @@
"vueVersion" : "3",
"h5" : {
"router" : {
"base" : "/client/"
"base" : "./"
},
"devServer" : {
"port" : 8999,

View File

@ -112,8 +112,7 @@
{
"path": "pages/webview/web",
"style": {
"navigationBarTitleText": " ",
"navigationStyle": "default"
"navigationBarTitleText": " "
}
},
{

File diff suppressed because one or more lines are too long

View File

@ -532,7 +532,7 @@ const handlePay = () => {
const cancelOrder = (item) => {
uni.showLoading({
mark: true,
mask: true,
})
getApi.OrderCountdownTime({ orderId: item.orderId }).then(res=>{
uni.hideLoading()

View File

@ -65,7 +65,7 @@
<script setup>
import { ref,reactive } from "vue";
import { onLoad, onShow, onShareAppMessage } from "@dcloudio/uni-app";
import { getDistance,mergeFiveGoatStores,makePhoneCall} from "@/utils/common.js";
import { getDistance,mergeFiveGoatStores,makePhoneCall,openLocation} from "@/utils/common.js";
import { useSiteApi } from "@/Apis/site.js";
import { useLoginApi } from "@/Apis/login.js";
import { ClientSite } from "@/Apis/book.js";
@ -98,7 +98,8 @@ let siteData = reactive({
// 点击路线跳转
const handleNavigate = (item) => {
// const { latitude, longitude } = wgs84ToGcj02(item.latitude, item.longitude);
wx.openLocation({
console.log(window.SFUIP, "window.SFUIP");
openLocation({
latitude:Number(item.latitude),
longitude:Number(item.longitude),
name: item.name,
@ -200,8 +201,12 @@ const getCityData = () => {
const goVr = (e) => {
e?.stopPropagation?.()
let vrUrl = 'https://elitesys.kingkongcang.com/tour/index.html'
if(window.location.host.indexOf('uat') !== -1){
vrUrl = 'https://uat.kingkongcang.com/client/tour/index.html'
}
uni.navigateTo({
url: "/pages/webview/web?url=" + encodeURIComponent("https://elitesys.kingkongcang.com/tour/index.html"),
url: "/pages/webview/web?url=" + encodeURIComponent(vrUrl),
});
}
const goReserve= (e) => {

View File

@ -179,15 +179,15 @@
<view class="value font26 fontb">{{ currency }} {{ state.orderData.originalPrice }}
</view>
</view>
<view class="item">
<view class="item" v-if="state.orderData.discountData?.[0]?.unitPrice">
<view class="label font26 fontb textGary">租金月费: </view>
<view class="value font26 fontb">{{ currency }} {{
state.orderData.discountData?.[0]?.unitPrice
}}
</view>
</view>
<view class="item">
<view class="label font26 fontb textGary">租期优惠: </view>
<view class="item" v-if="state.orderData.discountData?.[0]?.month">
<view class="label font26 fontb textGary" >租期优惠: </view>
<view class="value font26 fontb"> {{ state.orderData.discountData?.[0]?.month }}个月长租(-{{
currency }} {{ state.orderData.discountData?.[0]?.leaseDiscount }})
</view>
@ -997,7 +997,7 @@ const closeCancelOrder = () => {
const cancelOrder = () => {
uni.showLoading({
mark: true,
mask: true,
})
getApi.OrderCountdownTime({ orderId: state.value.selectItem.orderId }).then(res => {
uni.hideLoading()
@ -1310,6 +1310,7 @@ const GetOrderById = () => {
getApi.GetOrderById({ orderId: state.value.selectItem.orderId }).then(res => {
uni.hideLoading()
if (res.code === 200) {
console.log(res.data,'orderData')
state.value.orderData = res.data
}
})

View File

@ -1,6 +1,5 @@
<template>
<view class="page-container">
<!-- <navBar class="navBar"></navBar> -->
<view class="webview-container">
<web-view :src="url"></web-view>
</view>
@ -28,8 +27,8 @@ onLoad((options) => {
height: 100vh;
}
.navBar {
z-index: 10; /* 确保 navBar 在 WebView 之上 */
/* .navBar {
z-index: 10;
}
.webview-container {
@ -38,5 +37,5 @@ onLoad((options) => {
}
uni-web-view.uni-webview--fullscreen{
pointer-events: none;
}
} */
</style>

View File

@ -281,7 +281,7 @@ const getVerifyInfo = async () => {
uni.showLoading();
getAuthApi.GetCertificationInfo().then(res => {
uni.hideLoading({
mark: true,
mask: true,
});
let { code, data } = res;
if (code == 200 && data && data.length) {

View File

@ -328,3 +328,27 @@ export const getQueryParam = (name, url = window.location.href) => {
params = new URLSearchParams(hash)
return params.get(name)
}
export const openLocation = ({
latitude,
longitude,
name = '',
address = ''
}) => {
const params = {
name,
address,
longitude: Number(longitude),
latitude: Number(latitude)
}
const url = `/pages/common/bridge/bridge?type=openLocation&params=${encodeURIComponent(JSON.stringify(params))}`
console.log(url)
console.log(params)
SFUIP.navigateTo({
url
})
}