Commit 2130e576 authored by 彭佳妮(贵阳日报)'s avatar 彭佳妮(贵阳日报)
parents b49a0dae ff9265c3
......@@ -7,16 +7,16 @@
},
"pages": [ // pages 数组中第一项表示应用启动页
{
"path": "pages/shop/shop",
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "店铺首页",
"onReachBottomDistance": 50
"navigationBarTitleText": "小程序平台"
}
},
{
"path": "pages/index/index",
"path": "pages/shop/shop",
"style": {
"navigationBarTitleText": "小程序平台"
"navigationBarTitleText": "店铺首页",
"onReachBottomDistance": 50
}
},
{
......
......@@ -363,8 +363,8 @@ function sgyrddShopPageFn(categoryIds) {
const params = {
current: 1,
size: 15,
lat: currentLatitudeAndLongitude.value.latitude,
lon: currentLatitudeAndLongitude.value.longitude,
lat: '106.68650025025502',
lon: '26.567192352601154',
categoryIds,
distance: 200,
};
......@@ -387,7 +387,11 @@ function sgyrddShopPageFn(categoryIds) {
function getLocationFn() {
xma.getLocation({
type: 'wgs84',
isHighAccuracy: true,
success: function (res) {
// 经纬度
console.log('res.latitude, res.longitude', res.latitude, res.longitude);
const myLatitude = currentLatitudeAndLongitude.value.latitude;
const myLongitude = currentLatitudeAndLongitude.value.longitude;
const distance = getDistance(res.latitude, res.longitude, myLatitude, myLongitude, 1);
......@@ -402,19 +406,16 @@ function getLocationFn() {
* 跳转地图
*/
function openMapApp(info) {
console.log('info', info);
function openMapApp() {
uni.showActionSheet({
itemList: ['高德地图', '百度地图'],
success: (res) => {
const item = {
shopAddress: info.shopAddress,
latitude: info.location.lat,
longitude: info.location.lon,
name: '',
shopAddress: shopInfo.value.shopAddress,
latitude: shopInfo.value.location.lat,
longitude: shopInfo.value.location.lon,
name: shopInfo.value.shopAddress,
};
console.log('item', item);
switch (res.tapIndex) {
case 0:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment