...
|
...
|
@@ -56,7 +56,6 @@ Page({ |
|
|
}.bind(this))
|
|
|
|
|
|
this.fetchTicketInfo();
|
|
|
this.fetchQrCode();
|
|
|
},
|
|
|
onReady: function() {
|
|
|
//Do some when page ready.
|
...
|
...
|
@@ -81,38 +80,23 @@ Page({ |
|
|
let that = this;
|
|
|
let param = {
|
|
|
debug: 'XYZ',
|
|
|
method: "app.SpaceOrders.getQrByUid",
|
|
|
method: "app.SpaceOrders.yohood.ticket.list",
|
|
|
uid: app.getUid()
|
|
|
}
|
|
|
GET(API_HOST, param)
|
|
|
.then((json) => {
|
|
|
if (json && json.code && json.code == 200 && json.data) {
|
|
|
let ticketData = json.data;
|
|
|
let waitPayNum = json.data.waitPayNum;//待支付的订单个数
|
|
|
let ticketData = json.data.ticketsQrs;//门票信息
|
|
|
|
|
|
let cur_undoneTicket = this.data.undoneTicket[0];
|
|
|
if (waitPayNum > 0) {
|
|
|
cur_undoneTicket = this.data.undoneTicket[1];
|
|
|
}
|
|
|
that.setData({
|
|
|
ticketData
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
.catch(error => {
|
|
|
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
|
|
|
fetchQrCode() {
|
|
|
if (app.getUid()) {
|
|
|
let that = this;
|
|
|
let param = {
|
|
|
debug: 'XYZ',
|
|
|
method: "app.invitecode.my",
|
|
|
uid: app.getUid()
|
|
|
}
|
|
|
GET(API_HOST, param)
|
|
|
.then((json) => {
|
|
|
if (json && json.code && json.code == 200 && json.data) {
|
|
|
let qrcodeUrl = json.data.qrcodeUrl;
|
|
|
that.setData({
|
|
|
qrcodeUrl
|
|
|
ticketData,
|
|
|
cur_undoneTicket,
|
|
|
waitPayNum
|
|
|
})
|
|
|
}
|
|
|
})
|
...
|
...
|
@@ -124,8 +108,7 @@ Page({ |
|
|
|
|
|
//点击我的二维码
|
|
|
tapMyQRCode() {
|
|
|
let qrcodeUrl= this.data.qrcodeUrl;
|
|
|
let url = encodeURI('../webview/webview?url=' + qrcodeUrl);
|
|
|
let url = '../webview/webview?url=http://m.yohobuy.com/home/user/qrcode&hideShareMenu=true';
|
|
|
wx.navigateTo({
|
|
|
url,
|
|
|
})
|
...
|
...
|
@@ -146,7 +129,11 @@ Page({ |
|
|
tapButton(e) {
|
|
|
let actionType = e.detail;
|
|
|
if (actionType == ACTION_TYPE.GOBUY) {//去购买
|
|
|
jumpToMiniapp({ app: 'yohobuy', page: 'productDetail', data: {productSkn:'51905732'} })
|
|
|
// jumpToMiniapp({ app: 'yohobuy', page: 'productDetail', data: {productSkn:'51905732'} })
|
|
|
|
|
|
wx.switchTab({
|
|
|
url: '/pages/index/index',
|
|
|
})
|
|
|
|
|
|
} else if (actionType == ACTION_TYPE.CHECKODER) {//查看订单
|
|
|
jumpToMiniapp({ app: 'yohobuy', page: 'myOrders', data: {index:1} })
|
...
|
...
|
@@ -348,6 +335,5 @@ Page({ |
|
|
wx.stopPullDownRefresh();
|
|
|
|
|
|
this.fetchTicketInfo();
|
|
|
this.fetchQrCode();
|
|
|
}
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|