diff --git a/components/merchantcoupons/index.js b/components/merchantcoupons/index.js
new file mode 100644
index 0000000..c40b1f7
--- /dev/null
+++ b/components/merchantcoupons/index.js
@@ -0,0 +1,21 @@
+// pages/index/sw/index.js
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ paramAtoB: String,
+ data: {
+ value: {},
+ type: Object
+ },
+ },
+
+ /**
+ * 组件的初始数据
+ */
+ data: {},
+ methods: {
+
+ }
+});
diff --git a/components/merchantcoupons/index.json b/components/merchantcoupons/index.json
new file mode 100644
index 0000000..34e4209
--- /dev/null
+++ b/components/merchantcoupons/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "i-button": "../../dist/button/index"
+ }
+}
\ No newline at end of file
diff --git a/components/merchantcoupons/index.wxml b/components/merchantcoupons/index.wxml
new file mode 100644
index 0000000..c1e332f
--- /dev/null
+++ b/components/merchantcoupons/index.wxml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+ {{data.title}}
+ {{data.subTitle}}
+
+
+ {{data.salePriceStr}}元
+
+ {{data.priceStr}}元
+ {{data.priceStr}}小时
+
+
+
+ {{data.priceStr}}元
+ {{data.priceStr}}小时
+
+
+
+
+
+
+
+
+ 免费领
+ 马上购
+ 已售罄
+ 已下架
+
+
+
+
diff --git a/components/merchantcoupons/index.wxss b/components/merchantcoupons/index.wxss
new file mode 100644
index 0000000..f148a33
--- /dev/null
+++ b/components/merchantcoupons/index.wxss
@@ -0,0 +1,259 @@
+@import "../../app.wxss";
+.coupons {
+ width: 335rpx;
+ display: inline-block;
+ position: relative;
+
+}
+.coupons-border {
+ height: 1rpx;
+ left: 30rpx;
+ right: 30rpx;
+ background: #f5f5f5;
+ position: absolute;
+ bottom: 0;
+}
+
+
+.coupons-img {
+ border-radius: 10rpx;
+}
+
+.coupons-img image {
+ display: block;
+ width: 335rpx;
+ height: 203rpx;
+ border-top-left-radius: 10rpx;
+ border-top-right-radius: 10rpx;
+}
+
+.coupons-info {
+ width: 335rpx;
+ height: 152rpx;
+ border-radius:0rpx 0rpx 10rpx 10rpx;
+ background: #fff;
+}
+
+.coupons-info-name {
+ font-size: 28rpx;
+ color: #333333;
+ letter-spacing: 0;
+ line-height: 38rpx;
+}
+
+.coupons-info-price {
+ padding: 16rpx 0 0;
+}
+
+.i {
+ font-size: 24rpx;
+ font-style: normal;
+}
+
+.coupons-info-price-p {
+ display: block;
+ font-size: 50rpx;
+ color: #FF4949;
+}
+.price{
+ font-size:34rpx;
+ font-family:PingFang-SC-Bold;
+ font-weight:bold;
+ color:rgba(255,50,50,1);
+ line-height:44rpx;
+ margin-left: 16rpx;
+ padding-top: 16rpx;
+}
+.tit {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ font-size: 28rpx;
+ line-height: 30rpx;
+ padding-top: 20rpx;
+ padding-left: 10rpx;
+ color: #333;
+ letter-spacing: 0;
+}
+
+.coupons-info-price-o {
+ display: block;
+ text-align: center;
+ font-size: 26rpx;
+ color: #b4b4b4;
+ letter-spacing: 0.96rpx;
+ text-decoration: line-through;
+ line-height: 24rpx;
+}
+
+.coupons-info-distance {
+ font-size: 22rpx;
+ color: #c0c0c0;
+ letter-spacing: 0;
+ padding-bottom: 10rpx;
+ line-height: 30rpx;
+}
+
+.coupons-info-address {
+ font-size: 22rpx;
+ color: #585858;
+ letter-spacing: 0;
+ line-height: 30rpx;
+}
+
+.coupons-btn {
+ position: absolute;
+ bottom: 0;
+ right: 0;
+}
+
+.coupons-btn-gm {
+ background: #AF6E34 !important;
+ border-radius: 10px 0px 5px 0px !important;
+ margin: 0 !important;
+ padding: 0 !important;
+ font-size: 26rpx;
+ color: #fff !important;
+ letter-spacing: 0;
+ height: 51rpx !important;
+ width: 100rpx !important;
+ line-height: 51rpx !important;
+}
+
+.coupons-btn-gms {
+ background: #b9b9b9 !important;
+ border-radius: 10px 0px 10px 0px !important;
+ opacity: 0.6;
+ margin: 0 !important;
+ padding: 0 !important;
+ font-family: PingFangSC-Semibold;
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #fff !important;
+ letter-spacing: 0;
+ height: 51rpx !important;
+ width: 100rpx !important;
+ line-height: 51rpx !important;
+}
+
+.subtitle {
+ font-size: 24rpx;
+ color: #999999;
+ overflow: hidden;
+ height: 24rpx;
+ padding-left: 10rpx;
+ line-height: 24rpx;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ margin-top: 12rpx;
+}
+
+.coupons-info-manjian {
+ font-weight: normal;
+ font-size: 20rpx;
+ line-height: 34rpx;
+ display: inline-block;
+ color: #FF4949;
+ letter-spacing: 0;
+}
+
+.coupons-info-manjian1 {
+ font-weight: normal;
+ font-size: 20rpx;
+ line-height: 22rpx;
+ color: #919191;
+ letter-spacing: 0;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ width: 300rpx;
+ margin-top: 16rpx;
+}
+.coupons-info-manjian text{
+ display: block;
+ line-height: 20rpx;
+}
+.coupons-info-manjian > text:nth-of-type(1){
+ display: block;
+ /* color: #FF4949; */
+ opacity: .6;
+}
+.view01{
+ text-decoration:line-through;
+ color: #999999 !important;
+}
+.txt2{
+ display: block;
+ color: #ccc;
+}
+/**上拉加载更多**/
+
+.userinfo {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.userinfo-avatar {
+ width: 128rpx;
+ height: 128rpx;
+ margin: 20rpx;
+ border-radius: 50%;
+}
+
+.userinfo-nickname {
+ color: #aaa;
+}
+
+.sy {
+ display: block;
+ text-align: right;
+ width: 181rpx;
+ font-size: 24rpx;
+ color: #999;
+ height: 40rpx;
+ margin-top: 106rpx;
+}
+
+.usermotto {
+ margin-top: 200px;
+}
+
+scroll-view {
+ width: 100%;
+}
+
+.item {
+ width: 90%;
+ height: 300rpx;
+ margin: 20rpx auto;
+ background: brown;
+ overflow: hidden;
+}
+
+.item .img {
+ width: 430rpx;
+ margin-right: 20rpx;
+ float: left;
+}
+
+.title {
+ font-size: 30rpx;
+ display: block;
+ margin: 30rpx auto;
+}
+
+.description {
+ font-size: 26rpx;
+ line-height: 15rpx;
+}
+.navigator-hover{
+ opacity: 1!important;
+ background: #fff;
+}
+navigator{
+ display: inline-block;
+}
+navigator:nth-of-type(2n+1){
+ margin-right: 10rpx;
+}
diff --git a/config/config.js b/config/config.js
index 05ecb33..3d2b3dc 100755
--- a/config/config.js
+++ b/config/config.js
@@ -26,6 +26,10 @@ var config = {
* 检查用户手机授权状态
*/
checkPhoneStatus: "/user/checkPhoneStatus",
+ /**
+ * 商户优惠信息
+ */
+ merchantCouponList: "/wxCoupon/findByMerchant",
/**
* 优惠券详情
*/
diff --git a/pages/bargain/bargainDatail/bargainDatail.js b/pages/bargain/bargainDatail/bargainDatail.js
index a756957..1c5f94d 100644
--- a/pages/bargain/bargainDatail/bargainDatail.js
+++ b/pages/bargain/bargainDatail/bargainDatail.js
@@ -349,7 +349,7 @@ Page({
});
} else if (err.code == 3001) {
wx.showToast({
- title: "超过限购条件",
+ title: "您已超过限购",
image: './../../../assets/images/fail.png',
duration: 2000,
mask: false
@@ -382,7 +382,14 @@ Page({
duration: 2000,
mask: false
});
- } else if (err.code == 11005) {
+ } else if (err.code == 3012) {
+ wx.showToast({
+ title: "您有未支付订单",
+ image: './../../../assets/images/fail.png',
+ duration: 2000,
+ mask: false
+ });
+ }else if (err.code == 11005) {
/**
* 将值传到用户手机号授权的页面
*
@@ -639,7 +646,7 @@ Page({
});
} else if (err.code == 3001) {
wx.showToast({
- title: "超过限购条件",
+ title: "您已超过限购",
image: './../../../assets/images/fail.png',
duration: 2000,
mask: false
@@ -672,7 +679,14 @@ Page({
duration: 2000,
mask: false
});
- } else if (err.code == 11005) {
+ } else if (err.code == 3012) {
+ wx.showToast({
+ title: "您已超过限购",
+ image: './../../../assets/images/fail.png',
+ duration: 2000,
+ mask: false
+ });
+ }else if (err.code == 11005) {
/**
* 将值传到用户手机号授权的页面
*
diff --git a/pages/cardListDetail/cardListDetail.js b/pages/cardListDetail/cardListDetail.js
index 913cf36..8dcd0ba 100644
--- a/pages/cardListDetail/cardListDetail.js
+++ b/pages/cardListDetail/cardListDetail.js
@@ -363,7 +363,7 @@ Page({
});
} else if (err.code == "3001") {
wx.showToast({
- title: "超过限购条件",
+ title: "您已超过限购",
image: imgurl.fail.url,
duration: 2000,
mask: false
@@ -396,6 +396,13 @@ Page({
duration: 2000,
mask: false
});
+ } else if (err.code == 3012) {
+ wx.showToast({
+ title: "您有未支付订单",
+ image: './../../../assets/images/fail.png',
+ duration: 2000,
+ mask: false
+ });
} else if (err.code == 11005) {
/**
* 将值传到用户手机号授权的页面
diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js
index 62f1841..7847711 100644
--- a/pages/coupon/detail/index.js
+++ b/pages/coupon/detail/index.js
@@ -664,7 +664,7 @@ Page({
});
} else if (err.code == 3001) {
wx.showToast({
- title: "超过限购条件",
+ title: "您已超过限购",
image: './../../../assets/images/fail.png',
duration: 2000,
mask: false
@@ -697,6 +697,13 @@ Page({
duration: 2000,
mask: false
});
+ } else if (err.code == 3012) {
+ wx.showToast({
+ title: "您有未支付订单",
+ image: './../../../assets/images/fail.png',
+ duration: 2000,
+ mask: false
+ });
} else if (err.code == 11005) {
/**
* 将值传到用户手机号授权的页面
diff --git a/pages/index/detail/index.js b/pages/index/detail/index.js
index 22161e8..354de10 100644
--- a/pages/index/detail/index.js
+++ b/pages/index/detail/index.js
@@ -9,11 +9,13 @@ Page({
*/
data: {
teljpgUrl: imgurl.teljpg.url,
+ share01: imgurl.share01.url,
page: 1,
imglist:null,
shopVoList:[],
+ couponList:[],//活动劵列表
data:{
- currentTabsIndex:0,
+ currentTab: 0
},
id:null
},
@@ -28,16 +30,8 @@ Page({
id: options.id
});
that.getList(options.id);
+ that.getCouponList(options.id);
}
- },
- /**
- * tab切换
- */
- onTabsItemTap:function(e){
- var index=product.getDataSet(e,'index');
- this.setData({
- currentTabsIndex:index
- })
},
/**
* 拨打电话
@@ -48,6 +42,22 @@ Page({
phoneNumber: e.target.dataset.merchantlinkphone
});
},
+ //滑动切换
+ swiperTabView: function (e) {
+ this.setData({
+ currentTab: e.detail.current
+ });
+ },
+ //点击切换
+ clickTab: function (e) {
+ if (this.data.currentTab === e.target.dataset.current) {
+ return false;
+ } else {
+ this.setData({
+ currentTab: e.target.dataset.current
+ })
+ }
+ },
/**
* 获取商户详情
*/
@@ -78,6 +88,36 @@ Page({
});
})
},
+ /**
+ * 获取商户活动信息 券类型(1.满减券,2.代金券,3.团购券,4.礼品券,5.停车券,6.多商户券,8.砍价券,9.团购券,50.积分券,51.积分停车券 100.消费卡)
+ * 投放频道:(1.列表, 2.限时抢购, 3. banner图 4. 游戏 5.卡频道 6.砍价频道 7.拼团频道 8专题)
+ */
+ getCouponList: function (id) {
+ let that = this;
+ let data;
+ data = {
+ status:0,
+ merchantId:id,
+ pageNum: that.data.page,
+ pageSize: 15,
+ }
+ Http.get({
+ url: config.api.merchantCouponList,
+ data: data
+ }).then(res => {
+ that.setData({
+ couponList: res.data,
+ })
+ })
+ .catch(err => {
+ wx.showToast({
+ title: err.errMsg,
+ icon: 'none',
+ duration: 2000,
+ mask: false
+ });
+ })
+ },
/**
* 获取多商铺列表
*/
@@ -91,6 +131,26 @@ Page({
*/
onHide: function () {
+ },
+ onShareAppMessage: function (options) {
+ var that = this;
+ var shareObj = {
+ title: that.data.data.title,
+ path: `/pages/index/index?couponChannelId=${that.data.couponChannelId}`,
+ success: function (res) {
+ if (res.errMsg == 'shareAppMessage:ok') { }
+ },
+ fail: function (error) {
+ if (res.errMsg == 'shareAppMessage:fail cancel') { } else if (res.errMsg == 'shareAppMessage:fail') { }
+ }
+ };
+ // 来自页面内的按钮的转发
+ if (options.from == 'button') {
+ var eData = options.target.dataset.id;
+ shareObj.path = `/pages/index/index?couponChannelId=${eData}`;
+ }
+ // 返回shareObj
+ return shareObj;
},
/**
* 页面相关事件处理函数--监听用户下拉动作
diff --git a/pages/index/detail/index.json b/pages/index/detail/index.json
index b86bbcc..0bd72dc 100644
--- a/pages/index/detail/index.json
+++ b/pages/index/detail/index.json
@@ -3,6 +3,7 @@
"backgroundColor": "#f4f4f4",
"enablePullDownRefresh": true,
"usingComponents": {
- "c-banner": "../../../components/banner/index"
+ "c-banner": "../../../components/banner/index",
+ "c-coupons": "../../../components/coupons/index"
}
}
\ No newline at end of file
diff --git a/pages/index/detail/index.wxml b/pages/index/detail/index.wxml
index 161f0c5..896b0b8 100644
--- a/pages/index/detail/index.wxml
+++ b/pages/index/detail/index.wxml
@@ -9,7 +9,7 @@
-
+
@@ -17,6 +17,10 @@
{{data.merchantName}}
{{data.title}}
+
+
+
+
@@ -44,33 +48,36 @@
-
- 全部
- 找人
- 找车
+ 优惠信息
+ 商家简介
+
- 全部
-
-
- 找人
+
+
+
+
+
+ 请您敬请期待
+ 我们正在筹备一大波优惠活动
+
+ {{content}}
+ {{loadingtext}}
- 找车
+
+ {{data.summary}}
+ {{"信息完善中,敬请期待。"}}
+
{{data.summary}}
-
- {{data.summary}}
- {{"信息完善中,敬请期待。"}}
-
+
diff --git a/pages/index/detail/index.wxss b/pages/index/detail/index.wxss
index 923a586..3c5dcfe 100644
--- a/pages/index/detail/index.wxss
+++ b/pages/index/detail/index.wxss
@@ -155,6 +155,54 @@
display:flex;
align-items:center;
justify-content:center;
- display:flex;
border-bottom:1rpx solid #D0D0D7;
+}
+.swiper-tab{
+ text-align: left;
+ width: 100%;
+ display: flex;
+ flex-flow: row;
+ height: 88rpx;
+ line-height: 88rpx;
+ margin-left: -30rpx;
+}
+.swiper-tab-item {
+ color: #434343;
+ font-size: 30rpx;
+ margin-right:30rpx;
+}
+.active-tab {
+ color: #1693FC;
+ border-bottom: 10rpx solid #1693FC;
+}
+.fenxiang {
+ position: absolute;
+ right: 0;
+ top: 27rpx;
+ width: 108rpx;
+}
+
+.fenxiang image {
+ width: 108rpx;
+ position: absolute;
+ top: 0;
+ right: 0;
+}
+/* 商户活动列表 */
+.coupons c-coupons{
+ width: 335rpx;
+ height: 354rpx;
+ margin-bottom: 22rpx;
+}
+.coupons c-coupons:nth-of-type(2n+1){
+ float: left;
+}
+.coupons c-coupons:nth-of-type(2n){
+ float: right;
+}
+.loading image {
+ width: 60rpx;
+ height: 60rpx;
+ vertical-align: middle;
+ margin-right: 10rpx;
}
\ No newline at end of file
diff --git a/pages/integralmall/payIntegcoupondetail/index.js b/pages/integralmall/payIntegcoupondetail/index.js
index 7041ae1..0992e29 100644
--- a/pages/integralmall/payIntegcoupondetail/index.js
+++ b/pages/integralmall/payIntegcoupondetail/index.js
@@ -118,7 +118,7 @@ Page({
});
} else if (err.code == 3001) {
wx.showToast({
- title: "超过限购条件",
+ title: "您已超过限购",
image: './../../../assets/images/fail.png',
duration: 2000,
mask: false
@@ -151,6 +151,13 @@ Page({
duration: 2000,
mask: false
});
+ } else if (err.code == 3012) {
+ wx.showToast({
+ title: "您有未支付订单",
+ image: './../../../assets/images/fail.png',
+ duration: 2000,
+ mask: false
+ });
} else if (err.code == 11005) {
/**
* 将值传到用户手机号授权的页面
diff --git a/pages/joinFrDpell/index.js b/pages/joinFrDpell/index.js
index 4302a7e..f964861 100644
--- a/pages/joinFrDpell/index.js
+++ b/pages/joinFrDpell/index.js
@@ -327,7 +327,7 @@ Page({
});
} else if (err.code == 3001) {
wx.showToast({
- title: "超过限购条件",
+ title: "您已超过限购",
image: './../../assets/images/fail.png',
duration: 2000,
mask: false
@@ -360,6 +360,13 @@ Page({
duration: 2000,
mask: false
});
+ } else if (err.code == 3012) {
+ wx.showToast({
+ title: "您有未支付订单",
+ image: './../../../assets/images/fail.png',
+ duration: 2000,
+ mask: false
+ });
} else if (err.code == 11005) {
/**
* 将值传到用户手机号授权的页面
diff --git a/pages/spellGroup/mySpellGroup/index.js b/pages/spellGroup/mySpellGroup/index.js
index eeb1f79..c39dd26 100644
--- a/pages/spellGroup/mySpellGroup/index.js
+++ b/pages/spellGroup/mySpellGroup/index.js
@@ -312,7 +312,7 @@ Page({
});
} else if (err.code == 3001) {
wx.showToast({
- title: "超过限购条件",
+ title: "您已超过限购",
image: './../../../assets/images/fail.png',
duration: 2000,
mask: false
@@ -345,6 +345,13 @@ Page({
duration: 2000,
mask: false
});
+ }else if (err.code == 3012) {
+ wx.showToast({
+ title: "您有未支付订单",
+ image: './../../../assets/images/fail.png',
+ duration: 2000,
+ mask: false
+ });
} else if (err.code == 11005) {
/**
* 将值传到用户手机号授权的页面