diff --git a/app.json b/app.json index 146f98e..8faae3a 100644 --- a/app.json +++ b/app.json @@ -70,8 +70,6 @@ } }, "tabBar": { - "color": "#abb1be", - "selectedColor": "#FD782D", "custom": true, "list": [ { diff --git a/components/navbar/navbar.js b/components/navbar/navbar.js index 48f045a..7c3c2b6 100644 --- a/components/navbar/navbar.js +++ b/components/navbar/navbar.js @@ -32,7 +32,7 @@ Component({ methods: { backHome: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, back: function () { diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index a685d1b..6823f96 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -1,3 +1,5 @@ +const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} +let ifStoreApp = extConfig.attr.ifStoreApp; Component({ data: { selected: 0, @@ -31,6 +33,24 @@ Component({ ] }, attached() { + if (ifStoreApp==1){ + this.setData({ + list: [ + { + "pagePath": "/index/index", + "iconPath": "../assets/images/home.png", + "selectedIconPath": "../assets/images/home-a.png", + "text": "首页" + }, + { + "pagePath": "/index/user", + "iconPath": "../assets/images/user.png", + "selectedIconPath": "../assets/images/user-a.png", + "text": "我的" + } + ] + }) + } }, methods: { switchTab(e) { diff --git a/ext.json b/ext.json index 0715a81..c01d81f 100644 --- a/ext.json +++ b/ext.json @@ -30,34 +30,33 @@ }, "debug": false, "tabBar": { + "custom": true, "list": [ { - "text": "首页", + "pagePath": "index/index", "iconPath": "assets/images/home.png", - "pagePath": "pages/main/index", - "selectedIconPath": "assets/images/home-a.png" + "selectedIconPath": "assets/images/home-a.png", + "text": "首页" }, { - "text": "门店", + "pagePath": "index/searchbar", "iconPath": "assets/images/mendian.png", - "pagePath": "pages/index/searchbar/index", - "selectedIconPath": "assets/images/mendian-a.png" + "selectedIconPath": "assets/images/mendian-a.png", + "text": "门店" }, { - "text": "停车", + "pagePath": "index/passCar", "iconPath": "assets/images/park.png", - "pagePath": "pages/passCar/passCar", - "selectedIconPath": "assets/images/park-a.png" + "selectedIconPath": "assets/images/park-a.png", + "text": "停车" }, { - "text": "我的", + "pagePath": "index/user", "iconPath": "assets/images/user.png", - "pagePath": "pages/user/index", - "selectedIconPath": "assets/images/user-a.png" + "selectedIconPath": "assets/images/user-a.png", + "text": "我的" } - ], - "color": "#abb1be", - "selectedColor": "#FD782D" + ] }, "window": { "backgroundTextStyle": "dark", diff --git a/index/index.js b/index/index.js index 35a883d..214dfac 100644 --- a/index/index.js +++ b/index/index.js @@ -1,12 +1,654 @@ -Component({ - pageLifetimes: { - show() { - if (typeof this.getTabBar === 'function' && - this.getTabBar()) { - this.getTabBar().setData({ - selected: 0 +const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} +let ifStoreApp = extConfig.attr.ifStoreApp; +const navigationBarHeight = (getApp().statusBarHeight + 60) + 'px' +const Http = require("../utils/HttpBasics"); +const imgurl = require("../utils/imgurl"); +const config = require("../config/config"); +const QR = require("../utils/memberqrcode.js"); +const util = require("../utils/util"); +const bgColor = require("../utils/bgColor.js") +let app = getApp(); +Page({ + data: { + ifStoreApp: ifStoreApp, + navigationBarTitle: '首页', + navigationBarHeight, + chengzhangBox: bgColor.colorFirst.main.chengzhangBox, + activeColor: bgColor.colorFirst.main.activeColor, + qg: bgColor.colorFirst.main.qg, + newUrl: "", + cover: "", + kanjia:imgurl.kanjia.url, + pintuan: imgurl.pintuan.url, + xiaofeika: imgurl.xiaofeika.url, + xingyun: imgurl.xingyun.url, + jfshangcheng: imgurl.jfshangcheng.url, + toutiao: imgurl.toutiao.url, + giftHr: imgurl.giftHr.url, + giftHr: imgurl.giftHr.url, + next: imgurl.next.url, + usergift: imgurl.usergift.url, + guanbi1: imgurl.guanbi1.url, + icon0001: imgurl.icon0001.url, + icon0002: imgurl.icon0002.url, + icon0003: imgurl.icon0003.url, + icon0004: imgurl.icon0004.url, + icon0005: imgurl.icon0005.url, + icon0006: imgurl.icon0006.url, + icon0007: imgurl.icon0007.url, + icon0008: imgurl.icon0008.url, + barcode: imgurl.barcode.url, + leftarrows: imgurl.leftarrows.url, + newcard: imgurl.newcard.url, + newseckill: imgurl.newseckill.url, + newbargain: imgurl.newbargain.url, + newgroup: imgurl.newgroup.url, + product: imgurl.product.url, + barginicon: imgurl.barginicon.url, + pintuan: imgurl.pintuan.url, + duihuan: imgurl.duihuan.url, + market: app.globalData.market, + list: [], + xslist:[], + loading: true, + fistLogin: null, + alphaData: null, + swiperCurrent: 0, + title: null, + weappShareTitle: '', //分享标题 + weappShareCoverImg: '', //分享图片 + desc: null, + scrollTop: 0, + showGame: false, + showTopic: false, + showQg:false, + gamedata: {}, + couponId: '', //游戏返回时传回的字段 + played: false, //从游戏页面跳回首页返回true + havePlayEd: app.globalData.havePlayEd, + staticGamedata: {}, + showIf: false, + showPages: false, + display: 'none', + display1: 'none', + optionsData: null, + page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 + }, + alphaClick: function(even) { + var animation = wx.createAnimation({}) + animation.opacity(0).step({ + duration: 2000 + }) + this.setData({ + alphaData: animation.export() + }) + }, + // 我的卡包 + mycard: function() { + wx.navigateTo({ + url: '/pages/cardorder/index/index', + }) + }, + //我的券包 + mycoupon: function() { + wx.navigateTo({ + url: '/pages/couponorder/index/index', + }) + }, + gotoSpellGroup: function() { + wx.navigateTo({ + url: '/pages/spellGroup/spellGroup', + }) + }, + qrcode: function() { + var that = this; + let memberId = that.data.memberId; + if (memberId) { + wx.navigateTo({ + url: '/pages/specialcourtesy/specialcourtesy' + }) + } + }, + //跳往限时秒杀 + gotoRushBuy: function() { + wx.navigateTo({ + url: '/pages/rushToBuy/index', + }) + }, + swiperChange: function(e) { + this.setData({ + swiperCurrent: e.detail.current + }); + }, + gotogame: function() { + let that = this; + 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) { + var data = { + 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) { + // 用户手机已加密 + 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; + if (wx.getStorageSync('options')){ + optionss = JSON.parse(wx.getStorageSync('options')); + } + if (options.played == "true") { + that.setData({ + played: true + }) + } + if (optionss && optionss.couponChannelId || optionss && optionss.orderId) { + that.setData({ + optionsData: optionss + }) + that.getWeapNote(optionss.couponChannelId, optionss.orderId); + } else { + that.getWeapNote() + } + //获取条形码 + // util.barcode("barcode", optionss.quancode, 510, 100); + }, + onShow: function() { + if (typeof this.getTabBar === 'function' && + this.getTabBar()) { + this.getTabBar().setData({ + selected: 0 + }) + } + let that = this; + that.setData({ + havePlayEd: app.globalData.havePlayEd ? app.globalData.havePlayEd : false + }) + /** + * couponNum 是否有普通的优惠券购买 + * couponNum2 是否有新买的消费卡 + */ + let num = wx.getStorageSync('couponNum'); + let num1 = wx.getStorageSync('couponNum2'); + + if (num == 'couponNum' || num1 == 'couponNum2') { + wx.showTabBarRedDot({ + index: 3 + }) + } else { + wx.hideTabBarRedDot({ + index: 3 + }) + } + + if (app.globalData.score) { + that.setData({ + fistLogin: app.globalData.score + }) + } + // 如果有游戏 + setTimeout(function() { + that.alphaClick(); + }, 8000) + }, + getmemberId: function(token) { + let that = this; + Http.get({ + url: config.api.getScore, + data: { + token: token + } + }).then(res => { + that.setData({ + levelName: res.data.levelName, + upgradePercent: res.data.upgradePercent, + upgradeScore: res.data.upgradeScore, + }) + + if (res.data.nickName) { + that.setData({ + memberId: res.data.id + }) + var initUrl = JSON.stringify({ + flagid: res.data.id + }); + } + }) + .catch(err => { + wx.showModal({ + title: '提示', + content: err.message, + showCancel: false + }) + }) + }, + gotoChengzhangzhi: function() { + wx.navigateTo({ + url: '/pages/czdetail/czdetail', + }) + }, + gotoBargain: function () { + wx.navigateTo({ + url: '/pages/bargain/bargain', + }) + }, + gotoSpellGroup: function () { + wx.navigateTo({ + url: '/pages/spellGroup/spellGroup', + }) + }, + gotoCard: function () { + wx.navigateTo({ + url: '/pages/discountCardList/discountCardList', + }) + }, + // gotoGame: function () { + // wx.navigateTo({ + // url: '/pages/game/index', + // }) + // }, + gotoJfsc: function () { + wx.navigateTo({ + url: '/pages/integralmall/index', + }) + }, + + /** + * + * @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) + }, + getWeapNote: function(couponChannelId, couponId, orderId) { + var that = this; + // 登录 + that.getmemberId(app.globalData.token); + that.getBannerlist(); + that.topicShow(); + that.getxsList(); + that.getMallInfo(app.globalData.token); + if (app.couponChannelListCallback) { + app.couponChannelListCallback(app.globalData.token); + } + if (app.couponListCallback) { + app.couponListCallback(app.globalData.token); + } + if (app.businessListCallback) { + app.businessListCallback(app.globalData.token); + } + Http.get({ + url: config.api.getWeapNote, + data: { + appId: config.weapp.AppId, + } + }) + .then(res => { + that.getGameOne(app.globalData.token) + that.getStaticGame(app.globalData.token) + let weapNote = JSON.parse(res.data.weapNote); + that.setData({ + desc: weapNote.firstpage.desc, + title: weapNote.firstpage.title + }) + }) + .catch(err => { + that.getGameOne(app.globalData.token) + that.getStaticGame(app.globalData.token) + wx.showModal({ + title: "提示", + content: err.errMsg, + showCancel: false + }); + }); + }, + + 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, + newUrl: res.data.imgUrl + }) + } else { + _this.setData({ + showIf: false + }) + } + _this.setData({ + staticGamedata: res.data + }) + }) + .catch(err => { + _this.setData({ + showIf: false + }) + 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, + }) + } else { + _this.setData({ + showGame: false + }) + } + _this.setData({ + gamedata: res.data + }) + }) + .catch(err => { + _this.setData({ + showGame: false + }) + this.alphaClick(); + }) + }, + /** + * mallinfo + */ + getMallInfo: function(token) { + let that = this; + Http.get({ + url: config.api.getMallInfo, + data: { + token: token, + } + }).then(res => { + that.setData({ + weappShareTitle: res.data.weappShareTitle ? res.data.weappShareTitle : null, + weappShareCoverImg: res.data.weappShareCoverImg ? res.data.weappShareCoverImg : null, + }); + }) + .catch(err => { + // 不需要错误提示 + }); + }, + //获取限时抢购列表 + getxsList(){ + let that = this; + Http.get({ + url: config.api.couponChannelList, + data: { + pageNum: 1, + pageSize: 3, + targetAd: 2 + } + }).then(res => { + if (res && res.data.total>0) { + that.setData({ + xslist: res.data.list, + showQg:true + }); + }else{ + that.setData({ + showQg:false }) } + }) + .catch(err => { + console.log(err) + wx.showToast({ + title: err.errMsg, + icon: 'none', + duration: 2000, + mask: false + }); + }) + }, + /** + * banner + */ + getBannerlist: function() { + let that = this; + Http.get({ + url: config.api.bannerlist, + data: { + pageNum: 1, + pageSize: 7 + } + }).then(res => { + // that.getmemberId(app.globalData.token); + // that.checkUserCarStatus(); + that.setData({ + list: res.data.list + }); + }) + .catch(err => { + // that.getmemberId(app.globalData.token); + // that.checkUserCarStatus(); + }); + }, + // 专题显示 + topicShow: function() { + let that = this; + Http.get({ + url: config.api.topicShow, + data: { + token: app.globalData.token + } + }).then(res => { + if (res && res.data) { + that.setData({ + name: res.data.name, + cover: res.data.cover, + id: res.data.id, + showTopic: true + }) + } else { + that.setData({ + showTopic: false + }) + } + }) + .catch(err => { + console.log(err); + }) + }, + gotoTopic() { + wx.navigateTo({ + url: `/pages/topicDetail/index?id=${this.data.id}` + }) + }, + /** + * 检查用户是否有车 + */ + // 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.getWeapNote(); + that.setData({ + page: 1 + }) + if (this.data.optionsData != null && (this.data.optionsData.couponChannelId || this.data.optionsData.orderId)) { + this.getWeapNote(this.data.optionsData.couponChannelId, this.data.optionsData.orderId); + } else { + this.getWeapNote() } + 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(); + }; + // 砍价下拉刷新 + // that.selectComponent("#bargain").getList(); + // that.selectComponent("#spellGroup").getList(); + // that.selectComponent("#rushtobyCard").getList(); + wx.stopPullDownRefresh(); + //爆款专区下拉刷新 + that.selectComponent("#hot").getList(); + that.getxsList(); + that.topicShow(); + }, + //加载更多 + 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.weappShareTitle, + imageUrl: this.data.weappShareCoverImg, + // desc: this.data.desc, + success: function(res) { + wx.showToast({ + title: "分享成功", + duration: 1000, + icon: "success" + }); + } + }; } -}) +}); \ No newline at end of file diff --git a/index/index.json b/index/index.json index 8835af0..f502a8d 100644 --- a/index/index.json +++ b/index/index.json @@ -1,3 +1,12 @@ { - "usingComponents": {} -} \ No newline at end of file + "usingComponents": { + "c-banner": "../components/banner/index", + "discount-card": "../components/discountCard/index", + "c-coupons": "../pages/main/coupons/index", + "g-entry": "../components/gameentry/gentry", + "c-hot": "../components/hot/index", + "navbar": "../components/navbar/navbar" + }, + "enablePullDownRefresh": true, + "navigationBarBackgroundColor": "#F4F5F9" +} diff --git a/index/index.wxml b/index/index.wxml index 12d31bc..0556794 100644 --- a/index/index.wxml +++ b/index/index.wxml @@ -1 +1,93 @@ -组件 \ No newline at end of file + + + + + + + + + + + + + + + {{levelName}} + + + + + 还需{{upgradeScore}}成长值可升级 + + + + + + + + + + + + + + + + 砍价 + + + + 拼团 + + + + 消费卡 + + + + 游戏频道 + + + + 积分商城 + + + + + + + 砍价 + + + + 拼团 + + + + 限时抢购 + + + + + + + + + 今日好物推荐, + '{{xslist[0].title}}'原价 {{xslist[0].priceStr}} 现价... + + 抢购 + + + + + + + + + + + + + 您今日签到成功,获得{{fistLogin}}成长值 + diff --git a/index/index.wxss b/index/index.wxss index c009246..1658e6c 100644 --- a/index/index.wxss +++ b/index/index.wxss @@ -1,4 +1,482 @@ -.intro { - margin: 30px; + @import "../app.wxss"; +page{ + background: #F4F5F9; +} +.index-position { + background: rgba(0, 0, 0, 0.5); + height: 88rpx; + position: absolute; + top: 0; + width: 100%; + font-family: PingFangSC-Semibold; + font-size: 30rpx; + color: #fff; + letter-spacing: 0.75rpx; + z-index: 9; + line-height: 88rpx; + overflow: hidden; +} + +.red{ + position:absolute; + width:13rpx; + height:13rpx; + border-radius:50%; + background:red; + right:-50rpx; + top:19rpx; + left:0; + margin:auto; + display: none; +} +page { + width: 100%; + height: auto !important; + overflow-x: hidden; +} + +.txt { + margin-left: 20rpx; +} + +.game-entry { + position: fixed; + right: 27rpx; + bottom:323rpx; + width: 120rpx; + margin: 37rpx auto 0; + z-index: 10; +} + +.gameimg { + display: block; + width: 100%; +} + +.userinfo{ + width:690rpx; + height: 96rpx; + border-radius:16rpx; + display: flex; + justify-content: space-between; + margin: 0 auto 30rpx; +} +.infoLeft{ + height: 100%; + border-radius:12rpx; + background: #FFF; +} +.section { + padding: 0 20rpx; + justify-content: space-around; text-align: center; -} \ No newline at end of file + margin-top: 25rpx; + margin-bottom: 30rpx; +} +.sellsection{ + margin-bottom: 37rpx; + padding: 0 38rpx; +} +.section >view,.sellsection>view{ + width: 25%; + display: inline-block; + position: relative; +} +.section >view image,.sellsection>view image{ + display: block; + margin: 0 auto; +} +.section >view image { + width: 55rpx; + height: 55rpx; + margin-top: 20rpx; + margin-bottom: 14rpx; +} +.sellsection>view image{ + width: 159rpx; + height: 134rpx; +} +.section text { + 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 { + /* position: absolute; + top: 0; + bottom: 0; */ + margin: 15rpx 20rpx 15rpx; + z-index:100; +} + +.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: none; + 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; +} +.memberIds{ + padding-top: 30rpx; + font-size: 30rpx; +} +.search{ + background:rgba(2, 192, 255, 1); + height: 50rpx; +} +.searchbar{ + position: relative; + width: 685rpx; + height: 76rpx; + margin: 0 auto; + text-align: center; +} +.searchbar image{ + width: 40rpx; +} +.searchbar text{ + font-size: 28rpx; + line-height: 50rpx; + color: #fff; + display: inline-block; +} +.user-avatar { + width: 80rpx; + height: 80rpx; + border-radius: 50%; + overflow: hidden; + float: left; + margin: 10rpx 10rpx; +} +.user-avatar open-data { + display:block; + width:100%; + height:100%; +} +.user-data { + letter-spacing: 0.64rpx; + line-height: 46rpx; + font-size: 30rpx; + color: #333; + background: #FFF; + margin-top: 10rpx; + margin-bottom: 26rpx; + float: right; + display: flex; + flex-direction: column; +} + +.nameBox open-data{ + float: left; +} +.chengzhangBox{ + height:32rpx; + line-height: 26rpx; + border-radius:9px 9px 9px 0px; + font-family:PingFangSC-Regular; + font-weight:400; + color:rgba(255,255,255,1); + float: left; + margin-top: 8rpx; +} +.chengzhang { + font-size: 22rpx; + font-weight: 400; + color: #FFFFFF; + height:22rpx; + line-height: 22rpx; + padding: 0 8rpx; +} +.integral{ + margin-left: 70rpx; +} +.jifen{ + display: inline-block; + height: 34rpx; + color: #999999; + font-size:24rpx; + line-height: 34rpx; +} +.jifenNumber{ + color:#D18B4C; + font-size: 34rpx; + line-height: 34rpx; + margin-left: 10rpx; + font-weight: bold; +} +.view { + display: flex; + font-size: 24rpx; + color: #999999; +} +.view>.score{ + margin-left:9rpx; + color:#333333; + font-size:30rpx; + margin-right:23rpx; + font-family:PingFang-SC-Bold; +} +.qrcode{ + width: 106rpx; + height: 96rpx; + background: #FFF; + border-radius:12rpx; +} +.qrcodeimg{ + width: 68rpx!important; + height: 68rpx!important; +} +.leftimg{ + position: absolute; + right: 40rpx; + top: 60rpx; + margin-top: -7rpx; + width: 14rpx; + height: 26rpx; +} +.duihuanimg{ + display: block; + width: 48rpx; + margin-top: 6rpx; +} +.product{ + width: 710rpx; + margin: 30rpx auto 10rpx; + border-radius: 16rpx; + overflow: hidden; +} +.product image{ + display: block; + width: 100%; +} +.textBox{ + /* display: block; */ + width: 400rpx; + height: 100%; + float: left; + margin-left: 10rpx; +} +.textBox .name{ + width: 400rpx; + font-size: 28rpx; + color: #3C3C3C; + margin-top: 20rpx; +} +.textBox .title{ + width: 400rpx; + font-size: 20rpx; + color: #A6A6A6; + margin-top: 10rpx; +} + +.product .gift{ + width:88rpx; + height:88rpx; + float: left; + margin-top: 30rpx; + margin-left: 15rpx; +} +.next image{ + width: 26rpx; + height: 40rpx; +} +.gift image{ + width:88rpx; + height:76rpx; +} +.product .next{ + width:32rpx; + height:60rpx; + float: right; + margin-top: 40rpx; + margin-right: 26rpx; +} +#rushtobyCard{ + margin-top: 30rpx; +} +.signin{ + width: 542rpx; + height: 94rpx; + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 100; + margin: auto; +} +.signin open-data { + position: absolute; + width:90rpx; + left: 0; + top: 0; + bottom: 0; + height:94rpx; + margin: auto; + border-radius: 50%; + overflow: hidden; +} +.signin text{ + display: block; + background: rgba(0, 0, 0, 0.5); + font-size: 28rpx; + height: 80rpx; + width: 100%; + line-height: 80rpx; + color: #D6D5D5; + text-indent: 4em; + border-radius:60rpx; + margin-top: 7rpx; +} +.remainchengzhangzhi{ + display: block; + color: #A6A6A6; + font-size: 22rpx; + margin-top: 5rpx; + height: 30rpx; + line-height: 30rpx; + float: left; + margin-left:10rpx; + width: 255rpx; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} +progress{ + width:200rpx; + border-radius:60rpx; + overflow:hidden; + float: left; + margin-top: 10rpx; +} +.channelBox{ + width:688rpx; + height: 220rpx; + margin:0 auto; + display: flex; + justify-content: space-between; + background: #F4F5F9; +} +.kjBox{ + width: 104rpx; + height: 148rpx; + font-size: 24rpx; + color: #A6A6A6; + margin-top: 46rpx; + text-align: center; +} +.kjBox image{ + width: 104rpx; + height: 104rpx; +} +.toutiao{ + width:710rpx; + height: 82rpx; + line-height: 82rpx; + margin:0 auto; + background: #FFF; + box-shadow:0px 6rpx 16rpx 0px rgba(236,238,243,1); + border-radius:12rpx; + margin-top: 18rpx; + margin-bottom:18rpx; + position: relative; +} +.toutiao view:nth-child(2){ + font-size:26rpx; + font-family:PingFangSC-Regular; + font-weight:400; + color:rgba(60,60,60,1); + float: left; + width: 500rpx; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} +.toutiao view:nth-child(2) text:nth-child(1){ + color: red; +} +.toutiao view:nth-child(2) text:nth-child(2){ + text-decoration: line-through; + color: red; +} +.toutiao .imgBox{ + width: 64rpx; + height: 64rpx; + float: left; + margin:5rpx 0 5rpx 20rpx; +} +.toutiao image{ + width: 48rpx; + height: 38rpx; + margin: auto; +} +.toutiao .qg{ + width: 80rpx; + height: 44rpx; + line-height: 44rpx; + border-radius:18rpx; + border:2rpx solid; + position: absolute; + top: 0; + bottom: 0; + right: 20rpx; + margin: auto; + font-size:24rpx; + font-family:PingFangSC-Medium; + font-weight:500; + color:#FD782D; + text-align: center; +} + + +i-tabs i-tabs-scroll{ + background: #F4F5F9!important; +} + diff --git a/index/passCar.js b/index/passCar.js index 7d60a41..59d0804 100644 --- a/index/passCar.js +++ b/index/passCar.js @@ -1,11 +1,12 @@ + const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px' const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} let app = getApp(); -const format = require("../../utils/util.js"); -let config = require("../../config/config.js"); -let Http = require("../../utils/HttpBasics"); -let Util = require("../../utils/util"); -const imgurl = require("../../utils/imgurl"); +const format = require("../utils/util.js"); +let config = require("../config/config.js"); +let Http = require("../utils/HttpBasics"); +let Util = require("../utils/util"); +const imgurl = require("../utils/imgurl"); Page({ data: { navigationBarHeight, @@ -226,7 +227,12 @@ Page({ }) }, onShow: function (options) { - console.log(123) + if (typeof this.getTabBar === 'function' && + this.getTabBar()) { + this.getTabBar().setData({ + selected: 2 + }) + } var that = this; that.setData({ etcpAppId: extConfig.attr.etcpAppId, diff --git a/index/passCar.wxml b/index/passCar.wxml index 2a549d1..4eea8a8 100644 --- a/index/passCar.wxml +++ b/index/passCar.wxml @@ -115,7 +115,7 @@ 请您敬请期待 我们正在筹备一大波优惠活动 - + diff --git a/index/searchbar.js b/index/searchbar.js index 108f13e..34a8720 100644 --- a/index/searchbar.js +++ b/index/searchbar.js @@ -1,7 +1,7 @@ const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' -const Http = require("../../../utils/HttpBasics"); -const imgurl = require("../../../utils/imgurl"); -const config = require("../../../config/config"); +const Http = require("../utils/HttpBasics"); +const imgurl = require("../utils/imgurl"); +const config = require("../config/config"); let app = getApp(); Page({ @@ -18,7 +18,7 @@ Page({ page:1, isFirstPage:false, isLastPage:false, - teljpgUrl: imgurl.teljpg.url, + teljpgUrl: imgurl.teljpg.url }, // 左侧点击事件 jumpIndex(e) { @@ -53,10 +53,15 @@ Page({ }) }, onShow(){ + if (typeof this.getTabBar === 'function' && + this.getTabBar()) { + this.getTabBar().setData({ + selected: 1 + }) + } let that = this; wx.getSystemInfo({ success: function (res) { - console.log(res.windowHeight, navigationBarHeight); that.setData({ windowHeight: res.windowHeight + parseInt(navigationBarHeight) }) diff --git a/index/user.js b/index/user.js index 4b8fc4a..46ea032 100644 --- a/index/user.js +++ b/index/user.js @@ -1,22 +1,22 @@ +var app = getApp(); const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} -var config = require("../../config/config.js"); -var app = getApp(); -const Http = require("../../utils/HttpBasics"); -const QR = require("../../utils/memberqrcode.js"); -const imgurl = require("../../utils/imgurl"); -const bgColor = require("../../utils/bgColor.js") +let ifStoreApp = extConfig.attr.ifStoreApp; +const Http = require("../utils/HttpBasics"); +const imgurl = require("../utils/imgurl"); +var config = require("../config/config.js"); +const bgColor = require("../utils/bgColor.js") Page({ /** * 页面的初始数据 */ data: { navigationBarHeight, + ifStoreApp:ifStoreApp, banneColor: bgColor.colorFirst.user.banneColor, levelBg: bgColor.colorFirst.user.levelBg, view: bgColor.colorFirst.user.view, redirectUrl: imgurl.redirect.url, - qrcodeUrl: imgurl.qrcode.url, editUrl: imgurl.edit.url, activeUrl: imgurl.active.url, dingUrl: imgurl.ding.url, @@ -38,12 +38,10 @@ Page({ sex: "", showEdit: false, ismember: false, - showQrcode: false, canvasHidden: false, maskHidden: true, imagePath: '', appVersion: "", - showmemberqrcode: false, placeholder: '' }, checkUserStatus() { @@ -66,11 +64,6 @@ Page({ url: '/pages/czdetail/czdetail', }) }, - navigateTo() { - wx.navigateTo({ - url: `/pages/main/index` - }); - }, showVersion: function() { /** * 长按显示版本号 @@ -117,7 +110,6 @@ Page({ } }) }, - /** * 用户更新scene */ @@ -135,6 +127,19 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function() { + if (typeof this.getTabBar === 'function' && + this.getTabBar()) { + if (ifStoreApp==1){ + this.getTabBar().setData({ + selected: 1 + }) + }else{ + this.getTabBar().setData({ + selected: 3 + }) + } + + } let that = this; that.checkUserStatus(); that.setData({ @@ -149,9 +154,6 @@ Page({ wx.hideTabBarRedDot({ index: 3 }); - wx.hideTabBarRedDot({ - index: 3 - }); if (num == 'couponNum1') { wx.setStorage({ key: 'couponNum', @@ -201,7 +203,6 @@ Page({ var initUrl = JSON.stringify({ flagid: res.data.id }); - that.createQrCode(initUrl, "mycanvas1", size.w, size.h); } }) .catch(err => { @@ -214,12 +215,6 @@ Page({ //暂时注释 // that.getrun(); }, - hideQrcode: function() { - let that = this; - that.setData({ - showQrcode: false - }) - }, //适配不同屏幕大小的canvas setCanvasSize: function() { var size = {}; @@ -237,52 +232,5 @@ Page({ console.log("获取设备信息失败" + e); } return size; - }, - createQrCode: function(url, canvasId, cavW, cavH) { - //调用插件中的draw方法,绘制二维码图片 - QR.api.draw(url, canvasId, cavW, cavH); - }, - qrcode: function(e) { - var that = this; - that.setData({ - showQrcode: true - }) - wx.showToast({ - title: '生成中...', - icon: 'loading', - duration: 2000 - }); - 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, "mycanvas1", size.w, size.h); - that.setData({ - maskHidden: true - }); - clearTimeout(st); - }, 1000) - - }, - close: function() { - this.setData({ - showmemberqrcode: false, - }) } }); -Component({ - pageLifetimes: { - show() { - if (typeof this.getTabBar === 'function' && - this.getTabBar()) { - this.getTabBar().setData({ - selected: 0 - }) - } - } - } -}) diff --git a/index/user.json b/index/user.json index e2f3c9d..fb5f604 100644 --- a/index/user.json +++ b/index/user.json @@ -1,7 +1,7 @@ { "usingComponents": { - "i-button": "../../dist/button/index", - "navbar": "../../components/navbar/navbar" + "i-button": "../dist/button/index", + "navbar": "../components/navbar/navbar" }, "navigationBarBackgroundColor": "#FD832D", "navigationBarTextStyle": "white", diff --git a/index/user.wxml b/index/user.wxml index 61e8e21..ea62a71 100644 --- a/index/user.wxml +++ b/index/user.wxml @@ -1,7 +1,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -87,6 +87,50 @@ + + + + + + + + + + + + + + + 我的订单 + + + + + + + 我的券包 + + + + + + + + + + 我的砍价 + + + + + + + 我的拼团 + + + + + 版本号:{{appVersion}} @@ -95,10 +139,4 @@ - - - - \ No newline at end of file diff --git a/pages/acSignIn/index.js b/pages/acSignIn/index.js index 4f2e65d..5642181 100644 --- a/pages/acSignIn/index.js +++ b/pages/acSignIn/index.js @@ -57,7 +57,7 @@ Page({ }, goback: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) } }) \ No newline at end of file diff --git a/pages/addPark/addPark.js b/pages/addPark/addPark.js index 4f2cab4..3df086f 100644 --- a/pages/addPark/addPark.js +++ b/pages/addPark/addPark.js @@ -72,7 +72,7 @@ Page({ jumpTo: function () { // 返回 wx.navigateBack({ - url: '/pages/passCar/passCar' + url: '/index/passCar' }) }, handleTap: function (e) { @@ -358,7 +358,7 @@ Page({ } else{ wx.navigateBack({ - url: '/pages/passCar/passCar?addcar=' + carNumber, + url: '/index/passCar?addcar=' + carNumber, }) } } diff --git a/pages/bannerdetail/index.js b/pages/bannerdetail/index.js index 900f6e6..97d7e18 100644 --- a/pages/bannerdetail/index.js +++ b/pages/bannerdetail/index.js @@ -45,7 +45,7 @@ Page({ }, goback: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, }); diff --git a/pages/bargain/bargain.js b/pages/bargain/bargain.js index 7414e58..4faa694 100644 --- a/pages/bargain/bargain.js +++ b/pages/bargain/bargain.js @@ -33,7 +33,7 @@ Page({ }, goback: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, onLoad: function (options) { diff --git a/pages/bargain/bargainDatail/bargainDatail.js b/pages/bargain/bargainDatail/bargainDatail.js index 02e4185..ed036d1 100644 --- a/pages/bargain/bargainDatail/bargainDatail.js +++ b/pages/bargain/bargainDatail/bargainDatail.js @@ -78,7 +78,7 @@ Page({ }, goback: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, /** diff --git a/pages/cardorder/index/index.js b/pages/cardorder/index/index.js index 7bf63a5..9ba9f3f 100644 --- a/pages/cardorder/index/index.js +++ b/pages/cardorder/index/index.js @@ -37,7 +37,7 @@ Page({ }, goback: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, onLoad: function() { diff --git a/pages/cardorder/index/index.wxml b/pages/cardorder/index/index.wxml index 03f5c6f..56be6de 100644 --- a/pages/cardorder/index/index.wxml +++ b/pages/cardorder/index/index.wxml @@ -10,7 +10,7 @@ 请您敬请期待 我们正在筹备一大波优惠活动 - + diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index 99dc24f..81b6bc3 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -204,7 +204,7 @@ Page({ }, goback: function() { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, /** diff --git a/pages/couponorder/index/index.js b/pages/couponorder/index/index.js index 610d16a..cfe6ae1 100644 --- a/pages/couponorder/index/index.js +++ b/pages/couponorder/index/index.js @@ -54,7 +54,7 @@ Page({ }, goback: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, //点击跳转到券详情页面 diff --git a/pages/couponorder/index/index.wxml b/pages/couponorder/index/index.wxml index 86ddc8a..36ef400 100644 --- a/pages/couponorder/index/index.wxml +++ b/pages/couponorder/index/index.wxml @@ -10,7 +10,7 @@ 请您敬请期待 我们正在筹备一大波优惠活动 - + diff --git a/pages/discountCardList/discountCardList.js b/pages/discountCardList/discountCardList.js index 9865d55..bc966d7 100644 --- a/pages/discountCardList/discountCardList.js +++ b/pages/discountCardList/discountCardList.js @@ -40,7 +40,7 @@ Page({ }, goback: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, onLoad(options) { diff --git a/pages/discountCardList/discountCardList.wxml b/pages/discountCardList/discountCardList.wxml index f7eb753..6b6540c 100644 --- a/pages/discountCardList/discountCardList.wxml +++ b/pages/discountCardList/discountCardList.wxml @@ -13,7 +13,7 @@ 请您敬请期待 我们正在筹备一大波优惠活动 - + diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js index 12f0916..1899190 100755 --- a/pages/getphoneInfo/index.js +++ b/pages/getphoneInfo/index.js @@ -116,7 +116,7 @@ Page({ }) } else if (that.data.mineFlag == 'mine'){ wx.switchTab({ - url: '/pages/user/index' + url: '/index/user' }); } else { wx.showToast({ @@ -129,7 +129,7 @@ Page({ }) } else { wx.switchTab({ - url: '/pages/passCar/passCar', + url: '/index/passCar', }) } } diff --git a/pages/getuserinfo/index.js b/pages/getuserinfo/index.js index 083cec2..e1736f2 100755 --- a/pages/getuserinfo/index.js +++ b/pages/getuserinfo/index.js @@ -177,12 +177,12 @@ Page({ } else if (app.globalData.type == 'uc') { // 我的 wx.switchTab({ - url: '/pages/user/index' + url: '/index/user' }); } else if (app.globalData.type == 'in') { // 首页 wx.switchTab({ - url: '/pages/main/index' + url: '/index/index' }); } // 积分 @@ -193,7 +193,7 @@ Page({ }else if (app.globalData.type == 'pc') { // 停车 wx.switchTab({ - url: '/pages/passCar/passCar' + url: '/index/passCar' }); } else if (app.globalData.type == 'mc') { // 我的券包 @@ -254,11 +254,11 @@ Page({ else if (app.globalData.type == 'ml') { // 门店 wx.switchTab({ - url: '/pages/index/searchbar/index' + url: '/index/searchbar' }); } else { wx.switchTab({ - url: "/pages/main/index" + url: "/index/index" }); } } diff --git a/pages/index/index.js b/pages/index/index.js index 43f1174..a22c72f 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -229,7 +229,7 @@ Page({ // 我的 else if (app.globalData.type == 'uc') { wx.switchTab({ - url: '/pages/user/index' + url: '/index/user' }); } // 积分 @@ -241,14 +241,14 @@ Page({ // 首页 else if (app.globalData.type == 'in') { wx.switchTab({ - url: '/pages/main/index' + url: '/index/index' }); } // 停车 else if (app.globalData.type == 'pc') { // 停车 wx.switchTab({ - url: '/pages/passCar/passCar' + url: '/index/passCar' }); } // 我的券包 @@ -324,7 +324,7 @@ Page({ // 门店 else if (app.globalData.type == 'ml') { wx.switchTab({ - url: '/pages/index/searchbar/index' + url: '/index/searchbar' }) } // 通过分享进入的门店详情 @@ -335,7 +335,7 @@ Page({ }else { // 主页 wx.switchTab({ - url: '/pages/main/index' + url: '/index/index' }) } }) diff --git a/pages/index/searchbar/detail/index.js b/pages/index/searchbar/detail/index.js index 2b0f006..8a593c8 100644 --- a/pages/index/searchbar/detail/index.js +++ b/pages/index/searchbar/detail/index.js @@ -41,7 +41,7 @@ Page({ }, goback: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, /** diff --git a/pages/index/searchbar/index.js b/pages/index/searchbar/index.js deleted file mode 100644 index 108f13e..0000000 --- a/pages/index/searchbar/index.js +++ /dev/null @@ -1,156 +0,0 @@ -const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' -const Http = require("../../../utils/HttpBasics"); -const imgurl = require("../../../utils/imgurl"); -const config = require("../../../config/config"); -let app = getApp(); -Page({ - - /** - * 页面的初始数据 - */ - data: { - navigationBarHeight, - lists: [], - merchantVoList:[], - indexId: 0, - businessId:0, - windowHeight:"", - page:1, - isFirstPage:false, - isLastPage:false, - teljpgUrl: imgurl.teljpg.url, - }, - // 左侧点击事件 - jumpIndex(e) { - let that = this; - let index = e.currentTarget.dataset.menuindex; - that.setData({ - indexId: index, - businessId: index - }); - that.setData({ - page:1 - }) - that.getList(1, that.data.businessId); - }, - /** - * 跳转到门店列表的详情页面 - */ - gotoDetail(e){ - wx.navigateTo({ - url: `/pages/index/searchbar/detail/index?id=${e.currentTarget.dataset.id}` - }) - }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - let that = this; - that.getBussiness(); - that.getList(1, 0); - wx.showLoading({ - title: '加载中...', - }) - }, - onShow(){ - let that = this; - wx.getSystemInfo({ - success: function (res) { - console.log(res.windowHeight, navigationBarHeight); - that.setData({ - windowHeight: res.windowHeight + parseInt(navigationBarHeight) - }) - }, - }) - }, - getBussiness:function(){ - let that = this; - Http.get({ - url: config.api.businessList, - data:{ - filter:1 - } - }).then(res => { - that.setData({ - lists: [{ id: 0, title: "全部", type: 1 }].concat(res.data) - }); - }) - .catch(err => { - wx.showToast({ - title: err.errMsg, - icon: 'none', - duration: 2000, - mask: false - }); - }) - }, - getList: function (page, businessId) { - let that = this; - let data; - if(businessId == 0){ - data = { - pageNum: page, - pageSize: 8 - } - }else{ - data = { - pageNum: page, - pageSize: 8, - businessId: businessId - } - } - Http.get({ - url: config.api.merchantList, - data: data - }).then(res => { - wx.hideLoading(); - if (page == 1) { - that.setData({ - merchantVoList: [], - }) - } - var tmpArr = that.data.merchantVoList; - tmpArr.push.apply(tmpArr, res.data.list); - // console.log(tmpArr) - that.setData({ - merchantVoList: tmpArr, - isFirstPage: res.data.isFirstPage, - isLastPage: res.data.isLastPage - }) - // console.log(that.data.merchantVoList) - }) - .catch(err => { - wx.hideLoading(); - wx.showToast({ - title: err.errMsg, - icon: 'none', - duration: 2000, - mask: false - }); - }) - }, - phone: function (e) { - let that = this; - if (e.currentTarget.dataset.merchantlinkphone) { - wx.makePhoneCall({ - phoneNumber: e.currentTarget.dataset.merchantlinkphone - }) - } - }, - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - let that = this; - that.data.page++; - that.setData({ - page: that.data.page - }); - console.log(that.data.page); - // 如果是最后一页 - //就不发送请求 - if (!that.data.isLastPage || that.data.isFirstPage && that.data.isLastPage){ - that.getList(that.data.page, that.data.businessId); - } - } -}) diff --git a/pages/index/searchbar/index.json b/pages/index/searchbar/index.json deleted file mode 100644 index 8283b91..0000000 --- a/pages/index/searchbar/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "navigationBarTitleText": "门店", - "navigationBarBackgroundColor": "#F4F5F9", - "navigationBarTextStyle": "black", - "usingComponents": { - "navbar": "../../../components/navbar/navbar" - } -} \ No newline at end of file diff --git a/pages/index/searchbar/index.wxml b/pages/index/searchbar/index.wxml deleted file mode 100644 index b7956c2..0000000 --- a/pages/index/searchbar/index.wxml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - {{item.title}} - - - - - - - - - - - - - - 暂无数据 - - - \ No newline at end of file diff --git a/pages/index/searchbar/index.wxss b/pages/index/searchbar/index.wxss deleted file mode 100644 index eb3ec13..0000000 --- a/pages/index/searchbar/index.wxss +++ /dev/null @@ -1,158 +0,0 @@ -.under_line{ - width: 100%; -} -.scrollY { - width: 134rpx; - position: fixed; - left: 0; - background:#F4F5F9; -} - -.text-style { - position: relative; - width: 139rpx; - height: 100rpx; - line-height: 100rpx; - text-align: center; - font-size: 30rpx; - font-family: PingFangSC-Semibold; - color: #3C3C3C; - background: #FFFFFF; - font-weight:500; -} -.text-styleHover{ - position: relative; - width: 139rpx; - height: 100rpx; - line-height: 100rpx; - text-align: center; - font-size: 26rpx; - font-family: PingFangSC-Semibold; - color: #A6A6A6; -} -.text-style text{ - font-size: 26rpx; -} -.active1 { - font-size: 26rpx!important; -} -.active { - position: absolute; - left: 4rpx; - bottom: 0rpx; - top:0; - margin: auto; - width:12rpx; - height:24rpx; - background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); - border-radius:7rpx; -} - -.posi { - position: relative; - width: 616rpx; - float: right; -} - -.posi>view:nth-child(2) { - width: 100%; - display: flex; - justify-content: space-between; - box-sizing: border-box; -} - -.posi>view:nth-child(2) text:nth-child(1) { - font-size: 30rpx; - color: #a9a9a9; -} - -.posi>view:nth-child(2) text:nth-child(2) { - font-size: 30rpx; - color: #a9a9a9; -} - -.posi_logo { - position: relative; - width:576rpx!important; - height:176rpx; - background:rgba(255,255,255,1); - box-shadow:0px 4rpx 8rpx 0px rgba(0,0,0,0.04); - border-radius:16rpx; - margin: 20rpx; - overflow: hidden; -} -.tel { - position: absolute; - right: 3%; - top: 0; - bottom: 0; - margin: auto; - width: 50rpx; - height: 50rpx; -} -.merchants{ - width: 90%; - display: flex; - background: #fff; - padding-right:5%; - overflow: hidden; -} -.position{ - text-align: center; - margin-top: 100rpx; - color: #999; -} -.leftBox{ - padding: 20rpx 0; -} -.merchants view:nth-child(1) image { - display: block; - width: 120rpx; - height: 120rpx; - border-radius: 16rpx; -} -.shopVo{ - margin-left: 20rpx; -} - -.merchantName{ - color: #3C3C3C; - font-size: 32rpx; - margin-left: 20rpx; - width: 60%; - overflow: hidden; - text-overflow:ellipsis; - white-space: nowrap; - margin-top: 10rpx; -} -.shopVo text{ - float: left; -} -page { - padding: 0 0 30rpx; -} - -.text{ - display: block; - width: 25%; - text-align: center; -} - -.view view:nth-of-type(1) { - font-size: 28rpx; - color: #888; -} - -.shopVoList{ - padding-left: 0!important; - display: inline-block!important; - width: 345rpx; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; -} -.shopVoList text{ - font-size: 20rpx!important; - color: #b8b8b8!important; - margin-right: 10rpx; -} \ No newline at end of file diff --git a/pages/integralmall/index.js b/pages/integralmall/index.js index e565800..04283b1 100644 --- a/pages/integralmall/index.js +++ b/pages/integralmall/index.js @@ -43,7 +43,7 @@ Page({ }, goback: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, onLoad: function (options) { diff --git a/pages/integralmall/payIntegcouponStatus/index.js b/pages/integralmall/payIntegcouponStatus/index.js index 4d0c716..827ef5e 100644 --- a/pages/integralmall/payIntegcouponStatus/index.js +++ b/pages/integralmall/payIntegcouponStatus/index.js @@ -70,7 +70,7 @@ Page({ */ gotoIndex(){ wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, /** diff --git a/pages/main/index.js b/pages/main/index.js deleted file mode 100644 index 47671ee..0000000 --- a/pages/main/index.js +++ /dev/null @@ -1,663 +0,0 @@ -const navigationBarHeight = (getApp().statusBarHeight + 60) + 'px' -const Http = require("../../utils/HttpBasics"); -const imgurl = require("../../utils/imgurl"); -const config = require("../../config/config"); -const QR = require("../../utils/memberqrcode.js"); -const util = require("../../utils/util"); -const bgColor = require("../../utils/bgColor.js") -let app = getApp(); -Page({ - data: { - navigationBarTitle: '首页', - navigationBarHeight, - chengzhangBox: bgColor.colorFirst.main.chengzhangBox, - activeColor: bgColor.colorFirst.main.activeColor, - qg: bgColor.colorFirst.main.qg, - newUrl: "", - cover: "", - kanjia:imgurl.kanjia.url, - pintuan: imgurl.pintuan.url, - xiaofeika: imgurl.xiaofeika.url, - xingyun: imgurl.xingyun.url, - jfshangcheng: imgurl.jfshangcheng.url, - toutiao: imgurl.toutiao.url, - giftHr: imgurl.giftHr.url, - giftHr: imgurl.giftHr.url, - next: imgurl.next.url, - usergift: imgurl.usergift.url, - guanbi1: imgurl.guanbi1.url, - icon0001: imgurl.icon0001.url, - icon0002: imgurl.icon0002.url, - icon0003: imgurl.icon0003.url, - icon0004: imgurl.icon0004.url, - icon0005: imgurl.icon0005.url, - icon0006: imgurl.icon0006.url, - icon0007: imgurl.icon0007.url, - icon0008: imgurl.icon0008.url, - barcode: imgurl.barcode.url, - leftarrows: imgurl.leftarrows.url, - newcard: imgurl.newcard.url, - newseckill: imgurl.newseckill.url, - newbargain: imgurl.newbargain.url, - newgroup: imgurl.newgroup.url, - product: imgurl.product.url, - barginicon: imgurl.barginicon.url, - pintuan: imgurl.pintuan.url, - duihuan: imgurl.duihuan.url, - market: app.globalData.market, - list: [], - xslist:[], - loading: true, - fistLogin: null, - alphaData: null, - swiperCurrent: 0, - title: null, - weappShareTitle: '', //分享标题 - weappShareCoverImg: '', //分享图片 - desc: null, - scrollTop: 0, - showGame: false, - showTopic: false, - showQg:false, - gamedata: {}, - couponId: '', //游戏返回时传回的字段 - played: false, //从游戏页面跳回首页返回true - havePlayEd: app.globalData.havePlayEd, - staticGamedata: {}, - showIf: false, - showPages: false, - display: 'none', - display1: 'none', - optionsData: null, - page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 - }, - alphaClick: function(even) { - var animation = wx.createAnimation({}) - animation.opacity(0).step({ - duration: 2000 - }) - this.setData({ - alphaData: animation.export() - }) - }, - // 我的卡包 - mycard: function() { - wx.navigateTo({ - url: '/pages/cardorder/index/index', - }) - }, - //我的券包 - mycoupon: function() { - wx.navigateTo({ - url: '/pages/couponorder/index/index', - }) - }, - gotoSpellGroup: function() { - wx.navigateTo({ - url: '/pages/spellGroup/spellGroup', - }) - }, - qrcode: function() { - var that = this; - let memberId = that.data.memberId; - if (memberId) { - wx.navigateTo({ - url: '/pages/specialcourtesy/specialcourtesy' - }) - } - }, - // hideQrcode: function() { - // let that = this; - // that.setData({ - // showQrcode: false - // }) - // }, - //跳往限时秒杀 - gotoRushBuy: function() { - wx.navigateTo({ - url: '/pages/rushToBuy/index', - }) - }, - - //搜索门店 - // searchbar:function(){ - // wx.switchTab({ - // url: '/pages/index/searchbar/index', - // }) - // }, - - // 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; - 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) { - var data = { - 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) { - // 用户手机已加密 - 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; - if (wx.getStorageSync('options')){ - optionss = JSON.parse(wx.getStorageSync('options')); - } - if (options.played == "true") { - that.setData({ - played: true - }) - } - if (optionss && optionss.couponChannelId || optionss && optionss.orderId) { - that.setData({ - optionsData: optionss - }) - that.getWeapNote(optionss.couponChannelId, optionss.orderId); - } else { - that.getWeapNote() - } - //获取条形码 - // util.barcode("barcode", optionss.quancode, 510, 100); - }, - onShow: function() { - let that = this; - that.setData({ - havePlayEd: app.globalData.havePlayEd ? app.globalData.havePlayEd : false - }) - /** - * couponNum 是否有普通的优惠券购买 - * couponNum2 是否有新买的消费卡 - */ - let num = wx.getStorageSync('couponNum'); - let num1 = wx.getStorageSync('couponNum2'); - - if (num == 'couponNum' || num1 == 'couponNum2') { - wx.showTabBarRedDot({ - index: 3 - }) - } else { - wx.hideTabBarRedDot({ - index: 3 - }) - } - - if (app.globalData.score) { - that.setData({ - fistLogin: app.globalData.score - }) - } - // 如果有游戏 - setTimeout(function() { - that.alphaClick(); - }, 8000) - }, - getmemberId: function(token) { - let that = this; - Http.get({ - url: config.api.getScore, - data: { - token: token - } - }).then(res => { - that.setData({ - levelName: res.data.levelName, - upgradePercent: res.data.upgradePercent, - upgradeScore: res.data.upgradeScore, - }) - - if (res.data.nickName) { - that.setData({ - memberId: res.data.id - }) - var initUrl = JSON.stringify({ - flagid: res.data.id - }); - } - }) - .catch(err => { - wx.showModal({ - title: '提示', - content: err.message, - showCancel: false - }) - }) - }, - gotoChengzhangzhi: function() { - wx.navigateTo({ - url: '/pages/czdetail/czdetail', - }) - }, - gotoBargain: function () { - wx.navigateTo({ - url: '/pages/bargain/bargain', - }) - }, - gotoSpellGroup: function () { - wx.navigateTo({ - url: '/pages/spellGroup/spellGroup', - }) - }, - gotoCard: function () { - wx.navigateTo({ - url: '/pages/discountCardList/discountCardList', - }) - }, - // gotoGame: function () { - // wx.navigateTo({ - // url: '/pages/game/index', - // }) - // }, - gotoJfsc: function () { - wx.navigateTo({ - url: '/pages/integralmall/index', - }) - }, - - /** - * - * @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) - }, - getWeapNote: function(couponChannelId, couponId, orderId) { - var that = this; - // 登录 - that.getmemberId(app.globalData.token); - that.getBannerlist(); - that.topicShow(); - that.getxsList(); - that.getMallInfo(app.globalData.token); - if (app.couponChannelListCallback) { - app.couponChannelListCallback(app.globalData.token); - } - if (app.couponListCallback) { - app.couponListCallback(app.globalData.token); - } - if (app.businessListCallback) { - app.businessListCallback(app.globalData.token); - } - Http.get({ - url: config.api.getWeapNote, - data: { - appId: config.weapp.AppId, - } - }) - .then(res => { - that.getGameOne(app.globalData.token) - that.getStaticGame(app.globalData.token) - let weapNote = JSON.parse(res.data.weapNote); - that.setData({ - desc: weapNote.firstpage.desc, - title: weapNote.firstpage.title - }) - }) - .catch(err => { - that.getGameOne(app.globalData.token) - that.getStaticGame(app.globalData.token) - wx.showModal({ - title: "提示", - content: err.errMsg, - showCancel: false - }); - }); - }, - - 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, - newUrl: res.data.imgUrl - }) - } else { - _this.setData({ - showIf: false - }) - } - _this.setData({ - staticGamedata: res.data - }) - }) - .catch(err => { - _this.setData({ - showIf: false - }) - 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, - }) - } else { - _this.setData({ - showGame: false - }) - } - _this.setData({ - gamedata: res.data - }) - }) - .catch(err => { - _this.setData({ - showGame: false - }) - this.alphaClick(); - }) - }, - /** - * mallinfo - */ - getMallInfo: function(token) { - let that = this; - Http.get({ - url: config.api.getMallInfo, - data: { - token: token, - } - }).then(res => { - that.setData({ - weappShareTitle: res.data.weappShareTitle ? res.data.weappShareTitle : null, - weappShareCoverImg: res.data.weappShareCoverImg ? res.data.weappShareCoverImg : null, - }); - }) - .catch(err => { - // 不需要错误提示 - }); - }, - //获取限时抢购列表 - getxsList(){ - let that = this; - Http.get({ - url: config.api.couponChannelList, - data: { - pageNum: 1, - pageSize: 3, - targetAd: 2 - } - }).then(res => { - if (res && res.data.total>0) { - that.setData({ - xslist: res.data.list, - showQg:true - }); - }else{ - that.setData({ - showQg:false - }) - } - }) - .catch(err => { - console.log(err) - wx.showToast({ - title: err.errMsg, - icon: 'none', - duration: 2000, - mask: false - }); - }) - }, - /** - * banner - */ - getBannerlist: function() { - let that = this; - Http.get({ - url: config.api.bannerlist, - data: { - pageNum: 1, - pageSize: 7 - } - }).then(res => { - // that.getmemberId(app.globalData.token); - // that.checkUserCarStatus(); - that.setData({ - list: res.data.list - }); - }) - .catch(err => { - // that.getmemberId(app.globalData.token); - // that.checkUserCarStatus(); - }); - }, - // 专题显示 - topicShow: function() { - let that = this; - Http.get({ - url: config.api.topicShow, - data: { - token: app.globalData.token - } - }).then(res => { - if (res && res.data) { - that.setData({ - name: res.data.name, - cover: res.data.cover, - id: res.data.id, - showTopic: true - }) - } else { - that.setData({ - showTopic: false - }) - } - }) - .catch(err => { - console.log(err); - }) - }, - gotoTopic() { - wx.navigateTo({ - url: `/pages/topicDetail/index?id=${this.data.id}` - }) - }, - /** - * 检查用户是否有车 - */ - // 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.getWeapNote(); - that.setData({ - page: 1 - }) - if (this.data.optionsData != null && (this.data.optionsData.couponChannelId || this.data.optionsData.orderId)) { - this.getWeapNote(this.data.optionsData.couponChannelId, this.data.optionsData.orderId); - } else { - this.getWeapNote() - } - 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(); - }; - // 砍价下拉刷新 - // that.selectComponent("#bargain").getList(); - // that.selectComponent("#spellGroup").getList(); - // that.selectComponent("#rushtobyCard").getList(); - wx.stopPullDownRefresh(); - //爆款专区下拉刷新 - that.selectComponent("#hot").getList(); - that.getxsList(); - that.topicShow(); - }, - //加载更多 - 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.weappShareTitle, - imageUrl: this.data.weappShareCoverImg, - // desc: this.data.desc, - success: function(res) { - wx.showToast({ - title: "分享成功", - duration: 1000, - icon: "success" - }); - } - }; - } -}); \ No newline at end of file diff --git a/pages/main/index.json b/pages/main/index.json deleted file mode 100644 index 449949c..0000000 --- a/pages/main/index.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "usingComponents": { - "c-banner": "../../components/banner/index", - "discount-card": "../../components/discountCard/index", - "c-coupons": "./coupons/index", - "g-entry": "../../components/gameentry/gentry", - "c-hot": "../../components/hot/index", - "navbar": "../../components/navbar/navbar" - }, - "enablePullDownRefresh": true, - "navigationBarBackgroundColor": "#F4F5F9" -} diff --git a/pages/main/index.wxml b/pages/main/index.wxml deleted file mode 100644 index 62d8b26..0000000 --- a/pages/main/index.wxml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - {{levelName}} - - - - - 还需{{upgradeScore}}成长值可升级 - - - - - - - - - - - - - - - - 砍价 - - - - 拼团 - - - - 消费卡 - - - - 游戏频道 - - - - 积分商城 - - - - - - - - - 今日好物推荐, - '{{xslist[0].title}}'原价 {{xslist[0].priceStr}} 现价... - - 抢购 - - - - - - - - - - - - - 您今日签到成功,获得{{fistLogin}}成长值 - diff --git a/pages/main/index.wxss b/pages/main/index.wxss deleted file mode 100644 index c91f8cc..0000000 --- a/pages/main/index.wxss +++ /dev/null @@ -1,482 +0,0 @@ - @import "../../app.wxss"; -page{ - background: #F4F5F9; -} -.index-position { - background: rgba(0, 0, 0, 0.5); - height: 88rpx; - position: absolute; - top: 0; - width: 100%; - font-family: PingFangSC-Semibold; - font-size: 30rpx; - color: #fff; - letter-spacing: 0.75rpx; - z-index: 9; - line-height: 88rpx; - overflow: hidden; -} - -.red{ - position:absolute; - width:13rpx; - height:13rpx; - border-radius:50%; - background:red; - right:-50rpx; - top:19rpx; - left:0; - margin:auto; - display: none; -} -page { - width: 100%; - height: auto !important; - overflow-x: hidden; -} - -.txt { - margin-left: 20rpx; -} - -.game-entry { - position: fixed; - right: 27rpx; - bottom:323rpx; - width: 120rpx; - margin: 37rpx auto 0; - z-index: 10; -} - -.gameimg { - display: block; - width: 100%; -} - -.userinfo{ - width:690rpx; - height: 96rpx; - border-radius:16rpx; - display: flex; - justify-content: space-between; - margin: 0 auto 30rpx; -} -.infoLeft{ - height: 100%; - border-radius:12rpx; - background: #FFF; -} -.section { - padding: 0 20rpx; - justify-content: space-around; - text-align: center; - margin-top: 25rpx; - margin-bottom: 30rpx; -} -.sellsection{ - margin-bottom: 37rpx; - padding: 0 38rpx; -} -.section >view,.sellsection>view{ - width: 25%; - display: inline-block; - position: relative; -} -.section >view image,.sellsection>view image{ - display: block; - margin: 0 auto; -} -.section >view image { - width: 55rpx; - height: 55rpx; - margin-top: 20rpx; - margin-bottom: 14rpx; -} -.sellsection>view image{ - width: 159rpx; - height: 134rpx; -} -.section text { - 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 { - /* position: absolute; - top: 0; - bottom: 0; */ - margin: 15rpx 20rpx 15rpx; - z-index:100; -} - -.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: none; - 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; -} -.memberIds{ - padding-top: 30rpx; - font-size: 30rpx; -} -.search{ - background:rgba(2, 192, 255, 1); - height: 50rpx; -} -.searchbar{ - position: relative; - width: 685rpx; - height: 76rpx; - margin: 0 auto; - text-align: center; -} -.searchbar image{ - width: 40rpx; -} -.searchbar text{ - font-size: 28rpx; - line-height: 50rpx; - color: #fff; - display: inline-block; -} -.user-avatar { - width: 80rpx; - height: 80rpx; - border-radius: 50%; - overflow: hidden; - float: left; - margin: 10rpx 10rpx; -} -.user-avatar open-data { - display:block; - width:100%; - height:100%; -} -.user-data { - letter-spacing: 0.64rpx; - line-height: 46rpx; - font-size: 30rpx; - color: #333; - background: #FFF; - margin-top: 10rpx; - margin-bottom: 26rpx; - float: right; - display: flex; - flex-direction: column; -} - -.nameBox open-data{ - float: left; -} -.chengzhangBox{ - height:32rpx; - line-height: 26rpx; - border-radius:9px 9px 9px 0px; - font-family:PingFangSC-Regular; - font-weight:400; - color:rgba(255,255,255,1); - float: left; - margin-top: 8rpx; -} -.chengzhang { - font-size: 22rpx; - font-weight: 400; - color: #FFFFFF; - height:22rpx; - line-height: 22rpx; - padding: 0 8rpx; -} -.integral{ - margin-left: 70rpx; -} -.jifen{ - display: inline-block; - height: 34rpx; - color: #999999; - font-size:24rpx; - line-height: 34rpx; -} -.jifenNumber{ - color:#D18B4C; - font-size: 34rpx; - line-height: 34rpx; - margin-left: 10rpx; - font-weight: bold; -} -.view { - display: flex; - font-size: 24rpx; - color: #999999; -} -.view>.score{ - margin-left:9rpx; - color:#333333; - font-size:30rpx; - margin-right:23rpx; - font-family:PingFang-SC-Bold; -} -.qrcode{ - width: 106rpx; - height: 96rpx; - background: #FFF; - border-radius:12rpx; -} -.qrcodeimg{ - width: 68rpx!important; - height: 68rpx!important; -} -.leftimg{ - position: absolute; - right: 40rpx; - top: 60rpx; - margin-top: -7rpx; - width: 14rpx; - height: 26rpx; -} -.duihuanimg{ - display: block; - width: 48rpx; - margin-top: 6rpx; -} -.product{ - width: 710rpx; - margin: 30rpx auto 10rpx; - border-radius: 16rpx; - overflow: hidden; -} -.product image{ - display: block; - width: 100%; -} -.textBox{ - /* display: block; */ - width: 400rpx; - height: 100%; - float: left; - margin-left: 10rpx; -} -.textBox .name{ - width: 400rpx; - font-size: 28rpx; - color: #3C3C3C; - margin-top: 20rpx; -} -.textBox .title{ - width: 400rpx; - font-size: 20rpx; - color: #A6A6A6; - margin-top: 10rpx; -} - -.product .gift{ - width:88rpx; - height:88rpx; - float: left; - margin-top: 30rpx; - margin-left: 15rpx; -} -.next image{ - width: 26rpx; - height: 40rpx; -} -.gift image{ - width:88rpx; - height:76rpx; -} -.product .next{ - width:32rpx; - height:60rpx; - float: right; - margin-top: 40rpx; - margin-right: 26rpx; -} -#rushtobyCard{ - margin-top: 30rpx; -} -.signin{ - width: 542rpx; - height: 94rpx; - position: fixed; - top: 0; - left: 0; - right: 0; - z-index: 100; - margin: auto; -} -.signin open-data { - position: absolute; - width:90rpx; - left: 0; - top: 0; - bottom: 0; - height:94rpx; - margin: auto; - border-radius: 50%; - overflow: hidden; -} -.signin text{ - display: block; - background: rgba(0, 0, 0, 0.5); - font-size: 28rpx; - height: 80rpx; - width: 100%; - line-height: 80rpx; - color: #D6D5D5; - text-indent: 4em; - border-radius:60rpx; - margin-top: 7rpx; -} -.remainchengzhangzhi{ - display: block; - color: #A6A6A6; - font-size: 22rpx; - margin-top: 5rpx; - height: 30rpx; - line-height: 30rpx; - float: left; - margin-left:10rpx; - width: 255rpx; - overflow: hidden; - text-overflow:ellipsis; - white-space: nowrap; -} -progress{ - width:200rpx; - border-radius:60rpx; - overflow:hidden; - float: left; - margin-top: 10rpx; -} -.channelBox{ - width:688rpx; - height: 220rpx; - margin:0 auto; - display: flex; - justify-content: space-between; - background: #F4F5F9; -} -.kjBox{ - width: 104rpx; - height: 148rpx; - font-size: 24rpx; - color: #A6A6A6; - margin-top: 46rpx; - text-align: center; -} -.kjBox image{ - width: 104rpx; - height: 104rpx; -} -.toutiao{ - width:710rpx; - height: 82rpx; - line-height: 82rpx; - margin:0 auto; - background: #FFF; - box-shadow:0px 6rpx 16rpx 0px rgba(236,238,243,1); - border-radius:12rpx; - margin-top: 18rpx; - margin-bottom:18rpx; - position: relative; -} -.toutiao view:nth-child(2){ - font-size:26rpx; - font-family:PingFangSC-Regular; - font-weight:400; - color:rgba(60,60,60,1); - float: left; - width: 500rpx; - overflow: hidden; - text-overflow:ellipsis; - white-space: nowrap; -} -.toutiao view:nth-child(2) text:nth-child(1){ - color: red; -} -.toutiao view:nth-child(2) text:nth-child(2){ - text-decoration: line-through; - color: red; -} -.toutiao .imgBox{ - width: 64rpx; - height: 64rpx; - float: left; - margin:5rpx 0 5rpx 20rpx; -} -.toutiao image{ - width: 48rpx; - height: 38rpx; - margin: auto; -} -.toutiao .qg{ - width: 80rpx; - height: 44rpx; - line-height: 44rpx; - border-radius:18rpx; - border:2rpx solid; - position: absolute; - top: 0; - bottom: 0; - right: 20rpx; - margin: auto; - font-size:24rpx; - font-family:PingFangSC-Medium; - font-weight:500; - color:#FD782D; - text-align: center; -} - - -i-tabs i-tabs-scroll{ - background: #F4F5F9!important; -} - diff --git a/pages/order/index/index.js b/pages/order/index/index.js index 37ca9ea..dc1d53b 100644 --- a/pages/order/index/index.js +++ b/pages/order/index/index.js @@ -35,7 +35,7 @@ Page({ }, goback: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, onLoad(e) { diff --git a/pages/passCar/couponList/couponList.wxml b/pages/passCar/couponList/couponList.wxml index ec654aa..c4ccd1a 100644 --- a/pages/passCar/couponList/couponList.wxml +++ b/pages/passCar/couponList/couponList.wxml @@ -9,7 +9,7 @@ 请您敬请期待 我们正在筹备一大波优惠活动 - + diff --git a/pages/passCar/passCar.js b/pages/passCar/passCar.js deleted file mode 100644 index c5d8184..0000000 --- a/pages/passCar/passCar.js +++ /dev/null @@ -1,768 +0,0 @@ -const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px' -const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} -let app = getApp(); -const format = require("../../utils/util.js"); -let config = require("../../config/config.js"); -let Http = require("../../utils/HttpBasics"); -let Util = require("../../utils/util"); -const imgurl = require("../../utils/imgurl"); -Page({ - data: { - navigationBarHeight, - jianUrl: imgurl.jian.url, - jiaofeiwm: imgurl.jiaofeiwm.url, - parkUrl: imgurl.park.url, - guanliHr: imgurl.guanliHr.url, - qidaiUrl: imgurl.qidai.url, - addUrl: imgurl.add.url, - tingcheHr: imgurl.tingcheHr.url, - cheUrl: imgurl.che.url, - jiaofei: imgurl.jiaofei.url, - wentiHr: imgurl.wentiHr.url, - park: null, - carList: [], - payList: [], - addCar: null, - tcq: 2, - flag: "", - extraData: {}, - desc: '', - title: '', - indicatorDots: true, - autoplay: false, - interval: 5000, - duration: 1000, - current: 0, - stopFees: {}, - scroll: true, - ifHaveCarModular: "", - canIUse: wx.canIUse("navigator"), - showTicketModal: false, - ticketList: [], - noCoupon:imgurl.noCoupon.url, - loadingUrl: imgurl.loading.url, - allow_load: true, - curPageNum: 1, - curPageSize: 15, - curTotalpageNum: 0, - quantitle: '', - quanid: '', - gouHr: imgurl.gouHr.url, - totalTicketNum: 0, - - }, - getMoreList(e) { - let totalNum = this.data.ticketList.length; - if (this.data.curPageNum < this.data.curTotalpageNum) { - this.setData({ - curPageNum: this.data.curPageNum+1 - }) - this.getTicketList(0 ,this.data.curPageNum); - } - - }, - /** - * 选择使用的优惠券 - */ - choicecoupon: function(e) { - /* wx.navigateBack(); - var pages = getCurrentPages(); - var prevPage = pages[pages.length - 2] //上一个页面 */ - var that = this; - var quantitle = e.currentTarget.dataset.title; - var quanid = e.currentTarget.dataset.id; - this.setData({ - quantitle: quantitle, - quanid: quanid, - showTicketModal: false, - }); - - that.bindCoupon(that.data.quanid); - /* wx.setStorage({ - key: 'chosed', - data: 'chosed', - }) */ - }, - /* - */ - getTicketList(key, pageNum) { - var that = this; - if (that.data.allow_load) { - wx.showLoading({ - title: "加载中" - }); - Http.get({ - url: config.api.couponOrderCarList, - data: { - pageNum: pageNum, - pageSize: 15, - couponOrderStatus: key - } - }).then(res => { - that.setData({ - curTotalpageNum: res.data.pages, - curPageNum: res.data.pageNum, - totalTicketNum: res.data.total - }) - res.data.list.map(file => { - file.expiredTime = format.formatTime( - file.expiredTime, - "yyyy-MM-dd hh:mm:ss" - ); - }); - setTimeout(function () { - wx.hideLoading(); - }, 1200); - if (pageNum >= res.data.pages) { - that.setData({ - allow_load: false - }); - } - /** - * 先赋值后渲染页面 - * concat 不会改变原数组值 - * push 会改变原数组值,但不会一条一条插入,而是整个数组插入 - */ - if (pageNum == 1) { - that.setData({ - ticketList: res.data.list, - curPageNum: pageNum - }); - } else { - that.setData({ - ticketList: that.data.ticketList.concat(res.data.list) - }); - } - // that.data.ticketList = that.data.ticketList.concat(res.data.list); - - this.hideLoading(); - }) - .catch(err => { - setTimeout(function () { - wx.hideLoading(); - }, 1200); - wx.showToast({ - title: err.errMsg, - icon: 'none', - duration: 2000, - mask: false - }); - }) - } else { - } - }, - //点击跳转到券详情页面 - gotouse: function (e) { - wx.navigateTo({ - url: `/pages/passCar/couponDetail/couponDetail?quancode=${ - e.currentTarget.dataset.quancode - }`, - success: function (res) { - // success - }, - fail: function () { - // fail - }, - complete: function () { - // complete - } - }); - }, - /** - * 车牌轮播滑动 - */ - onSlideChangeEnd: function (e) { - var that = this; - /** - * 获得当前的车牌号码 - */ - var listCardNum = (that.data.carList)[e.detail.current].carNumber; - that.setData({ - listCardNum: listCardNum - }); - /** - * 获得停车费用 - */ - if (that.data.scroll) { - that.getStopFee(listCardNum); - } - }, - - //停车费用为0 - paySuccess: function () { - wx.showModal({ - title: '支付成功', - content: '请尽快离场', - showCancel: false - }) - }, - - gotomange: function () { - wx.navigateTo({ - url: '/pages/managelicenseplate/managelicenseplate', - }) - }, - bindfail: function (res) { - console.log(res) - }, - gotoetcp: function () { - wx.navigateToMiniProgram({ - appId: that.data.etcpAppId, - extraData: this.data.extraData, - envVersion: 'release', - path: "pages/main/main", - }) - }, - showquan: function () { - wx.navigateTo({ - url: '/pages/passCar/couponList/couponList', - }) - }, - gotodetail: function (e) { - wx.showModal({ - title: '缴费规则', - content: e.target.dataset.rule, - showCancel: false, - }) - }, - onShow: function (options) { - console.log(123) - var that = this; - that.setData({ - etcpAppId: extConfig.attr.etcpAppId, - etcpVersion: extConfig.attr.etcpVersion, - etcpCallbackUrl: extConfig.attr.etcpCallbackUrl, - ifHaveCarModular: extConfig.attr.ifHaveCarModular - }) - if (app.globalData.token) { - that.getList(); - that.init(); - } else { - that.init(); - } - /** - * 只有用户选择了优惠券 - * 才会进行券和车牌的绑定 - */ - /* if (wx.getStorageSync("chosed") && that.data.quanid) { - that.getStopFee(that.data.listCardNum); - that.bindCoupon(that.data.quanid); - wx.setStorage({ - key: 'chosed', - data: '', - }) - }; */ - if (app.globalData.token) { - // that.initUsrCarList(); - that.initUsrCarList("flags"); - that.setData({ - current: 0 - }) - } - - if (that.data.addCar) { - // 绑车牌 - if (app.globalData.carLogin) { - that.bindCar(that.data.addCar); - } else { - that.bindCar(that.data.addCar); - } - that.setData({ - addCar: null - }); - } - - this.getTicketList(0, 1); - - - - }, - cancelMove: function() { - console.log(111) - return false; - }, - onHide: function () { - this.setData({ - allow_load: true, - showTicketModal: false, - curPageNum: 1, - ticketList: [] - }) - }, - onLoad: function (options) { - var that = this; - /** - * 获得分享小程序的 - * title - * desc - */ - Http.get({ - url: config.api.getWeapNote, - data: { - appId: config.weapp.AppId, - } - }) - .then(res => { - let weapNote = JSON.parse(res.data.weapNote); - that.setData({ - desc: weapNote.carpage.desc, - title: weapNote.carpage.title - }) - }) - .catch(err => { - console.log(err); - }) - // 登录 - var scene = decodeURIComponent(options.scene); - that.setData({ - scene: scene - }); - if (app.globalData.token) { } else { - // app.getLocation(); - that.userLogin() - } - - }, - /** - * 用户登录 - */ - userLogin: function () { - var that = this; - // 登录 - wx.login({ - success: ({ - code - }) => { - wx.getSystemInfo({ - success: function (res) { - that.setData({ - systemInfo: JSON.stringify(res) - }) - } - }) - var usrdata = { - appId: config.weapp.AppId, - code: code, - sceneAddress: app.globalData.sceneAddress, - scene: that.data.scene, - systemInfo: that.data.systemInfo - }; - if (app.globalData.locationInfo) { - usrdata = { - appId: config.weapp.AppId, - code: code, - sceneAddress: app.globalData.sceneAddress, - latitude: "" + app.globalData.locationInfo.latitude, - longitude: "" + app.globalData.locationInfo.longitude, - scene: that.data.scene, - systemInfo: that.data.systemInfo - }; - } - Http.post({ - url: config.api.login, - data: usrdata - }) - .then(res => { - app.globalData.token = res.data.token; - Http.setToken(res.data.token); - that.checkUserCarStatus(); - that.getList(); - that.init(); - that.initUsrCarList(); - return Http.get({ - url: config.api.checkUserStatus, - data: {} - }); - }) - .then(res => { }) - .catch(err => { - if (err.code == 11004) { - // 用户昵称未授权 - wx.redirectTo({ - url: "/pages/getuserinfo/index" - }); - } else { - wx.showModal({ - title: '提示', - content: err.errMsg, - showCancel: false - }) - } - }); - } - }); - }, - /** - * 检查用户是否有车 - */ - 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(); - } - }) - .catch(err => { }) - }, - jumpToAdd: function () { - wx.navigateTo({ - url: `/pages/addPark/addPark?flags=managepalte` - }); - }, - passc: function () { - wx.navigateTo({ - url: '/pages/ques/ques', - }) - }, - - - /** - * 券绑定车牌 - */ - bindCoupon: function (quanid) { - var that = this; - /** - * etcp - */ - var etcpData = { - etcpToken: app.globalData.etcpToken, - carNumber: that.data.listCardNum, - couponOrderId: quanid - }; - /** - * 停简单 - */ - var tjdData = { - carNumber: that.data.listCardNum - }; - var postCouponData = app.globalData.parkVendor == 1 ? etcpData : tjdData; - Http.post({ - url: config.api.getCarCoupon, - data: postCouponData - }) - .then(res => { - that.getStopFee(that.data.listCardNum); - that.initUsrCarList(); - }) - .catch(err => { - if (err.message!=undefined) { - wx.showToast({ - title: err.message, - icon: 'none', - duration: 2000, - mask: false - }); - } - - }) - }, - /** - * 选择优惠券 - */ - // gotoquan: function () { - // let that = this; - // if (that.data.quanid) { - // wx.navigateTo({ - // url: `/pages/passCar/choicecoupon/choicecoupon?quanid=${that.data.quanid}`, - // }) - // } else { - // wx.navigateTo({ - // url: '/pages/passCar/choicecoupon/choicecoupon', - // }) - // } - - // }, - closeTicketModal: function () { - this.setData({ - showTicketModal: false - }) - }, - /** - * 停车券 弹框 - */ - openTicketModal: function () { - this.setData({ - showTicketModal: true, - allow_load: true, - ticketList: [], - curPageNum: 1, - - }) - this.getTicketList(0, 1); - /* if (!this.data.ticketList.length){ - this.getTicketList(0, 1); - } */ - - }, - - //获取名下停车券列表 - getList() { - var that = this; - Http.get({ - url: config.api.couponOrderCarList + "?type=5&couponOrderStatus=0", - data: { - pageNum: 1, - pageSize: 15, - couponOrderStatus: 0 - } - }).then(res => { - that.setData({ - couponList: res.data.list - }); - }) - .catch(err => { - console.log(err) - }) - }, - - - /** - * 共同登录 - */ - init: function (carNumber) { - var that = this; - app.parkInitCallback = token => { - that.initPark(); - that.getParkStatus(); - if (!app.globalData.carLogin) { - /** - * 判断是否授权手机号 - */ - Http.get({ - url: config.api.checkPhoneStatus, - data: {} - }) - .then(res => { - 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) { - app.globalData.etcpToken = res.data.token; - } - /** - * 获得停车费用 - */ - that.initUsrCarList("flags"); - }); - }) - .catch(err => { - if (err.code == 11005) { - // 用户手机未授权 - /** - * 将值传到用户手机号授权的页面 - * - */ - wx.redirectTo({ - url: "/pages/getphoneInfo/index" - }); - } else if (err.code == 11006) { - // 用户手机已加密 - wx.redirectTo({ - url: "/pages/phoneinput/phoneinput" - }); - } else { - wx.showToast({ - title: err.errMsg, - icon: 'none', - duration: 2000, - mask: false - }); - } - }) - } - }; - if (app.globalData.token && app.globalData.token != null) { - app.parkInitCallback(app.globalData.token); - } - }, - - bindCar: function (carNum) { - var that = this; - // ETCP - var etcpData = { - etcpToken: app.globalData.etcpToken, - carNumber: carNum - }; - var tjdData = { - carNumber: carNum - }; - var postData = app.globalData.parkVendor == 1 ? etcpData : tjdData; - Http.post({ - url: config.api.bindCar, - data: postData - }) - .then(res => { - that.setData({ - addCar: null - }); - that.initUsrCarList(); - wx.showModal({ - title: "提示", - showCancel: false, - content: "绑车牌成功!", - success: function () { } - }); - }) - .catch(error => { - wx.showModal({ - title: "提示", - showCancel: false, - content: error.data.message, - success: function () { } - }); - }); - }, - /** - * 车场信息获取 - */ - initPark: function () { - var that = this; - Http.get({ - url: config.api.getParkInfo, - data: {} - }) - .then(res => { - that.setData({ - park: res.data - }) - }) - .catch(err => { - console.log(err); - // wx.showToast({ - // title: err.message, - // icon: 'none', - // duration: 2000, - // mask: false - // }); - }) - }, - - /** - * 车场状态获取 - */ - getParkStatus: function () { - var that = this; - Http.get({ - url: config.api.getParkStatus, - }) - .then(res => { - console.log(res) - }) - .catch(err => { - console.log(err) - // wx.showToast({ - // title: err.message, - // icon:"none" - // }) - }) - }, - - - /** - * 绑定车获取 - */ - initUsrCarList: function (flag) { - var that = this; - Http.get({ - url: config.api.getUserCarList, - data: {} - }).then(res => { - that.setData({ - carList: res.data - }); - /** - * flag ==flags - * 表示从首页onShow进来的 - */ - if (flag == "flags" && res.data.length > 0) { - var listCardNum = res.data[0].carNumber; - that.setData({ - listCardNum: listCardNum - }) - /** - * 获得停车费用 - */ - that.getStopFee(listCardNum); - } - }) - .catch(err => { - wx.showToast({ - title: err.message, - icon: 'none', - duration: 2000, - mask: false - }); - }) - }, - - /** - * 获得停车费用修改 - */ - getStopFee: function (carNumber) { - let that = this; - let postData = - app.globalData.parkVendor == 1 ? { - etcpToken: app.globalData.etcpToken, - carNumber: carNumber - } : { - carNumber: carNumber, - outCarId: outCarId - }; - Http.post({ - url: config.api.getCarStopFee, - data: postData - }) - .then(res => { - console.log(res) - var extraDataStr = { - params: { - token: app.globalData.etcpToken, - syncId: res.data.orderId, - payType: 6, // 小程序支付 - CarNumber: carNumber, - returnUrl: that.data.etcpCallbackUrl, - source: "FUMAO-001", - actionId: "1" //操作ID,1:小程序支付 - } - }; - that.setData({ - extraData: extraDataStr, - stopFees: res.data, - timecha: Util.timecha(res.data.exitTime, res.data.entranceTime) - }); - that.setData({ - scroll: true - }) - }) - .catch(error => { - that.setData({ - stopFees: {}, - scroll: true - }) - }); - }, - - /** - * 下拉刷新 - */ - onPullDownRefresh: function (e) { - let that = this; - that.initUsrCarList("flags"); - that.setData({ - current:0 - }) - wx.stopPullDownRefresh(); - } -}); \ No newline at end of file diff --git a/pages/passCar/passCar.json b/pages/passCar/passCar.json deleted file mode 100644 index 23e8fd5..0000000 --- a/pages/passCar/passCar.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "component": true, - "usingComponents": { - "navbar": "../../../components/navbar/navbar" - }, - "navigationBarTitleText": "智能停车", - "enablePullDownRefresh": true -} \ No newline at end of file diff --git a/pages/passCar/passCar.wxml b/pages/passCar/passCar.wxml deleted file mode 100644 index 2a549d1..0000000 --- a/pages/passCar/passCar.wxml +++ /dev/null @@ -1,157 +0,0 @@ - - - - - {{park.addr}} - ({{park.number}}车位) - - - - - - - - - - - {{item.carNumber}} - - - - - - - - - - - 入场时间: - {{stopFees.entranceTime}} - - - 停车时长: - {{timecha}} - - - - - 优惠券: - - {{quantitle}} - {{totalTicketNum}}张可用 - - - - - - 待缴费用: - {{stopFees.remainingFee}}元 - - - - - 立即支付 - - 立即支付 - - - - 立即支付 - - - - - - - - 添加车牌 - - 车辆入场后,才能绑车牌 - - - - - 我的停车券 - - - - - - - - 车辆管理 - - - - - - - - 缴费规则 - - - - - - - - 常见问题 - - - - - - - - - 智慧停车即将上线 - 敬请期待 - - - - - - - - 请您敬请期待 - 我们正在筹备一大波优惠活动 - - - - - - 停车券 - - - - - - - - - - - {{item.title}} - - - {{item.subTitle}} - - - 售价:{{item.salePrice/100}}元{{item.price/100}}元 - {{item.price/100}}小时 - - - - - - 有效期至: - {{item.expiredTime}} - - - - - - {{content}} - - - \ No newline at end of file diff --git a/pages/passCar/passCar.wxss b/pages/passCar/passCar.wxss deleted file mode 100644 index 24b500b..0000000 --- a/pages/passCar/passCar.wxss +++ /dev/null @@ -1,881 +0,0 @@ -@import "../../app.wxss"; - -page { - background-color: #fff; -} -.container{ - padding-bottom: 60rpx; -} -.con text{ - display: block; - text-align: center; - font-size: 30rpx; -} -.header{ - width: 690rpx; - height: 80rpx; - font-size: 32rpx; - margin: 0 auto; - border-radius:16rpx; - line-height: 80rpx; - letter-spacing: 3rpx; -} -.header image{ - width: 60rpx; - vertical-align: middle; - margin-top:-5rpx; - margin-right:6rpx; -} -.top{ - border-bottom:2rpx solid #f8f8f8; -} -.headBox { - width: 690rpx; - margin: 30rpx auto 0; - box-sizing: border-box; - display: flex; - background-color: white; -} - -.headBox image { - width: 150rpx; - height: 150rpx; - margin: 10rpx 30rpx 0 0; - border-radius: 16rpx; -} - -.titleName { - width: 100%; - line-height: 35rpx; - height: 35rpx; - color: #666; - font-size: 32rpx; - word-break: break-all; - text-align: justify; - font-weight: bold; -} - -::-webkit-scrollbar { - width: 0; - height: 0; - color: transparent; -} - -.carLocation, .locationNumber { - display: inline-block; - height: 40rpx; - color: #999; - font-size: 24rpx; - line-height: 30rpx; -} - -.carLocation { - width: 206rpx; - font-size: 28rpx; -} - - - -.price { - width: 690rpx; - font-size: 28rpx; - color: #999; - margin: 10rpx auto 0; -} - -.time { - color: #999 !important; -} - -.price .fl { - width: 15%; - color: #333; -} - -.price .fr { - width: 85%; - color: #999; - line-height: 40rpx; - font-size: 26rpx; -} - -.titleName .fr { - color: #999; - font-size: 27rpx; -} - -.borderBox { - width: 750rpx; - margin-top:30rpx; -} - -.borderUp { - width: 680rpx; - margin: 0 auto; - font-size: 36rpx; - border: 2rpx dashed #FD832D; - border-radius: 16rpx; - padding-bottom: 40rpx; - height: 202rpx; - margin-top: 47rpx; -} - -.addicense_active { - width: 690rpx; - /* box-shadow: 0 4rpx 20rpx 0 rgba(153, 153, 153, 0.35); */ - border-radius: 12rpx; - /* background: #02c0ff; *//* padding-bottom: 40rpx; */ -} - -.myCar { - display: block; - text-align: center; - font-size: 34rpx; - color: #02c0ff; - letter-spacing: 0; -} - -.carNumber { - display: block; - height: 50rpx; - line-height: 50rpx; - text-align: center; - font-size: 26rpx; - color: #999; - letter-spacing: 0; - margin-top: 10rpx; -} - -.addBox { - width: 750rpx; - position: relative; - background-color: white; -} - -.add { - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - font-size: 34rpx; - color: #666; - border: 2px dashed #eee; - padding: 30rpx 50rpx; - border-radius: 16rpx; -} - -.add text { - font-size: 40rpx; -} - -.bottonBox { - width: 750rpx; - margin-top: 34rpx; - margin-bottom: 80rpx; - border-top: 16rpx #f8f8f8 solid; -} -.bottonBox view:nth-of-type(1) image{ - height: 45rpx; -} - -.textStyle { - background-color: white; - height: 88rpx; - line-height: 88rpx; - padding-left: 82rpx; - border-bottom: 1px #f8f8f8 solid; - position: relative; - font-size: 30rpx; - color: #333; - letter-spacing: 1.16rpx; -} - -.textStyle image { - width: 40rpx; - height: 40rpx; - top: 24rpx; - left: 27rpx; - position: absolute; -} - -.swiper { - position: relative; - margin: 0 auto; - height: 262rpx; -} - -.swiper-item { - width: 365rpx; - font-size: 75rpx; - font-weight: 400; - text-align: center; - color: rgba(255, 255, 255, 1); -} - -.swiper-item .clearfix1 { - background: linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); - border-radius: 12rpx; - padding: 6rpx; -} - -.tche { - width: 685rpx; - height: 88rpx; - line-height: 88rpx; - margin: 0 auto; - background: #00c0ff; - border-radius: 60rpx; - position: relative; - margin-top: 30rpx; -} - -.txt01 { - width: 667rpx; - height: 180rpx; - line-height: 180rpx; - float: left; - background: linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); - border-radius: 12rpx; - border: 3px solid #fff; - text-align: center; - font-size: 60rpx; -} - -.passNumberBox { - width: 690rpx; - margin: 32rpx auto 0; - position: relative; - background-color: white; -} - -.numberBox { - width: 100%; -} - -.passNumber { - width: 400rpx; - height: 100rpx; - font-size: 32rpx; - font-weight: 600; - line-height: 100rpx; - left: 55rpx; - position: absolute; -} - -.nopay { - height: 80rpx; - line-height: 80rpx; - font-weight: 400; -} - -.number { - font-size: 48rpx; - color: #1f2d3d; - letter-spacing: 0; - line-height: 52rpx; - font-weight: 400; -} - -.manage_plate { - width: 65%; - border-radius: 80rpx; - margin: 40rpx auto 0; - background: #02c0ff; - color: #fff; - text-align: center; - font-size: 30rpx; -} - -.button_active { - opacity: 0.6; -} - -.btn001 { - height: 88rpx; - line-height: 88rpx; - margin: 0 auto; - font-size: 30rpx; - font-weight: 400; - color: #fff; - background: none; -} - -.parkPrice { - font-size: 30rpx; - font-weight: 500; -} - -.deleteButton { - font-size: 28rpx; - line-height: 50rpx; - height: 50rpx; - top: 50%; - right: 30rpx; - position: absolute; - transform: translate(0, -50%); - color: white; - background-color: #00c0ff !important; -} - -.deleteButton button { - background-color: #00c0ff !important; -} - -.detail { - width: 32rpx; - height: 32rpx; - right: 34rpx; - top: 32rpx; - position: absolute; -} - -.detail image { - width: 44rpx; - height: 44rpx; - position: absolute; - left: 0; - top: 0; -} - -.voucher { - width: 90%; - padding: 0 5%; - background-color: #fff; - /* background-color: #cbcbcb; */ - height: 80rpx; - position: relative; - margin: 0 0 12rpx 0; - border-bottom: 2rpx #fff solid; - display: flex; - justify-content: space-between;; -} - -.textV1, .textV2 { - height: 58rpx; - width: 100rpx; - padding-top: 26rpx; - text-align: center; - line-height: 80rxp; - font-size: 24rpx; - color: #333; -} - -.textV2 { - margin-top: 0rpx; - padding: 0; - /* background-color: rgb(0, 192, 255); */ - border-radius: 10rpx; - width: 300rpx; - height: 80rpx; - line-height: 80rpx; - font-size: 20rpx; - border: 4rpx #fff solid; - margin-bottom: 20rpx; -} - -.textV3 { - width: 225rpx; -} -.choice { - width: 80rpx; - height: 80rpx; - position: relative; -} - -.choice image { - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - width: 30rpx; - height: 30rpx; -} - -.buy-view { - background: #fff; - position: relative; - height: 88rpx; - margin-top: 30rpx; -} - -.buy { - background: linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); - height: 88rpx; - width: 73%; - margin: 0 auto; - color: #fff; - font-size: 36rpx; - line-height: 88rpx; - border-radius: 60rpx; - position: relative; - z-index: 100; - text-align: center; -} - -.buyBox { - height: 88rpx; - line-height: 88rpx; - width: 98%; - position: absolute; - left: 0; - right: 0; - bottom: 0; - top: 0; - z-index: 100000000; - border-radius: 60rpx; -} - -.active { - opacity: 0.6; -} - -.borderBox { - width: 750rpx; -} - -.carmanage { - position: relative; - width: 690rpx; - margin: 15rpx auto 0; - height: 60rpx; - line-height: 60rpx; - /* border-bottom: 1rpx solid #eee; */ -} - -.carmanage .fr { - font-size: 28rpx; - color: #888; - letter-spacing: 1.16rpx; - text-align: right; -} - -.fl { - float: left; -} - -.fr { - float: right; -} - -.carmanage .fl { - width: 400rpx; -} - -.carmanage .fr image { - position: absolute; - top: 0; - right: 0; - bottom: 0; - margin: auto; - width: 44rpx; - height: 44rpx; -} - -.carmanage image { - width: 40rpx; - vertical-align: middle; -} - -.mycar { - display: inline-block; - font-size: 33rpx; - color: #666; - line-height: 35rpx; - letter-spacing: 1.16rpx; -} - -.num { - display: inline-block; - font-size: 26rpx; - color: #999; - letter-spacing: 0; - margin-left: 20rpx; -} - -.orderBox { - padding: 0 45rpx; - position: relative; -} - -.priceBox { - display: inline-block; - width: 355rpx; -} - -.priceBox text { - color: #333; - font-size: 28rpx; - display: block; - text-align: left; -} - -.payBox { - width: 250rpxpx; -} - -.payBox button { - width: 230rpx; - border: 0; - font-size: 32rpx; - margin-top: 13rpx; - margin-right: 20rpx; - background-color: lightgreen; - color: white; -} - -input { - outline: none; - border: none; - list-style: none; -} - -button::after { - border: none; -} - -.right { - display: inline-block; - width: 328rpx; -} - -.textRight { - margin-left: 0; - margin-right: 25rpx; - text-align: left; - font-size: 30rpx !important; - color: #333 !important; -} - -.myCars image { - width: 44rpx; - height: 44rpx; - vertical-align: middle; - margin-right: 14rpx; -} - -.myCars { - font-size: 34rpx; - color: #02c0ff; - letter-spacing: 0; - text-align: center; - padding-top: 58rpx; -} - -.dots { - position: absolute; - left: 0; - right: 0; - bottom: 19rpx; - display: flex; - justify-content: center; - height: 19rpx; - background: #fff; -} - -.dots .dot { - margin: 0 8rpx; - width: 32rpx; - height: 14rpx; - background: #ccc; - border-radius: 8rpx; - transition: all 0.6s; -} - -.dots .dot.active { - width: 49rpx; - height: 4rpx; - background: rgba(86, 189, 248, 1); - border-radius: 6rpx; -} - -.coupon { - font-size: 28rpx; - color: #666; -} - -.orderBox .fl { - line-height: 70rpx; - font-size: 28rpx; - color: #333; -} - -.orderBox .fr { - line-height: 70rpx; - font-size: 28rpx; - color: #FD832D; -} - -.jians { - font-size: 22rpx; - display: inline-block; - width: 34rpx; - height: 34rpx; - text-align: center; - background: #ff4949; - line-height: 34rpx; - color: #fff; - border-radius: 6rpx; - margin-right: 6rpx; -} -.jiant{ - display: inline-block; - width: 44rpx; - height: 44rpx; - vertical-align: middle; - margin-top: -6rpx; - margin-right: -10rpx; -} - -.img { - display: block; - width: 211rpx; - margin: 168rpx auto 40rpx; -} - -.txt1 { - font-size: 22rpx; - color: #A6A6A6; - letter-spacing: 0; -} - -.txt2 { - display: block; - font-size: 28rpx; - color: #999; - letter-spacing: 0; - text-align: center; - line-height: 40rpx; - margin-top: 10rpx; -} - -.gray-bg { - position: fixed; - left: 0; - top: 0; - width: 100%; - height: 100%; - z-index: 1000; - background: rgba(0,0,0,.2); - -} - -.ticket-modal { - position: fixed; - left: 50%; - top: 50%; - width: 80%; - height: 880rpx; - z-index: 10000; - transform: translate(-50%, -50%); - background: #fff; -} - -.nocoupon image { - width: 300rpx; - display: block; - margin: 3% auto 0; -} - -.txt001 { - display: block; - line-height: 48rpx; - font-size: 34rpx; - color: #333; - letter-spacing: 0; - text-align: center; -} - -.txt002 { - display: block; - margin-top: 1%; - font-size: 28rpx; - color: #999; - letter-spacing: 0; - line-height: 40rpx; - text-align: center; -} - -.nocoupon button { - background: linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); - color: #fff; - font-size: 30rpx; - width: 74%; - border-radius: 60rpx; - height: 78rpx; - line-height: 78rpx; - margin-top: 100rpx; -} - -.loading { - text-align: center; - height: 80rpx; - line-height: 80rpx; - font-size: 26rpx; - color: #999; -} - -.loading image { - width: 60rpx; - height: 60rpx; - vertical-align: middle; - margin-right: 10rpx; -} - -.section { - position: relative; - width: 90%; - margin-left: 5%; -} - -.mms { - width: 100%; - height: 180rpx !important; - background: #fff; - /* padding: 30rpx 0 0; */ - margin: 0 auto 40rpx; - /* border-radius: 16rpx; */ - /* border-top: 8rpx solid #02b7ff; */ - box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.10); -} - -.detail_msg { - display: flex; - padding-top: 16rpx; - padding-bottom: 16rpx; - background: linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); -} - -.logo { - width: 60rpx; - height: 60rpx; - /* border: 1px solid #f8f8f8; */ - border-radius: 50rpx; - display: block; - margin: 15rpx 20rpx 0 20rpx; -} - -.logo image { - width: 60rpx; - height: 60rpx; - border-radius: 50%; -} - -.info view:nth-child(1) { - display: flex; - justify-content: space-between; - padding: 0 4%; - margin-top: 15rpx; -} - -.info { - width: 100%; - border-left: 1rpx #FFF dashed; -} - -.info view:nth-child(1) text { - font-size: 32rpx; - line-height: 32rpx; - height: 32rpx; - color: #FFFFFF; - letter-spacing: 0; - width: 400rpx; - display: inline-block; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; -} - -.info view:nth-child(2) { - padding-left: 4%; - font-size: 22rpx; - color: #FFFFFF; - letter-spacing: 0; - margin-top: 6rpx; - display: inline-block; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - width: 400rpx; -} - -.info view:nth-child(3) { - margin-left: 20rpx; -} - -.active { - color: #fff; - opacity: 0.6; - /* background: #02c0ff; */ -} - - -.expiretime { - display: block; - width: 100%; - text-align: left; - text-indent: 1em; - height: 50rpx; - line-height: 50rpx; - font-size: 22rpx; - color: #A6A6A6; - letter-spacing: 0; -} - -.ticket-title-tip { - position: relative; - width: 100%; - height: 76rpx; - line-height: 76rpx; - text-align: center; - color: #353535; - font-size: 34rpx; -} - -.close-icon { - position: absolute; - right: 10rpx; - transform: translateY(16rpx); -} - -.btns { - position: absolute; - right: 120rpx; - top: 50rpx; - height: 48rpx; - line-height: 48rpx; - text-align: right; - color: #FFF; - font-size: 40rpx; -} - -.yuan { - color: #FFF; - font-size: 26rpx; -} - -.gou { - position: absolute; - top:45rpx; - right: 30rpx; - width: 60rpx; -} - -.swiper-box .wx-swiper-dots.wx-swiper-dots-horizontal{ -margin-bottom: 2rpx; -} -.swiper-box .wx-swiper-dot{ -width:40rpx; -display: inline-flex; -height: 6rpx; -margin-left: 10rpx; -border-radius:6rpx; -justify-content:space-between; -} -.swiper-box .wx-swiper-dot::before{ -content: ''; -flex-grow: 1; -background: #ccc8c8; -} -.swiper-box .wx-swiper-dot-active::before{ -background:#f6792b; -} \ No newline at end of file diff --git a/pages/radetail/index.js b/pages/radetail/index.js index 5c868f1..7bf3fc7 100644 --- a/pages/radetail/index.js +++ b/pages/radetail/index.js @@ -98,7 +98,7 @@ Page({ }, goback: function() { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, onShareAppMessage: function (options) { diff --git a/pages/radetail/success/index.js b/pages/radetail/success/index.js index 8bc3ecf..2b7948d 100644 --- a/pages/radetail/success/index.js +++ b/pages/radetail/success/index.js @@ -41,7 +41,7 @@ Page({ }, goback: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, /** diff --git a/pages/rushToBuy/index.js b/pages/rushToBuy/index.js index bb64876..18629f3 100644 --- a/pages/rushToBuy/index.js +++ b/pages/rushToBuy/index.js @@ -26,7 +26,7 @@ Page({ }, goback: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, //列表 diff --git a/pages/specialcourtesy/specialcourtesy.js b/pages/specialcourtesy/specialcourtesy.js index be670dd..eb88770 100644 --- a/pages/specialcourtesy/specialcourtesy.js +++ b/pages/specialcourtesy/specialcourtesy.js @@ -56,7 +56,7 @@ Page({ goback: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, /** diff --git a/pages/spellDetail/index.js b/pages/spellDetail/index.js index ee33a28..ce44347 100644 --- a/pages/spellDetail/index.js +++ b/pages/spellDetail/index.js @@ -54,7 +54,7 @@ Page({ }, gotoIndex(){ wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, gotoshare() { diff --git a/pages/spellGroup/mySpellGroup/index.js b/pages/spellGroup/mySpellGroup/index.js index 28a2de4..9bb8d47 100644 --- a/pages/spellGroup/mySpellGroup/index.js +++ b/pages/spellGroup/mySpellGroup/index.js @@ -108,7 +108,7 @@ Page({ }, gotoIndex: function() { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, /** diff --git a/pages/spellGroup/spellGroup.js b/pages/spellGroup/spellGroup.js index 112f5a4..34343ee 100644 --- a/pages/spellGroup/spellGroup.js +++ b/pages/spellGroup/spellGroup.js @@ -35,7 +35,7 @@ Page({ }, goback: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, onLoad: function (options) { diff --git a/pages/topicDetail/index.js b/pages/topicDetail/index.js index 0e701e5..cd778b6 100644 --- a/pages/topicDetail/index.js +++ b/pages/topicDetail/index.js @@ -29,7 +29,7 @@ Page({ }, goback: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, topicShow(id){ diff --git a/pages/user/index.js b/pages/user/index.js deleted file mode 100644 index 1964622..0000000 --- a/pages/user/index.js +++ /dev/null @@ -1,276 +0,0 @@ -const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' -const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} -var config = require("../../config/config.js"); -var app = getApp(); -const Http = require("../../utils/HttpBasics"); -const QR = require("../../utils/memberqrcode.js"); -const imgurl = require("../../utils/imgurl"); -const bgColor = require("../../utils/bgColor.js") -Page({ - /** - * 页面的初始数据 - */ - data: { - navigationBarHeight, - banneColor: bgColor.colorFirst.user.banneColor, - levelBg: bgColor.colorFirst.user.levelBg, - view: bgColor.colorFirst.user.view, - redirectUrl: imgurl.redirect.url, - qrcodeUrl: imgurl.qrcode.url, - editUrl: imgurl.edit.url, - activeUrl: imgurl.active.url, - dingUrl: imgurl.ding.url, - quansUrl: imgurl.quans.url, - wmintegral: imgurl.wmintegral.url, - cardiconUrl: imgurl.cardicon.url, - myactivitygift: imgurl.myactivitygift.url, - myactivity: imgurl.myactivity.url, - cheUrl: imgurl.che.url, - giftUrl: imgurl.gift.url, - wmbarginicon: imgurl.wmbarginicon.url, - wmspellgroup: imgurl.wmspellgroup.url, - canIUse: wx.canIUse('official-account'), - mineFlag:"", - flag: 'hidden', - score: '0', - name: "", - birthdate: "", - sex: "", - showEdit: false, - ismember: false, - showQrcode: false, - canvasHidden: false, - maskHidden: true, - imagePath: '', - appVersion: "", - showmemberqrcode: false, - placeholder: '' - }, - checkUserStatus() { - let that = this; - Http.get({ - url: config.api.checkPhoneStatus, - data: {} - }).then(res => { - }).catch(err => { - wx.navigateTo({ - url: `/pages/getphoneInfo/index?mineFlag=mine`, - }) - }) - }, - /** - * 跳转到成长值的页面 - */ - gotograde: function() { - wx.navigateTo({ - url: '/pages/czdetail/czdetail', - }) - }, - navigateTo() { - wx.navigateTo({ - url: `/pages/main/index` - }); - }, - showVersion: function() { - /** - * 长按显示版本号 - */ - let that = this; - if (that.data.flag == 'hidden') { - that.setData({ - flag: 'show' - }); - } - }, - gotoedit: function() { - wx.navigateTo({ - url: '/pages/edit/edit', - }) - }, - onLoad() { - this.getLocation(); - this.updateScene(); - }, - /** - * 获得经纬度 - */ - getLocation() { - let that = this; - wx.getLocation({ - type: "wgs84", - success: function(res) { - console.log(res) - if (res && res.longitude && res.latitude) { - Http.post({ - url: config.api.updateLBS, - data: { - latitude: res.latitude, - longitude: res.longitude - } - }).then(res => { - console.log(res) - }) - } - }, - fail: error => { - console.log(error); - } - }) - }, - - /** - * 用户更新scene - */ - updateScene(){ - Http.post({ - url: config.api.updateScene, - data: { - scene: app.globalData.scene - } - }).then(res => { - console.log(res) - }) - }, - /** - * 生命周期函数--监听页面显示 - */ - onShow: function() { - let that = this; - that.checkUserStatus(); - that.setData({ - appVersion: extConfig.appVersion, - }) - /** - * couponNum - * couponNum2 - */ - let num = wx.getStorageSync('couponNum'); - let num1 = wx.getStorageSync('couponNum2'); - wx.hideTabBarRedDot({ - index: 3 - }); - wx.hideTabBarRedDot({ - index: 3 - }); - if (num == 'couponNum1') { - wx.setStorage({ - key: 'couponNum', - data: "couponNum1", - }) - that.setData({ - couponNum: "couponNum1" - }) - } else if (num == 'couponNum') { - that.setData({ - couponNum: "couponNum" - }) - }; - if (num1 == 'couponNum3') { - wx.setStorage({ - key: 'couponNum2', - data: "couponNum3", - }) - that.setData({ - couponNum2: "couponNum3" - }) - } else if (num1 == 'couponNum2') { - that.setData({ - couponNum2: "couponNum2" - }); - }; - - Http.get({ - url: config.api.getScore, - data: {} - }).then(res => { - if (res.data.address && res.data.name && res.data.sex && res.data.birthdate) { - that.setData({ - showEdit: true - }) - } - that.setData({ - score: res.data.score, - 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.errMsg, - showCancel: false - }) - }) - //暂时注释 - // that.getrun(); - }, - 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); - }, - qrcode: function(e) { - var that = this; - that.setData({ - showQrcode: true - }) - wx.showToast({ - title: '生成中...', - icon: 'loading', - duration: 2000 - }); - 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, "mycanvas1", size.w, size.h); - that.setData({ - maskHidden: true - }); - clearTimeout(st); - }, 1000) - - }, - close: function() { - this.setData({ - showmemberqrcode: false, - }) - } -}); \ No newline at end of file diff --git a/pages/user/index.json b/pages/user/index.json deleted file mode 100644 index e2f3c9d..0000000 --- a/pages/user/index.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "usingComponents": { - "i-button": "../../dist/button/index", - "navbar": "../../components/navbar/navbar" - }, - "navigationBarBackgroundColor": "#FD832D", - "navigationBarTextStyle": "white", - "disableScroll": true - } \ No newline at end of file diff --git a/pages/user/index.wxml b/pages/user/index.wxml deleted file mode 100644 index 75f9d8b..0000000 --- a/pages/user/index.wxml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - {{levelName}} - - - - 我的 - 成长值{{score}} - | - - 更多成长值 - - - - - - - 我的订单 - - - - - - - 我的券包 - - - - - - - - - 我的卡包 - - - - - - - - - - - - - - - 我的砍价 - - - - - - - 我的拼团 - - - - - - - 积分商城 - - - - - - - 特享礼遇 - - - - - - 我的活动 - - - - - - - 版本号:{{appVersion}} - - - - - - - - - - \ No newline at end of file diff --git a/pages/user/index.wxss b/pages/user/index.wxss deleted file mode 100644 index 5e9a166..0000000 --- a/pages/user/index.wxss +++ /dev/null @@ -1,392 +0,0 @@ -page{ - overflow-y:visible!important; - height: 100%!important; - background: #f6f6f6; -} -.icons { - display: block; - width: 50rpx; - margin: 0 auto 10rpx; -} - -.navigator-hover { - opacity: 1 !important; - background: #fff; -} - -.version { - position: absolute; - right: 0; - width: 307rpx; - height: 50rpx; - bottom: 0; - text-align: center; - font-size: 15rpx; - color: #999; -} - -.couponnum { - display: inline-block; - position: absolute; - top: 39rpx; - bottom: 0; - right: 20px; - width: 16rpx; - height: 16rpx; - border-radius: 50%; - background: red; - font-size: 22rpx; -} - -.user-avatar open-data { - display: block; - width: 100%; - height: 100%; -} -.user-name{ - font-family: PingFangSC-Medium; - height: 42rpx; - margin-top:66rpx; - letter-spacing: 0.64rpx; - line-height: 44rpx; - font-size: 30rpx; - color: #3C3C3C; - font-weight:600; - display: flex; /*设置显示样式**/ - align-items: center; /**子view垂直居中*/ - vertical-align: center; /**垂直居中*/ - justify-content: center; /**内容居中*/ - flex-direction: row; -} -.user-phone { - font-family: PingFangSC-Regular; - letter-spacing: 0.64rpx; - line-height: 44rpx; - font-size: 36rpx; - color: #000; - padding:20rpx; - text-align: center; -} -.user-avatar { - position: absolute; - width: 128rpx; - height: 128rpx; - border-radius: 50%; - overflow: hidden; - top:-64rpx; - left: 300rpx; -} - -.chengzhang { - font-size: 24rpx; - font-weight: 400; - color: #FFFFFF; - padding: 0 8rpx; -} - -.view { - font-size: 24rpx; -} - -.view image { - width: 12rpx; - vertical-align: middle; - margin-top: -6rpx; -} - -.bannerbg { - width: 100%; -} - -.bannerbg image { - display: block; - width: 100%; -} - -.open01 { - display: block; - width: 120rpx; - height: 120rpx; -} -.user-btns{ - background: #fff; - display: flex; - text-align: center; - flex-wrap: wrap; -} - .user-btns navigator{ - width: 33.3%; - height: 160rpx; - } - -.user-btns:nth-of-type(3){ - margin-bottom: 0; -} -.user-btns .user-btn { - font-size: 30rpx; - letter-spacing: 1.16rpx; -} -.top-content{ - width: 100%; - height: auto; -} -.user_title{ - position: relative; - width: 94%; - background: #fff; - border-radius: 16rpx; - margin: -100rpx auto 0; - padding: 10rpx 0; - box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.10); -} -.btns_bg{ - width: 94%; - background: #fff; - border-radius: 16rpx; - margin: 30rpx auto 0; - padding: 20rpx 0; - box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.10); -} -.user-btns .user-btn > view { - padding: 20rpx 10px ; - font-size: 28rpx; - color: #888; - letter-spacing: 1.16rpx; - text-align: center; -} - -.iconfont { - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 30rpx; - height: 30rpx; - line-height: 44rpx; - color: #c7c7cc; - font-size: 44rpx; - margin: auto; -} - -.look { - display: inline-block; - padding-right: 25rpx; -} - -.user-out-btn { - background-color: #fff; - height: 100rpx; - line-height: 100rpx; - font-family: PingFangSC-Semibold; - font-size: 30rpx; - color: #000; - text-align: center; - border-radius: 0; - border: none; -} - -.user-out-btn.button-hover { - background-color: rgba(237, 237, 237, 1); -} - -.user-out-btn::after { - opacity: 0; -} -.gzh button::after { - border: none!important; -} -.gzh { - width: 100%; - height: 170rpx; - z-index: 10; - background: #fff; - border-radius: 16rpx; - overflow: hidden; - box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.15); -} - -.act { - display: none; -} - -.of { - width: 90%; - margin: 30rpx auto; - height: auto; - background: #fff; - border-radius: 16rpx; - overflow: hidden; - box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.15); -} - -.activeimg { - width: 200rpx !important; - position: absolute; - bottom: 0; - right: 0; - z-index: 10000; -} - -.edit { - width: 26rpx; - vertical-align: middle; -} -.qrcode{ - display: none; -} -.qrcode image { - width: 70rpx; - margin-right: 20rpx; -} - -.edits { - margin-top: 44rpx; -} - -.showQrcode { - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: 1000; - background: rgba(0, 0, 0, 0.6); -} - -.qrcodes { - position: absolute; - width: 400rpx; - height: 440rpx; - top: 0; - left: 0; - right: 0; - bottom: 0; - border-radius: 15rpx; - margin: auto; - background: #fff; - text-align: center; -} - -.qrcodes text { - text-align: center; - font-size: 26rpx; - display: inline-block; - line-height: 40rpx; -} - -.container-box { - width: 100%; - height: 100%; - background: 0 0 0 0.6; - position: relative; -} - -.img-box { - width: 500rpx; - margin: 200rpx auto 0; - background-color: #fff; - border-radius: 16rpx; -} - -.img-box text { - display: block; - text-align: center; - font-size: 28rpx; -} - - - -.img-box image { - display: block; - width: 500rpx; -} - -.input-row { - border-bottom: 1rpx solid #e5e5e5; - border-top: 1rpx solid #e5e5e5; - display: flex; - align-items: center; - height: 100rpx; - padding: 0 32rpx; - background-color: #fff; - font-size: 34rpx; - color: #000; -} - -.input-row input { - margin-left: 100rpx; - flex: 1; -} - -.mybtn { - width: 686rpx; - margin: 60rpx auto; -} - -.mask { - position: fixed; - top: 0; - left: 0; - z-index: 3; - width: 100%; - height: 100%; - opacity: 0; -} - -.canvas-box { - position: fixed; - width: 500rpx; - height: 587rpx; - overflow: hidden; - left: 0; - top: 0; - bottom: 0; - right: 0; - margin: auto; - background: #fff; - border-radius: 16rpx; -} -.showQrcode text{ - display: block; - text-align: center; - font-size: 28rpx; -} -.membercode { - margin-top: 20rpx; -} - -.top{ - width: 100%; - height: 234rpx; -} -.usre_level{ - height:32rpx; - border-radius:9px 9px 9px 0px; - font-family:PingFangSC-Regular; - font-weight:400; - color:rgba(255,255,255,1); - line-height:32rpx; - float: left; - margin-top: 8rpx; -} -.my{ - font-size:24rpx; - font-family:PingFangSC-Regular; - font-weight:400; - color:rgba(166,166,166,1); - line-height:34rpx; -} -.chengzhang_h{ - color: #3C3C3C; - font-size:24rpx; - font-weight: 600; -} -.my_line{ - margin: 0 10rpx; -} -.usre_level{ - font-size:20rpx; -} -.name{ - float: left; -} diff --git a/pages/user/myactivity/index.js b/pages/user/myactivity/index.js index a9ec10e..03d1dd4 100644 --- a/pages/user/myactivity/index.js +++ b/pages/user/myactivity/index.js @@ -37,7 +37,7 @@ Page({ }, goback: function () { wx.switchTab({ - url: '/pages/main/index', + url: '/index/index', }) }, onLoad(options) {