| @@ -5,6 +5,7 @@ | |||||
| "pages/spellGroup/spellGroup", | "pages/spellGroup/spellGroup", | ||||
| "pages/complete/index", | "pages/complete/index", | ||||
| "pages/main/index", | "pages/main/index", | ||||
| "pages/index/searchbar/index", | |||||
| "pages/bargain/bargainDatail/bargainDatail", | "pages/bargain/bargainDatail/bargainDatail", | ||||
| "pages/bargain/bargain", | "pages/bargain/bargain", | ||||
| "pages/cardorder/index/index", | "pages/cardorder/index/index", | ||||
| @@ -235,7 +235,11 @@ var config = { | |||||
| /** | /** | ||||
| *查询差1个的团购信息 | *查询差1个的团购信息 | ||||
| */ | */ | ||||
| queryRemainOne:'/orderGroup/queryRemainOne' | |||||
| queryRemainOne:'/orderGroup/queryRemainOne', | |||||
| /** | |||||
| * *分页列表接口 | |||||
| */ | |||||
| merchantList:"/merchant/list" | |||||
| }, | }, | ||||
| weapp: { | weapp: { | ||||
| AppId: weappId | AppId: weappId | ||||
| @@ -79,6 +79,11 @@ page{ | |||||
| line-height: 65rpx; | line-height: 65rpx; | ||||
| color: #333; | color: #333; | ||||
| text-align: center; | text-align: center; | ||||
| white-space: nowrap; | |||||
| text-overflow: ellipsis; | |||||
| overflow: hidden; | |||||
| width: 320rpx; | |||||
| margin: 0 auto; | |||||
| } | } | ||||
| .info view:nth-child(1) { | .info view:nth-child(1) { | ||||
| display: flex; | display: flex; | ||||
| @@ -0,0 +1,96 @@ | |||||
| const Http = require("../../../utils/HttpBasics"); | |||||
| const imgurl = require("../../../utils/imgurl"); | |||||
| const config = require("../../../config/config"); | |||||
| const QR = require("../../../utils/memberqrcode.js"); | |||||
| let app = getApp(); | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| teljpgUrl: imgurl.teljpg.url, | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad: function (options) { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面初次渲染完成 | |||||
| */ | |||||
| onReady: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面显示 | |||||
| */ | |||||
| onShow: function () { | |||||
| // merchantList | |||||
| let that = this; | |||||
| that.getList(10,1) | |||||
| }, | |||||
| getList(pageSize,pageNum){ | |||||
| let that = this; | |||||
| Http.get({ | |||||
| url: config.api.merchantList, | |||||
| data: { | |||||
| pageNum: pageNum, | |||||
| pageSize: pageSize | |||||
| } | |||||
| }).then(res => { | |||||
| that.setData({ | |||||
| merchantVoList: res.data.list | |||||
| }) | |||||
| console.log(res) | |||||
| }).catch(err => { | |||||
| console.log(err) | |||||
| }) | |||||
| }, | |||||
| phone: function (e) { | |||||
| let that = this; | |||||
| if (e.currentTarget.dataset.merchantlinkphone) { | |||||
| wx.makePhoneCall({ | |||||
| phoneNumber: e.currentTarget.dataset.merchantlinkphone | |||||
| }); | |||||
| } | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面隐藏 | |||||
| */ | |||||
| onHide: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面卸载 | |||||
| */ | |||||
| onUnload: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面相关事件处理函数--监听用户下拉动作 | |||||
| */ | |||||
| onPullDownRefresh: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面上拉触底事件的处理函数 | |||||
| */ | |||||
| onReachBottom: function () { | |||||
| }, | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage: function () { | |||||
| } | |||||
| }) | |||||
| @@ -0,0 +1,3 @@ | |||||
| { | |||||
| "navigationBarTitleText": "门店搜索" | |||||
| } | |||||
| @@ -0,0 +1,12 @@ | |||||
| <view class='posi'> | |||||
| <view class='posi_logo' wx:for="{{merchantVoList}}" wx:key="index"> | |||||
| <view> | |||||
| <image src='{{item.merchantImgUrl}}'></image> | |||||
| </view> | |||||
| <view> | |||||
| <text>{{item.merchantName}}</text> | |||||
| <text>{{item.addr}}{{item.buildingName}}{{item.floorName}}</text> | |||||
| </view> | |||||
| <image bindtap='phone' data-merchantLinkPhone='{{item.merchantLinkPhone}}' class="tel" src="{{teljpgUrl}}" mode="widthFix" /> | |||||
| </view> | |||||
| </view> | |||||
| @@ -0,0 +1,76 @@ | |||||
| .posi { | |||||
| position: relative; | |||||
| width: 92%; | |||||
| margin: 0 auto; | |||||
| } | |||||
| .posi>view:nth-child(2) { | |||||
| width: 100%; | |||||
| height: 87rpx; | |||||
| display: flex; | |||||
| justify-content: space-between; | |||||
| line-height: 87rpx; | |||||
| } | |||||
| .posi>view:nth-child(2) text:nth-child(1) { | |||||
| font-size: 30rpx; | |||||
| color: #a9a9a9; | |||||
| } | |||||
| .posi>view:nth-child(2) text:nth-child(2) { | |||||
| font-size: 30rpx; | |||||
| color: #a9a9a9; | |||||
| } | |||||
| .posi_logo { | |||||
| width: 100%; | |||||
| display: flex; | |||||
| padding: 20rpx 0; | |||||
| background: #fff; | |||||
| height: 100rpx; | |||||
| margin-bottom: 20rpx; | |||||
| } | |||||
| .posi_logo view:nth-child(1) { | |||||
| width: 100rpx; | |||||
| height: 100rpx; | |||||
| border-radius: 16rpx; | |||||
| } | |||||
| .posi_logo view:nth-child(1) image { | |||||
| display: block; | |||||
| width: 100rpx; | |||||
| height: 100rpx; | |||||
| border-radius: 16rpx; | |||||
| border: 1px solid #e5e5e5; | |||||
| } | |||||
| .posi_logo view:nth-child(2) { | |||||
| display: flex; | |||||
| flex-direction: column; | |||||
| flex: 8; | |||||
| padding-left: 30rpx; | |||||
| } | |||||
| .posi_logo view:nth-child(2) text:nth-child(1) { | |||||
| font-size: 32rpx; | |||||
| color: #333; | |||||
| letter-spacing: 0; | |||||
| } | |||||
| .posi_logo view:nth-child(2) text:nth-child(2) { | |||||
| font-size: 24rpx; | |||||
| color: #b8b8b8; | |||||
| padding-top: 3rpx; | |||||
| width: 450rpx; | |||||
| height: 36rpx; | |||||
| overflow: hidden; | |||||
| } | |||||
| .tel { | |||||
| right: 0; | |||||
| top: 0; | |||||
| bottom: 0; | |||||
| margin: auto; | |||||
| width: 50rpx; | |||||
| height: 50rpx; | |||||
| } | |||||
| @@ -75,6 +75,12 @@ Page({ | |||||
| showQrcode: false | showQrcode: false | ||||
| }) | }) | ||||
| }, | }, | ||||
| //搜索门店 | |||||
| searchbar:function(){ | |||||
| wx.navigateTo({ | |||||
| url: '/pages/index/searchbar/index', | |||||
| }) | |||||
| }, | |||||
| //适配不同屏幕大小的canvas | //适配不同屏幕大小的canvas | ||||
| setCanvasSize: function() { | setCanvasSize: function() { | ||||
| var size = {}; | var size = {}; | ||||
| @@ -1,5 +1,12 @@ | |||||
| <view class="container"> | <view class="container"> | ||||
| <!-- 门店列表展示 --> | |||||
| <view class='search'> | |||||
| <view class='searchbar' bindtap='searchbar'> | |||||
| <text>请输入要搜索的门店</text> | |||||
| <image src='./../../assets/images/search.png' mode='widthFix'></image> | |||||
| </view> | |||||
| </view> | |||||
| <c-banner wx:key="unique" list="{{list}}" /> | <c-banner wx:key="unique" list="{{list}}" /> | ||||
| <!-- 折扣卡 --> | <!-- 折扣卡 --> | ||||
| <view class='section'> | <view class='section'> | ||||
| @@ -121,4 +121,32 @@ page { | |||||
| .memberIds{ | .memberIds{ | ||||
| padding-top: 30rpx; | padding-top: 30rpx; | ||||
| font-size: 30rpx; | font-size: 30rpx; | ||||
| } | |||||
| .search{ | |||||
| background:rgba(2, 192, 255, 1); | |||||
| height: 76rpx; | |||||
| padding: 20rpx 0; | |||||
| } | |||||
| .searchbar{ | |||||
| position: relative; | |||||
| width: 685rpx; | |||||
| height: 76rpx; | |||||
| margin: 0 auto; | |||||
| background: #fff; | |||||
| border-radius:60rpx; | |||||
| } | |||||
| .searchbar image{ | |||||
| position: absolute; | |||||
| width: 40rpx; | |||||
| left: 20rpx; | |||||
| top:0; | |||||
| bottom: 0; | |||||
| margin: auto; | |||||
| } | |||||
| .searchbar text{ | |||||
| font-size: 32rpx; | |||||
| line-height: 76rpx; | |||||
| color: #555555; | |||||
| display: inline-block; | |||||
| margin-left: 70rpx; | |||||
| } | } | ||||