From a2878e6ee9a05174e281703b8096e402881d8f63 Mon Sep 17 00:00:00 2001 From: chenrx Date: Wed, 5 Jun 2024 16:44:01 +0800 Subject: [PATCH] 20240605 --- pages/signup/index.js | 24 ++++++++++++++++-------- project.private.config.json | 4 ++-- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/pages/signup/index.js b/pages/signup/index.js index c61cb7a..b2c6442 100644 --- a/pages/signup/index.js +++ b/pages/signup/index.js @@ -29,16 +29,23 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad(options) { - var obj = wx.getEnterOptionsSync() - if (obj.query.key) { + var obj = wx.getLaunchOptionsSync() + let query = null; + if (options.scene || obj.query.scene) { + query = options ? decodeURIComponent(options.scene) : decodeURIComponent(obj.query.scene); this.setData({ - qkey: obj.query.key + qkey: query + }) + this.getappUserConf({ + 'key': this.data.qkey + }) + this.isBindMobile() + } else { + wx.navigateTo({ + url: '/pages/signup/status?type=fail&msg=请扫车管家二维码进行签到!', }) } - this.getappUserConf({ - 'key': this.data.qkey - }) - this.isBindMobile() + }, /** @@ -137,7 +144,6 @@ Page({ * 授权地理位置 */ getUserLocation() { - console.log("333") let that = this return new Promise(function (resolve, reject) { if (app.getStorageByKey('u_lat') && app.getStorageByKey('u_lng')) { @@ -174,6 +180,8 @@ Page({ 'lng': this.data.lng.toFixed(11), 'lat': this.data.lat.toFixed(11) } + console.log(this.data.lng) + console.log(this.data.lat) _.apiQuery.postAppSign(params).then(res => { let arr = []; for (const key in res.data) { diff --git a/project.private.config.json b/project.private.config.json index 751e933..265b69b 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -11,9 +11,9 @@ { "name": "pages/signup/index", "pathName": "pages/signup/index", - "query": "key=2juXoYIdOE1HZ4s6lMUtJ", + "query": "scene=fwef5165we", "launchMode": "default", - "scene": null + "scene": 1047 }, { "name": "待跟进客户",