This commit is contained in:
ylj20011123 2025-05-09 19:47:45 +08:00
parent f725e68e0e
commit 698ae3e326
85 changed files with 20154 additions and 330 deletions

View File

@ -171,6 +171,7 @@ export default {
initReady: null, //
},
onLaunch() {
uni.setStorageSync("seatInfo", null);
//
let type = uni.getSystemInfoSync();
// app ()

View File

@ -190,7 +190,7 @@ export default {
background: #ffffff;
border-top: 1px solid #e8e8ea;
box-sizing: border-box;
z-index: 999999;
z-index: 999998;
.content {
width: 100%;

View File

@ -2,8 +2,8 @@
"name" : "驿佳",
"appid" : "__UNI__F870657",
"description" : "",
"versionName" : "1.0.8",
"versionCode" : 108,
"versionName" : "1.0.10",
"versionCode" : 1010,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -52,16 +52,13 @@
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.READ_SMS\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.SEND_SMS\"/>",
"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SMS\"/>",
"<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"
]
},

View File

@ -1,16 +1,9 @@
<template>
<view class="homeMain">
<view
class="minTopBox"
v-if="loginType === 'min'"
:style="{
height: menu.bottom + 8 + 'px',
}"
>
<view
class="topContent"
:style="{ paddingTop: menu.top + 'px', height: menu.height + 'px' }"
>
<view class="minTopBox" v-if="loginType === 'min'" :style="{
height: menu.bottom + 8 + 'px',
}">
<view class="topContent" :style="{ paddingTop: menu.top + 'px', height: menu.height + 'px' }">
<image class="fixedIcon" src="/static/home/newFixed.svg" />
<view class="selectServiceBox" @click="handleGoServiceList(1)">
<span class="serviceName">{{
@ -25,13 +18,9 @@
</view>
</view>
</view>
<view
class="appTopBox"
v-else
:style="{
height: menu.top + 50 + 'px',
}"
>
<view class="appTopBox" v-else :style="{
height: menu.top + 50 + 'px',
}">
<view class="topContent" :style="{ paddingTop: menu.top + 'px' }">
<image class="fixedIcon" src="/static/home/newFixed.svg" />
<view class="selectServiceBox" @click="handleGoServiceList(1)">
@ -50,22 +39,14 @@
<view class="newContent">
<view class="topBanner">
<image
class="bannerImg"
src="https://eshangtech.com/wanmeiyizhanImg/home/wanmeiyizhanNewIndex.png"
/>
<image class="bannerImg" src="https://eshangtech.com/wanmeiyizhanImg/home/wanmeiyizhanNewIndex.png" />
</view>
<view style="box-sizing: border-box; padding: 0 32rpx">
<!-- :style="{ marginTop: menu.bottom + 8 + 'px' }" -->
<view class="funBox">
<view
class="funItem"
v-for="(item, index) in funList"
:key="index"
:style="{ marginBottom: index <= 3 ? '32rpx' : '' }"
@click="handleGoFun(item)"
>
<view class="funItem" v-for="(item, index) in funList" :key="index"
:style="{ marginBottom: index <= 3 ? '32rpx' : '' }" @click="handleGoFun(item)">
<image class="funItemIcon" :src="item.src" />
<span class="funItemText">{{ item.label || "" }}</span>
</view>
@ -73,49 +54,24 @@
<scroll-view :scroll-x="true" class="tabBox">
<view class="tabList">
<view
class="tabItem"
v-for="(item, index) in tabList"
:key="index"
@click="handleChangeTab(item)"
>
<view
:class="
selectTab === item.value ? 'title selectTitle' : 'title'
"
>{{ item.label || "" }}
<view class="tabItem" v-for="(item, index) in tabList" :key="index" @click="handleChangeTab(item)">
<view :class="selectTab === item.value ? 'title selectTitle' : 'title'
">{{ item.label || "" }}
</view>
<view
:class="selectTab === item.value ? 'desc selectDesc' : 'desc'"
>{{ item.desc || "" }}
<view :class="selectTab === item.value ? 'desc selectDesc' : 'desc'">{{ item.desc || "" }}
</view>
</view>
</view>
</scroll-view>
<view
v-if="chaegeBoxList && chaegeBoxList.length > 0"
style="background-color: #fff; margin-top: 24rpx"
>
<ChargeBox
:showType="'horizontal'"
:serviceAreaList="chaegeBoxList"
pageType="scanCode"
:showStore="true"
:comeForm="'home'"
:showPadding="true"
/>
<view v-if="chaegeBoxList && chaegeBoxList.length > 0" style="background-color: #fff; margin-top: 24rpx">
<ChargeBox :showType="'horizontal'" :serviceAreaList="chaegeBoxList" pageType="scanCode" :showStore="true"
:comeForm="'home'" :showPadding="true" />
</view>
<view class="carouselBox" @click="handleGoDiscovery" v-if="showBanner">
<swiper
class="swiperBox"
scroll-x="true"
autoplay="true"
circular="true"
@change="swiperChange($event, 'currentBan')"
:current="currentBan"
>
<swiper class="swiperBox" scroll-x="true" autoplay="true" circular="true" interval="3000"
@change="swiperChange($event, 'currentBan')" :current="currentBan">
<swiper-item v-for="(image, i) in bannerList" :key="i">
<image class="swiperImg" :src="image"></image>
</swiper-item>
@ -138,20 +94,11 @@
<scroll-view :scroll-x="true" class="foodContent">
<view class="foodList">
<view
class="foodItemNew"
v-for="(item, index) in foodList"
:key="index"
@click="handleGoFoodShop(item)"
>
<view class="foodItemNew" v-for="(item, index) in foodList" :key="index" @click="handleGoFoodShop(item)">
<view class="shopName">{{ item.MERCHANTS_NAME || "" }}</view>
<!-- <view class="foodSrc" :style="{ backgroundImage: `url(${item.IMAGE_URL})` }"></view> -->
<view class="foodSrcBox">
<image
class="foodSrc"
lazy-load="true"
:src="item.IMAGE_URL"
/>
<image class="foodSrc" lazy-load="true" :src="item.IMAGE_URL" />
<!-- mode="aspectFit" -->
</view>
@ -197,19 +144,11 @@
<scroll-view :scroll-x="true" class="foodContent">
<view class="foodList">
<!-- AllProductsList -->
<view
class="foodItemNew"
v-for="(item, index) in AllProductsList"
:key="index"
@click="handleGoFoodShop(item)"
>
<view class="foodItemNew" v-for="(item, index) in mallList" :key="index" @click="goMall(item)">
<!-- @click="handleGoFoodShop(item)" -->
<!-- <view class="foodSrc" :style="{ backgroundImage: `url(${item.IMAGE_URL})` }"></view> -->
<view class="foodSrcBox">
<image
class="foodSrc"
lazy-load="true"
:src="item.IMAGE_URL"
/>
<image class="foodSrc" lazy-load="true" :src="item.IMAGE_URL" />
<!-- mode="aspectFit" -->
</view>
@ -220,7 +159,7 @@
<view class="priceLeft">
<span class="price">
<span class="priceUnit"></span>
{{ item.COMMODITY_RETAILPRICE }}
{{ item.COMMODITY_MEMBERPRICE }}
</span>
<!-- <span class="priceOld">20.5</span> -->
</view>
@ -249,12 +188,27 @@
</view>
</view> -->
</view>
<view class="bigPopupBox" v-if="isShowPrivacyPopup">
<view class="privacyPopupBox">
<view class="contentTitle">用户隐私保护政策确认</view>
<view class="contentWord">
感谢您使用本产品您使用本产品前应当仔细阅读并同意<text class="tips" @click="handleOpenPrivacyContract">驿达隐私保护指引</text>
当您点击同意并开始使用产品服务时即表示您已理解并同意该条款内容该条款将对您产生法律约束如您拒绝将无法更好的体验产品
</view>
<view class="btnList">
<button class="btns noAgree" @click="handleRefuse">拒绝</button>
<button class="btns agree" id="agree-btn3" open-type="agreePrivacyAuthorization"
@click="handleAgreePrivacyAuthorization">
同意
</button>
</view>
</view>
</view>
<tabbar :page="'/pages/home/newIndex'" />
<CustomLoading
:visible="isLoading"
v-if="isLoading"
@update:visible="(val) => (isLoading = val)"
/>
<CustomLoading :visible="isLoading" v-if="isLoading" @update:visible="(val) => (isLoading = val)" />
</view>
</template>
@ -267,6 +221,7 @@ import {
handleGetUserPointInfo,
handleGetNearThreeService,
} from "../../utils/publicMethods";
import { duration } from "moment";
export default {
components: { tabbar, CustomLoading, ChargeBox },
@ -313,6 +268,8 @@ export default {
foodList: [], //
AllProductsList: [], //
showBanner: false,
isShowPrivacyPopup: false,
mallList: []
};
},
computed: {
@ -335,7 +292,22 @@ export default {
} else {
this.menu = systemInfo.safeArea;
}
await this.handleOnLoad();
if (type === 'android') {
const hasAgreed = uni.getStorageSync('hasAgreedToPrivacyPolicy');
console.log('hasAgreed', hasAgreed);
if (!hasAgreed) {
//
this.showPrivacyPopup();
} else {
// SDK
await this.handleOnLoad();
}
} else {
await this.handleOnLoad();
}
},
async onShow() {
this.showBanner = true;
@ -401,6 +373,41 @@ export default {
setInvitedCode: "setInvitedCode",
setOwnerUnitId: "setOwnerUnitId",
}),
goMall(item) {
if (!this.user.MEMBERSHIP_ID) {
uni.showModal({
title: "温馨提示",
content: "请您授权登录后再操作。",
success(res) {
if (res.confirm) {
uni.redirectTo({ url: "/pages/register/index" });
}
},
});
return;
}
if (this.user.MEMBERSHIP_MOBILEPHONE) {
uni.navigateTo({
url: "/pages/product/productDetail/index?id=" + item.ITEM_ID,
});
} else {
this.isLogin = true;
}
},
handleRefuse() {
this.isShowPrivacyPopup = false
},
async handleAgreePrivacyAuthorization() {
this.isShowPrivacyPopup = false
uni.setStorageSync("hasAgreedToPrivacyPolicy", true);
await this.handleOnLoad();
await this.handleOnShowUpdate(this.serverPart)
},
//
showPrivacyPopup() {
this.isShowPrivacyPopup = true
},
// onshow
async handleOnShowUpdate(currentService) {
this.isLoading = true;
@ -480,14 +487,36 @@ export default {
this.nearPart = serviceInfo.currentService;
this.serverPart = serviceInfo.currentService;
// this.chaegeBoxList = [serviceInfo.nearThreeList[0]]
if (this.chaegeBoxList && this.chaegeBoxList.length > 0) {
} else {
this.chaegeBoxList = [serviceInfo.nearThreeList[0]]
}
console.log("this.serverPart", this.serverPart);
//
await this.handleGetCurrentService();
await this.getMall()
this.handleDistributeCoupons(serviceInfo.nearThreeList[0])
this.isLoading = false;
this.$forceUpdate();
},
//
async handleDistributeCoupons(name) {
console.log('handleDistributeCouponshandleDistributeCouponshandleDistributeCoupons', name);
const req = {
serverpartName: name
}
const data = await this.$api.$javaGet2("/third-party/sendCoupon", req);
if (data.Result_Data === '领取成功!') {
uni.showToast({
title: '已为你领取优惠券,请到券包查看!',
icon: "none",
duration: 5000
})
}
},
//
async handleGetCurrentService() {
// const data = await this.$api.getCoop({
@ -539,6 +568,34 @@ export default {
}
this.foodList = shopList;
this.AllProductsList = productsList;
console.log('this.AllProductsList', this.AllProductsList);
},
async getMall() {
let _this = this;
console.log("_this.serverPart", _this.serverPart);
const data = await _this.$api
.getCoop({
action_type: "GetRcmContent",
rcmtagKey: "HOME_MALL",
serverpartId: _this.serverPart.ServerPart_Id,
provinceCode: _this.provinceCode || "340000",
showThird: 0,
})
if (data.ResultCode === "100") {
let list = data.Data.List
let res = []
if (list && list.length > 0) {
list.forEach((item) => {
if (item.RCMCONTENT_INDEX <= 9) {
res.push(item)
}
})
}
_this.mallList = res;
console.log("_this.mallList", _this.mallList);
}
},
//
handleGoFoodOrder() {
@ -1161,6 +1218,7 @@ export default {
box-shadow: 0rpx 0rpx 5rpx 0rpx rgba(0, 0, 0, 0.1);
border-radius: 16rpx;
margin-right: 16rpx;
.shopName {
font-family: "PingFang SC";
font-weight: 500;
@ -1180,6 +1238,7 @@ export default {
height: 218rpx;
border-radius: 12rpx;
overflow: hidden;
.foodSrc {
width: 100%;
height: 100%;
@ -1188,6 +1247,7 @@ export default {
.foodDetail {
margin-top: 20rpx;
.foodName {
font-family: "PingFang SC";
font-weight: 500;
@ -1200,11 +1260,13 @@ export default {
overflow: hidden;
text-overflow: ellipsis;
}
.priceBox {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.priceLeft {
.price {
font-family: "PingFang SC";
@ -1212,6 +1274,7 @@ export default {
font-size: 30rpx;
color: #ff6800;
line-height: 30rpx;
.priceUnit {
font-family: "PingFang SC";
font-weight: 500;
@ -1427,6 +1490,7 @@ export default {
box-shadow: 0rpx 0rpx 5rpx 0rpx rgba(0, 0, 0, 0.1);
border-radius: 16rpx;
margin-right: 16rpx;
.shopName {
font-family: "PingFang SC";
font-weight: 500;
@ -1446,6 +1510,7 @@ export default {
height: 218rpx;
border-radius: 12rpx;
overflow: hidden;
.foodSrc {
width: 100%;
height: 100%;
@ -1454,6 +1519,7 @@ export default {
.foodDetail {
margin-top: 20rpx;
.foodName {
font-family: "PingFang SC";
font-weight: 500;
@ -1466,11 +1532,13 @@ export default {
overflow: hidden;
text-overflow: ellipsis;
}
.priceBox {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.priceLeft {
.price {
font-family: "PingFang SC";
@ -1478,6 +1546,7 @@ export default {
font-size: 30rpx;
color: #ff6800;
line-height: 30rpx;
.priceUnit {
font-family: "PingFang SC";
font-weight: 500;
@ -1543,5 +1612,80 @@ export default {
}
}
}
.bigPopupBox {
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.6);
z-index: 999999;
position: fixed;
bottom: 0;
left: 0;
.privacyPopupBox {
width: 100%;
height: 300px;
border-top-left-radius: 64rpx;
border-top-right-radius: 64rpx;
background-color: #fff;
box-sizing: border-box;
padding: 32rpx;
z-index: 999999;
position: fixed;
bottom: 0;
left: 0;
.contentTitle {
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 36rpx;
color: #130f05;
line-height: 52rpx;
text-align: left;
font-style: normal;
text-align: center;
}
.contentWord {
margin-top: 32rpx;
text-indent: 2em;
.tips {
font-size: 28rpx;
font-family: Source Han Sans CN-Normal, Source Han Sans CN;
font-weight: 400;
color: #8bc21f;
line-height: 33rpx;
}
}
.btnList {
display: flex;
justify-content: space-evenly;
align-items: center;
margin-top: 48rpx;
.btns {
display: inline-block;
padding: 0 90rpx;
border-radius: 15rpx;
}
.noAgree {
background: rgb(242, 242, 242);
color: rgb(26, 187, 107);
font-weight: 600;
}
.agree {
background: rgb(26, 187, 107);
color: #fff;
font-weight: 600;
}
}
}
}
}
</style>

View File

@ -1162,6 +1162,7 @@ export default {
},
goDetail(item) {
console.log('item',item)
if (item.takeState) {
uni.showToast({
title: "请勿重复领取!",

View File

@ -1,3 +1,3 @@
iosProfile=C:/Users/YSKJ01/Desktop/自己搞得驿达内容/mobileprovision.mobileprovision
ioscertFile=C:/Users/YSKJ01/Desktop/自己搞得驿达内容/证书.p12
iosProfile=C:/Users/YSKJ01/Desktop/自己搞得驿达内容/distribution.mobileprovision
ioscertFile=C:/Users/YSKJ01/Desktop/自己搞得驿达内容/distribution.p12
ioscertPassword=IIlQ8W9TleLFMuQMP+DDUg==

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -304,6 +304,7 @@ var _default = {
initReady: null // 用于页面等待初始化完成
},
onLaunch: function onLaunch() {
uni.setStorageSync("seatInfo", null);
// 这里是拿到 用户的手机信息
var type = uni.getSystemInfoSync();
// 拿到这是第几次 进入到小程序 或者 app (用于权限的询问)

View File

@ -243,6 +243,7 @@
/*每个页面公共css */

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
{
"component": true,
"usingComponents": {}
"usingComponents": {},
"component": true
}

View File

@ -1,4 +1,4 @@
{
"component": true,
"usingComponents": {}
"usingComponents": {},
"component": true
}

View File

@ -1,4 +1,4 @@
{
"component": true,
"usingComponents": {}
"usingComponents": {},
"component": true
}

View File

@ -731,6 +731,7 @@ var _default = {
});
},
goDetail: function goDetail(item) {
console.log('item', item);
if (item.takeState) {
uni.showToast({
title: "请勿重复领取!",

View File

@ -1,5 +1,9 @@
{
"description": "项目配置文件。",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"urlCheck": false,
"es6": false,
@ -7,19 +11,17 @@
"minified": false,
"newFeature": true,
"bigPackageSizeSupport": true,
"ignoreUploadUnusedFiles": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"coverView": false,
"enhance": false,
"showShadowRootInWxmlPanel": false,
"packNpmRelationList": [],
"ignoreUploadUnusedFiles": true
}
},
"compileType": "miniprogram",
"libVersion": "3.8.1",
"appid": "wx4c497eddcec4a0e7",
"projectname": "驿佳",
"condition": {
"search": {
"current": -1,
@ -41,10 +43,5 @@
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
},
"libVersion": "3.8.1",
"packOptions": {
"ignore": [],
"include": []
}
}

View File

@ -7,10 +7,17 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/couponDetail/index",
"pathName": "pages/couponDetail/index",
"query": "id=352",
"launchMode": "default",
"scene": null
},
{
"name": "pages/serviceDetail/index",
"pathName": "pages/serviceDetail/index",
"query": "id=418&come=chargeBox",
"pathName": "pages/couponDetail/index",
"query": "",
"launchMode": "default",
"scene": null
},

View File

@ -76,6 +76,8 @@ async function handleGetPosition() {
};
resolve(seatInfo);
} catch (err) {
console.log('err', err);
reject(err);
}
}
@ -164,46 +166,66 @@ export async function handleGetIOSPosition() {
return new Promise(async (resolve, reject) => {
const data = permision.judgeIosPermission("location")
let locationFirst = uni.getStorageSync("locationFirst");
// let locationFirst = uni.getStorageSync("locationFirst");
if (data) {
if (locationFirst) {
const locationRes = await uni.getLocation({
type: "gcj02",
altitude: true,
isHighAccuracy: true,
});
const seatInfo = {
latitude: locationRes.latitude,
longitude: locationRes.longitude,
};
resolve(seatInfo);
} else {
uni.showModal({
title: `是否允许"驿佳"使用你的位置?`,
content: "驿达APP需要获取您的位置信息用于后台为您持续提供附近服务区的相关服务。",
success: async function (modalRes) {
if (modalRes.confirm) {
uni.setStorageSync("locationFirst", true);
const locationRes = await uni.getLocation({
type: "gcj02",
altitude: true,
isHighAccuracy: true,
});
const seatInfo = {
latitude: locationRes.latitude,
longitude: locationRes.longitude,
};
resolve(seatInfo);
}
},
});
}
const locationRes = await uni.getLocation({
type: "gcj02",
altitude: true,
isHighAccuracy: true,
});
const seatInfo = {
latitude: locationRes.latitude,
longitude: locationRes.longitude,
};
resolve(seatInfo);
} else {
const locationRes = await uni.getLocation({
type: "gcj02",
altitude: true,
isHighAccuracy: true,
});
const seatInfo = {
latitude: locationRes.latitude,
longitude: locationRes.longitude,
};
resolve(seatInfo);
}
// if (data) {
// if (locationFirst) {
// const locationRes = await uni.getLocation({
// type: "gcj02",
// altitude: true,
// isHighAccuracy: true,
// });
// const seatInfo = {
// latitude: locationRes.latitude,
// longitude: locationRes.longitude,
// };
// resolve(seatInfo);
// } else {
// uni.showModal({
// title: `是否允许"驿佳"使用你的位置?`,
// content: "驿达APP需要获取您的位置信息用于后台为您持续提供附近服务区的相关服务。",
// success: async function (modalRes) {
// if (modalRes.confirm) {
// uni.setStorageSync("locationFirst", true);
// const locationRes = await uni.getLocation({
// type: "gcj02",
// altitude: true,
// isHighAccuracy: true,
// });
// const seatInfo = {
// latitude: locationRes.latitude,
// longitude: locationRes.longitude,
// };
// resolve(seatInfo);
// }
// },
// });
// }
// }
})
}
@ -499,7 +521,7 @@ export async function handleGetNearService(_this, longitude, latitude) {
// );
const res = await api.$javaGet2('/third-party/getServerPartList', req)
let _data = data.Result_Data.List;
let obj = handleChangeServiceInfo(_data[0]);
console.log('publicMethods', obj);