From 8c86b806741f20261c2abc97ea92784deede9149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=96?= Date: Mon, 18 Feb 2019 18:30:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E5=AE=8C=E6=88=90=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=B7=BB=E5=8A=A0=E8=BD=AC=E8=B5=A0=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.js | 4 ++-- pages/order/detail/index.js | 33 ++++++++++++++++++++++++++++++++- pages/order/detail/index.wxml | 2 +- 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/config/config.js b/config/config.js index 4fde48d..6dce31a 100755 --- a/config/config.js +++ b/config/config.js @@ -1,11 +1,11 @@ var extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}; var appId = extConfig.appId; var config = { - // url: "https://ciformall.youlane.cn/C/api", + url: "https://ciformall.youlane.cn/C/api", // url:"https://c.malls.iformall.com/C/api", // url:'https://ctest.malls.iformall.com/C/api', // url: 'http://10.100.33.70:7000/C/api', - url:'http://10.100.35.202:7000/C/api', + // url:'http://10.100.35.202:7000/C/api', // url: 'http://202.165.179.86:4000/C/api', api: { /** diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js index 4695ac5..241ef39 100644 --- a/pages/order/detail/index.js +++ b/pages/order/detail/index.js @@ -23,7 +23,8 @@ Page({ staticGamedata: {}, showIf: false, showPage:false, - showButton:false + showButton:false, + cardDetail:null }, phone: function (e) { @@ -36,6 +37,35 @@ Page({ //转赠给微信好友 goToTranser() { + }, + getUserInfo: function () { + let that = this; + // 获取用户信息 + Http.get({ + url: config.api.getScore, + data: {} + }) + .then(res => { + console.log(res) + that.setData({ + userName: res.data.nickName, + avatarUrl: res.data.avatarUrl + }) + }) + }, + onShareAppMessage: function (res) { + let _this = this; + return { + title: '领取卡', + path: '/pages/index/index?couponChannelId=' + this.data.order.couponChannelId + '&cuserId=' + this.data.order.cuserId + '&couponId=' + '111' + '&coverImg=' + this.data.order.coverImg + '&userName=' + this.data.userName + '&avatarUrl=' + this.data.avatarUrl + '&couponOrderId=' + this.data.order.couponOrderId, + imageUrl: this.data.order.coverImg, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } }, powerDrawer: function (e) { let that = this; @@ -123,6 +153,7 @@ Page({ }) .then(res => { if(res.code == 200){ + that.getUserInfo() that.setData({ showPage:true }) diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml index 53d175b..28531dc 100644 --- a/pages/order/detail/index.wxml +++ b/pages/order/detail/index.wxml @@ -79,5 +79,5 @@ - + \ No newline at end of file