Authored by 肖亚东

门票接口更换以及一些问题修改

@import "/pages/newsDetail/template/guangDeps.wxss";
.newsContent {
width: 100%;
background: white;
position: relative;
margin-left: 30rpx;
... ...
<!--pages/zeroSell/components/timeCountDown/time-countdown.wxml-->
<view>
<view class="container">
<image class="background-image" src="{{floorData.topBackgroundImg}}" mode="aspectFill">
<!-- banner -->
... ...
.container {
width: 750rpx;
height: 100%;
}
.background-image {
position: relative;
width: 100%;
... ...
.resource-two-image {
display: flex;
width: 100%;
height: 250rpx;
margin-left: 30rpx;
margin-right: 10rpx;
... ...
... ... @@ -97,7 +97,7 @@ Page({
let that = this;
wx.createSelectorQuery().selectAll(query).boundingClientRect(function (res) {
if(res && !that.data.showFloatView) {
if(res && res[0] && !that.data.showFloatView) {
var floatViewTop = res[0].top / pixelRatio - that.data.alphanetTop - 20;
that.setData({
scrollToView: ap,
... ...
... ... @@ -6,6 +6,13 @@ Page({
},
onLoad: function(options) {
//Do some initialize when page load.
},
onReady: function() {
//Do some when page ready.
},
onShow: function() {
//Do some when page show.
let that = this
wx.getStorage({
key: 'social',
... ... @@ -16,14 +23,6 @@ Page({
}
})
},
onReady: function() {
//Do some when page ready.
},
onShow: function() {
//Do some when page show.
},
onHide: function() {
//Do some when page hide.
... ...
.container {
width: 100%;
width: 750rpx;
height: 100%;
}
.space-view20 {
width: 100%;
height: 20rpx;
}
.middle30 {
width: 100%;
height: 30rpx;
}
.large40 {
width: 100%;
height: 40rpx;
}
.gray {
... ... @@ -17,6 +20,7 @@
}
.news-title {
width: 100%;
height: 134rpx;
display: flex;
align-items: center;
... ...
... ... @@ -6,6 +6,13 @@ Page({
},
onLoad: function(options) {
//Do some initialize when page load.
},
onReady: function() {
//Do some when page ready.
},
onShow: function() {
//Do some when page show.
let that = this
wx.getStorage({
key: 'mars',
... ... @@ -16,14 +23,6 @@ Page({
}
})
},
onReady: function() {
//Do some when page ready.
},
onShow: function() {
//Do some when page show.
},
onHide: function() {
//Do some when page hide.
... ...
... ... @@ -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
... ...
... ... @@ -19,6 +19,10 @@ Page({
*/
onLoad: function (options) {
let hideShareMenu = options.hideShareMenu;
if (hideShareMenu) {
wx.hideShareMenu();
}
if (options && options.scene && options.scene.length > 0) {
let code = options.scene;
getQRCodeSource(code).then(json => {
... ... @@ -110,7 +114,6 @@ Page({
path = '/pages/webview/webview?url=' + url;
}
}
console.log(path);
return {
title: decodeURIComponent(this.data.title),
... ... @@ -157,7 +160,7 @@ Page({
let isSign = true;
if (options.url) {
let queryObj = this.getQueryObj(options.url);
console.log('query=', queryObj);
if (queryObj.title) {
this.setData({
title: queryObj.title
... ... @@ -208,7 +211,7 @@ Page({
let response = sign_body(param, decodeURIComponent(options.url));
let url = response.url;
console.log('response:', response.url, response);
console.log('response:', response);
if (response.signString) {
url = url + "&client_secret=" + response.signString
}
... ...