From 440e6fbfd4e36a9d78ed67ddafb4f32a90e65969 Mon Sep 17 00:00:00 2001 From: XiaoXinPro 14 IAH5R <568170040@qq.com> Date: Wed, 15 Feb 2023 18:51:29 +0800 Subject: [PATCH] upload --- ext.json | 82 +++++--------------------------------------------- index/index.js | 50 +++++++++++++++--------------- 2 files changed, 33 insertions(+), 99 deletions(-) diff --git a/ext.json b/ext.json index cafdbf6..bd289e8 100644 --- a/ext.json +++ b/ext.json @@ -1,89 +1,21 @@ { "ext": { "attr": { - "car": { - "tjd": { - "payPath": "", - "tjdAppId": "wx6945d1bda68d7993" - }, - "etcp": { - "payPath": "pages/pay/order-pay-open/main", - "etcpAppId": "wxc07f9d67923d676d", - "etcpCallbackUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback" - }, - "bolink": { - "payPath": "pages/park/park", - "bolinkAppId": "wxbd08b4baa10fcc1d" - }, - "version": "release" - }, - "mchId": "1604439800", - "imgProxy": [{ - "newUrl": "https://c.malls.iformall.com/img", - "orgUrl": "https://iformall-net.formall.oss-accelerate.aliyuncs.com" - }, { - "newUrl": "https://c.malls.iformall.com/img1", - "orgUrl": "https://formall.oss-accelerate.aliyuncs.com" - }, { - "newUrl": "https://c.malls.iformall.com/img2", - "orgUrl": "https://wx.qlogo.cn" - }], - "configUrl": "https://c.malls.iformall.com/C/api", - "ifStoreApp": "0", - "ifHaveWebSocket": "0", - "ifHaveCarModular": "0" + "configUrl": "https://ctest.malls.iformall.com/C/api" }, - "name": "吾悦广场", - "weappId": "tt48a23e1fd79d648801", - "appVersion": "C.5.1.1" - }, - "debug": false, - "tabBar": { - "list": [{ - "text": "首页", - "iconPath": "assets/images/home.png", - "pagePath": "index/index", - "selectedIconPath": "assets/images/home-a.png" - }, { - "text": "首页", - "iconPath": "assets/images/home.png", - "pagePath": "pages/theme/index1/index", - "selectedIconPath": "assets/images/home-a.png" - }, { - "text": "门店", - "iconPath": "assets/images/mendian.png", - "pagePath": "index/searchbar", - "selectedIconPath": "assets/images/mendian-a.png" - }, { - "text": "停车", - "iconPath": "assets/images/park.png", - "pagePath": "index/passCar", - "selectedIconPath": "assets/images/park-a.png" - }, { - "text": "我的", - "iconPath": "assets/images/user.png", - "pagePath": "index/user", - "selectedIconPath": "assets/images/user-a.png" - }], - "custom": true + "name": "富茂券券集团版", + "weappId": "tt620e14b3fd30264101" }, "window": { - "backgroundTextStyle": "dark", + "backgroundTextStyle": "light", "navigationBarTextStyle": "black", - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#FFFFFF" + "navigationBarBackgroundColor": "#fff" }, - "extAppid": "tt48a23e1fd79d648801", + "extAppid": "tt620e14b3fd30264101", "extEnable": true, - "permission": { - "scope.userLocation": { - "desc": "你的位置信息将用于小程序位置接口的效果展示" - } - }, "directCommit": false, "networkTimeout": { "request": 30000, "downloadFile": 10000 - }, - "requiredPrivateInfos": ["chooseLocation", "getLocation"] + } } \ No newline at end of file diff --git a/index/index.js b/index/index.js index df9c05d..d8793c6 100644 --- a/index/index.js +++ b/index/index.js @@ -542,34 +542,36 @@ Page({ //获取条形码 // util.barcode("barcode", optionss.quancode, 510, 100); // console.log(Http.headers.token, "?") - + this.getLocation() }, /** * 获得经纬度 */ - // getLocation() { - // let that = this; - // tt.getLocation({ - // type: "wgs84", - // success: function(res) { - // console.log(res, 9999) - // if (res && res.longitude && res.latitude) { - // Http.post({ - // url: config.api.updateLBS, - // data: { - // latitude: res.latitude, - // longitude: res.longitude - // } - // }).then(res => { - // console.log(res, 9999) - // }) - // } - // }, - // fail: error => { - // console.log(error); - // } - // }) - // }, + getLocation() { + let that = this; + tt.getLocation({ + type: "wgs84", + // isHighAccuracy: true, + success: function (res) { + console.log(res, 'getLocation') + if (res && res.longitude && res.latitude) { + Http.post({ + url: config.api.updateLBS, + data: { + latitude: res.latitude, + longitude: res.longitude, + city: res.city + } + }).then(res => { + console.log(res, 9999) + }) + } + }, + fail: error => { + console.log(error); + } + }) + },