Browse Source

接收模版消息跳转订单详情

master
chenxuhui 7 years ago
parent
commit
9058bacc27
3 changed files with 42 additions and 3 deletions
  1. +1
    -1
      pages/homePage/homePage.js
  2. +30
    -1
      pages/order/detail/detail.js
  3. +11
    -1
      project.config.json

+ 1
- 1
pages/homePage/homePage.js View File

@ -32,7 +32,7 @@ Page({
wx.navigateTo({
url: "../../" + shareURL,
complete: function (res) {
app.globalData.shareInPath = "";
},
})
}


+ 30
- 1
pages/order/detail/detail.js View File

@ -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({


+ 11
- 1
project.config.json View File

@ -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"
}
}
]
}


Loading…
Cancel
Save