diff --git a/app.json b/app.json
index 5f383e0..7200a0c 100644
--- a/app.json
+++ b/app.json
@@ -4,7 +4,6 @@
"pages/passCar/choiceCar/choiceCar",
"pages/bannerdetail/index",
"pages/getuserinfo/index",
- "pages/getphoneInfo/index",
"pages/phoneinput/phoneinput",
"pages/market/index",
"pages/user/index",
@@ -20,8 +19,9 @@
"pages/login/index",
"pages/park/park",
"pages/passCar/passCar",
+ "pages/getphoneInfo/index",
"pages/addPark/addPark",
- "pages/youhuiquanma/index",
+ "pages/orderquanma/index",
"pages/passCar/couponList/couponList"
],
"tabBar": {
diff --git a/app.wxss b/app.wxss
index 8d32e91..99e15d2 100644
--- a/app.wxss
+++ b/app.wxss
@@ -1,97 +1,105 @@
-@import 'weui.wxss';
+@import "weui.wxss";
@font-face {
- font-family: 'iconfont'; /* project id 777313 */
- src: url('//at.alicdn.com/t/font_777313_jq7td4d3uab.eot');
- src: url('//at.alicdn.com/t/font_777313_jq7td4d3uab.eot?#iefix') format('embedded-opentype'),
- url('//at.alicdn.com/t/font_777313_jq7td4d3uab.woff') format('woff'),
- url('//at.alicdn.com/t/font_777313_jq7td4d3uab.ttf') format('truetype'),
- url('//at.alicdn.com/t/font_777313_jq7td4d3uab.svg#iconfont') format('svg');
- }
+ font-family: "iconfont"; /* project id 777313 */
+ src: url("//at.alicdn.com/t/font_777313_jq7td4d3uab.eot");
+ src: url("//at.alicdn.com/t/font_777313_jq7td4d3uab.eot?#iefix")
+ format("embedded-opentype"),
+ url("//at.alicdn.com/t/font_777313_jq7td4d3uab.woff") format("woff"),
+ url("//at.alicdn.com/t/font_777313_jq7td4d3uab.ttf") format("truetype"),
+ url("//at.alicdn.com/t/font_777313_jq7td4d3uab.svg#iconfont") format("svg");
+}
.iconfont {
- font-family: "iconfont" !important;
- font-size: 36rpx;
- font-style: normal;
- -webkit-font-smoothing: antialiased;
- -webkit-text-stroke-width: 0.2rpx;
- -moz-osx-font-smoothing: grayscale;
+ font-family: "iconfont" !important;
+ font-size: 36rpx;
+ font-style: normal;
+ -webkit-font-smoothing: antialiased;
+ -webkit-text-stroke-width: 0.2rpx;
+ -moz-osx-font-smoothing: grayscale;
}
/* 定位 */
-.icon-dingweib:before { content: "\e652"; }
+.icon-dingweib:before {
+ content: "\e652";
+}
/* 三角 */
-.icon-choose:before { content: "\e601"; }
+.icon-choose:before {
+ content: "\e601";
+}
/* 右箭头 */
-.icon-right:before { content: "\e612"; }
+.icon-right:before {
+ content: "\e612";
+}
/* 边框 */
.app-border-top,
.app-border-bottom {
- position: relative;
- width: 100%;
+ position: relative;
+ width: 100%;
}
.app-border-top::after,
.app-border-bottom::after {
- content: '';
- position: absolute;
- background-color: #ddd;
- display: block !important;
- z-index: 1;
- top: auto;
- right: auto;
- width: 100%;
- height: 1rpx;
- transform-origin: 50% 100%;
- transform: scaleY(0.5);
+ content: "";
+ position: absolute;
+ background-color: #ddd;
+ display: block !important;
+ z-index: 1;
+ top: auto;
+ right: auto;
+ width: 100%;
+ height: 1rpx;
+ transform-origin: 50% 100%;
+ transform: scaleY(0.5);
}
.app-border-top:last-child:after,
.app-border-bottom:last-child::after {
- display: none !important;
+ display: none !important;
}
.app-border-top::after {
- top: 0;
+ top: 0;
}
.app-border-bottom::after {
- bottom: 0;
+ bottom: 0;
}
.app-border-left,
.app-border-right {
- position: relative;
- height: 100%;
+ position: relative;
+ height: 100%;
}
.app-border-left::before,
.app-border-right::before {
- content: '';
- position: absolute;
- background-color: #ddd;
- display: block;
- z-index: 1;
- top: 0;
- bottom: 0;
- height: 100%;
- width: 1rpx;
- transform-origin: 50% 100%;
- transform: scaleX(0.5);
+ content: "";
+ position: absolute;
+ background-color: #ddd;
+ display: block;
+ z-index: 1;
+ top: 0;
+ bottom: 0;
+ height: 100%;
+ width: 1rpx;
+ transform-origin: 50% 100%;
+ transform: scaleX(0.5);
}
.app-border-left::before {
- left: 0;
+ left: 0;
}
.app-border-right::before {
- right: 0;
+ right: 0;
}
-view{
- font-family: PingFangSC-Semibold;
+view,
+text {
+ font-family: PingFangSC-Semibold;
}
-page{
+page {
width: 100%;
height: 100%;
+ font-weight: 400;
}
-
diff --git a/assets/img/bg.png b/assets/img/bg.png
index 018744c..5d3b249 100644
Binary files a/assets/img/bg.png and b/assets/img/bg.png differ
diff --git a/assets/img/fail.png b/assets/img/fail.png
index 406cda1..698614a 100644
Binary files a/assets/img/fail.png and b/assets/img/fail.png differ
diff --git a/assets/img/food.png b/assets/img/food.png
deleted file mode 100644
index 8ee9b8b..0000000
Binary files a/assets/img/food.png and /dev/null differ
diff --git a/assets/img/guoqi.jpg b/assets/img/guoqi.jpg
deleted file mode 100644
index ddbfc91..0000000
Binary files a/assets/img/guoqi.jpg and /dev/null differ
diff --git a/assets/img/guoqi.png b/assets/img/guoqi.png
deleted file mode 100644
index c4f0fa9..0000000
Binary files a/assets/img/guoqi.png and /dev/null differ
diff --git a/assets/img/home-n.svg b/assets/img/home-n.svg
deleted file mode 100644
index f42bc5e..0000000
--- a/assets/img/home-n.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/img/home-y.svg b/assets/img/home-y.svg
deleted file mode 100644
index 5747b94..0000000
--- a/assets/img/home-y.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/img/home0.png b/assets/img/home0.png
deleted file mode 100644
index 09fad63..0000000
Binary files a/assets/img/home0.png and /dev/null differ
diff --git a/assets/img/home1.png b/assets/img/home1.png
deleted file mode 100644
index 0f1aab0..0000000
Binary files a/assets/img/home1.png and /dev/null differ
diff --git a/assets/img/loading.gif b/assets/img/loading.gif
new file mode 100644
index 0000000..d53de68
Binary files /dev/null and b/assets/img/loading.gif differ
diff --git a/assets/img/pass0.png b/assets/img/pass0.png
index f71cdcf..109c748 100644
Binary files a/assets/img/pass0.png and b/assets/img/pass0.png differ
diff --git a/assets/img/pass1.png b/assets/img/pass1.png
index e9291de..fc131a2 100644
Binary files a/assets/img/pass1.png and b/assets/img/pass1.png differ
diff --git a/assets/img/shiyong.jpg b/assets/img/shiyong.jpg
deleted file mode 100644
index d57f90e..0000000
Binary files a/assets/img/shiyong.jpg and /dev/null differ
diff --git a/assets/img/success.png b/assets/img/success.png
new file mode 100644
index 0000000..945dde7
Binary files /dev/null and b/assets/img/success.png differ
diff --git a/assets/img/tel.jpg b/assets/img/tel.jpg
new file mode 100644
index 0000000..773ec83
Binary files /dev/null and b/assets/img/tel.jpg differ
diff --git a/assets/img/tel.gif b/assets/img/tel.png
similarity index 100%
rename from assets/img/tel.gif
rename to assets/img/tel.png
diff --git a/assets/img/tui.jpg b/assets/img/tui.jpg
deleted file mode 100644
index 733f0c7..0000000
Binary files a/assets/img/tui.jpg and /dev/null differ
diff --git a/assets/img/user-n.svg b/assets/img/user-n.svg
deleted file mode 100644
index 5975a3d..0000000
--- a/assets/img/user-n.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/img/user-y.svg b/assets/img/user-y.svg
deleted file mode 100644
index c11cdaf..0000000
--- a/assets/img/user-y.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/img/wm01.jpg b/assets/img/wm01.jpg
new file mode 100644
index 0000000..c36df7d
Binary files /dev/null and b/assets/img/wm01.jpg differ
diff --git a/assets/img/wm02.jpg b/assets/img/wm02.jpg
new file mode 100644
index 0000000..b6ad053
Binary files /dev/null and b/assets/img/wm02.jpg differ
diff --git a/assets/img/wm03.jpg b/assets/img/wm03.jpg
new file mode 100644
index 0000000..0840ef7
Binary files /dev/null and b/assets/img/wm03.jpg differ
diff --git a/components/banner/index.js b/components/banner/index.js
index 27376c7..ee42217 100644
--- a/components/banner/index.js
+++ b/components/banner/index.js
@@ -6,35 +6,33 @@ Component({
properties: {
list: {
value: [],
- type: Array,
- },
+ type: Array
+ }
},
/**
* 组件的初始数据
*/
data: {
- swiperCurrent: 0,
+ swiperCurrent: 0
},
-
/**
* 组件的方法列表
*/
- ready(){
- },
+ ready() {},
methods: {
- swiperChange: function (e) {
+ swiperChange: function(e) {
this.setData({
swiperCurrent: e.detail.current
- })
+ });
},
- gotobannerdetail:function(e){
- console.log("我要点击进入banner详情页面")
+ gotobannerdetail: function(e) {
+ console.log("我要点击进入banner详情页面");
console.log(e.currentTarget.dataset.id);
wx.navigateTo({
- url: `/pages/bannerdetail/index?id=${e.currentTarget.dataset.id}`,
- })
+ url: `/pages/bannerdetail/index?id=${e.currentTarget.dataset.id}`
+ });
}
}
-})
+});
diff --git a/components/coupons/index.wxml b/components/coupons/index.wxml
index ee55585..bf2d09f 100644
--- a/components/coupons/index.wxml
+++ b/components/coupons/index.wxml
@@ -20,11 +20,12 @@
- 剩余: {{data.remainInventory}}
+ 剩余: {{data.remainInventory}}
- 领取
- 购买
+ 领取
+ 购买
+ 已售罄
diff --git a/components/coupons/index.wxss b/components/coupons/index.wxss
index 8d3d2aa..271e333 100644
--- a/components/coupons/index.wxss
+++ b/components/coupons/index.wxss
@@ -1,4 +1,5 @@
@import "../../app.wxss";
+
.coupons {
flex-direction: row;
display: flex;
@@ -6,6 +7,7 @@
position: relative;
height: 184rpx;
}
+
.coupons-border {
height: 1rpx;
/* width: 100%; */
@@ -15,16 +17,19 @@
position: absolute;
bottom: 0;
}
+
.coupons-img {
width: 248rpx;
height: 184rpx;
overflow: hidden;
+ border: 1px solid #f8f8f8;
border-radius: 10rpx;
}
.coupons-img image {
width: 100%;
height: 100%;
+ border-radius: 10rpx;
}
.coupons-info {
@@ -32,27 +37,40 @@
}
.coupons-info-name {
- font-size: 28rpx;
- color: #000000;
+ font-size: 30rpx;
+ color: #343434;
letter-spacing: 0;
line-height: 38rpx;
}
+
.coupons-info-price {
padding: 32rpx 0 0;
}
-.i{
- font-size: 20rpx;
+
+.i {
+ font-size: 24rpx;
font-style: normal;
}
+
.coupons-info-price-p {
display: inline-block;
font-size: 36rpx;
color: #f96563;
line-height: 50rpx;
+ font-weight: 600;
}
-.tit{
- margin-top: 32rpx;
+
+.tit {
+ margin-top: 14rpx;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ width: 300rpx;
+ height: 40rpx;
+ font-weight: 600;
+ font-size: 30rpx;
}
+
.coupons-info-price-o {
display: block;
text-align: center;
@@ -91,26 +109,48 @@
padding: 0 !important;
font-family: PingFangSC-Semibold;
font-size: 28rpx;
- color: #ffffff !important;
+ color: #fff !important;
+ letter-spacing: 0;
+ height: 50rpx !important;
+ width: 138rpx !important;
+ line-height: 50rpx !important;
+}
+.coupons-btn-gms {
+ background: #999!important;
+ border-radius: 10rpx !important;
+ opacity: .6;
+ margin: 0 !important;
+ padding: 0 !important;
+ font-family: PingFangSC-Semibold;
+ font-size: 28rpx;
+ color: #fff !important;
letter-spacing: 0;
height: 50rpx !important;
width: 138rpx !important;
line-height: 50rpx !important;
}
.subtitle {
- font-size: 22rpx;
- color: #333;
- font-weight: 100;
+ font-size: 24rpx;
+ color: #6f6f6f;
text-align: left;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ width: 300rpx;
+ height: 40rpx;
+ margin-top: 8rpx;
}
+
.coupons-info-manjian {
- color: #fa7c7a;
+ color: #6f6f6f !important;
+ font-weight: normal;
font-size: 20rpx;
line-height: 34rpx;
display: inline-block;
}
/**上拉加载更多**/
+
.userinfo {
display: flex;
flex-direction: column;
@@ -127,16 +167,21 @@
.userinfo-nickname {
color: #aaa;
}
-.sy{
+
+.sy {
display: block;
- text-align: center;
+ text-align: left;
+ width: 136rpx;
+ font-size: 24rpx;
+ color: #6f6f6f;
+ height: 40rpx;
+ margin-top: 8rpx;
}
+
.usermotto {
margin-top: 200px;
}
-/**/
-
scroll-view {
width: 100%;
}
diff --git a/config/config.js b/config/config.js
index e788e02..5e5a995 100755
--- a/config/config.js
+++ b/config/config.js
@@ -1,7 +1,7 @@
var config = {
- name: "富茂",
+ name: "富茂科技",
url: "https://ciformall.youlane.cn/C/api",
- //url: "http://fd1a0cab.ngrok.io/C/api",
+ // url: "http://fd1a0cab.ngrok.io/C/api",
api: {
/**
* 接口用途:login
@@ -23,14 +23,11 @@ var config = {
* 检查用户手机授权状态
*/
checkPhoneStatus: "/user/checkPhoneStatus",
- /**
- * 优惠券查询
- */
- couponList: "/wxCoupon/list",
/**
* 优惠券详情
*/
couponDetail: "/wxCoupon/detail",
+
/**
* 业态查询
*/
@@ -119,7 +116,14 @@ var config = {
/**
* banner详情页面
*/
- bannerDetail: "/wxCampaign/findById"
+ bannerDetail: "/wxCampaign/findById",
+ /**
+ * 授权个人信息
+ * 和授权手机号
+ * 和login页面
+ * 页面的图标
+ */
+ marketicon:'/mall/getAppIcon'
},
weapp: {
diff --git a/pages/bannerdetail/index.wxml b/pages/bannerdetail/index.wxml
index 8d94e04..333cecb 100644
--- a/pages/bannerdetail/index.wxml
+++ b/pages/bannerdetail/index.wxml
@@ -37,7 +37,7 @@
-->
-
+
diff --git a/pages/bannerdetail/index.wxss b/pages/bannerdetail/index.wxss
index 17f9b83..59b1183 100644
--- a/pages/bannerdetail/index.wxss
+++ b/pages/bannerdetail/index.wxss
@@ -1,4 +1,5 @@
@import "../../app.wxss";
+
.coupons {
width: 100%;
background: #f6f6f6;
@@ -25,7 +26,7 @@
height: 120rpx;
display: flex;
justify-content: space-between;
- padding: 0 4%;
+ padding: 0 4% 4%;
background: #fff;
}
@@ -36,7 +37,7 @@
.coupons_info view:nth-child(1) text {
font-size: 30rpx;
- margin-top: 3%;
+ margin-top: 10%;
}
.coupons_info view:nth-child(1) text:nth-child(1) text {
@@ -141,14 +142,14 @@
color: #b8b8b8;
padding-top: 10rpx;
}
+
.notes view:nth-child(1) {
width: 92%;
height: 87rpx;
padding: 0 4%;
line-height: 87rpx;
background: #fff;
- border-bottom: 1rpx solid #f5f5f5;
- border-top: 1rpx solid #f5f5f5;
+ /* border-top: 1rpx solid #f5f5f5; */
}
.notes view:nth-child(1) text {
@@ -159,7 +160,7 @@
.notes view:nth-child(2) {
width: 92%;
height: auto;
- padding:4%;
+ padding: 0 4% 4%;
background: #fff;
border-bottom: 1rpx solid #f5f5f5;
display: flex;
@@ -187,7 +188,7 @@
background: #fff;
position: fixed;
padding-top: 10rpx;
- height:98rpx;
+ height: 98rpx;
bottom: 0rpx;
left: 0;
right: 0;
@@ -205,6 +206,7 @@
text-align: center;
border-radius: 6rpx;
}
+
.coupons1-btn-gm {
background: #00c0ff !important;
border-radius: 10rpx !important;
@@ -212,20 +214,22 @@
padding: 0 !important;
font-family: PingFangSC-Semibold;
font-size: 28rpx;
- color: #ffffff !important;
+ color: #fff !important;
letter-spacing: 0;
height: 50rpx !important;
width: 138rpx !important;
line-height: 50rpx !important;
}
+
.coupons1 {
flex-direction: row;
display: flex;
padding: 30rpx;
position: relative;
height: 184rpx;
- border:1px solid #eee;
+ border: 1px solid #eee;
}
+
.coupons1-border {
height: 1rpx;
/* width: 100%; */
@@ -235,6 +239,7 @@
position: absolute;
bottom: 0;
}
+
.coupons1-img {
width: 248rpx;
height: 184rpx;
@@ -253,26 +258,31 @@
.coupons1-info-name {
font-size: 28rpx;
- color: #000000;
+ color: #000;
letter-spacing: 0;
line-height: 38rpx;
}
+
.coupons1-info-price {
padding: 32rpx 0 0;
}
-.i{
+
+.i {
font-size: 20rpx;
font-style: normal;
}
+
.coupons1-info-price-p {
display: inline-block;
font-size: 36rpx;
color: #f96563;
line-height: 50rpx;
}
-.tit{
+
+.tit {
margin-top: 32rpx;
}
+
.coupons1-info-price-o {
display: block;
text-align: center;
@@ -300,6 +310,7 @@
.coupons1-btn {
position: absolute;
+ width: 120rpx;
top: 40rpx;
right: 30rpx;
}
@@ -311,18 +322,25 @@
padding: 0 !important;
font-family: PingFangSC-Semibold;
font-size: 28rpx;
- color: #ffffff !important;
+ color: #fff !important;
letter-spacing: 0;
height: 50rpx !important;
width: 138rpx !important;
line-height: 50rpx !important;
}
+
.subtitle {
font-size: 22rpx;
color: #333;
font-weight: 100;
text-align: left;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ width: 300rpx;
+ height: 40rpx;
}
+
.coupons1-info-manjian {
color: #fa7c7a;
font-size: 20rpx;
@@ -331,6 +349,7 @@
}
/**上拉加载更多**/
+
.userinfo {
display: flex;
flex-direction: column;
@@ -347,10 +366,13 @@
.userinfo-nickname {
color: #aaa;
}
-.sy{
+
+.sy {
display: block;
text-align: center;
+ width: 120rpx!important;
}
+
.usermotto {
margin-top: 200px;
}
diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js
index 01005c3..a65ec6c 100644
--- a/pages/coupon/detail/index.js
+++ b/pages/coupon/detail/index.js
@@ -13,81 +13,59 @@ Page({
hour: "",
minute: ""
},
+ phone: function() {
+ let that = this;
+ console.log(that.data);
+ if (that.data.data.merchantLinkPhone) {
+ wx.makePhoneCall({
+ phoneNumber: that.data.data.merchantLinkPhone
+ });
+ }
+ },
onLoad(options) {
let that = this;
- console.log(options.couponChannelId);
- console.log(options.couponId);
- that.init();
+ console.log(options);
+ console.log("couponChannelId" + options.couponChannelId);
+ console.log("couponId" + options.couponId);
+ console.log("传的变量的名字叫couponId");
+ wx.showLoading({
+ title: "加载中..."
+ });
+
/**
- * 首页banner detail couponlist传过来的值
- * iambannercoupon
+ * 暂时注销
+ * this.orderFunc()
*/
-
+ // if (options.flag) {
+ // // this.orderFunc();
+ // }
+ // else {
+ // }
that.setData({
couponChannelId: options.couponChannelId,
couponId: options.couponId
});
-
- wx.showLoading({
- title: "加载中..."
- });
-
- if (options.flag) {
- console.log('111111111111111'+JSON.stringify(options))
- this.orderFunc();
- } else {
-
- if(options.couponChannelId=='iambannercoupon'){
- /**
- * 待解决
- */
- var details ={
- couponChannelId: options.couponId
- }
- }else{
- var details ={
- couponChannelId: options.couponChannelId
- }
+ var parmer = {
+ url: config.api.couponDetail,
+ data: {
+ couponChannelId: options.couponChannelId
}
-
- Http.get({
- url: config.api.couponDetail,
- data: details
- }).then(res => {
- console.log(res);
- console.log("details")
- //当前时间与优惠券下架时间做计算
- var startTime = util.fmtDate(res.data.endTime);
- console.log(startTime);
- var s1 = new Date(startTime.replace(/-/g, "/"));
- var s2 = new Date();
- 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(year, month, day, hour, minute, second);
- that.setData({
- year: year,
- month: month,
- day: day,
- hour: hour,
- minute: minute
- });
- console.log(that.data.day);
- wx.hideLoading();
- that.setData({
- data: res.data
- });
+ };
+ Http.get(parmer).then(res => {
+ console.log(res);
+ console.log("details");
+ //当前时间与优惠券下架时间做计算
+ var endTime = util.fmtDate(res.data.endTime);
+ util.timechuo(endTime);
+ that.setData({
+ endtime: util.timechuo(endTime)
});
- }
+ wx.hideLoading();
+ that.setData({
+ data: res.data
+ });
+ });
+ // }
},
/**
* 支付订单更新
@@ -193,7 +171,7 @@ Page({
this.initUsrCarList()
// 领取 5.停车券
// TODO 选取用户下的车牌
- console.log(11111111111111111111111111111111)
+ console.log(1111111111111)
} else {
Http.post({
url: config.api.checkPhoneStatus,
@@ -201,24 +179,88 @@ Page({
})
.then(res => {
console.log(res);
+ console.log("姐姐在检查手机号是否授权的情况");
+ var data = {
+ couponChannelId: "" + that.data.couponChannelId,
+ couponId: "" + that.data.couponId
+ };
+ if (that.data.couponChannelId == null) {
+ var data = {
+ couponId: "" + that.data.couponId
+ };
+ }
/**
* orderSave 下单
*/
return Http.post({
url: config.api.orderSave,
- data: {
- couponChannelId: "" + that.data.couponChannelId,
- couponId: "" + that.data.couponId
- }
+ data: data
});
})
.catch(err => {
console.log(err);
+ console.log(that.data.couponChannelId);
+ console.log(that.data.couponId);
+ console.log("我即将要跳转到用户手机号授权的页面");
+ if (err.code == "3000") {
+ wx.showToast({
+ title: "库存不足",
+ image: "./../../../assets/img/fail.png",
+ duration: 2000,
+ mask: false
+ });
+ }
+ if (err.code == "3001") {
+ wx.showToast({
+ title: "领取达到上限",
+ image: "./../../../assets/img/fail.png",
+ duration: 2000,
+ mask: false
+ });
+ }
+ if (err.code == "3002") {
+ wx.showToast({
+ title: "订单失败",
+ image: "./../../../assets/img/fail.png",
+ duration: 2000,
+ mask: false
+ });
+ }
+ if (err.code == "3003") {
+ wx.showToast({
+ title: "订单不存在",
+ image: "./../../../assets/img/fail.png",
+ duration: 2000,
+ mask: false
+ });
+ }
+ if (err.code == "3004") {
+ wx.showToast({
+ title: "订单不存在",
+ image: "./../../../assets/img/fail.png",
+ duration: 2000,
+ mask: false
+ });
+ }
+
+ if (err.code == "4003") {
+ wx.showToast({
+ title: "卡券已作废",
+ image: "./../../../assets/img/fail.png",
+ duration: 2000,
+ mask: false
+ });
+ }
+
if (err.code == 11005) {
// 用户手机未授权
+ /**
+ * 将值传到用户手机号授权的页面
+ *
+ */
wx.redirectTo({
url:
- "../../getphoneInfo/index?couponChannelId=" +
+ "/pages/getphoneInfo/index?couponChannelId=" +
that.data.couponChannelId +
"&couponId=" +
that.data.couponId
@@ -228,9 +270,9 @@ Page({
// 用户手机已加密
wx.redirectTo({
url:
- "../../phoneinput/phoneinput?couponChannelId=" +
+ "/pages/phoneinput/phoneinput?couponChannelId=" +
that.data.couponChannelId +
- "& couponId=" +
+ "&couponId=" +
that.data.couponId
});
}
@@ -239,7 +281,8 @@ Page({
console.log(res);
console.log("点击领取卡券一直在loading");
if (res != "undefined") {
- const orderId = "" + res.data.id;
+ console.log(res);
+ let orderId = "" + res.data.id;
that.setData({
orderId: orderId
});
@@ -255,7 +298,6 @@ Page({
}
}).then(res => {
console.log(res);
-
/// Begin payment ----
var payOrderId = "" + res.data.payOrderId;
wx.hideLoading();
@@ -266,20 +308,36 @@ Page({
signType: "MD5",
paySign: res.data.paySign,
success: res => {
- console.log(res);
- console.log("姐在检查付款异常");
that.payOrderUpdate(that.data.orderId, payOrderId, 1); // 支付成功
console.log(res);
if (res.errMsg == "requestPayment:ok") {
wx.showToast({
title: "购买成功",
- duration: 2500
+ image: "./../../../assets/img/success.png",
+ duration: 2000,
+ mask: false,
+ success: function() {
+ wx.showLoading({
+ title: "加载中..."
+ });
+
+ setTimeout(function() {
+ wx.hideLoading();
+ }, 1600);
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `/pages/order/detail/index?orderId=${
+ that.data.orderId
+ }`
+ });
+ }, 1600);
+ }
});
- }
- wx.navigateBack({
- delta: 2
- });
+ /**
+ * 用户支付成功以后跳转到券包列表
+ */
+ }
},
fail: res => {
@@ -290,29 +348,12 @@ Page({
complete: res => {
console.log(res);
console.log("支付完成");
- // var url = res.data.url;
- // console.log("get url", url);
if (res.errMsg == "requestPayment:ok") {
- wx.showModal({
- title: "提示",
- content: "支付成功"
- });
- // if (url) {
- // setTimeout(function () {
- // wx.redirectTo({
- // url: "/pages" + url
- // });
- // }, 2000);
- // } else {
- // setTimeout(() => {
- // wx.navigateBack();
- // }, 2000);
- // }
} else {
wx.showToast({
title: "支付失败",
image: "./../../../assets/img/fail.png",
- duration: 1500,
+ duration: 2000,
mask: false
});
}
@@ -331,7 +372,8 @@ Page({
that.payOrderUpdate(orderId, "0", 1);
wx.showToast({
title: "领取成功",
- duration: 3000
+ duration: 3000,
+ image: "./../../../assets/img/success.png"
});
}
}
diff --git a/pages/coupon/detail/index.wxml b/pages/coupon/detail/index.wxml
index 3161d67..f9888a0 100644
--- a/pages/coupon/detail/index.wxml
+++ b/pages/coupon/detail/index.wxml
@@ -7,7 +7,8 @@
{{data.title}}限购{{data.useLimitQuantity}}件
- 剩余时间:{{day}}天{{hour}}小时{{minute}}分钟
+ 剩余时间:{{endtime}}
+ 当次有效
剩余件数:{{data.remainInventory}}件
@@ -25,6 +26,7 @@
{{data.merchantName}}
{{data.addr}}{{data.buildingName}}{{data.floorName}}
+
实付金额{{data.couponPrice/100}}元
@@ -65,13 +64,7 @@
购买须知
- 有效期2018.01.16 至 2018.09.20
- 除特价酒水及特价菜外全场通用
- 无需预约,消费g高峰时可能需要等位
- 没人最多购买2张
- 不可使用包间
- 堂食外带均可,可免费打包
- 每桌限用2张
+ {{data.remark}}
\ No newline at end of file
diff --git a/pages/couponorder/detail/index.wxss b/pages/couponorder/detail/index.wxss
index c1a7818..8fe8f78 100644
--- a/pages/couponorder/detail/index.wxss
+++ b/pages/couponorder/detail/index.wxss
@@ -2,17 +2,16 @@
padding-bottom: 10rpx;
}
-.panel {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-items: stretch;
- box-sizing: border-box;
- width: 710rpx;
- margin-top: 40rpx;
+.panel,.zhuangtai image{
+ position: relative;
+ width: 510rpx;
+ height: 581rpx;
+ display: block;
border-radius: 10rpx;
background-color: #fff;
- margin: 30rpx auto 0;
+ margin: 22rpx auto 0;
+ padding: 30rpx 0 0;
+ z-index: 10000000000;
}
.pane2{
background: #fff;
@@ -24,47 +23,54 @@
margin: 40rpx auto 0;
}
+.buy {
+ background: #fff;
+ height: 88rpx;
+ width: 98%;
+ color: #7e7e7e;
+ line-height: 88rpx;
+ border-radius: 16rpx;
+ border: 1px solid #eee;
+}
+
.barcode {
- display: flex;
height: 100rpx;
- flex-direction: column;
- justify-content: center;
- align-items: center;
+ width: 510rpx;
+ margin: 0 auto;
}
.barnum {
- width: 670rpx;
- height: 46rpx;
- line-height: 46rpx;
- font-size: 32rpx;
+ font-size: 24rpx;
text-align: center;
letter-spacing: 2rpx;
white-space: nowrap;
- color: #999;
+ color: #7f7f7f;
}
.barnum text {
- color: #333;
+ color: #767676;
}
.barcode > canvas {
- width: 680rpx;
+ width: 510rpx;
height: 100rpx;
}
.qrcode {
- height: 370rpx;
+ position: relative;
+ height: 350rpx;
+ width: 350rpx;
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
+ margin: 0 auto;
}
.qrcode > canvas {
- width: 400rpx;
- height: 400rpx;
+ width: 350rpx;
+ height: 350rpx;
}
-
.coupon_detail {
padding: 0 20rpx;
}
@@ -77,11 +83,17 @@
float: right;
}
-.coupon_detail image {
+.coupon_detail .wmfl{
display: block;
- width: 260rpx;
- height: 100rpx;
+ width: 255rpx;
+ height: 184rpx;
border-radius: 16rpx;
+ overflow: hidden;
+}
+.coupon_detail image {
+ display: block;
+ width: 100%;
+ height: 100%;
}
.coupon_detail .fr {
@@ -141,10 +153,10 @@
width: 100%;
display: flex;
flex-direction: column;
- margin-top: 50rpx;
background: #fff;
border-bottom: 20rpx solid #f5f5f5;
border-top: 20rpx solid #f5f5f5;
+ position: relative;
}
.posi_logo {
@@ -152,6 +164,7 @@
padding: 30rpx 4%;
display: flex;
position: relative;
+ z-index: 100;
}
.posi_logo view:nth-child(1) {
@@ -168,6 +181,8 @@
}
.posi_logo view:nth-child(2) {
+ position: relative;
+ z-index: 100;
display: flex;
flex-direction: column;
flex: 8;
@@ -202,10 +217,10 @@
margin: auto;
width: 50rpx;
height: 50rpx;
+ z-index:1000000;
}
.notes {
- margin-top: 2%;
border-top: 20rpx solid #f5f5f5;
}
@@ -225,7 +240,6 @@
.notes view:nth-child(2) {
width: 92%;
- height: 400rpx;
padding: 0 4%;
background: #fff;
display: flex;
diff --git a/pages/couponorder/index/index.js b/pages/couponorder/index/index.js
index a1243bf..b718208 100644
--- a/pages/couponorder/index/index.js
+++ b/pages/couponorder/index/index.js
@@ -1,6 +1,5 @@
-const format = require("../../../utils/util.js");
+const util = require("../../../utils/util.js");
const config = require("../../../config/config.js");
-const app = getApp();
const Http = require("../../../utils/HttpBasics");
Page({
data: {
@@ -26,7 +25,9 @@ Page({
current: "0",
current_scroll: "0",
page: 1,
- allow_load: true
+ allow_load: true,
+ loading: true, //"上拉加载"的变量,默认false,隐藏
+ content: ""
},
onLoad() {
this.getList(0, 0);
@@ -39,17 +40,7 @@ Page({
wx.navigateTo({
url: `/pages/couponorder/detail/index?quancode=${
e.currentTarget.dataset.quancode
- }`,
- success: function(res) {
- // success
- console.log("点击跳转到券详情页面");
- },
- fail: function() {
- // fail
- },
- complete: function() {
- // complete
- }
+ }`
});
},
getList(key, pageNum) {
@@ -57,32 +48,36 @@ Page({
console.log(key);
console.log(pageNum);
if (that.data.allow_load) {
- wx.showLoading({
- title: "加载中"
+ that.setData({
+ loading: true,
+ content: "小主,我在玩命加载中..."
});
Http.get({
url: config.api.couponOrderList,
data: {
pageNum: pageNum,
- pageSize: 8,
+ pageSize: 6,
couponOrderStatus: key
}
}).then(res => {
console.log(res);
res.data.list.map(file => {
- file.expiredTime = format.formatTime(
- file.expiredTime,
- "yyyy-MM-dddd hh:mm:ss"
- );
+ file.expiredTime = util.fmtDate(file.expiredTime);
});
- console.log("姐姐的订单列表");
setTimeout(function() {
- wx.hideLoading();
- }, 1200);
+ that.setData({
+ loading: false
+ });
+ }, 1400);
if (pageNum >= res.data.pages) {
that.setData({
allow_load: false
});
+ setTimeout(function() {
+ that.setData({
+ loading: false
+ });
+ }, 1400);
}
/**
* 先赋值后渲染页面
@@ -96,6 +91,15 @@ Page({
});
} else {
console.log("加载完成allow_load设置成false");
+ that.setData({
+ loading: true,
+ content: "^_^再拉裤子就掉啦ʅ(´◔౪◔)ʃ"
+ });
+ setTimeout(function() {
+ that.setData({
+ loading: false
+ });
+ }, 1400);
}
},
handleChange({ detail }) {
diff --git a/pages/couponorder/index/index.wxml b/pages/couponorder/index/index.wxml
index 04ce5bf..340a8ec 100644
--- a/pages/couponorder/index/index.wxml
+++ b/pages/couponorder/index/index.wxml
@@ -6,12 +6,12 @@
- 暂无优惠券可用
+ 暂无优惠券哦
-
+
@@ -30,5 +30,8 @@
+
+ {{content}}
+
\ No newline at end of file
diff --git a/pages/couponorder/index/index.wxss b/pages/couponorder/index/index.wxss
index 11c3bab..5680861 100644
--- a/pages/couponorder/index/index.wxss
+++ b/pages/couponorder/index/index.wxss
@@ -15,25 +15,23 @@
}
.section {
- margin-top: 2%;
-}
-.section:nth-of-type(1) {
- margin-top: 30rpx;
+ position: relative;
}
.detail_msg {
width: 92%;
- height: 202rpx !important;
+ height: 186rpx !important;
background: #fff;
display: flex;
- padding: 0 4%;
- margin-top: 2%;
+ padding: 30rpx 4%;
border-bottom: 1px solid #ededed;
}
.logo {
width: 348rpx;
height: 184rpx;
+ border: 1px solid #f8f8f8;
+ border-radius: 15rpx;
}
.logo image {
@@ -70,16 +68,19 @@
}
.btns {
- width: 200rpx;
+ position: absolute;
+ top: 0;
+ right: 20rpx;
+ bottom: 0;
+ margin: auto;
+ width: 180rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
background: #00c0ff;
color: #fff;
- float: right;
border-radius: 15rpx;
font-size: 28rpx;
- margin-top: 20rpx;
}
.txt1 {
@@ -92,21 +93,38 @@
color: #f96563;
}
-.nocoupon image{
+.nocoupon image {
width: 203rpx;
display: block;
margin: 200rpx auto 0;
}
-.nocoupon text{
+
+.nocoupon text {
display: block;
text-align: center;
- font-size:30rpx;
- color: #00C0FF;
+ font-size: 30rpx;
+ color: #00c0ff;
}
-.nocoupon button{
- background: #00C0FF;
+
+.nocoupon button {
+ background: #00c0ff;
color: #fff;
font-style: 30rpx;
width: 70%;
margin: 30rpx auto 0;
}
+
+.loading {
+ text-align: center;
+ height: 80rpx;
+ line-height: 80rpx;
+ font-size: 26rpx;
+ color: #999;
+}
+
+.loading image {
+ width: 40rpx;
+ height: 40rpx;
+ vertical-align: middle;
+ margin-right: 10rpx;
+}
diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js
index 5cc3912..f26ae5a 100755
--- a/pages/getphoneInfo/index.js
+++ b/pages/getphoneInfo/index.js
@@ -1,11 +1,11 @@
-var config = require('../../config/config.js');
+var config = require("../../config/config.js");
const Http = require("../../utils/HttpBasics");
var app = getApp();
Page({
data: {
- canIUse: wx.canIUse('button.open-type.getPhoneNumber'),
- couponChannelId: null,
- couponId: null
+ canIUse: wx.canIUse("button.open-type.getPhoneNumber"),
+ couponChannelId: "",
+ couponId: ""
},
onLoad: function(options) {
var that = this;
@@ -13,37 +13,59 @@ Page({
that.setData({
couponChannelId: options.couponChannelId,
couponId: options.couponId
- })
+ });
+
+ Http.get({
+ url: config.api.marketicon,
+ data: {
+ appId: config.weapp.AppId
+ }
+ }).then(res => {
+ console.log(res.data.mallImgUrl);
+ that.setData({
+ mallImgUrl: res.data.mallImgUrl
+ });
+ });
},
getPhoneNumber: function(e) {
var that = this;
var iv = e.detail.iv;
var encryptedData = e.detail.encryptedData;
Http.post({
- url: config.api.getUserPhone,
- data: {
- encryptedData: encryptedData,
- iv: iv,
- }
- })
- .then(function(res) {
- console.log(res);
- app.globalData.phone = res.data.phone;
- 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'
- })
- }
- })
- },
- function(error) {
- wx.showToast({
- title: '请重新授权手机号',
- icon: "none",
- })
- })
+ url: config.api.getUserPhone,
+ data: {
+ encryptedData: encryptedData,
+ iv: iv
+ }
+ }).then(
+ function(res) {
+ console.log(res);
+ console.log("这是用户授权手机号的结果");
+ console.log(that.data.couponChannelId);
+ console.log(that.data.couponId);
+ console.log("这是从立即支付传回来的值 因为用户没有授权手机号");
+ app.globalData.phone = res.data.phone;
+ 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"
+ });
+ }
+ });
+ },
+ function(error) {
+ wx.showToast({
+ title: "请重新授权手机号",
+ icon: "none"
+ });
+ }
+ );
}
-})
\ No newline at end of file
+});
diff --git a/pages/getphoneInfo/index.wxml b/pages/getphoneInfo/index.wxml
index eb196bf..dacfea7 100755
--- a/pages/getphoneInfo/index.wxml
+++ b/pages/getphoneInfo/index.wxml
@@ -1,5 +1,10 @@
-
-
-
- 请升级微信版本
+
+
+
+
+
+
+
+ 请升级微信版本
+
\ No newline at end of file
diff --git a/pages/getphoneInfo/index.wxss b/pages/getphoneInfo/index.wxss
index ca9cc5d..e4c5d9b 100755
--- a/pages/getphoneInfo/index.wxss
+++ b/pages/getphoneInfo/index.wxss
@@ -1,19 +1,35 @@
-.registerd image {
- display: block;
- width: 100%;
+.login-body {
+ padding-top: 200rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
}
-.registerd button {
- background: #9d285c;
- border-radius: 10rpx;
- color: #fff;
- height: 84rpx;
- line-height: 84rpx;
- margin: 30rpx auto 0;
- width: 93%;
- font-size: 28rpx;
+.login-logo {
+ width: 283rpx;
+ height: 326rpx;
}
-.bg_color {
- opacity: 0.6;
+.login-logo>image {
+ width: 100%;
+ height: 100%;
}
+
+.login-btn {
+ padding-top: 120rpx;
+ width: 504rpx;
+}
+
+.login-btn .login-btn-login {
+ background: #00C0FF !important;
+ border-radius: 10rpx !important;
+ height: 88rpx !important;
+ margin: 0 !important;
+ padding: 0 !important;
+ font-family: PingFangSC-Semibold !important;
+ font-size: 36rpx !important;
+ color: #FFFFFF !important;
+ letter-spacing: 0.75rpx !important;
+ text-align: center;
+}
\ No newline at end of file
diff --git a/pages/getuserinfo/index.js b/pages/getuserinfo/index.js
index f671631..66a64b8 100755
--- a/pages/getuserinfo/index.js
+++ b/pages/getuserinfo/index.js
@@ -1,38 +1,51 @@
-var config = require('../../config/config.js');
+var config = require("../../config/config.js");
var app = getApp();
const Http = require("../../utils/HttpBasics");
Page({
data: {
- canIUse: wx.canIUse('button.open-type.getUserInfo')
+ canIUse: wx.canIUse("button.open-type.getUserInfo")
},
onLoad: function(options) {
var that = this;
+ Http.get({
+ url: config.api.marketicon,
+ data: {
+ appId: config.weapp.AppId
+ }
+ }).then(res => {
+ console.log(res.data.mallImgUrl);
+ that.setData({
+ mallImgUrl: res.data.mallImgUrl
+ });
+ });
},
bindGetUserInfo: function(e) {
console.log(e);
var iv = e.detail.iv;
var encryptedData = e.detail.encryptedData;
- console.log(iv)
- console.log(encryptedData)
+ console.log(iv);
+ console.log(encryptedData);
Http.post({
- url: config.api.getUserInfo,
- data: {
- encryptedData: encryptedData,
- iv: iv,
- }
- })
- .then(function(res) {
+ url: config.api.getUserInfo,
+ data: {
+ encryptedData: encryptedData,
+ iv: iv
+ }
+ }).then(
+ function(res) {
console.log(res);
//返回主页
wx.switchTab({
- url: '/pages/index/index',
- })
- }, function(error) {
+ url: "/pages/index/index"
+ });
+ },
+ function(error) {
wx.showToast({
- title: '请授权个人信息',
+ title: "请授权个人信息",
icon: "none"
- })
- })
- },
-})
\ No newline at end of file
+ });
+ }
+ );
+ }
+});
diff --git a/pages/getuserinfo/index.wxml b/pages/getuserinfo/index.wxml
index a2e4a28..a92d189 100755
--- a/pages/getuserinfo/index.wxml
+++ b/pages/getuserinfo/index.wxml
@@ -1,15 +1,6 @@
-
-
-
-
+
diff --git a/pages/index/coupons/index.js b/pages/index/coupons/index.js
index e8b0c2c..4b53e61 100644
--- a/pages/index/coupons/index.js
+++ b/pages/index/coupons/index.js
@@ -16,12 +16,13 @@ Component({
tabs: [],
list: [],
flag: "",
+ loading: true, //"上拉加载"的变量,默认false,隐藏
+ content:"",
return_list: [],
current: 0,
current_scroll: 0,
pageNum: 1, // 设置加载的第几次,默认是第一次
pageSize: 10, //返回数据的个数
- searchLoading: false, //"上拉加载"的变量,默认false,隐藏
searchLoadingComplete: false, //“没有数据”的变量,默认false,隐藏
allow_load: true // 是否允许继续加载标识 默认 true 允许,false 加载完成
},
@@ -67,21 +68,21 @@ Component({
// 券list获取
if (that.data.allow_load) {
- wx.showLoading({
- title: "飞速加载中"
- });
-
+ that.setData({
+ loading:true,
+ content:'小主,我在玩命加载中...'
+ })
// 根据 key == 0 区分全部或其它tab,决定是否传参数 business
if (key == 0) {
var param = {
pageNum: pageNum,
- pageSize: 8,
+ pageSize: 16,
targetAd: 1
};
} else {
var param = {
pageNum: pageNum,
- pageSize: 8,
+ pageSize: 16,
business: key,
targetAd: 1
};
@@ -92,11 +93,10 @@ Component({
data: param
}).then(res => {
console.log(res);
+ /**
+ * 加载完成
+ */
if (pageNum >= res.data.pages) {
- // wx.showToast({
- // title: "加载完成喽",
- // icon: "success"
- // });
that.setData({
allow_load: false
});
@@ -113,10 +113,21 @@ Component({
});
});
setTimeout(function() {
- wx.hideLoading();
- }, 1000);
+ that.setData({
+ loading:false,
+ })
+ }, 1400);
} else {
console.info("allow_load==false 已禁止加载");
+ that.setData({
+ loading:true,
+ content:"^_^再拉裤子就掉啦ʅ(´◔౪◔)ʃ"
+ })
+ setTimeout(function(){
+ that.setData({
+ loading:false,
+ })
+ },1400)
}
};
@@ -134,7 +145,7 @@ Component({
url: config.api.businessList,
data: {
pageNum: 1,
- pageSize: 10,
+ pageSize: 15,
type: 1
}
}).then(res => {
diff --git a/pages/index/coupons/index.wxml b/pages/index/coupons/index.wxml
index d3bf9e3..7eae47f 100644
--- a/pages/index/coupons/index.wxml
+++ b/pages/index/coupons/index.wxml
@@ -2,5 +2,6 @@
-
+
+ {{content}}
\ No newline at end of file
diff --git a/pages/index/coupons/index.wxss b/pages/index/coupons/index.wxss
index e69de29..f55ce4e 100644
--- a/pages/index/coupons/index.wxss
+++ b/pages/index/coupons/index.wxss
@@ -0,0 +1,16 @@
+.index-coupons{
+ height:820rpx;
+}
+.loading{
+ text-align: center;
+ height: 80rpx;
+ line-height: 80rpx;
+ font-size: 26rpx;
+ color: #999;
+}
+.loading image{
+ width: 40rpx;
+ height: 40rpx;
+ vertical-align: middle;
+ margin-right: 10rpx;
+}
\ No newline at end of file
diff --git a/pages/index/index.js b/pages/index/index.js
index 338b1e1..0322c2e 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -20,10 +20,12 @@ Page({
onLoad: function(options) {
var that = this;
var scene = decodeURIComponent(options.scene);
+ },
+
+ onShow:function(){
+ let that = this;
if (app.globalData.token && app.globalData.token != null) {
} else {
- // 由于是网络请求,可能会在 Page.onLoad 之后才返回
- // 所以此处加入 callback 以防止这种情况
wx.login({
success: ({ code }) => {
console.log(code);
@@ -43,7 +45,7 @@ Page({
url: config.api.bannerlist,
data: {
pageNum: 1,
- pageSize: 10
+ pageSize: 5
}
}).then(res => {
that.setData({
diff --git a/pages/index/rushToBuy/index.js b/pages/index/rushToBuy/index.js
index 15a43db..abc0778 100644
--- a/pages/index/rushToBuy/index.js
+++ b/pages/index/rushToBuy/index.js
@@ -36,13 +36,15 @@ Component({
gotodetail: function(e) {
console.log(e);
console.log("出错啦 大哥");
- console.log(e.currentTarget.dataset.id);
- console.log(e.currentTarget.dataset.targetad);
+ console.log(e.currentTarget.dataset);
wx.navigateTo({
url: `/pages/coupon/detail/index?couponChannelId=${
- e.currentTarget.dataset.id
- }&couponId=${e.currentTarget.dataset.couponId}
- }&targetAd=${e.currentTarget.dataset.targetad}`
+ e.currentTarget.dataset.couponchannelid
+ }&couponId=${
+ e.currentTarget.dataset.couponid
+ }&targetAd=${
+ e.currentTarget.dataset.targetad
+ }`
});
}
},
diff --git a/pages/index/rushToBuy/index.wxml b/pages/index/rushToBuy/index.wxml
index aaaacf4..891c75e 100644
--- a/pages/index/rushToBuy/index.wxml
+++ b/pages/index/rushToBuy/index.wxml
@@ -1,8 +1,8 @@
- 限时抢购查看更多>
+ 限时抢购查看更多
-
+
{{item.title}}
diff --git a/pages/index/rushToBuy/index.wxss b/pages/index/rushToBuy/index.wxss
index 6d4b046..f66dc85 100644
--- a/pages/index/rushToBuy/index.wxss
+++ b/pages/index/rushToBuy/index.wxss
@@ -14,7 +14,7 @@
.index-rushToBuy-title text{
float: right;
margin-right: 20rpx;
- color: #f96563;
+ color: #a8adb4;
font-size: 26rpx;
}
.index-scroll-view {
@@ -37,12 +37,10 @@
.index-scroll-view .commodity:last-child{
margin-right: 30rpx;
}
-.index-scroll-view .commodity-img {
- height: 213rpx;
-}
-.index-scroll-view .commodity-img image{
- width: 100%;
- height: 100%;
+.commodity-img{
+display: block;
+ width: 355rpx;
+ height: 213rpx;
}
.index-scroll-view .commodity-info {
diff --git a/pages/login/index.js b/pages/login/index.js
index 5eb09f9..8f08695 100644
--- a/pages/login/index.js
+++ b/pages/login/index.js
@@ -1,21 +1,28 @@
-
-let app = getApp()
-
+var config = require("../../config/config.js");
+const Http = require("../../utils/HttpBasics");
Page({
- data: {
- },
- getPhoneNumber: function (e) {
- console.log(e.detail.errMsg)
- console.log(e.detail.iv)
- console.log(e.detail.encryptedData)
+ data: {},
+ getPhoneNumber: function(e) {
+ console.log(e.detail.errMsg);
+ console.log(e.detail.iv);
+ console.log(e.detail.encryptedData);
wx.navigateBack({
delta: 1
- })
+ });
},
onLoad() {
-
- },
- onLogin: function () {
- console.log("登陆");
+ let that = this;
+ console.log(config.weapp.AppId)
+ Http.get({
+ url: config.api.marketicon,
+ data: {
+ appId: config.weapp.AppId
+ }
+ }).then(res=>{
+ console.log(res.data.mallImgUrl);
+ that.setData({
+ mallImgUrl: res.data.mallImgUrl
+ });
+ })
}
-})
\ No newline at end of file
+});
diff --git a/pages/login/index.wxml b/pages/login/index.wxml
index 5b283dd..63bb575 100644
--- a/pages/login/index.wxml
+++ b/pages/login/index.wxml
@@ -1,6 +1,6 @@
-
+
diff --git a/pages/login/index.wxss b/pages/login/index.wxss
index 9eb0f8f..5196c77 100644
--- a/pages/login/index.wxss
+++ b/pages/login/index.wxss
@@ -14,6 +14,7 @@
.login-logo>image {
width: 100%;
height: 100%;
+ border-radius: 16rpx;
}
.login-btn {
diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js
index b70ea7e..d172b34 100644
--- a/pages/order/detail/index.js
+++ b/pages/order/detail/index.js
@@ -19,57 +19,25 @@ Page({
*/
powerDrawer: function(e) {
- // var currentStatu = e.currentTarget.dataset.statu;
+ // couponOrderStatus
+ // 0 未使用
+ // 1 已使用
+ // 2 已过期
+ // 3 已经退款
+ console.log(e);
+
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);
+ url: `/pages/orderquanma/index?quancode=${
+ e.currentTarget.dataset.quancode
+ }&title=${e.currentTarget.dataset.title}&subtitle=${
+ e.currentTarget.dataset.subtitle
+ }&remark=${e.currentTarget.dataset.remark}&couponorderstatus=${
+ e.currentTarget.dataset.couponorderstatus
+ }`
+ });
console.log(e.currentTarget.dataset.quancode);
- // this.utils(currentStatu, e.currentTarget.dataset.quancode);
+ console.log(e.currentTarget.dataset.couponorderstatus);
},
- // 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
- // });
- // }
- // },
/**
* 生命周期函数--监听页面加载
*/
@@ -80,7 +48,7 @@ Page({
this.setData({
orderId: options.orderId
- })
+ });
Http.get({
url: config.api.orderDetail,
@@ -140,12 +108,27 @@ Page({
if (res.errMsg == "requestPayment:ok") {
wx.showToast({
title: "购买成功",
- duration: 2500
+ duration: 2000,
+ image: "./../../../assets/img/success.png",
+ mask: false,
+ success: function() {
+ wx.showLoading({
+ title: "加载中..."
+ });
+
+ setTimeout(function() {
+ wx.hideLoading();
+ }, 1600);
+ setTimeout(() => {
+ wx.redirectTo({
+ url: `/pages/order/detail/index?orderId=${
+ that.data.orderId
+ }`
+ });
+ }, 1600);
+ }
});
}
- wx.navigateBack({
- delta: 2
- });
},
fail: res => {
that.payOrderUpdate(that.data.orderId, payOrderId, 2); // 支付失败
@@ -154,30 +137,12 @@ Page({
},
complete: res => {
console.log(res);
- console.log("支付完成");
- // var url = res.data.url;
- // console.log("get url", url);
if (res.errMsg == "requestPayment:ok") {
- wx.showModal({
- title: "提示",
- content: "支付成功"
- });
- // if (url) {
- // setTimeout(function () {
- // wx.redirectTo({
- // url: "/pages" + url
- // });
- // }, 2000);
- // } else {
- // setTimeout(() => {
- // wx.navigateBack();
- // }, 2000);
- // }
} else {
wx.showToast({
title: "支付失败",
image: "./../../../assets/img/fail.png",
- duration: 1500,
+ duration: 2000,
mask: false
});
}
@@ -188,11 +153,13 @@ Page({
});
} else {
// 免费券
- that.payOrderUpdate(orderId, "0", 1) // 支付成功
+ that
+ .payOrderUpdate(orderId, "0", 1) // 支付成功
.then(res => {
wx.showToast({
title: "支付成功",
- duration: 3000
+ duration: 2000,
+ image: "./../../../assets/img/success.png"
});
});
}
@@ -203,14 +170,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({
@@ -257,4 +224,4 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage: function() {}
-});
\ No newline at end of file
+});
diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml
index 1633130..bc6c13c 100644
--- a/pages/order/detail/index.wxml
+++ b/pages/order/detail/index.wxml
@@ -29,10 +29,23 @@
适用门店
{{order.merchantName}}
-
-
- 兑换码:
- {{order.id}}
+
+
+
+
+ 兑换码
+ {{order.couponOrderId}}
@@ -56,18 +69,3 @@
-
-
-
-
-
-
-
-
-
-
-
-
- 兑换码:{{data.id}}
-
-
\ No newline at end of file
diff --git a/pages/order/detail/index.wxss b/pages/order/detail/index.wxss
index 26a98cd..b72e94f 100644
--- a/pages/order/detail/index.wxss
+++ b/pages/order/detail/index.wxss
@@ -287,6 +287,7 @@ radio {
}
.barnum {
+ width: 88%;
height: 46rpx;
line-height: 46rpx;
font-size: 32rpx;
diff --git a/pages/order/index/index.js b/pages/order/index/index.js
index 37a19b9..86aab37 100644
--- a/pages/order/index/index.js
+++ b/pages/order/index/index.js
@@ -23,7 +23,9 @@ Page({
current: "",
current_scroll: "1",
page: 1,
- allow_load: true
+ allow_load: true,
+ loading: true, //"上拉加载"的变量,默认false,隐藏
+ content:"",
},
onLoad(e) {
this.getList(e.id, 1);
@@ -35,23 +37,11 @@ Page({
gotopay:function(e){
console.log("orderId"+e.currentTarget.dataset.id);
wx.navigateTo({
- url: `/pages/order/detail/index?orderId=${e.currentTarget.dataset.id}&flag='pay'`,
- success: function(res){
- // success
- },
- fail: function() {
- // fail
- },
- complete: function() {
- // complete
- }
- })
+ url: `/pages/order/detail/index?orderId=${e.currentTarget.dataset.id}&flag='pay'`})
},
getList(key, pageNum) {
let that = this;
-
console.log(key);
-
/**
* key==0
* 不发送该字段
@@ -72,23 +62,31 @@ Page({
}
if (that.data.allow_load) {
- wx.showLoading({
- title: "加载中"
- });
+ that.setData({
+ loading:true,
+ content:'小主,我在玩命加载中...'
+ })
+
Http.get({
url: config.api.orderList,
data: variable
}).then(res => {
console.log(res);
- console.log("姐姐的订单列表");
- setTimeout(function() {
- wx.hideLoading();
- }, 1200);
if (pageNum >= res.data.pages) {
that.setData({
allow_load: false
});
+ setTimeout(function() {
+ that.setData({
+ loading:false,
+ })
+ }, 1400);
}
+ setTimeout(function() {
+ that.setData({
+ loading:false,
+ })
+ }, 1400);
/**
* 先赋值后渲染页面
* concat 不会改变原数组值
@@ -99,7 +97,6 @@ Page({
list: that.data.list
});
for(let i=0; i
{{item.title}}
- 等待付款
+ 待付款
已付款
- 订单取消
+ 已过期
{{item.subTitle}}
@@ -26,11 +26,22 @@
¥{{item.salePrice/100}}
¥{{item.price/100}}
-
- 查看详情
- 支付
- 支付
+
+
+ 查看详情
+
+ 支付
+
+
+ 已过期
+
+
@@ -38,4 +49,7 @@
暂无订单
+
+ {{content}}
+
\ No newline at end of file
diff --git a/pages/order/index/index.wxss b/pages/order/index/index.wxss
index 1d8fd52..7cd147a 100644
--- a/pages/order/index/index.wxss
+++ b/pages/order/index/index.wxss
@@ -20,7 +20,7 @@
.detail_msg {
width: 92%;
- height: 220rpx !important;
+ height: 200rpx !important;
background: #fff;
display: flex;
margin: 0 4%;
@@ -29,9 +29,11 @@
}
.logo {
- width: 248rpx;
+ width: 350rpx;
height: 184rpx;
- border-radius: 30rpx;
+ border: 1px solid #f8f8f8;
+ border-radius: 16rpx;
+ overflow: hidden;
}
.logo image {
@@ -43,6 +45,7 @@
display: flex;
justify-content: space-between;
padding: 0 4%;
+ margin-top: 8rpx;
}
.info {
@@ -50,28 +53,33 @@
}
.info view:nth-child(1) {
- margin-top: 20rpx;
margin-bottom: 15rpx;
}
.info view:nth-child(1) text {
font-size: 30rpx;
+ /* width: 340rpx;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis; */
}
.info view:nth-child(1) text:nth-child(2) {
- color: #ffae00;
+ color: #f96563;
font-size: 24rpx;
+ /* width: 340rpx;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis; */
}
-.info view:nth-child(2),
-.info view:nth-child(3) {
+.info view:nth-child(2), .info view:nth-child(3) {
color: #f96563;
font-size: 24rpx;
padding-left: 4%;
}
-.info view:nth-child(2) text,
-.info view:nth-child(3) text {
+.info view:nth-child(2) text, .info view:nth-child(3) text {
font-size: 22rpx;
color: #b8b8b8;
}
@@ -109,7 +117,7 @@
bottom: 0;
margin: auto;
right: 20rpx;
- width: 200rpx;
+ width: 180rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
@@ -124,17 +132,35 @@
font-size: 28rpx;
color: #fff;
}
-.dingdan{
+
+.dingdan {
margin-top: 200rpx;
}
+
.dingdan text {
display: block;
text-align: center;
font-size: 30rpx;
- color: #999;
+ color: #00c0ff;
}
+
.dingdan image {
display: block;
width: 100rpx;
margin: 0 auto 16rpx;
}
+
+.loading {
+ text-align: center;
+ height: 80rpx;
+ line-height: 80rpx;
+ font-size: 26rpx;
+ color: #999;
+}
+
+.loading image {
+ width: 40rpx;
+ height: 40rpx;
+ vertical-align: middle;
+ margin-right: 10rpx;
+}
diff --git a/pages/youhuiquanma/index.js b/pages/orderquanma/index.js
similarity index 93%
rename from pages/youhuiquanma/index.js
rename to pages/orderquanma/index.js
index 84f0690..bd233f7 100644
--- a/pages/youhuiquanma/index.js
+++ b/pages/orderquanma/index.js
@@ -22,7 +22,8 @@ Page({
code:options.quancode,
title:options.title,
subtitle:options.subtitle,
- remark:options.remark
+ remark:options.remark,
+ couponorderstatus:options.couponorderstatus
})
},
diff --git a/pages/youhuiquanma/index.json b/pages/orderquanma/index.json
similarity index 100%
rename from pages/youhuiquanma/index.json
rename to pages/orderquanma/index.json
diff --git a/pages/orderquanma/index.wxml b/pages/orderquanma/index.wxml
new file mode 100644
index 0000000..f8e9283
--- /dev/null
+++ b/pages/orderquanma/index.wxml
@@ -0,0 +1,32 @@
+
+
+ {{title}}
+ {{subtitle}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 兑换码:{{code}}
+
+
+
+
+ 购买须知:
+
+
+
\ No newline at end of file
diff --git a/pages/youhuiquanma/index.wxss b/pages/orderquanma/index.wxss
similarity index 85%
rename from pages/youhuiquanma/index.wxss
rename to pages/orderquanma/index.wxss
index 13cae47..eef75cc 100644
--- a/pages/youhuiquanma/index.wxss
+++ b/pages/orderquanma/index.wxss
@@ -3,7 +3,6 @@ page {
}
.couponbg {
position: relative;
- height: 100%;
width: 100%;
}
.couponbg image {
@@ -17,7 +16,7 @@ page {
right: 0;
margin: auto;
z-index: -19999;
- border-radius: 20rpx;
+ border-radius: 26rpx;
}
.title {
font-size: 33rpx;
@@ -33,15 +32,17 @@ page {
margin-top: 16rpx;
text-align: center;
}
-.panel {
- width: 600rpx;
+.panel,.zhuangtai image{
+ width: 510rpx;
+ height: 581rpx;
border-radius: 10rpx;
background-color: #fff;
- margin: 30rpx auto 0;
+ margin: 22rpx auto 0;
padding: 30rpx 0;
position: relative;
z-index: 10000000000;
}
+
.pane2 {
background: #fff;
opacity: 0.6;
@@ -78,7 +79,8 @@ page {
}
.qrcode {
- height: 380rpx;
+ position: relative;
+ height: 360rpx;
display: flex;
flex-direction: column;
justify-content: flex-end;
@@ -113,17 +115,17 @@ page {
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;
+ width: 87%;
+ margin: 0 auto;
+ color: #878d95;
+ font-size: 26rpx;
+ padding-bottom:74rpx;
}
.mai{
- color: #666;
+ color: #333;
}
.remark{
- padding-top: 37rpx;
+ padding-top: 17rpx;
}
\ No newline at end of file
diff --git a/pages/passCar/passCar.wxml b/pages/passCar/passCar.wxml
index a039011..613822e 100644
--- a/pages/passCar/passCar.wxml
+++ b/pages/passCar/passCar.wxml
@@ -26,9 +26,9 @@
-
+
- {{'待支付金额:¥'+item.remainingFee}}
+ 待缴金额:¥{{item.stopFee.remainingFee}}
diff --git a/pages/passCar/passCar.wxss b/pages/passCar/passCar.wxss
index 83de0a2..3c34d5a 100644
--- a/pages/passCar/passCar.wxss
+++ b/pages/passCar/passCar.wxss
@@ -92,7 +92,7 @@ color: transparent;
}
.bottonBox{
width: 750rpx;
- margin-top: 75rpx;
+ margin-top: 26rpx;
}
.textStyle{
background-color: white;
@@ -153,7 +153,7 @@ color: transparent;
.detail{
width: 32rpx;
height: 32rpx;
- right: 50rpx;
+ right: 34rpx;
top: 32rpx;
position: absolute;
}
diff --git a/pages/rushToBuy/index.js b/pages/rushToBuy/index.js
index a35705a..4d823fa 100644
--- a/pages/rushToBuy/index.js
+++ b/pages/rushToBuy/index.js
@@ -13,7 +13,9 @@ Page({
allow_load: true,
day: "",
hour: "",
- minute: ""
+ minute: "",
+ loading: true, //"上拉加载"的变量,默认false,隐藏
+ content:"",
},
/**
@@ -30,13 +32,17 @@ Page({
* 判断用户是否加载完成
*/
if (that.data.allow_load) {
- wx.showLoading({
- title: "加载中"
- });
+ // wx.showLoading({
+ // title: "加载中"
+ // });
+ that.setData({
+ loading:true,
+ content:'小主,我在玩命加载中...'
+ })
- setTimeout(function() {
- wx.hideLoading();
- }, 1200);
+ // setTimeout(function() {
+ // wx.hideLoading();
+ // }, 1200);
Http.get({
url: config.api.couponChannelList,
data: {
@@ -45,56 +51,58 @@ Page({
targetAd: 2
}
}).then(res => {
+ console.log(res);
//当前时间与优惠券下架时间做计算
-
console.log(that.data.day);
if (page >= res.data.pages) {
- // wx.showToast({
- // title: "加载完成喽",
- // icon: "success"
- // });
that.setData({
allow_load: false
});
- }
- that.data.list = that.data.list.concat(res.data.list);
- that.setData({
- list: that.data.list
- });
-
- /**
- * 页面上显示的时间
- */
- console.log(that.data.list);
- for (let i = 0; i < that.data.list.length; i++) {
- console.log(that.data.list[i].endTime);
- var startTime = util.fmtDate(that.data.list[i].endTime);
- console.log(startTime);
- var s1 = new Date(startTime.replace(/-/g, "/"));
- var s2 = new Date();
- 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);
+ setTimeout(function() {
+ that.setData({
+ loading:false,
+ })
+ }, 1400);
+ } else {
+ setTimeout(function() {
+ that.setData({
+ loading:false,
+ })
+ }, 1400);
+ /**
+ * 页面上显示的时间
+ */
+ that.data.list = that.data.list.concat(res.data.list);
that.setData({
- month: month,
- day: day,
- hour: hour,
- minute: minute
+ list: that.data.list
});
+ console.log(that.data.list);
+ for (let i = 0; i < that.data.list.length; i++) {
+ var startTime = util.fmtDate(that.data.list[i].endTime);
+ util.timechuo(startTime);
+ console.log(util.timechuo(startTime));
+ /**
+ * 修改list的endtime
+ * 渲染到页面
+ */
+ var endtime = 'list[' + i + '].endtime'
+ that.setData({
+ [endtime]: util.timechuo(startTime)
+ });
+ }
}
});
} else {
console.info("allow_load==false 已禁止加载");
+ that.setData({
+ loading:true,
+ content:"^_^再拉裤子就掉啦ʅ(´◔౪◔)ʃ"
+ })
+ setTimeout(function(){
+ that.setData({
+ loading:false,
+ })
+ },1400)
}
};
if (app.globalData.token && app.globalData.token != null) {
@@ -118,16 +126,7 @@ Page({
wx.navigateTo({
url: `/pages/coupon/detail/index?couponChannelId=${
e.currentTarget.dataset.couponchannelid
- }&couponId=${e.currentTarget.dataset.couponId}`,
- success: function(res) {
- // success
- },
- fail: function() {
- // fail
- },
- complete: function() {
- // complete
- }
+ }&couponId=${e.currentTarget.dataset.couponid}`
});
},
/**
diff --git a/pages/rushToBuy/index.wxml b/pages/rushToBuy/index.wxml
index 525f005..4f6f930 100644
--- a/pages/rushToBuy/index.wxml
+++ b/pages/rushToBuy/index.wxml
@@ -1,7 +1,7 @@
-
+
@@ -19,14 +19,17 @@
- 剩余时间:{{day}}天 {{hour}}小时{{minute}}分钟
+
+ 剩余时间:
+ {{item.endtime}}
+
剩余件数:{{item.remainInventory}}件
- 购买
- 领取
+ 购买
+ 领取
-
+ {{content}}
\ No newline at end of file
diff --git a/pages/rushToBuy/index.wxss b/pages/rushToBuy/index.wxss
index 18925a7..b113b34 100644
--- a/pages/rushToBuy/index.wxss
+++ b/pages/rushToBuy/index.wxss
@@ -1,49 +1,69 @@
-.flashSale{
+.flashSale {
width: 100%;
height: 100%;
background: #fff;
-
-
}
-.flashSaleItemWrap{
+
+.loading {
+ text-align: center;
+ height: 80rpx;
+ line-height: 80rpx;
+ font-size: 26rpx;
+ color: #999;
+}
+
+.loading image {
+ width: 40rpx;
+ height: 40rpx;
+ vertical-align: middle;
+ margin-right: 10rpx;
+}
+
+.flashSaleItemWrap {
width: 100%;
height: 410rpx;
- border-top: 1rpx solid #ededed;
+ border-bottom: 10rpx solid #f8f8f8;
}
-.flashSaleItem{
+
+.flashSaleItem {
width: 90%;
height: 410rpx;
display: flex;
- flex-direction: column;
- background: #fff;
- margin: 0 auto;
+ flex-direction: column;
+ background: #fff;
+ margin: 0 auto;
}
-.flashSaleItemTop{
+
+.flashSaleItemTop {
display: flex;
padding-top: 28rpx;
- flex-direction:row;
+ flex-direction: row;
padding-bottom: 25rpx;
border-bottom: 1rpx solid #ededed;
-
}
-.flashSaleItemTopL{
+
+.flashSaleItemTopL {
flex: 1;
}
-.food{
+
+.food {
width: 248rpx;
+ border-radius: 10rpx;
height: 184rpx;
}
-.flashSaleItemTopR{
+
+.flashSaleItemTopR {
flex: 2;
flex-direction: column;
margin-left: 20rpx;
-
}
-.flashSaleItemTopRTop{
+
+.flashSaleItemTopRTop {
display: flex;
flex-direction: column;
}
-.foodname{
+
+.foodname {
font-size: 32rpx;
height: 40rpx;
line-height: 40rpx;
@@ -52,65 +72,77 @@
width: 406rpx;
overflow: hidden;
}
-.small{
+
+.small {
font-size: 24rpx;
- color: #00C0FF;
+ color: #00c0ff;
margin-top: 15rpx;
}
-.flashSaleItemTopRBottom{
+
+.flashSaleItemTopRBottom {
margin-top: 24rpx;
}
-.presentPrice{
+
+.presentPrice {
font-size: 36rpx;
color: #f96563;
}
-.originalPrice{
+
+.originalPrice {
margin-left: 20rpx;
- color:#B4B4B4;
+ color: #b4b4b4;
text-decoration: line-through;
font-size: 24rpx;
}
-.flashSaleItemBottom{
- margin-top: 20rpx;
- position: relative;
+
+.flashSaleItemBottom {
+ margin-top: 20rpx;
+ position: relative;
}
-.remainingTime{
+
+.remainingTime {
font-size: 28rpx;
- color: #B4B4B4;
+ color: #b4b4b4;
}
-.realRemainingTime{
+
+.realRemainingTime {
margin-left: 10rpx;
- color:#f96563;
+ color: #f96563;
font-size: 28rpx;
}
-.flashSaleItemBottomBottm{
+
+.flashSaleItemBottomBottm {
display: flex;
flex-direction: row;
}
-.view1{
+
+.view1 {
width: 550rpx;
display: block;
}
-.remainingNumber{
+
+.remainingNumber {
font-size: 28rpx;
- color: #B4B4B4;
+ color: #b4b4b4;
}
-.realnumber{
+
+.realnumber {
margin-left: 10rpx;
color: #f96563;
font-size: 28rpx;
}
-.buy{
+
+.buy {
position: absolute;
top: 34rpx;
bottom: 0;
right: 20rpx;
- width:114rpx;
+ width: 114rpx;
height: 50rpx;
line-height: 50rpx;
text-align: center;
- background: #00C0FF;
+ background: #00c0ff;
color: #fff;
border-radius: 10rpx;
font-size: 28rpx;
-}
\ No newline at end of file
+}
diff --git a/pages/user/index.js b/pages/user/index.js
index 172e899..0ec76ee 100644
--- a/pages/user/index.js
+++ b/pages/user/index.js
@@ -3,13 +3,12 @@ Page({
* 页面的初始数据
*/
data: {
- user: {
- avatar:
- "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg"
- }
+ // user: {
+ // avatar:
+ // "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg"
+ // }
},
navigateTo() {
- console.log("object");
wx.navigateTo({
url: `/pages/login/index`
});
diff --git a/pages/youhuiquanma/index.wxml b/pages/youhuiquanma/index.wxml
deleted file mode 100644
index b9efbeb..0000000
--- a/pages/youhuiquanma/index.wxml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
- {{title}}
- {{subtitle}}
-
-
-
-
-
-
-
- 兑换码:{{code}}
-
-
- 购买须知:
-
-
-
\ No newline at end of file
diff --git a/utils/HttpBasics.js b/utils/HttpBasics.js
index 4883ab5..611de11 100644
--- a/utils/HttpBasics.js
+++ b/utils/HttpBasics.js
@@ -97,9 +97,9 @@ class HttpBasics {
resolve(res.data);
} else {
wx.hideLoading();
- wx.showToast({
- title: res.data.message
- });
+ // wx.showToast({
+ // title: res.data.message
+ // });
reject(res.data);
}
} else {