增加配置文件 修改config路径冲突
This commit is contained in:
parent
9c1d98f36f
commit
2c4904c7d4
@ -30,6 +30,13 @@ export function ClientSite() {
|
||||
method: 'get',
|
||||
});
|
||||
},
|
||||
// 获取城市区域
|
||||
GetCityDistrictList: () => {
|
||||
return request.request({
|
||||
url: '/ClientSite/GetCityDistrictList',
|
||||
method: 'get',
|
||||
});
|
||||
},
|
||||
GetSiteStopCarGuideById: (id) => {
|
||||
return request.request({
|
||||
url:`/ClientSite/GetSiteStopCarGuideById?siteId=${id}`,
|
||||
|
||||
20
README.md
20
README.md
@ -1,20 +1,2 @@
|
||||
# Introduction
|
||||
TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.
|
||||
|
||||
# Getting Started
|
||||
TODO: Guide users through getting your code up and running on their own system. In this section you can talk about:
|
||||
1. Installation process
|
||||
2. Software dependencies
|
||||
3. Latest releases
|
||||
4. API references
|
||||
|
||||
# Build and Test
|
||||
TODO: Describe and show how to build your code and run the tests.
|
||||
|
||||
# Contribute
|
||||
TODO: Explain how other users and developers can contribute to make your code better.
|
||||
|
||||
If you want to learn more about creating good readme files then refer the following [guidelines](https://docs.microsoft.com/en-us/azure/devops/repos/git/create-a-readme?view=azure-devops). You can also seek inspiration from the below readme files:
|
||||
- [ASP.NET Core](https://github.com/aspnet/Home)
|
||||
- [Visual Studio Code](https://github.com/Microsoft/vscode)
|
||||
- [Chakra Core](https://github.com/Microsoft/ChakraCore)
|
||||
uniapp 金刚跟顺丰的微服务H5
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, computed } from 'vue'
|
||||
import { projectInfo } from '@/config';
|
||||
import { projectInfo } from '@/config/index.js';
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
|
||||
41
index.html
41
index.html
@ -12,10 +12,45 @@
|
||||
|
||||
<!-- <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" />
|
||||
<script src="https://ucmp-static.sf-express.com/assets/sdks/microservice-1.0.4.min.js"></script>
|
||||
<script src="./config.js"></script>
|
||||
<script>
|
||||
const sf = new SFUIP.SfMicroservice('prod')
|
||||
window.sf = sf
|
||||
function loadScript(url, retry = 3) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const script = document.createElement('script')
|
||||
script.src = url
|
||||
script.async = true
|
||||
|
||||
script.onload = () => {
|
||||
resolve()
|
||||
}
|
||||
|
||||
script.onerror = () => {
|
||||
if (retry > 0) {
|
||||
console.warn('脚本加载失败,重试中...', retry)
|
||||
setTimeout(() => {
|
||||
loadScript(url, retry - 1)
|
||||
.then(resolve)
|
||||
.catch(reject)
|
||||
}, 1000)
|
||||
} else {
|
||||
reject(new Error('脚本加载失败'))
|
||||
}
|
||||
}
|
||||
|
||||
document.head.appendChild(script)
|
||||
})
|
||||
}
|
||||
loadScript(
|
||||
'https://ucmp-static.sf-express.com/assets/sdks/microservice-1.0.4.min.js',
|
||||
3
|
||||
).then(() => {
|
||||
console.log('SDK加载成功')
|
||||
const sf = new SFUIP.SfMicroservice( window?.config?.ENV??'sit')
|
||||
window.sf = sf
|
||||
}).catch(err => {
|
||||
console.error('最终加载失败', err)
|
||||
})
|
||||
|
||||
</script>
|
||||
<script>
|
||||
// // 获取当前路径名
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
import { ref } from 'vue';
|
||||
import { onLoad, onShareAppMessage } from '@dcloudio/uni-app'
|
||||
import { ClientSite } from '/Apis/book.js'
|
||||
import { projectInfo } from '@/config'
|
||||
import { projectInfo } from '@/config/index.js'
|
||||
// import NavBar from '../../components/navBar.vue';
|
||||
|
||||
onLoad((option) => {
|
||||
|
||||
@ -231,6 +231,9 @@
|
||||
<view class="unit mgb10 textRed" v-if="selfDiscount !== 1">
|
||||
优惠: 享受{{ selfDiscount * 100 / 10 }}折优惠
|
||||
</view>
|
||||
<view class="unit mgb10 textRed" v-else>
|
||||
优惠: --
|
||||
</view>
|
||||
<!-- <view class="site textGary mgb10">
|
||||
尺寸: 120cm*100cm*100cm
|
||||
</view> -->
|
||||
@ -260,13 +263,13 @@
|
||||
<view class="title font36 fontb">
|
||||
租赁费用详情
|
||||
</view>
|
||||
<view class="garyBox font28 card textGary">
|
||||
<view class="garyBox font28 card20 textGary">
|
||||
(体积月费 x 租期 + 押金)- 优惠
|
||||
</view>
|
||||
<view class="title2 font32 fontb">
|
||||
<text>租赁体积</text> <text>{{ `${state.selectUnitRow?.volume}m³` }}</text>
|
||||
</view>
|
||||
<view class="garyBox font28 card">
|
||||
<view class="garyBox font28 card20">
|
||||
<view class="textGary mgb20">
|
||||
仓号: {{ state.selectUnitRow?.name }}
|
||||
</view>
|
||||
@ -374,7 +377,6 @@ import { useI18n } from "vue-i18n";
|
||||
import dayjs from 'dayjs';
|
||||
const getOrderApi = useOrderApi();
|
||||
const getAuthApi = authInfoApi();
|
||||
uni.hideTabBar();
|
||||
const getCouponApi = couponApi();
|
||||
const { themeInfo, storeState, getUserInfo } = useMainStore();
|
||||
// 国际化配置
|
||||
@ -451,7 +453,7 @@ const goOrder = async () => {
|
||||
|
||||
if (!state.value.hasVerify) {
|
||||
return uni.showToast({
|
||||
title: '请先验证实名信息',
|
||||
title: '请先验证实名信息!',
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
})
|
||||
@ -459,7 +461,7 @@ const goOrder = async () => {
|
||||
if (!state.value.checked) {
|
||||
openAgreement();
|
||||
return uni.showToast({
|
||||
title: '请勾选协议',
|
||||
title: '请勾选协议!',
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
})
|
||||
@ -741,6 +743,7 @@ const goUnlock = () => {
|
||||
});
|
||||
};
|
||||
const LockerList = ref([]);
|
||||
// 获取仓位
|
||||
const getLockerBySiteId = () => {
|
||||
LockerList.value = [];
|
||||
if (state.value.siteId && state.value.unitTypeId) {
|
||||
@ -752,19 +755,6 @@ const getLockerBySiteId = () => {
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
LockerList.value = res.data;
|
||||
// // 管理员查看动态密码操作
|
||||
// if (storeState.userInfo?.userType == 2) {
|
||||
// // isPlaceOrder == true 排前面 是否可以下单 isLock 是否锁定
|
||||
// LockerList.value.sort((a, b) => {
|
||||
// // 先按照 isPlaceOrder 排序,isPlaceOrder 为 true 的排前面
|
||||
// if (a.isPlaceOrder !== b.isPlaceOrder) {
|
||||
// return a.isPlaceOrder ? -1 : 1;
|
||||
// }
|
||||
// // 再按照 isLock 排序,isLock 为 false 的排前面
|
||||
// return a.isLock === b.isLock ? 0 : a.isLock ? 1 : -1;
|
||||
// });
|
||||
// }
|
||||
// isWaitingAppointment(true);
|
||||
}
|
||||
}).finally(() => {
|
||||
uni.hideLoading()
|
||||
@ -854,15 +844,14 @@ onLoad(async (params) => {
|
||||
getSiteDetail()
|
||||
});
|
||||
|
||||
// getUnitTypeData();
|
||||
});
|
||||
onUnload(() => {
|
||||
uni.$off('homeSiteId');
|
||||
|
||||
})
|
||||
onShow(() => {
|
||||
uni.hideTabBar();
|
||||
getVerifyStatus();
|
||||
// getUnitTypeData();
|
||||
|
||||
});
|
||||
|
||||
@ -975,6 +964,7 @@ const GetLockerAgreementHTMLById = () => {
|
||||
}
|
||||
});
|
||||
};
|
||||
// 获取可用仓型
|
||||
const getUnitTypeBySiteId = () => {
|
||||
// barNameList.value = [];
|
||||
if (state.value.siteId) {
|
||||
@ -1030,17 +1020,6 @@ function changeMove(event) {
|
||||
current.value = event.detail.current;
|
||||
state.value.unitTypeId = unitTypeData.value[current.value].id;
|
||||
}
|
||||
// 获取仓型分类
|
||||
function getUnitTypeData() {
|
||||
uni.showLoading();
|
||||
getApi.GetUnitTypeAll().then((res) => {
|
||||
if (res.code === 200) {
|
||||
unitTypeData.value = res.data;
|
||||
tabs.value = unitTypeData.value.map((item) => item.name);
|
||||
}
|
||||
uni.hideLoading();
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@ -1343,14 +1322,14 @@ function getUnitTypeData() {
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0 40rpx;
|
||||
padding: 8rpx 40rpx;
|
||||
|
||||
li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 40rpx 0;
|
||||
padding: 32rpx 0;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #a8aaac69;
|
||||
border-bottom: 1px solid #a8aaac20;
|
||||
// &:first-child {
|
||||
// padding-top: 0;
|
||||
// }
|
||||
|
||||
@ -57,7 +57,7 @@ import inviteDetail from '@/components/inviteDetail.vue';
|
||||
import MediatorinviteDetail from '@/components/MediatorinviteDetail.vue';
|
||||
|
||||
import { useRecommend } from "@/Apis/recommend.js";
|
||||
import { baseImageUrl, projectInfo, isKingKong,envVersion } from '@/config';
|
||||
import { baseImageUrl, projectInfo, isKingKong,envVersion } from '@/config/index.js';
|
||||
const { themeInfo, storeState, getUserInfo,logOut } = useMainStore();
|
||||
const getLoginApi = useLoginApi();
|
||||
const getApi = useOrderApi();
|
||||
@ -65,7 +65,9 @@ const couponRef = ref();
|
||||
const getRecommendApi = useRecommend();
|
||||
const getAuthApi = authInfoApi();
|
||||
const { t } = useI18n();
|
||||
uni.hideTabBar();
|
||||
onShow(() => {
|
||||
uni.hideTabBar();
|
||||
})
|
||||
|
||||
const goVaild = () => {
|
||||
navigateTo('/pagesb/validationInfo/index');
|
||||
|
||||
@ -195,7 +195,7 @@
|
||||
开门二维码
|
||||
</view>
|
||||
<view class="content">
|
||||
<img alt="加载失败" v-show="ifShow" class="paw" width="100%" height="300rpx" :src="QRCode"></img>
|
||||
<img @click="showImage(QRCode)" alt="加载失败" v-show="ifShow" class="paw" width="100%" height="300rpx" :src="QRCode"></img>
|
||||
<text class="textGray font26">二维码的有效期仅为15分钟</text>
|
||||
</view>
|
||||
<view class="btnBox">
|
||||
@ -259,16 +259,16 @@
|
||||
<view class="bitianBox">续租时长 <view class="bitian">必填</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="garyBox font28 card" @click="showMonthPopup">
|
||||
<view class="garyBox font28 card20" @click="showMonthPopup">
|
||||
<view style="display: flex;align-items: center;">租期时长</view>
|
||||
<view class="select"><text style="margin-right: 10rpx;color: #FB322E;font-weight: bold;">{{
|
||||
state.month
|
||||
}}个月</text> <uv-icon name="arrow-right" color="#000000" size="20"></uv-icon></view>
|
||||
}}个月</text> <uv-icon name="arrow-right" color="#000000" blod size="24rpx"></uv-icon></view>
|
||||
</view>
|
||||
<view class="title2 font32 fontb">
|
||||
<text>租赁体积</text> <text>{{ `${state.lockData?.volume}m³` }}</text>
|
||||
</view>
|
||||
<view class="garyBox garyBoxM font28 card">
|
||||
<view class="garyBox garyBoxM font28 card20">
|
||||
<view class="mgb20">
|
||||
仓号: {{ state.lockData?.name }}
|
||||
</view>
|
||||
@ -343,12 +343,15 @@
|
||||
<view class="list">
|
||||
<view class="left">
|
||||
<view class="volume mgb10" style="display: flex;">
|
||||
自定义租期: <uv-number-box buttonSize="26" v-model="state.selfMonth"
|
||||
自定义租期: <uv-number-box buttonSize="26" integer v-model="state.selfMonth"
|
||||
color="#ffffff" bgColor="#FB322E" :min="1" :max="24" :step="1"
|
||||
iconStyle="color: #fff"></uv-number-box> 个月
|
||||
</view>
|
||||
<view class="unit mgb10" v-if="selfDiscount !== 1">
|
||||
优惠: 享受{{ selfDiscount * 100 / 10 }}折优惠
|
||||
</view>
|
||||
<view class="unit mgb10 textRed" v-else>
|
||||
优惠: --
|
||||
</view>
|
||||
<!-- <view class="site textGary mgb10">
|
||||
尺寸: 120cm*100cm*100cm
|
||||
@ -384,9 +387,12 @@
|
||||
<text class="modal-text">
|
||||
{{ $t("unlock.moveoutTip") }}
|
||||
</text>
|
||||
<text class="textRed mgb10" style="font-size: 26rpx;margin-top: 10rpx;">
|
||||
{{ $t('unlock.uploadTip') }}
|
||||
</text>
|
||||
<view class="upload">
|
||||
<uv-upload :fileList="moveImageList" name="1" :maxCount="10" width="200rpx" height="200rpx" multiple
|
||||
:previewFullImage="false" :uploadText="t('unlock.uploadTip')" @afterRead="afterRead"
|
||||
:previewFullImage="false" uploadText=" " @afterRead="afterRead"
|
||||
@delete="deletePic">
|
||||
</uv-upload>
|
||||
</view>
|
||||
@ -497,6 +503,13 @@ const list = [{
|
||||
name: '待支付'
|
||||
}]
|
||||
|
||||
const showImage = (url) => {
|
||||
if(!url) return;
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
});
|
||||
};
|
||||
|
||||
const copyOrderOn = (item) => {
|
||||
uni.setClipboardData({
|
||||
data: item.orderNo,
|
||||
@ -914,7 +927,6 @@ onShareAppMessage((res) => {
|
||||
return shareParam;
|
||||
});
|
||||
onLoad(() => {
|
||||
uni.hideTabBar()
|
||||
// GetOrderList()
|
||||
|
||||
|
||||
@ -936,6 +948,7 @@ const goVaild = () => {
|
||||
|
||||
const token = ref(uni.getStorageSync('token'))
|
||||
onShow(() => {
|
||||
uni.hideTabBar()
|
||||
token.value = uni.getStorageSync('token')
|
||||
onShowRerequestByIsLogin(() => {
|
||||
GetOrderList();
|
||||
|
||||
11
uni.scss
11
uni.scss
@ -50,6 +50,10 @@ $backgroundColor:
|
||||
margin-bottom: $padding20;
|
||||
width: 100%;
|
||||
}
|
||||
.card20 {
|
||||
@extend .card;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.container{
|
||||
padding: $padding20;
|
||||
width: 100%;
|
||||
@ -93,6 +97,13 @@ $backgroundColor:
|
||||
.mgb10{
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.mgt20{
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.mgt10{
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
/* 行为相关颜色 */
|
||||
$uni-color-primary: #007aff;
|
||||
|
||||
@ -158,10 +158,11 @@ export const h5GoWx =(successCallback, failCallback,completeCallback)=>{
|
||||
cancelText:t("request.cancel"),
|
||||
confirmText:t("request.confirm"),
|
||||
title:t("request.tip"),
|
||||
content:"前往微信小程序下单",
|
||||
content:"前往去登录吗?",
|
||||
success:(e)=>{
|
||||
if(e.confirm){
|
||||
window.location.href = OFFICIAL_URL
|
||||
shunfenLogin()
|
||||
// window.location.href = OFFICIAL_URL
|
||||
}
|
||||
successCallback && successCallback(e)
|
||||
} ,
|
||||
@ -260,7 +261,7 @@ export const shunfenLogin = (code) => {
|
||||
const authOptions = {
|
||||
appId: "202603041358374970", // 第三方接入ID
|
||||
scope: ["sf_userinfo", "sf_mobile", "sf_base", "sf_emp", "sf_channelId"],
|
||||
successUrl: "https://uat.kingkongcang.com/client/", // 当前页面地址
|
||||
successUrl: window?.config?.BACK_URL ?? "https://uat.kingkongcang.com/client/", // 当前页面地址
|
||||
};
|
||||
window.sf.getAuthCode({
|
||||
...authOptions,
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
import { baseUrl,devURL,isWeChatMiniProgram,OFFICIAL_URL,AppId} from '@/config/index.js'
|
||||
import { baseUrl,devURL,isWeChatMiniProgram,OFFICIAL_URL,AppId,isH5} from '@/config/index.js'
|
||||
import { useMainStore } from "@/store/index.js"
|
||||
import { h5GoWx,shunfenLogin } from "@/utils/common";
|
||||
import i18n from '../locale/index';
|
||||
import { isH5 } from '../config';
|
||||
const { t } = i18n.global;
|
||||
|
||||
const messageToIn18n = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user