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