Compare commits

...

2 Commits

Author SHA1 Message Date
884fdb411b 增加新手指引 2026-04-14 17:05:57 +08:00
aeba6816c8 修改关闭按钮样式 2026-04-14 13:34:55 +08:00
9 changed files with 216 additions and 23 deletions

View File

@ -28,6 +28,7 @@ export function useLocation() {
// 3⃣ 没有定位才请求 // 3⃣ 没有定位才请求
SFUIP.getLocation().then(res => { SFUIP.getLocation().then(res => {
console.log(res,"SFUIP.getLocation");
if (!res.success) { if (!res.success) {
resolve(false); resolve(false);
return; return;

View File

@ -13,8 +13,9 @@
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" /> --> <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" /> -->
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
<script src="./config.js"></script> <script src="./config.js"></script>
<script src="https://ucmp-static.sf-express.com/assets/sdks/microservice-1.0.4.min.js"></script> <script src="https://ucmp-static.sf-express.com/assets/sdks/microservice-1.1.9.min.js"></script>
<script> <script>
console.log(SFUIP,"SFUIP")
const sf = new SFUIP.SfMicroservice(window?.config?.ENV??'sit') const sf = new SFUIP.SfMicroservice(window?.config?.ENV??'sit')
window.sf = sf window.sf = sf
// function loadScript(url, retry = 3) { // function loadScript(url, retry = 3) {

View File

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

View File

@ -75,7 +75,7 @@
"vueVersion" : "3", "vueVersion" : "3",
"h5" : { "h5" : {
"router" : { "router" : {
"base" : "./" "base" : "/client/"
}, },
"devServer" : { "devServer" : {
"port" : 8999, "port" : 8999,
@ -100,7 +100,7 @@
} }
}, },
"uniStatistics" : { "uniStatistics" : {
"enable" : true "enable" : false
} }
}, },
"locale" : "zh-Hans", "locale" : "zh-Hans",

10
package-lock.json generated
View File

@ -1,16 +1,17 @@
{ {
"name": "elitesysclient", "name": "城市迷你仓",
"version": "1.0.0", "version": "1.0.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "金刚迷你仓", "name": "城市迷你仓",
"version": "1.0.0", "version": "1.0.0",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"dayjs": "^1.11.11", "dayjs": "^1.11.11",
"driver.js": "^1.4.0",
"vconsole": "^3.15.1", "vconsole": "^3.15.1",
"vue3-google-map": "^0.20.0" "vue3-google-map": "^0.20.0"
}, },
@ -648,6 +649,11 @@
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.11.tgz", "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.11.tgz",
"integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==" "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg=="
}, },
"node_modules/driver.js": {
"version": "1.4.0",
"resolved": "https://registry.npmmirror.com/driver.js/-/driver.js-1.4.0.tgz",
"integrity": "sha512-Gm64jm6PmcU+si21sQhBrTAM1JvUrR0QhNmjkprNLxohOBzul9+pNHXgQaT9lW84gwg9GMLB3NZGuGolsz5uew=="
},
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.4.819", "version": "1.4.819",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.819.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.819.tgz",

View File

@ -12,6 +12,7 @@
"dependencies": { "dependencies": {
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"dayjs": "^1.11.11", "dayjs": "^1.11.11",
"driver.js": "^1.4.0",
"vconsole": "^3.15.1", "vconsole": "^3.15.1",
"vue3-google-map": "^0.20.0" "vue3-google-map": "^0.20.0"
}, },

View File

@ -87,7 +87,7 @@
<image src="/static/home/jiantou.svg" style="width: 24rpx;height: 24rpx;" class="icon"></image> <image src="/static/home/jiantou.svg" style="width: 24rpx;height: 24rpx;" class="icon"></image>
</view> </view>
</li> </li>
<li @click="showMonthPopup"> <li @click="showMonthPopup" class="zuqi">
<view class="left"><text class="font32 fontb">租期</text></view> <view class="left"><text class="font32 fontb">租期</text></view>
<view class="right font26 fontb" :class="{textGary:!state.month}"><text>{{ state.month }}个月</text> <view class="right font26 fontb" :class="{textGary:!state.month}"><text>{{ state.month }}个月</text>
<image src="/static/home/jiantou.svg" style="width: 24rpx;height: 24rpx;" class="icon"></image> <image src="/static/home/jiantou.svg" style="width: 24rpx;height: 24rpx;" class="icon"></image>
@ -116,7 +116,7 @@
</li> </li>
</ul> </ul>
</view> </view>
<view class="font28 fontb" style="padding: 20rpx 0;color: #A8AAAC;"> <view class="kefu font28 fontb" style="padding: 20rpx 0;color: #A8AAAC;">
租赁相关问题可联系客服咨询(电话:<text @click="openPopup" style="color: #2E5DB5;">4008181813</text>) 租赁相关问题可联系客服咨询(电话:<text @click="openPopup" style="color: #2E5DB5;">4008181813</text>)
</view> </view>
<view class="toOrderBox"> <view class="toOrderBox">
@ -469,6 +469,8 @@ import { useLockApi } from '@/Apis/lock.js';
import { useOrderApi } from "@/Apis/order.js"; import { useOrderApi } from "@/Apis/order.js";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { driver } from "driver.js";
import "driver.js/dist/driver.css";
const getOrderApi = useOrderApi(); const getOrderApi = useOrderApi();
const getAuthApi = authInfoApi(); const getAuthApi = authInfoApi();
const getCouponApi = couponApi(); const getCouponApi = couponApi();
@ -487,6 +489,9 @@ const unitPopupRef = ref(null);
const monthPopupRef = ref(null); const monthPopupRef = ref(null);
const payPopupRef = ref(null); const payPopupRef = ref(null);
const calendars = ref(null); const calendars = ref(null);
// //
const navHeight = ref(0); const navHeight = ref(0);
const language = ref(""); const language = ref("");
@ -502,7 +507,7 @@ const state = ref({
active: 0, active: 0,
id: "", id: "",
radiovalue: 0, radiovalue: 0,
radioMonthvalue: 24, radioMonthvalue: -1,
checkAgreementUrlTime: 0, checkAgreementUrlTime: 0,
agreementContent: "无", agreementContent: "无",
enAgreementContent: "无", enAgreementContent: "无",
@ -514,7 +519,7 @@ const state = ref({
unitTypeId: "", unitTypeId: "",
lockerId: "", lockerId: "",
selectUnitRow: {}, selectUnitRow: {},
month:1, month: 1,
selfMonth: 1, selfMonth: 1,
lockData: { lockData: {
discountList: [] discountList: []
@ -530,7 +535,110 @@ const state = ref({
tagStyle: { tagStyle: {
p: 'margin: 0.8rem 0;', p: 'margin: 0.8rem 0;',
}, },
startDriverTime: 0,
}); });
const driverObj = driver({
showProgress: true,
doneBtnText: "完成",
closeBtnText: "跳过",
nextBtnText: "下一步",
prevBtnText: "上一步",
popoverClass: 'driverjs-theme',
//
overlayClickBehavior: 'none',
//
onDestroyStarted: () => {
window.scrollTo({
top: 0,
behavior: "smooth"
})
driverObj.destroy();
},
steps: [
{
element: '.selectSite',
popover: {
// title: '',
description: '可根据不同地区,切换对应门店'
},
onHighlighted: (el) => scrollToElement(el)
},
{
element: '.unitType',
popover: {
// title: '',
description: '选择不同仓型,体积不同。'
},
onHighlighted: (el) => scrollToElement(el)
},
{
element: '.swiper .left',
popover: {
// title: '',
description: '向左滑动。'
},
onHighlighted: (el) => scrollToElement(el)
},
{
element: '.swiper .right',
popover: {
// title: '',
description: '向右滑动。'
},
onHighlighted: (el) => scrollToElement(el)
},
{
element: '.orderInfo',
popover: {
// title: '',
description: '选择仓型后,根据需求选择体积,租期。'
},
onHighlighted: (el) => scrollToElement(el)
},
{
element: '.zuqi',
popover: {
// title: '',
description: '租期越长,优惠越多。'
},
onHighlighted: (el) => scrollToElement(el)
},
{
element: '.kefu',
popover: {
// title: '',
description: '如有疑问,欢迎致电客服。'
},
onHighlighted: (el) => scrollToElement(el)
}
]
});
//
function scrollToElement(element) {
if (!element) return
const top =
element.getBoundingClientRect().top +
window.pageYOffset -
120; //
window.scrollTo({
top,
behavior: "smooth"
});
}
const startDriver = () => {
state.startDriverTime++;
if (state.startDriverTime > 1) {
return;
}
driverObj.drive();
}
const showCalendar = () => { const showCalendar = () => {
calendars.value.open(); calendars.value.open();
}; };
@ -571,6 +679,8 @@ const callPhone = ()=>{
const goOrder = async () => { const goOrder = async () => {
if (!state.value.lockerId) { if (!state.value.lockerId) {
return uni.showToast({ return uni.showToast({
@ -988,8 +1098,6 @@ onLoad(async (params) => {
} }
uni.$on('homeSiteId', (data) => { uni.$on('homeSiteId', (data) => {
if (data.id) { if (data.id) {
state.value.siteId = data.id state.value.siteId = data.id
@ -1008,6 +1116,9 @@ onLoad(async (params) => {
}); });
onUnload(() => { onUnload(() => {
uni.$off('homeSiteId'); uni.$off('homeSiteId');
if(driverObj){
driverObj.destroy();
}
}) })
onShow(() => { onShow(() => {
@ -1155,6 +1266,7 @@ const getUnitTypeBySiteId = () => {
// state.value.latitude = res.data[0]?.latitude; // state.value.latitude = res.data[0]?.latitude;
// state.value.longitude = res.data[0]?.longitude; // state.value.longitude = res.data[0]?.longitude;
// state.value.tags = res.data[0]?.tags ?? []; // state.value.tags = res.data[0]?.tags ?? [];
startDriver();
} }
}).finally(() => { }).finally(() => {
uni.hideLoading(); uni.hideLoading();
@ -1184,9 +1296,76 @@ function changeMove(event) {
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import "@/static/style/theme.scss"; @import "@/static/style/theme.scss";
:deep(.driverjs-theme) {
&.driver-popover {
border-radius: 8px;
padding: 16px;
min-width: 240px;
background: #ffffff;
border: 1px solid #eee;
box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.driver-popover-title {
font-size: 16px;
font-weight: 600;
color: #333;
margin-bottom: 8px;
}
.driver-popover-description {
font-size: 16px;
font-weight: 600;
color: #000;
line-height: 1.5;
}
.driver-popover-footer {
margin-top: 12px;
button {
height: 32px;
font-size: 14px;
padding: 0 14px;
border-radius: 4px;
}
}
.driver-popover-next-btn {
background: #E60012;
color: #fff;
border: none;
}
.driver-popover-prev-btn {
background: #fff;
color: #E60012;
border: 1px solid #E60012;
}
.driver-popover-done-btn {
background: #E60012;
color: #fff;
}
.driver-popover-close-btn {
color: #999;
}
.driver-popover-arrow {
&.driver-popover-arrow-side-top {
border-top-color: #fff;
}
&.driver-popover-arrow-side-bottom {
border-bottom-color: #fff;
}
}
}
.toOrderBox{ .toOrderBox{
width: 100%; width: 100%;
background-color: #FFFFFF; background-color: #FFFFFF;

View File

@ -62,6 +62,7 @@ import { useSiteApi } from "@/Apis/site.js";
import { useLoginApi } from "@/Apis/login.js"; import { useLoginApi } from "@/Apis/login.js";
import { ClientSite } from "@/Apis/book.js"; import { ClientSite } from "@/Apis/book.js";
import uvPickerSlef from "@/components/uv-pickerself/components/uv-picker/uv-picker.vue"; import uvPickerSlef from "@/components/uv-pickerself/components/uv-picker/uv-picker.vue";
import { wgs84ToGcj02 } from '@/utils/map.js'
// //
import { useMainStore } from "@/store/index.js"; import { useMainStore } from "@/store/index.js";
// //
@ -87,13 +88,16 @@ let siteData = reactive({
}); });
// 线 // 线
const handleNavigate = (item) => { const handleNavigate = async (item) => {
SFUIP.openLocation({ const { latitude, longitude } = wgs84ToGcj02(item.latitude, item.longitude);
latitude: Number(item.latitude), const { success, errorMessage } = await SFUIP.openLocation({
longitude: Number(item.longitude), latitude:"113.330713",
name: item.name, longitude:"23.113539",
address: item.address, name: "广州",
}); address: "广州天河",
})
console.log((window || global).UIP_WX);
console.log(success,errorMessage, "openLocationerr");
}; };
const toHome = (item) => { const toHome = (item) => {

View File

@ -43,12 +43,13 @@
hover-class="uv-popup__content__close--hover" hover-class="uv-popup__content__close--hover"
hover-stay-time="150" hover-stay-time="150"
> >
<uv-icon <!-- <uv-icon
name="close" name="close"
color="#000000" color="#000000"
size="32rpx" size="32rpx"
bold bold
></uv-icon> ></uv-icon> -->
<image class="close-icon" style="width: 30rpx;height: 30rpx;" src="/static/home/close2.svg"></image>
</view> </view>
</view> </view>
</uv-transition> </uv-transition>