Authored by huangyCode

错误页面

... ... @@ -4,6 +4,7 @@
"pages/zeroSell/detail",
"pages/zeroSell/snapshootShare",
"pages/zeroSell/h5Page",
"pages/zeroSell/error",
"pages/bindPhoneNumber/bindPhoneNumber",
"pages/choosecountry/choosecountry",
"login/login-page/login-page"
... ...
... ... @@ -133,11 +133,9 @@ function request(method = 'GET') {
let code = statusCode;
let message = res.errMsg ? res.errMsg : '';
if(statusCode === 503) {
wx.showToast({
title: '目前参与人数过多请下拉刷新',
icon: 'none',
duration: 2000
});
wx.navigateTo({
url: '/pages/zeroSell/error'
})
}
reject({ code, message });
}
... ... @@ -145,13 +143,6 @@ function request(method = 'GET') {
fail: function (err) {
let code = err.code ? err.code : 800;
let message = err.message ? err.message : '';
if(code === 503) {
wx.showToast({
title: '目前参与人数过多请下拉刷新',
icon: 'none',
duration: 2000
});
}
reject({code, message});
}
});
... ... @@ -224,11 +215,9 @@ function request(method = 'GET') {
let code = statusCode;
let message = res.errMsg ? res.errMsg : '';
if(statusCode === 503) {
wx.showToast({
title: '目前参与人数过多请下拉刷新',
icon: 'none',
duration: 2000
});
wx.navigateTo({
url: '/pages/zeroSell/error'
})
}
reject({ code, message });
}
... ... @@ -236,13 +225,6 @@ function request(method = 'GET') {
fail: function (err) {
let code = err.code ? err.code : 800;
let message = err.message ? err.message : '';
if(code === 503){
wx.showToast({
title: '目前参与人数过多请下拉刷新',
icon: 'none',
duration: 2000
});
}
reject({ code, message });
}
});
... ...
... ... @@ -62,7 +62,6 @@ Page(Object.assign({
*/
data: {
tabIdx: '',
show: false,
showAuth: false,
actPrizeId: '',
shareUid: 0,
... ... @@ -358,7 +357,6 @@ Page(Object.assign({
myPrizeCount: r1.code === 200 ? r1.data.myCodeNum : 0,
participantCount,
show: true,
snapData,
notice: JSON.parse(product.notice || '{}'),
lottery: JSON.parse(product.lottery_info || '{}')
... ...
<block wx:if="{{show}}">
<view class="header {{shareFlag || 'mt-header'}}" >
<view class="header {{shareFlag || 'mt-header'}}">
<product-header product="{{product}}" shareFlag="{{shareFlag}}" avatars="{{avatars}}"></product-header>
</view>
<block wx:if="{{false}}">
</view>
<block wx:if="{{false}}">
<counter count="{{participantCount}}" num="{{product.limit}}" status="{{product.status}}"></counter>
<prize-progress step="{{step}}"></prize-progress>
</block>
<view class="machine {{shareFlag ? 'machine-t-m' : 'machine-t-l'}}">
</block>
<view class="machine {{shareFlag ? 'machine-t-m' : 'machine-t-l'}}">
<view class="open-shadow"></view>
<view class="code-list" animation="{{animation}}">
<view class="code-list-item-container">
<view class="code-list-item"><view class="content"></view></view>
<view class="code-list-item">
<view class="content"></view>
</view>
<view class="code-list-item" wx:for="{{codeList}}" wx:if="{{index < 3}}" wx:key="{{index}}">
<view class="content">
<image class="thumb" mode="widthFix" src="{{item.user_thumb}}"></image>
... ... @@ -22,34 +22,37 @@
</view>
<view class="my-code">{{item.prize_code}}</view>
</view>
<image class="shadow" src="https://img11.static.yhbimg.com/yhb-img01/2018/12/27/19/0140fa3243af949068d2aabeedb0ea0666.png" mode="widthFix" wx:if="{{index == 2 && codeList.length>3 }}"></image>
</view>
<image src="./images/down.png" bindtap="goList" data-index="3" mode="widthFix" class="down" wx:if="{{codeList.length>3}}"></image>
<image class="shadow"
src="https://img11.static.yhbimg.com/yhb-img01/2018/12/27/19/0140fa3243af949068d2aabeedb0ea0666.png"
mode="widthFix" wx:if="{{index == 2 && codeList.length>3 }}"></image>
</view>
<image src="./images/down.png" bindtap="goList" data-index="3" mode="widthFix" class="down"
wx:if="{{codeList.length>3}}"></image>
</view>
</view>
<view class="help">
</view>
<view class="help">
<help></help>
</view>
<desc list="{{product.content}}" bind:tapUrl="_jumpBanner" bannerSrc="{{bannerSrc}}" bannerUrl="{{bannerUrl}}"></desc>
</view>
<desc list="{{product.content}}" bind:tapUrl="_jumpBanner" bannerSrc="{{bannerSrc}}" bannerUrl="{{bannerUrl}}"></desc>
<view class="line"></view>
<view class="line"></view>
<more wx:if="{{recommends.length > 0}}">
<more wx:if="{{recommends.length > 0}}">
<block wx:for="{{recommends}}" wx:key="{{index}}">
<view class="product-item">
<product-item product="{{item}}" tab-idx="{{tabIdx - 1}}"></product-item>
</view>
</block>
</more>
</more>
<view class="fellow-bar" wx:if="{{product.status && !shareFlag}}">
<view class="fellow-bar" wx:if="{{product.status && !shareFlag}}">
<fellow-bar notice="{{notice}}"></fellow-bar>
</view>
<group-recommend groupRecommendList="{{groupList}}" bindgoToGroupMiniApp="goToGroupMiniApp">
</group-recommend>
</view>
<group-recommend groupRecommendList="{{groupList}}" bindgoToGroupMiniApp="goToGroupMiniApp">
</group-recommend>
<view class="action-bar">
<view class="action-bar">
<action-bar wx:if="{{isLogin}}" status="{{actionStatus}}" num="{{myPrizeCount}}" share-uid="{{shareUid}}"
act-prize-id="{{actPrizeId}}" bindgetcode="changeActionStatus" bindshare="share"
copyText="{{lottery.miniappCopy}}" text="{{lottery.miniappTip}}"
... ... @@ -71,10 +74,8 @@
</block>
</view>
</block>
</view>
<view class="foot"></view>
</block>
</view>
<view class="foot"></view>
<import src="../../vendors/zanui/actionsheet/index.wxml"/>
<template is="zan-actionsheet" data="{{...actionsheet}}"/>
... ...
Page({
data: {
},
onLoad: function () {
},
back: function () {
wx.navigateBack({
delta: 1
})
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "YO!LUCK"
}
\ No newline at end of file
... ...
<view class="offline-box">
<image class="offline-bg" src="https://cdn.yoho.cn/miniapp/yoluck/404.png" mode="aspectFit"></image>
<view class="slogan">目前参与人数过多请点击刷新</view>
<view class="refresh" bindtap="back">刷新点击</view>
</view>
... ...
.offline-box {
font-size: 32rpx;
width: 100%;
position: fixed;
top: 50%;
text-align: center;
transform: translateY(-50%);
}
.offline-bg {
height: 200px;
width: 200px;
}
.slogan {
margin-top: 80rpx;
}
.refresh {
margin-left: 50%;
transform: translate(-50%);
width: 240rpx;
margin-top: 40rpx;
padding: 20rpx;
border-radius: 4rpx;
background-color: #444;
color: #fff;
}
\ No newline at end of file
... ...
... ... @@ -34,7 +34,7 @@ Page(Object.assign({
}, {
page: 1,
products: []
},{
}, {
page: 1,
products: []
}],
... ... @@ -101,12 +101,9 @@ Page(Object.assign({
this.setData({
tabIndex: Number(options.tabIndex)
})
this._init(options.tabIndex);
} else {
this._init();
}
new app.WeToast();
if(options && (Number(options.reload) !== 0)) {
if (options && (Number(options.reload) !== 0)) {
this._getResouceCode()
}
this._getBottomBanner();
... ... @@ -115,6 +112,11 @@ Page(Object.assign({
onShow() {
let uid = app.globalData.userInfo.uid > 0 ? app.globalData.userInfo.uid : 0;
if (this.data.tabIndex) {
this._init(this.data.tabIndex);
} else {
this._init();
}
this.setData({
hasUnionID: app.globalData.WXUnion_ID !== null && app.globalData.WXUnion_ID !== '' && app.globalData.WXUnion_ID !== undefined ? true : false,
... ... @@ -309,7 +311,7 @@ Page(Object.assign({
let oldData = my_zero_list[type].data;
let key = `my_zero_list[${type}].data`;
let keyPage = `my_zero_list[${type}].page`;
this.service.getMyList({ type, page }).then(res => {
this.service.getMyList({type, page}).then(res => {
let data = []
if (res && res.code === 200) {
data = res.data;
... ... @@ -347,10 +349,10 @@ Page(Object.assign({
this._init();
},
getUserInfo: function(e) {
getUserInfo: function (e) {
var that = this;
if (e.detail.errMsg === 'getUserInfo:ok') {
decodeUnionId(app.getWechatThirdSession(), e, function(response) {
decodeUnionId(app.getWechatThirdSession(), e, function (response) {
if (response.isHaveUnionID) {
that.setData({
hasUnionID: true,
... ... @@ -358,27 +360,28 @@ Page(Object.assign({
}
});
} else {
openAuthorizeSettings(function(response) {
openAuthorizeSettings(function (response) {
if (response.isHaveUnionID) {
that.setData({
hasUnionID: true,
})
};
}
;
});
}
},
getPhoneNumber: function(e) {
getPhoneNumber: function (e) {
var that = this;
if (e.detail.errMsg === 'getPhoneNumber:ok') {
decodePhoneNumber(e.detail.iv, e.detail.encryptedData, '', function(result) {
decodePhoneNumber(e.detail.iv, e.detail.encryptedData, '', function (result) {
// console.log('!!!!result',result)
if (result.code != 200) {
that.wetoast.toast({
title: result.message,
titleClassName: 'wetoast-title',
duration: 1000,
success: function() {
success: function () {
that.loginAndRegisterTapped()
}.bind(that)
});
... ... @@ -386,7 +389,7 @@ Page(Object.assign({
if (result.is_register) {
that.showZanToast({
title: '欢迎加入Yoho!Family!新人礼包已发放到个人中心-优惠券,请注意查收',
success: function() {
success: function () {
let uid = app.globalData.userInfo.uid > 0 ? app.globalData.userInfo.uid : 0;
that.setData({
uid,
... ... @@ -427,13 +430,13 @@ Page(Object.assign({
content: '检测到您未打开微信用户信息授权,开启后即可进行登录',
confirmText: "去开启",
confirmColor: "#000000",
success: function(res) {
success: function (res) {
if (res.confirm) {
wx.openSetting({
success: (res) => {
// console.log(res.authSetting["scope.userInfo"])
if (res.authSetting["scope.userInfo"] !== null && res.authSetting["scope.userInfo"] !== undefined && res.authSetting["scope.userInfo"] === true) {
getUnionID(app.getWechatThirdSession(), function(response) {
getUnionID(app.getWechatThirdSession(), function (response) {
// console.log(response)
})
}
... ... @@ -485,7 +488,7 @@ Page(Object.assign({
},
loginChangeStatus(params) {
let { openType } = params;
let {openType} = params;
this.setData({
openType
})
... ... @@ -513,20 +516,20 @@ Page(Object.assign({
});
},
share({ detail }) {
share({detail}) {
this.setData({
'actionsheet.show': true,
'shareProduct': detail
})
},
handleZanActionsheetCancel({ componentId }) {
handleZanActionsheetCancel({componentId}) {
this.setData({
'actionsheet.show': false
})
},
handleZanActionsheetClick({ componentId, index }) {
handleZanActionsheetClick({componentId, index}) {
this.setData({
'actionsheet.show': false
});
... ... @@ -545,7 +548,8 @@ Page(Object.assign({
product_qrCode: qrcode
});
}
};
}
;
},
onShareAppMessage(res) {
let params = {
... ...