Compare commits
No commits in common. "db1aa77903669153fb12c554219a9651506a3b0f" and "3dc1d71dc0183fe41317d18674cbaa29b7dd3903" have entirely different histories.
db1aa77903
...
3dc1d71dc0
1
App.vue
1
App.vue
@ -69,7 +69,6 @@ export default {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
uni.removeStorageSync('getCouponCodeTime'); //清掉弹窗有优惠劵的时间记录 避免重进的时候不会弹窗
|
||||
// // 开始监听网络状态变化
|
||||
listenNetworkChange();
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="popup">
|
||||
<uv-popup ref="popup" customStyle="width: 620rpx; height: auto; padding:32rpx;" :zIndex="props.zIndex" round="16rpx"
|
||||
<uv-popup ref="popup" customStyle="width: 620rpx; height: auto; padding:32rpx;" round="16rpx"
|
||||
:closeOnClickOverlay="false" :safeAreaInsetBottom="false">
|
||||
<view class="modal-container">
|
||||
|
||||
@ -99,10 +99,6 @@ const props = defineProps({
|
||||
noClose: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
zIndex: {
|
||||
type: Number,
|
||||
default: 10075
|
||||
}
|
||||
})
|
||||
|
||||
@ -133,7 +129,7 @@ watch(
|
||||
if (!popup.value) {
|
||||
setTimeout(() => {
|
||||
val ? popup.value?.open() : popup.value?.close()
|
||||
}, 100)
|
||||
}, 300)
|
||||
} else {
|
||||
val ? popup.value?.open() : popup.value?.close()
|
||||
}
|
||||
|
||||
103
index.html
103
index.html
@ -14,85 +14,10 @@
|
||||
<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>
|
||||
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)
|
||||
// }
|
||||
|
||||
console.log(SFUIP,"SFUIP")
|
||||
const sf = new SFUIP.SfMicroservice(window?.config?.ENV??'sit')
|
||||
window.sf = sf
|
||||
// function loadScript(url, retry = 3) {
|
||||
// return new Promise((resolve, reject) => {
|
||||
// const script = document.createElement('script')
|
||||
@ -131,6 +56,28 @@
|
||||
// })
|
||||
|
||||
</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-->
|
||||
|
||||
@ -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": "注册日期",
|
||||
|
||||
4
main.js
4
main.js
@ -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";
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
"vueVersion" : "3",
|
||||
"h5" : {
|
||||
"router" : {
|
||||
"base" : "./"
|
||||
"base" : "/client/"
|
||||
},
|
||||
"devServer" : {
|
||||
"port" : 8999,
|
||||
|
||||
@ -112,7 +112,8 @@
|
||||
{
|
||||
"path": "pages/webview/web",
|
||||
"style": {
|
||||
"navigationBarTitleText": " "
|
||||
"navigationBarTitleText": " ",
|
||||
"navigationStyle": "default"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -532,7 +532,7 @@ const handlePay = () => {
|
||||
|
||||
const cancelOrder = (item) => {
|
||||
uni.showLoading({
|
||||
mask: true,
|
||||
mark: true,
|
||||
})
|
||||
getApi.OrderCountdownTime({ orderId: item.orderId }).then(res=>{
|
||||
uni.hideLoading()
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
<script setup>
|
||||
import { ref,reactive } from "vue";
|
||||
import { onLoad, onShow, onShareAppMessage } from "@dcloudio/uni-app";
|
||||
import { getDistance,mergeFiveGoatStores,makePhoneCall,openLocation} from "@/utils/common.js";
|
||||
import { getDistance,mergeFiveGoatStores,makePhoneCall} from "@/utils/common.js";
|
||||
import { useSiteApi } from "@/Apis/site.js";
|
||||
import { useLoginApi } from "@/Apis/login.js";
|
||||
import { ClientSite } from "@/Apis/book.js";
|
||||
@ -98,8 +98,7 @@ let siteData = reactive({
|
||||
// 点击路线跳转
|
||||
const handleNavigate = (item) => {
|
||||
// const { latitude, longitude } = wgs84ToGcj02(item.latitude, item.longitude);
|
||||
console.log(window.SFUIP, "window.SFUIP");
|
||||
openLocation({
|
||||
wx.openLocation({
|
||||
latitude:Number(item.latitude),
|
||||
longitude:Number(item.longitude),
|
||||
name: item.name,
|
||||
@ -201,12 +200,8 @@ 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(vrUrl),
|
||||
url: "/pages/webview/web?url=" + encodeURIComponent("https://elitesys.kingkongcang.com/tour/index.html"),
|
||||
});
|
||||
}
|
||||
const goReserve= (e) => {
|
||||
|
||||
@ -179,15 +179,15 @@
|
||||
<view class="value font26 fontb">{{ currency }} {{ state.orderData.originalPrice }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" v-if="state.orderData.discountData?.[0]?.unitPrice">
|
||||
<view class="item">
|
||||
<view class="label font26 fontb textGary">租金月费: </view>
|
||||
<view class="value font26 fontb">{{ currency }} {{
|
||||
state.orderData.discountData?.[0]?.unitPrice
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" v-if="state.orderData.discountData?.[0]?.month">
|
||||
<view class="label font26 fontb textGary" >租期优惠: </view>
|
||||
<view class="item">
|
||||
<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({
|
||||
mask: true,
|
||||
mark: true,
|
||||
})
|
||||
getApi.OrderCountdownTime({ orderId: state.value.selectItem.orderId }).then(res => {
|
||||
uni.hideLoading()
|
||||
@ -1310,7 +1310,6 @@ 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
|
||||
}
|
||||
})
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="page-container">
|
||||
<!-- <navBar class="navBar"></navBar> -->
|
||||
<view class="webview-container">
|
||||
<web-view :src="url"></web-view>
|
||||
</view>
|
||||
@ -27,8 +28,8 @@ onLoad((options) => {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
/* .navBar {
|
||||
z-index: 10;
|
||||
.navBar {
|
||||
z-index: 10; /* 确保 navBar 在 WebView 之上 */
|
||||
}
|
||||
|
||||
.webview-container {
|
||||
@ -37,5 +38,5 @@ onLoad((options) => {
|
||||
}
|
||||
uni-web-view.uni-webview--fullscreen{
|
||||
pointer-events: none;
|
||||
} */
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -281,7 +281,7 @@ const getVerifyInfo = async () => {
|
||||
uni.showLoading();
|
||||
getAuthApi.GetCertificationInfo().then(res => {
|
||||
uni.hideLoading({
|
||||
mask: true,
|
||||
mark: true,
|
||||
});
|
||||
let { code, data } = res;
|
||||
if (code == 200 && data && data.length) {
|
||||
|
||||
@ -327,28 +327,4 @@ 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¶ms=${encodeURIComponent(JSON.stringify(params))}`
|
||||
|
||||
console.log(url)
|
||||
console.log(params)
|
||||
|
||||
SFUIP.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user