Browse Source

购买完成页面添加转赠按钮

tags/富茂链客4.1.0
刘晖 6 years ago
parent
commit
8c86b80674
3 changed files with 35 additions and 4 deletions
  1. +2
    -2
      config/config.js
  2. +32
    -1
      pages/order/detail/index.js
  3. +1
    -1
      pages/order/detail/index.wxml

+ 2
- 2
config/config.js View File

@@ -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: {
/**


+ 32
- 1
pages/order/detail/index.js View File

@@ -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
})


+ 1
- 1
pages/order/detail/index.wxml View File

@@ -79,5 +79,5 @@
<image src="{{newUrl}}" class='gameimg' mode='widthFix'></image>
</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>

Loading…
Cancel
Save