diff --git a/app.json b/app.json
index d097115..2fdf307 100644
--- a/app.json
+++ b/app.json
@@ -19,7 +19,8 @@
"pages/login/index",
"pages/park/park",
"pages/passCar/passCar",
- "pages/addPark/addPark"
+ "pages/addPark/addPark",
+ "pages/youhuiquanma/index"
],
"tabBar": {
"color": "#9F9F9F",
diff --git a/assets/img/yhqbg.PNG b/assets/img/yhqbg.PNG
new file mode 100644
index 0000000..018744c
Binary files /dev/null and b/assets/img/yhqbg.PNG differ
diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js
index c5ef6ef..b70ea7e 100644
--- a/pages/order/detail/index.js
+++ b/pages/order/detail/index.js
@@ -19,54 +19,57 @@ Page({
*/
powerDrawer: function(e) {
- var currentStatu = e.currentTarget.dataset.statu;
- console.log(e.currentTarget.dataset.statu);
+ // var currentStatu = e.currentTarget.dataset.statu;
+ wx.navigateTo({
+ url: `/pages/youhuiquanma/index?quancode=${e.currentTarget.dataset.quancode}&title=${e.currentTarget.dataset.title}&subtitle=${e.currentTarget.dataset.subtitle}&remark=${e.currentTarget.dataset.remark}`,
+ })
+ // console.log(e.currentTarget.dataset.statu);
console.log(e.currentTarget.dataset.quancode);
- this.utils(currentStatu, e.currentTarget.dataset.quancode);
+ // this.utils(currentStatu, e.currentTarget.dataset.quancode);
},
- utils: function(currentStatu, quancode) {
- /* 动画部分 */
- // 第1步:创建动画实例
- var animation = wx.createAnimation({
- duration: 200, //动画时长
- timingFunction: "linear", //线性
- delay: 0 //0则不延迟
- }); // 第2步:这个动画实例赋给当前的动画实例
- this.animation = animation; // 第3步:执行第一组动画
- animation.opacity(0).step(); // 第4步:导出动画对象赋给数据对象储存
- this.setData({
- animationData: animation.export()
- }); // 第5步:设置定时器到指定时候后,执行第二组动画
- setTimeout(
- function() {
- // 执行第二组动画
- animation.opacity(1).step(); // 给数据对象储存的第一组动画,更替为执行完第二组动画的动画对象
- this.setData({
- animationData: animation
- }); //关闭
- if (currentStatu == "close") {
- this.setData({
- showModalStatus: false
- });
- }
- }.bind(this),
- 20
- );
- // 显示
- if (currentStatu == "open") {
- this.setData({
- showModalStatus: true
- });
- this.data.flag++;
+ // utils: function(currentStatu, quancode) {
+ // /* 动画部分 */
+ // // 第1步:创建动画实例
+ // var animation = wx.createAnimation({
+ // duration: 200, //动画时长
+ // timingFunction: "linear", //线性
+ // delay: 0 //0则不延迟
+ // }); // 第2步:这个动画实例赋给当前的动画实例
+ // this.animation = animation; // 第3步:执行第一组动画
+ // animation.opacity(0).step(); // 第4步:导出动画对象赋给数据对象储存
+ // this.setData({
+ // animationData: animation.export()
+ // }); // 第5步:设置定时器到指定时候后,执行第二组动画
+ // setTimeout(
+ // function() {
+ // // 执行第二组动画
+ // animation.opacity(1).step(); // 给数据对象储存的第一组动画,更替为执行完第二组动画的动画对象
+ // this.setData({
+ // animationData: animation
+ // }); //关闭
+ // if (currentStatu == "close") {
+ // this.setData({
+ // showModalStatus: false
+ // });
+ // }
+ // }.bind(this),
+ // 20
+ // );
+ // // 显示
+ // if (currentStatu == "open") {
+ // this.setData({
+ // showModalStatus: true
+ // });
+ // this.data.flag++;
- console.log(this.data.flag);
- util.barcode("barcode" + this.data.flag, quancode, 500, 100);
- util.qrcode("qrcode" + this.data.flag, quancode, 350, 350);
- this.setData({
- flag: this.data.flag
- });
- }
- },
+ // console.log(this.data.flag);
+ // util.barcode("barcode" + this.data.flag, quancode, 500, 100);
+ // util.qrcode("qrcode" + this.data.flag, quancode, 350, 350);
+ // this.setData({
+ // flag: this.data.flag
+ // });
+ // }
+ // },
/**
* 生命周期函数--监听页面加载
*/
diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml
index 713c851..1633130 100644
--- a/pages/order/detail/index.wxml
+++ b/pages/order/detail/index.wxml
@@ -29,7 +29,7 @@
适用门店
{{order.merchantName}}
-
+
兑换码:
{{order.id}}
@@ -53,13 +53,13 @@
-
+
-
+
diff --git a/pages/youhuiquanma/index.js b/pages/youhuiquanma/index.js
new file mode 100644
index 0000000..84f0690
--- /dev/null
+++ b/pages/youhuiquanma/index.js
@@ -0,0 +1,77 @@
+let util = require("../../utils/util");
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ code:''
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ console.log(options.quancode);
+ console.log(options);
+ console.log(options.subtitle);
+
+ util.barcode("barcode", options.quancode, 500, 100);
+ util.qrcode("qrcode", options.quancode, 350, 350);
+ this.setData({
+ code:options.quancode,
+ title:options.title,
+ subtitle:options.subtitle,
+ remark:options.remark
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/youhuiquanma/index.json b/pages/youhuiquanma/index.json
new file mode 100644
index 0000000..fc979cc
--- /dev/null
+++ b/pages/youhuiquanma/index.json
@@ -0,0 +1,3 @@
+{
+ "navigationBarTitleText": "优惠券"
+}
\ No newline at end of file
diff --git a/pages/youhuiquanma/index.wxml b/pages/youhuiquanma/index.wxml
new file mode 100644
index 0000000..0fad8ec
--- /dev/null
+++ b/pages/youhuiquanma/index.wxml
@@ -0,0 +1,18 @@
+
+
+ {{title}}
+ {{subtitle}}
+
+
+
+
+
+
+
+ 兑换码:{{code}}
+
+
+ 购买须知:
+
+
+
\ No newline at end of file
diff --git a/pages/youhuiquanma/index.wxss b/pages/youhuiquanma/index.wxss
new file mode 100644
index 0000000..13cae47
--- /dev/null
+++ b/pages/youhuiquanma/index.wxss
@@ -0,0 +1,129 @@
+page {
+ background: #4e99f8;
+}
+.couponbg {
+ position: relative;
+ height: 100%;
+ width: 100%;
+}
+.couponbg image {
+ display: block;
+ position: absolute;
+ width: 95%;
+ height: 95%;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ margin: auto;
+ z-index: -19999;
+ border-radius: 20rpx;
+}
+.title {
+ font-size: 33rpx;
+ color: #0c1829;
+ line-height: 36rpx;
+ text-align: center;
+ padding-top: 106rpx;
+}
+.subtitle {
+ color: #7f8b9e;
+ font-size: 26rpx;
+ line-height: 30rpx;
+ margin-top: 16rpx;
+ text-align: center;
+}
+.panel {
+ width: 600rpx;
+ border-radius: 10rpx;
+ background-color: #fff;
+ margin: 30rpx auto 0;
+ padding: 30rpx 0;
+ position: relative;
+ z-index: 10000000000;
+}
+.pane2 {
+ background: #fff;
+ opacity: 0.6;
+}
+.pane2 image {
+ width: 500rpx;
+ display: block;
+ margin: 40rpx auto 0;
+}
+
+.barcode {
+ height: 100rpx;
+ width: 500rpx;
+ margin: 0 auto;
+}
+
+.barnum {
+ height: 46rpx;
+ line-height: 46rpx;
+ font-size: 24rpx;
+ text-align: center;
+ letter-spacing: 2rpx;
+ white-space: nowrap;
+ color: #7f7f7f;
+}
+
+.barnum text {
+ color: #767676;
+}
+
+.barcode > canvas {
+ width: 500rpx;
+ height: 100rpx;
+}
+
+.qrcode {
+ height: 380rpx;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-end;
+ align-items: center;
+}
+
+.qrcode > canvas {
+ width: 350rpx;
+ height: 350rpx;
+}
+.jine {
+ color: #f96563 !important;
+ font-size: 36rpx !important;
+}
+
+.buy-view {
+ background: #fff;
+ position: fixed;
+ padding-top: 10rpx;
+ height: 98rpx;
+ bottom: 0rpx;
+ left: 0;
+ right: 0;
+}
+
+.buy {
+ background: #fff;
+ height: 88rpx;
+ width: 98%;
+ margin: 0 auto;
+ color: #7e7e7e;
+ line-height: 88rpx;
+ border-radius: 16rpx;
+ border: 1px solid #eee;
+ margin-top:40rpx;
+}
+.gou{
+ padding-left: 80rpx;
+ color: #878d95;
+ padding-top:30rpx;
+ font-size: 30rpx;
+}
+.mai{
+ color: #666;
+}
+.remark{
+ padding-top: 37rpx;
+}
\ No newline at end of file