Commit 6eb6bb78 by huyue

提交附近门店

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