From dad9b6bacb4a51501691d228a6b17b9068b385b7 Mon Sep 17 00:00:00 2001 From: meo <18801474720@163.com> Date: Sat, 3 Aug 2019 15:22:26 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=B8=B8=E6=88=8F][=E4=BF=AE=E6=94=B9]:[?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B8=B8=E6=88=8F=E4=B8=93=E5=9C=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/main/index.js | 89 ++++++++++++++++++-------------- pages/main/index.wxml | 6 +-- pages/radetail/index.wxml | 1 + pages/spellGroup/spellGroup.wxss | 2 +- 4 files changed, 54 insertions(+), 44 deletions(-) diff --git a/pages/main/index.js b/pages/main/index.js index 0a064f6..00f5a58 100644 --- a/pages/main/index.js +++ b/pages/main/index.js @@ -145,48 +145,57 @@ Page({ }, gotogame: function() { let that = this; - Http.get({ + if (!that.data.showIf){ + wx.showToast({ + title: '暂无游戏频道', + icon:"none", + duration:3000 + }) + }else{ + Http.get({ url: config.api.checkPhoneStatus, data: {} }) - .then(res => { - var data = { - couponChannelId: "" + that.data.couponChannelId, - couponId: "" + that.data.couponId - }; - if (that.data.couponChannelId == null) { + .then(res => { var data = { + couponChannelId: "" + that.data.couponChannelId, couponId: "" + that.data.couponId }; - } - wx.redirectTo({ - url: '/pages/game/index?url=' + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, - }) - }) - .catch(err => { - if (err.code == 11005) { - // 用户手机未授权 - /** - * 将值传到用户手机号授权的页面 - * - */ - wx.redirectTo({ - url: "/pages/getphoneInfo/index?path=index&url=" + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, - }); - } else if (err.code == 11006) { - // 用户手机已加密 + if (that.data.couponChannelId == null) { + var data = { + couponId: "" + that.data.couponId + }; + } wx.redirectTo({ - url: "/pages/phoneinput/phoneinput?path=index&url=" + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, - }); - } else { - wx.showToast({ - title: err.message, - icon: 'none', - duration: 2000, - mask: false - }); - } - }) + url: '/pages/game/index?url=' + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, + }) + }) + .catch(err => { + if (err.code == 11005) { + // 用户手机未授权 + /** + * 将值传到用户手机号授权的页面 + * + */ + wx.redirectTo({ + url: "/pages/getphoneInfo/index?path=index&url=" + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, + }); + } else if (err.code == 11006) { + // 用户手机已加密 + wx.redirectTo({ + url: "/pages/phoneinput/phoneinput?path=index&url=" + that.data.staticGamedata.url + "&id=" + that.data.staticGamedata.id + "&gameId=" + that.data.staticGamedata.gameId, + }); + } else { + wx.showToast({ + title: err.message, + icon: 'none', + duration: 2000, + mask: false + }); + } + }) + } + }, mySpecial: function() { console.log("special"); @@ -305,11 +314,11 @@ Page({ url: '/pages/discountCardList/discountCardList', }) }, - gotoGame: function () { - wx.navigateTo({ - url: '/pages/game/index', - }) - }, + // gotoGame: function () { + // wx.navigateTo({ + // url: '/pages/game/index', + // }) + // }, gotoJfsc: function () { wx.navigateTo({ url: '/pages/integralmall/index', diff --git a/pages/main/index.wxml b/pages/main/index.wxml index abb821a..5e1d092 100644 --- a/pages/main/index.wxml +++ b/pages/main/index.wxml @@ -51,7 +51,7 @@ - 幸运卡牌 + 游戏频道 @@ -91,12 +91,12 @@ - + diff --git a/pages/radetail/index.wxml b/pages/radetail/index.wxml index 5311405..63e6a02 100644 --- a/pages/radetail/index.wxml +++ b/pages/radetail/index.wxml @@ -13,6 +13,7 @@ + 分享 diff --git a/pages/spellGroup/spellGroup.wxss b/pages/spellGroup/spellGroup.wxss index c1b5224..173c923 100644 --- a/pages/spellGroup/spellGroup.wxss +++ b/pages/spellGroup/spellGroup.wxss @@ -289,7 +289,7 @@ image{ .no-data{ width: 690rpx; padding-top: 174rpx; - height: calc(100vh - 160rpx); + height: calc(100vh - 300rpx); background: #fff; margin: 0 auto; border-radius:15rpx;