From 8ccc896061ab49372c9ac0da5d6b661ecdbb316a Mon Sep 17 00:00:00 2001 From: chenxuhui Date: Sat, 15 Dec 2018 11:21:52 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=80=E5=94=AE=E5=87=BA=E5=BA=93=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=85=AC=E4=BC=97=E5=8F=B7=E6=A8=A1=E7=89=88=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E6=8E=A8=E9=80=81=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outStore/outStoreDetail/outStoreDetail.js | 20 +++++++++++++++++-- project.config.json | 4 ++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/pages/outStore/outStoreDetail/outStoreDetail.js b/pages/outStore/outStoreDetail/outStoreDetail.js index 01812de..fa5c137 100644 --- a/pages/outStore/outStoreDetail/outStoreDetail.js +++ b/pages/outStore/outStoreDetail/outStoreDetail.js @@ -1,5 +1,5 @@ // pages/outStore/outStoreDetail/outStoreDetail.js - +var app = getApp() var network = require("../../../utils/net.js"); Page({ @@ -12,13 +12,29 @@ 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); + } + var that = this; - var detailItemID = parseInt(options.ID); let arrayLast = []; let totalMoney = 0; let method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/SaleOutStoreRpc/GetSaleOutStoreDetail'; let params = [detailItemID]; network.transfer_request(method, params, function (res) { + app.globalData.shareInParameter = {}; var array = res.result; for (var i = 0; i < array.length; i++) { if (array[i].Money) { diff --git a/project.config.json b/project.config.json index cb8db27..7aa231e 100644 --- a/project.config.json +++ b/project.config.json @@ -48,8 +48,8 @@ { "id": 1, "name": "模版消息进入", - "pathName": "pages/order/detail/detail", - "query": "id=97", + "pathName": "pages/outStore/outStoreDetail/outStoreDetail", + "query": "id=60", "scene": "1043", "referrerInfo": { "appId": "wx1a89a89a80318160"