| @@ -0,0 +1,21 @@ | |||||
| // pages/index/sw/index.js | |||||
| Component({ | |||||
| /** | |||||
| * 组件的属性列表 | |||||
| */ | |||||
| properties: { | |||||
| paramAtoB: String, | |||||
| data: { | |||||
| value: {}, | |||||
| type: Object | |||||
| }, | |||||
| }, | |||||
| /** | |||||
| * 组件的初始数据 | |||||
| */ | |||||
| data: {}, | |||||
| methods: { | |||||
| } | |||||
| }); | |||||
| @@ -0,0 +1,6 @@ | |||||
| { | |||||
| "component": true, | |||||
| "usingComponents": { | |||||
| "i-button": "../../dist/button/index" | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,37 @@ | |||||
| <navigator url="/pages/coupon/detail/index?couponChannelId={{data.id}}&couponId={{data.couponId}}&title={{data.title}}"> | |||||
| <!-- 首页优惠券列表页面 --> | |||||
| <view class="coupons"> | |||||
| <view class="coupons-img"> | |||||
| <image src="{{data.coverImg}}" mode='aspectFill' lazy-load="true"></image> | |||||
| </view> | |||||
| <view class="coupons-info"> | |||||
| <view class="coupons-info-name tit">{{data.title}}</view> | |||||
| <view class="coupons-info-name subtitle">{{data.subTitle}}</view> | |||||
| <view class="coupons-info-price-p"> | |||||
| <view class='price'> | |||||
| <text>{{data.salePriceStr}}<text style="font-size:24rpx;display:inline-block;margin-right:10rpx;font-weight:400;">元</text></text> | |||||
| <view class="coupons-info-manjian" style="margin-top:10rpx;" wx:if="{{data.type == 1}}"> | |||||
| <view class='view01' wx:if="{{data.unit==0}}">{{data.priceStr}}元</view> | |||||
| <view wx:if="{{data.unit==1}}">{{data.priceStr}}小时</view> | |||||
| <!-- <text class='txt2'>满{{data.usePriceStr}}元可用</text> --> | |||||
| </view> | |||||
| <view class="coupons-info-manjian" wx:elif="{{data.type == 2||data.type == 3||data.type==4||data.type==5}}"> | |||||
| <text class='view01' wx:if="{{data.unit==0}}">{{data.priceStr}}元</text> | |||||
| <text wx:if="{{data.unit==1}}">{{data.priceStr}}小时</text> | |||||
| <!-- <text class='txt2'>仅限本店使用</text> --> | |||||
| </view> | |||||
| </view> | |||||
| <!-- <view class="coupons-info-manjian1" wx:if="{{data.merchantVoList.length==1}}">{{data.merchantVoList[0].merchantName}}</view> | |||||
| <view class="coupons-info-manjian1" wx:if="{{data.merchantVoList.length>1}}">多商户通用</view> --> | |||||
| </view> | |||||
| </view> | |||||
| <view class="coupons-btn"> | |||||
| <!-- 优惠券价格 --> | |||||
| <i-button i-class="coupons-btn-gm" wx:if="{{data.salePriceStr==0&&data.remainInventory!=0}}" data-date='{{data}}'>免费领</i-button> | |||||
| <i-button i-class="coupons-btn-gm" wx:if="{{data.salePriceStr!=0&&data.remainInventory!=0}}" data-date='{{data}}'>马上购</i-button> | |||||
| <i-button i-class="coupons-btn-gms" wx:if="{{data.remainInventory==0}}" data-date='{{data}}'>已售罄</i-button> | |||||
| <i-button i-class="coupons-btn-gms" wx:if="{{data.status==1}}" data-date='{{data}}'>已下架</i-button> | |||||
| </view> | |||||
| <!-- <view class="coupons-info-name sy">剩余{{data.remainInventory}}</view> --> | |||||
| </view> | |||||
| </navigator> | |||||
| @@ -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; | |||||
| } | |||||
| @@ -26,6 +26,10 @@ var config = { | |||||
| * 检查用户手机授权状态 | * 检查用户手机授权状态 | ||||
| */ | */ | ||||
| checkPhoneStatus: "/user/checkPhoneStatus", | checkPhoneStatus: "/user/checkPhoneStatus", | ||||
| /** | |||||
| * 商户优惠信息 | |||||
| */ | |||||
| merchantCouponList: "/wxCoupon/findByMerchant", | |||||
| /** | /** | ||||
| * 优惠券详情 | * 优惠券详情 | ||||
| */ | */ | ||||
| @@ -349,7 +349,7 @@ Page({ | |||||
| }); | }); | ||||
| } else if (err.code == 3001) { | } else if (err.code == 3001) { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: "超过限购条件", | |||||
| title: "您已超过限购", | |||||
| image: './../../../assets/images/fail.png', | image: './../../../assets/images/fail.png', | ||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| @@ -382,7 +382,14 @@ Page({ | |||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | 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) { | } else if (err.code == 3001) { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: "超过限购条件", | |||||
| title: "您已超过限购", | |||||
| image: './../../../assets/images/fail.png', | image: './../../../assets/images/fail.png', | ||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| @@ -672,7 +679,14 @@ Page({ | |||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | 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) { | |||||
| /** | /** | ||||
| * 将值传到用户手机号授权的页面 | * 将值传到用户手机号授权的页面 | ||||
| * | * | ||||
| @@ -363,7 +363,7 @@ Page({ | |||||
| }); | }); | ||||
| } else if (err.code == "3001") { | } else if (err.code == "3001") { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: "超过限购条件", | |||||
| title: "您已超过限购", | |||||
| image: imgurl.fail.url, | image: imgurl.fail.url, | ||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| @@ -396,6 +396,13 @@ Page({ | |||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| }); | }); | ||||
| } else if (err.code == 3012) { | |||||
| wx.showToast({ | |||||
| title: "您有未支付订单", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 11005) { | } else if (err.code == 11005) { | ||||
| /** | /** | ||||
| * 将值传到用户手机号授权的页面 | * 将值传到用户手机号授权的页面 | ||||
| @@ -664,7 +664,7 @@ Page({ | |||||
| }); | }); | ||||
| } else if (err.code == 3001) { | } else if (err.code == 3001) { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: "超过限购条件", | |||||
| title: "您已超过限购", | |||||
| image: './../../../assets/images/fail.png', | image: './../../../assets/images/fail.png', | ||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| @@ -697,6 +697,13 @@ Page({ | |||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| }); | }); | ||||
| } else if (err.code == 3012) { | |||||
| wx.showToast({ | |||||
| title: "您有未支付订单", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 11005) { | } else if (err.code == 11005) { | ||||
| /** | /** | ||||
| * 将值传到用户手机号授权的页面 | * 将值传到用户手机号授权的页面 | ||||
| @@ -9,11 +9,13 @@ Page({ | |||||
| */ | */ | ||||
| data: { | data: { | ||||
| teljpgUrl: imgurl.teljpg.url, | teljpgUrl: imgurl.teljpg.url, | ||||
| share01: imgurl.share01.url, | |||||
| page: 1, | page: 1, | ||||
| imglist:null, | imglist:null, | ||||
| shopVoList:[], | shopVoList:[], | ||||
| couponList:[],//活动劵列表 | |||||
| data:{ | data:{ | ||||
| currentTabsIndex:0, | |||||
| currentTab: 0 | |||||
| }, | }, | ||||
| id:null | id:null | ||||
| }, | }, | ||||
| @@ -28,16 +30,8 @@ Page({ | |||||
| id: options.id | id: options.id | ||||
| }); | }); | ||||
| that.getList(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 | 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 () { | 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; | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 页面相关事件处理函数--监听用户下拉动作 | * 页面相关事件处理函数--监听用户下拉动作 | ||||
| @@ -3,6 +3,7 @@ | |||||
| "backgroundColor": "#f4f4f4", | "backgroundColor": "#f4f4f4", | ||||
| "enablePullDownRefresh": true, | "enablePullDownRefresh": true, | ||||
| "usingComponents": { | "usingComponents": { | ||||
| "c-banner": "../../../components/banner/index" | |||||
| "c-banner": "../../../components/banner/index", | |||||
| "c-coupons": "../../../components/coupons/index" | |||||
| } | } | ||||
| } | } | ||||
| @@ -9,7 +9,7 @@ | |||||
| </swiper> | </swiper> | ||||
| <view class='merchant-detail'> | <view class='merchant-detail'> | ||||
| <!-- 品牌信息 --> | <!-- 品牌信息 --> | ||||
| <view class='merchant-brand'> | |||||
| <view class='merchant-brand' style='position:relative;z-index:9'> | |||||
| <view> | <view> | ||||
| <image src='{{data.merchantImgUrl}}' mode='aspectFill'></image> | <image src='{{data.merchantImgUrl}}' mode='aspectFill'></image> | ||||
| </view> | </view> | ||||
| @@ -17,6 +17,10 @@ | |||||
| <text>{{data.merchantName}}</text> | <text>{{data.merchantName}}</text> | ||||
| <text>{{data.title}}</text> | <text>{{data.title}}</text> | ||||
| </view> | </view> | ||||
| <view class='fenxiang' wx:if="{{data.type!=50&&data.type!=51}}"> | |||||
| <image class="fenxiang" src='{{share01}}' mode="widthFix"></image> | |||||
| <button class='share user-motto' data-id='{{data.id}}' data-couponId='{{data.couponId}}' data-title='{{data.title}}' id="shareBtn" open-type="share" hover-class="other-button-hover"></button> | |||||
| </view> | |||||
| </view> | </view> | ||||
| <!-- 一个商铺 --> | <!-- 一个商铺 --> | ||||
| <!-- 多个商铺 --> | <!-- 多个商铺 --> | ||||
| @@ -44,33 +48,36 @@ | |||||
| </view> | </view> | ||||
| <!-- 商户简介 --> | <!-- 商户简介 --> | ||||
| <view class='merchant-phones'> | <view class='merchant-phones'> | ||||
| <!-- <view> | |||||
| <text>商户简介</text> | |||||
| </view> --> | |||||
| <view class="swiper-tab"> | <view class="swiper-tab"> | ||||
| <view class="swiper-tab-item {{currentTab==0?'active-tab':''}}" data-current="0" bindtap="clickTab">全部</view> | |||||
| <view class="swiper-tab-item {{currentTab==1?'active-tab':''}}" data-current="1" bindtap="clickTab">找人</view> | |||||
| <view class="swiper-tab-item {{currentTab==2?'active-tab':''}}" data-current="2" bindtap="clickTab">找车</view> | |||||
| <view class="swiper-tab-item {{currentTab==0?'active-tab':''}}" data-current="0" bindtap="clickTab">优惠信息</view> | |||||
| <view class="swiper-tab-item {{currentTab==1?'active-tab':''}}" data-current="1" bindtap="clickTab">商家简介</view> | |||||
| </view> | </view> | ||||
| <swiper current="{{currentTab}}" duration="300" bindchange="swiperTabView"> | <swiper current="{{currentTab}}" duration="300" bindchange="swiperTabView"> | ||||
| <!-- 商户对应的活动 --> | |||||
| <swiper-item> | <swiper-item> | ||||
| <view>全部</view> | |||||
| </swiper-item> | |||||
| <swiper-item> | |||||
| <view>找人</view> | |||||
| <view class='coupons clearfix'> | |||||
| <c-coupons wx:if="{{couponList.length!=0}}" wx:for="{{couponList}}" paramAtoB="{{loading}}" wx:key="unique" data="{{item}}" list="{{couponList}}" /> | |||||
| </view> | |||||
| <view class='dingdan' wx:if="{{list.length==0}}"> | |||||
| <image src="{{actUrl}}" mode="widthFix"></image> | |||||
| <text>请您敬请期待</text> | |||||
| <text>我们正在筹备一大波优惠活动</text> | |||||
| </view> | |||||
| <view class="loading" wx:if="{{loading}}"><image src="{{loadingUrl}}" mode="widthFix"></image>{{content}}</view> | |||||
| <view class='loadingtext' wx:if="{{loadingtext}}">{{loadingtext}}</view> | |||||
| </swiper-item> | </swiper-item> | ||||
| <swiper-item> | <swiper-item> | ||||
| <view>找车</view> | |||||
| <view> | |||||
| <text wx:if="{{data.summary}}">{{data.summary}}</text> | |||||
| <text wx:else>{{"信息完善中,敬请期待。"}}</text> | |||||
| </view> | |||||
| </swiper-item> | </swiper-item> | ||||
| </swiper> | </swiper> | ||||
| <view class='merchant-info'> | <view class='merchant-info'> | ||||
| <view hidden='currentTabsIndex!=0'> | <view hidden='currentTabsIndex!=0'> | ||||
| <text wx:if="{{data.summary}}">{{data.summary}}</text> | <text wx:if="{{data.summary}}">{{data.summary}}</text> | ||||
| </view> | </view> | ||||
| <view hidden='currentTabsIndex!=1'> | |||||
| <text wx:if="{{data.summary}}">{{data.summary}}</text> | |||||
| <text wx:else>{{"信息完善中,敬请期待。"}}</text> | |||||
| </view> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| @@ -155,6 +155,54 @@ | |||||
| display:flex; | display:flex; | ||||
| align-items:center; | align-items:center; | ||||
| justify-content:center; | justify-content:center; | ||||
| display:flex; | |||||
| border-bottom:1rpx solid #D0D0D7; | 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; | |||||
| } | } | ||||
| @@ -118,7 +118,7 @@ Page({ | |||||
| }); | }); | ||||
| } else if (err.code == 3001) { | } else if (err.code == 3001) { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: "超过限购条件", | |||||
| title: "您已超过限购", | |||||
| image: './../../../assets/images/fail.png', | image: './../../../assets/images/fail.png', | ||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| @@ -151,6 +151,13 @@ Page({ | |||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| }); | }); | ||||
| } else if (err.code == 3012) { | |||||
| wx.showToast({ | |||||
| title: "您有未支付订单", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 11005) { | } else if (err.code == 11005) { | ||||
| /** | /** | ||||
| * 将值传到用户手机号授权的页面 | * 将值传到用户手机号授权的页面 | ||||
| @@ -327,7 +327,7 @@ Page({ | |||||
| }); | }); | ||||
| } else if (err.code == 3001) { | } else if (err.code == 3001) { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: "超过限购条件", | |||||
| title: "您已超过限购", | |||||
| image: './../../assets/images/fail.png', | image: './../../assets/images/fail.png', | ||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| @@ -360,6 +360,13 @@ Page({ | |||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| }); | }); | ||||
| } else if (err.code == 3012) { | |||||
| wx.showToast({ | |||||
| title: "您有未支付订单", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 11005) { | } else if (err.code == 11005) { | ||||
| /** | /** | ||||
| * 将值传到用户手机号授权的页面 | * 将值传到用户手机号授权的页面 | ||||
| @@ -312,7 +312,7 @@ Page({ | |||||
| }); | }); | ||||
| } else if (err.code == 3001) { | } else if (err.code == 3001) { | ||||
| wx.showToast({ | wx.showToast({ | ||||
| title: "超过限购条件", | |||||
| title: "您已超过限购", | |||||
| image: './../../../assets/images/fail.png', | image: './../../../assets/images/fail.png', | ||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| @@ -345,6 +345,13 @@ Page({ | |||||
| duration: 2000, | duration: 2000, | ||||
| mask: false | mask: false | ||||
| }); | }); | ||||
| }else if (err.code == 3012) { | |||||
| wx.showToast({ | |||||
| title: "您有未支付订单", | |||||
| image: './../../../assets/images/fail.png', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| } else if (err.code == 11005) { | } else if (err.code == 11005) { | ||||
| /** | /** | ||||
| * 将值传到用户手机号授权的页面 | * 将值传到用户手机号授权的页面 | ||||