| @@ -14,7 +14,7 @@ | |||||
| "pages/main/index", | "pages/main/index", | ||||
| "pages/index/searchbar/index", | "pages/index/searchbar/index", | ||||
| "pages/index/merchantList/index", | "pages/index/merchantList/index", | ||||
| "pages/index/detail/index", | |||||
| "pages/index/searchbar/detail/index", | |||||
| "pages/bargain/bargainDatail/bargainDatail", | "pages/bargain/bargainDatail/bargainDatail", | ||||
| "pages/bargain/bargain", | "pages/bargain/bargain", | ||||
| "pages/cardorder/index/index", | "pages/cardorder/index/index", | ||||
| @@ -7,7 +7,7 @@ | |||||
| "etcpVersion": "release", | "etcpVersion": "release", | ||||
| "etcpCallbackUrl": "https://ciformall.youlane.cn/api/carCallback/etcpPaidCallback", | "etcpCallbackUrl": "https://ciformall.youlane.cn/api/carCallback/etcpPaidCallback", | ||||
| "ifHaveWebSocket": "0", | "ifHaveWebSocket": "0", | ||||
| "ifHaveCarModular": "0" | |||||
| "ifHaveCarModular": "1" | |||||
| }, | }, | ||||
| "name": "富茂客官开发", | "name": "富茂客官开发", | ||||
| "weappId": "wxea71200db93d756b", | "weappId": "wxea71200db93d756b", | ||||
| @@ -1,5 +1,5 @@ | |||||
| <view class='page' wx:if="{{flags=='have'}}"> | <view class='page' wx:if="{{flags=='have'}}"> | ||||
| <view class='title'>生成规则</view> | |||||
| <view class='title'>成长值增长规则</view> | |||||
| <view class='scroll'> | <view class='scroll'> | ||||
| <scroll-view scroll-x class="scroll-header"> | <scroll-view scroll-x class="scroll-header"> | ||||
| <view class="scroll-view-item" wx:for="{{rules}}" wx:key="index"> | <view class="scroll-view-item" wx:for="{{rules}}" wx:key="index"> | ||||
| @@ -0,0 +1,146 @@ | |||||
| const Http = require("../../../../utils/HttpBasics"); | |||||
| const imgurl = require("../../../../utils/imgurl"); | |||||
| const config = require("../../../../config/config"); | |||||
| let app = getApp(); | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| teljpgUrl: imgurl.teljpg.url, | |||||
| share01: imgurl.share01.url, | |||||
| page: 1, | |||||
| imglist: null, | |||||
| shopVoList: [], | |||||
| couponList: [], //活动劵列表 | |||||
| data: { | |||||
| currentTab: 0 | |||||
| }, | |||||
| id: null | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad: function(options) { | |||||
| let that = this; | |||||
| if (options && options.id) { | |||||
| this.setData({ | |||||
| id: options.id | |||||
| }); | |||||
| that.getList(options.id); | |||||
| that.getCouponList(options.id); | |||||
| } | |||||
| }, | |||||
| /** | |||||
| * 拨打电话 | |||||
| */ | |||||
| phone: function(e) { | |||||
| let that = this; | |||||
| wx.makePhoneCall({ | |||||
| phoneNumber: e.target.dataset.merchantlinkphone | |||||
| }); | |||||
| }, | |||||
| /** | |||||
| * 获取商户详情 | |||||
| */ | |||||
| getList: function(id) { | |||||
| let that = this; | |||||
| let data; | |||||
| data = { | |||||
| pageNum: that.data.page, | |||||
| pageSize: 15, | |||||
| id: id | |||||
| } | |||||
| Http.get({ | |||||
| url: config.api.merchantList, | |||||
| data: data | |||||
| }).then(res => { | |||||
| that.setData({ | |||||
| data: res.data.list[0], | |||||
| shopVoList: res.data.list[0].shopVoList, | |||||
| imglist: JSON.parse(res.data.list[0].coverPicture) ? JSON.parse(res.data.list[0].coverPicture) : res.data.list[0].merchantImgUrl, | |||||
| }) | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 获取商户活动信息 券类型(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.list, | |||||
| }) | |||||
| }) | |||||
| .catch(err => { | |||||
| wx.showToast({ | |||||
| title: err.errMsg, | |||||
| icon: 'none', | |||||
| duration: 2000, | |||||
| mask: false | |||||
| }); | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 获取多商铺列表 | |||||
| */ | |||||
| shopList: function(e) { | |||||
| wx.navigateTo({ | |||||
| url: `/pages/index/merchantList/index?id=${e.currentTarget.dataset.id}` | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面隐藏 | |||||
| */ | |||||
| 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; | |||||
| }, | |||||
| /** | |||||
| * 页面相关事件处理函数--监听用户下拉动作 | |||||
| */ | |||||
| onPullDownRefresh: function() { | |||||
| }, | |||||
| }) | |||||
| @@ -0,0 +1,9 @@ | |||||
| { | |||||
| "navigationBarTitleText": "商户详情", | |||||
| "backgroundColor": "#f4f4f4", | |||||
| "enablePullDownRefresh": true, | |||||
| "usingComponents": { | |||||
| "c-banner": "../../../../components/banner/index", | |||||
| "c-coupons": "../../../../components/coupons/index" | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,81 @@ | |||||
| <!--pages/index/detail/index.wxml--> | |||||
| <view> | |||||
| <swiper class="index-slide" autoplay="true" circular="false"> | |||||
| <block wx:for="{{imglist}}" wx:key="unique"> | |||||
| <swiper-item> | |||||
| <image src="{{item}}" class="index-slide-image" mode='widthFix' /> | |||||
| </swiper-item> | |||||
| </block> | |||||
| </swiper> | |||||
| <view class='merchant-detail'> | |||||
| <!-- 品牌信息 --> | |||||
| <view class='merchant-brand' style='position:relative;z-index:9'> | |||||
| <view> | |||||
| <image src='{{data.merchantImgUrl}}' mode='aspectFill'></image> | |||||
| </view> | |||||
| <view> | |||||
| <text>{{data.merchantName}}</text> | |||||
| <text>{{data.title}}</text> | |||||
| </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 class='merchant-shop'> | |||||
| <view> | |||||
| <view> | |||||
| <text>商户位置</text> | |||||
| </view> | |||||
| <view class='merchants'> | |||||
| <text wx:for="{{shopVoList}}" wx:key="{{index}}">{{item.buildingName}}{{item.floorName}}--{{item.shopNumber}}</text> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <!-- 联系方式 --> | |||||
| <view class='merchant-phone'> | |||||
| <view> | |||||
| <text>联系商户</text> | |||||
| </view> | |||||
| <view> | |||||
| <view style='display:block;text-align:left;margin-right:20rpx;'> | |||||
| <text>{{data.merchantLinkPhone}}</text> | |||||
| </view> | |||||
| <image bindtap='phone' data-merchantLinkPhone='{{data.merchantLinkPhone}}' class="tel" src="{{teljpgUrl}}" mode="widthFix" /> | |||||
| </view> | |||||
| </view> | |||||
| <!-- 商户简介 --> | |||||
| <view class="swiper-tab"> | |||||
| <view class="swiper-tab-item">商家简介</view> | |||||
| </view> | |||||
| <view class='intro'> | |||||
| <text wx:if="{{data.summary}}">{{data.summary}}</text> | |||||
| <text wx:else>信息完善中,敬请期待。</text> | |||||
| </view> | |||||
| <view class='merchant-phones' style='margin-top:30rpx;' wx:if="{{couponList.length!=0}}"> | |||||
| <view class="swiper-tab"> | |||||
| <view class="swiper-tab-item">优惠信息</view> | |||||
| </view> | |||||
| <view> | |||||
| <view class='coupons clearfix'> | |||||
| <c-coupons 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> | |||||
| </view> | |||||
| <view class='merchant-info'> | |||||
| <view hidden='currentTabsIndex!=0'> | |||||
| <text wx:if="{{data.summary}}">{{data.summary}}</text> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| @@ -0,0 +1,214 @@ | |||||
| .index-slide, swiper-item | |||||
| .index-slide-image { | |||||
| display: block; | |||||
| width: 750rpx; | |||||
| margin: 0 auto; | |||||
| overflow: hidden; | |||||
| position: relative; | |||||
| height: 576rpx; | |||||
| } | |||||
| .index-slide-view .dots { | |||||
| position: absolute; | |||||
| left: 0; | |||||
| right: 0; | |||||
| bottom: 20rpx; | |||||
| display: flex; | |||||
| justify-content: center; | |||||
| } | |||||
| .index-slide-view .dots .dot { | |||||
| margin: 0 8rpx; | |||||
| width: 12rpx; | |||||
| height: 12rpx; | |||||
| background: #b6b6b7; | |||||
| border-radius: 50%; | |||||
| transition: all 0.6s; | |||||
| } | |||||
| .index-slide-view .dots .dot.active { | |||||
| background: #02c0ff; | |||||
| width: 30rpx; | |||||
| height: 12rpx; | |||||
| border-radius: 10rpx; | |||||
| opacity: 1; | |||||
| } | |||||
| .bannerbg { | |||||
| width: 100%; | |||||
| } | |||||
| .bannerbg image { | |||||
| display: block; | |||||
| width: 100%; | |||||
| } | |||||
| .merchant-detail { | |||||
| width:92%; | |||||
| padding:30rpx 4% 0; | |||||
| background:#fff; | |||||
| border-top-left-radius:20rpx; | |||||
| border-top-right-radius:20rpx; | |||||
| margin-top:-25rpx; | |||||
| } | |||||
| .merchant-brand, .merchant-shop, .merchant-phone { | |||||
| width: 100%; | |||||
| display: flex; | |||||
| padding: 20rpx 0; | |||||
| background: #fff; | |||||
| border-bottom: 1rpx solid #efefef; | |||||
| } | |||||
| .merchant-brand view:nth-child(1) { | |||||
| width: 160rpx; | |||||
| border-radius: 16rpx; | |||||
| height: 160rpx; | |||||
| } | |||||
| .merchant-brand view:nth-child(1) image { | |||||
| display: block; | |||||
| width: 160rpx; | |||||
| height: 160rpx; | |||||
| border-radius: 16rpx; | |||||
| border: 1px solid #e5e5e5; | |||||
| } | |||||
| .merchant-brand view:nth-child(2) { | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| flex: 6; | |||||
| padding-left: 30rpx; | |||||
| } | |||||
| .merchant-brand view:nth-child(2) text:nth-child(1) { | |||||
| margin-top: 20rpx; | |||||
| } | |||||
| .merchant-shop text, .merchant-phone text { | |||||
| font-size: 30rpx; | |||||
| } | |||||
| .merchant-shop view, .merchant-phone view { | |||||
| display: flex; | |||||
| flex: 2; | |||||
| color: #333; | |||||
| } | |||||
| .merchant-shop view:nth-child(2){ | |||||
| font-size: 30rpx; | |||||
| } | |||||
| .merchant-info { | |||||
| display: block!important; | |||||
| color: #999; | |||||
| font-size: 28rpx; | |||||
| } | |||||
| .merchant-phones{ | |||||
| padding: 20rpx 0; | |||||
| display: block; | |||||
| font-size: 30rpx; | |||||
| border-top: 1rpx solid #efefef; | |||||
| } | |||||
| .tel { | |||||
| right: 0; | |||||
| top: 0; | |||||
| bottom: 0; | |||||
| margin: auto; | |||||
| width: 50rpx; | |||||
| height: 50rpx; | |||||
| } | |||||
| .shoplists { | |||||
| display: flex; | |||||
| } | |||||
| .shoplists text { | |||||
| flex: 2; | |||||
| } | |||||
| .godetail { | |||||
| color: #999; | |||||
| font-size: 30rpx; | |||||
| position: absolute; | |||||
| right: 10rpx; | |||||
| } | |||||
| .merchants text{ | |||||
| display: block; | |||||
| text-align: left; | |||||
| font-size:26rpx; | |||||
| margin-bottom: 6rpx; | |||||
| } | |||||
| .merchants{ | |||||
| display: block!important; | |||||
| } | |||||
| .merchant-brand{ | |||||
| border: none!important; | |||||
| } | |||||
| .tabs-item.selected { | |||||
| color:rgba(171,149,109,.8); | |||||
| border-bottom:2px solid rgba(171,149,109,.8); | |||||
| } | |||||
| .tabs-item { | |||||
| width:33.3%; | |||||
| color:#C7C7CB; | |||||
| font-size:28rpx; | |||||
| display:flex; | |||||
| align-items:center; | |||||
| justify-content:center; | |||||
| 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; | |||||
| padding-left: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; | |||||
| } | |||||
| .intro{ | |||||
| font-size:30rpx; | |||||
| line-height: 36rpx; | |||||
| } | |||||
| @@ -35,7 +35,7 @@ Page({ | |||||
| */ | */ | ||||
| gotoDetail(e){ | gotoDetail(e){ | ||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: `/pages/index/detail/index?id=${e.currentTarget.dataset.id}` | |||||
| url: `/pages/index/searchbar/detail/index?id=${e.currentTarget.dataset.id}` | |||||
| }) | }) | ||||
| }, | }, | ||||
| /** | /** | ||||