Ver código fonte

[停车][修改]:停车功能额度修改

tags/2.2.4
meo 6 anos atrás
pai
commit
49fcaa3f76
11 arquivos alterados com 388 adições e 377 exclusões
  1. +64
    -73
      pages/coupon/detail/index.js
  2. +26
    -18
      pages/getphoneInfo/index.js
  3. +0
    -1
      pages/managelicenseplate/managelicenseplate.wxss
  4. +190
    -205
      pages/passCar/passCar.js
  5. +2
    -1
      pages/passCar/passCar.json
  6. +44
    -43
      pages/passCar/passCar.wxml
  7. +32
    -26
      pages/passCar/passCar.wxss
  8. +3
    -6
      pages/user/index.js
  9. +1
    -1
      pages/user/index.wxml
  10. +2
    -2
      project.config.json
  11. +24
    -1
      utils/util.js

+ 64
- 73
pages/coupon/detail/index.js Ver arquivo

@@ -27,10 +27,6 @@ Page({

onLoad(options) {
let that = this;
console.log(options);
console.log("couponChannelId" + options.couponChannelId);
console.log("couponId" + options.couponId);
console.log("传的变量的名字叫couponId");
wx.showLoading({
title: "加载中..."
});
@@ -98,70 +94,70 @@ Page({
/**
* 拉取车牌列表
*/
init: function () {
var that = this
// init: function () {
// var that = this

app.parkInitCallback = token => {
that.initPark()
that.initUsrCarList()
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
console.log("etcpToken", app.globalData.etcpToken)
}
// 获取 停车费
that.getStopFee()
})
}
}
if (app.globalData.token && app.globalData.token != null) {
app.parkInitCallback(app.globalData.token)
}
},
getStopFee: function () {
var that = this
// carLogin
for (var i = 0; i < that.data.carList.length; i++) {
that.getStopFeeItem(that.data.carList[i], i)
}
// console.log(JSON.stringify(getStopFeeItem))
},
initPark: function () {
var that = this
// 车场信息获取
Http.get({
url: config.api.getParkInfo,
data: {}
})
.then(res => {
console.log(res)
that.setData({
park: res.data,
})
})
},
initUsrCarList: function () {
var that = this
// 绑定车获取
Http.get({
url: config.api.getUserCarList,
data: {}
}).then(res => {
console.log('>>>>>>>>>>>>>>>>>1' + JSON.stringify(res));
that.setData({
carList: res.data
})
})
},
// app.parkInitCallback = token => {
// that.initPark()
// that.initUsrCarList()
// 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
// console.log("etcpToken", app.globalData.etcpToken)
// }
// // 获取 停车费
// that.getStopFee()
// })
// }
// }
// if (app.globalData.token && app.globalData.token != null) {
// app.parkInitCallback(app.globalData.token)
// }
// },
// getStopFee: function () {
// var that = this
// // carLogin
// for (var i = 0; i < that.data.carList.length; i++) {
// that.getStopFeeItem(that.data.carList[i], i)
// }
// // console.log(JSON.stringify(getStopFeeItem))
// },
// initPark: function () {
// var that = this
// // 车场信息获取
// Http.get({
// url: config.api.getParkInfo,
// data: {}
// })
// .then(res => {
// console.log(res)
// that.setData({
// park: res.data,
// })
// })
// },
// initUsrCarList: function () {
// var that = this
// // 绑定车获取
// Http.get({
// url: config.api.getUserCarList,
// data: {}
// }).then(res => {
// console.log('>>>>>>>>>>>>>>>>>1' + JSON.stringify(res));
// that.setData({
// carList: res.data
// })
// })
// },
/**
* 发起支付
*/
@@ -170,12 +166,7 @@ Page({
wx.showLoading({
title: "加载中..."
});
if (that.data.data.type == 6) {
this.initUsrCarList()
// 领取 5.停车券
// TODO 选取用户下的车牌

} else {
if (that.data.data.type == 6) {} else {
Http.post({
url: config.api.checkPhoneStatus,
data: {}


+ 26
- 18
pages/getphoneInfo/index.js Ver arquivo

@@ -7,14 +7,16 @@ Page({
couponChannelId: "",
couponId: ""
},
onLoad: function(options) {
onLoad: function (options) {
var that = this;
console.log(options);
that.setData({
couponChannelId: options.couponChannelId,
couponId: options.couponId
});
if (options.couponChannelId && options.couponId) {
that.setData({
couponChannelId: options.couponChannelId,
couponId: options.couponId
});
}


Http.get({
url: config.api.marketicon,
@@ -31,8 +33,8 @@ Page({
})
});
},
getPhoneNumber: function(e) {
getPhoneNumber: function (e) {
var that = this;
var iv = e.detail.iv;
var encryptedData = e.detail.encryptedData;
@@ -43,7 +45,7 @@ Page({
iv: iv
}
}).then(
function(res) {
function (res) {
console.log(res);
console.log("这是用户授权手机号的结果");
console.log(that.data.couponChannelId);
@@ -53,18 +55,24 @@ Page({
wx.showToast({
title: res.data.msg,
icon: "success",
success: function(res) {
wx.redirectTo({
url: "/pages/coupon/detail/index?couponChannelId=" +
that.data.couponChannelId +
"&couponId=" +
that.data.couponId +
"&flag=pay"
});
success: function (res) {
if (that.data.couponChannelId && that.data.couponId) {
wx.redirectTo({
url: "/pages/coupon/detail/index?couponChannelId=" +
that.data.couponChannelId +
"&couponId=" +
that.data.couponId +
"&flag=pay"
})
} else {
wx.switchTab({
url: '/pages/passCar/passCar',
})
}
}
});
},
function(error) {
function (error) {
wx.showToast({
title: "请重新授权手机号",
icon: "none"


+ 0
- 1
pages/managelicenseplate/managelicenseplate.wxss Ver arquivo

@@ -255,7 +255,6 @@ page {

.btn001 {
margin: 0 auto;
width: 120rpx;
height: 180rpx;
line-height: 180rpx;
font-size: 32rpx;


+ 190
- 205
pages/passCar/passCar.js Ver arquivo

@@ -1,7 +1,7 @@
// pages/passCar/passCar.js
let config = require("../../config/config.js");
let Http = require("../../utils/HttpBasics");
const app = getApp();
let Util = require("../../utils/util");
let app = getApp();
Page({
data: {
park: null,
@@ -18,41 +18,39 @@ Page({
interval: 5000,
duration: 1000,
current: 0,
list: []
stopFees: {},
},
/**
* 轮播图
* 车牌轮播滑动
*/
onSlideChangeEnd: function(e) {
onSlideChangeEnd: function (e) {
var that = this;
console.log(e);
console.log(e.detail.current);
var listCardNum = (that.data.list)[e.detail.current].memberKeyword;
/**
* 获得当前的车牌号码
*/
var listCardNum = (that.data.carList)[e.detail.current].carNumber;
console.log(listCardNum);
that.setData({
listCardNum: listCardNum
})
console.log(that.data.listCardNum);
});
/**
* 获得停车费用
*/
that.getStopFee(listCardNum);
},
gotomange: function() {
gotomange: function () {
wx.navigateTo({
url: '/pages/managelicenseplate/managelicenseplate',
})
},
/*车牌动态样式 */
changeStyle: function() {
var height = this.data.dataHeight == "150rpx" ? "80rpx" : "150rpx";
var lineHeight = this.data.dataHeight == "150rpx" ? "80rpx" : "150rpx";
var fontWeight = this.data.fontWeight == "600" ? "500" : "600";
this.setData({
dataHeight: height,
dataLineHeight: lineHeight,
dataFontWeight: fontWeight
});
},
onLoad: function(options) {
onLoad: function (options) {
var that = this;
that.getList();
/**
* 获得分享小程序的
* title
* desc
*/

Http.get({
url: config.api.getWeapNote,
data: {
@@ -60,108 +58,69 @@ Page({
}
})
.then(res => {
console.log(res.data.weapNote);
let weapNote = JSON.parse(res.data.weapNote);
console.log(weapNote.carpage);
that.setData({
desc: weapNote.carpage.desc,
title: weapNote.carpage.title
})
})
},

onShow: function(options) {
var that = this;
if (that.data.addCar) {
// 绑车牌
if (app.globalData.carLogin) {
that.bindCar(that.data.addCar);
} else {
that.bindCar(that.data.addCar);
}
that.setData({
addCar: null
});
}
},
//我的停车券的显示与消失
showquan: function() {
let that = this;
if (that.data.tcq == 1) {
that.setData({
tcq: 2
});
} else if (that.data.tcq == 2) {
that.setData({
tcq: 1
});
}

},
jumpToAdd: function() {


jumpToAdd: function () {
wx.navigateTo({
url: "/pages/addPark/addPark"
});
},
passc: function() {
passc: function () {
wx.navigateTo({
url: '/pages/ques/ques',
})
},


//券绑定车牌
bindCoupon: function(e) {
bindCoupon: function (e) {
console.log(e);
var that = this;
wx.showLoading({
title: '加载中...',
});
if (that.data.couponList.length > 0) {
/**
* 如果1 已经绑定
* 0 没有绑定
* etcp
*/
for (let car of that.data.carList) {
if (car.stopFee.parkingFee) {
that.data.payList.push(car);
}
}
var etcpData = {
etcpToken: app.globalData.etcpToken,
carNumber: that.data.payList[0].carNumber ?
that.data.payList[0].carNumber :
"",
carNumber: that.data.listCardNum,
/**
* 待解决
*/
couponOrderId: that.data.couponList[0].id
};
console.log(etcpData);
// 停简单
/**
* 停简单
*/
var tjdData = {
carNumber: that.data.payList[0].carNumber
carNumber: that.data.listCardNum
};
var postCouponData = app.globalData.parkVendor == 1 ? etcpData : tjdData;

Http.post({
url: config.api.getCarCoupon,
data: postCouponData
})
.then(res => {
that.setData({
flag: "1"
});
that.initUsrCarList();
console.log("loading")
wx.hideLoading();
})
.catch(error => {
console.log(error);
if (error.code == 2056) {
that.setData({
flags: "alreadybind"
});
}
});
})
} else {
console.log("没有停车券可以绑定")
wx.hideLoading();
that.setData({
flags: "alreadybind"
});
}
},

@@ -176,17 +135,24 @@ Page({
couponOrderStatus: 0
}
}).then(res => {
that.init();
console.log(res);
that.setData({
couponList: res.data.list
});
setTimeout(function() {
wx.hideLoading();
}, 1200);
});
},

bindCar: function(carNum) {
onShow: function (options) {
var that = this;
that.getList();
that.init();
},

/**
* 绑定车牌
*/

bindCar: function (carNum) {
var that = this;
// ETCP
var etcpData = {
@@ -203,15 +169,12 @@ Page({
})
.then(res => {
console.log(res);
that.setData({
addCar: null
});
that.initUsrCarList();
// that.initUsrCarList();
wx.showModal({
title: "提示",
showCancel: false,
content: "绑车牌成功!",
success: function() {}
success: function () {}
});
})
.catch(error => {
@@ -219,69 +182,77 @@ Page({
wx.showModal({
title: "提示",
showCancel: false,
content: error.data.message,
success: function() {}
content: error.message,
success: function () {}
});
});
},
// unbindCar: function(carNum) {
// var that = this;
// var postData =
// app.globalData.parkVendor == 1
// ? {
// etcpToken: app.globalData.etcpToken,
// carNumber: carNum
// }
// : {
// carNumber: carNum
// };
// Http.post({
// url: config.api.unbindCar,
// data: postData
// })
// .then(res => {
// console.log(res);
// that.initUsrCarList();
// wx.showModal({
// title: "提示",
// showCancel: false,
// content: "解绑车牌成功!",
// success: function() {}
// });
// })
// .catch(error => {
// wx.showModal({
// title: "提示",
// showCancel: false,
// content: "解绑车牌失败!",
// success: function() {}
// });
// });
// },
// unbindCarBtn: function(e) {
// console.log(e);
// var that = this;
// var carNum = e.currentTarget.dataset.car;
// that.unbindCar(carNum);
// },
getStopFeeItem: function(carItem, i) {


/**
* 车场信息获取
*/
initPark: function () {
var that = this;
Http.get({
url: config.api.getParkInfo,
data: {}
}).then(res => {
that.setData({
park: res.data
});
});
},


/**
* 绑定车获取
*/
initUsrCarList: function (flag) {
console.log(flag);
var that = this;
Http.get({
url: config.api.getUserCarList,
data: {}
}).then(res => {
console.log(res)
that.setData({
carList: res.data
});
/**
* flag ==flags
* 表示从首页onShow进来的
*/
if (flag == "flags") {
var listCardNum = res.data[0].carNumber;
console.log(listCardNum);
that.setData({
listCardNum: listCardNum
})
/**
* 获得停车费用
*/
that.getStopFee(listCardNum);
}
})
},

/**
* 获得停车费用修改
*/
getStopFee: function (carNumber) {
var that = this;
var postData =
app.globalData.parkVendor == 1 ?
{
app.globalData.parkVendor == 1 ? {
etcpToken: app.globalData.etcpToken,
carNumber: carItem.carNumber
} :
{
carNumber: carItem.carNumber,
outCarId: carItem.outCarId
carNumber: carNumber
} : {
carNumber: carNumber,
outCarId: outCarId
};
var stopFee = "carList[" + i + "].stopFee";
var extraData = "carList[" + i + "].extraData";
console.log(extraData);
var extraDataStr = {
params: {
CarNumber: carItem.carNumber
CarNumber: carNumber
}
};
that.setData({
@@ -292,86 +263,100 @@ Page({
data: postData
})
.then(res => {
/**
* 停车费用
*/
that.setData({
[stopFee]: res.data,
[extraData]: extraDataStr,
buttonBox: res.data.parkingFee
})
stopFees: res.data
})
that.setData({
timecha: Util.timecha(res.data.exitTime, res.data.entranceTime)
})
})
.catch(error => {
console.log(error);
wx.showModal({
title: '提示',
content: error.message,
showCancel: false
})
that.setData({
stopFees: {}
})
});
},
getStopFee: function() {
var that = this;
// carLogin
for (var i = 0; i < that.data.carList.length; i++) {
that.getStopFeeItem(that.data.carList[i], i);
}
},

initPark: function() {
var that = this;
// 车场信息获取
Http.get({
url: config.api.getParkInfo,
data: {}
}).then(res => {
console.log(res);
that.setData({
park: res.data
});
});
},
initUsrCarList: function() {
var that = this;
// 绑定车获取
Http.get({
url: config.api.getUserCarList,
data: {}
}).then(res => {
that.setData({
carList: res.data
});
});
},
init: function() {
/**
* 共同登录
*/
init: function (carNumber) {
var that = this;
app.parkInitCallback = token => {
that.initPark();
that.initUsrCarList();
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;
console.log("etcpToken", app.globalData.etcpToken);
}
// 获取 停车费
that.getStopFee();
});
url: config.api.checkPhoneStatus,
data: {}
})
.then(res => {
console.log(res);
Http.post({
url: config.api.carInit,
data: {
phone: app.globalData.phone
}
}).then(res => {
console.log(res);
app.globalData.carLogin = true;
app.globalData.parkVendor = res.data.vendor;
if (res.data.token) {
app.globalData.etcpToken = res.data.token;
}
/**
* 获得停车费用
*/
that.initUsrCarList("flags");
console.log(app.globalData.etcpToken);
});
})
.catch(err => {
console.log(err);
if (err.code == 11005) {
// 用户手机未授权
/**
* 将值传到用户手机号授权的页面
*
*/
wx.redirectTo({
url: "/pages/getphoneInfo/index"
});
} else if (err.code == 11006) {
// 用户手机已加密
wx.redirectTo({
url: "/pages/phoneinput/phoneinput"
});
}
})
}
};
if (app.globalData.token && app.globalData.token != null) {
app.parkInitCallback(app.globalData.token);
}
},
/**
* 下拉刷新
*/
onPullDownRefresh: function(e) {
let that = this;
that.initUsrCarList("flags");
wx.stopPullDownRefresh();
},
// 用户点击右上角分享
onShareAppMessage: function() {
onShareAppMessage: function () {
return {
title: this.data.title,
desc: this.data.desc,
success: function(res) {
success: function (res) {
wx.showToast({
title: "分享成功",
duration: 1000,


+ 2
- 1
pages/passCar/passCar.json Ver arquivo

@@ -1,5 +1,6 @@
{
"component": true,
"usingComponents": {},
"navigationBarTitleText": "停车"
"navigationBarTitleText": "停车",
"enablePullDownRefresh": true
}

+ 44
- 43
pages/passCar/passCar.wxml Ver arquivo

@@ -1,35 +1,27 @@
<view class='container'>
<view class='carmanage clearfix'>
<view class='fl'>
<image src='./../../assets/img/che.png' mode='widthFix'></image>
<text class='mycar'>我的爱车</text>
<text class='num'>最多可添加3辆</text>
</view>
<view class='fr' bindtap='gotomange'>
车辆管理
<image src='./../../assets/img/jian.png' mode='widthFix'></image>
</view>
</view>
<view class='headBox'>
<view class='numberBox'>
<view class='titleName clearfix'>{{park.addr}}</view>
<view class='price clearfix'>
<text class='fl'>总车位:</text>
<label class='locationNumber fr'>{{park.number}}个</label>
<view class='top'>
<view class='carmanage clearfix'>
<view class='fl'>
<text class='mycar'>{{park.addr}}</text>
</view>
<view class='price clearfix'>
<text class='fl'>停车费:</text>
<label class='locationNumber fr'>{{park.stopFee}}</label>
<view class='fr' bindtap='gotomange'>
总车位:{{park.number}}个
</view>
</view>
<view class='price clearfix'>
<text class='fl'>停车费:</text>
<label class='locationNumber fr'>{{park.stopFee}}</label>
</view>
</view>

<view class='borderBox'>
<view class='passNumberBox' wx:for='{{carList}}' wx:key='{{index}}'>
<view class='passNumberBox'>
<!-- 有车牌的时候显示 -->
<view class='passUp'>
<view class='addicense_active'>
<swiper current="{{current}}" bindchange='onSlideChangeEnd' class='swiper' circular='true' indicator-dots='{{indicatorDots}}' autoplay='{{autoplay}}' interval='2000' duration='2000'>
<block wx:for="{{carList}}" wx:key="unique">
<view class='addicense_active' wx:if='{{carList.length>0}}'>
<swiper current="{{current}}" bindchange='onSlideChangeEnd' class='swiper' circular='true' indicator-dots='{{indicatorDots}}'
autoplay='{{autoplay}}' interval='500' duration='500'>
<block wx:for='{{carList}}' wx:key="unique">
<swiper-item class="swiper-item" data-memberKeyword='{{item.carNumber}}'>
<view class='clearfix clearfix1'>
<text class='txt01'>{{item.carNumber}}</text>
@@ -37,42 +29,47 @@
</swiper-item>
</block>
</swiper>
<view class="dots">
<!-- <view class="dots">
<block wx:for="{{carList}}" wx:key="unique">
<view class="dot{{index == current ? ' active' : ''}}"></view>
</block>
</view>
</view> -->
</view>
</view>
</view>
</view>

<!-- <view class='orderBox clearfix' wx:if='{{item.stopFee.parkingFee}}'> -->
<view class='orderBox' wx:key="{{index}}" wx:for="{{carList}}" wx:if="{{carList.length>0&&3>=carList.length}}">
<view class='orderBox' wx:if="{{stopFees.remainingFee&&carList.length>0&&3>=carList.length}}">
<view class='clearfix'>
<text class="fl">入场时间:</text>
<text class='fr time'>{{item.stopFee.entranceTime}}</text>
<text class='fr time'>{{stopFees.entranceTime}}</text>
</view>
<view class='coupon clearfix'>
<text class='fl'><text class='jians'>惠</text>优免券:</text>
<view class='clearfix'>
<text class="fl">停车时长:</text>
<text class='fr time'>{{timecha}}</text>
</view>
<view class='coupon clearfix' wx:if="{{couponList.length>0}}">
<text class='fl'><text class='jians'>券</text>优惠券:</text>
<text class='fr'>2小时优免券</text>
</view>
<view class="clearfix">
<text class="fl">待缴费用:</text>
<text class='fr'>{{item.stopFee.parkingFee}}<text class='yuan'>元</text></text>
<text class='fr'>{{stopFees.remainingFee}}<text class='yuan'>元</text></text>
</view>

<view bindtap='bindCoupon' class="buy-view" wx:if="{{buttonBox&&carList.length>0&&3>=carList.length}}">
<navigator class='buyBox' target="miniProgram" open-type="navigate" app-id="wx192b7d2e8dcbefd0" path="" extra-data='{{extraData}}' version="release">
<view bindtap='bindCoupon' class="buy-view" wx:if="{{stopFees.remainingFee&&carList.length>0&&3>=carList.length}}">
<navigator class='buyBox' target="miniProgram" open-type="navigate" app-id="wx192b7d2e8dcbefd0" path=""
extra-data='{{extraData}}' version="release">
</navigator>
<button class='buy' hover-class='active'>立即支付</button>
</view>
</view>


<!-- 没有车牌的时候显示 -->
<view class='borderUp' bindtap='jumpToAdd' wx:if="{{carList.length==0}}">
<view class="myCars">
<image src='./../../assets/img/add.png' mode="widthFix"></image>我的爱车</view>
<image src='./../../assets/img/add.png' mode="widthFix"></image>我的爱车
</view>
<text class='carNumber'>车辆入场后,才能绑车牌</text>
</view>
<view class='bottonBox'>
@@ -86,6 +83,14 @@
</view>
</navigator>

<view class='textStyle' bindtap='gotomange'>
<image src='../../assets/img/che.png'></image>
车辆管理
<view class='detail'>
<image src='../../assets/img/jian.png'></image>
</view>
</view>

<view class='textStyle' bindtap='passc'>
<image src='../../assets/img/wenti.png'></image>
常见问题
@@ -93,9 +98,10 @@
<image src='../../assets/img/jian.png'></image>
</view>
</view>

</view>
<view class='passNumberBox' wx:for='{{couponList}}' wx:key='{{index}}'>
<view class='voucher' wx:if="{{tcq==1}}">
<!-- <view class='passNumberBox' wx:for='{{couponList}}' wx:key='{{index}}'>
<view class='voucher' wx:if="!{{tcq==1}}">
<text class='textV1 textV3'>{{item.title}}</text>
<text class='textV2'>{{item.merchantName}}</text>
<text class='textV1'>{{'- '+item.price/100+'小时'}}</text>
@@ -103,10 +109,5 @@
<image src='../../assets/img/choiced.png'></image>
</view>
</view>
</view>
<!-- <view bindtap='bindCoupon' class="buy-view app-border-top" wx:if="{{buttonBox}}">
<navigator wx:if="{{flag==1||flags=='alreadybind'}}" class='buyBox' target="miniProgram" open-type="navigate" app-id="wx192b7d2e8dcbefd0" path="" extra-data='{{extraData}}' version="trial">
</navigator>
<button class='buy'>立即支付</button>
</view> -->
</view>

+ 32
- 26
pages/passCar/passCar.wxss Ver arquivo

@@ -3,7 +3,8 @@
page {
background-color: #fff;
}

.top{
}
.headBox {
width: 690rpx;
margin: 30rpx auto 0;
@@ -27,7 +28,7 @@ page {
font-size: 32rpx;
word-break: break-all;
text-align: justify;
font-weight:bold;
font-weight: bold;
}

::-webkit-scrollbar {
@@ -56,29 +57,33 @@ page {
}

.price {
width: 690rpx;
font-size: 28rpx;
color: #999;
width: 100%;
margin-top: 10rpx;
line-height: 40rpx;
margin: 10rpx auto 60rpx;
}
.time{
color: #999!important;

.time {
color: #999 !important;
}
.price .fl{

.price .fl {
width: 15%;
color: #666;
color: #333;
}
.price .fr{

.price .fr {
width: 85%;
color: #999;
line-height: 40rpx;
font-size: 26rpx;
}
.titleName .fr{

.titleName .fr {
color: #999;
font-size: 27rpx;
}

.borderBox {
width: 750rpx;
margin-top: 26rpx;
@@ -212,14 +217,16 @@ page {
}

.passNumberBox {
width: 690rpx;
margin: 50rpx auto 0;
position: relative;
background-color: white;
/* border-bottom: 1rpx #f8f8f8 solid; */
margin-top: 60rpx;
}
.numberBox{

.numberBox {
width: 100%;
}

.passNumber {
width: 400rpx;
height: 100rpx;
@@ -399,7 +406,7 @@ page {
left: 0;
top: 0;
z-index: 100000000;
border-radius:60rpx;
border-radius: 60rpx;
}

.active {
@@ -407,17 +414,17 @@ page {
}

.borderBox {
width: 690rpx;
margin: 50rpx auto 0;
width: 750rpx;
border-top: 4rpx #f8f8f8 solid;
}

.carmanage {
position: relative;
width: 690rpx;
margin: 0 auto;
height: 88rpx;
line-height: 88rpx;
border-bottom: 1rpx solid #eee;
height: 80rpx;
line-height: 82rpx;
/* border-bottom: 1rpx solid #eee; */
}

.carmanage .fr {
@@ -425,7 +432,6 @@ page {
color: #888;
letter-spacing: 1.16rpx;
text-align: right;
margin-right: 40rpx;
}

.fl {
@@ -457,9 +463,9 @@ page {

.mycar {
display: inline-block;
margin-left: 20rpx;
font-size: 30rpx;
font-size: 33rpx;
color: #333;
line-height: 35rpx;
letter-spacing: 1.16rpx;
}

@@ -555,7 +561,7 @@ button::after {
margin: 0 8rpx;
width: 32rpx;
height: 14rpx;
background: #fff;
background: #ccc;
border-radius: 8rpx;
transition: all 0.6s;
}
@@ -581,7 +587,7 @@ button::after {
.orderBox .fr {
line-height: 60rpx;
font-size: 28rpx;
color: #FF4949;
color: #ff4949;
}

.jians {
@@ -590,7 +596,7 @@ button::after {
width: 34rpx;
height: 34rpx;
text-align: center;
background: orange;
background: #ff4949;
line-height: 34rpx;
color: #fff;
border-radius: 6rpx;


+ 3
- 6
pages/user/index.js Ver arquivo

@@ -6,10 +6,6 @@ Page({
* 页面的初始数据
*/
data: {
// user: {
// avatar:
// "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg"
// }
flag: 'hidden',
score:'0'
},
@@ -34,7 +30,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},

/**
@@ -71,7 +67,8 @@ Page({
}).then(res=>{
console.log(res);
that.setData({
score: res.data.score
score: res.data.score,
levelName: res.data.levelName
})
})
},


+ 1
- 1
pages/user/index.wxml Ver arquivo

@@ -8,7 +8,7 @@
</view>
<view class="user-phone">
<open-data type="userNickName"></open-data>
<view class='chengzhang'>微信用户</view>
<view class='chengzhang'>等级:{{levelName}}</view>
</view>
<view class='chengzhang1'>
<view class="view">{{score}}


+ 2
- 2
project.config.json Ver arquivo

@@ -4,14 +4,14 @@
"ignore": []
},
"setting": {
"urlCheck": false,
"urlCheck": true,
"es6": true,
"postcss": true,
"minified": true,
"newFeature": true
},
"compileType": "miniprogram",
"libVersion": "2.2.5",
"libVersion": "2.0.9",
"appid": "wx649b3be73c1afe47",
"projectname": "%E5%AF%8C%E8%8C%82%E9%93%BE%E5%AE%A2",
"isGameTourist": false,


+ 24
- 1
utils/util.js Ver arquivo

@@ -96,10 +96,33 @@ function timechuo(startTime) {
console.log(month, day, hour, minute, second);
return (day+"天"+hour+"小时"+minute+"分钟")
}


//计算时间差
function timecha(endTime,startTime) {
var s1 = new Date(endTime.replace(/-/g, "/"));
var s2 = new Date(startTime.replace(/-/g, "/"));
var runTime = parseInt((s1.getTime() - s2.getTime()) / 1000);
var year = Math.floor(runTime / 86400 / 365);
var runTime = runTime % (86400 * 365);
var month = Math.floor(runTime / 86400 / 30);
var runTime = runTime % (86400 * 30);
var day = Math.floor(runTime / 86400);
var runTime = runTime % 86400;
var hour = Math.floor(runTime / 3600);
var runTime = runTime % 3600;
var minute = Math.floor(runTime / 60);
var runTime = runTime % 60;
var second = runTime;
console.log(month, day, hour, minute, second);
return (day+"天"+hour+"小时"+minute+"分钟")
}

module.exports = {
formatTime: formatTime,
barcode: barc,
qrcode: qrc,
fmtDate: fmtDate,
timechuo:timechuo
timechuo:timechuo,
timecha:timecha
};

Carregando…
Cancelar
Salvar