| @@ -19,6 +19,7 @@ | |||||
| "pages/success/index", | "pages/success/index", | ||||
| "pages/login/index", | "pages/login/index", | ||||
| "pages/park/park", | "pages/park/park", | ||||
| "pages/ques/ques", | |||||
| "pages/passCar/passCar", | "pages/passCar/passCar", | ||||
| "pages/getphoneInfo/index", | "pages/getphoneInfo/index", | ||||
| "pages/addPark/addPark", | "pages/addPark/addPark", | ||||
| @@ -37,7 +38,7 @@ | |||||
| "text": "首页" | "text": "首页" | ||||
| }, | }, | ||||
| { | { | ||||
| "pagePath": "pages/passCar/passCar", | |||||
| "pagePath": "pages/cartest/cartest", | |||||
| "iconPath": "assets/img/pass1.png", | "iconPath": "assets/img/pass1.png", | ||||
| "selectedIconPath": "assets/img/pass0.png", | "selectedIconPath": "assets/img/pass0.png", | ||||
| "text": "停车" | "text": "停车" | ||||
| @@ -132,7 +132,11 @@ var config = { | |||||
| /** | /** | ||||
| * 检查核销的状态 | * 检查核销的状态 | ||||
| */ | */ | ||||
| getStatus:"/couponOrder/getStatus" | |||||
| getStatus:"/couponOrder/getStatus", | |||||
| /** | |||||
| * 获得成长值 | |||||
| */ | |||||
| getScore:'/user/userinfo' | |||||
| }, | }, | ||||
| weapp: { | weapp: { | ||||
| @@ -52,8 +52,8 @@ | |||||
| <view class="coupons1-btn"> | <view class="coupons1-btn"> | ||||
| <!-- 优惠券价格 --> | <!-- 优惠券价格 --> | ||||
| <i-button class="buy" wx:if="{{item.salePriceStr==0}}" data-date='{{data}}'>免费领</i-button> | |||||
| <i-button class="buy" wx:elif="{{item.salePriceStr!=0}}" data-date='{{data}}'>马上购</i-button> | |||||
| <i-button class="buy" hover-class='active' wx:if="{{item.salePriceStr==0}}" data-date='{{data}}'>免费领</i-button> | |||||
| <i-button class="buy" hover-class='active' wx:elif="{{item.salePriceStr!=0}}" data-date='{{data}}'>马上购</i-button> | |||||
| </view> | </view> | ||||
| <!-- <view class="coupons1-border"></view> --> | <!-- <view class="coupons1-border"></view> --> | ||||
| </view> | </view> | ||||
| @@ -176,6 +176,14 @@ navigator { | |||||
| width: 344rpx; | width: 344rpx; | ||||
| } | } | ||||
| .navigator-hover{ | |||||
| opacity: 1!important; | |||||
| background: #fff!important; | |||||
| border-radius:16rpx; | |||||
| } | |||||
| .active{ | |||||
| opacity: .6; | |||||
| } | |||||
| navigator:nth-of-type(2n) { | navigator:nth-of-type(2n) { | ||||
| float: right; | float: right; | ||||
| } | } | ||||
| @@ -24,7 +24,7 @@ Page({ | |||||
| }); | }); | ||||
| } | } | ||||
| }, | }, | ||||
| onLoad(options) { | onLoad(options) { | ||||
| let that = this; | let that = this; | ||||
| console.log(options); | console.log(options); | ||||
| @@ -76,14 +76,14 @@ Page({ | |||||
| payOrderUpdate: (orderId, payOrderId, status, reason) => { | payOrderUpdate: (orderId, payOrderId, status, reason) => { | ||||
| // 支付成功 | // 支付成功 | ||||
| Http.post({ | Http.post({ | ||||
| url: config.api.payOrderUpdate, | |||||
| data: { | |||||
| payOrderId: payOrderId, | |||||
| orderId: orderId, | |||||
| status: status, | |||||
| reason: reason | |||||
| } | |||||
| }) | |||||
| url: config.api.payOrderUpdate, | |||||
| data: { | |||||
| payOrderId: payOrderId, | |||||
| orderId: orderId, | |||||
| status: status, | |||||
| reason: reason | |||||
| } | |||||
| }) | |||||
| .then(res => { | .then(res => { | ||||
| console.log("payOrderUpdate then", res); | console.log("payOrderUpdate then", res); | ||||
| // wx.showToast({ | // wx.showToast({ | ||||
| @@ -139,9 +139,9 @@ Page({ | |||||
| var that = this | var that = this | ||||
| // 车场信息获取 | // 车场信息获取 | ||||
| Http.get({ | Http.get({ | ||||
| url: config.api.getParkInfo, | |||||
| data: {} | |||||
| }) | |||||
| url: config.api.getParkInfo, | |||||
| data: {} | |||||
| }) | |||||
| .then(res => { | .then(res => { | ||||
| console.log(res) | console.log(res) | ||||
| that.setData({ | that.setData({ | ||||
| @@ -177,9 +177,9 @@ Page({ | |||||
| } else { | } else { | ||||
| Http.post({ | Http.post({ | ||||
| url: config.api.checkPhoneStatus, | |||||
| data: {} | |||||
| }) | |||||
| url: config.api.checkPhoneStatus, | |||||
| data: {} | |||||
| }) | |||||
| .then(res => { | .then(res => { | ||||
| console.log(res); | console.log(res); | ||||
| var data = { | var data = { | ||||
| @@ -297,7 +297,7 @@ Page({ | |||||
| image: "./../../../assets/img/fail.png", | image: "./../../../assets/img/fail.png", | ||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| }); | |||||
| }); | |||||
| } | } | ||||
| }) | }) | ||||
| .then(res => { | .then(res => { | ||||
| @@ -334,9 +334,6 @@ Page({ | |||||
| that.payOrderUpdate(that.data.orderId, payOrderId, 1); // 支付成功 | that.payOrderUpdate(that.data.orderId, payOrderId, 1); // 支付成功 | ||||
| console.log(res); | console.log(res); | ||||
| if (res.errMsg == "requestPayment:ok") { | if (res.errMsg == "requestPayment:ok") { | ||||
| wx.showTabBarRedDot({ | |||||
| index: 2 | |||||
| }) | |||||
| wx.showToast({ | wx.showToast({ | ||||
| title: "购买成功", | title: "购买成功", | ||||
| image: "./../../../assets/img/success.png", | image: "./../../../assets/img/success.png", | ||||
| @@ -391,7 +388,7 @@ Page({ | |||||
| // console.log(res); | // console.log(res); | ||||
| // console.log("支付完成"); | // console.log("支付完成"); | ||||
| // if (res.errMsg == "requestPayment:ok") { | // if (res.errMsg == "requestPayment:ok") { | ||||
| // } else { | // } else { | ||||
| // wx.showToast({ | // wx.showToast({ | ||||
| // title: "支付失败", | // title: "支付失败", | ||||
| @@ -413,27 +410,26 @@ Page({ | |||||
| } else { | } else { | ||||
| // 免费券 | // 免费券 | ||||
| that.payOrderUpdate(orderId, "0", 1); | that.payOrderUpdate(orderId, "0", 1); | ||||
| console.log("小红点 小红点 小红点") | |||||
| wx.setStorage({ | wx.setStorage({ | ||||
| key: 'couponNum', | key: 'couponNum', | ||||
| data: "couponNum", | |||||
| data: "couponNum" | |||||
| }) | }) | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: "领取成功", | title: "领取成功", | ||||
| image: "./../../../assets/img/success.png", | image: "./../../../assets/img/success.png", | ||||
| duration: 1000, | duration: 1000, | ||||
| mask: false, | mask: false, | ||||
| success:function(){ | |||||
| setTimeout(function(){ | |||||
| success: function () { | |||||
| setTimeout(function () { | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/pages/order/detail/index?orderId=${ | url: `/pages/order/detail/index?orderId=${ | ||||
| that.data.orderId | that.data.orderId | ||||
| }` | }` | ||||
| }); | }); | ||||
| },1000) | |||||
| }, 1000) | |||||
| } | } | ||||
| }); | }); | ||||
| //////////////////////////停车券 | //////////////////////////停车券 | ||||
| console.log(that.data.data.type) | console.log(that.data.data.type) | ||||
| if (that.data.data.type == 5) { | if (that.data.data.type == 5) { | ||||
| @@ -171,7 +171,6 @@ page { | |||||
| width: 100rpx; | width: 100rpx; | ||||
| height: 100rpx; | height: 100rpx; | ||||
| border-radius: 16rpx; | border-radius: 16rpx; | ||||
| overflow: hidden; | |||||
| } | } | ||||
| .posi_logo view:nth-child(1) image { | .posi_logo view:nth-child(1) image { | ||||
| @@ -37,6 +37,9 @@ Page({ | |||||
| key: 'couponNum', | key: 'couponNum', | ||||
| data: "couponNum1", | data: "couponNum1", | ||||
| }) | }) | ||||
| wx.hideTabBarRedDot({ | |||||
| index:2 | |||||
| }) | |||||
| }, | }, | ||||
| //点击跳转到券详情页面 | //点击跳转到券详情页面 | ||||
| gotouse: function (e) { | gotouse: function (e) { | ||||
| @@ -1,7 +1,7 @@ | |||||
| .market { | .market { | ||||
| width: 100%; | width: 100%; | ||||
| height: 100%; | height: 100%; | ||||
| background: #f5f5f5; | |||||
| /* background: #f5f5f5; */ | |||||
| } | } | ||||
| .tabs { | .tabs { | ||||
| @@ -27,7 +27,8 @@ | |||||
| .login-btn .login-btn-login { | .login-btn .login-btn-login { | ||||
| background: #00C0FF !important; | background: #00C0FF !important; | ||||
| border-radius: 60rpx !important; | border-radius: 60rpx !important; | ||||
| height: 88rpx !important; | |||||
| height: 94rpx !important; | |||||
| line-height: 94rpx; | |||||
| margin: 0 !important; | margin: 0 !important; | ||||
| padding: 0 !important; | padding: 0 !important; | ||||
| font-family: PingFangSC-Semibold !important; | font-family: PingFangSC-Semibold !important; | ||||
| @@ -35,6 +35,7 @@ Page({ | |||||
| }).then( | }).then( | ||||
| function(res) { | function(res) { | ||||
| console.log(res); | console.log(res); | ||||
| console.log("授权个人信息返回的数据") | |||||
| //返回主页 | //返回主页 | ||||
| wx.switchTab({ | wx.switchTab({ | ||||
| url: "/pages/index/index" | url: "/pages/index/index" | ||||
| @@ -42,7 +42,8 @@ | |||||
| right: 0; | right: 0; | ||||
| background: #00c0ff !important; | background: #00c0ff !important; | ||||
| border-radius: 60rpx !important; | border-radius: 60rpx !important; | ||||
| height: 88rpx !important; | |||||
| height: 94rpx !important; | |||||
| line-height: 94rpx; | |||||
| margin: auto; | margin: auto; | ||||
| padding: 0 !important; | padding: 0 !important; | ||||
| font-family: PingFangSC-Semibold !important; | font-family: PingFangSC-Semibold !important; | ||||
| @@ -19,15 +19,29 @@ Page({ | |||||
| url: '/pages/game/game', | url: '/pages/game/game', | ||||
| }) | }) | ||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
| */ | */ | ||||
| onLoad: function(options) { | onLoad: function(options) { | ||||
| var that = this; | var that = this; | ||||
| var scene = decodeURIComponent(options.scene); | var scene = decodeURIComponent(options.scene); | ||||
| that.setData({ | |||||
| scene:scene | |||||
| }) | |||||
| console.log(that.data.scene) | |||||
| console.log(scene); | |||||
| app.getLocation(); | app.getLocation(); | ||||
| that.userLogin(); | that.userLogin(); | ||||
| }, | }, | ||||
| onShow:function(){ | |||||
| let num = wx.getStorageSync('couponNum'); | |||||
| if (num =='couponNum'){ | |||||
| wx.showTabBarRedDot({ | |||||
| index: 2 | |||||
| }) | |||||
| } | |||||
| }, | |||||
| /** | /** | ||||
| * 下拉刷新 | * 下拉刷新 | ||||
| */ | */ | ||||
| @@ -66,7 +80,8 @@ Page({ | |||||
| var usrdata = { | var usrdata = { | ||||
| appId: config.weapp.AppId, | appId: config.weapp.AppId, | ||||
| code: code, | code: code, | ||||
| sceneAddress: app.globalData.sceneAddress | |||||
| sceneAddress: app.globalData.sceneAddress, | |||||
| scene: that.data.scene | |||||
| }; | }; | ||||
| if (app.globalData.locationInfo) { | if (app.globalData.locationInfo) { | ||||
| usrdata = { | usrdata = { | ||||
| @@ -74,7 +89,8 @@ Page({ | |||||
| code: code, | code: code, | ||||
| sceneAddress: app.globalData.sceneAddress, | sceneAddress: app.globalData.sceneAddress, | ||||
| latitude: "" + app.globalData.locationInfo.latitude, | latitude: "" + app.globalData.locationInfo.latitude, | ||||
| longitude: "" + app.globalData.locationInfo.longitude | |||||
| longitude: "" + app.globalData.locationInfo.longitude, | |||||
| scene: that.data.scene | |||||
| }; | }; | ||||
| } | } | ||||
| Http.post({ | Http.post({ | ||||
| @@ -62,9 +62,9 @@ Page({ | |||||
| }); | }); | ||||
| }, | }, | ||||
| passc: function() { | passc: function() { | ||||
| wx.showToast({ | |||||
| title: "宝宝最可爱~" | |||||
| }); | |||||
| wx.navigateTo({ | |||||
| url: '/pages/ques/ques', | |||||
| }) | |||||
| }, | }, | ||||
| //券绑定车牌 | //券绑定车牌 | ||||
| bindCoupon: function(e) { | bindCoupon: function(e) { | ||||
| @@ -6,7 +6,8 @@ | |||||
| <text class='num'>最多可添加3辆</text> | <text class='num'>最多可添加3辆</text> | ||||
| </view> | </view> | ||||
| <view class='fr'> | <view class='fr'> | ||||
| 车辆管理<image src='./../../assets/img/jian.png' mode='widthFix'></image> | |||||
| 车辆管理 | |||||
| <image src='./../../assets/img/jian.png' mode='widthFix'></image> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <!-- <view class='headBox'> | <!-- <view class='headBox'> | ||||
| @@ -23,7 +24,8 @@ | |||||
| </view> --> | </view> --> | ||||
| <view class='borderBox'> | <view class='borderBox'> | ||||
| <view class='borderUp' bindtap='jumpToAdd' wx:if="{{carList.length<3}}"> | <view class='borderUp' bindtap='jumpToAdd' wx:if="{{carList.length<3}}"> | ||||
| <view class="myCars"><image src='./../../assets/img/add.png' mode="widthFix"></image>我的爱车</view> | |||||
| <view class="myCars"> | |||||
| <image src='./../../assets/img/add.png' mode="widthFix"></image>我的爱车</view> | |||||
| <text class='carNumber'>车辆入场后,才能绑车牌</text> | <text class='carNumber'>车辆入场后,才能绑车牌</text> | ||||
| </view> | </view> | ||||
| <view class='passNumberBox' wx:for='{{carList}}' wx:key='{{index}}'> | <view class='passNumberBox' wx:for='{{carList}}' wx:key='{{index}}'> | ||||
| @@ -0,0 +1,66 @@ | |||||
| // pages/ques/ques.js | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad: function (options) { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面初次渲染完成 | |||||
| */ | |||||
| onReady: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面显示 | |||||
| */ | |||||
| onShow: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面隐藏 | |||||
| */ | |||||
| onHide: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面卸载 | |||||
| */ | |||||
| onUnload: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面相关事件处理函数--监听用户下拉动作 | |||||
| */ | |||||
| onPullDownRefresh: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面上拉触底事件的处理函数 | |||||
| */ | |||||
| onReachBottom: function () { | |||||
| }, | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage: function () { | |||||
| } | |||||
| }) | |||||
| @@ -0,0 +1,3 @@ | |||||
| { | |||||
| "navigationBarTitleText": "常见问题" | |||||
| } | |||||
| @@ -0,0 +1,2 @@ | |||||
| <!--pages/ques/ques.wxml--> | |||||
| <text>pages/ques/ques.wxml</text> | |||||
| @@ -0,0 +1 @@ | |||||
| /* pages/ques/ques.wxss */ | |||||
| @@ -1,4 +1,6 @@ | |||||
| let app = getApp(); | |||||
| var config = require("../../config/config.js"); | |||||
| var app = getApp(); | |||||
| const Http = require("../../utils/HttpBasics"); | |||||
| Page({ | Page({ | ||||
| /** | /** | ||||
| * 页面的初始数据 | * 页面的初始数据 | ||||
| @@ -8,30 +10,31 @@ Page({ | |||||
| // avatar: | // avatar: | ||||
| // "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg" | // "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg" | ||||
| // } | // } | ||||
| flag:'hidden', | |||||
| flag: 'hidden', | |||||
| score:'' | |||||
| }, | }, | ||||
| navigateTo() { | navigateTo() { | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/pages/login/index` | url: `/pages/login/index` | ||||
| }); | }); | ||||
| }, | }, | ||||
| showVersion:function(){ | |||||
| /** | |||||
| * 长按显示版本号 | |||||
| */ | |||||
| let that = this; | |||||
| if(that.data.flag=='hidden'){ | |||||
| that.setData({ | |||||
| flag: 'show' | |||||
| }); | |||||
| } | |||||
| console.log(that.data.flag) | |||||
| showVersion: function() { | |||||
| /** | |||||
| * 长按显示版本号 | |||||
| */ | |||||
| let that = this; | |||||
| if (that.data.flag == 'hidden') { | |||||
| that.setData({ | |||||
| flag: 'show' | |||||
| }); | |||||
| } | |||||
| console.log(that.data.flag) | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
| */ | */ | ||||
| onLoad: function(options) { | onLoad: function(options) { | ||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -43,21 +46,34 @@ Page({ | |||||
| * 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
| */ | */ | ||||
| onShow: function() { | onShow: function() { | ||||
| let num = wx.getStorageSync('couponNum'); | |||||
| console.log("我是渲染") | |||||
| if(num=='couponNum1'){ | |||||
| wx.setStorage({ | |||||
| key: 'couponNum', | |||||
| data: "couponNum1",}) | |||||
| this.setData({ | |||||
| couponNum:"couponNum1" | |||||
| }) | |||||
| } | |||||
| else if(num=='couponNum'){ | |||||
| this.setData({ | |||||
| couponNum:"couponNum" | |||||
| }) | |||||
| } | |||||
| let that = this; | |||||
| let num = wx.getStorageSync('couponNum'); | |||||
| wx.hideTabBarRedDot({ | |||||
| index: 2 | |||||
| }); | |||||
| console.log("我是渲染") | |||||
| if (num == 'couponNum1') { | |||||
| wx.setStorage({ | |||||
| key: 'couponNum', | |||||
| data: "couponNum1", | |||||
| }) | |||||
| that.setData({ | |||||
| couponNum: "couponNum1" | |||||
| }) | |||||
| } else if (num == 'couponNum') { | |||||
| that.setData({ | |||||
| couponNum: "couponNum" | |||||
| }) | |||||
| }; | |||||
| Http.get({ | |||||
| url: config.api.getScore, | |||||
| data: {} | |||||
| }).then(res=>{ | |||||
| console.log(res); | |||||
| that.setData({ | |||||
| score: res.data.score | |||||
| }) | |||||
| }) | |||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -84,4 +100,4 @@ Page({ | |||||
| * 用户点击右上角分享 | * 用户点击右上角分享 | ||||
| */ | */ | ||||
| onShareAppMessage: function() {} | onShareAppMessage: function() {} | ||||
| }); | |||||
| }); | |||||
| @@ -11,7 +11,7 @@ | |||||
| <view class='chengzhang'>微信用户</view> | <view class='chengzhang'>微信用户</view> | ||||
| </view> | </view> | ||||
| <view class='chengzhang1'> | <view class='chengzhang1'> | ||||
| <view class="view">985 | |||||
| <view class="view">{{score}} | |||||
| <image src='./../../assets/img/shang.png' mode="widthFix"></image> | <image src='./../../assets/img/shang.png' mode="widthFix"></image> | ||||
| </view> | </view> | ||||
| <text>成长值</text> | <text>成长值</text> | ||||
| @@ -30,7 +30,7 @@ | |||||
| </navigator> | </navigator> | ||||
| <navigator url="/pages/order/index/index?id=0"> | <navigator url="/pages/order/index/index?id=0"> | ||||
| <view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
| <view style='padding-left:50rpx;color:#666;'>待付款</view> | |||||
| <view style='padding-left:64rpx;color:#666;'>待付款</view> | |||||
| <view> | <view> | ||||
| <text class="iconfont icon-right"></text> | <text class="iconfont icon-right"></text> | ||||
| </view> | </view> | ||||
| @@ -38,7 +38,7 @@ | |||||
| </navigator> | </navigator> | ||||
| <navigator url="/pages/order/index/index?id=1"> | <navigator url="/pages/order/index/index?id=1"> | ||||
| <view class="user-btn app-border-bottom"> | <view class="user-btn app-border-bottom"> | ||||
| <view style='padding-left:50rpx;color:#666;'>已完成</view> | |||||
| <view style='padding-left:64rpx;color:#666;'>已完成</view> | |||||
| <view> | <view> | ||||
| <text class="iconfont icon-right"></text> | <text class="iconfont icon-right"></text> | ||||
| </view> | </view> | ||||
| @@ -67,7 +67,7 @@ | |||||
| <view class="margin"></view> | <view class="margin"></view> | ||||
| <!-- <button bindtap="navigateTo" class="user-out-btn">退出登陆</button> --> | <!-- <button bindtap="navigateTo" class="user-out-btn">退出登陆</button> --> | ||||
| <view bindlongtap='showVersion' class='version'> | <view bindlongtap='showVersion' class='version'> | ||||
| <view wx:if="{{flag=='show'}}">版本号:2.0.4</view> | |||||
| <view wx:if="{{flag=='show'}}">版本号:2.0.5</view> | |||||
| <view wx:if="{{flag=='hidden'}}"></view> | <view wx:if="{{flag=='hidden'}}"></view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||