diff --git a/app.json b/app.json
index 73531c4..c5c50c2 100644
--- a/app.json
+++ b/app.json
@@ -5,6 +5,7 @@
"pages/spellGroup/spellGroup",
"pages/complete/index",
"pages/main/index",
+ "pages/index/searchbar/index",
"pages/bargain/bargainDatail/bargainDatail",
"pages/bargain/bargain",
"pages/cardorder/index/index",
diff --git a/assets/images/search.png b/assets/images/search.png
new file mode 100644
index 0000000..64a1c93
Binary files /dev/null and b/assets/images/search.png differ
diff --git a/config/config.js b/config/config.js
index 5216fd9..0a2ed71 100755
--- a/config/config.js
+++ b/config/config.js
@@ -235,7 +235,11 @@ var config = {
/**
*查询差1个的团购信息
*/
- queryRemainOne:'/orderGroup/queryRemainOne'
+ queryRemainOne:'/orderGroup/queryRemainOne',
+ /**
+ * *分页列表接口
+ */
+ merchantList:"/merchant/list"
},
weapp: {
AppId: weappId
diff --git a/pages/discountCardList/discountCardList.wxss b/pages/discountCardList/discountCardList.wxss
index f6685d4..fbe3d38 100644
--- a/pages/discountCardList/discountCardList.wxss
+++ b/pages/discountCardList/discountCardList.wxss
@@ -79,6 +79,11 @@ page{
line-height: 65rpx;
color: #333;
text-align: center;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ width: 320rpx;
+ margin: 0 auto;
}
.info view:nth-child(1) {
display: flex;
diff --git a/pages/index/searchbar/index.js b/pages/index/searchbar/index.js
new file mode 100644
index 0000000..8b2e101
--- /dev/null
+++ b/pages/index/searchbar/index.js
@@ -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 () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/index/searchbar/index.json b/pages/index/searchbar/index.json
new file mode 100644
index 0000000..39dd6ed
--- /dev/null
+++ b/pages/index/searchbar/index.json
@@ -0,0 +1,3 @@
+{
+ "navigationBarTitleText": "门店搜索"
+}
\ No newline at end of file
diff --git a/pages/index/searchbar/index.wxml b/pages/index/searchbar/index.wxml
new file mode 100644
index 0000000..57e4467
--- /dev/null
+++ b/pages/index/searchbar/index.wxml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+ {{item.merchantName}}
+ {{item.addr}}{{item.buildingName}}{{item.floorName}}
+
+
+
+
\ No newline at end of file
diff --git a/pages/index/searchbar/index.wxss b/pages/index/searchbar/index.wxss
new file mode 100644
index 0000000..048e995
--- /dev/null
+++ b/pages/index/searchbar/index.wxss
@@ -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;
+}
\ No newline at end of file
diff --git a/pages/main/index.js b/pages/main/index.js
index 351ec02..5b25f74 100644
--- a/pages/main/index.js
+++ b/pages/main/index.js
@@ -75,6 +75,12 @@ Page({
showQrcode: false
})
},
+ //搜索门店
+ searchbar:function(){
+ wx.navigateTo({
+ url: '/pages/index/searchbar/index',
+ })
+ },
//适配不同屏幕大小的canvas
setCanvasSize: function() {
var size = {};
diff --git a/pages/main/index.wxml b/pages/main/index.wxml
index 97b726b..66ef9ac 100644
--- a/pages/main/index.wxml
+++ b/pages/main/index.wxml
@@ -1,5 +1,12 @@
+
+
+
+ 请输入要搜索的门店
+
+
+
diff --git a/pages/main/index.wxss b/pages/main/index.wxss
index a82447e..cabb333 100644
--- a/pages/main/index.wxss
+++ b/pages/main/index.wxss
@@ -121,4 +121,32 @@ page {
.memberIds{
padding-top: 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;
}
\ No newline at end of file