Compare commits

..

3 Commits

Author SHA1 Message Date
b622168139 分享未完成 2026-04-30 16:37:19 +08:00
884fdb411b 增加新手指引 2026-04-14 17:05:57 +08:00
aeba6816c8 修改关闭按钮样式 2026-04-14 13:34:55 +08:00
19 changed files with 1218 additions and 432 deletions

View File

@ -69,8 +69,8 @@ export default {
} }
} }
}); });
uni.removeStorageSync('getCouponCodeTime'); //
// // //
listenNetworkChange(); listenNetworkChange();
uni.hideTabBar() uni.hideTabBar()
const { setTheme, getUserInfo, storeState,logOut } = useMainStore(); const { setTheme, getUserInfo, storeState,logOut } = useMainStore();
@ -180,6 +180,9 @@ page {
:deep(.uv-radio__icon-wrap){ :deep(.uv-radio__icon-wrap){
border-width: 5rpx!important; border-width: 5rpx!important;
} }
:deep(.uv-checkbox__icon-wrap){
border-width: 5rpx!important;
}
.uni-tabbar{ .uni-tabbar{
display: none; display: none;

View File

@ -1,9 +1,9 @@
<template> <template>
<view class="coupon" :class="[`${themeInfo.theme}-theme`, `${themeInfo.language}`]"> <view class="coupon" :class="[`${themeInfo.theme}-theme`, `${themeInfo.language}`]">
<myPopup v-model="modelValue" mode='bottom' bgColor='none' customStyle='height:70vh;border-radius: 18px 18px 0 0;' :closeOnClickOverlay='true'> <myPopup v-model="modelValue" mode='bottom' bgColor='none' zIndex="999" closeable customStyle='height:70vh;border-radius: 24px 24px 0 0;' :closeOnClickOverlay='true'>
<view class="couponContent"> <view class="couponContent">
<view class="header"> <view class="header">
<view class="line"></view> <!-- <view class="line"></view> -->
<view class="title"> <view class="title">
{{ $t('coupon.coupon') }} {{dataList.length + unusableDataList.length}} {{ $t('coupon.coupon') }} {{dataList.length + unusableDataList.length}}
</view> </view>
@ -66,26 +66,32 @@
</view> </view>
</view> </view>
<view class="right"> <view class="right">
<view class="desc"> <!-- <view class="desc">
{{ $t('coupon.storewide') }} {{ $t('coupon.storewide') }}
</view> </view>
<view class="desc"> <view class="desc">
{{ $t('coupon.limitedtimeoffer') }} {{ $t('coupon.limitedtimeoffer') }}
</view> </view> -->
<view> <view>
<button class="btn" @click="getCouponCode"> <uv-button :customStyle="{
color: '#fff',
}" :textStyle="{
fontSize: '32rpx',
fontWeight: 'bold',
}" shape="circle" color="#FB322E" class="btn" @click="getCouponCode">
{{ $t("coupon.redeemNow") }} {{ $t("coupon.redeemNow") }}
</button> </uv-button>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="couponUl couponUl2"> <view class="couponUl couponUl2">
<uv-checkbox-group style="width: 100%;" v-model="state.checkboxCouponValue" @change="couponChange"> <uv-checkbox-group style="width: 100%;" v-model="state.checkboxCouponValue" shape="circle" activeColor="#fb322e" size="40rpx" iconSize="24rpx" inactiveColor="#D8D8D8" @change="couponChange">
<view class="couponLi" v-for="(item,index) in dataList" :key="index" @click="chooseCoupon(item)" :style="{opacity:disabledFunc(item)?0.5:1}"> <view class="couponLi" v-for="(item,index) in dataList" :key="index" @click="chooseCoupon(item)" :style="{opacity:disabledFunc(item)?0.5:1}">
<view class="left"> <view class="left">
<view class="name"> <view class="name">
{{ item.couponCode }} {{ couponTitle(item) }} <!-- {{ item.couponCode }} -->
{{ couponTitle(item) }}
<!-- <text style="letter-spacing: 0;">{{ item.discountLimit }}</text> --> <!-- <text style="letter-spacing: 0;">{{ item.discountLimit }}</text> -->
</view> </view>
<view class="desc"> <view class="desc">
@ -96,12 +102,12 @@
</view> </view>
</view> </view>
<view class="right"> <view class="right">
<view class="desc"> <!-- <view class="desc">
{{ item.siteName.length ?`${item.siteName.length>1?$t('coupon.multiStoreUse'):item.siteName[0]}`: $t('coupon.storewide') }} {{ item.siteName.length ?`${item.siteName.length>1?$t('coupon.multiStoreUse'):item.siteName[0]}`: $t('coupon.storewide') }}
</view> </view>
<view class="desc"> <view class="desc">
{{ $t('coupon.limitedtimeoffer') }} {{ $t('coupon.limitedtimeoffer') }}
</view> </view> -->
<view style="display: flex;justify-content: center;margin-top: 4px;"> <view style="display: flex;justify-content: center;margin-top: 4px;">
<uv-checkbox <uv-checkbox
v-if="props.siteData?.lockerId" v-if="props.siteData?.lockerId"
@ -125,7 +131,8 @@
<view v-show="state.showUnusableCoupons" class="couponLi" v-for="(item,index) in unusableDataList" :key="index"> <view v-show="state.showUnusableCoupons" class="couponLi" v-for="(item,index) in unusableDataList" :key="index">
<view class="left"> <view class="left">
<view class="name"> <view class="name">
{{ item.couponCode }} {{ couponTitle(item) }} <!-- {{ item.couponCode }} -->
{{ couponTitle(item) }}
<!-- <text style="letter-spacing: 0;">{{ item.discountLimit }}</text> --> <!-- <text style="letter-spacing: 0;">{{ item.discountLimit }}</text> -->
</view> </view>
<view class="desc"> <view class="desc">
@ -153,9 +160,15 @@
</view> </view>
<view class="confirm" v-if="props.siteData?.lockerId"> <view class="confirm" v-if="props.siteData?.lockerId">
<!-- @click="submit" --> <!-- @click="submit" -->
<button class="next-btn" @click="confirm"> <uv-button class="next-btn" :customStyle="{
height: '86rpx',
color: '#fff',
}" :textStyle="{
fontSize: '32rpx',
fontWeight: 'bold',
}" shape="circle" color="#FB322E" @click="confirm">
{{ $t("common.confirm") }} {{ $t("common.confirm") }}
</button> </uv-button>
</view> </view>
</view> </view>
</myPopup> </myPopup>
@ -666,23 +679,17 @@ defineExpose({
.confirm{ .confirm{
height: 100rpx; height: 100rpx;
width: 100%; width: 100%;
background-color: #fff; background-color: #F1F2F7;
display: flex; display: flex;
justify-content: center; justify-content: center;
.next-btn{ .next-btn{
position: absolute; position: absolute;
bottom:30upx; bottom:30upx;
width: 90%; width: 90%;
padding: 4px 0;
font-size: 28rpx;
font-weight: bold;
color: var(--text-color);
background: var(--active-color);
border-radius: 16rpx;
} }
} }
height: 100%; height: 100%;
background-color: #fff; background-color: #F1F2F7;
border-radius: 18upx 18upx 0 0; border-radius: 18upx 18upx 0 0;
padding-bottom: 40upx; padding-bottom: 40upx;
display: flex; display: flex;
@ -704,6 +711,7 @@ defineExpose({
font-size: 36rpx; font-size: 36rpx;
align-self: self-start; align-self: self-start;
margin-left: 40rpx; margin-left: 40rpx;
font-weight: 600;
} }
} }
.content{ .content{
@ -719,24 +727,25 @@ defineExpose({
display: flex; display: flex;
padding: 40upx; padding: 40upx;
width: 100%; width: 100%;
margin: 20upx 0; margin-bottom: 20upx;
border-radius: 18upx; border-radius: 18upx;
color: #fff; color: #9D9FA2;
background: linear-gradient(90deg, var(--left-linear), var(--right-linear)); background-color: #FFFFFF;
// background: linear-gradient(90deg, var(--left-linear), var(--right-linear));
box-shadow: 0px -2px 5px 0px rgba(0, 0, 0, 0.13); box-shadow: 0px -2px 5px 0px rgba(0, 0, 0, 0.13);
font-size: 22upx; font-size: 22upx;
&::after{ // &::after{
content: ""; // content: "";
position: absolute; // position: absolute;
top: 2px; // top: 2px;
right: -7px; // right: -7px;
width: 14px; /* 调整宽度 */ // width: 14px; /* */
height: 100%; /* 调整高度以适应圆形的垂直排列 */ // height: 100%; /* */
background: radial-gradient(#ffffff 0px, #ffffff 5px, transparent 5px, transparent); // background: radial-gradient(#ffffff 0px, #ffffff 5px, transparent 5px, transparent);
background-size: 14px 14px; /* 保持圆形的大小 */ // background-size: 14px 14px; /* */
background-repeat: repeat-y; /* 垂直重复 */ // background-repeat: repeat-y; /* */
z-index: 9; // z-index: 9;
} // }
.left{ .left{
width: 68%; width: 68%;
display: flex; display: flex;
@ -746,16 +755,18 @@ defineExpose({
font-size: 36upx; font-size: 36upx;
letter-spacing: 4upx; letter-spacing: 4upx;
font-weight: bold; font-weight: bold;
color: #000;
} }
.desc{ .desc{
margin-top: 10upx; margin-top: 10upx;
} }
.input{ .input{
background-color: var(--bg-popup); background-color: #FFFFFF;
border: 1px solid #E5E5E5;
color: #000;
text-align: center; text-align: center;
width: 220upx; width: 220upx;
border-radius: 12upx; border-radius: 12upx;
color: var(--text-color);
margin-top: 20upx; margin-top: 20upx;
} }
&::before{ &::before{
@ -764,7 +775,7 @@ defineExpose({
height: 32upx; height: 32upx;
width: 32upx; width: 32upx;
border-radius: 99rpx; border-radius: 99rpx;
background-color: #fff; background-color: #F1F2F7;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
top: -56upx; top: -56upx;
@ -776,12 +787,12 @@ defineExpose({
height: 32upx; height: 32upx;
width: 32upx; width: 32upx;
border-radius: 99rpx; border-radius: 99rpx;
background-color: #fff; background-color: #F1F2F7;
position: absolute; position: absolute;
bottom: -56upx; bottom: -56upx;
right: -18upx; right: -18upx;
} }
border-right: 1px solid #fff; // border-right: 1px solid #fff;
} }
.right{ .right{
width: 32%; width: 32%;
@ -808,7 +819,14 @@ defineExpose({
letter-spacing: 4upx; letter-spacing: 4upx;
} }
&::before{
content: ' ';
display: block;
height: calc(100% + 20rpx);
border: 1px dashed #F1F2F7;
position: absolute;
left: 0;
}
} }
} }
} }

View File

@ -9,6 +9,7 @@
:closeable="props.closeable" :closeable="props.closeable"
@change="handleChange" @change="handleChange"
:safeAreaInsetBottom="false" :safeAreaInsetBottom="false"
zIndex="999"
> >
<slot></slot> <slot></slot>
</uv-popup> </uv-popup>
@ -48,8 +49,10 @@
emit('update:modelValue', e.show); emit('update:modelValue', e.show);
} }
const maskClick = () => { const maskClick = () => {
if (props.closeOnClickOverlay) {
modelValue.value = false; modelValue.value = false;
} }
}
const emit = defineEmits(['close', 'confirm', 'update:modelValue']); const emit = defineEmits(['close', 'confirm', 'update:modelValue']);
const modelValue = computed({ const modelValue = computed({
get() { get() {

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

@ -44,7 +44,10 @@
"path": "videoTutorial/index" "path": "videoTutorial/index"
}, },
{ {
"path": "reserve/index" "path": "reserve/index",
"style": {
"navigationBarTitleText": "城市迷你仓"
}
}, },
{ {
"path": "validationInfo/index", "path": "validationInfo/index",

View File

@ -1,6 +1,5 @@
<template> <template>
<view class="container" :class="[`${themeInfo.theme}-theme`, `${themeInfo.language}`]"> <view class="container" :class="[`${themeInfo.theme}-theme`, `${themeInfo.language}`]">
<view class="selectSite card" @click="goSite"> <view class="selectSite card" @click="goSite">
<view class="left"> <view class="left">
<image src="/static/home/address.svg" mode="heightFix" class="icon"></image> <image src="/static/home/address.svg" mode="heightFix" class="icon"></image>
@ -21,12 +20,12 @@
<!-- <view class="tag font16 fontb">距离最近</view> --> <!-- <view class="tag font16 fontb">距离最近</view> -->
</view> </view>
</view> </view>
<view class="right" v-if="siteDistance"> <view class="right" v-if="siteDistance" @click="handleNavigate">
<text class="distance font28 fontb">{{ siteDistance }}KM</text> <text class="distance font28 fontb">{{ siteDistance }}KM</text>
</view> </view>
</view> </view>
<!-- 底部地址 --> <!-- 底部地址 -->
<view class="bottom"> <view class="bottom" @click="handleNavigate">
<image src="/static/home/siteicon2.svg" class="icon"></image> <image src="/static/home/siteicon2.svg" class="icon"></image>
<text class="address font26 fontb textGary">{{ unitTypeData[0]?.sitdAddress }}</text> <text class="address font26 fontb textGary">{{ unitTypeData[0]?.sitdAddress }}</text>
</view> </view>
@ -71,10 +70,20 @@
<view class="font26 fontb textGary">({{ unitTypeData[state.active].description }})</view> <view class="font26 fontb textGary">({{ unitTypeData[state.active].description }})</view>
</view> </view>
</view> </view>
<view class="full-wrap card" v-if="!unitTypeData[state.active]?.hasAvailableLocker">
{{ $t("site.full") }}
<uv-button :plain="!isApply" @click="postWaitingAppointment" color="#FB322E" >
{{
isApply === false
? "加入候补"
: "已候补"
}}
</uv-button>
</view>
<view class="empt font32 fontb" v-if="unitTypeData.length === 0" style="text-align: center;margin-top: 20rpx;"> <view class="empt font32 fontb" v-if="unitTypeData.length === 0" style="text-align: center;margin-top: 20rpx;">
暂无可用仓型请选择其他门店 暂无可用仓型请选择其他门店
</view> </view>
<view class="orderInfo sflist card" v-if="unitTypeData.length"> <view class="orderInfo sflist card" v-if="unitTypeData.length && unitTypeData[state.active]?.hasAvailableLocker">
<ul> <ul>
<li @click="showUnitPopup"> <li @click="showUnitPopup">
<view class="left"><text class="font32 fontb">体积</text> <view class="left"><text class="font32 fontb">体积</text>
@ -87,12 +96,22 @@
<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>
</view> </view>
</li> </li>
<li @click="openCoupon">
<view class="left"><text class="font32 fontb">优惠劵</text></view>
<view class="right font26 fontb">
<text v-for="(item, index) in state.couponItem" :key="index">{{ couponDesc(item) }}</text>
<text class="textGary" v-if="!state.couponItem.length &&!state.couponOtherItem.length">{{
$t("detail.noselect")
}}</text>
<image src="/static/home/jiantou.svg" style="width: 24rpx;height: 24rpx;" class="icon"></image>
</view>
</li>
<li> <li>
<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.priceData?.price}"><text>{{ state.priceData?.price ? `${state.priceData?.price}` : <view class="right font26 fontb" :class="{textGary:!state.priceData?.price}"><text>{{ state.priceData?.price ? `${state.priceData?.price}` :
@ -116,7 +135,13 @@
</li> </li>
</ul> </ul>
</view> </view>
<view class="font28 fontb" style="padding: 20rpx 0;color: #A8AAAC;"> <view class="goReserve font28 fontb" @click="goReserve">
<view class="left"><text>预约</text><text>咨询</text> </view>
<view class="right">
填写预约专员为您估价与讲解<image src="/static/home/jiantou.svg" style="width: 24rpx;height: 24rpx;" class="icon"></image>
</view>
</view>
<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">
@ -132,22 +157,29 @@
</view> </view>
<!-- <view class="agreed agreed2"><text class="stress">租赁相关问题可联系客服咨询(电话:4008181813)</text></view> --> <!-- <view class="agreed agreed2"><text class="stress">租赁相关问题可联系客服咨询(电话:4008181813)</text></view> -->
<view class="toOrder card font28" v-if="unitTypeData.length"> <view class="toOrder card font28" v-if="unitTypeData.length">
<view class="left " > <view class="left font28">
<text class="price fontb" :class="{ overMaxFont: String(state.priceData?.discountExpense).length>6 }"><text v-if="state.priceData.expense" style="font-size: 30rpx;">租金</text>{{ state.priceData.discountExpense ? `${state.priceData.discountExpense}` : '--'
}}</text>
<view class="detail" v-if="state.priceData.expense" @click="showPayPopup"><text class="detail1" :class="{ overMaxFont:String(state.priceData?.lockerExpense).length>6 }" v-if="state.priceData?.expense">{{ state.priceData.lockerExpense }}</text>
<!-- <text class="detail2">明细</text> -->
<!-- <image src="/static/home/jiantouup.svg" style="height: 10rpx;margin-left: 10rpx;" mode="heightFix" class="icon"></image> -->
</view>
</view>
<!-- <view class="left" >
<text class="price fontb" :class="{ overMaxFont: String(state.priceData?.expense).length>6 }"> {{ state.priceData.expense ? `${state.priceData.expense}` : '¥--' <text class="price fontb" :class="{ overMaxFont: String(state.priceData?.expense).length>6 }"> {{ state.priceData.expense ? `${state.priceData.expense}` : '¥--'
}}</text> }}</text>
<view class="detail" v-if="state.priceData.expense" @click="showPayPopup"><text class="detail1" :class="{ overMaxFont:String(state.priceData?.expense).length>6 }" v-if="state.priceData?.expense">¥{{ state.priceData.leaseOriginalPrice }}</text><text class="detail2">明细</text> <view class="detail" v-if="state.priceData.expense" @click="showPayPopup"><text class="detail1" :class="{ overMaxFont:String(state.priceData?.expense).length>6 }" v-if="state.priceData?.expense">¥{{ state.priceData.leaseOriginalPrice }}</text><text class="detail2">明细</text>
<image src="/static/home/jiantouup.svg" style="height: 10rpx;margin-left: 10rpx;" mode="heightFix" class="icon"></image> <image src="/static/home/jiantouup.svg" style="height: 10rpx;margin-left: 10rpx;" mode="heightFix" class="icon"></image>
</view> </view>
</view> </view> -->
<view class="right"> <view class="right">
<uv-button :customStyle="{ <uv-button :customStyle="{
height: '86rpx', height: '86rpx',
color: '#fff', color: '#fff',
}" :textStyle="{ }" :textStyle="{
fontSize: '32rpx', fontSize: '32rpx',
fontWeight: 'bold', fontWeight: 'bold',
}" shape="circle" color="#FB322E" :disabled="!state.lockerId || !state.month" @click="goOrder" }" shape="circle" @click="showPayPopup" color="#FB322E" :disabled="!state.lockerId || !state.month"
class="goOrder">下单</uv-button> class="goOrder">下单</uv-button>
</view> </view>
</view> </view>
@ -336,6 +368,11 @@
<view class="title2 font32 fontb"> <view class="title2 font32 fontb">
<text>优惠信息</text> <text style="color: #FB322E;">- {{ state.priceData.favorable }}</text> <text>优惠信息</text> <text style="color: #FB322E;">- {{ state.priceData.favorable }}</text>
</view> </view>
<view class="title2 textGary2 fontb font28">
<text>优惠劵优惠</text><text style="color: #FB322E;">- {{
state.priceData.codeFavorable
}}</text>
</view>
<view class="title2 textGary2 fontb font28"> <view class="title2 textGary2 fontb font28">
<text>租期优惠{{state.month}}个月长租</text><text style="color: #FB322E;">- {{ state.priceData.leaseDiscount }}</text> <text>租期优惠{{state.month}}个月长租</text><text style="color: #FB322E;">- {{ state.priceData.leaseDiscount }}</text>
</view> </view>
@ -365,7 +402,7 @@
}" :textStyle="{ }" :textStyle="{
fontSize: '32rpx', fontSize: '32rpx',
fontWeight: 'bold', fontWeight: 'bold',
}" color="#FB322E" :disabled="!state.lockerId && !state.month" @click="goOrder" shape="circle" }" color="#FB322E" :disabled="!state.lockerId || !state.month" @click="goOrder" shape="circle"
class="goOrder">下单</uv-button> class="goOrder">下单</uv-button>
</view> </view>
</view> </view>
@ -442,6 +479,43 @@
color="#FB322E" color="#FB322E"
/> />
</view> </view>
<!-- 优惠卷 -->
<coupon
ref="couponRef"
:siteData="state.lockData"
:couponOtherItem="state.couponOtherItem"
:couponItem="state.couponItem"
:priceData="state.priceData"
:month="state.month"
v-model="state.couponShow"
@chooseCoupon="chooseCoupon"
@chooseOtherCoupon = "chooseOtherCoupon"
@confirm="confirmCoupon"
:disabledFunc="disabledFunc"
></coupon>
<myPopup v-model="state.showCoupon" customStyle="background-color: transparent;width: 90%; height: auto;" :closeOnClickOverlay="false" >
<view>
<button v-if="state.copuonList.length" class="noCssBtn" style="height: 100%; width: 100%"
@click="getCouponByCode">
<uv-image @click="getCouponByCode" width="100%" mode="widthFix"
:src="baseImageUrl + state.copuonList[0].coverSheet">
</uv-image>
</button>
</view>
<view style="
width: 100%;
display: flex;
justify-content: center;
margin-top: 10px;
">
<uv-icon @click="deletCouponList" size="32" color="#FFFFFF" name="close-circle"></uv-icon>
</view>
</myPopup>
<myModal
v-model="state.showCancelModal"
:content="$t('site.cancelAppointment')"
@confirm="cancelAppointment"
></myModal>
</template> </template>
<script setup> <script setup>
@ -458,6 +532,7 @@ import { navigateTo } from '@/utils/navigateTo';
// //
import { useMainStore } from "@/store/index.js"; import { useMainStore } from "@/store/index.js";
import { navbarHeightAndStatusBarHeight, shareParam } from "@/utils/common.js"; import { navbarHeightAndStatusBarHeight, shareParam } from "@/utils/common.js";
import coupon from "@/components/coupon.vue";
import myModal from "@/components/myModal.vue"; import myModal from "@/components/myModal.vue";
import { couponApi } from "@/Apis/coupon.js"; import { couponApi } from "@/Apis/coupon.js";
import { useLocation } from "@/hooks/useLocation"; import { useLocation } from "@/hooks/useLocation";
@ -469,6 +544,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 +564,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 couponRef = ref();
// //
const navHeight = ref(0); const navHeight = ref(0);
const language = ref(""); const language = ref("");
@ -502,7 +582,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 +594,7 @@ const state = ref({
unitTypeId: "", unitTypeId: "",
lockerId: "", lockerId: "",
selectUnitRow: {}, selectUnitRow: {},
month:1, month: 1,
selfMonth: 1, selfMonth: 1,
lockData: { lockData: {
discountList: [] discountList: []
@ -530,7 +610,362 @@ const state = ref({
tagStyle: { tagStyle: {
p: 'margin: 0.8rem 0;', p: 'margin: 0.8rem 0;',
}, },
startDriverTime: 0,
couponItem: [], //
couponOtherItem:[],
couponShow: false,
showCoupon: false, //
copuonList: [], //
loading: false,
showCancelModal: false,
}); });
const deletCouponList = () => {
state.value.copuonList.shift();
state.value.showCoupon = false;
//
setTimeout(() => {
if (state.value.copuonList.length) {
state.value.showCoupon = true;
} else {
const token = uni.getStorageSync("token");
if (token) {
const date = new Date();
uni.setStorageSync("getCouponCodeTime", date.getTime());
}
}
}, 600);
};
//
const GetNewUserCouponCode = async () => {
// state.value.showCoupon = false;
getCouponApi.GetNewUserCouponCode().then((res) => {
if (res.code === 200) {
state.value.copuonList = res.data
if (state.value.copuonList.length) {
nextTick(() => {
setTimeout(() => {
state.value.showCoupon = true;
}, 500);
});
}
}
});
};
const showNewUserCouponCode = () => {
if(!state.value.startDriverTime) return
const getCouponCodeTime = uni.getStorageSync("getCouponCodeTime") || 0;
const now = Date.now(); //
const diff = now - getCouponCodeTime; // ()
const eightMinutes = 6 * 60 * 1000; // 8
if (diff > eightMinutes) {
// 8
GetNewUserCouponCode();
}
};
//
const getCouponByCode = (item) => {
const { couponCode } = state.value.copuonList[0];
uni.showLoading();
getCouponApi
.DrawDownCoupon({ couponCode: couponCode })
.then((res) => {
if (res.code == 200) {
uni.showToast({
title: t("coupon.redemptionuccessful"),
icon: "none",
});
deletCouponList();
} else {
uni.showToast({
title: res.msg,
icon: "none",
});
}
})
.finally(() => {
uni.hideLoading();
});
};
const openCoupon = () => {
if(!state.value.lockData?.siteId){
return uni.showToast({
title: '请选择体积',
icon: 'none',
duration: 3000
})
}
couponRef.value.open();
};
const disabledFunc = (item) => {
if (!item) {
return true;
}
// item.siteIds
const isSite = item.siteIds.length
? item.siteIds.includes(state.value.lockData.siteId)
: true;
const isUnit = item.unitTypeIds.length
? item.unitTypeIds.includes(state.value.lockData.unitTypeId)
: true;
let isPrice = item.satisfyAmount
? state.value.priceData.expense >= item.satisfyAmount
: true;
if([3,4,5,6].includes(item.couponType)){
isPrice = state.value.month>=item.fullMonth
}
// Date
const start = new Date(item.startDate);
const end = new Date(item.endDate);
//
const now = new Date();
//
const isDate = now >= start && now <= end;
const canAdd = canAddValue(state.value.couponItem.map(x=>x.couponType),item.couponType)
return !(isSite && isUnit && isPrice && isDate&& canAdd);
};
const confirmCoupon = (data)=>{
const { couponItem, couponOtherItem } = data;
state.value.couponItem = couponItem;
state.value.couponOtherItem = couponOtherItem;
getLockerExpense();
couponRef.value.close();
}
//
const couponDesc = (item)=>{
let detail = ''
switch(item.couponType){
case 1:
detail = `${t('discountMomey',{discount:item.discountLimit})}`
break
case 2:
detail = `${t('couponDiscount',{percent: 100 - item.discountRange * 100,discount: (item.discountRange * 100) / 10,})}`
break
case 3:
detail = `${t('firstMonthRent',{discount:item.firstMonthAmount})}`
break
case 4:
detail = `${t('couponDiscount',{percent: 100 - item.monthDiscount * 100,discount: (item.monthDiscount * 100) / 10})}`
break
case 5:
detail = `${t('freeMonth',{discount:item.freeMonth})}`
break
case 6:
detail = `${t('BonusMonth',{discount:item.freeMonth})}`
break
default:
detail = `${t('discountMomey',{discount:item.discountLimit})}`
break
}
return `${detail}`
}
function canAddValue(arr, value) {
//
const allowedNumbers = new Set([1, 3, 4]);
//
if (arr.length === 0) {
return true;
}
// 134
const hasInvalidNumber = arr.some(num => !allowedNumbers.has(num));
if (hasInvalidNumber) {
return false; // 134
}
// 134
if (allowedNumbers.has(value) && !arr.includes(value)) {
return true;
}
//
return false;
}
const chooseCoupon = (item) => {
//
if(item.couponType == 5){
if(state.value.month<item.fullMonth){
uni.showToast({
title: `月数不足${item.fullMonth}个月,无法此优惠卷!`,
icon: "none",
duration: 2000,
});
return
}
}
if (item.isSuperposition) {
if (
state.value.couponItem.every(
(x) => item.couponDispositionId != x.couponDispositionId
)
) {
if(state.value.couponItem.every(x=>item.couponType != x.couponType)){
state.value.couponItem.push(item);
}else{
uni.showToast({
title: `相同优惠卷类型不能重复!`,
icon: "none",
duration: 2000,
})
}
}
} else {
state.value.couponItem = [item];
}
getLockerExpense();
};
const chooseOtherCoupon= (item) => {
const isE = state.value.couponOtherItem.find(x=>x.number == item.number);
if (!isE) {
state.value.couponOtherItem.push(item);
}
getLockerExpense();
}
const steps = [
{
element: '.selectSite',
popover: {
// title: '',
description: '可根据不同地区,切换对应门店'
},
onHighlighted: (el) => scrollToElement(el)
},
{
element: '.unitType',
popover: {
// title: '',
description: '左右滑动,选择不同仓型体积',
side: "bottom",
},
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',
side: "bottom",
popover: {
// title: '',
description: '选择仓型后,根据需求选择体积,租期。<br/> <span style="color: #FF8A00;">租期越长,优惠越多。</span>'
},
onHighlighted: (el) => scrollToElement(el)
},
// {
// element: '.zuqi',
// popover: {
// // title: '',
// description: ''
// },
// onHighlighted: (el) => scrollToElement(el)
// },
{
element: '.kefu',
popover: {
// title: '',
description: '如有疑问,欢迎致电客服。'
},
onHighlighted: (el) => scrollToElement(el)
}
]
const driverObj = driver({
showProgress: false,
doneBtnText: "完成",
closeBtnText: "跳过",
nextBtnText: "下一步",
prevBtnText: "上一步",
popoverClass: 'driverjs-theme',
//
overlayClickBehavior: 'none',
//
onDestroyStarted: () => {
// UI
window.scrollTo({
top: 0,
behavior: "smooth"
})
driverObj.destroy();
showNewUserCouponCode()
},
//
onNextClick: (element, step) => {
//
driverObj.moveNext();
const isLast = step.element === steps[steps.length - 1].element;
if (isLast) {
uni.setStorageSync('driver_finished', 1)
}
},
steps,
});
//
function scrollToElement(element) {
if (!element) return
const top =
element.getBoundingClientRect().top +
window.pageYOffset -
120; //
window.scrollTo({
top,
behavior: "smooth"
});
}
const startDriver = () => {
state.value.startDriverTime++;
if (state.value.startDriverTime > 1) {
return;
}
const driver_finished = uni.getStorageSync('driver_finished')
if(driver_finished){
if(state.value.startDriverTime == 1){
showNewUserCouponCode()
}
return
}
driverObj.drive();
}
// 线
const handleNavigate = (item) => {
// const { latitude, longitude } = wgs84ToGcj02(item.latitude, item.longitude);
wx.openLocation({
latitude:Number(unitTypeData.value[0]?.latitude),
longitude:Number(unitTypeData.value[0]?.longitude),
name: unitTypeData.value[0]?.sitdName,
address: unitTypeData.value[0]?.sitdAddress,
})
};
const showCalendar = () => { const showCalendar = () => {
calendars.value.open(); calendars.value.open();
}; };
@ -571,6 +1006,8 @@ const callPhone = ()=>{
const goOrder = async () => { const goOrder = async () => {
if (!state.value.lockerId) { if (!state.value.lockerId) {
return uni.showToast({ return uni.showToast({
@ -588,7 +1025,7 @@ const goOrder = async () => {
) )
} }
uni.showLoading({mask: true}) uni.showLoading({mask: true})
await getVerifyStatus await getVerifyStatus()
uni.hideLoading(); uni.hideLoading();
if (!state.value.hasVerify) { if (!state.value.hasVerify) {
@ -618,6 +1055,15 @@ const goOrder = async () => {
startTime, startTime,
month: state.value.month, month: state.value.month,
source, source,
couponIds: state.value.couponItem.map((item) => item.couponDispositionId),
serialNumber: state.value.couponOtherItem.map(x => {
return {
dealGroupId: x.dealGroupId,
number: x.number,
marketPrice: x.marketPrice,
purchasePrice: x.price
}
}),
sfId: uni.getStorageSync("sfId"), sfId: uni.getStorageSync("sfId"),
}) })
.then((res) => { .then((res) => {
@ -706,9 +1152,15 @@ const reset = () => {
state.value.lockData = { state.value.lockData = {
discountList: [] discountList: []
} }
state.priceData = {}; state.value.couponItem = [];
} state.value.couponOtherItem = [];
clearCoupon();
}
const clearCoupon = () => {
state.value.couponItem = [];
state.value.couponOtherItem = [];
};
const selfDiscount = computed(() => const selfDiscount = computed(() =>
@ -837,6 +1289,8 @@ const confirmUnit = () => {
} }
state.value.lockerId = state.value.radiovalue; state.value.lockerId = state.value.radiovalue;
state.value.selectUnitRow = LockerList.value.find(item => item.lockerId == state.value.lockerId); state.value.selectUnitRow = LockerList.value.find(item => item.lockerId == state.value.lockerId);
getLockerById();
clearCoupon();
getLockerExpense(); getLockerExpense();
hideUnitPopup(); hideUnitPopup();
} }
@ -847,6 +1301,7 @@ const confirmMonth = () => {
} else { } else {
state.value.month = state.value.radioMonthvalue; state.value.month = state.value.radioMonthvalue;
} }
clearCoupon();
getLockerExpense(); getLockerExpense();
hideMonthPopup(); hideMonthPopup();
} }
@ -884,6 +1339,97 @@ const goSite = () => {
url: "/pages/site/index", url: "/pages/site/index",
}); });
}; };
const goReserve= () => {
uni.navigateTo({
url: "/pagesb/reserve/index",
});
}
const isApply = ref(false);
async function postWaitingAppointment() {
if (isApply.value) return (state.value.showCancelModal = true);
// H5
uni.showLoading();
const unitTypeId = state.value.unitTypeId;
if (state.value.siteId && unitTypeId) {
const res = await getUserInfo();
if (res?.data?.code === 401) {
AlternateReservation();
}
uni.hideLoading();
if (res.code === 200) {
if (!res.data.phone) {
popup.value.open();
} else {
AlternateReservation();
}
}
}
}
//
const AlternateReservation = () => {
const unitTypeId = state.value.unitTypeId;
uni.showLoading({mask:true})
getSiteApi
.AlternateReservation({
siteId: state.value.siteId,
unitTypeId: unitTypeId,
comeFrom: "WeChat",
})
.then((res) => {
uni.hideLoading();
if (res.code === 200) {
setTimeout(() => {
state.value.showAppointmentSuccess = true;
}, 500);
}
isWaitingAppointment();
uni.hideLoading();
});
};
//
const cancelAppointment = () => {
uni.showLoading();
const unitTypeId = state.value.unitTypeId;
getSiteApi
.CancelReservation({
siteId: state.value.siteId,
unitTypeId: unitTypeId,
})
.then((res) => {
uni.hideLoading();
if (res.code === 200) {
isWaitingAppointment();
}
uni.hideLoading();
});
};
//
function isWaitingAppointment(showLoadi) {
if (!showLoadi) {
uni.showLoading();
}
const unitTypeId = state.value.unitTypeId;
if (state.value.siteId && unitTypeId) {
getSiteApi
.GetReserveIsEnable({
siteId: state.value.siteId,
unitTypeId: unitTypeId,
})
.then((res) => {
if (res.code === 200) {
isApply.value = res.data;
}
if (!showLoadi) {
uni.hideLoading();
}
});
}
}
const goUnlock = () => { const goUnlock = () => {
getApp().globalData.tabParams = { type: 'paid' } getApp().globalData.tabParams = { type: 'paid' }
uni.navigateTo({ uni.navigateTo({
@ -967,6 +1513,24 @@ const getSiteDetail = () => {
; ;
} }
onLoad(async (params) => { onLoad(async (params) => {
//
const shareParams = {
title: '欢迎使用城市迷你仓',
imageUrl: 'data:image/png;base64,6oG0tMIsZRVyzpV7z3tpQWw2SPDKKN0wYRB0ea0Ng3B6GlGCfj3lqAy16qhsalsGqvaB9uVd17jWZkQeTk6eJrBg2dMlRbBs2Yo8FmFRsQcx2PvvMykuR8TV06QKpmbe7TNyGoYuiWvIVEskJTHqMIyec0GVUcTxTsNxQQOoiYChjAnzXYpLqHxWLI4pgMhqe1Bi/L5s2dp5HK+tt6h/l9yRGoPmilCy3FzzS+XC6+/IhUrponGNI14AiDqSx3siKgiBwL9ldMMiUXt79nbyxX5phxwygpFWRHI/l6K3Oh+Obu1ZyuSyuuKfgibcgs1pikX1h5jOhszL4rnW2AAmoNH30EU0AvSOjO6tbBzItkwvc0Iby7FQpXsHb0qIBJLmLCA1znT2jag9jt0dmTRhiEwMYXOXgQjbrlC+Xwt97H6ggb3emvG6rfz+UFjdhw7Xuz3CJzhLXBpZ2z9KU6n5+hPP4duAxgXHOMCjB2+539g1KX5kRRDUTUje3Ui2A8OB2Ik7fPYA2MPXHbDfgm4n3H/4HjACQ/2BO21J/jq11/D09dew7tv/xCHOzbqAaNdlV7GBnQZuidgnABcgJispo9os5/866d6BRr8+T+GL3/xf4b3f/g27o8XwB440ynYmnrMzUIkhUR1MHmespIjEP0E355kcAMd/rxh2zZ0GG6Q7+9hbK0TuHs48HB/4O7uHh/e3eH9uxd4uH/AM3fESz9+7NxiP3lSPq39ZQZAeKUhGxsvF1dp+qBDQ5TCT3rPT7mon7kcLtEOBIy7KhcBRW2STDNOckavAK/vrF6cJSy+KNNA0hJ1LZVhjZhVtCwsHWQU/o0KC2azUhFLkU8SFgWxaBBU5ArtJ03RpkKr0YhKmVEtM0tKmiJRqVlg1nAsBman4tSzSvH48OyBUoZYoG/bBIVUkGHOPK8UoKOSZqUstory1VitpyG2AKJGD5eHsYKgQCBQZaVBmk9mWxGgk87nSSsIAIcDp9iwjzRWptpMxRTbRiWbeWgdWYq3wRAtcLq9gTsrF40T4nyG7zvCRxoYArgxam4z/zjD7PmvVOjujvvLwNM9cLff4Xz/AH8B7O0G9x++hb/x1/8K/vPW8YVXXsYXP/cKvvj5l/DaK6/gtZdfwStPb/D0ZsPNtuG0GZp5Rrd84PJwwf2LB9zdfYD7+3vslwPhQO8ntPMtbp4+wbPnz/H1X/5T+FP/2J/Fzc0N+rYBpsa0wMORIfygMu5tnr+KZhmyqTRI+7MJngNtKtowbCzHHir1bp2GSK6xvL9qB5D2x6Kkub5XR6288DREwGjYYpQVLZiee+GT7JnHPJBI7z4vegUQGwF3lvsV8LPagwle1Hw1oGqOdR/urd6nkTipjxOcaHYNgHpn1fihPT7rwen96SDRecoW4C2CesBKVkzqY8zcVV7Q2lJsBDP6YTYQ2AA7wXDh2LPK5EQ/wXVcDMG6ts4Do2FXIt0K8T1mEFzRibheov6VAcZ3s+x7lGK0FkCVFW6VOwSumtYuHt1nzqNsmGUdQC9vOHcZq7gtTjrtnUmnmrk4Ybp33QwyFt0PoOUZmjld2ffPTHlFC9A1mbgyjvg+kPmK3mmkZLW2wUqWUWvOXE5IhwHAhono2RQRDiYvcu8qeuxTFxx5X91D57WLZQFc5UltXU3Sk+6WkbA0rN7/4AOcz2cgApd9x8N+QW8NNzc3GVuMpMr3iurjKrKSkRGV/08De2j+GWkP6ZZlv6WhwX5b4Yz2ydlDiiQBuBxPc19EgX+Zz8ny6DU+ja1YJDErDsuoHmMaUc06Zun8SQOVXvXFibK+sscl14XRxDGYQ01aZ9/OsNaYq+VX+173brbV/eVoUf+tNGZVJTVwPp/qHGntNaczyi/8ogqGqa/cD/QqFmZ1fiiBuEa2XHtBNcGeiwHE8QA/Wjb87g47DXjLKritnWF2QtueoJ0CuKHn1R02DoxxgR3ZuDs8KW9+HDgGIzRx5BnxAEau88kMJwPidMITbPC+wVvD/XHgvQ9e4Ls/ehfx8IDxZEuDMwLwHR4PgO08RA3AA2AOnAYQN/MML895JS8fw9/48W99opdtGC//GfgrX8Pt8y+hxz1wIcZxtWhIxkdriYZgumvqg2YN1pNy16whtl5Fx5Qfd4EKZOy47Afu9wOXyw7fHcc+sF8ueHhxwfHwgPFwn7lxHwP7DR/Z+khZSt3/aefj8SsMMFaRDMeUj5jWngXEQgNpmB8zyJ/+Wr+z6Oernz/m/c9cDtfqfSwhUwp3/j7pHKkMfFH261dENaneFvyuF6CZFcfKUwaBrlg8bVPoqQDHKG8+CmwahdEahUqgNCNuWDx2+VqSwyNBGTDQex5wBz1NETSIOjojJI2e0X0c2NpWcwigko9FuVFz5RWkZpEOlALMqmLpjczOSim0K3cNebCzT1PMyTYgYh5yZ0nl6gKVWJhgUgAIjAAHrMusYuEQzxyz5kYAnwZCIwjP0bIXBZuDNhO8BuAbvGeoHMMQW08DKhFRgcPeewmA3hoam/dWyl8MDM+eV8cRGDjwYgAvdsPd/Zfx8OIOD/f3eHH3Ah+++w5+/w/fxN/7u38f+/0H6L6jxcC5pWF8urnFs2e3eOWll/DGF76IL33pK/jil38Rn/vcq7hlg2UBiuHXSagJFq4Bg/akFJ4MB8JCKtlUiqp+5gDCjHuXFL6mXjak1zDvTBXmICPAR1YgiwlOxX0XoJnneAIVa/P+PMUrlqo9up4xM1S/Ol0/Pa46RysIYTK6tuKjsaxne3regWrq22Zz9Py7wGJZjTWfzWYvrrWAhuhXFbqIiRnnWCSnSBuzoXoN/Pz0yitqszqgRDGatB6DEoMFkjLKzBL5QM15Hr01F0NnUaCRydcEjCO85kfRi6tIyLLQCZ...',
url: `/pages/index/index?siteId=${state.value.siteId}&lockerId=${state.value.lockerId}`,
supportShare: 'YES'
}
setTimeout(() => {
console.log(Object.keys(SFUIP))
window.sf = sf
// SFUIP.shareToWx(shareParams)
console.log(SFUIP)
console.log(window.sf)
console.log("分享参数",shareParams,SFUIP.shareToWx,window.sf.shareToWx);
console.log(window.sf.share(shareParams))
},3000)
if (params.q) { if (params.q) {
let urlParams = decodeURIComponent(params.q); let urlParams = decodeURIComponent(params.q);
} else { } else {
@ -988,8 +1552,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
@ -1001,19 +1563,22 @@ onLoad(async (params) => {
mask: true, mask: true,
}) })
getLocation().then(() => { getLocation().then(() => {
console.log("uni.hideLoading();"); // getSiteDetail()
getSiteDetail()
}); });
getSiteDetail()
}); });
onUnload(() => { onUnload(() => {
uni.$off('homeSiteId'); uni.$off('homeSiteId');
if(driverObj){
driverObj.destroy();
}
}) })
onShow(() => { onShow(() => {
uni.hideTabBar(); uni.hideTabBar();
getVerifyStatus(); getVerifyStatus();
showNewUserCouponCode()
}); });
const goVaild = () => { const goVaild = () => {
@ -1026,6 +1591,7 @@ const getLockerById = () => {
getSiteApi.GetLockerById({ lockerId: state.value.lockerId }).then((res) => { getSiteApi.GetLockerById({ lockerId: state.value.lockerId }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
state.value.lockData = res.data; state.value.lockData = res.data;
console.log(state.value.lockData,"siteData");
if (state.value.lockData.isPreSale) { if (state.value.lockData.isPreSale) {
// //
state.value.zhuangxiuzhong = true; state.value.zhuangxiuzhong = true;
@ -1083,6 +1649,15 @@ const getLockerExpense = () => {
.GetLockerExpense({ .GetLockerExpense({
lockerId: state.value.lockerId, lockerId: state.value.lockerId,
month: state.value.month, month: state.value.month,
couponIds: state.value.couponItem.map((item) => item.couponDispositionId),
serialNumber: state.value.couponOtherItem.map(x => {
return {
dealGroupId: x.dealGroupId,
number: x.number,
marketPrice: x.marketPrice,
purchasePrice: x.price
}
}),
// couponIds: state.value.couponItem // couponIds: state.value.couponItem
// .map((item) => item.couponDispositionId), // .map((item) => item.couponDispositionId),
// isShortTerm: false, // isShortTerm: false,
@ -1134,7 +1709,8 @@ const getUnitTypeBySiteId = () => {
uni.showLoading(); uni.showLoading();
getSiteApi.GetUnitTypeBySiteId({ siteId: state.value.siteId }).then((res) => { getSiteApi.GetUnitTypeBySiteId({ siteId: state.value.siteId }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
unitTypeData.value = res.data.filter(item => item.hasAvailableLocker); unitTypeData.value = res.data
// .filter(item => item.hasAvailableLocker);
state.value.active = 0 state.value.active = 0
state.value.unitTypeId = unitTypeData.value[0]?.id; state.value.unitTypeId = unitTypeData.value[0]?.id;
// barNameList.value = res.data; // barNameList.value = res.data;
@ -1155,6 +1731,8 @@ 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();
isWaitingAppointment(true);
} }
}).finally(() => { }).finally(() => {
uni.hideLoading(); uni.hideLoading();
@ -1181,17 +1759,110 @@ const unitTypeData = ref([]);
function changeMove(event) { function changeMove(event) {
state.value.active = event.detail.current; state.value.active = event.detail.current;
state.value.unitTypeId = unitTypeData.value[state.value.active].id; state.value.unitTypeId = unitTypeData.value[state.value.active].id;
isWaitingAppointment();
} }
</script> // watch(() => storeState.hasTrytoLogin, () => {
// if (storeState.hasTrytoLogin) {
// showNewUserCouponCode()
// }
// })
</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: 20rpx;
min-width: 240px;
max-width: unset;
width: 710rpx;
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: 29rpx;
// 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;
font-size: 28rpx;
padding: 8rpx 14rpx;
}
.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;
}
}
}
.full-wrap{
display: flex;
width: 100%;
margin-bottom: 20rpx;
font-size: 26rpx;
justify-content: space-around;
align-items: center;
:deep(.uv-button){
width: 150rpx;
height: 60rpx;
font-size: 26rpx;
padding: 10rpx;
}
}
.toOrderBox{ .toOrderBox{
width: 100%; width: 100%;
background-color: #FFFFFF; background-color: #FFFFFF;
position: fixed; position: fixed;
bottom: 158upx; bottom: 156upx;
padding: 16rpx 20rpx 12rpx 20rpx; padding: 16rpx 20rpx 12rpx 20rpx;
box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05); box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05);
} }
@ -1352,7 +2023,7 @@ function changeMove(event) {
width: 250rpx; width: 250rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 999rpx; border-radius: 999rpx;
letter-spacing: 4rpx;
:deep(.uv-button) { :deep(.uv-button) {
font-size: 28rpx; font-size: 28rpx;
border: none; border: none;
@ -1365,6 +2036,35 @@ function changeMove(event) {
} }
.goReserve{
width: 100%;
background-color: #F8ECE0;
border-radius: 12rpx;
padding: 20rpx 40rpx;
font-size: 26rpx;
display: flex;
justify-content: space-between;
align-items: center;
&:hover{
opacity: 0.7;
}
.left{
text{
color: #D1001B;
font-size: 28rpx;
&:nth-child(2){
color: #000;
}
}
}
.right{
color: #94673C;
font-size: 27rpx;
display: flex;
align-items: center;
}
}
.unitPopupBox { .unitPopupBox {
:deep(.uv-radio__label-wrap){ :deep(.uv-radio__label-wrap){
display: none; display: none;
@ -1687,7 +2387,7 @@ function changeMove(event) {
width: 250rpx; width: 250rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 999rpx; border-radius: 999rpx;
letter-spacing: 4rpx;
:deep(.uv-button) { :deep(.uv-button) {
font-size: 28rpx; font-size: 28rpx;
border: none; border: none;

View File

@ -40,6 +40,14 @@
<text @click.stop="makePhoneCall">电话: 400-818-1813</text> <text @click.stop="makePhoneCall">电话: 400-818-1813</text>
</view> </view>
</view> </view>
<view class="box3" @click.stop>
<uv-button color="#FB322E" shape="circle" @click="goReserve">
<image src="/static/site/yuyuekancang.svg"></image> 预约看仓
</uv-button>
<uv-button color="#FB322E" shape="circle" @click="goVr">
<image src="/static/site/shijingtu.svg"></image> 实景图
</uv-button>
</view>
</view> </view>
</view> </view>
<uvPickerSlef ref="cityPicker" confirmColor="#FB322E" round="24px" title="选择城市" :columns="[state.cityData]" @confirm="cityConfirm"></uvPickerSlef> <uvPickerSlef ref="cityPicker" confirmColor="#FB322E" round="24px" title="选择城市" :columns="[state.cityData]" @confirm="cityConfirm"></uvPickerSlef>
@ -62,6 +70,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";
// //
@ -88,12 +97,13 @@ let siteData = reactive({
// 线 // 线
const handleNavigate = (item) => { const handleNavigate = (item) => {
SFUIP.openLocation({ // const { latitude, longitude } = wgs84ToGcj02(item.latitude, item.longitude);
latitude: Number(item.latitude), wx.openLocation({
longitude: Number(item.longitude), latitude:Number(item.latitude),
longitude:Number(item.longitude),
name: item.name, name: item.name,
address: item.address, address: item.address,
}); })
}; };
const toHome = (item) => { const toHome = (item) => {
@ -188,6 +198,19 @@ const getCityData = () => {
; ;
} }
const goVr = (e) => {
e?.stopPropagation?.()
uni.navigateTo({
url: "/pages/webview/web?url=" + encodeURIComponent("https://elitesys.kingkongcang.com/tour/index.html"),
});
}
const goReserve= (e) => {
e?.stopPropagation?.()
uni.navigateTo({
url: "/pagesb/reserve/index",
});
}
onShow(() => { onShow(() => {
uni.showLoading({ uni.showLoading({
mask: true, mask: true,
@ -252,6 +275,23 @@ onShow(() => {
.siteList{ .siteList{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.box3{
display: flex;
margin-top: 10rpx;
gap: 20rpx;
:deep(.uv-button){
height: 42rpx;
line-height: 42rpx;
min-width: 180rpx;
font-size: 24rpx;
display: flex;
align-items: center;
}
image {
width: 30rpx;
margin-right: 8rpx;
}
}
.box2{ .box2{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -264,6 +304,7 @@ onShow(() => {
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
} }
.box{ .box{
display: flex; display: flex;
width: 100%; width: 100%;

View File

@ -312,6 +312,18 @@
<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>
</view> </view>
<view class="garyBox font28 card20" @click="openCoupon">
<view style="display: flex;align-items: center;">优惠劵</view>
<view class="select"><text :style="{color:!state.couponItem.length?'#A8AAAC':'#000'}" style="margin-right: 10rpx;font-weight: bold;">
<template v-for="(item, index) in state.couponItem" :key="index">{{ couponDesc(item) }}</template>
<!-- {{$t("detail.noselect") }} -->
<template v-if="!state.couponItem.length &&!state.couponOtherItem.length">{{
$t("detail.noselect")
}}</template></text>
<image src="/static/home/jiantou.svg" style="width: 24rpx;height: 24rpx;" class="icon"></image>
</view>
</view>
<view class="title2 font32 fontb"> <view class="title2 font32 fontb">
<text>租赁体积</text> <text>{{ `${state.lockData?.volume}` }}</text> <text>租赁体积</text> <text>{{ `${state.lockData?.volume}` }}</text>
</view> </view>
@ -342,6 +354,12 @@
<view class="title2 font32 fontb"> <view class="title2 font32 fontb">
<text>优惠信息</text> <text style="color: #FB322E;">- {{ state.priceData.favorable }}</text> <text>优惠信息</text> <text style="color: #FB322E;">- {{ state.priceData.favorable }}</text>
</view> </view>
<view class="title2 textGary2 fontb font28">
<text>优惠劵优惠</text><text style="color: #FB322E;">- {{
state.priceData.codeFavorable
}}</text>
</view>
<view class="title2 textGary2 fontb font28"> <view class="title2 textGary2 fontb font28">
<text>租期优惠{{ state.month }}个月长租</text><text style="color: #FB322E;">- {{ <text>租期优惠{{ state.month }}个月长租</text><text style="color: #FB322E;">- {{
state.priceData.leaseDiscount state.priceData.leaseDiscount
@ -549,6 +567,20 @@
</view> </view>
</view> </view>
</uv-popup> </uv-popup>
<coupon
ref="couponRef"
v-model="state.couponShow"
:priceData="state.priceData"
:month="state.month"
:couponItem="state.couponItem"
:couponOtherItem="state.couponOtherItem"
:isRenew="true"
:siteData="state.lockData"
:disabledFunc="disabledFunc"
@chooseOtherCoupon="chooseOtherCoupon"
@chooseCoupon="chooseCoupon"
@confirm="confirmCoupon"
></coupon>
</view> </view>
</template> </template>
@ -562,6 +594,7 @@ import { useCountDown } from "@/hooks/index";
import { onLoad, onShow, onShareAppMessage, onHide } from '@dcloudio/uni-app' import { onLoad, onShow, onShareAppMessage, onHide } from '@dcloudio/uni-app'
import { useLockApi } from '@/Apis/lock.js'; import { useLockApi } from '@/Apis/lock.js';
import myPopup from '@/components/myPopup.vue'; import myPopup from '@/components/myPopup.vue';
import coupon from "@/components/coupon.vue";
// //
import { useMainStore } from "@/store/index.js"; import { useMainStore } from "@/store/index.js";
import { navbarHeightAndStatusBarHeight, shareParam } from "@/utils/common.js"; import { navbarHeightAndStatusBarHeight, shareParam } from "@/utils/common.js";
@ -591,6 +624,7 @@ const devicePopupRef = ref(null);
const pawPopupRef = ref(null); const pawPopupRef = ref(null);
const detailPopupRef = ref(null); const detailPopupRef = ref(null);
const cancelOrderPopupRef = ref(null); const cancelOrderPopupRef = ref(null);
const couponRef = ref(null);
uni.hideTabBar(); uni.hideTabBar();
const state = ref({ const state = ref({
orderList: [], orderList: [],
@ -607,6 +641,9 @@ const state = ref({
refundLoading: false, refundLoading: false,
current: 0, current: 0,
cancelOrderList: [], cancelOrderList: [],
couponShow:false, //
couponItem:[], //
couponOtherItem:[],
}); });
const list = [{ const list = [{
name: '在租', name: '在租',
@ -615,7 +652,112 @@ const list = [{
}, { }, {
name: '待支付' name: '待支付'
}, },
] ]//
const couponDesc = (item)=>{
let detail = ''
switch(item.couponType){
case 1:
detail = `${t('discountMomey',{discount:item.discountLimit})}`
break
case 2:
detail = `${t('couponDiscount',{percent: 100 - item.discountRange * 100,discount: (item.discountRange * 100) / 10,})}`
break
case 3:
detail = `${t('firstMonthRent',{discount:item.firstMonthAmount})}`
break
case 4:
detail = `${t('couponDiscount',{percent: 100 - item.monthDiscount * 100,discount: (item.monthDiscount * 100) / 10})}`
break
case 5:
detail = `${t('freeMonth',{discount:item.freeMonth})}`
break
case 6:
detail = `${t('BonusMonth',{discount:item.freeMonth})}`
break
default:
detail = `${t('discountMomey',{discount:item.discountLimit})}`
break
}
return `${detail}`
}
function canAddValue(arr, value) {
//
const allowedNumbers = new Set([1, 3, 4]);
//
if (arr.length === 0) {
return true;
}
// 134
const hasInvalidNumber = arr.some(num => !allowedNumbers.has(num));
if (hasInvalidNumber) {
return false; // 134
}
// 134
if (allowedNumbers.has(value) && !arr.includes(value)) {
return true;
}
//
return false;
}
const disabledFunc = (item)=>{
if(!item) {return true}
// item.siteIds
const isSite = item.siteIds.length?item.siteIds.includes(state.value.lockData.siteId):true
const isUnit = item.unitTypeIds.length?item.unitTypeIds.includes(state.value.lockData.unitTypeId):true
let isPrice = item.satisfyAmount?state.value.priceData.expense>=item.satisfyAmount:true
const canAdd = canAddValue(state.value.couponItem.map(x=>x.couponType),item.couponType)
if([3,4,5,6].includes(item.couponType)){
isPrice = state.value.month>=item.fullMonth
}
// Date
const start = new Date(item.startDate);
const end = new Date(item.endDate);
//
const now = new Date();
//
const isDate = now >= start && now <= end;
return !(isSite&&isUnit&&isPrice&&item.renewUsable&&isDate&&canAdd)
}
const openCoupon = ()=>{
couponRef.value.open();
}
const chooseOtherCoupon= (item) => {
state.value.couponOtherItem = [item];
getLockerExpense();
}
const confirmCoupon = (data)=>{
const { couponItem, couponOtherItem } = data;
state.value.couponItem = couponItem;
state.value.couponOtherItem = couponOtherItem;
getLockerExpense();
couponRef.value.close();
}
const chooseCoupon = (item)=>{
//
if(item.isSuperposition){
if(state.value.couponItem.every((x)=>item.couponDispositionId != x.couponDispositionId)){
if(state.value.couponItem.every(x=>item.couponType != x.couponType)){
state.value.couponItem.push(item);
}else{
uni.showToast({
title: `相同优惠卷类型不能叠加使用!`,
icon: "none",
duration: 2000,
})
}
}
}else{
state.value.couponItem = [item]
}
getLockerExpense()
}
const currentOrderList = computed(() => { const currentOrderList = computed(() => {
const isType1 = (item) => const isType1 = (item) =>
@ -765,6 +907,15 @@ const goOrder = async () => {
.ContinuationOrder({ .ContinuationOrder({
orderId: state.value.selectItem.orderId, orderId: state.value.selectItem.orderId,
month: state.value.month, month: state.value.month,
couponIds: state.value.couponItem.map((item) => item.couponDispositionId),
serialNumber: state.value.couponOtherItem.map(x => {
return {
dealGroupId: x.dealGroupId,
number: x.number,
marketPrice: x.marketPrice,
purchasePrice: x.price
}
}),
source source
}) })
.then((res) => { .then((res) => {
@ -889,9 +1040,15 @@ const confirmMonth = () => {
} else { } else {
state.value.month = state.value.radioMonthvalue; state.value.month = state.value.radioMonthvalue;
} }
clearCoupon();
getLockerExpense(); getLockerExpense();
hideMonthPopup(); hideMonthPopup();
} }
const clearCoupon = () => {
state.value.couponItem = [];
state.value.couponOtherItem = [];
};
const selfDiscount = computed(() => const selfDiscount = computed(() =>
state.value.lockData.discountList state.value.lockData.discountList
.sort((a, b) => b.month - a.month) .sort((a, b) => b.month - a.month)
@ -927,6 +1084,15 @@ const getLockerExpense = () => {
.ContinuationOrderPricePost({ .ContinuationOrderPricePost({
orderId: state.value.selectItem.orderId, orderId: state.value.selectItem.orderId,
month: state.value.month, month: state.value.month,
couponIds: state.value.couponItem.map((item) => item.couponDispositionId),
serialNumber: state.value.couponOtherItem.map(x => {
return {
dealGroupId: x.dealGroupId,
number: x.number,
marketPrice: x.marketPrice,
purchasePrice: x.price
}
}),
// couponIds: state.value.couponItem.map((item) => item.couponDispositionId), // couponIds: state.value.couponItem.map((item) => item.couponDispositionId),
// point:state.value.point, // point:state.value.point,
// serialNumber: state.value.couponOtherItem.map(x => { // serialNumber: state.value.couponOtherItem.map(x => {
@ -950,7 +1116,7 @@ const getLockerExpense = () => {
showCancel: false, showCancel: false,
success: function () { success: function () {
clearCoupon(); clearCoupon();
state.value.point = 0; // state.value.point = 0;
}, },
}); });
} }

View File

@ -1,172 +1,131 @@
<template> <template>
<!-- <nav-bar></nav-bar> -->
<view <view
class="container" class="container"
:class="[`${themeInfo.theme}-theme`, `${themeInfo.language}`]" :class="[`${themeInfo.theme}-theme`, `${themeInfo.language}`]"
> >
<nav-bar></nav-bar>
<view class="content"> <view class="content">
<view class="info"> <view class="formBox card">
<view class="i-header"> <uv-form labelPosition="left" labelWidth="190rpx" :model="state.formData" ref="formRef">
<view class="tabbox">
<view class="li">
{{ $t("home.reserve") }}
</view>
</view>
</view>
<view class="infobox">
<view class="personal">
<view class="select">
<view class="label"> * {{ $t("reserve.FULLNAME") }} </view>
<view class="inputBox">
<view class="value">
<input
type="text"
v-model="state.formData.userName"
/>
</view>
</view>
</view>
<view class="select"> <!-- 姓名 -->
<view class="label"> * {{ $t("reserve.REGION") }} </view> <uv-form-item :label="$t('reserve.FULLNAME')" borderBottom>
<view class="inputBox" @click="openRegionPicker"> <uv-input
<view class="value"> v-model="state.formData.userName"
border="none"
placeholder="请填写"
/>
</uv-form-item>
<!-- 区域 -->
<uv-form-item :label="$t('reserve.REGION')" borderBottom @click="openRegionPicker">
<uv-input <uv-input
type="text"
v-model="state.formData.region" v-model="state.formData.region"
border="none" border="none"
readonly readonly
placeholder="请选择"
/> />
</view> <template #right>
<uv-icon <uv-icon name="arrow-right" size="16"></uv-icon>
class="arrow" </template>
name="arrow-down-fill" </uv-form-item>
color="#000000"
size="14"
></uv-icon>
</view>
</view>
<view class="select"> <!-- 类型 -->
<view class="label"> * {{ $t("reserve.TYPE") }} </view> <uv-form-item :label="$t('reserve.TYPE')" borderBottom>
<view class="inputBox">
<view class="value">
<uv-radio-group <uv-radio-group
v-model="state.formData.type" v-model="state.formData.type"
placement="row" placement="row"
size="12" activeColor="#fb322e" size="40rpx" inactiveColor="#D8D8D8"
iconSize="14"
:activeColor="themeInfo.activeColor"
> >
<uv-radio <uv-radio :customStyle="{
:customStyle="{ margin: '4px',
margin: '8px 8px 8px 0', }" :name="$t('reserve.Individual & Family')" :label="$t('reserve.Individual & Family')" />
}" <uv-radio :customStyle="{
:name="$t('reserve.Individual & Family')" margin: '4px',
:label="$t('reserve.Individual & Family')" }" :name="$t('reserve.Business & E-commerce')" :label="$t('reserve.Business & E-commerce')" />
></uv-radio> <uv-radio :customStyle="{
<uv-radio margin: '4px',
:customStyle="{ }" :name="$t('reserve.Retail & Store')" :label="$t('reserve.Retail & Store')" />
margin: '8px 8px 8px 0',
}"
:name="$t('reserve.Business & E-commerce')"
:label="$t('reserve.Business & E-commerce')"
></uv-radio>
<uv-radio
:customStyle="{ margin: '8px 0' }"
:name="$t('reserve.Retail & Store')"
:label="$t('reserve.Retail & Store')"
></uv-radio>
</uv-radio-group> </uv-radio-group>
</view> </uv-form-item>
</view>
</view>
<view class="select"> <!-- 手机号 -->
<view class="label"> * {{ $t("reserve.PHONE NUMBER") }} </view> <uv-form-item :label="$t('reserve.PHONE NUMBER')" borderBottom>
<view class="inputBox"> <view style="display:flex;align-items:center;width:100%">
<view class="value"> <uv-input
<input
type="text"
v-model="state.formData.phone" v-model="state.formData.phone"
border="none"
placeholder="请填写"
style="flex:1"
/> />
</view> </view>
<!-- #ifdef MP-WEIXIN --> </uv-form-item>
<uv-button
size="small" <!-- 需求 -->
:text="$t('validation.bind')" <uv-form-item :label="$t('common.Requirement')">
open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber"
>
</uv-button>
<!-- #endif -->
</view>
</view>
<view class="select">
<view class="label"> * {{ $t("common.Requirement")}} </view>
<view class="inputBox">
<view class="value">
<uv-radio-group <uv-radio-group
v-model="state.formData.tag" v-model="state.formData.tag"
placement="row" placement="row"
size="12" activeColor="#fb322e" size="40rpx" inactiveColor="#D8D8D8"
iconSize="14"
:activeColor="themeInfo.activeColor"
> >
<uv-radio <uv-radio :customStyle="{
:customStyle="{ margin: '8px 0' }" margin: '4px',
:name="2" }" :name="2" :label="$t('common.ConsultationQuotation')" />
:label="$t('common.ConsultationQuotation')" <uv-radio :customStyle="{
></uv-radio> margin: '4px',
<uv-radio }" :name="1" :label="$t('common.OnSiteAssessment')" />
:customStyle="{
margin: '8px',
}"
:name="1"
:label="$t('common.OnSiteAssessment')"
></uv-radio>
</uv-radio-group> </uv-radio-group>
</view> </uv-form-item>
</view>
</uv-form>
</view> </view>
<!-- 按钮 -->
<view class="btn"> <view class="btn">
<button class="next-btn" @click="submit"> <uv-button
shape="circle"
color="#FB322E"
@click="submit"
>
{{ $t("common.submit") }} {{ $t("common.submit") }}
</button> </uv-button>
</view>
</view> </view>
<!-- 选择地区 --> <!-- 地区选择 -->
<uv-picker <uv-picker
ref="regionPickerRef" ref="regionPickerRef"
:columns="state.columns" :columns="state.columns"
keyName="label" keyName="label"
:confirmText="$t('common.confirm')"
:cancelText="$t('common.cancel')"
@confirm="selectRegion" @confirm="selectRegion"
@change="changeRegion" @change="changeRegion"
></uv-picker> />
</view>
</view>
</view>
</view>
<!-- 是否验证成功 -->
<myModal <myModal
v-model="state.showAuthModal" v-model="state.showAuthModal"
:content="state.contentTips" :content="state.contentTips"
:cancelShow="false" :cancelShow="false"
></myModal> />
<uv-popup ref="typeSelectRef" mode="center" :safeAreaInsetTop="false" :safeAreaInsetBottom="false" :close-on-click-overlay="false"> <uv-popup ref="typeSelectRef" mode="center" round="24px" :safeAreaInsetTop="false" :safeAreaInsetBottom="false" :close-on-click-overlay="false">
<view style="min-width:450rpx;padding: 40rpx;display: flex;flex-direction: column;justify-content: center;"> <view style="min-width:450rpx;padding: 40rpx;display: flex;flex-direction: column;justify-content: center;">
<view class="typeSelectBox"> <view class="typeSelectBox">
<button @click="typeSelect(2)">{{ $t('common.ConsultationQuotation')}}</button> <uv-button shape="circle"
color="#FB322E" @click="typeSelect(2)">{{ $t('common.ConsultationQuotation')}}</uv-button>
</view> </view>
<view style="margin-top: 40rpx;" class="typeSelectBox"> <view style="margin-top: 40rpx;" class="typeSelectBox">
<button @click="typeSelect(1)" >{{ $t('common.OnSiteAssessment')}}</button> <uv-button shape="circle"
color="#FB322E" @click="typeSelect(1)" >{{ $t('common.OnSiteAssessment')}}</uv-button>
</view> </view>
</view> </view>
</uv-popup> </uv-popup>
<view class="footer">
<view @click="toHome">
返回主页
</view>
<view @click="goOrder">
返回订单
</view>
</view>
</view> </view>
</template> </template>
@ -181,7 +140,7 @@ import { useLoginApi as homeApi } from "/Apis/home.js";
import { ClientSite } from "@/Apis/book.js"; import { ClientSite } from "@/Apis/book.js";
import { isXiaohongshu } from '@/config/index.js'; import { isXiaohongshu } from '@/config/index.js';
const { themeInfo } = useMainStore(); const { themeInfo,storeState } = useMainStore();
const { t } = useI18n(); const { t } = useI18n();
const getLoginApi = useLoginApi(); const getLoginApi = useLoginApi();
@ -259,7 +218,7 @@ const verifyPerson = () => {
phone: state.formData.phone, phone: state.formData.phone,
remark: state.formData.region, remark: state.formData.region,
type: state.formData.type, type: state.formData.type,
channel: isXiaohongshu ? 17 : 1, channel: 18,
tag: state.formData.tag, tag: state.formData.tag,
}) })
.then((res) => { .then((res) => {
@ -317,214 +276,90 @@ const selectCity = (city, parentIndex) => {
} }
}); });
} }
const toHome = (item) => {
uni.switchTab({
url: `/pages/index/index`,
});
}
const goOrder = () => {
navigateTo('/pages/unlock/index');
}
onMounted(() => { onMounted(() => {
state.formData.phone = storeState.userInfo.phone;
state.formData.userName = storeState.userInfo.customerName;
getCityData(); getCityData();
setTimeout(()=>{ // setTimeout(()=>{
typeSelectRef.value?.open(); // typeSelectRef.value?.open();
},500) // },500)
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/static/style/theme.scss"; @import "@/static/style/theme.scss";
.typeSelectBox{ .back{
button { margin-bottom: 0;
font-size: 32rpx;
padding: 12rpx 0;
color: var(--text-color);
background: var(--active-color);
border-radius: 10rpx;
box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.13);
}
} }
.footer{
.container { position: fixed;
margin: 0; bottom: 0;
padding: 0 20upx;
width: 100%;
min-height: 100vh;
padding-bottom: 80rpx;
display: flex;
flex-direction: column;
align-items: center;
background: linear-gradient(
to bottom,
var(--right-linear),
var(--left-linear2)
);
background-attachment: fixed;
.content {
width: 100%;
.infobox {
width: 100%;
padding: 10upx 6% 60upx;
background-color: #ffffff;
position: relative;
&::before {
content: "";
z-index: 9;
position: absolute;
bottom: -7px;
left: 0; left: 0;
width: 100%; width: 100%;
height: 14px; height: 100rpx;
background: radial-gradient(
var(--left-linear2) 0px,
var(--left-linear2) 5px,
transparent 5px,
transparent
);
background-size: 14px 14px;
}
}
.btn {
margin-top: 60rpx;
margin-bottom: 20rpx;
button {
font-size: 28rpx;
padding: 12rpx 0;
color: var(--text-color);
background: var(--active-color);
border-radius: 10rpx;
box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.13);
}
}
.select {
border-bottom: 1px solid #bec2ce;
margin: 30rpx 0;
.label {
color: #bec2ce;
font-size: 26rpx;
font-weight: bold;
}
.info {
color: #242e42;
font-size: 22rpx;
display: flex;
justify-content: space-between;
font-weight: bold;
padding: 0 18rpx;
opacity: 0.7;
&.Total {
margin-top: 10rpx;
color: #242e42;
opacity: 1;
}
}
.garyBox {
background-color: rgba(216, 216, 216, 0.3);
border-radius: 8rpx;
padding: 2rpx 10rpx;
font-size: 20rpx;
font-weight: bold;
color: rgb(36, 46, 66);
display: flex; display: flex;
justify-content: space-around;
align-items: center; align-items: center;
justify-content: space-between; background-color: #fff;
margin: 10rpx 4rpx; view{
} width: 50%;
.inputBox { height: 80rpx;
display: flex; line-height: 80rpx;
justify-content: space-between;
align-items: center;
padding: 10rpx;
margin-left: 5px;
.ImgUpload {
display: flex;
margin: 10upx 0;
::v-deep .uv-upload {
margin-right: 40rpx;
border-radius: 18rpx;
border: 2px solid #9797974f;
.uv-upload__wrap__preview {
margin: 0;
}
}
.upLoadText {
font-size: 28upx;
text-align: center; text-align: center;
padding: 10upx 0; color: #000;
background: var(--active-color);
border-radius: 0 0 18upx 18upx;
margin: -1px;
}
}
.value {
flex: 1;
display: flex;
flex-wrap: wrap;
color: #242e42;
font-size: 30rpx; font-size: 30rpx;
font-weight: bold; font-weight: bold;
} }
.arrow { }
width: auto; .container{
font-size: 24rpx; min-height:100vh;
.codeBtn { background:#f5f6f8;
font-size: 24rpx; }
background-color: #d1cbcb2d;
}
}
image {
width: 20rpx;
height: 12rpx;
}
}
}
}
.i-header {
position: relative;
&::before {
content: "";
position: absolute;
top: -7px;
left: 0;
width: 100%;
height: 14px;
background: radial-gradient(
var(--right-linear) 0px,
var(--right-linear) 5px,
transparent 5px,
transparent
);
background-size: 14px 14px;
z-index: 9;
}
padding: 40upx 0;
width: 100%;
background-color: #f7f7f7;
color: #242e42;
.tabbox {
position: relative;
padding-top: 10upx;
display: flex;
justify-content: space-around;
.li {
width: 50%;
background-color: transparent;
font-size: 34upx;
outline: none;
text-align: center;
}
.li.active {
font-weight: bold;
}
.bottom-line {
position: absolute;
left: calc(50% - 220rpx);
bottom: 0;
width: 160rpx;
height: 2.5px;
border-radius: 20px;
background: var(--main-color);
transition: left 0.5s ease;
&.right { .formBox{
left: calc(50% + 60rpx); background:#fff;
border-radius:16rpx;
padding:10rpx 20rpx;
:deep(.uv-form-item__body){
padding:20rpx 0;
}
:deep(.uni-input-wrapper){
text-align:right;
font-weight:600;
font-size:28rpx;
.uv-radio-group--row{
justify-content: end;
} }
} }
:deep(.uv-form-item__body__right__content__slot){
text-align:right;
} }
:deep(.uv-form-item__body__left__content__label){
font-size:26rpx;
font-weight:600;
}
:deep(.uv-line){
border-color:#f0f0f0 !important;
} }
} }
.btn{
margin-top:40rpx;
padding:0 20rpx;
}
</style> </style>

View File

@ -0,0 +1,3 @@
<svg width="24" height="20" viewBox="0 0 24 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20.3138 20H3.22983C2.34642 19.9723 1.51015 19.595 0.904801 18.951C0.299457 18.307 -0.025425 17.449 0.0015557 16.5655V3.40501C-0.0174213 2.52263 0.314215 1.66872 0.923773 1.03045C1.53333 0.392186 2.37108 0.0216266 3.2534 0H20.3373C21.2155 0.0277349 22.0473 0.400967 22.6518 1.03857C23.2563 1.67617 23.5847 2.5266 23.5656 3.40501V16.5655C23.579 17.0049 23.5053 17.4426 23.3488 17.8534C23.1924 18.2641 22.9563 18.6399 22.654 18.9591C22.3518 19.2783 21.9895 19.5346 21.5878 19.7132C21.1862 19.8919 20.7532 19.9893 20.3138 20ZM3.22983 1.79676C2.82566 1.82401 2.44774 2.00672 2.17535 2.30656C1.90297 2.6064 1.75728 3.00008 1.76886 3.40501V16.5655C1.75532 16.7728 1.78313 16.9807 1.85066 17.1772C1.9182 17.3736 2.02411 17.5546 2.16225 17.7098C2.30039 17.8649 2.468 17.991 2.65532 18.0808C2.84264 18.1706 3.04594 18.2222 3.2534 18.2327H20.3373C20.5428 18.2192 20.7435 18.1654 20.9281 18.0743C21.1127 17.9832 21.2776 17.8566 21.4132 17.7018C21.5489 17.547 21.6528 17.367 21.7188 17.172C21.7849 16.977 21.8119 16.7709 21.7983 16.5655V3.40501C21.8176 2.99125 21.6722 2.5867 21.394 2.27981C21.1158 1.97292 20.7274 1.78866 20.3138 1.7673L3.22983 1.79676ZM9.77475 16.1708C9.65298 16.1716 9.53241 16.1468 9.4208 16.0981C9.30919 16.0494 9.20902 15.9778 9.12674 15.8881C8.14025 14.8376 6.92697 14.0263 5.57938 13.5158C4.23179 13.0054 2.78545 12.8093 1.3506 12.9426L1.18565 11.1753C2.68799 11.0318 4.20383 11.1921 5.64296 11.6465C7.0821 12.1009 8.41511 12.8402 9.56267 13.8203C10.6908 12.0945 12.2323 10.678 14.0472 9.6996C15.862 8.72118 17.8926 8.21187 19.9544 8.21797C20.7275 8.21488 21.499 8.28788 22.2578 8.43594L21.9161 10.1679C21.2698 10.0431 20.6127 9.98194 19.9544 9.98527C18.016 9.97585 16.1127 10.503 14.4554 11.5084C12.7981 12.5139 11.4513 13.9583 10.5641 15.6819C10.5003 15.8095 10.4064 15.9197 10.2904 16.0029C10.1744 16.086 10.0399 16.1396 9.89846 16.1591C9.85799 16.1688 9.81634 16.1728 9.77475 16.1708ZM7.07077 9.39617C6.48821 9.39617 5.91873 9.22342 5.43434 8.89976C4.94995 8.57611 4.57242 8.11608 4.34948 7.57786C4.12654 7.03964 4.06821 6.4474 4.18186 5.87602C4.29552 5.30465 4.57605 4.77981 4.98799 4.36787C5.39992 3.95594 5.92476 3.6754 6.49613 3.56175C7.06751 3.4481 7.65975 3.50643 8.19797 3.72937C8.73619 3.95231 9.19622 4.32984 9.51988 4.81423C9.84353 5.29861 10.0163 5.8681 10.0163 6.45066C10.0163 6.83747 9.94009 7.22049 9.79207 7.57786C9.64404 7.93523 9.42708 8.25994 9.15356 8.53345C8.88005 8.80697 8.55534 9.02393 8.19797 9.17196C7.84061 9.31998 7.45758 9.39617 7.07077 9.39617ZM7.07077 5.27246C6.83775 5.27246 6.60996 5.34156 6.4162 5.47102C6.22245 5.60048 6.07143 5.78449 5.98226 5.99978C5.89308 6.21507 5.86975 6.45197 5.91521 6.68052C5.96067 6.90907 6.07289 7.119 6.23766 7.28378C6.40243 7.44855 6.61237 7.56077 6.84092 7.60623C7.06947 7.65169 7.30637 7.62836 7.52165 7.53918C7.73694 7.45001 7.92095 7.29899 8.05042 7.10524C8.17988 6.91148 8.24898 6.68369 8.24898 6.45066C8.24898 6.13818 8.12485 5.8385 7.90389 5.61755C7.68293 5.39659 7.38325 5.27246 7.07077 5.27246Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -0,0 +1,3 @@
<svg width="24" height="23" viewBox="0 0 24 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20.2801 9.5438V5.32868C20.2801 3.35183 18.678 1.74961 16.701 1.74961H16.3146V0.893552C16.3146 0.400141 15.9145 0 15.4195 0C15.1825 0 14.9553 0.0941418 14.7877 0.261715C14.6201 0.429289 14.526 0.656567 14.526 0.893552V1.74961H6.17536V0.893552C6.17536 0.400141 5.77368 0 5.28026 0C4.78519 0 4.38517 0.400141 4.38517 0.893552V1.74961H3.57907C1.6021 1.74961 0 3.35183 0 5.32868V19.0469C0 21.0238 1.6021 22.6259 3.57907 22.6259H10.3868C10.5206 22.6669 10.6622 22.6759 10.8001 22.6523C10.9381 22.6286 11.0685 22.5729 11.181 22.4896C11.2935 22.4064 11.3849 22.2978 11.4478 22.1728C11.5107 22.0478 11.5434 21.9098 11.5432 21.7698C11.5432 21.3283 11.2226 20.9611 10.8005 20.8886C10.7904 20.8831 10.7799 20.8785 10.7691 20.8747C10.4973 20.7862 3.57919 20.8357 3.57919 20.8357C2.59237 20.8357 1.79055 20.0337 1.79055 19.0469V9.54297H19.595M3.57907 3.53825H4.38517V5.06868C4.38506 5.18626 4.40814 5.3027 4.45308 5.41135C4.49803 5.52 4.56395 5.61872 4.64709 5.70186C4.73023 5.78499 4.82895 5.85092 4.9376 5.89587C5.04624 5.94081 5.16269 5.96389 5.28026 5.96378C5.51764 5.96372 5.74527 5.86939 5.91312 5.70154C6.08097 5.53369 6.1753 5.30606 6.17536 5.06868V3.53825H14.526V5.06868C14.526 5.56376 14.9261 5.96378 15.4195 5.96378C15.5371 5.96389 15.6536 5.94081 15.7622 5.89587C15.8708 5.85092 15.9696 5.78499 16.0527 5.70186C16.1358 5.61872 16.2018 5.52 16.2467 5.41135C16.2917 5.3027 16.3147 5.18626 16.3146 5.06868V3.53825H16.701C17.6878 3.53825 18.4913 4.34174 18.4913 5.32856V7.75254H1.79031V5.32868C1.79031 4.34186 2.59225 3.53825 3.57907 3.53825ZM17.5071 10.7354C14.2128 10.7354 11.5431 13.4066 11.5431 16.6995C11.5431 19.9937 14.2127 22.665 17.5071 22.665C20.8014 22.665 23.4727 19.9939 23.4727 16.6995C23.4727 13.4066 20.8015 10.7354 17.5071 10.7354ZM17.5071 20.8746C15.2061 20.8746 13.3318 19.002 13.3318 16.6993C13.3318 14.3981 15.2059 12.5256 17.5071 12.5256C19.8098 12.5256 21.6823 14.3981 21.6823 16.6993C21.6823 19.002 19.8099 20.8746 17.5071 20.8746ZM19.2974 17.2972H17.5071V15.507C17.507 15.3489 17.4442 15.1973 17.3324 15.0854C17.2206 14.9736 17.069 14.9107 16.9109 14.9106C16.7528 14.9107 16.6012 14.9736 16.4894 15.0854C16.3776 15.1973 16.3148 15.3489 16.3146 15.507V17.8935C16.3147 18.0516 16.3776 18.2032 16.4894 18.315C16.6012 18.4268 16.7528 18.4897 16.9109 18.4898H19.2974C19.4555 18.4896 19.6071 18.4268 19.7189 18.315C19.8307 18.2032 19.8936 18.0516 19.8937 17.8935C19.8936 17.7354 19.8307 17.5838 19.7189 17.472C19.6071 17.3602 19.4555 17.2973 19.2974 17.2972ZM7.96413 11.9279H4.38517C4.22683 11.9279 4.07498 11.9908 3.96302 12.1028C3.85106 12.2147 3.78816 12.3666 3.78816 12.5249C3.78816 12.6833 3.85106 12.8351 3.96302 12.9471C4.07498 13.059 4.22683 13.1219 4.38517 13.1219H7.96424C8.12234 13.1218 8.27393 13.0589 8.38571 12.9471C8.49749 12.8353 8.56033 12.6837 8.56042 12.5256C8.56051 12.4472 8.54517 12.3696 8.51525 12.2971C8.48533 12.2246 8.44144 12.1588 8.38606 12.1033C8.33069 12.0478 8.26493 12.0037 8.19254 11.9736C8.12014 11.9435 8.04253 11.928 7.96413 11.9279ZM7.96413 16.103H4.38517C4.30675 16.1032 4.22913 16.1187 4.15672 16.1488C4.08432 16.1789 4.01855 16.223 3.96318 16.2785C3.90781 16.3341 3.86392 16.3999 3.83401 16.4724C3.8041 16.5449 3.78877 16.6226 3.78887 16.701C3.789 16.8591 3.85187 17.0107 3.96367 17.1225C4.07547 17.2342 4.22707 17.2971 4.38517 17.2972H7.96424C8.12233 17.2971 8.27392 17.2342 8.3857 17.1225C8.49749 17.0107 8.56033 16.8591 8.56042 16.701C8.56053 16.6226 8.54519 16.5449 8.51529 16.4724C8.48538 16.3999 8.44149 16.3341 8.38611 16.2785C8.33074 16.223 8.26498 16.1789 8.19257 16.1488C8.12017 16.1187 8.04254 16.1032 7.96413 16.103Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -47,6 +47,7 @@ export const useMainStore = defineStore('main', () => {
return getApi.GetUserInfo().then(res=>{ return getApi.GetUserInfo().then(res=>{
if(res.code == 200){ if(res.code == 200){
storeState.value.userInfo = res.data ?? {} storeState.value.userInfo = res.data ?? {}
storeState.value.hasTrytoLogin = true
uni.setStorage({ uni.setStorage({
key:'userInfo', key:'userInfo',
data:res.data data:res.data

View File

@ -14,7 +14,7 @@
<slot name="icon"> <slot name="icon">
<uv-icon <uv-icon
class="uv-checkbox__icon-wrap__icon" class="uv-checkbox__icon-wrap__icon"
name="checkbox-mark" name="checkmark"
:size="elIconSize" :size="elIconSize"
:color="elIconColor" :color="elIconColor"
/> />

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>