@@ -1,11 +1,11 @@ | |||||
var extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}; | var extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}; | ||||
var appId = extConfig.appId; | var appId = extConfig.appId; | ||||
var config = { | 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://c.malls.iformall.com/C/api", | ||||
// url:'https://ctest.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.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', | // url: 'http://202.165.179.86:4000/C/api', | ||||
api: { | api: { | ||||
/** | /** | ||||
@@ -23,7 +23,8 @@ Page({ | |||||
staticGamedata: {}, | staticGamedata: {}, | ||||
showIf: false, | showIf: false, | ||||
showPage:false, | showPage:false, | ||||
showButton:false | |||||
showButton:false, | |||||
cardDetail:null | |||||
}, | }, | ||||
phone: function (e) { | phone: function (e) { | ||||
@@ -36,6 +37,35 @@ Page({ | |||||
//转赠给微信好友 | //转赠给微信好友 | ||||
goToTranser() { | 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) { | powerDrawer: function (e) { | ||||
let that = this; | let that = this; | ||||
@@ -123,6 +153,7 @@ Page({ | |||||
}) | }) | ||||
.then(res => { | .then(res => { | ||||
if(res.code == 200){ | if(res.code == 200){ | ||||
that.getUserInfo() | |||||
that.setData({ | that.setData({ | ||||
showPage:true | showPage:true | ||||
}) | }) | ||||
@@ -79,5 +79,5 @@ | |||||
<image src="{{newUrl}}" class='gameimg' mode='widthFix'></image> | <image src="{{newUrl}}" class='gameimg' mode='widthFix'></image> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<button type="primary" wx:if="{{order.type == 100}}" class='support-tansfer' bindtap='goToTranser'><image src="{{weixinTitle}}" class='share' mode="widthFix"></image>转赠给微信好友</button> | |||||
<button type="primary" open-type="share" wx:if="{{order.type == 100}}" class='support-tansfer'><image src="{{weixinTitle}}" class='share' mode="widthFix"></image>转赠给微信好友</button> | |||||
</view> | </view> |