Commit bfc1a1c1 by 高淑倩

门店列表

parent 4a080aed
...@@ -57,7 +57,8 @@ ...@@ -57,7 +57,8 @@
"pages/friendShareList/friendShareList", "pages/friendShareList/friendShareList",
"pages/goToHome/goToHome", "pages/goToHome/goToHome",
"pages/noPermission/noPermission", "pages/noPermission/noPermission",
"pages/scanCoupon/scanCoupon" "pages/scanCoupon/scanCoupon",
"pages/scanCouponStoreList/scanCouponStoreList"
] ]
}, },
{ {
......
...@@ -55,6 +55,11 @@ wxService.page({ ...@@ -55,6 +55,11 @@ wxService.page({
wxService.router(`/pages/category/category`) wxService.router(`/pages/category/category`)
}) })
}, },
handelGoStoreList(e){
const { list } = e.currentTarget.dataset
const storeList = list ? JSON.stringify(list) : []
wxService.router(`/subPackage/page/pages/scanCouponStoreList/scanCouponStoreList`).search({ storeList })
},
handelGet() { handelGet() {
const { id } = this.data const { id } = this.data
wx.showLoading({ wx.showLoading({
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<view class="store-num">适用门店 <view class="store-num">适用门店
<text class="store-num-tips">({{subStoreData.length}})</text> <text class="store-num-tips">({{subStoreData.length}})</text>
</view> </view>
<view class="store-more" wx:if="{{subStoreData.length}}">查看更多></view> <view class="store-more" wx:if="{{subStoreData.length}}" data-list="{{subStoreData}}" bindtap="handelGoStoreList">查看更多></view>
</view> </view>
<view class="store-address" wx:if="{{subStoreData.length}}"> <view class="store-address" wx:if="{{subStoreData.length}}">
<view class="store-detail"> <view class="store-detail">
......
// subPackage/page/pages/scanCoupon/scanCoupon.js
const wxService = require('../../../../utils/wxService')
wxService.page({
/**
* 页面的初始数据
*/
data: {
list: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
console.log('--------', this.options)
const { storeList } = this.options
this.setData({
list: JSON.parse(storeList)
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"navigationBarTitleText": "适用门店",
"usingComponents": { }
}
\ No newline at end of file
<view class="scan-coupon">
<view class="scan-stores">
<view wx:if="{{list.length}}">
<block class="store-address" wx:for="{{list}}" wx:key="{{index}}" wx:for-item="item">
<view class="store-detail">
<view class="detail-name">{{item.code}}</view>
<view class="detail-address">{{item.name}}</view>
</view>
</block>
</view>
<view class="goods-no-more" wx:else>没有更多哦</view>
</view>
</view>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment