From 2dd26398e8748af00cdddbd8ca799500bffb048c Mon Sep 17 00:00:00 2001 From: meo <18801474720@163.com> Date: Sun, 27 Jan 2019 21:06:43 +0800 Subject: [PATCH] =?UTF-8?q?[token,=E7=A0=8D=E4=BB=B7][=E4=BF=AE=E6=94=B9]:?= =?UTF-8?q?[token=E5=A4=B1=E6=95=88=EF=BC=8C=E7=A0=8D=E4=BB=B7=EF=BC=8C?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E5=90=8D=E7=A7=B0=E4=BF=AE=E6=94=B9?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 1 + app.json | 7 +- assets/images/home.png | Bin 0 -> 4928 bytes config/config.js | 6 +- pages/bargain/bargain.wxml | 2 +- pages/bargain/bargainDatail/bargainDatail.js | 5 + .../bargain/bargainDatail/bargainDatail.wxml | 3 +- .../bargain/bargainDatail/bargainDatail.wxss | 26 +- pages/index/gameentry/gentry.js | 7 + pages/index/gameentry/gentry.json | 4 +- pages/index/index.js | 506 +++--------------- pages/index/index.json | 13 +- pages/index/index.wxml | 37 -- pages/index/index.wxss | 126 +---- pages/{index => login}/coupons/index.js | 0 pages/{index => login}/coupons/index.json | 0 pages/{index => login}/coupons/index.wxml | 0 pages/{index => login}/coupons/index.wxss | 0 pages/login/gameentry/gentry.js | 59 ++ pages/login/gameentry/gentry.json | 1 + pages/login/gameentry/gentry.wxml | 2 + pages/login/gameentry/gentry.wxss | 1 + pages/login/index.js | 484 ++++++++++++++++- pages/login/index.json | 15 +- pages/login/index.wxml | 43 +- pages/login/index.wxss | 142 ++++- pages/{index => login}/rushToBuy/index.js | 0 pages/{index => login}/rushToBuy/index.json | 0 pages/{index => login}/rushToBuy/index.wxml | 0 pages/{index => login}/rushToBuy/index.wxss | 0 pages/order/detail/index.wxml | 2 +- pages/user/index.wxml | 2 +- project.config.json | 4 +- utils/HttpBasics.js | 31 +- 34 files changed, 825 insertions(+), 704 deletions(-) create mode 100644 assets/images/home.png rename pages/{index => login}/coupons/index.js (100%) rename pages/{index => login}/coupons/index.json (100%) rename pages/{index => login}/coupons/index.wxml (100%) rename pages/{index => login}/coupons/index.wxss (100%) create mode 100644 pages/login/gameentry/gentry.js create mode 100644 pages/login/gameentry/gentry.json create mode 100644 pages/login/gameentry/gentry.wxml create mode 100644 pages/login/gameentry/gentry.wxss rename pages/{index => login}/rushToBuy/index.js (100%) rename pages/{index => login}/rushToBuy/index.json (100%) rename pages/{index => login}/rushToBuy/index.wxml (100%) rename pages/{index => login}/rushToBuy/index.wxss (100%) diff --git a/app.js b/app.js index ce49c6b..1e3b73b 100644 --- a/app.js +++ b/app.js @@ -3,6 +3,7 @@ const Http = require("./utils/HttpBasics"); App({ data: {}, onLaunch: function(options) { + console.log("onUnload ") var that = this; that.globalData.sceneAddress = options.scene; }, diff --git a/app.json b/app.json index ca01d16..ee35fd2 100644 --- a/app.json +++ b/app.json @@ -1,6 +1,7 @@ { "pages": [ "pages/index/index", + "pages/login/index", "pages/bargain/bargainDatail/bargainDatail", "pages/bargain/bargain", "pages/cardorder/index/index", @@ -22,7 +23,6 @@ "pages/order/detail/index", "pages/order/index/index", "pages/success/index", - "pages/login/index", "pages/park/park", "pages/ques/ques", "pages/passCar/passCar", @@ -36,6 +36,7 @@ "pages/payrule/payrule", "pages/grade/grade", "pages/game/index", + "pages/login/gameentry/gentry", "pages/index/gameentry/gentry", "pages/specialcourtesy/specialcourtesy", "pages/discountCardList/discountCardList", @@ -61,7 +62,7 @@ "selectedColor": "#00C0FF", "list": [ { - "pagePath": "pages/index/index", + "pagePath": "pages/login/index", "iconPath": "assets/images/home-n.png", "selectedIconPath": "assets/images/home-y.png", "text": "首页" @@ -83,7 +84,7 @@ "window": { "backgroundTextStyle": "red", "navigationBarBackgroundColor": "#02C0FF", - "navigationBarTitleText": "WeChat", + "navigationBarTitleText": "", "navigationBarTextStyle": "white" }, "networkTimeout": { diff --git a/assets/images/home.png b/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- a/pages/bargain/bargainDatail/bargainDatail.js +++ b/pages/bargain/bargainDatail/bargainDatail.js @@ -51,6 +51,11 @@ Page({ showButton:false }) }, + goback:function(){ + wx.reLaunch({ + url: '/pages/index/index', + }) + }, /** * 更多砍价商品 */ diff --git a/pages/bargain/bargainDatail/bargainDatail.wxml b/pages/bargain/bargainDatail/bargainDatail.wxml index 08c0a41..9756b4d 100644 --- a/pages/bargain/bargainDatail/bargainDatail.wxml +++ b/pages/bargain/bargainDatail/bargainDatail.wxml @@ -58,11 +58,12 @@ + - + diff --git a/pages/bargain/bargainDatail/bargainDatail.wxss b/pages/bargain/bargainDatail/bargainDatail.wxss index 4123b26..d4dd49b 100644 --- a/pages/bargain/bargainDatail/bargainDatail.wxss +++ b/pages/bargain/bargainDatail/bargainDatail.wxss @@ -224,9 +224,31 @@ text-align: center; } .btns .fl{ + width: 250rpx; color: #fff; background:rgba(255,169,2,1); box-shadow:0px 8px 8px 1px rgba(255,169,2,0.32); + margin-left: 22rpx; +} +.goback{ + position: relative; + float: left; + width:122rpx!important; + height:95rpx; + background:rgba(255,255,255,1); + line-height: 95rpx; + border:1rpx solid rgba(227,227,227,1); + box-shadow:0px 8px 8px 1px rgba(189,189,189,0.32); + border-radius:48rpx; +} +.goback image{ + position: absolute; + width: 60rpx; + left: 0; + right: 0; + top: 0; + bottom: 0; + margin: auto; } .btns .fl text{ display: block; @@ -240,6 +262,7 @@ font-size: 30rpx; color: #fff; line-height: 95rpx; + width: 271rpx; background:linear-gradient(90deg,rgba(236,59,45,1) 0%,rgba(248,98,52,1) 100%); box-shadow:0px 8px 8px 1px rgba(246,93,51,0.32); } @@ -285,7 +308,6 @@ padding: 30rpx 0; } .btns01 button{ - color: #fff; color:rgba(254,254,254,1); width:650rpx; height:85rpx; @@ -317,7 +339,7 @@ text-align: center; border: none; } -.status button::after{ border: none; } +button::after{ border: none; } .status button:nth-of-type(1){ background:linear-gradient(90deg,rgba(236,59,45,1) 0%,rgba(248,98,52,1) 100%); border:1px solid rgba(236,59,45,1); diff --git a/pages/index/gameentry/gentry.js b/pages/index/gameentry/gentry.js index bf984d5..a3185cf 100644 --- a/pages/index/gameentry/gentry.js +++ b/pages/index/gameentry/gentry.js @@ -56,4 +56,11 @@ Page({ onReachBottom: function () { }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } }) \ No newline at end of file diff --git a/pages/index/gameentry/gentry.json b/pages/index/gameentry/gentry.json index 9e26dfe..8835af0 100644 --- a/pages/index/gameentry/gentry.json +++ b/pages/index/gameentry/gentry.json @@ -1 +1,3 @@ -{} \ No newline at end of file +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js index 3cb244e..1887fd7 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -1,163 +1,28 @@ - const Http = require("../../utils/HttpBasics"); const imgurl = require("../../utils/imgurl"); const config = require("../../config/config"); const QR = require("../../utils/memberqrcode.js"); let app = getApp(); Page({ + /** + * 页面的初始数据 + */ data: { - newUrl: imgurl.new.url, - icon001: imgurl.icon001.url, - icon002: imgurl.icon002.url, - icon003: imgurl.icon003.url, - icon004: imgurl.icon004.url, - market: app.globalData.market, - list: [], - loading: true, - swiperCurrent: 0, - title: null, - desc: null, - scrollTop: 0, - showGame: false, - gamedata: {}, - couponId: '',//游戏返回时传回的字段 - played: false,//从游戏页面跳回首页返回true - havePlayEd: app.globalData.havePlayEd, - staticGamedata: {}, - showIf: false, - page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 - }, - gotodiscountCardList:function(){ - wx.navigateTo({ - url: '/pages/discountCardList/discountCardList' - }) }, - gotoRushBuy:function(){ - wx.navigateTo({ - url: '/pages/rushToBuy/index', - }) - }, - qrcode: function (e) { - var that = this; - that.setData({ - showQrcode: true - }) + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + let that = this; wx.showToast({ - title: '生成中...', - icon: 'loading', + title: '加载中', + icon: "loading", duration: 2000 - }); - console.log(e) - var st = setTimeout(function () { - wx.hideToast() - var size = that.setCanvasSize(); - var url = JSON.stringify({ - END: "C", - TYPE: "memberCode", - ID: that.data.memberId, - }); - that.createQrCode(url, "mycanvas2", size.w, size.h); - that.setData({ - maskHidden: true - }); - clearTimeout(st); - }, 1000) - }, - hideQrcode: function () { - let that = this; - that.setData({ - showQrcode: false }) - }, - //适配不同屏幕大小的canvas - setCanvasSize: function () { - var size = {}; - try { - var res = wx.getSystemInfoSync(); - var scale = 750 / 500; - //不同屏幕下canvas的适配比例;设计稿是750宽 - var width = res.windowWidth / scale; - var height = width; - //canvas画布为正方形 - size.w = width; - size.h = height; - } catch (e) { - // Do something when catch error - console.log("获取设备信息失败" + e); - } - return size; - }, - createQrCode: function (url, canvasId, cavW, cavH) { - //调用插件中的draw方法,绘制二维码图片 - QR.api.draw(url, canvasId, cavW, cavH); - }, - swiperChange: function (e) { - this.setData({ - swiperCurrent: e.detail.current - }); - }, - gotogame: function () { - let that = this; - Http.post({ - url: config.api.checkPhoneStatus, - data: {} - }) - .then(res => { - var data = { - couponChannelId: "" + that.data.couponChannelId, - couponId: "" + that.data.couponId - }; - if (that.data.couponChannelId == null) { - var data = { - couponId: "" + that.data.couponId - }; - } - wx.navigateTo({ - 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"); - wx.navigateTo({ - url: '/pages/specialcourtesy/specialcourtesy', - }) - }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onLoad: function (options) { - wx.setStorageSync('imgurl', imgurl) - if (options.played == "true") { - this.setData({ - played: true - }) - } - var that = this; + console.log(options); + console.log("----------------------------------options---------------------------------------") + wx.setStorageSync('options', JSON.stringify(options)) + wx.setStorageSync('imgurl', imgurl) if (decodeURIComponent(options.scene) == "undefined") { that.setData({ scene: 0 @@ -168,91 +33,16 @@ Page({ }); } app.getLocation(); - if (options.couponChannelId && options.couponId||options.orderId) { - that.userLogin(options.couponChannelId, options.couponId,options.orderId); + if (options.couponChannelId && options.couponId || options.orderId) { + that.userLogin(options.couponChannelId, options.couponId, options.orderId); } else { that.userLogin() } - Http.get({ - url: config.api.getWeapNote, - data: { - appId: config.weapp.AppId, - } - }) - .then(res => { - let weapNote = JSON.parse(res.data.weapNote); - that.setData({ - desc: weapNote.firstpage.desc, - title: weapNote.firstpage.title - }) - }) - .catch(err => { - wx.showModal({ - title: "提示", - content:err.errMsg, - showCancel:false - }); - }); - }, - onShow: function () { - this.setData({ - havePlayEd: app.globalData.havePlayEd ? app.globalData.havePlayEd : false - }) - let num = wx.getStorageSync('couponNum'); - if (num == 'couponNum') { - wx.showTabBarRedDot({ - index: 2 - }) - }; - }, - // 会员码获取 - getmemberId: function (token){ - let that = this; - Http.get({ - url: config.api.getScore, - data: { - token: token - } - }).then(res => { - console.log(res) - that.setData({ - levelName: res.data.levelName - }) - if (res.data.nickName) { - that.setData({ - ismember: true, - memberId: res.data.id - }) - var size = this.setCanvasSize(); - var initUrl = JSON.stringify({ flagid: res.data.id }); - that.createQrCode(initUrl, "mycanvas1", size.w, size.h); - } - }) - .catch(err => { - wx.showModal({ - title: '提示', - content: err.message, - showCancel: false - }) - }) - }, - /** - * - * @param {code,page} - * 子组件向父组件传值 - */ - onGetCode: function (e) { - this.setData({ - code: e.detail.val, - page: e.detail.pageNum, - }); - console.log(e.detail.val) - console.log(e.detail.pageNum) }, /** * 用户登录 */ - userLogin: function (couponChannelId, couponId,orderId) { + userLogin: function(couponChannelId, couponId, orderId) { var that = this; // 登录 wx.login({ @@ -260,7 +50,7 @@ Page({ code }) => { wx.getSystemInfo({ - success: function (res) { + success: function(res) { that.setData({ systemInfo: JSON.stringify(res) }) @@ -285,246 +75,80 @@ Page({ }; } Http.post({ - url: config.api.login, - data: usrdata - }) + url: config.api.login, + data: usrdata + }) .then(res => { + that.setData({ + showPages: true + }) app.globalData.token = res.data.token; - if (res.data.token){ - that.getGameOne(res.data.token) - that.getStaticGame(res.data.token) - that.getmemberId(res.data.token); - } Http.setToken(res.data.token); - that.checkUserCarStatus(); - that.getUserInfo(); - that.getBannerlist(); - if (app.couponChannelListCallback) { - app.couponChannelListCallback(app.globalData.token); + if(orderId){ + wx.redirectTo({ + url: '/pages/bargain/bargainDatail/bargainDatail?orderId='+orderId, + }) + }else{ + wx.switchTab({ + url: '/pages/login/index', + }) } - if (app.couponListCallback) { - app.couponListCallback(app.globalData.token); - } - if (app.businessListCallback) { - app.businessListCallback(app.globalData.token); - } - that.checkuerstatus(couponChannelId, couponId,orderId); - }) .catch(err => { wx.showToast({ title: err.message, - icon:"none" + icon: "none" }) }); } }); }, - checkuerstatus(couponChannelId, couponId,orderId) { - Http.post({ - url: config.api.checkUserStatus, - data: {} - }) - .then(res => { - if (couponChannelId && couponId) { - wx.navigateTo({ - url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}`, - }) - }else if(orderId){ - wx.navigateTo({ - url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${orderId}&from='${"discount"}`, - }) - } - }) - .catch(err => { - if (err.code == 11004) { - // 用户昵称未授权 - if (couponChannelId && couponId) { - wx.redirectTo({ - url: `/pages/getuserinfo/index?couponChannelId=${couponChannelId}&couponId=${couponId}` - }); - } else if (orderId) { - wx.redirectTo({ - url: `/pages/getuserinfo/index?orderId=${orderId}&from='${"discount"}` - }); - } else { - wx.redirectTo({ - url: '/pages/getuserinfo/index' - }); - } - } - }); - }, - getStaticGame(token) { - let _this = this; - Http.get({ - url: config.api.getGame, - data: { - triggleAction: 2, - token: token - } - }).then(res => { - if (res.data.id) { - _this.setData({ - showIf:true - }) - } - _this.setData({ - staticGamedata: res.data - }) - }) - .catch(err => { - console.log(err) - }) - }, - getGameOne: function (token) { - let _this = this; - Http.get({ - url: config.api.getGame, - data:{ - triggleAction: 1, - token: token - } - }).then(res => { - if (res.data.id) { - _this.setData({ - showGame: true - }) - } - _this.setData({ - gamedata: res.data - }) - }) - .catch(err => { - console.log(err) - }) - }, /** - * banner + * 生命周期函数--监听页面初次渲染完成 */ - getBannerlist: function () { - let that = this; - Http.get({ - url: config.api.bannerlist, - data: { - pageNum: 1, - pageSize: 7 - } - }).then(res => { - that.setData({ - list: res.data.list - }); - }); + onReady: function() { + }, /** - * 检查用户是否有车 + * 生命周期函数--监听页面显示 */ - checkUserCarStatus: function () { - var that = this; - Http.get({ - url: config.api.userCarCount, - data: {} - }).then(res => { - if (res.data > 0) { - // 用户名下有车 - app.globalData.phone = res.data.phone; - app.globalData.supportCar = true; - // 共同登录 - that.userCarLogin(); - } - }); + onShow: function() { + }, + /** - * car共同登录 + * 生命周期函数--监听页面隐藏 */ - userCarLogin: function () { - var that = this; - if (!app.globalData.carLogin) { - // 共同登录 - Http.post({ - url: config.api.carInit, - data: { - phone: app.globalData.phone - } - }).then(res => { - app.globalData.carLogin = true; - app.globalData.parkVendor = res.data.vendor; - if (res.data.token != "undefined") { - app.globalData.etcpToken = res.data.token; - } - }); - } + onHide: function() { + }, + /** - * 获取用户信息 + * 生命周期函数--监听页面卸载 */ - getUserInfo: function () { - // 获取用户信息 - wx.getSetting({ - success: res => { - if (res.authSetting["scope.userInfo"]) { - // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 - wx.getUserInfo({ - success: res => { - // 可以将 res 发送给后台解码出 unionId - } - }); - } - } - }); - }, - gotoBargain:function(){ - wx.navigateTo({ - url: '/pages/bargain/bargain' - }) + onUnload: function() { + }, + /** - * 刷新 - */ - onPullDownRefresh: function (e) { - let that = this; - that.userLogin(); - that.setData({ - page:1 - }) - if (that.data.code == 0 || that.data.code == undefined) { - that.selectComponent("#lists").getList(0, 1, "refresh"); - wx.stopPullDownRefresh(); - } else { - that.selectComponent("#lists").getList(that.data.code, 1, "refresh"); - wx.stopPullDownRefresh(); - }; + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function() { + }, - //加载更多 - onReachBottom: function () { - let that = this; - that.data.page++; - that.setData({ - page: that.data.page - }); - console.log("加载更多页数"+that.data.page); - console.log("加载更多key"+that.data.code); - //父组件获得子组件的方法 - //如果code == 0 - if (that.data.code == 0 || that.data.code == undefined) { - that.selectComponent("#lists").getList(0, that.data.page); - } else { - that.selectComponent("#lists").getList(that.data.code, that.data.page); - } + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + }, - // 用户点击右上角分享 - onShareAppMessage: function () { - return { - title: this.data.title, - desc: this.data.desc, - success: function (res) { - wx.showToast({ - title: "分享成功", - duration: 1000, - icon: "success" - }); - } - }; + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function() { + } -}); \ No newline at end of file +}) \ No newline at end of file diff --git a/pages/index/index.json b/pages/index/index.json index a1eae9a..0475e69 100644 --- a/pages/index/index.json +++ b/pages/index/index.json @@ -1,11 +1,4 @@ { - "usingComponents": { - "c-banner": "../../components/banner/index", - "discount-card": "../../components/discountCard/index", - "c-rushToBuy": "./rushToBuy/index", - "c-coupons": "./coupons/index", - "g-entry": "../../components/gameentry/gentry" - }, - "navigationBarTitleText": "首页", - "enablePullDownRefresh": true -} + "usingComponents": {}, + "navigationBarBackgroundColor": "#fff" +} \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 2b29058..8b13789 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,38 +1 @@ - - - - - - - 限时抢购 - - - - 消费卡 - - - - 砍价专场 - - - - 会员权益 - - - - - - - - - - - - - - {{levelName}} - - diff --git a/pages/index/index.wxss b/pages/index/index.wxss index a82447e..cc09ba5 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -1,124 +1,6 @@ -.index-position { - background: rgba(0, 0, 0, 0.5); - height: 88rpx; - position: absolute; - top: 0; +Page{ + height: 100%; width: 100%; - font-family: PingFangSC-Semibold; - font-size: 30rpx; - color: #fff; - letter-spacing: 0.75rpx; - z-index: 9; - line-height: 88rpx; - overflow: hidden; -} - -page { - width: 100%; - height: auto !important; - overflow-x: hidden; -} - -.txt { - margin-left: 20rpx; -} - -.game-entry { - width: 690rpx; - height: 140rpx; - margin: 57rpx auto 0; -} - -.gameimg { - display: block; - width: 100%; - height: 140rpx; -} - -.section { - padding: 0 20rpx; - display: flex; - justify-content: space-around; - text-align: center; - margin-top: 40rpx; -} - -.section >view image { - display: block; - margin: 0 auto; -} -.section >view image { - width: 80rpx; - height: 80rpx; - margin-bottom: 14rpx; -} -.section text { - height: 23rpx; - font-size: 24rpx; - color: rgba(51, 51, 51, 1); - display: block; - margin-top: 0rpx; -} - -.showQrcode { - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: 1000; - background: rgba(0, 0, 0, 0.6); -} - -.qrcode image { - width: 70rpx; - margin-right: 20rpx; -} - -.showQrcode { - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: 1000; - background: rgba(0, 0, 0, 0.6); -} - -.canvas-box { - position: fixed; - width: 500rpx; - overflow: hidden; - left: 0; - top: 200rpx; - right: 0; - margin: auto; - background: #fff; - border-radius: 16rpx; - z-index:100; - padding-bottom: 30rpx; -} - -.showQrcode text { - display: block; - text-align: center; - font-size: 28rpx; -} - -.button { - width: 414rpx; - text-align: center; - margin: 0 auto; - height: 80rpx; - line-height: 80rpx; - background: rgba(255, 255, 255, 1); - border-radius: 10rpx; - font-size: 32rpx; - color: rgba(2, 192, 255, 1); - overflow: hidden; - margin-top: 38rpx; -} -.memberIds{ - padding-top: 30rpx; - font-size: 30rpx; + background:#fff; + opacity: 0; } \ No newline at end of file diff --git a/pages/index/coupons/index.js b/pages/login/coupons/index.js similarity index 100% rename from pages/index/coupons/index.js rename to pages/login/coupons/index.js diff --git a/pages/index/coupons/index.json b/pages/login/coupons/index.json similarity index 100% rename from pages/index/coupons/index.json rename to pages/login/coupons/index.json diff --git a/pages/index/coupons/index.wxml b/pages/login/coupons/index.wxml similarity index 100% rename from pages/index/coupons/index.wxml rename to pages/login/coupons/index.wxml diff --git a/pages/index/coupons/index.wxss b/pages/login/coupons/index.wxss similarity index 100% rename from pages/index/coupons/index.wxss rename to pages/login/coupons/index.wxss diff --git a/pages/login/gameentry/gentry.js b/pages/login/gameentry/gentry.js new file mode 100644 index 0000000..bf984d5 --- /dev/null +++ b/pages/login/gameentry/gentry.js @@ -0,0 +1,59 @@ +// pages/index/gameentry/gentry.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, +}) \ No newline at end of file diff --git a/pages/login/gameentry/gentry.json b/pages/login/gameentry/gentry.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/pages/login/gameentry/gentry.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/pages/login/gameentry/gentry.wxml b/pages/login/gameentry/gentry.wxml new file mode 100644 index 0000000..ad0a5e7 --- /dev/null +++ b/pages/login/gameentry/gentry.wxml @@ -0,0 +1,2 @@ + +pages/index/gameentry/gentry.wxml diff --git a/pages/login/gameentry/gentry.wxss b/pages/login/gameentry/gentry.wxss new file mode 100644 index 0000000..c729821 --- /dev/null +++ b/pages/login/gameentry/gentry.wxss @@ -0,0 +1 @@ +/* pages/index/gameentry/gentry.wxss */ \ No newline at end of file diff --git a/pages/login/index.js b/pages/login/index.js index 42789dc..9aaf4e4 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -1,30 +1,476 @@ -var config = require("../../config/config.js"); const Http = require("../../utils/HttpBasics"); +const imgurl = require("../../utils/imgurl"); +const config = require("../../config/config"); +const QR = require("../../utils/memberqrcode.js"); +let app = getApp(); Page({ - data: {}, - getPhoneNumber: function(e) { - wx.navigateBack({ - delta: 1 + data: { + newUrl: imgurl.new.url, + icon001: imgurl.icon001.url, + icon002: imgurl.icon002.url, + icon003: imgurl.icon003.url, + icon004: imgurl.icon004.url, + market: app.globalData.market, + list: [], + loading: true, + swiperCurrent: 0, + title: null, + desc: null, + scrollTop: 0, + showGame: false, + gamedata: {}, + couponId: '', //游戏返回时传回的字段 + played: false, //从游戏页面跳回首页返回true + havePlayEd: app.globalData.havePlayEd, + staticGamedata: {}, + showIf: false, + showPages: false, + page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 + }, + gotodiscountCardList: function() { + wx.navigateTo({ + url: '/pages/discountCardList/discountCardList' + }) + }, + gotoRushBuy: function() { + wx.navigateTo({ + url: '/pages/rushToBuy/index', + }) + }, + qrcode: function(e) { + var that = this; + that.setData({ + showQrcode: true + }) + wx.showToast({ + title: '生成中...', + icon: 'loading', + duration: 2000 + }); + console.log(e) + var st = setTimeout(function() { + wx.hideToast() + var size = that.setCanvasSize(); + var url = JSON.stringify({ + END: "C", + TYPE: "memberCode", + ID: that.data.memberId, + }); + that.createQrCode(url, "mycanvas2", size.w, size.h); + that.setData({ + maskHidden: true + }); + clearTimeout(st); + }, 1000) + }, + hideQrcode: function() { + let that = this; + that.setData({ + showQrcode: false + }) + }, + //适配不同屏幕大小的canvas + setCanvasSize: function() { + var size = {}; + try { + var res = wx.getSystemInfoSync(); + var scale = 750 / 500; + //不同屏幕下canvas的适配比例;设计稿是750宽 + var width = res.windowWidth / scale; + var height = width; + //canvas画布为正方形 + size.w = width; + size.h = height; + } catch (e) { + // Do something when catch error + console.log("获取设备信息失败" + e); + } + return size; + }, + createQrCode: function(url, canvasId, cavW, cavH) { + //调用插件中的draw方法,绘制二维码图片 + QR.api.draw(url, canvasId, cavW, cavH); + }, + swiperChange: function(e) { + this.setData({ + swiperCurrent: e.detail.current }); }, - onLoad() { + gotogame: function() { + let that = this; + Http.post({ + url: config.api.checkPhoneStatus, + data: {} + }) + .then(res => { + var data = { + couponChannelId: "" + that.data.couponChannelId, + couponId: "" + that.data.couponId + }; + if (that.data.couponChannelId == null) { + var data = { + couponId: "" + that.data.couponId + }; + } + wx.navigateTo({ + 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"); + wx.navigateTo({ + url: '/pages/specialcourtesy/specialcourtesy', + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onLoad: function(options) { + let that = this; + let optionss = JSON.parse(wx.getStorageSync('options')); + console.log(optionss); + console.log("-------------------------------------------optionssss------------------------------------") + if (options.played == "true") { + that.setData({ + played: true + }) + } + if (optionss.couponChannelId && optionss.couponId || optionss.orderId) { + that.userLogin(optionss.couponChannelId, optionss.couponId, optionss.orderId); + } else { + that.userLogin() + } + }, + onShow: function() { + this.setData({ + havePlayEd: app.globalData.havePlayEd ? app.globalData.havePlayEd : false + }) + let num = wx.getStorageSync('couponNum'); + if (num == 'couponNum') { + wx.showTabBarRedDot({ + index: 2 + }) + }; + }, + // 会员码获取 + getmemberId: function(token) { let that = this; Http.get({ - url: config.api.marketicon, - data: { - appId: config.weapp.AppId - } - }).then(res=>{ + url: config.api.getScore, + data: { + token: token + } + }).then(res => { + console.log(res) that.setData({ - mallImgUrl: res.data.mallImgUrl + levelName: res.data.levelName + }) + if (res.data.nickName) { + that.setData({ + ismember: true, + memberId: res.data.id + }) + var size = this.setCanvasSize(); + var initUrl = JSON.stringify({ + flagid: res.data.id + }); + that.createQrCode(initUrl, "mycanvas1", size.w, size.h); + } + }) + .catch(err => { + wx.showModal({ + title: '提示', + content: err.message, + showCancel: false + }) + }) + }, + /** + * + * @param {code,page} + * 子组件向父组件传值 + */ + onGetCode: function(e) { + this.setData({ + code: e.detail.val, + page: e.detail.pageNum, + }); + console.log(e.detail.val) + console.log(e.detail.pageNum) + }, + /** + * 用户登录 + */ + userLogin: function(couponChannelId, couponId, orderId) { + var that = this; + // 登录 + that.getGameOne(app.globalData.token) + that.getStaticGame(app.globalData.token) + that.getmemberId(app.globalData.token); + that.checkUserCarStatus(); + that.getUserInfo(); + that.getBannerlist(); + if (app.couponChannelListCallback) { + app.couponChannelListCallback(app.globalData.token); + } + if (app.couponListCallback) { + app.couponListCallback(app.globalData.token); + } + if (app.businessListCallback) { + app.businessListCallback(app.globalData.token); + } + that.checkuerstatus(couponChannelId, couponId, orderId); + Http.get({ + url: config.api.getWeapNote, + data: { + appId: config.weapp.AppId, + } + }) + .then(res => { + let weapNote = JSON.parse(res.data.weapNote); + that.setData({ + desc: weapNote.firstpage.desc, + title: weapNote.firstpage.title + }) + }) + .catch(err => { + wx.showModal({ + title: "提示", + content: err.errMsg, + showCancel: false }); - }).catch(err => { - wx.showToast({ - title: err.errMsg, - icon: 'none', - duration: 2000, - mask: false }); + }, + checkuerstatus(couponChannelId, couponId, orderId) { + Http.post({ + url: config.api.checkUserStatus, + data: {} + }) + .then(res => { + if (couponChannelId && couponId) { + wx.navigateTo({ + url: `/pages/coupon/detail/index?couponChannelId=${couponChannelId}&couponId=${couponId}`, + }) + } else if (orderId) { + wx.navigateTo({ + url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${orderId}&from='${"discount"}`, + }) + } + }) + .catch(err => { + if (err.code == 11004) { + // 用户昵称未授权 + if (couponChannelId && couponId) { + wx.redirectTo({ + url: `/pages/getuserinfo/index?couponChannelId=${couponChannelId}&couponId=${couponId}` + }); + } else if (orderId) { + wx.redirectTo({ + url: `/pages/getuserinfo/index?orderId=${orderId}&from='${"discount"}` + }); + } else { + wx.redirectTo({ + url: '/pages/getuserinfo/index' + }); + } + } + }); + }, + getStaticGame(token) { + let _this = this; + Http.get({ + url: config.api.getGame, + data: { + triggleAction: 2, + token: token + } + }).then(res => { + if (res.data.id) { + _this.setData({ + showIf: true + }) + } + _this.setData({ + staticGamedata: res.data + }) + }) + .catch(err => { + console.log(err) + }) + }, + getGameOne: function(token) { + let _this = this; + Http.get({ + url: config.api.getGame, + data: { + triggleAction: 1, + token: token + } + }).then(res => { + if (res.data.id) { + _this.setData({ + showGame: true + }) + } + _this.setData({ + gamedata: res.data + }) + }) + .catch(err => { + console.log(err) + }) + }, + /** + * banner + */ + getBannerlist: function() { + let that = this; + Http.get({ + url: config.api.bannerlist, + data: { + pageNum: 1, + pageSize: 7 + } + }).then(res => { + that.setData({ + list: res.data.list + }); + }); + }, + + /** + * 检查用户是否有车 + */ + checkUserCarStatus: function() { + var that = this; + Http.get({ + url: config.api.userCarCount, + data: {} + }).then(res => { + if (res.data > 0) { + // 用户名下有车 + app.globalData.phone = res.data.phone; + app.globalData.supportCar = true; + // 共同登录 + that.userCarLogin(); + } + }); + }, + /** + * car共同登录 + */ + userCarLogin: function() { + var that = this; + if (!app.globalData.carLogin) { + // 共同登录 + Http.post({ + url: config.api.carInit, + data: { + phone: app.globalData.phone + } + }).then(res => { + app.globalData.carLogin = true; + app.globalData.parkVendor = res.data.vendor; + if (res.data.token != "undefined") { + app.globalData.etcpToken = res.data.token; + } + }); + } + }, + /** + * 获取用户信息 + */ + getUserInfo: function() { + // 获取用户信息 + wx.getSetting({ + success: res => { + if (res.authSetting["scope.userInfo"]) { + // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 + wx.getUserInfo({ + success: res => { + // 可以将 res 发送给后台解码出 unionId + } + }); + } + } + }); + }, + gotoBargain: function() { + wx.navigateTo({ + url: '/pages/bargain/bargain' }) + }, + /** + * 刷新 + */ + onPullDownRefresh: function(e) { + let that = this; + that.userLogin(); + that.setData({ + page: 1 + }) + if (that.data.code == 0 || that.data.code == undefined) { + that.selectComponent("#lists").getList(0, 1, "refresh"); + wx.stopPullDownRefresh(); + } else { + that.selectComponent("#lists").getList(that.data.code, 1, "refresh"); + wx.stopPullDownRefresh(); + }; + }, + //加载更多 + onReachBottom: function() { + let that = this; + that.data.page++; + that.setData({ + page: that.data.page + }); + console.log("加载更多页数" + that.data.page); + console.log("加载更多key" + that.data.code); + //父组件获得子组件的方法 + //如果code == 0 + if (that.data.code == 0 || that.data.code == undefined) { + that.selectComponent("#lists").getList(0, that.data.page); + } else { + that.selectComponent("#lists").getList(that.data.code, that.data.page); + } + }, + // 用户点击右上角分享 + onShareAppMessage: function() { + return { + title: this.data.title, + desc: this.data.desc, + success: function(res) { + wx.showToast({ + title: "分享成功", + duration: 1000, + icon: "success" + }); + } + }; } -}); +}); \ No newline at end of file diff --git a/pages/login/index.json b/pages/login/index.json index ddeacd2..a1eae9a 100644 --- a/pages/login/index.json +++ b/pages/login/index.json @@ -1,6 +1,11 @@ { - "usingComponents": { - "i-button": "../../dist/button/index" - }, - "navigationBarTitleText": "登录" - } \ No newline at end of file + "usingComponents": { + "c-banner": "../../components/banner/index", + "discount-card": "../../components/discountCard/index", + "c-rushToBuy": "./rushToBuy/index", + "c-coupons": "./coupons/index", + "g-entry": "../../components/gameentry/gentry" + }, + "navigationBarTitleText": "首页", + "enablePullDownRefresh": true +} diff --git a/pages/login/index.wxml b/pages/login/index.wxml index 63bb575..eada370 100644 --- a/pages/login/index.wxml +++ b/pages/login/index.wxml @@ -1,9 +1,38 @@ -