Commit 6eb6bb78 by huyue

提交附近门店

1 parent 5d2f57a4
......@@ -147,11 +147,11 @@
</template> -->
</view>
</view>
<view class="store-info">
<view class="store-info" v-if="this.storeAddress">
<view class="sprite-icon icon-icon-store"></view>
<p class="store-label">附近门店</p>
<p class="store-address">{{ storeAddress }}</p>
<view class="copy-btn" v-if="this.storeAddress" @click="copyText"><view class="sprite-icon icon-icon-copy copy"></view>复制</view>
<view class="copy-btn" @click="copyText"><view class="sprite-icon icon-icon-copy copy"></view>复制</view>
</view>
<view :class="['usage-notice', couponDetailInfo.couponState == 2 ? 'claimed-usage':'']">
<view :class="[couponDetailInfo.couponState == 2 ? 'claimed-notice':'']">
......@@ -233,7 +233,7 @@ export default {
},
total: 0,
pageNum: 1,
pageSize: 8,
pageSize: 12,
storeAddress: ''
}
},
......@@ -291,27 +291,37 @@ export default {
this.typeList[3].num = () => `(${res[2]})`
})
},
getGrantRecord(couponState) {
console.log('查询优惠券列表');
const { pageNum, pageSize } = this
const params = {
staffPhone: uni.$storage.get('userInfo').phone,
pageNum,
pageSize
}
if (couponState) params.couponState = couponState
console.log(params, 'chaxun');
uni.$api.pointApi.getGrantRecord(params).then(res => {
async getGrantRecord(couponState) {
try {
uni.showLoading({
mask: true
})
console.log('查询优惠券列表');
const { pageNum, pageSize } = this
const params = {
staffPhone: uni.$storage.get('userInfo').phone,
pageNum,
pageSize
}
if (couponState) params.couponState = couponState
console.log(params, 'chaxun');
const res = await uni.$api.pointApi.getGrantRecord(params)
console.log(res, '========================', pageNum);
if(pageNum == 1) {
this.list = res.list
} else {
this.list = this.list.concat(res.list)
}
uni.hideLoading()
this.total = res.total
this.nothing = res.length ? true : false
})
this.statisticsCount()
this.statisticsCount()
}
catch (error) {
uni.showToast({
title: 'error',
});
}
},
changeType(index, name) {
console.log(index, name);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!