From 9058bacc27d0840a7173e55ac057a8245c80fd05 Mon Sep 17 00:00:00 2001 From: chenxuhui Date: Sat, 15 Dec 2018 10:50:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E6=94=B6=E6=A8=A1=E7=89=88=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E8=B7=B3=E8=BD=AC=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/homePage/homePage.js | 2 +- pages/order/detail/detail.js | 31 ++++++++++++++++++++++++++++++- project.config.json | 12 +++++++++++- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/pages/homePage/homePage.js b/pages/homePage/homePage.js index c3044cd..22cc6ca 100644 --- a/pages/homePage/homePage.js +++ b/pages/homePage/homePage.js @@ -32,7 +32,7 @@ Page({ wx.navigateTo({ url: "../../" + shareURL, complete: function (res) { - + app.globalData.shareInPath = ""; }, }) } diff --git a/pages/order/detail/detail.js b/pages/order/detail/detail.js index 4463812..a65191e 100644 --- a/pages/order/detail/detail.js +++ b/pages/order/detail/detail.js @@ -104,8 +104,37 @@ Page({ }, onLoad: function(options) { + //正常登录流程进入值为0,分享页面直接进入值为1 + if (app.globalData.shareInState == 1) { + return; + } + + if (app.globalData.shareInParameter.id) { + var detailItemID = parseInt(app.globalData.shareInParameter.id); + wx.showModal({ + title: '看下ID值', + content: '+++' + detailItemID + '+++', + }) + // detailItemType = app.globalData.shareInParameter.detailItemType; + } else { + var detailItemID = parseInt(options.ID); + // detailItemType = options.detailItemType; + // var detailItemState = options.detailItemState; + // if (detailItemState == "true") { + // that.setData({ + // showBottomView: true, + // }); + // } else { + // that.setData({ + // showBottomView: false, + // }); + // } + } + var that = this; - network.transfer_request(load, [Number(options.ID)], function(res) { + // Number(options.ID) + network.transfer_request(load, [detailItemID], function(res) { + app.globalData.shareInParameter = {}; res.result.LoadTime = timechage.formatTimeTwo(res.result.LoadTime.substring(6, 19), 'Y-M-D h:m'); console.log(res.result); that.setData({ diff --git a/project.config.json b/project.config.json index 419a3f0..0730f2c 100644 --- a/project.config.json +++ b/project.config.json @@ -30,7 +30,7 @@ "list": [] }, "miniprogram": { - "current": 0, + "current": 1, "list": [ { "id": 0, @@ -38,6 +38,16 @@ "pathName": "pages/login/login", "query": "", "scene": "1011" + }, + { + "id": -1, + "name": "公众号模版消息", + "pathName": "pages/order/detail/detail", + "query": "id=97", + "scene": "1043", + "referrerInfo": { + "appId": "wx0b897783b2588147" + } } ] }